#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; }