public void MatchTest()
{
int windowSize = 3;
#pragma warning disable 0618
CorrelationMatching target = new CorrelationMatching(windowSize);
#pragma warning restore 0618
Bitmap image1 = Accord.Imaging.Image.Clone(Properties.Resources.image1);
Bitmap image2 = Accord.Imaging.Image.Clone(Properties.Resources.image1);
IntPoint[] points1 =
{
new IntPoint( 3, 3),
new IntPoint(14, 3),
new IntPoint( 3, 14),
new IntPoint(14, 14),
};
IntPoint[] points2 =
{
new IntPoint( 3, 3),
new IntPoint(14, 3),
new IntPoint( 3, 14),
new IntPoint(14, 14),
};
IntPoint[][] expected =
{
new IntPoint[]
{
new IntPoint( 3, 3),
new IntPoint(14, 3),
new IntPoint( 3, 14),
new IntPoint(14, 14)
},
new IntPoint[]
{
new IntPoint( 3, 3),
new IntPoint(14, 3),
new IntPoint( 3, 14),
new IntPoint(14, 14)
},
};
#pragma warning disable 0618
IntPoint[][] actual = target.Match(image1, image2, points1, points2);
#pragma warning restore 0618
Assert.IsTrue(actual.IsEqual(expected));
}