Relight

3_color

The image looks interesting right? So how did I do it? Pretty easy! Just use three light sources – red, green and blue. Wrong! This is done using a slightly more sophisticated procedure. I took three images with different lighting conditions. Then I wrote a MATLAB script to extract the red channel from the first image, green channel from the second image and blue channel from the third image. Combine these three and you get wonderful effects.

Green Chennal
Green Chennal
Blue Channel
Blue Channel
Red Channel
Red Channel
Combined Image
Combined Image

The first set of photos here are taken with a table lamp which does not give a focused beam. Switch on the light, take picture, change light position and so on.

Blue Channel
Blue Channel
Green Channel
Green Channel
Red Channel
Red Channel
Combined Image
Combined Image

The second set of pictures are taken using the same table lamp but with a convex lens in front of it. So I get a somewhat focused beam and clearly it has a more impressive effect.

The MATLAB code for this is available on GitHub. I feel comfortable using the GUI builder in MATLAB for dialog boxes. For these, I have uploaded the ‘.m’ files on GitHub but I am yet to find a way to upload the ‘.fig’ files. Apologies for that.

https://github.com/nakul13/Computational-Photography

About these ads

6 thoughts on “Relight

  1. Interesting.
    What I see is that each color is also focused from a different angle. This way you can color the shadow areas in the combined image, or pick areas to highlight with one beam.
    It would also be interesting to use laser and patterned light to combine for effect.

    1. Yes, each color is focused from a different angle which is why the colors are bright in certain region and not so bright in the rest. You can seperate the foreground from the background first and then apply this coloring to only the background or only the foreground.Instead of combining the three color channels, you can replace only one channel of the original image. And by having lasers or patterned light, it may have even better effects. You are limited only by your imagination :)

    1. Well, this project is not there to solve any problems. You might even argue as to whether its even science. I am inspired by the Camera Culture group at Media Lab and this is just a start. There is a long way to go but I had to start somewhere. Anyhow, I would say that computational photography is the intersection of science and art :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s