//1、2D Point
Point2f P2f(5,1);
cout<<"Point (2D) = "<<P2f<<endl<<endl;
//2、3D Point
Point3f P3f(2,6,7);
cout<<"Point (3D) = "<<P3f<<endl<<endl;
//3、通过Mat输出std::vector
vector<float> v;
v.push_back((float)CV_PI);
v.push_back(2);
v.push_back(3.01f);
cout<<"Vector of float via Mat = "<<endl<<Mat(v)<<endl<<endl;
//4、点的向量 Point的vector
vector<Point2f> vPoints(20);
for(size_t i = 0; i<vPoints.size(); ++i)
vPoints[i] = Point2f((float)(i*2), (float)(i % 8));
cout<<"2D点的向量 = "<<endl<<vPoints<<endl<<endl;
【opencv练习04-常用项の输出】
最新推荐文章于 2023-12-08 10:07:16 发布