【opencv入门教程】2. Point()类用法
文章选自:
void Samples::PointFunc()
{//输入二维点Point2f point2f(6, 2);cout << "【2维点】p = " << point2f << ";\n" << endl;// 输入三维点Point3f point3f(8, 2, 0);cout << "【3维点】p3f = " << point3f << ";\n" << endl;vector<float> v;v.push_back(3);v.push_back(5);v.push_back(7);vector<Point2f> points(20);for (size_t i = 0; i < points.size(); ++i)points[i] = Point2f((float)(i * 5), (float)(i % 7));cout << "【二维点向量】points = " << points << ";";
}
输出结果: