diff --git a/modules/imgproc/src/hal_replacement.hpp b/modules/imgproc/src/hal_replacement.hpp index 5c6497bd80..ca29eca6b6 100644 --- a/modules/imgproc/src/hal_replacement.hpp +++ b/modules/imgproc/src/hal_replacement.hpp @@ -298,6 +298,36 @@ inline int hal_ni_warpPerspective(int src_type, const uchar *src_data, size_t sr #define cv_hal_warpPerspective hal_ni_warpPerspective //! @endcond +/** + @brief hal_remap with floating point maps + @param src_type source and destination image type + @param src_data source image data + @param src_step source image step + @param src_width source image width + @param src_height source image height + @param dst_data destination image data + @param dst_step destination image step + @param dst_width destination image width + @param dst_height destination image height + @param mapx map for x values + @param mapx_step mapx matrix step + @param mapy map for y values + @param mapy_step mapy matrix step + @param interpolation interpolation mode (CV_HAL_INTER_NEAREST, ...) + @param border_type border processing mode (CV_HAL_BORDER_REFLECT, ...) + @param border_value values to use for CV_HAL_BORDER_CONSTANT mode + @sa cv::remap + */ +inline int hal_ni_remap32f(int src_type, const uchar *src_data, size_t src_step, int src_width, int src_height, + uchar *dst_data, size_t dst_step, int dst_width, int dst_height, + float* mapx, size_t mapx_step, float* mapy, size_t mapy_step, + int interpolation, int border_type, const double border_value[4]) +{ return CV_HAL_ERROR_NOT_IMPLEMENTED; } + +//! @cond IGNORED +#define cv_hal_remap32f hal_ni_remap32f +//! @endcond + /** @brief hal_cvtBGRtoBGR @param src_data source image data diff --git a/modules/imgproc/src/imgwarp.cpp b/modules/imgproc/src/imgwarp.cpp index 7c4567218b..d7c9c64c3c 100644 --- a/modules/imgproc/src/imgwarp.cpp +++ b/modules/imgproc/src/imgwarp.cpp @@ -1799,7 +1799,6 @@ void cv::remap( InputArray _src, OutputArray _dst, _dst.create( map1.size(), src.type() ); Mat dst = _dst.getMat(); - CV_OVX_RUN( src.type() == CV_8UC1 && dst.type() == CV_8UC1 && !ovx::skipSmallImages(src.cols, src.rows) && @@ -1816,6 +1815,12 @@ void cv::remap( InputArray _src, OutputArray _dst, if( dst.data == src.data ) src = src.clone(); + if ((map1.type() == CV_32FC1) && (map2.type() == CV_32FC1)) + { + CALL_HAL(remap32f, cv_hal_remap32f, src.type(), src.data, src.step, src.cols, src.rows, dst.data, dst.step, dst.cols, dst.rows, + map1.ptr(), map1.step, map2.ptr(), map2.step, interpolation, borderType, borderValue.val); + } + interpolation &= ~WARP_RELATIVE_MAP; if( interpolation == INTER_AREA ) interpolation = INTER_LINEAR;