使用Image<TColor,TDepth>类的FindContours方法。我先将彩色图像转换成灰度图像,然后再将灰度图像转换成二值图像Image<Gray, Byte> imageThreshold ,接下来Contour<Point> contour=imageThreshold.FindContours();时,只找到了右下角的一个目标的轮廓,而我想要所有目标的轮廓,是哪部分出问题了?望高手指点。
还有如果使用CvInvoke.cvFindContours(IntPtr image, IntPtr storage, ref IntPtr firstContour, int headerSize, RETR_TYPE mode, CHAIN_APPROX_METHOD method, Point offset);函数,headerSize部分带入sizeof(CvContour)总是出错。
还有如果使用CvInvoke.cvFindContours(IntPtr image, IntPtr storage, ref IntPtr firstContour, int headerSize, RETR_TYPE mode, CHAIN_APPROX_METHOD method, Point offset);函数,headerSize部分带入sizeof(CvContour)总是出错。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货