Imaging Boards and Software

Machine Vision Software: Real-time operating systems target machine vision applications

Learn more about how developers of  real-time operating systems are working closely with vendors of machine vision software to meet the constraints imposed by high-performance machine vision systems.
June 5, 2015
4 min read

In many high-speed industrial applications, it is critical that images are captured, processed and the results used to actuate pass/fail mechanisms within a specific time period. To ensure this can be accomplished, operating systems (OSs) such as Windows cannot be used since they contain internal mechanisms that introduce unbounded delays and thus are unpredictable.

To meet the constraints imposed by high-performance machine vision systems, developers can opt to employ real-time operating systems (RTOS). Unlike OSs such as Windows, these RTOSs allow designers to accurately predict system jitter - the time to accept and complete tasks such as image capture, processing and I/O control. While such operating systems can be used for such tasks, they are often used in conjunction with general-purpose operating systems such as Windows. This allows developers to implement functions such as graphical user interfaces using off-the-shelf development packages while at the same time leveraging the power of the RTOS for time critical operations.

Kithara's RealTime RTOS Suite uses a separate scheduler within the kernel of the RTOS to decide which image processing task should be executing at any particular time.

Key to the development of any RTOS is the development of an efficient scheduler that allows interrupt latency and thread switching latency to be minimized while increasing the response time of the system. To ensure this is achieved, developers of such real-time operating systems are working closely with vendors of machine vision software.

Last year, for example, Matrox Imaging (Dorval, QC, Canada; www.matroximaging.com) announced that its Matrox Imaging Library (MIL) can now run on under the RTX64 RTOS from IntervalZero (Nice, France; www.intervalzero.com). Using MIL and RTX64, guidance, inspection and identification applications can be deployed such that the demanding vision and control functions run in RTX64's deterministic environment while the rest of the applications, such as the HMI and archiving operations, run in a Windows environment on PCs. Through a separate scheduler, IntervalZero's RTX64 software transforms the Windows general-purpose OS into a RTOS that runs on x64 multicore hardware. The RTX64 scheduler enables embedded real-time applications to directly access 512GBytes of addressable physical memory available using 64-bit Windows.

Kithara (Berlin, Germany; www.kithara.de) recognized and presented the benefits of leveraging RTOSs with off-the shelf machine vision software as early as 2011. At this year's Automate show, held in Chicago, the company demonstrated how its RealTime RTOS Suite could be used in conjunction with the HALCON machine vision package from MVTec Software (Munich, Germany; www.mvtec.com).

Similar to other RTOSs, the RealTime RTOS Suite uses a separate scheduler within the kernel of the RTOS to decide which image processing task should be executing at any particular time . Like IntervalZero, this kernel can operate in conjunction with Windows allowing HMI, archiving and other non-critical tasks to be rapidly developed.

When used to track a spinning top using HALCON under Kithara's RealTime RTOS Suite, 400fps images could be processed with a maximum processing time of 2.1ms.

"After a developer loads both Windows, RTOS and the HALCON package onto the PC," says Uwe Jesgarz, Managing Director of Kithara, "function calls from HALCON that would normally be interpreted by the Windows operating system are intercepted by the RealTime RTOS and forwarded to a real-time thread created." To further speed system performance on multi-core systems, separate dedicated cores can be run exclusively with the RealTime RTOS in parallel to Windows, thus avoiding any interference.

To demonstrate this performance, Kithara demonstrated a system at Automate that was being used to track a spinning top. Images were captured using two 400fps acA1300 Gigabit color camera from Basler (Ahrensburg, Germany, www.baslerweb.com). For comparison, images from the first camera were captured and tracked using a stand-alone Windows 64-bit OS while those from the second were processed running HALCON under the RealTime RTOS Suite. At 400fps, the system was required to process each image in 2.5ms.

With the tracking algorithm running under Windows on an i7-based processor, the minimum time required to perform image capture, processing and display was 2.1ms. "However, the maximum time taken could be as long as 30-100ms, making the system unsuitable for such an intensive image processing task," says Jesgarz. When the same algorithm was run using HALCON under Kithara's RealTime RTOS Suite, the minimum processing time was reduced to 1.7ms while the maximum processing time was 2.1ms. This is fast enough so that image processing is performed in real-time." A video can be found at http://bit.ly/1JqH0jt.

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!