I explain my question with a simplified example.

I can design an industrial vision system for the automatic inspection of an item with these main requirements:

  1. the image of a good piece must be a black background and the piece must be grey.
  2. the defect must appear as a white area inside the grey area.

These requirements simplify a lot the software part of the system: in order to classify an item as defective the algorithm just counts the white pixels.

But in order to get this straightforward algorithm I have to be very good at designing the lighting/optical/mechanical part of the system and maybe that part will cost more than the software.

Maybe in the past I read a sentence like "do as much as possible with the mechanics and as little as possible with the software"; it seems to me it was in a book of the 1990s (or 1980s) about practical machine vision but I can't find the proper citation/reference.

  • $\begingroup$ If it's from the 80s or 90s it might no longer be true, though $\endgroup$
    – endolith
    Jan 8, 2013 at 21:56
  • $\begingroup$ @endolith Yes, it might be no longer true... but I am not looking for an absolute true, rather, for an influential (maybe just at that time) reference. $\endgroup$ Jan 9, 2013 at 10:09
  • 4
    $\begingroup$ Conversely, if you are making many many units, you cheapen the optics and employ heroic efforts in software to make up for it :) $\endgroup$ Jan 9, 2013 at 14:22
  • $\begingroup$ @MartinThompson Exactly! But the reference I was remembering about was in the opposite direction "a machine vision system should be 1% software and 99% optomechanics". $\endgroup$ Jan 9, 2013 at 14:28
  • 2
    $\begingroup$ The general issue is the same as any computer system: GIGO (garbage in, garbage out). The more you can do to improve initial image quality, the more you can get out of the post-processing. "Heroic efforts" are only viable if there is enough information there in the first place; that will really be very application dependent. I do not believe this has changed at all since the 80s / 90s as some imply. There may be improvements in terms of what you can possibly do, simply due to Moore's Law (more processing in a given time), but you're still better off starting with a good image! $\endgroup$
    – Peter K.
    Feb 1, 2013 at 2:31

4 Answers 4


I have found some "proverbs" like:

Never use software to compensate for a poor lighting system. It is not cost effective and will result in a poor system design.

It is cheaper to add a light-proof shroud to keep sun-light away from the object under inspection than to modify the software. Another universal truth which is often forgotten.

Nothing exceeds the speed of light. Any processing that can be done optically will save a lot of computer processing later.

in the book "Intelligent Vision Systems for Industry" by Bruce G. Batchelor and Paul F. Whelan and also in B.G. Batchelor and P.F. Whelan (1994), "Machine vision systems: Proverbs, principles, prejudices and priorities", Proceedings of the SPIE - The International Society for Optical Engineering, Vol. 2347 - Machine Vision Applications, Architectures, and Systems Integration III, Boston (USA), pp 374- 383. (see here http://elm.eeng.dcu.ie/~whelanp/proverbs/proverbs.pdf).

The proverbs are also in the 2012 book "Machine Vision Handbook", Editors: Bruce G. Batchelor ISBN: 978-1-84996-168-4.

  • $\begingroup$ Awesome. Thanks! I think I've read some of the proverbs book before--maybe I even quoted it in a presentation, years ago?--but I don't have a copy myself. $\endgroup$
    – Rethunk
    Mar 1, 2013 at 2:29

How to Find a Suitable Lighting? This will be the most important question of an engineer who has to select a right lighting set-up for the Machine Vision application. Probably he remembers some clever Machine Vision proverbs such as "better to light than write (software)", "avoid garbage in (bad lighting) that causes garbage out (bad result)", "create the BEST image first" and so forth.

Jahr, I., 2007. Lighting in Machine Vision in: Alexander Hornberg, ed. Handbook of Machine Vision. John Wiley & Sons, p.150.


I'm not sure I can find your quote, but I can mention a few books of the past 30 years that leaned at least somewhat toward the practical advice rather than toward the more purely theoretical/mathematical/snooty. (One of the more "theoretical" textbooks I've read simply regurgitated pages of math from an earlier textbook, complete with the exact same glaring typo.)

Digital Picture Processing by Rosenfeld and Kak is a classic. My editions of Volume 1 and Volume 2 have a copyright of 1982. Volume 1 covers more of the fundamentals of the mathematics & image formation, and Volume 2 digs into practicalities of segmentation, matching, etc.

Computer Vision by Ballard and Brown, also from 1982, is even today a useful reference for those who have to make a vision system work. This book is a bit friendlier in terms of presenting real images and also color plates. There are pseudocode algorithms and several useful formula (e.g. RGB to HSI color space). They make a number of useful practical points about the application of algorithms, and they might have written something similar to the quote you mention.

Applying Machine Vision by Nello Zuech was published in 1988. My later edition is named Understanding and Applying Machine Vision. Unlike the other books I mention, Zuech's book is more of a practical guide for engineers who have to specify, install, maintain, and possibly modify vision systems. The list price for Zuech's book is $200 on Amazon, but if you do a search you may find other sources. He has so many checklists, decision matrices, etc., that the book is great as a general reference. That book or something else Zuech wrote could have been your source.

Digital Image Processing by Gonzalez and Woods (1st edition 1992) is a commonly used textbook, and it's reasonably chatty in tone, although there's not much (that I remember) about system integration or lighting. Also check out their website http://www.imageprocessingplace.com/.

Machine Vision: Theory, Algorithms, Practicalities by E.R. Davies (1st edition 1990, 3rd edition, 2006) is one of the better textbooks examining the real work required to solve an application. The algorithms as a rule are the simpler ones, but Davies digs in and examines not only where an algorithm might be applied, but the practical results of doing so. That said, it's probably too recent to be your source.

Of all those, Zuech's book is most oriented to the practical assessment of a complete system. Even if he's not your source, it's good to have a copy of his work.

  • $\begingroup$ +1 Thank you very much! As an aside note: the first edition of Davies' Machine vision : theory, algorithms, practicalities was published in the 1990 (London : Academic Press, c1990) ISBN 0122060903. $\endgroup$ Mar 1, 2013 at 7:39

Two important rules should always be followed when designing inspection systems:

When designing the optical subsystem, try to reduce the demands on the image processor to a trivial level, by giving it the best possible images to analyse.

When designing the image processor, assume that it will not be possible to obtain images of the same quality in the factory as those produced in the laboratory. Never rely on a 'fragile' algorithm.

It is almost always cheaper to improve the lighting than the image processing. The effects of varying the lighting can be quite spectacular.

Batchelor, B.G., 1985. Lighting and Viewing Techniques, in: B.G. Batchelor, D.A. Hill, D.C. Hodgson, ed. Automated visual inspection. IFS (Publications) Ltd, UK North-Holland. p.104.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.