Video Processors
USB Camera
Camera Block Diagram |
The Camera HAL captures images from a USB camera for general subject behavior
monitoring. Frames are captured, stored to disk and timestamped in the data
block. Camera frames are saved as a DIVX-encoded AVI file in the same folder as
your data block, in the form {TANK}_{BLOCK}_{HalName}.avi
. The frame numbers
are stored in the data tank as epoch events. The AVI file can be used with the
OpenScope Video Viewer and annotation tools.
Only USB cameras that support OpenCV direct operating system camera drivers can be used with the Camera HAL in Synapse. Many industrial cameras (e.g. Basler) don't provide standard driver interfaces for the operating system. Consider the iV2 module for higher frame rate and precisely timed acquisition.
Synapse supports up to two cameras per Rig and frame rates up to 20 fps. For best practice when using two cameras, keep cameras on separate USB Buses. Typically, PCs use separate buses for rear and front accessible USB inputs.
Important
Frame rate is controlled by a software timer and is prone to jitter. For real-time synchronized video capture, use the iV2 module.
Adding the HAL
Cameras are not automatically detected in the Synapse Rig Editor and must be manually added. To add a camera:
-
Click Menu, then Edit Rig.
-
In the Rig Editor, Right-click your system's processor (such as RX or RZ devices), then click Add Cam.
-
Click OK to close the Rig Editor and update the Processing Tree.
Camera Options
Camera Options |
Runtime Interface
The runtime tab displays the raw camera video for online monitoring. Please note that high-demand user interface tasks, like resizing windows, can increase jitter.
Runtime Plot with Camera Set to 5 Frames per Second |
A subplot is also added to the main runtime multiplot to preview the frame index alongside other plot data.
Improving Performance
If you are having problems with things like dropped frames, we recommend installing the camera drivers to get access to more settings and controls for your camera. Some features like auto-adjust and "RightLight" can cause problems like increased jitter and dropped frames.