Simple vs. Not-So-Simple: When will real-time control applications for vision work? — Part I

Algorithms Designed to Spot a Nail or a Bottle Cap or an Asparagus Spear Must Make Assumptions About What Those Objects Look Like

By Ned Lecky

Ned LeckyIn addition to consulting on vision and embedded-system design, we own several rental properties, and while much of the renovation work is carried out by skilled, local craftsmen, the need to blow the cobwebs out of my brain once a day keeps my hand in the “delivery” end of property management—carpentry, sheetrock work, plumbing, wiring and painting.

As I contemplated writing this column, I drove another nail into a piece of pine trim and felt the nail speed slow and twist through various layers of 100-year-old wallpaper, plaster and lath. I also did what I often do in my work: I imagined how I’d design a vision system to perform the same task using the same tools.

I couldn’t do it. That task is as unachievable today as it was when I started programming robots as a college student in 1982. Fifteen years later, I wrote a Ph.D. dissertation on cognitive computing architecture, a topic that always interested me because I believe until we have thinking and reasoning computers that truly understand and analyze situations, complex real-time control systems based on vision or any other sensor technology are out of reach.

But there are practical, simple, real-time control applications for vision. The trick is to know what makes one simple and another not-so-simple.

This month and next I’d like to share some of the practical ways I’ve found to tell the difference between the doable and the lunatic fringe.

In vision applications, image quality and consistency determine success. While a high-quality camera with proper optics is very important, there are three aspects of image consistency before the image ever hits our camera that are much more critical to practical vision system success.

Consistency is everything. Every nail needs to be a nail. Specifically, it needs to be a #8 finishing nail, not a 16-penny common nail, not a carpet tack, not a rusted #8 finishing nail, either. Algorithms designed to spot an object make assumptions about what those objects look like. Violate the assumptions and your algorithm fails.

If we design for backlighting and use silhouette edges, then we always need backlighting. If we use combination lighting to highlight certain features, then we always must have that same lighting from the same orientation of the object. Lighting spectral content—LED, IR, incandescent, fluorescent, black light—is particularly important because objects are wavelength-dependent photon reflectors and can have markedly different appearances under different lighting conditions.

If we expect a clean background and extraneous objects appear suddenly behind our object, our algorithms are likely to be confused. Extraneous light or shadows can be equally damaging.

These requirements seem counter-intuitive—human cognitive vision processing is designed to tolerate huge variation in these areas. This difference is the key to any successful vision solution.

If you can get a consistent image, the next question is how to process and analyze the image. We are limited to programmable computers that only do what we tell them to do.

As a Ph.D. EE, I have an unhealthy love for DSP algorithms, two-dimensional signal processing, convolution, morphology, Fourier transforms, LaPlace and Z transforms, FIR and IIR filters and other traditional image-processing algorithmic paraphernalia. But an algorithm that uses carefully crafted, multi-step sequences of these image manipulations almost always relies on unwritten assumptions about those image consistency factors. Change one or any of them very much and the carefully crafted recipes fail. Ninety percent of the machine-vision solutions I’ve seen demonstrated successfully in the lab do not succeed for more than five minutes on an actual manufacturing line or in a real machine. Edge finding, blob counting and straightforward metrology algorithms are amazingly robust. Scratch or blemish grading, surface finish inspection and more qualitative measures generally are not.

Next month, I want to spend some time discussing the reliability of real-time systems and review some real-world applications.

Ned Lecky is an ME and EE with 25 years of experience in control systems and machine vision. As owner of Lecky Integration, he consults for OEMs, system integrators and machine vision providers.


Want More

Read: When is real-time vision realistic? — —Part II