Seam-Carving

Content aware image resizing

View the Project on GitHub Utkarsh-Deshmukh/Seam-Carving

Seam-Carving

Content aware image resizing

Abstract

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].

Results

animation2

Energy function:

The energy function used is the magnitude of simple first order partial derivatives in x and y axis. first equation

Overall algorithm

temp

Dependencies

opencv

How to run the file?

run the main.py file

Notes:

Presently the code only carves out columns in the image (Vertical seams). I will push the code to carve horizontal seams soon.

Refrences

[1] S. Avidan and A. Shamir. Seam carving for content-aware image resizing. ACM Trans. on Graphics, 26(3), 2007

Acknowledgements

I would like to thank Swanand Pathak for his help and guidance