Skip to content

Commit 5fdb42a

Browse files
committed
Added fallback to generic linear resize in case bit-exact resize of provided matrix isn't supported
1 parent 1bc1f3d commit 5fdb42a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/imgproc/src/resize.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4153,6 +4153,9 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
41534153
inv_scale_y = (double)dsize.height/ssize.height;
41544154
}
41554155

4156+
if (interpolation == INTER_LINEAR_EXACT && (_src.depth() == CV_32F || _src.depth() == CV_64F))
4157+
interpolation = INTER_LINEAR; // If depth isn't supported fallback to generic resize
4158+
41564159
CV_OCL_RUN(_src.dims() <= 2 && _dst.isUMat() && _src.cols() > 10 && _src.rows() > 10,
41574160
ocl_resize(_src, _dst, dsize, inv_scale_x, inv_scale_y, interpolation))
41584161

0 commit comments

Comments
 (0)