Cameras and Accessories

GenICam: In the Engine Room of Machine Vision

The goal of GenICam (Generic Interface for Cameras) is to provide a generic programming interface for all kinds of machine vision devices. We provide an overview of the standard in this article.
Nov. 3, 2023
6 min read

The GenICam standard, hosted by the European Machine Vision Association (EMVA), is easy to overlook despite being a key standard in machine vision. This is a brief look inside the "engine room" of machine vision.

Age of Steam

In the early days of industrial machine vision (in the 1980s), the choice of components was quite limited. A typical system would consist of an analog CCD camera and a frame grabber card connected by a coaxial cable. Configuration, if at all necessary, could be accomplished with a few small DIP (dual inline package) switches.

Later, in the 1990s and 2000s, digital interfaces were added to the mix. Many began as components in consumer products and were soon adapted for machine vision. Digital devices allowed more sophisticated data processing than analog cameras, which created a host of new options for configuration and control. Register layouts were specified for some popular interfaces (like FireWire or USB) to ensure interoperability, but the machine vision market wanted more flexibility, so it ended up with at least a dozen vendor-specific APIs for a while.

Standardization

It was obvious that too much vendor-specificity was a waste of precious resources. Therefore, in the early 2000s, the machine vision industry set out to standardize new interfaces for better interoperability between cameras and PCs. In the following years, interfaces like Camera Link, GigE Vision, USB3 Vision, CoaXPress, and others were defined.

However, a piece of the puzzle was missing: How would the feature set of a machine vision device be represented across all of these interface standards? How could we make devices interoperable, while at the same time giving manufacturers the freedom to compete?

GenICam

The solution was GenICam, or in its graphical form: GEN<i>CAM. In a joint cooperative effort of industry leaders and smaller companies, hardware and software vendors, the first version of GenICam was released in 2006.

The angle brackets in the name are a hint at the underlying idea to describe the device’s feature set with an XML file, a markup language for storing and sharing data.

GenApi

For a basic vision device, the XML file has three main functions:

•   It describes the features of the device at an application-friendly level of abstraction. Each feature is listed with a unique name and its data type. You can also find a helpful description, the unit, or how the feature is related to other features.

•    It describes the low-level interface of the device. The assumption is that devices are configured though a set of addressable registers.

•   It provides a dataflow graph that translates between the application-level and the low-level interface.

More complex devices may also include how to interpret messages from the device to the application and a few other items. However, the key idea is always the same: Translate between a vendor-specific low-level interface and a more general, high-level application interface. Because it is so generic, and because it describes an API, the XML part of GenICam is called GenApi.

Reference Implementation

However, a standardized interface description alone isn’t much help when it comes to using a vision device. In theory, one could write a code generator or an interpreter for the XML text, but who wants that burden in at a time when entire operating systems come for free?

A free-of-charge library was needed, and the Reference Implementation was born. For convenience, it is distributed in binary form for several operating systems and processor architectures.

Standard Features Naming Convention (SFNC)

With both a machine-readable feature description and the software to interpret it, the only thing missing was a common understanding of how the standard functions of vision devices are supposed to work. As an example: Most industrial video cameras offer a way to choose the image size and orientation. But should the feature be called “Image Size,” “Area of Interest,” or “Region of Interest”? Should the image be flipped before or after the corners of the image are set?

These questions are answered in the “Standard Features Naming Convention,” or SFNC for short. The SFNC can be thought of as the condensed experience of the machine vision devices industry. It promotes a high level of interoperability, while at the same time allowing the freedom to add new functions as needed or to create fully customized solutions.

Additional Modules

During the following years, the original specifications and implementations were improved and additional specifications added, to complement the existing ones.

The best-known is probably GenTL, short for generic transport layer. If you've (for example) used a frame grabber in combination with a third-party image processing software, it is quite likely that GenTL provided the plug and play magic to make both seamlessly work together.

A lesser-known module is the generic control protocol, or GenCP for short. GenCP defines a standardized way to speak with a machine vision device, so new standards don’t need to re-invent the wheel. USB3 Vision and CoaXPress are the best-known standards based on GenCP.

The latest addition is GenDC, which stands for ‘Generic Data Container.’  GenDC defines a unified way to describe anything from simple single-component images to the most complex multi-component formats.

New Release

The existing standards of the GenICam standards family are in a mature state, but all parts are under constant maintenance. Just recently, version 3.4.1 of the reference implementation was released as part of the 2023.07 GenICam package release.

The most anticipated improvement was probably the support for Python versions 3.8 to 3.11. In addition, the Python package is now available for Linux systems that run on ARM processors.

Apple macOS users may like the new universal binaries, which make it easier to deploy software for different generations of hardware.

Of course, a few errors were corrected as well. Details can be found in the official release-notes file.

And, last but not least, the code was optimized to reduce the number of third-party licenses referenced by the various GenICam modules.

Future

The GenICam Working Group is currently focused on two main extensions to the standard: Validation and Generic Feature Access. A validation tool (preview available in the 2023.07 GenICam package) will make it much easier and less error-prone for users to check their work against the standard.

The idea behind Generic Feature Access is to standardize an API on top of the GenApi reference implementation to allow alternative implementations. These could, for example, be optimized for a certain application and therefore be very lightweight.

Conclusion

I hope this quick tour of the engine room of machine vision caught your interest. If you want to learn more, please have a look at https://www.emva.org/standards-technology/genicam/. This is where you can also find information about how to join the GenICam standard working group.

About the Author

Michael Schmidt

Michael Schmidt leads a camera development team at Basler AG (Ahrensburg, Germany). He also chairs the GenICam Working Group, which is hosted by the European Machine Vision Association (Barcelona, Spain). 
Sign up for Vision Systems Design Newsletters

Voice Your Opinion!

To join the conversation, and become an exclusive member of Vision Systems Design, create an account today!