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);
}
}

 

posted @ 2020-10-15 10:53  皮卡皮卡妞  阅读(1429)  评论(0编辑  收藏  举报