Tuesday, January 24, 2012

Segmentation of Boo's book

Segmentation is one of the most difficult problems in image processing, where the meaning of the problem depends on the context. For example, for the image of Boo, I want to segment only the book that he is reading in the following image.

Boo: the cutest dog in the world! 

Here is the segmentation result. I will talk about the code some other day.

The book that Boo reads

Red Rose in 3D

Today, we will see how to produce 3D images from normal images.

There are many ways to create  3D images. One of the ancient ways is to shift the colors in the images and used differently colored pair of glasses.

Today I bought a two dollar pair of 3D glasses from Indiglo's childrens' section.
The left glass is red and the right is blue, which means that we have to shift the red channel to the right by a few pixels depending on how far you are sitting from your computer. Can you generate this 5 lines of code in Matlab?

Here is the image that works for my glasses, enjoy:
(You will not see the rose in 3D using the 3D movie glasses where the 3D is obtained using differently polarized light, which I can not do on a computer screen.)

Red rose in 3D
Three 3 is most effective if we have two objects, out of which one is more close to you. In these cases one segments the objects which are closer and apply 3d shift in these objects alone.

Here is an example:

Stars in 3D

Stars in 2D




Sunday, January 22, 2012

Gamma correction: seeing in the darkness!

Here is an example where we can see what is hidden in the background of a picture. The gamma correction in its basic form is: $u=f^{\gamma}$.

The following is an illustration where I used a picture I took in Washington DC, the picture of the World War II memorial, with a $\gamma=0.5$ I got the trees in the background.

Original picture of the world war II memorial

Gamma corrected image with $\gamma=0.5$