LoCA Focus Analyser: Microscopes & macro lenses

To home page

Load and analyse a sample image file:

Load and analyse your own image file:

Image is gamma-encoded

Also, have a look at the gallery of contributed results.

Longitudinal chromatic aberration and other aberrations can cause the best-focus distance of a stereomicroscope or macro lens to differ for each camera colour channel (red, green, blue), causing image degradation. Use this web page tool to explore how well your equipment's optics focuses the three colour channels, and their resolution.

Analyse a sample image, or create an image using your own equipment (how to) and then load and analyse it here, using this web page.

Things to try now

Drag the solid blue square 'handle' of the middle control below, which shows part of an image of a razor blade edge. When your drag completes, the charts below it will update, displaying the 'edge spread' at that location. 'Edge spread' is a measure of how sharply the razor blade edge came to focus at that point. The razor blade was inclined (one end is closer to the camera than the other), so there is certain that there will be a point along the edge where each colour channel will come to best possible focus (as graphed on the edge spread chart). For information about the other controls and analysing your own equipment, refer to Using LoCA Focus Analyser.

To see analysis of an edge imaged by a macro lens, use the pull-down at the top-right of this page. To see analysis of several lenses and microscopes, have a look at the gallery of contributed results.

Loading ...

Analysis of abc.png

Edge locators (left and right), and image overview (center)

Width:0000 px
Height:0000 px
FOV: mm wide
Incline: degrees
Edge slant: °
Image: 16-bit linear, 0x3FFF

Enter a negative incline if left end is highest.

Drag the yellow rectangles and triangles to identify the edge. Drag the blue rectangle to move the view region.

x:0000px, z:245μm

Edge spread distance (between the 10% and 90% levels)
vs. position along horizontal FOV / focal distance

Edge spread (pixels; target μm)

version info date time

Position along horiz FOV (pixels; target μm); focal distance (μm)

fileinfo

Smoothing window px (px on each side)


Edge profile at cursor
(x: px)

Pixel value (linear RGB)

Position within the cursor gap (pixels)

Spreads: , , px

Channels:
All Red Green Blue

'White/black' illumination levels
vs. position along horizontal FOV

Pixel value (linear RGB)

Position along the horizontal FOV

Image histogram
()

Freqency (log scale)

Focus Analyser keeps settings in local storage. Clear settings for this image or all images.

Pixel [1234,5678]
rgb8 [44,44,44]
rgb16 [4444,4444,4444]

What can you do with LoCA Focus Analyser?

Evaluate optics: Best photos will come from microscopes and lenses with minimum chromatic aberration and high resolution. Use Focus Analyser to evaluate these parameters, using just one photo of an inclined target.

Measure depth of field: Using an inclined target, information provided by Focus Analyser can help plan depth of field (DOF) increments when doing focus bracketing.

Check focus bracketing intervals: Take a series of focus-bracketed photos of an inclined target and use Focus Analyser to check the focus offset between photos. Example.

Investigate sharpening algorithms: Create a synthetic edge image, sharpen it, and then use Focus Analyser to analyse the result, to see how sharpening varies with degree of edge spread (blur), and how it affects the image and edge profile.

Links to related web pages

Chromatic aberration simulator (longitudinal and lateral) (simulates the effects of chromatic aberration)
Creating and analysing the image of an inclined edge (how to use LoCA Focus Analyser)
Synthetic edge image generator (makes an edge image with specified characteristics)
PGM file viewer (view contents of PGM image files, eg., as produced by dcraw)
Demosaicing: Constructing RGB pixels from a Bayer mosaic (how RGB pixels are created from raw file data)
Edge spread: LoCA Focus Analyser compared with QuickMTF (explores the relationship between edge spread and MFT)
Microscope and lens gallery (focus analysis of some stereomicroscopes and macro lenses)

Creative Commons License
LoCA Focus Analyser: Microscope & Macro Lens by Jim Elder is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Citation info:
LoCA Focus Analyser: Microscope & macro lens (2017-Jan)
smallpond.ca/jim/photomicrography/focusAnalyser
Jim Elder, Ottawa, Canada

Comments or suggestions

(Prior to 2019-Nov, this was known as 'LoCAte Focus Analyser')