# cv::error: (-215:断言失败) src.type() == CV_32FC2 || src.type() == CV_64FC2 在函数 'cv::fisheye::undistortPoints' 中

- **ID:** `opencv/calib3d-fisheye-undistort-points-dtype`
- **领域:** opencv
- **类别:** type_error
- **错误码:** `-215`
- **验证级别:** ai_generated
- **修复率:** 90%

## 根因

fisheye::undistortPoints 要求输入点为双通道浮点或双精度数组，但输入类型或通道数错误。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 4.5.5 | active | — | — |
| 4.8.0 | active | — | — |
| 4.9.0 | active | — | — |

## 解决方案

1. ```
   pts = np.array([[x1, y1], [x2, y2]], dtype=np.float32)
undistorted = cv2.fisheye.undistortPoints(pts, K, D)
   ```
2. ```
   pts = np.array([[[x1, y1]], [[x2, y2]]], dtype=np.float64)
undistorted = cv2.fisheye.undistortPoints(pts, K, D, P=K)
   ```

## 无效尝试

- **** — Single-channel float (CV_32F) is not a 2-channel array; the function expects interleaved x,y coordinates. (60% 失败率)
- **** — Python list of tuples is not a numpy array with correct dtype; OpenCV expects np.ndarray with shape (N,1,2) or (N,2). (70% 失败率)
- **** — OpenCV does not support float16 for this function; only float32 or float64. (80% 失败率)
