在mfc c++ 以及opencv 编写程序当中,很多常用的类型转换,现在总结一下。(注意加相应的头文件,这里不罗嗦) 提纲: 1. Mat ---> Iplimage 2. Iplimage ---> CvvImage 3. Mat ---> vector<Point2f> or vector<Point3f> 4. vector<Point2f> or vector<Point3f> ---> vector<vector<Point2f>> or vector<vector<Point3f>> 5. vector<vector<Point2f>> or vector<vector<Point3f>> ---> Mat 6. vector<Point2f> or vector<Point3f> ---> Mat
图像类 1. Mat ---> Iplimage :直接赋值
[cpp]
view plain
copy
2. Iplimage ---> CvvImage :用“Copyof ”
[cpp]
view plain
copy
3. Mat ---> vector<Point2f> or vector<Point3f> :用“Mat_<Point2f>“ ,“Mat_<Point3f>”
[cpp]
view plain
copy
[cpp]
view plain
copy
[cpp]
view plain
copy
[cpp]
view plain
copy
|
|