dinsdag 29 juni 2010

Vision: Depth of Field

A couple of days ago, I connected my camera to upload all the images I had taken a few weeks before. A friend was really *urging* me to post them. Anyway, while looking at the images, I saw many of them were bad. Moved, bad lighting, unclear persons, too dark, etc. I should have made them differently.

Just wanted to complain. This post is about something different. In the near future there might be one on how to create sharp, well-lit images. But for now, lets talk about Depth of Field.

What is depth of field?

Depth of field (DOP) is the portion of a picture that appears sharp.
Probably you've seen those macro pictures, with a bee or fly or flower on them. The bee is sharp, but all the rest around it is fuzzy. Well, that's the DOP. The bee is in the depth of field, the background isn't.

Depth of field is very important in robotic vision. Usually only the portion of the image that is sharp can be used for further calculation and processing. So how do you change the depth of field.

The depth of field depends on a number of factors:
- the lens focal length
- distance to the object
- lens aperture

The focal length and distance to the object are an obvious combination. To create an acceptable picture of near-by objects, one uses a lens with a low focal length (i.e. macro lens). When the object is far away, as in landscape photography, the used lens will have a larger focal length (200mm+). You don't use a macro lens to make a landscape image or vice-versa. The image will not be sharp.

But what about lens aperture. Ah!
This is much less obvious. Wikipedia has a nice technical explanation of the effect of aperture on the DOF (http://en.wikipedia.org/wiki/Depth_of_field). It basically boils down to this: the larger the aperture, the lower the depth of field.

Thus, when it is necessary to increase the depth of field, so as to get a larger portion of the image into focus, you can decrease the aperture. The flip-side of this, is that the amount of light that hits the camera will decrease. To counter this, the shutter time can be increased or more lighting can be used.

Another method of increasing depth of field is even less direct.
Depth of field is smaller the closer the object is to the camera (imagine the bundles of light diversing). Thus, the DOP can be increased by moving away from the object. However, this will also increase the amount of border around the object. Thus it is needed to cut the object from the image, which does decrease the image resolution compared to taking the picture from a closer distance. In this way it is possible to trade image resolution for increased depth of field.

Summarising, to increase DOP, decrease the aperture and if possible, move away from the object.

Ciao and keep focus!

Geen opmerkingen:

Een reactie posten