2
我刚刚开始使用opencv,我正在试图制作一个程序,在一些沙子上放置一些岩石图片。功能here的文档包含如何使用它的示例。如何在轮廓周围绘制矩形?
findContours(src, contours, hierarchy,
CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
findContours的原型是
void findContours(InputOutputArray image, OutputArrayOfArrays contours, OutputArray hierarchy, int mode, int method, Point offset=Point()) ;
我有两个问题。
1.示例hierarchy
中的第三个参数是vector<Vec4i>
与findContours期望的类型不匹配。这是为什么?
2.如何使用contours
中存储的数据查找轮廓在哪里创建边界框?
“findContours的原型是” 然后:void drawContours(..)你的意思是说?粘贴错误的签名? – berak 2013-03-23 19:36:03
你是对的,我一直在看错误的签名,这使得更多的意义! – joshualan 2013-03-23 23:50:53