Friday, March 14, 2008

This Tuesday I finally got my driving license in the US. Well, I technically don't have the license itself yet - it will be mailed to me eventually. Since I had a rental car at my disposal, Kyle and I decided to take a little photography trip. We drove to Lake Lemon, a few miles from Bloomington.

image

We reached the lake a little before sunrise. It had been years since I saw a sunrise, and the quality of the light was just fascinating. Its true what professional photographers say - there is quite nothing like the morning light. Also, wild geese make lovely subjects.

IMG_2457

I usually don't shoot in black and white. Kyle almost always does. Here is my attempt to look vaguely Ansel Adams-ish. The picture below looks a lot better in full resolution. So the hi-res version of the picture is uploaded, you just need to click on it.

 

IMG_2537

Finally, to add a bit of color, here is Lake Lemon a few minutes before sunrise. This too is better hi-res, but in the interest of server space I am uploading only the little version here.

IMG_2283

Friday, March 14, 2008 1:27:34 PM (Eastern Standard Time, UTC-05:00)  #    Comments [7]  | 
 Sunday, March 09, 2008

Graffiti-2   Graffiti-6  Graffiti-1-3

  Graffiti-1-2

Graffiti-7 Graffiti-5

Sunday, March 09, 2008 7:19:43 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 

Most photographers I talk to, who are hobbyists like me, act a little strange when the topic of post processing comes up. A manner that is rather reminiscent of a stupid friend letting slip something in front of your parents. They look a little squeamish and then they start to feign innocence. "I never post process my pictures", "Oh! that's how it came out of the camera", "I want my photos to be *real*", "Only minimally, just yadda yadda yadda..." etc.

What?

What are you all uptight about? What's the big deal? Do you realize that when you take a digital photograph there is a lot of software in the camera making choices for you already? I haven't done much (if any at all) post processing so far, not because I have anything against it, but because of (1) I don't have the tools and (2) It takes too much time. I do have Picasa on my machine and every now and then I have tried boosting saturation on a picture or cropping out an annoying detail and have felt good about it.

The problem with Picasa is that it doesn't allow much control over things and I still end up wasting a lot of time if I ever start playing with it. Many many years back I had access to a copy of Photoshop and that program simply made me feel stupid - I couldn't get it to do anything. I remember Abdul Rafeeq who was in my undergrad engineering class and was a wiz with Photoshop. Rafeeq used to design all our posters and such, so I had first hand evidence of the fact that the tool was powerful in the right hands. (The only image manipulating program I felt good about was Gimp - the fact that I never installed it and that I never really used used it, made me feel really good about myself. Once in a while I'd find some poor soul struggling with it and feel a deep satisfaction that it wasn't me.)

Enter Adobe Lightroom. Lightroom is a post processing tool designed primarily with the interests of photographers in mind. The tool is designed to let you select and organize pictures, do a decent set of color corrections, tone fixing etc type operations that most photographers are interested in.

I downloaded a copy a few days back on the 30 day trial period and I like it. Its a bit slow, not as responsive as Picasa, but is otherwise rather nice. After playing around with it a bit, I must say I like the added power to fix the color settings of my pictures. Being able to boost color in your pictures (or de-saturate them) is an added dimension of power. Of course, it cant make a bad picture good, but it does compensate for the color of the light, the white balance settings, the nuances of your cameras sensor etc. As a matter of fact, once I get comfortable with this I suspect I will be able to get the look I want without much trouble as well.

image  image

Comparing the detail of someone's forehead. Which one do you think came out of the camera and which one is the post processed version? The odd looking reddish hue, the one on the right, is the version that came out the camera.

The downside? The several hundred dollar price tag. Its cheaper than Photoshop but its a bit too much for what the PhD program pays me.

Sunday, March 09, 2008 1:44:40 AM (Eastern Standard Time, UTC-05:00)  #    Comments [4]  | 
 Saturday, March 01, 2008

I have started liking groups so much, that I think its worth spending some time drawing out these beautiful things with some care. These mathematical abstractions have some really nice corresponding pictures.

 

