Parallel Usage of Multiple Cameras

<< Click to Display Table of Contents >>

Navigation:  HowTo's > Multithreading >

Parallel Usage of Multiple Cameras

This topic explains how to use two cameras independently by running commands in separate execution nodes.

Please read the topics Opening a Camera and Grabbing 3D Data first.

Note: Rendering commands like RenderPointMap and RenderView use a single OpenGL context and therefore will be internally serialized and run sequentially, also when executed from separate Execute nodes. As these commands also have a single, global output node it is recommended to run at most one instance of each at a time.

Code Examples

Multi Threaded

Note: The code of the two threads only differs in the first two lines which specify a different execution node "thread1" or "thread2" and different camera serial number "1234" or "2345" to operate on.

hmtoggle_plus1C++
hmtoggle_plus1Halcon/HDevelop