I want too draw a contour in EmguCV 3.1.0.2504 but I get error: "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));
1 Answers
Answers 1
I change the line :
CvInvoke.DrawContours(justCountor, biggestCnt, -1, new MCvScalar(255, 0, 0));
to
justCountor.Draw(biggestCnt.ToArray(), new Gray(0), 1);
and problem solved.
0 comments:
Post a Comment