image

This is the dihedral group D3, produced by
s^3 = i
(st)^2 = i

 

image   image

The quaternion group.

Quaternions are a generalization of complex numbers. I am a little fascinated with the above group because a long time back before I had known of Group theory I had constructed the above diagram in my attempt to understand quaternions and multi-dimensional geometry.

The discovery of quaternions is credited to the great mathematician Hamilton. Story has it that Hamilton had been pondering the issue for a quite a while and fundamental equation of quaternions came to him when he was taking a walk with his wife. It is said he carved the equation into bridge where he was at that time. The bridge, now has a plaque to this effect. So here is the fundamental equation:

ijk = -1

From this we can also derive i^2 = j^2 = k^2 = -1

 

image

The group produced by
s^3 = i
(-s)ts = t^2

where "-s" is to be read as "s inverse".

Here is a slightly different rendition of the same group:

image

 

Here is a different group:

image

This is the group generated by:
s^4 = i
(-s)ts = t^2
t^15 = i

 

image

This is the group generated by a variation of the above equations:
s^4 = i
(-s)ts = t^2
t^5 = i

Saturday, March 01, 2008 3:21:05 PM (Eastern Standard Time, UTC-05:00)  #    Comments [3]  | 

Many years back I worked full time at Microsoft on one of the many projects related to Vista (or what was then called Longhorn). Last December I was visiting friends in the Redmond area when one of the jokingly observed how the code I had written for Microsoft still hadn't seen light of day, while two and a half years later, I had moved on and completed my Masters and had started on my PhD.

This wasn't a sort of accidental slip, but I remember we were told at that time that if we had any ideas to suggest for Vista, they better be ideas that will be new and interesting 3-4 years later when the OS actually ships. This is a tall order for any sort of idea, much less for the volatile world of "software project" ideas.

While this seemed like very ironic humor at that time, over the past month or so, once in a while I thought about what that meant. After all, I had spent a year writing all that code. A very busy year at that - I had spent 15+ hours a day, I daresay, that was my average day, struggling with the turmoil of the massive engineering effort that was Vista.

I wasn't a *great* programmer by many standards, but I'd like to think that I was better than many I had encountered. 15+ hours of my time for about a year, took a lot of out of my life and it didn't seem to have amounted to anything! Sure I was being paid a handsomely, but one one like to think that one's efforts contribute to the world in some way as well. After all that year was full of deadlines and things being rushed to be completed and such. What came of all of it? If it came to nothing, what a waste of life that was...

A few weeks back, I got a call from Steve who works with Google (who has a fascinating blog btw), about coming back and working with them on some stuff. I casually asked what happened about the last thing I had worked on, when I was there last summer. I had made some extensions to the Rhino compiler, the largest part of which was adding the yield control operator to it. Steve said that they were using it. Somewhere in the back of my mind I said "What?!".

Maybe my programming has matured over the years. Maybe the ~6 hrs a day I spent in office as an intern produced production quality code. I somehow assumed that it wouldn't see any real world use. Was it really that special that it was ready for real world use? Don't get me wrong, it wasn't bad code. But it was code that only written, not "baked" for years.

Maybe there was another reason. Maybe, it wasn't a property of the code at all, but of the fact that there was something radically different about the outlooks of both these companies. There are many thing one can say about this "difference in outlook", positive and negative things things about both. But a shift that causes developers to feel effective by default as opposed to feeling ineffective by default, is an empowering thought. "If I build it for you, what will become of it?"

Maybe mine was an isolated case of wasted engineering effort and this is nitpicking. If that's so, I'll be happy for it.

Saturday, March 01, 2008 12:07:22 AM (Eastern Standard Time, UTC-05:00)  #    Comments [2]  | 
 Sunday, February 24, 2008

Part 1 - DOF and Aperture

If you haven't read my photography disclaimer, take a look.

 

Before we start, here are links to one or two external DOF articles:

http://www.mir.com.my/rb/photography/fototech/htmls/depth.html

