How to focus a lens
Focusing a lens may seem easy, however depending on your equipment and location it can be rather difficult. This guide will walk you through the steps to focus a lens on a digital camera system.
Of course if you are using a smartphone, SLR, point and shoot etc you can rely on the built in autofocus function. If you’re not familiar with how autofocus works, I highly recommend checking out the links below. We all take autofocus for granted, however there is some really interesting engineering involved.
1) Determine the focus mechanism
Determine how the lens adjustment is made. It is likely one of the two:
- Manual focus : You have physical access to adjust the lens
- Electronic focus: The adjustments are motorized or electronic magnetic and must be controlled through an electronic interface
2) Gain control of the lens
For manual focus, you will need to ensure the lens is loose and can be adjusted. If you are using a machine vision camera, most likely the lens is installed with a fine thread. Simply rotating the lens will adjust its focus. If it is an SLR camera again rotating the lens will likely change the focus. Less likely, but possible would be a slide action focus, meaning to focus you will have to slide the lens in and out.
For electronic focus, you will need to determine how in the software or user interface the camera can be set to manual focus.
3) Confirm live view of the image
Aside from manual view SLR cameras, you will need a live view of the digital image. This could be through a computer, digital display or whatever system you have. Ensure that making an adjustment of the lens has a visible effect on the image.
4) Determine what object distance you require
More often then not, focusing the lens to infinity (far, far away…) works for most general scenes. However if your setup is for macro photography or other close focus conditions you will want to spend time determining the best focal setting and working distance for the lens. Here the F/# and how it relates to depth of field are critical factors to to understand.
Next, find an object in your scene that has small thin features. A window pane is an excellent object for example. Telephone wires, small tree branches or similar will work as well.
Aim your camera at one of these objects and view the live image
5) Confirm exposure settings
Getting the object properly exposed is critical. For example if the image is too bright, the object might be saturated or if it is too dark you will won’t see enough contrast on the object to tell when it is properly focused. Set the exposure at a mid point so that the image brightness is optimal for your display.
6) Digital zoom (optional)
If you have this feature in your camera software, applying digital zoom to the image can further help set the focus properly. Again this depends on your setup and conditions, but if you can zoom the image on the small object identified in step 4, this would be ideal.
7) Adjust the focus
Now that you have gained control of the lens focus, have a live camera view, determined your object distance, and zoomed the image (optional) it is time to set the focus.
Carefully adjust the focus back and forth several times so the image comes in an out of focus. Make adjustments so that the image becomes equally blurred on each side of the optimal focal point. Doing this several times will train your eye to identify when the image is at its sharpest. Once you have a feel for the best image quality, focus in and out again and stop at the point when the image is sharpest. If you are viewing a window pane or similar small object it will be quite apparent when the focus is optimal as this object will be well defined and visible. When the lens is out of focus, the object will likely not be visible at all.
8) Lock the focus (optional)
If your camera setup has a locking screw or similar mechanism, now would be the time to lock the lens in place. With smaller lenses (M12 for example) this can sometimes be tricky, as the locking set screw might adjust the focus set point. If you find that this happens, you can try some of these tips:
- Hold the lens in place while you lock the screw
- Try to estimate which way the set screw moves the lens and pre-compensate for this in step 7
Congratulations, you have now focused your lens!