Example #1
0
        public void CalculatingSums()
        {
            var img  = new Image <Gray, byte>(Properties.Resources.ColumnRowSums);
            var sums = ImageTools.CalculateSums(img);

            int[] expectedColumns = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
            int[] expectedRows    = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
            CollectionAssert.AreEqual(expectedColumns, sums.Key);
            CollectionAssert.AreEqual(expectedRows, sums.Value);
        }