# cv::error: (-215:Assertion failed) (map1.type() == CV_32FC2 || map1.type() == CV_16SC2) in function 'remap'

- **ID:** `opencv/remap-invalid-map-type`
- **Domain:** opencv
- **Category:** type_error
- **Error Code:** `-215`
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

The map array passed to cv::remap has an unsupported data type; only CV_32FC2 or CV_16SC2 are accepted for the first map.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 4.5.0 | active | — | — |
| 4.8.1 | active | — | — |
| 4.10.0 | active | — | — |

## Workarounds

1. **Ensure map1 is created with CV_32FC2 type: cv::Mat map1(rows, cols, CV_32FC2); then fill with floating-point coordinates.** (95% success)
   ```
   Ensure map1 is created with CV_32FC2 type: cv::Mat map1(rows, cols, CV_32FC2); then fill with floating-point coordinates.
   ```
2. **If using initUndistortRectifyMap, verify the output map type is CV_32FC2 or CV_16SC2 by checking the m1type parameter passed to the function.** (85% success)
   ```
   If using initUndistortRectifyMap, verify the output map type is CV_32FC2 or CV_16SC2 by checking the m1type parameter passed to the function.
   ```

## Dead Ends

- **** — remap requires exactly CV_32FC2 (two-channel float) or CV_16SC2 (two-channel signed short) for the first map; other types cause assertion failure regardless of conversion. (75% fail)
- **** — The function expects map1 to contain (x,y) coordinates; swapping reverses the mapping logic and may produce distorted output or a different assertion error. (90% fail)
