OpenCV画矩形框

//g++ rect.cpp `pkg-config opencv --cflags --libs` -o run
#include 
#include
using namespace std;
using namespace cv;
int main()
 {
   cv::Mat img = cv::imread("1.jpg", 1);

    cv::rectangle(img, cv::Point(400, 400), cv::Point(400, 400), cv::Scalar(255, 250, 0, 0), 3);
    imshow("img",img);
    waitKey(0);
    // cout << img<
    // cout << "step:" << img.step << endl;
    // cout << "step[0]:" << img.step[0] << endl;
    // cout << "step[1]:" << img.step[1] << endl;
    // cout << "step1(2):" << img.step1(2) << endl;
    // cout << "step1(3):" << img.step1(3) << endl;

    }

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