Seam carving is a content-aware image resizing technique where the image is reduced in size by one pixel of height (or width) at a time. This implementation is based on the paper Seam Carving for Content-Aware Image Resizing by Shai Avidan and Ariel Shamir. Built with C++ and OpenCV.
Building the project
-
Make sure you have the following installed:
- OpenCV version 4.9.0
- CMake
- gcc/g++
-
Building the project:
cd build
make
- Running the project:
./SeamCarving <path_to_image> <iterations to reduce> <V | H> optional: <debug | demo>
Arguments | Description |
---|---|
path_to_image | Path to the image to resize. |
iterations | Number of pixels to reduce the image by. |
V / H | Vertical or Horizontal seams resizing. |
(optional) debug / demo | Debug mode or Demo mode. |
Features
- Horizontal and vertical Resizing
- Seam Carving with energy function
- Debug and Demo modes