在opencv中用“查找”查找对象;System.AccessViolationException“;
我正在尝试将Opencv2.4.4中的FindOntours函数与VS2010express(C++)一起使用。代码如下。 Mat-canny_输出; std::vector>等高线在opencv中用“查找”查找对象;System.AccessViolationException“;,opencv,image-processing,visual-studio-2010,Opencv,Image Processing,Visual Studio 2010,我正在尝试将Opencv2.4.4中的FindOntours函数与VS2010express(C++)一起使用。代码如下。 Mat-canny_输出; std::vector>等高线 /// Detect edges using canny Canny( src_gray, canny_output, 100, 200, 3 ); /// Find contours threshold(canny_output,canny_output,0,255,THRESH_BINARY); findCo
/// Detect edges using canny
Canny( src_gray, canny_output, 100, 200, 3 );
/// Find contours
threshold(canny_output,canny_output,0,255,THRESH_BINARY);
findContours( canny_output, contours, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE );
但程序总是在最后一行触发断点,并显示系统错误system.AccessViolationException
有人知道吗?建议:
等高线
为向量
cannny\u输出也为灰色图像
findContours(canny\u输出、等高线、CV\u RETR\u外部、CV\u CHAIN\u近似无、Point())
我已经将等高线定义为vector