opencv里有个概念叫ROI,regionofinterest,比如你获得的人脸的矩形框如果是cvRectregion的话,源图像是img的话,下面的代码可以实现cvSetImageROI((IplImage*)img,region);//CopyregionofinterestintoanewiplImageandreturnit.size.width=region.width;size.height=region.height;m_FaceArea=cvCreateImage(size,IPL_DEPTH_8U,img->nChannels);cvCopy(img,m_FaceArea);//Copyjusttheregion.cvResetImageROI((IplImage*)img);m_FaceArea就是脸的图像了