Content aware image resizing
Content aware image resizing
The usual image resizing operation does not take into account the image content. In this project, we can reduce the size of the image using an approach called seam carving (also known as content aware image resizing). A seam is an optimal 8-connected path of pixels on a single image from top to bottom, or left to right, where optimality is defined by an image energy function [1].
The energy function used is the magnitude of simple first order partial derivatives in x and y axis.
opencv
run the main.py file
Presently the code only carves out columns in the image (Vertical seams). I will push the code to carve horizontal seams soon.
[1] S. Avidan and A. Shamir. Seam carving for content-aware image resizing. ACM Trans. on Graphics, 26(3), 2007
I would like to thank Swanand Pathak for his help and guidance