Using our advertising package, you can display your logo, further below your product description, and these will been seen by many photonics professionals.

Please do not enter personal data here. (See also our privacy declaration.) If you wish to receive personal feedback or consultancy from the author, please contact him, e.g. via e-mail.

Modulation transfer functionimageprocessing

Introduction to Modulation Transfer Function | Edmund Optics --less on the slant-edge approach, more relating to resolving line patterns and other classical stuff

In many cases, the collimation is done in both directions perpendicular to the beam, but there are also beam collimators working in one direction only – for example, fast axis collimators made as rod lenses, which are attached to certain laser diodes.

http://www.dougkerr.net/Pumpkin/articles/MTF_Slant_Edge.pdf --a few pages of less-interesting background lead up to a nice description of the slant-edge approach

“Misha” makes several references to a paper by Marzillano that describes an efficient method of calculating sharpness: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.7.9921&rep=rep1&type=pdf …reading through that now.

Okay, I’ve studied this quite a lot today. Needed is a scalar measure of sharpness/contrast/acutance. Focusing and other lens adjustments would serve to optimize this quantity.

Edmund Optics offers a wide range of laser accessories, including different kinds of beam collimators and expanders. In particular, we have fiber-coupled collimators which are suitable for FC/PC, FC/APC and SMA connectors.

Here’s code for an autofocus routine used in microscopy, of interest mostly for how they calculate contrast: https://github.com/micro-manager/micro-manager/blob/master/scripts/autofocus_test.bsh

CSRayzer provides different kinds of sing mode or polarization-maintaining fiber pigtail collimators, large beam collimators, and fixed focus collimators.

Now, I started this thread asking about MTF. But MTF gives a graph vs. spatial frequency, not the figure of merit desired (though I suppose one could pick a spatial frequency and use the value of that bin for optimization).

The unique design of the Model 02-M010 prevents retroreflections near the fiber face or within the core material. All elements are fused silica (the exception being the 1800–2000 nm collimator optics that are Infrasil) with either V-type or broadband coatings, depending on the operating wavelength range. When used for imaging purposes, the three-element design ensures the output mode from the fiber is preserved, without distortion, even at high throughput powers.

By submitting the information, you give your consent to the potential publication of your inputs on our website according to our rules. (If you later retract your consent, we will delete those inputs.) As your inputs are first reviewed by the author, they may be published with some delay.

Um, anyway, the FFT code I wrote can do 1d FFTs up to 1024 points. It can do both real->complex and complex->complex ffts. It can also do reverse ffts too.

That’s hugely helpful. I’m a newbie with this so a firmware approach in the future would be wonderful. Meanwhile I’ll see what I can accomplish! Thank you.

Also see computer vision - Assessing the quality of an image with respect to compression? - Stack Overflow --post by the same author.

Here is something interesting. If you have fast .jpeg compression then the job may already be done. Per Detection of Blur in Images/Video sequences - Stack Overflow (poster Misha), the DCT coefficients provide a measure of the high-frequency components in the image.

Note: this box searches only for keywords in the titles of articles, and for acronyms. For full-text searches on the whole website, use our search page.

We also offer a complete range of aspheric collimators with excellent performance, small and light design, and with fewer components in the optical system. Manufactured using glass replication technology, the lenses are a cost effective solution for a wide range of application and are available in a wide range of specification.

MTF imagequality

So I’m googling on [“image based” “auto focus” OR autofocus] and find an intriguing reference to “histogram entropy” as a metric of image sharpness here: http://www.emo.org.tr/ekler/dbdbf7ea134592e_ek.pdf

Thank you! I am working on the step by step list. First I’m sifting through all the references and pointers and opinions to come up with an optimum approach. Expect my input shortly.

Note: the article keyword search field and some other of the site's functionality would require Javascript, which however is turned off in your browser.

Ah, so, we actually have code for the 2D FFT onboard for phase correlation. If you modify the C firmware the camera can do what you want. The phase correlation file shows an example of this: https://github.com/openmv/openmv/blob/master/src/omv/img/phasecorrelation.c

o MTF seems to be most often calculated as the normalized FFT of the derivative of the image, but I suppose there might be other measures as well; maybe even the histogram of pixel values could have utility for this (since a perfect step would have pixel values in only two bins, white and black; any intermediate bins with pixels in them would indicate blur). I would imagine that image-based autofocus approaches do something similar. Those have been around for a long time. My nearly 30-year-old Sony handicam had image-based autofocus.

MTFcurve

Shanghai Optics provide many different types of standard collimating lenses, including aspheric and achromatic lenses for many different light sources such as highly divergent laser diodes. Our standard collimating lenses can convert divergent laser beams to well-collimated laser beams that enter beam expanders for interferometry, laser material processing and laser scanning applications.

From what I’ve gleaned, there are many approaches to determining image quality (sharpness/contrast/resolving ability). The slanted-edge approach seems to be the most accepted, and is in fact the basis of ISO 12233. Below are some links to browse to get the general drift of it.

Okay, I’m assuming that a firmware update that exposes the fft functionality (or better yet, provides a proper MTF method or some other measure of image sharpness) is some time in the future. I’m interested in fiddling with the firmware. Is the process for doing so documented? I’m not finding it.

MTF is a common mathematical measure of image sharpness. It involves differentiation and a Fast Fourier Transform. I hoped to find it in one of the standard or extended libraries but so far have not.

