Browse Source

Add test for contour

git-svn-id: https://emgucv.svn.sourceforge.net/svnroot/emgucv/trunk@343 d7f09016-e345-0410-b530-edf29a71df78
UWP10
canming 17 years ago
parent
commit
3bd73ba8e5
  1. 22
      Emgu.CV.Test/AutoTestVarious.cs

22
Emgu.CV.Test/AutoTestVarious.cs

@ -729,6 +729,28 @@ namespace Emgu.CV.Test
out extrinsicParameters);
}
[Test]
public void TestContourCreate()
{
using (MemStorage stor = new MemStorage())
{
Contour<System.Drawing.Point> contour = new Contour<Point>(stor);
contour.Push(new System.Drawing.Point(0, 0));
contour.Push(new System.Drawing.Point(0, 1));
contour.Push(new System.Drawing.Point(1, 1));
contour.Push(new System.Drawing.Point(1, 0));
Assert.AreEqual(contour.Convex, true);
Assert.AreEqual(contour.Area, 1.0);
Seq<System.Drawing.Point> seq = new Seq<Point>(CvInvoke.CV_MAKETYPE(4, 2), stor);
seq.Push(new System.Drawing.Point(0, 0));
seq.Push(new System.Drawing.Point(0, 1));
seq.Push(new System.Drawing.Point(1, 1));
seq.Push(new System.Drawing.Point(1, 0));
}
}
[Test]
public void TestConvexHull()
{

Loading…
Cancel
Save