在 emgucv 3.1 中绘制轮廓

Draw a contour in emgucv 3.1

我也想在 EmguCV 3.1.0.2504 中绘制轮廓,但出现错误:"OpenCV: i<0 .Children could not be evaluated."

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));

我换行:

CvInvoke.DrawContours(justCountor, biggestCnt, -1, new MCvScalar(255, 0, 0));

 justCountor.Draw(biggestCnt.ToArray(), new Gray(0), 1);

问题解决了。