problem with facedetection

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

problem with facedetection

Alex Topirceanu
why can`t i transform the IplImage* img given as a parameter in the
detect_and_draw function of facedetect.c into anything using either
the cvCvtColor function or the cvCopy function?

the error i keep getting is this "Size of input arguments do not
match() in function cvCopy (or cvCvtColor), .\cxcopy.cpp(418)"

this is the code for the cvCopy:

IplImage *img1 = cvCloneImage(img);
IplImage* grayImage = cvCreateImage(cvSize(img1->width,img1->height),
                        IPL_DEPTH_8U, 1);
if(im->nChannels == 1)cvCopy(img1,grayImage,0);
else cvCvtColor(img1, grayImage, CV_RGB2GRAY);

why can`t i even copy it from one IplImage to another?????