15-463 Project 2

Extreme Seam Carving

Eric Trottier

2010-09-30

For this algorithm I computed the energy function via a few different methods. One was a simple [1 -1] convolution and the others were MATLAB's stdfilt and rangefilt. The stdfilt and rangefilt worked better for objects that had a lot of vertical energy as well as horizontal, because a simple dx derivative doesn't include that information. I think a heuristic that could be used to decide which to use would be to compare dx vs dy. If they're very different then it'd probably be a good idea to use one of the filters. I didn't actually implement this though; I enjoyed picking the algorithm by hand.

As far as the actual computation goes, I ran into an issue during implementation. When trying to precompute the values for the dynamic programming table, removing seams changes the table. To get around this I set values for seams in the table to infinity. The only problem with this is eventually you run out of seams because these seams may cut off future seams. For a solution, I recomputed the table once there were no more valid seams to cut. The only problem with this is that the last few seams cut before the table is recalculated can be some ridiculous diagonals that cause artifacts. It's not that big of an issue, but I think it would be better to find a way to recalculate the table after removing seams or program a way to skip any infinities. I wanted to do this but then I realized how much I hate MATLAB (implementation of algorithms is usually really slow, bulky, and annoying). I think the results were still pretty good.

Success-ish
I may have destroyed the bottom floor of this house
Pushing the limits:
Some artifacts in the top right (from not recalculating the seams)
Using stdfilt instead of a simple dx gives more artifacts on this image.
Failure Most of these images don't have enough scattered content to be viable for seam carving. They usually just look like someone subsampled the image.
DX Filter
rangefilt
stdfilt
Full list of images

These are just images there were generated at some point, named according to what was done to them. Most of them are already shown above.
art.jpg
art_dxdy_75_v_dxdy_200_h.jpg
art_dxdy_75_v.jpg
art_stdfilt_75_v.jpg
art_stdfilt_75_v_stdfilt_100_h.jpg
art_stdfilt_75_v_stdfilt_200_h.jpg
balloons.jpg
balloons_dx_200_h_dx_100_v.jpg
balloons_dx_200_h_dx_200_v.jpg
balloons_dx_200_h.jpg
bike.jpg
bike_dx_200_v.jpg
bike_dxdy_200_v.jpg
bike_rangefilt_200_v.jpg
bike_stdfilt_200_v.jpg
cow.jpg
cow_dx_100_v.jpg
cow_dx_200_h.jpg
cow_rangefilt_100_v.jpg
dancing.jpg
dancing_dxdy_200_h.jpg
dancing_rangefilt_100_h.jpg
dancing_rangefilt_200_h.jpg
dogs.jpg
dogs_dx_200_h.jpg
dolphin.jpg
dolphin_rangefilt_300_h_dx_100_v.jpg
dolphin_rangefilt_300_h.jpg
dolphin_rangefilt_300_h_rangefilt_100_v.jpg
face.jpg
face_rangefilt_200_v.jpg
face_rangefilt_200_v_rangefilt_200_h.jpg
fish.jpg
fish_dxdy_200_h.jpg
house2.jpg
house2_dx_200_h.jpg
house.jpg
house_dx_100_h_dx_100_v.jpg
house_dx_100_h.jpg
house_dx_100_v.jpg
kid.jpg
kid_dx_200_h.jpg
kid_dxdy_200_h.jpg
kid_stdfilt_200_h.jpg
people.jpg
people_rangefilt_200_h_dxdy_100_v.jpg
people_rangefilt_200_h_dxdy_200_v.jpg
people_rangefilt_200_h.jpg
people_rangefilt_200_h_rangefilt_200_v.jpg
southport.jpg
southport_dx_200_h_dx_100_v.jpg
southport_dx_200_h_dx_200_v.jpg
southport_dx_200_h_dxdy_100_v.jpg
southport_dx_200_h.jpg
southport_dx_200_h_rangefilt_100_v.jpg
southport_dx_200_h_stdfilt_100_v.jpg
southport_dxdy_200_h.jpg
southport_stdfilt_200_h.jpg
sun.jpg
sun_dx_200_h.jpg
sun_dxdy_200_h.jpg
sun_entropyfilt_200_h.jpg
sun_rangefilt_200_h.jpg
sun_stdfilt_200_h.jpg
water.jpg
water_dx_200_h_dx_200_v.jpg
water_dx_200_h.jpg
water_stdfilt_200_h.jpg