问题描述
我在 c# 中使用 emgu.cv,我想获取 MSER 中检测到的每个区域的周长折线。问题是点的顺序显然是随机的。
这是我的代码:
var img = imgList["Input"].Clone();
VectorOfVectorOfPoint contours = new VectorOfVectorOfPoint();
VectorOfRect bBoxes = new VectorOfRect();
MSERDetector detector = new MSERDetector(delta,minArea,maxArea,maxVariation,mindiversity,maxEvolution,areaThreshold,minMargin,edgeBlurSize);
Random randomColor = new Random();
detector.DetectRegions(img,contours,bBoxes);
for (int i = 0; i < contours.Size; i++)
{
CvInvoke.DrawContours(img,i,new MCvScalar(randomColor.Next(255),randomColor.Next(255),randomColor.Next(255)));
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)