opencv,c++,绘制点或矩形框到图像上
1、
bool draw_rect = false; MRECT* rect = &face->rcFace[s]; if (draw_rect) { cv::rectangle(im_src, cv::Point(rect->left, rect->top), cv::Point(rect->right, rect->bottom), CV_RGB(0, 255, 0)); for (int t = 0; t < FACIAL_POINTS_NUM_FLT_122; t++) { cv::Point p; p.x = face.x; p.y = face.y; cv::circle(im_src, p, 3, Scalar(255, 0, 0), -1); } }