Caire
Content aware image resize library
... for each seam a custom value, the least important pixels having the lowest energy cost and the most important ones having the highest cost. We traverse the image from the second row to the last row and compute the cumulative minimum energy for all possible connected seams for each entry. The minimum energy level is calculated by summing up the current pixel value with the lowest value of the neighboring pixels obtained from the previous row.