A Rust executable to perform content-aware image resizing using seam carving.
The executable can be installed using Cargo as follows:
git clone https://github.com/scortino/rust-seam-carving.git
cd rust-seam-carving
cargo install --path .
The executable can be used from the command line as follows:
rsc /path/to/image new_width new_height
Unit tests and integration tests can be run from the project directory as follows:
cargo test --release
Longer integration tests generating examples of carved images starting from the ones initially present in the img/
directory can be run as follows:
cargo test --release -- --ignored
This project was proposed by Professors C. Feinauer and F. Pittorino as part of their course 20602 - Algorithms.
The implementation closely follows the original algorithm presented by S. Avidan and A. Shamir in their paper Seam carving for content-aware image resizing (2007).
Some of the unit tests used in the project are inspired by this Princeton University's assignment.