public void SumTest2()
{
Bitmap image = Accord.Imaging.Image.Clone(Resources.image2);
int expected = 0;
for (int i = 3; i < 9; i++)
{
for (int j = 2; j < 10; j++)
{
expected += image.GetPixel(i, j).R;
}
}
int actual = (int)Tools.Sum(image, new Rectangle(3, 2, 9 - 3, 10 - 2));
Assert.AreEqual(expected, actual);
}