Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork56.4k
Closed
Description
System Information
Latest Debian, OpenCV 5.x at2ed6d0f (nov 19th)
Detailed description
It seems the step is not properly computed for a matrix built using anstd::vector
Steps to reproduce
TEST(Imgproc_Resize, vec){ std::vector<float>vec(4); MatA(vec), B; std::cout<<A.size()<<std::endl;resize(A,B,Size(2,2),0,0,INTER_LINEAR);}
triggers:
[ RUN ] Imgproc_Resize.vec[4 x 1]unknown file: FailureC++ exception with description "OpenCV(5.0.0-pre) /usr/local/google/home/vrabaud/opencv5/src/opencv/modules/core/src/matrix.cpp:904: error: (-2:Unspecified error) in function 'cv::Mat::Mat(Size, int, void *, size_t)'> (expected: '_step >= minstep'), where> '_step' is 4> must be greater than or equal to> 'minstep' is 16" thrown in the test body.[ FAILED ] Imgproc_Resize.vec (0 ms)Whensrc.step is cast to asize_t at
opencv/modules/imgproc/src/resize.cpp
Line 4244 ind0820da
| hal::resize(src.type(), src.data, src.step, src.cols, src.rows, dst.data, dst.step, dst.cols, dst.rows, inv_scale_x, inv_scale_y, interpolation); |
| step.p = &step.buf[1]; |
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)