Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Resize matrix in Java

Hello,

I am trying to resize a matrix of CvType.CV_32S to a smaller matrix. Every time I use the Imgproc.resize() methode, I am getting the following exception:

OpenCV Error: Assertion failed (func != 0) in cv::resize, file ........\opencv\modules\imgproc\src\imgwarp.cpp, line 1970 CvException [org.opencv.core.CvException: cv::Exception: ........\opencv\modules\imgproc\src\imgwarp.cpp:1970: error: (-215) func != 0 in function cv::resize ]

My code looks linke this:

Imgproc.resize(img16u, liveMatHalfRawData, new Size(img16u.rows()/2,img16u.cols()/2), 0, 0,
                Imgproc.INTER_CUBIC);

Thanks for help,

reem

click to hide/show revision 2
retagged

updated 2014-04-09 11:34:47 -0600

berak gravatar image

Resize matrix in Java

Hello,

I am trying to resize a matrix of CvType.CV_32S to a smaller matrix. Every time I use the Imgproc.resize() methode, I am getting the following exception:

OpenCV Error: Assertion failed (func != 0) in cv::resize, file ........\opencv\modules\imgproc\src\imgwarp.cpp, line 1970 CvException [org.opencv.core.CvException: cv::Exception: ........\opencv\modules\imgproc\src\imgwarp.cpp:1970: error: (-215) func != 0 in function cv::resize ]

My code looks linke this:

Imgproc.resize(img16u, liveMatHalfRawData, new Size(img16u.rows()/2,img16u.cols()/2), 0, 0,
                Imgproc.INTER_CUBIC);

Thanks for help,

reem