Dan Davis

Industrial Grade Machine Vision - Part 1

Introduction

While there's a lot of material out there about building software using things like webcams, ip security cameras, or raspi/arduino addon cameras. There's a lot less info about using dedicated machine vision cameras in your applications. The goal of this series is to create the starting point I wish I would have had when I was learning. I'm not going to cover specific computer vision algorithms or things like machine learning. For that I would recommend this textbook. Rather I'm going to cover the more traditional engineering and deployment aspects like:

Why Use a Dedicated Machine Vision Camera

Machine vision cameras have a global shutter while webcams, phones, and IP cams have a rolling shutter. Of course they're digital cameras so it's not a physical shutter but the difference is that with a global shutter you're capturing the entire scene at a single instant in time while a rolling shutter scans the scene from top to bottom or left to right. This means that with a rolling shutter different parts of the scene are captured at different times which can cause all kinds of skewing and distortions.

From a few centimeters to hundreds of meters, you can achieve incredible detail no matter the distance to your subject with the right lens.

Selecting a Camera and Lens

You almost certainly want a camera that implements the GenICAM protocol, and in fact you'll have a hard time even finding one that doesn't.

It's way beyond the scope of this post to explain all of the factors that go into choosing a camera and lens to meet your specific goals. This detailed guide is where I would recommend you start.

An Aside on Ethernet Cables

If you decide to go with a GigE (PoE) camera you need to be careful about your cabling. Most ethernet cables made today are poor quality copper clad aluminum (CCA) and not even rated for POE. I can tell you from first hand experience that using the wrong cables will be nothing but trouble. Spend the money for high quality solid copper cables!

Libraries

The camera manufacturer usually has their own SDK for developing applications with but if you're just getting started I would recommend using the Aravis library. It's open source, under very active development, and supports all GigE and USB3 cameras that meet the GenICAM spec so you have the freedom to use different cameras with the same code. Aravis also has great gstreamer support which I've found is the best way to construct complex video processing pipelines.