This link shows some of the math behind the graphs that I plot here. I find it useful to see the graphs plotted in this article to visualize these relationships. You may find the tables they have handy.
http://www.conent.com/ConAdv/Encyclopaedia/Photography/CNQ_CAPhotography001.asp 

 

Continuing from where we left of (Part 1 - DOF and Aperture), lets take a look at the relationship between DOF and distance to the object being focused on a little more closely. In the previous graphs we could get some insight into this relationship. Here we will plot distance on the x-axis and DOF on the y-axis.

 image image

The two graphs above show the DOF changes for the fixed aperture value f/4 and focal length of 50mm. The first graph shows the variation of DOF over a relatively short distances of <5m. The second graph shows how this varies over greater distances and show the non-linearities in the DOF when greater focusing distances are involved. From a distances of about 20m DOF start shooting up and by ~30m you get infinite DOF.

Lets throw in some more aperture values and see what we get. f/1/4, f/1.8, f/2.8, f/4.0, f/5.6

image  image

Nothing very interesting happening with the shorter distances. The larger distances show the larger fstop numbers curving off sooner. This is consistent with the idea that the greater the aperture (i.e. lesser the f-stop value) the lesser the DOF. If you have a lens that can provide f/1.4 you get a rather nice DOF control even upto distances of about 50m! The Canon 50mm f/1.4 prime that costs about 300$ should do that. The much cheaper Canon 50mm f/1.8 prime would be expected to follow the green curve - rather sweet for a 80$ lens.

Lets look at some larger f-stop values.

image image

At f/22 even in distances under 5m we see the DOF curving up. From roughly 5m to 20m for the aperture range of f/5.6 to f/22 we start to get infinite DOF.

 

Now lets vary the focal length a bit, starting with some wide shots.

image

These are plotted for a f/4 aperture. Within 5m each of these DOF graphs curve upward to infinity. At 10mm, if you are focusing on something that a little over a meter away you get infinite DOF! If you are wondering how 10mm is relevant, the Rebel line of cameras support the EFS mount and currently the widest (non-fisheye) lens you can get if the Canon 10-22mm lens - its a beauty.

Lets look at some medium range lengths.

image image

25mm curves upward at roughly 6m. The longer the focal length, the narrower the DOF. A 50mm would curve upward at about 30 meters.

image image

At small distances all these focal length's are very well behaved. You get very narrow DOF and with a good lens, you should get a great bokeh! Each of these focal lengths only reluctantly yield to large DOFs. So if you need to zoom into something thats 50m away and need an infinite DOF, you need to stop down the aperture. :)

There you go. The graphs should show roughly the real world values that you should expect to see with your equipment. You might want to take some approximate readings off these graphs and then go out in the field and see how these values work for you.

In the next part (whenever I get down to writing it), we'll plot the remaining combination  - DOF against focal length.

Sunday, February 24, 2008 11:10:32 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
 Friday, February 22, 2008

Last week I watched Stanley Kubrick's 1975 classic, Barry Lyndon. What a movie! I haven't seen a movie with as gorgeous realistic photography in a while. Kubrick's composition is perfect, every single shot. The lighting and the story telling is awesome.

Barry Lyndon is the story of the life of a curios Irish character, Redmond Barry, who goes onto become the wealthy 'Barry Lyndon'. It is a 3+ hours epic, that is enjoyable right through. Its a nice tale and the way it is told is excellent. A must watch, with some wine and cheese.

        

As someone with an interest in photography, I am stumped by how Kubrick achieved some of the shots in this movie. The rich colors, the way the light looks... In some ways the film was a bit of a photographer's dream project. Most scenes were shot in natural light - legend has it that the film didn't use much artificial lighting at all. In fact the beautiful candle lit scenes in the movie were shot in actual candle light alone.

Quoting from http://www.visual-memory.co.uk/sk/ac/len/page1.htm:

