About the Project

Using an algorithm discovered in 2007, I implemented an image resizing program that is content aware. That means that it intelligently identifies what parts of the image are important to its overall structure. It is a core feature in many enterprise level image editors.

Creating the Energy Graph

Using a dual-gradient energy function, I first calculated the energy of each pixel. The energy is essentially the quantitative difference of that pixel from its neighbors. From this energy calculation I made a graph where the vertices are the pixels and the edges is the energy required to go to the pixel.

Finding the Least Significant Seam

Then, using an A-Star path finding program I made, I find the seam which takes the least amount of energy to go from top to bottom. This is the seam that should be the least noticeable if removed.

Putting it all Together

After removing the seam and updating the graph, we can repeat the process. This image shows the seams removed in red.

More Information

This project was done with code provided from CSE332 under Kevin Lin. If you are interested in seeing the full project it is available on a private Gitlab to prevent plagiarism. Feel free to email me if you want to see it.