Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Resizing an image

Hi there, sorry for cross posting this question from stackoverflow. But could someone tell me what wrong with the following code?

Mat src = imread( "image.tif" );
Mat dst;
Size s( src.size().width / 10, src.size().height / 10 );
resize( src, dst, s, 0, 0, CV_INTER_AREA );

imwrite("test.tif", dst );

This will give me an assertion:

OpenCV Error: Assertion failed (ssize.area() > 0) in unknown function, file C:\slave\WinInstallerMegaPack\src\opencv\modules\imgproc\src\imgwarp.cpp, line 1432

I'm using OpenCV 2.4 on a Windows 7 machine.

Thanks, Christian