Macro Lens Vs Extension Tubes – What provides the best results?

Macro lenses solve the problem of imaging a small field of view from a relatively large distance away (relative to the size of the field of view). This solution normally consists of a large focal length lens, however these lenses have Minimum Object distance (MOD) and focus further away than desired.

For example: Using a 1/3” sensor, you want to look at a 3mm Field Of View (FOV) from 30mm away. The solution requires a 50mm lens, but 50mm lenses do not focus closer than 500mm away in some cases!
A solution is to add “extension tubes” in between the camera and the lens, but this leads to several problems like high image distortion, resolution loss (especially at the corners), poor depth of field and chromatic effects.  This makes this method not suitable for good imaging especially if accurate measurements are required.  

What’s the solution?
Opto Engineering Macro lenses!  These lenses are specifically designed for macro imaging allowing close up focusing and small field of views.  Unlike conventional lenses, these lenses are optimized to overcome image distortion, poor depth of field and chromatic effects.  A very low optical distortion makes these lenses perfectly suitable for precise dimensional measurement applications.  

As seen on the images to the right, using a macro lens delivers superior image quality compared to standard fixed focal length camera lenses using extension tubes.  

Incredibly low distortion is also provided by these macro lenses compared to standard fixed focal lenses with extension tubes.  These lenses will provide the same performance at the center and edges of the field of view.

This is crucial in flat measurement applications. 

Using conventional lenses, measurements will not be accurate and require calibration.  

Color consistency is provided by these macro lenses for demanding applications and corrected over the visible spectrum.  In turn, chromatic aberrations are not exhibited when compared to conventional lenses.  

Opto Engineering provides four series of lenses that cover 1/3″ to 2/3″ format area sensors and up to 63mm line scan sensors – Series as follows: 

  • MC Zero distortion macro lens (0.33  – 3X mag)
  • MC3-03X – Zero distortion, multi-configuration macro lens (0.1 – 3X mag)
  • MC4K  – Macro lenses for 4k linescan cameras (0.3 – 2X mag)  
  • MC12K – Macro lenses for 12k and 16k linescan cameras (0.07 – 2X mag)

Full Specifications can be found HERE.  

This short video provides a brief overview of the Opto Engineering Macro series lenses

1st Vision has extensive knowledge in industrial imaging and can help answer any questions.  We have over 100 years of combined knowledge and look forward to discussing your application.  

Please do not hesitate to Contact us for a quote. 1st Vision can provide a complete solution including cameras, lenses, lighting and cables.  

Ph:  978-474-0044  

Follow us on Social Media!             

Imaging Basics – Calculating Lens Focal length

In any industrial imaging application, we have the task of selecting several main components to solve the problem at hand.  The first being an industrial camera and second,  a lens to acquire the given image.  In many cases, our working distance of our lens is constrained and may have to mount the camera closer or further from the object plane.  Once set, this defines our working distance (WD) for the lens.  In addition, we have a given field of view (basically the dimension across the image) of the desired object.  

In order to select the correct focal length lens which is denoted in millimeters (i.e 25mm focal length), we need additional information on the camera sensor.  Camera sensors come in various “Image formats”.  The chart below indicates some common formats which relate to the sensor size.  The sensor size can be found on the actual sensor datasheets if not available in a given chart.  

For this exercise, we want to image an object that is 400mm from the front of the lens to the object and desire a field of view of 90mm.  

We have selected a camera with the Sony Pregius CMOS IMX174 sensor.  This uses a 1/1.2″ format which measures 10.67mm x 8mm.  

We have the following known values at this point: 

Field of View (FOV)  =  90mm
Working Distance (WD) = 400mm   
Sensor Size = 10.67mm – We will calculate for a 90mm horizonal FOV, in turn use the horizontal sensor dimension

The basic formula to calculate the lens focal length is as follows: 

FL = (Sensor size * WD) / FOV

Using the values from our application, 

FL = ( 10.67mm * 400mm ) / 90mm 
FL = 47.4mm

Lenses are only available off the shelf in various focal lengths (i.e 25mm, 35mm, 50mm), so this calculate is theoretical and may need an iteration to adjust working distance. Alternatively, if your application can have a slightly smaller or larger FOV, the closest focal length lens to your calculation may be suitable.

1st Vision has made calculating your lens focal length a bit easier!  As in engineering, its good to know the background formulas, but in practicality, like to simplify life with tools

You will find our lens calculator HERE.  Alternatively as select a camera, you will find an icon to the right which will automatically populate the calculator.  Below is a short video showing how to use this resource from the camera pages.  

A few additional considerations when selecting a lens:

  • Lenses have minimum working distances (MOD), so this should be considered when reviewing a lens setup.  MOD’s can be found on the lens page for the given lenses.
  • Lenses need to be paired with the appropriate sensor.  For example, if you have a 1/2″ sensor, you need to ensure you are using a 1/2″ format lens or larger.
  • In selecting a lens, you need to ensure the lens has enough resolution (in lp/mm) to resolve the pixels on your camera.  Be sure to review this data carefully once you ID the desired focal length.  Demystifying lens specifications provides further understanding. 

Related Blogs: 
Demystifying Lens Specifications
Understanding Lens MTF
Calculating Resolution for Machine vision

