7x3.png (7-by-3 image)

The energy[][] matrix gives the dual-gradient energy of each pixel.

The distTo[][] matrix gives the energy of the minimum energy path from
a pixel in the top-most row (or left-most column) to each pixel.

The asterisks denote the minimum energy vertical (or horizontal) seam.

-----------------------------------------------------

vertical seam: { 4, 4, 5 }

energy[][]:
 222.73   245.24   195.44   248.92   159.43*  238.59   215.45  
 385.96   237.12   268.77   218.95   265.27*  292.37   220.30  
 214.95   319.16   244.78   234.13   307.13   161.68*  301.30  

distTo[][]:
 222.73   245.24   195.44   248.92   159.43*  238.59   215.45  
 608.70   432.56   464.22   378.39   424.71*  451.80   435.75  
 647.51   751.71   623.17   612.52   685.51   586.39*  737.04  

total energy of vertical seam = 586.385509

-----------------------------------------------------

horizontal seam: { 2, 1, 0, 1, 0, 0, 0 }

energy[][]:
 222.73   245.24   195.44*  248.92   159.43*  238.59*  215.45* 
 385.96   237.12*  268.77   218.95*  265.27   292.37   220.30  
 214.95*  319.16   244.78   234.13   307.13   161.68   301.30  

distTo[][]:
 222.73   467.98   647.51*  896.43  1025.90* 1264.49* 1479.94* 
 385.96   452.07*  720.84   866.46* 1131.74  1318.27  1484.79  
 214.95*  534.11   696.85   930.99  1173.59  1293.42  1594.71  

total energy of horizontal seam = 1479.942484

-----------------------------------------------------