The Model 02-M010 is a three-element, air-spaced anastigmat designed specifically for collimating the output of large diameter silica fibers used in high power medical and industrial applications. It is equally suitable for collimating the output of Large Mode Area (LMA) or Photonic Crystal (PC) fibers with smaller numerical apertures. The mechanical assembly allows a precise translation of the lens (without rotation) relative to the fiber face.

More broadly, how does one assess the contrast/sharpness of an arbitrary image? Is there a less-fancy approach that might be more applicable to a tiny processor?

and py_mtf/mtf.py at master · weiliu4/py_mtf · GitHub --some Python example codes I’ve been picking through Thanks! Meanwhile I’ll play around with that firmware link you provided. Many thanks for that!

I can do the math easily. I just don’t know what particular steps you’d like me to do. We can’t output graphs on the OpenMV Cam. So, everything needs to boil down to one value.

The purpose of a beam collimator is essentially to transform a strongly diverging light beam into a collimated beam, i.e., a beam where light propagates essentially only in one direction, and the beam divergence is weak. The output beam may have its focus close to the output aperture, or a mild focus somewhat away from it (see Fig. 1).

Wondering if this might be less compute-intensive than the FFT approach. I’m poking through OpenCV now in search of nuggets. UPDATE: Per the discussion at http://answers.opencv.org/question/5395/how-to-calculate-blurriness-and-sharpness-of-a-given-image/ OpenCV has a function, calcBlurriness, which would do the job. Unfortunately it’s undocumented (OpenCV: Video Stabilization). Trying to ferret out the source now.

o A slant-edge image target (black/white, at a small angle vs. the pixel array axes) serves as a step function for the imaging system. How steeply stepped does your imaging system perceive it to be? The sharper the step, the more high-spatial-frequency content in its Fourier transform; blurrier images have less.

MTFlens

Image mtfformula

I might have time to write the code for this tommorrow. If you can work out a high level step by step guide for what you want me to do then I can do that. Note that “compute the PSF” is not a sufficient guide… I’ve seen a lot of details on that but I don’t know what they mean.

How to Measure Modulation Transfer Function (4) « Harvest Imaging Blog --good, concise description of the slant-edge approach

Avantier offers a wide range of standard collimating lenses, which includes aspheric and achromatic lenses suitable for various light sources such as laser diodes with high divergence. These standard collimating lenses have the ability to convert divergent laser beams into well-collimated laser beams. These collimated beams can then be utilized for laser material processing, laser scanning applications, and interferometry by entering beam expanders.

We also provide custom collimating lenses for projecting a source at infinity for infinite conjugate testing of optical systems. The collimating lenses can consist of several optical elements. The selection of optical materials and optical configuration depends on the entrance pupil diameter, wavelength, focal length, and field of view of the optical system under test.

If I hadn’t started this thread, how would a machine vision engineer have answered that question? Is there a tried-and-true approach?

Nice : “One of the properties of the 2-D DCT is that it is separable meaning that it can be separated into a pair of 1-D DCTs. To obtain the 2-D DCT of a block a 1-D DCT is first performed on the rows of the block then a 1-D DCT is performed on the columns of the resulting block.”

Essentially, a beam collimator contain some kind of focusing lens, or sometimes a curved mirror, and usually some opto-mechanics for stable mounting and possibly adjustment.

I’m going to be doing some work on this FFT stuff this weekend. Can you post a link to an easy to understand paper or website for MTF? I can add it then.

MTFcamera

Image mtfgraph

Collimation of single mode fibres can be made simple with the use of a PowerPhotonic fiber collimating micro lens array. We design and manufacture standard and custom in 1D and 2D arrays. All products are made in high grade fused silica and capable of both high efficiency and high power handling and our unique process minimises channel cross talk due to extremely low scatter. Lenses can spheric, aspheric or freeform due to our unique manufacturing process.

Image mtfcurve

My own application has frame-rate as a priority, so efficiency trumps exactitude for me. I just want to maximize “sharpness” and don’t care much about rigorous compliance with ISO this-and-that. I’d imagine autofocus would have similar priorities. Reading material:

For my application, I need to do a fast calculation of the modulation transfer function of a test image. I’m starting from scratch and would appreciate suggestions on how best to do this.

After my reading, it seems DCT rather than FFT will give us the info we needed with more efficiency. See https://users.cs.cf.ac.uk/Dave.Marshall/Multimedia/PDF/10_DCT.pdf …As I’m sure you know (it was new to me as of today!), DCT is basis of .jpeg, so an efficient implementation probably already exists in OpenMV.

Here you can submit questions and comments. As far as they get accepted by the author, they will appear above this paragraph together with the author’s answer. The author will decide on acceptance based on certain criteria. Essentially, the issue must be of sufficiently broad interest.

The FiberOut fiber collimator transforms the divergent beam emitted at the end of an optical fiber into a collimated one. It can be equipped with a variety of lenses, matching different fiber mode-field diameters and output beam sizes. The rugged, inexpensive collimator can be used for both FC/PC and FC/APC-type connectors. It can be easily mounted on post or into optical mounts (25 mm diameter).

Image

o MTF, then, boils down to calculating how much high-spatial-frequency content is in the image. Lens quality and setup (focus, etc) is an obviously dominant contributor, but the whole imaging system contributes. In the olden days of analog video connections, even cable quality could have a profound impact.