Skip to content

benjaminleezhiyuan/SeamCarving

Repository files navigation

Seam Carving Application

Using Greedy Algorithm and Dynamic Programming

Seam carving is an advanced image resizing technique that removes low-energy seams from an image to reduce its size while preserving important content.

How It Works

  • Uses pixel energy mapping to identify the least important seams.
  • Removes seams iteratively to achieve the target size.
  • Implements two approaches:
    • Greedy Algorithm: Removes seams based on a local energy minimum.
    • Dynamic Programming: Finds globally optimal seams for better results.

Example

Original Image (1428 x 968)

Original Castle

Resized Image (400 x 400)

Greedy Algorithm Dynamic Programming
Greedy Output Dynamic Output

The Greedy method may distort important details, while Dynamic Programming retains the structure of the castle more effectively.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published