I have partially implemented the image resizing/carving method described in the paper by Dr. Ariel Shamir and Dr. Shai Avidan, which resizes images by cutting out or inserting horiztonal or vertical seams. At the moment, the code uses a very simple energy function, which takes the RGB difference of each pixel against 48 of its neighbours. There are two carving implementations:
A* pathfinding for cutting out seams: Quick image loading time, and doesn't need to swap between vertical and horizontal modes. However, it cannot add seams back to the image, and it is slow. This can be seen when carving the White House image in the demonstration, and can be found in Retarget.h/.cpp
Indexed seam removal: Long image loading time, and also a significant delay to switch between vertical and horizontal modes. Once loaded, it is very fast at both seam insertion and removal. This can be seen when carving all the other images, and can be found in IndexedRetarget.h/.cpp (Note: only vertical seams are coded at the moment).
Source Code
The code is written in C++ using the wxWidgets library for UI, licensed under the GPL v3. Visual Studio .NET 2003 project files are included. Download.