Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

please try not to mix the old 1.0 (iPlImage/CvMat) and the newer 2.0 Api(cv::Mat).

in this case, call:

CvMat *dst = cvCreateMat(rows, cols, type);
cvResize( src, dst, CV_INTER_LINEAR );  // see, you had it in the wrong order, too!

(but hard for me to see, which is your input, and which is the output img in your code.)

please try not to mix the old 1.0 (iPlImage/CvMat) and the newer 2.0 Api(cv::Mat).

in this case, call:

CvMat *dst = cvCreateMat(rows, cols, type);
type); // you need to alloc space for the result
cvResize( src, dst, CV_INTER_LINEAR );  // see, you had it in the wrong order, too!

(but hard for me to see, which is your input, and which is the output img in your code.)