尝试提取面部区域时出错
我编写了以下代码,以使用 OpenCV2.2 FaceDetect.c 代码提取检测为面部的区域的图像。
//Extracting the image of just the ROI
IplImage* rectImage;
rectImage->roi=NULL;
CvRect boundingBox={point1.x,point1.y,r->width,r->height};
cvSetImageROI(rectImage,boundingBox);
IplImage* originalBox=cvCreateImage(cvSize(r->width,r->height),IPL_DEPTH_8U,3);
IplImage* reSizedBox=cvCreateImage(cvSize(100,100),IPL_DEPTH_8U,3);
cvCopy(rectImage, originalBox, 0);
cvResize(originalBox,reSizedBox,CV_INTER_LINEAR);
cvSaveImage("MyFaceBox.jpg", reSizedBox);
问题:当我构建它时,出现以下错误: “错误:'cvResize'未在此范围内声明”
我正在使用 xcode 作为开发人员工具。我不明白是什么造成了问题。有人可以帮忙吗?
谢谢
I have written the following piece of code to extract the image of the region detected as face using the OpenCV2.2 facedetect.c code.
//Extracting the image of just the ROI
IplImage* rectImage;
rectImage->roi=NULL;
CvRect boundingBox={point1.x,point1.y,r->width,r->height};
cvSetImageROI(rectImage,boundingBox);
IplImage* originalBox=cvCreateImage(cvSize(r->width,r->height),IPL_DEPTH_8U,3);
IplImage* reSizedBox=cvCreateImage(cvSize(100,100),IPL_DEPTH_8U,3);
cvCopy(rectImage, originalBox, 0);
cvResize(originalBox,reSizedBox,CV_INTER_LINEAR);
cvSaveImage("MyFaceBox.jpg", reSizedBox);
Problem: When I build it, it gives the following error:
"error: ‘cvResize’ was not declared in this scope"
I am using xcode as a developer tool. I cannot understand what is creating the problem. Can someone please help?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否包含相关的头文件,例如
Did you include the relating header file, like