From 922fc5820170baec0f8dba4dce93c04ed70c413a Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Fri, 3 Jun 2011 17:06:08 +0000 Subject: [PATCH] added CV_64F support to cv::remap (ticket #650) --- modules/imgproc/src/imgwarp.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/imgproc/src/imgwarp.cpp b/modules/imgproc/src/imgwarp.cpp index f372cd858..3c5e09bd3 100644 --- a/modules/imgproc/src/imgwarp.cpp +++ b/modules/imgproc/src/imgwarp.cpp @@ -2416,7 +2416,8 @@ void cv::remap( const InputArray& _src, OutputArray _dst, remapBilinear, RemapVec_8u, short>, 0, remapBilinear, RemapNoVec, float>, remapBilinear, RemapNoVec, float>, 0, - remapBilinear, RemapNoVec, float>, 0, 0 + remapBilinear, RemapNoVec, float>, + remapBilinear, RemapNoVec, float>, 0 }; static RemapFunc cubic_tab[] = @@ -2424,7 +2425,8 @@ void cv::remap( const InputArray& _src, OutputArray _dst, remapBicubic, short, INTER_REMAP_COEF_SCALE>, 0, remapBicubic, float, 1>, remapBicubic, float, 1>, 0, - remapBicubic, float, 1>, 0, 0 + remapBicubic, float, 1>, + remapBicubic, float, 1>, 0 }; static RemapFunc lanczos4_tab[] = @@ -2432,7 +2434,8 @@ void cv::remap( const InputArray& _src, OutputArray _dst, remapLanczos4, short, INTER_REMAP_COEF_SCALE>, 0, remapLanczos4, float, 1>, remapLanczos4, float, 1>, 0, - remapLanczos4, float, 1>, 0, 0 + remapLanczos4, float, 1>, + remapLanczos4, float, 1>, 0 }; Mat src = _src.getMat(), map1 = _map1.getMat(), map2 = _map2.getMat(); @@ -2808,7 +2811,7 @@ void cv::warpAffine( const InputArray& _src, OutputArray _dst, int flags, int borderType, const Scalar& borderValue ) { Mat src = _src.getMat(), M0 = _M0.getMat(); - _dst.create( dsize, src.type() ); + _dst.create( dsize.area() == 0 ? src.size() : dsize, src.type() ); Mat dst = _dst.getMat(); CV_Assert( dst.data != src.data && src.cols > 0 && src.rows > 0 ); @@ -2945,7 +2948,7 @@ void cv::warpPerspective( const InputArray& _src, OutputArray _dst, const InputA Size dsize, int flags, int borderType, const Scalar& borderValue ) { Mat src = _src.getMat(), M0 = _M0.getMat(); - _dst.create( dsize, src.type() ); + _dst.create( dsize.area() == 0 ? src.size() : dsize, src.type() ); Mat dst = _dst.getMat(); CV_Assert( dst.data != src.data && src.cols > 0 && src.rows > 0 );