Learn How to Focus A Camera Lens from Our Camera Optical Engineers.

Getting Started With Your Camera Lens Focus Process

1.) Find your Camera Focus Card or print a Test Target

First, you need a test chart to focus the lens/camera. There are numerous different test charts such as USAF test chart, Siemens Star Charts, ISO12233 slant-edge, hyperbolic wedge, etc....

The best quality objective image measurements and focus process should be completed using software and properly mounted test charts from Imatest or Image Engineering.

We know that not everyone has an Imatest or Image Engineering license, so we include several focus cards in the majority of our shipments. The 2" FocusCard 36 is a Siemens star chart with 36 square wave spoke line pairs and a contrast ratio of 80:1. This is a subjective focus tool and is not suitable for objective eSFR measurements.

Need to download a Focus card or test chart? Click here
Camera Lens Focus

2.) Determine the Nominal Object Distance for your Camera

Consider all of the objects you intend to capture with your vision system.

What is the closest? What is the furthest? What is the median of the object distances?

Use our Depth of Field Calculator to calculate the distance to set the targets. Enter the EFL, F#, and pixel size. Then, move the nominal focus distance slider until the near and far focus distances cover your entire range. This nominal focus distance value is the distance at which you should set your targets. 

You may have a "what is sharp enough" preference that differs from this theoretical calculation, so try a few different distances based on 2px and 4px blur.

USAF Test Chart
Camera Lens Siemens Star Focus Cards

3.) Prepare Your Camera Set Up

Set 1 focusing card in each diagonal direction 50% from the center to the corners. Use the values calculated in step #2. These should be set at the closer of the Nominal Object Distance, or the Hyperfocal distance, calculated in step #3.

You can move these around, but using only a single target in the center usually does not yield optimal focus across the image.

We recommend using a neutral gray background to minimize auto-exposure clipping.

4.) Start Your Camera. Go Past Focus. Come Back.

1.) Open a real-time output stream from the camera. Refer to your camera manufacturer for details.

2.) Clean your sensor, lens threads, lens mount threads, and lens rear surface using an air dust tool. Don't use an aerosol-type air dust tool; it needs to only use room air.

3.) Slowly thread your lens into focus.

4.) Go approximately a 1/4 to 1/2 of a turn past focus. You want to be able to clearly determine that the camera is out of focus.

5.) After the lens starts going out of focus, return to best focus using 1/16 turn increments.

This process makes sure you are at the true peak contrast.

How to focus a Camera
Focusing an m12 Lens

5.) Lock Focus and Return to Console

If you are using one of our M12 lenses, set/lock the camera's focus using the following insturctions.

Use a low-outgassing adhesive to secure focus. Industry standard is to use a UV+Heat dual cure adhesive. This allows you to set focus, then cure the adhesive through the thread shadow zones. You can also test Heat-only adhesives for a permanent fixture. We suggest contacting your preferred adhesive vendor (e.g. Delo, Loctite, ThreeBond) for more specific recommendations as it is dependent on the lens holder and lens barrel materials.

If you do not have adhesive or the curing equipment, you can use a focus lock ring.

We do not recommend using a set screw in the lens mount as your camera can go out of focus on one side.

Return to console to start using computer vision. Let us know if you have any feedback or questions about these instructions.