mirror of
https://github.com/opencv/opencv.git
synced 2026-12-02 13:16:32 -06:00
* 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