opencv2在图像上画矩形框

Mat src = imread("bird.jpg");
    Rect rect(230, 5, 280, 290);//左上坐标(x,y)和矩形的长(x)宽(y)

   cv::rectangle(src, rect, Scalar(255, 0, 0),1, LINE_8,0);
    //cv::rectangle(src, Point(230, 5), Point(510, 295), Scalar(255, 0, 0), 1, LINE_8, 0);//左上角点的(x,y),右下角点的(x,y)

   // cv::rectangle(src, rect, Scalar(255, 0, 0),-1, LINE_8,0);//绘制填充矩形

你可能感兴趣的:(计算机视觉,opencv,tensorflow)