カメラから部分画像を取得したい。私はこのコードを持っています。このコードは、カメラに四角形を与えています。長方形のインクルード画像を取得する必要があります。
for(int i=0;i<(detectRect_face ? detectRect_face->total:0); i++ )
{
CvRect* r = (CvRect*)cvGetSeqElem(detectRect_face, i);
CvPoint pt1 = { r->x+20, r->y+20 };
CvPoint pt2 = { r->x + r->width-20, r->y + r->height-10 };
cvRectangle(frame, pt1, pt2, CV_RGB(255,0,0), 1,8, 0);
//I need to write here a method to get this rectangle include image.
}