Files
opencv-MIRROR/modules/imgproc
Shiven Solanki 5bb1be7693 imgproc: support 5.x depths in remap/warp with INTER_NEAREST (#30595)
* imgproc: support 5.x depths in remap/warp with INTER_NEAREST

nn_tab in cv::remap only had entries for CV_8U..CV_64F, so remap,
warpAffine and warpPerspective with INTER_NEAREST failed with
"nnfunc != 0" for CV_16F, CV_16BF, CV_Bool, CV_64U, CV_64S, CV_32U and
both fp8 depths. Nearest neighbor only copies pixels, so add the
remapNearest instances for these types, in both the absolute and the
WARP_RELATIVE_MAP rows. Using the real element types keeps the border
value conversion right (e.g. CV_Bool border 2 becomes 1).

Add an Imgproc_Warp_NearestNewDepths test.

* imgproc: use MatDepth in Imgproc_Warp_NearestNewDepths

A plain int parameter prints a failing case as GetParam() = 13. MatDepth prints the depth name instead.

* imgproc: convert remap nearest border once, dispatch copy by element size
2026-11-22 19:28:31 +05:30
..
2024-10-13 03:25:24 +03:00