Dear pros, i'm the beginner in studying OPENCV. I got stuck in this beginning program, it could not debugged by OPENCV2.4.5.
Pls help me to figure it out. Many thanks.
#include <highgui.h>
#include <stdio.h>
#include <cv.h>
#include <assert.h>
IplImage* doPyrDown(
IplImage* in,
int filter
)
{
assert(in->width%2 == 0 && in->height%2 == 0);
IplImage * out = cvCreateImage(
cvGetSize(in),
IPL_DEPTH_8U,
3
);
cvPyrDown( in, out);
return(out);
}
void main() {
int filter = IPL_GAUSSIAN_5x5;
IplImage* in = cvLoadImage("F:\\chandung.png");
cvNamedWindow( "Example-in");
cvNamedWindow( "Example-out");
IplImage* out = doPyrDown(in, filter);
cvShowImage( "Example-in", in);
cvShowImage( "Example-out", out);
cvReleaseImage( &out);
cvWaitKey( 0);
cvDestroyWindow( "Example-in");
cvDestroyWindow( "Example-out");
}
When i run it, this error exists: