Implemented the Content aware resizing paper.
A seam is a connected path of low energy pixels in an image. This is an image with one horizontal and one vertical seam.
The energy function used in this example is shown (the magnitude of the gradient), along with the vertical and horizontal path maps used to calculate the seams. By automatically carving out seams to reduce image size, and inserting seams to extend it, I achieve content-aware resizing.
The following are the results of the images after resizng vertically(Reduce Height) and horizontally(Reduce width).