Contact us to discuss your application and help make a recommendation!  1st Vision can provide a complete solution including lenses, cables and lighting.  
Ph:  978-474-0044

Do not forget to follow us on social media!             

Not all Lenses are created equal! MTF comparisons

In our previous blog, Demystifying lens specs,  we discussed the Modulation Transfer Function, also known as MTF, which gives you the performance of light through a medium.  The MTF helps us understand lens characteristics, however it is extremely hard to compare using manufacturer’s data sheets.  In essence, looking at a 25mm / f1.4 lens from vendor A to vendor B may look similar with basic information, but they are not!  Not all lenses are created equal and in turn need extensive data for comparison. 

The problem with comparing lens MTFs.

The problem is that most lens manufacturers DO NOT supply MTF information, or do not supply complete MTFs. Lens manufacturers with high quality optics, such as Schneider Optics, are one of the few that provide a complete set of MTFs vs. transmission.  (See an example on Pg 2 on this datasheet.)  Many will provide basic information in terms of line pairs/mm (lp/mm) measured in the center of the lens, however this is still not enough for a true comparison.  MTF data will vary with aperture (f3), light intensity and distance from the center to edges.  In turn, if you are not comparing “apples to apples”, you cannot draw a conclusion on which is the better lens.

Can I just measure the MTF myself?

The short answer to this is: Not so easily! First off, the MTF of a computer monitor is probably around 30 lp/mm. All the lenses we are discussing in this blog are at least 2x this, if not 3 or 4x it. So the limiting factor is the monitor, and you will not be able to see any differences. If you have a resolution chart, and some software where you can get the actual pixel data and plot it vs. the test pattern, you can get a better idea. However, a fairly rigid test set up with constant lighting, constant exact FOV and other identical parameters is required. This is a very lengthy process and requires special equipment. True optical testing is the correct way to determine and compare MTF.

Bottom Line:  1st Vision has done extensive testing on many lenses and have true comparisons.  We can help you determine which lens is the best for your application!…. Unless you have some nice optical equipment and some time!
Contact us to discuss the application and we can help make a recommendation!  1st Vision has 100’s of lenses in stock for same day delivery!

Our lens webpage also highlights the resolution and distortion BUT again does not tell the whole story!  
Ph:  978-474-0044             

Imaging Basics: Calculating resolution for machine vision




Camera image resolution is defined by the number of pixels in a given CCD or CMOS sensor array.  This will be identified in a camera data sheet and shown as the number of pixels in the X and Y axis (i.e 1600 x 1200 pixels). 
The application will determine how many pixels are required in order to identify a desired feature accurately.  This also assumes you have a perfect lens that is not limiting resolving the pixel (see Demystifying lens specifications).  In general more pixels is better and will provide better accuracy and repeatability.  
 If for example you have a dark hole on a white background filling your field of view (FOV) by 90%, you will have many pixels across the feature.  On the contrary, if we have a small pin hole that is within the same field of view, we may not have enough pixels across the hole to identify the feature.  In order to find an edge you need at a minimum of 2 pixels given excellent contrast.  In order to be robust you ideally will want 3-4 pixels across a edge or feature.  
This leads us to identifying the resolution required given the size of a feature.   We will do this with an example and provide the needed formulas.  
Example:  The vision inspection is to locate a pin hole which is 0.25mm in diameter on a part which is 20mm square.  In order to compensate for any misplacement of the part, we will set our FOV to 40mm x 30mm.  We would also like to have a minimum of 4 pixels across the 0.25mm feature.  

We can calculate the resolution required as follows:


Rs is the spatial resolution (maybe either X or Y)

FOV is the field of view dimensions (mm)  in either X or Y
Ri is the image sensor resolution; number of pixels in a row (X dimension) or column (Y dimension)
Rf is the feature resolution (smallest feature that must be reliably resolved) in physical units (mm)
Fp is the number of desired pixels that will span a feature of minimum size.

For this case we know: 

FOV(x) =  40mm

Rf = 0.25mm
Fp = 4 pixels

Calculating the spatial resolution (Rs) needed:

Rs = Rf / Fp = 0.25mm / 4 pixels = 0.0625mm pixel

From the spatial resolution (Rs) and the field of view (FOV), we can determine the image resolution (Ri) required (we have only calculated for the x-axis) using this calculation:

Ri = FOV / Rs = 40mm / 0.0625 mm/pixel = 640 pixels

We have now determined that we need a minimum resolution of 640 pixels in the x-axis to provide 4 pixels across our feature that is 0.25mm in diameter. The camera resolution can now be selected!  In today’s world, we could select a VGA (640 x 480) camera for the application.  As a note, the number of pixels required depends on many aspects of lighting, optics and algorithms used for processing.  This calculation method assumes optimum conditions.     

If you do not like math, you can download our resolution calculator here and just enter the data.  This makes it easy to test various iterations.  Download the calculator HERE. 

If you visit our camera page, you can sort by resolution in X and Y resolutions to quickly ID cameras that meet your resolution needs. 

For all your imaging needs, you can visit www.1stvision or contact us! to discuss your application in further detail or receive a quote on a desired camera.  We can also help identify which sensor is best based on the imaging conditions.