Seam Carving in Java

This project implements a dynamic programming solution for the Seam Carving algorithm, as part of an assignment for the Algorithms and Data Structures II course by Princeton University. Dynamic programming is employed to efficiently compute the optimal seams to remove from the image. The algorithm identifies and removes the seams of least importance iteratively, ensuring that the resized image maintains the most relevant content.

wakatime

Usage

To use this implementation, follow these steps:

Clone the repository to your local machine:

git clone[ https://github.com/your-username/seam-carving-java.git](https://github.com/ahmedSherif-eng/SeamCarver.git)

Compile the Java files:

javac ResizeDemo.java example.png  50 100 (example)
Copy code
java SeamCarving input.jpg 400 300

This will resize the input image input.jpg to have a width of 400 pixels and a height of 300 pixels. Run the program with the input image file path and desired number of Vertical and Horizontal number of eliminated Seams:

Alternatively

you can give the image name in class ResizeDemo.java, number of columns and number of rows
image

Showcase

Input Image

Output Image

References

Algorithms and data structure course provided by Princeton University on Coursera platform.

This project is licensed under the MIT License - see the LICENSE file for details.