Homework 3
So Homework 3 is what is called Seam Carving
It uses getRGB to judge pixel values and find seams that cumulatively have the lowest values. It then removes those seams in order to resize the image.
This is used both for vertical and horizontal seams, and uses Dynamic Programming algorithms to solve the problem.
I have five examples that will be posted in the second part.
The class will take four things from the user: What file to resize, the name of the file to create the resized result, the desired width, and the desired height.
The results vary from very practical to odd, obscure, or useless. I find that the best results come from smaller images with too much empty space. On larger images, the running time becomes very impractical because I implemented a compensation for images that were being cropped odd when they are very complicated. That algorithm simply recalculates the weight of the seams between every seam removal. Without this, it runs much more quickly but hacks things out very less intelligently.