Cognex are known for their smart cameras, especially the In-Sight series of cameras which are fully self-contained with on-board image processing functionality. A lesser known aspect of Cognex’s offering is the VisionPro image processing library which targets PC-based applications. This article reviews the concept of smart camera vs PC-based architectures and gives an overview of the Cognex VisionPro tools.
Smart Camera vs PC-based
Referring to the image below, the VisionPro tools are applied in the ‘dumb’ camera scenario where the camera acts purely as an image acquisition device and the processing is performed on a separate, standalone PC.
Cognex’s smart cameras on the other hand, which process the image inside the camera, are configured using the In-Sight Explorer client, covered by a previous blog article. There are three main reasons for adopting the PC-based approach:
- When more image processing customization is required. Smart cameras are very practical however the extent to which the on-board image processing algorithms can be programmed tends to be limited compared to the PC-based approach. Cognex’s tools are no exception to this rule – VisionPro’s programming interface provides more customization options than In-Sight Explorer.
- When more processing power is required. Applications which are high speed and/or demand a heavy image processing workload can exceed the processing power of a smart camera. Moving to a PC-based architecture enables more powerful processing hardware to be applied.
- When multiple cameras are required. Smart cameras are especially cost effective in simple, single camera applications. In multi-camera systems however, considering the relatively high unit cost of smart cameras, PC-based architectures become more cost effective.
VisionPro image processing tools
The core VisionPro image processing library is a set of ‘conventional vision’ tools. The term ‘conventional vision’ refers to tools which do not use Artificial Intelligence based techniques such as Machine Learning and Deep Learning. Cognex’s AI-based vision tools are part of the ViDi suite of products, which is sold as an additional license.
The conventional image processing tools within VisionPro address the full range of industrial vision tasks including pattern matching, measurement, counting, optical character recognition and robot guidance. Notably, VisionPro contains Cognex’s range of ‘Max’ image processing algorithms including PatMax, LineMax, OCRMax and OCVMax.
VisionPro development workflows
There are three overall workflows to choose from when developing with VisionPro:
QuickBuild and Application Wizard
The VisionPro QuickBuild tool is a desktop graphical interface for configuring image processing tools. Tools such as PatMax are dragged & dropped from the library and configured with graphical windows without the need for programming.
The output of the QuickBuild application is a .vpp file (VisionPro persistence file), which captures the image processing tool configuration settings. Note that the QuickBuild application is purely focused on configuring image processing tools – it does not provide a means of creating an operator user interface or an executable. In order to generate a complete deployable application, including an operator user interface, the .vpp file is opened with the Application Wizard tool. The Application Wizard tool provides a graphical workflow to wrap the image processing tool configurations defined in the .vpp file with an operator user interface.
The output of the Application Wizard tool is an application executable which can be ran. Optionally, .NET source code can be generated (C# or VB.NET) which can be imported into Visual Studio and further customized.
The advantage of using QuickBuild and the Application Wizard is speed and simplicity – a full vision application can be developed without any programming. The downside of this approach is the relatively limited set of configuration options available, both for the image processing tools and the operator user interface.
Quick Build and Visual Studio
Referring to the previous section, an alternative workflow which provides more customization possibilities is to skip the Application Wizard step and import the .vpp file generated by QuickBuild directly into Visual Studio. A WinForms (Windows Forms) project is setup in Visual Studio to provide the application framework. Other application frameworks can be used, such as WPF (Windows Presentation Foundation) however VisionPro provides a set of pre-defined user interface controls which are only compatible with WinForms. The pre-defined WinForms controls speed up development of the user interface by providing edit controls for each of the VisionPro tools.
The QuickBuild and Visual Studio approach allows the developer to firstly concentrate on the image processing aspects alone (in QuickBuild), without worrying about programming. Once the image processing portion of the workflow is completed within QuickBuild, the developer can lever the power of Visual Studio to fully customize the application logic and operator user interface. This approach of course requires .NET programming skills.
Visual Studio alone
The third and final approach is to build the application from scratch in Visual Studio, using the .dll files provided with VisionPro. A .NET project is created in Visual Studio and the necessary .dll files are referenced in the Visual Studio project to give access to the VisionPro tools. This approach provides considerably more customization possibilities than QuickBuild and the Application Wizard but requires strong skills in C# and/or VB.NET.
Platforms and Interfaces supported
VisionPro targets Microsoft Windows operating systems. Linux support is not provided and this is unlikely to be provided in the future given that the VisionPro tools target .NET Framework, which is Windows-only.
In principle, VisionPro supports all camera interface protocols including USB3 Vision, GigE Vision and Camera Link. In practice, compatibility issues can arise with 3rd party components such as frame grabbers. To assist compatibility, some 3rd party component vendors provide adapter libraries to ensure correct operation with VisionPro.
Despite the introduction of the ViDi suite of tools, Cognex’s VisionPro library remains their flagship product for PC-based vision. VisionPro is a comprehensive ‘conventional vision’ library which can be supplemented with ViDi to add Deep Learning capability. Graphical tools are provided for simple application development, which can be customized using Microsoft Visual Studio.