15-463 Project 2

Description of Algorithm

The algorithm first asks the user to generate a polygonal mask for the DOF. A binary image is then used to blur only the non-DOF region. The blurring is done using the same filter over several iteraitons, and each iteration the mask is dilated in order to blur the outer regions most. At the end, saturation is jacked up some percentage. The exact values for the blur filter and saturation and number of iterations varied by image.

Several steps had to be taken to overcome the limiations of roifilt2, including padding the image and mask to avoid edge bleeding during blurring and splitting the image into separate channels.

Results

Given Images

Here's all the images provided by the staff. The impact of using a region for the DOF instead of a line is pretty noticeable. The building on the right is completely in focus, which really adds to the realism.

It's not quite as noticeable in this picture, but again the region makes a big difference. Saturation also has a huge effect here.

The buildings were carved out pretty carefully, and I think it shows.

Internet Images

This one turned out pretty well, except for the kind of unnatural blue tint on the snow. The region effect is very noticeable here, too.

Source: http://www.mythicalireland.com/ancientsites/stonehenge/stonehenge-xmw-1152.jpg

Not quite as good. I used just a rectangular region here.

Source: http://www.visitingdc.com/images/charlotte-airport-address.jpg

My Images

These first 2 are shots I took at Yosemitie National Park in summer 2008. This one worked out pretty nicely; the region was used to keep the vertical cliff entirely in the DOF.

In this picture, I actually blurred the rest of image quite a bit before dilating the DOF, since the bridge isn't really touching anything nearby.

This is from the day after the apocalypse, on the bridge near the conservatory. I tried to make all of wean in focus and not the tree blocking the building.