At the very early stages of his preparation for "BARRY LYNDON", Kubrick scoured the world looking for exotic, ultra-fast lenses, because he knew he would be shooting extremely low light level scenes. It was his objective, incredible as it seemed at the time, to photograph candle-lit scenes in old English castles by only the light of the candles themselves! A former still photographer for Look magazine, Kubrick has become extremely knowledgeable with regard to lenses and, in fact, has taught himself every phase of the technical application of his filming equipment. He called one day to ask me if I thought I could fit a Zeiss lens he had procured, which had a focal length of 50mm and a maximum aperture of f/O.7. He sent me the dimensional specifications, and I reported that it was impossible to fit the lens to his BNC because of its large diameter and also because the rear element came within 4mm of the film plane. Stanley, being the meticulous craftsman that he is, would not take 'No" for an answer and persisted until I reluctantly agreed to take a hard look at the problem.

The lens that is spoken of here is one that the famous lens manufacturer Carl Zeiss made for NASA. Not many of us can get our hands on 0.7 aperture lens today, even for still photography. As a matter of fact I don't know of any that are commercially available. Canon's 50mm prime at f/1.8 is 80$ (USD), the f/1.4 version of the lens is about 300$ and there is a L class f/1.2 lens which is about 1,300$. It stops there it doesn't go any lower. Canon once had a f/1.0 lens, which I believe is now discontinued.

Now that I look around, its 2nd on the "Ten Movies Every Photographer Should See" list. The first is, of course, Baraka.

Friday, February 22, 2008 1:40:04 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
 Tuesday, February 19, 2008

Part 2- DOF and Distance

If you haven't read my photography disclaimer, I recommend you read it now.

Photography with SLRs essentially involves navigating the multi-dimensional space created by many variables - aperture, shutter speed, ISO, exposure (ev), DOF, noise, focal length, focusing distance etc. In part, your effectiveness as a photographer depends on how well you understand this space and how well you can navigate it.

In this writeup I look at DOF. Before you read this article, I expect you already know what DOF is, and that you have some experience trying to control it. Browse around and a bit and read about DOF before you look at this article. Know what the terms mean and such. Here are two little articles that you introduce some terminology for you.

http://www.dofmaster.com/dofjs.html
http://www.dpreview.com/learn/?/key=depth_of_field

Here are some slightly more explanatory articles:

http://www.luminous-landscape.com/tutorials/understanding-series/dof.shtml 
http://www.cambridgeincolour.com/tutorials/depth-of-field.htm

Most books, like Bryan Peterson's popular "Understanding Exposure", give you a some perspective into DOF, how aperture affects DOF and how to use it creatively. I have always been a bit confused by depth of field because it never seemed to work quiet the way I expected. I always seemed to me that DOF relationships are not linear in the space of the variables that affect it. What I mean by that is that when I change a variable that affects DOF, say the aperture, it does not seem to change DOF at the same rate.

So what variables affect DOF? As best as I know they are not just aperture, but include aperture, focal length, focusing distance and camera type. Look at the URLs above, they have  DOF calculators there that accept values for these variables and give you various DOF values back. What we are going to do here is to plot some graphs between these to better visualize how one variable affects another. My graphs are based of the equations that run the DOF calculator on dpreview and are hence only as accurate as those equations are. What value you get out of this depends on how closely you look at the graphs and try to visualize what the curves mean in terms of actual photography.

 

This time we are going to look at the most frequently expressed relationship, that of DOF and Aperture.

The graph below shows DOF plotted against aperture for a focal length of 50mm and focusing distance of 1m (ie the object that you are focusing on is 1m away). This plot is for the Digital Rebel XT (the EOS 350d) and should hold for any 1.6x senor DSLR such as the Rebel, Rebel XTi and such.

image

The aperture has been varied from f/1 to f/32. Assuming we (ever) have an affordable lens at f/1. There are two lines in the picture. The lower one corresponds to the nearest point that will be in focus and the upper one corresponds to the farthest point that will be in focus. So at f/4, the region of focus starts at roughly 2.5cm in front of the point of focus and extends to about 2.5cm behind it. The total DOF at f/4 is about 5cm.

Since you are at the same position with respect to the object you are photographing and that focal length is 50mm throughout, changing the aperture will affect the depth of field and exposure time (the shutter speed) needed to maintain the same exposure value.

