OpenCV for PicSight GigE and Smart GigE Cameras

OpenCV (http://opencv.willowgarage.com/wiki/) is a free software library that contains over 500 different image processing functions. For OEMs and projects that use multiple smart cameras, the open source library can be a cost effective alternative to commercially available packets.

 

History

Initially OpenCV (Open Computer Vision) was developed by IBM under the name IPL (Image Processing Library). Later the source code was released as OpenCV. Since then, a company named Willow Garage takes care of OpenCV whereas many other companies, universities and free developers contribute to the development with lots of improvements, new functions and interfaces.

 

Scope

The over 2500 optimized algorithms contain over 500 functions for general image processing but also for more specialized tasks, such as contour matching, segmentation, transformation, geometric descriptors, matrix math, camera calibration, stereo and 3d, gesture recognition, etc. OpenCV also offers basic GUI components (HighGui), which are mainly used for development and testing of applications, and image acquisition interfaces for some cameras and framegrabbers. Besides OpenCV's built in functions, complementary third party modules are available (e.e. BLOB analysis or code reading).

 

Documentation and Support

OpenCV has a good and comprehensive documentation which is completed by the freely available source code. This allows to analyze parts of the package more deeply in order to gain a better understanding of what they do and how they do it. Besides that, there is a very busy user-group with over 40.000 developers (http://tech.groups.yahoo.com/group/OpenCV/).

 

Licensing

OpenCV is released under the BSD license which allows to use the library freely for academic purpose, as well as for commercial projects. This makes OpenCV particularly interesting for projects in which no budget is left for license fees or in which many licenses would be needed, for instance when multiple intelligent cameras are used.

 

Advantages and Disadvantages for OEMs

Advantages Disadvantages
No license fees No commercial support
Mature library Partially missing algorithms for industrial applications (e.e. bar-code reading)
Many supported platforms No graphical development tools
Source code freely available No GigE Vision support in HighGui
Well documented  
Widespread / many code samples  
Large, busy community  
BSD license (commercially usable)  
Optimized code  


OpenCV Support for Leutron Vision Cameras

Leutron Vision cameras are GigE Vision and/or GenTL compliant. Unfortunately, OpenCV does currently not have an own interface to those standards. Therefore the (very simple) image acquisition from GigE Vision cameras with HighGui is currently not available.

With the Simplon Software Development Suite, Leutron Vision offers a comprehensive toolbox that supports the development for applications that run on a host PC, as well as on a smart camera.

 

Leutron Vision Image Acquisition Interface

Modern GigE Vision cameras offer a multitude of functions. The parameters for those functions are most often controlled over the generic GenICam standard. For more sophisticated image processing projects, one is well advised to use a GigE Vision interface for image acquisition instead of OpenCV's HighGui library. The image data can be accessed through an OpeCV image header.

The Simplon Software Developer Suite contains a tool named Simplon Explorer. The purpose of this tool is to edit camera settings and to display the camera's images. In addition, Simplon Explorer contains a code generator which can create code samples for different applications. Among the included code templates are examples for applications using OpenCV.

 

OpenCV on PicSight Smart GigE Cameras

PicSight Smart GigE cameras work with a Philips Nexperia PNX 1500 Processor with a TriMedia TM3260 CPU which is clocked at 300MHz.

Programming is done in C/C++ on a Windows PC with a TriMedia cross-compiler in a Cygwin environment.

Leutron Vision offers a SDK which contains the compiler and necessary libraries for camera control and communication over GigE Vision/GenICam with a Host PC.

As image processing library, the compiled and executable OpenCV libraries are contained. Only the HighGui is not supported, because the smart camera is an embedded device without GUI.

Image data can be accessed through a generated image header for the image buffer that is delivered by the camera. This means that there is no need for time consuming copying of image data, and OpenCV works directly with the original buffers.

 

Performance of Sample Algorithms on a PicSight Smart GigE

OpenCV Algorithm Execution time (1024x768 Pixel)
cvNot() 5.7ms
cvThreshold() 18.3ms
cvEqualizeHist() 54ms
cvErode() 87ms
cvCanny() 475ms

Development and Testing on a PC – Executing on a Smart Camera

The cameras API for image acquisition on a host PC (smart camera works as normal GigE-Camera) and for acquisition on the smart camera is very similar and offers the same GenICam set- and get-functions. Therefore, applications are mostly source compatible – that means, they can be used on the PC, as well as on the smart camera, with only minimal effort. This simplifies development and debugging OpenCV applications substantially, because the major part of the work can be done a PC, before compiling the project for the smart camera. Tests on the host can be done in real time, because PicSight Smart GigE cameras have a very fast GigE Vision interface and can also work as normal GigE Vision cameras (the majority of smart cameras in the market are only equipped with Fast Ethernet).  

 

Summary

With OpenCV, there is a well-tested and powerful open source library available, that can also be used in commercial projects.

The combination of PicSight Smart GigE cameras and powerful OpenCV image processing allows for the cost effective realization of customer specific image processing solutions.

The starting price of 640 € for a smart camera with 752 x 480 px CMOS sensor is in the same area as the price for intelligent sensor systems.