Opencv定义输出vector容器的point类型的点——一些理解

  1. #include<opencv2/opencv.hpp>  
  2. #include<iostream>  
  3. #include"stdio.h"  
  4.   
  5. using namespace std;  
  6. using namespace cv;  
  7.   
  8. int main()  
  9. {  
  10.     vector<Point2f> vp2f;  
  11.     vp2f.push_back(Point2f(2, 3));  
  12.     cout << "【二维点向量】" << endl << vp2f << endl;  
  13.   
  14.     vector<Point3f> vp3f(20);  
  15.     for (size_t i = 0; i < vp3f.size(); i++)  
  16.     {  
  17.         vp3f[i] = Point3f((float)(i + i), (float)(i * i), (float)(i + 1));  
  18.     }  
  19.     cout << "【三维点向量】" << endl << vp3f << endl;  
  20.   
  21.     system("pause");  
  22.     return 0;  

  1. }  


原文链接https://blog.csdn.net/qq_23880193/article/details/47903619

猜你喜欢

转载自blog.csdn.net/Jack_Sarah/article/details/79830933