Notice how the graph tends to curve a bit? Lets see how the DOF curve looks when plotted at different distances. Here are the curves for some smaller distances all in the same graph.

image

For each focusing distance there are two lines, the lower one being the nearest point in focus and the farther one being the farthest point in focus. Some interesting things to note: 1) The DOF does not increase very much if you are focusing on close objects. 2) For short distances, of under a meter, the DOF seems to grow linearly.

Lets look at some greater distances.

image

Here the non linearities become very apparent. This graphs plots DOF curves at distances of 1 to 5 meters. Look at the y-axis, note that each unit corresponds to 2 meters. The pair of green lines representing the two meter focusing distance seems to increase almost linearly. At 3 meters, aperture values of 22 and above have rather large farthest points of focus.

The general trend is this: at greater focusing distances the father point of focus increases exponentially on increasing the aperture. In fact its worse than just exponential, the values hit infinity relatively quickly. So at focusing distance of 5m at f/22, the farthest point of focus has hit infinity.

Lets look at some greater distances.

image

At larger distances, smaller apertures lead to infinite DOF values. At 50m, f/4 already gives you infinite DOF! Even at 10m, there is a region of focus that is about 4-5m at f/4. Another way to look at this is that DOF tricks make sense only if the object in question is relatively close to you - i.e. within 2 or 3 meters. Well, that's not entirely true - we haven't heard what focal length has to say about it. But it does seem true at 50mm.

Here are some greater distances that show degenerate version of the above curves.

image 

Now lets go back to the first graph where we were at 1m and 50mm focal length. Lets look at some graphs that show the effect of changing the focal length. Along the x-axis we still vary the aperture value and on the y-axis we plot the DOF. We are just going to draw multiple graphs based on changing the focal length (while keeping the distance fixed).

image

So at wider apertures, the DOF increases. The effect of going from 50mm to 60mm, visually will also be that the object occupies a larger part of your frame. This is roughly what you get were you to stay at 50mm and step closer to the object. From this can we conclude that if the object stays roughly the same size in your screen, the DOF stays the same? I don't know yet. But the graphs seem to indicate so.

Let look at some wider focal lengths. The widest non-fisheye lens one can get for the Rebel series is the 10-22mm lens. (Its an awesome lens btw.) So lets start plotting at 10.

image

At 10mm f/5.6, we have already hit infinite DOF even when the object is just 1m away. At 18mm we hit infinity at about f/15. At 18mm and f/4 we have a decently small area of DOF, however remember how easily this degenerates based on your distance graphs? So if you want to take advantage of DOF when you are at the wide end, you must be pretty close to the object and have a wide open aperture (the smaller the numeric value of aperture, the larger is the actual aperture i.e. more light is allowed onto the sensor).

Lets look at some longer ranges.

image

Notice that the units of the y-axis have changed. At longer ranges (70mm to 120mm) the DOF stays small and concise, good enough to bring out that beautiful bokeh. Greater zooms have narrower DOFs - I don't bother to plot those graphs here. Its easy enough to imagine how they'd look.

 

So what do we have to take away. DOF does increase with aperture, but usually only for short distances. For greater distances there is non-linear increase in DOF often hitting infinity. Similarly at wider focal lengths you get a larger DOF for the same aperture. On increasing the focal length DOF does get narrower until some point where the DOF-aperture relationship starts to look linear again.

Distance from the object and the zoom (focal length) both DOF inversely. Increasing distance increases DOF and increasing zoom decreases it. In other words, if you were to step back but zoom in tighter to compensate, the increased distances and the increased zoom might compensate for each other giving you roughly the same DOF. (I would be able to assert this with some certainty if I have equations for the size of the image on the sensor.)

That said, if you want to take a picture whose beauty depends on DOF and you are willing to vary the object size in the final image (maybe you can compensate by cropping?), understanding the relationship between distance/zoom and DOF will come in handy. In the later parts of this write-up I hope to go into that. Let me know what you think.

Part 2 - DOF and Distance

Tuesday, February 19, 2008 9:44:57 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |