我也希望在EmguCV 3.1.0.2504中绘制一个轮廓,但是我得到错误:“OpenCV:i< 0。无法评估.Children。”
IInputArrayOfArrays biggestCnt = GetBiggestCountour(BinaryImage);
Image<Gray, byte> justCountor = new Image<Gray, byte>(384, 284, new Gray(255));
CvInvoke.DrawContours(justCountor, biggestCnt, -1, new MCvScalar(255, 0, 0));
答案 0 :(得分:1)
我更改了一行:
CvInvoke.DrawContours(justCountor, biggestCnt, -1, new MCvScalar(255, 0, 0));
到
justCountor.Draw(biggestCnt.ToArray(), new Gray(0), 1);
问题解决了。