OpenCV3之输出

#include <iostream>
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;

int main()
{
     system("chcp 65001");  //控制台中文支持
     Point2f p(6, 2);
     cout << "[二维点] p = " << p << ";\n" << endl;  //[6, 2]

     Point3f p3f(6, 2, 0);
     cout << "[三维点] p3f = " << p3f << ";\n" << endl;

     vector<float>v{3, 5, 7};
     cout << "[给予Mat的vector] shortv = " << Mat(v) << ";\n" << endl;

//     vector<Point2f>points(20);   //failing
//     for(size_t i = 0; i < points.size(); ++i)
//         points[i] = Point2f((float)(i*5), (float)(i % 7));
//     cout << "二维点向量: points = " <<points[0] << ";";
    return 0;
}

相关文章
相关标签/搜索