Camera USB External
This function block connects to an external USB camera by device index and provides flexible controls for resolution, exposure and live frame streaming. It is suitable for automation and production setups where camera index, resolution and exposure are driven by other blocks or external signals.
π₯ Inputs
Activate Signal Use this boolean to start retrieving frames from the selected camera.
Release Signal Use this boolean to stop the camera and release its resources.
Camera Index Provide an integer to select the camera device (device index or scanned index mapping).
Resolution Width Provide an integer for the desired capture width.
Resolution Height Provide an integer for the desired capture height.
Scan Cameras Set to true to rescan connected USB cameras and refresh available device list.
Set Exposure Optional numeric value to set manual exposure on the camera when supported.
Set Auto Exposure Optional numeric value to set the camera auto-exposure mode when supported.
π€ Outputs
Camera Frame The latest captured image frame from the selected USB camera.
πΉοΈ Controls
Source / Resolution Info A status label that shows current camera source and active resolution.
Note: Many controls are provided as input sockets so the block can be driven by other blocks or UI controls.
π― Features
Camera selection by device index or scanned list mapping, suitable for multi-camera systems.
Runtime resolution change using separate width and height inputs.
Manual exposure and auto-exposure control when the camera and platform support them.
Soft restart behavior: the block attempts to recover from blank or failed frames by restarting the camera automatically.
Optional background frame uploader (if configured in the system) to stream frames for remote logging or analysis.
Designed for headless or automated workflows because most settings are available via inputs.
βοΈ Running mechanism
When
Activate Signalis true the block attempts to deliver frames viaCamera Frame.When
Release Signalis true the block stops capture and frees camera resources.Changing
Camera Indextriggers the block to open the chosen device.Providing
Resolution WidthandResolution Heightwhile active will attempt to change the capture resolution.Providing
Set ExposureorSet Auto Exposurewill attempt to adjust camera exposure settings if supported by the device.If the block encounters repeated blank or failed frames it will perform a restart cycle to recover the camera automatically.
If
Scan Camerasis activated the block refreshes the available camera list (useful when plugging in new devices).
π Usage instructions
Use
Scan Camerasor your system's camera discovery to list available devices.Provide the desired device index to
Camera Indexto choose a camera.Optionally set
Resolution WidthandResolution Heightfor the capture size you want.Send
Activate Signalto begin frame capture. MonitorSource / Resolution Infofor current state.Adjust
Set ExposureorSet Auto Exposureonly if your camera supports these controls.Send
Release Signalwhen finished to free the device.
π‘ Tips and Tricks
To preview frames live, connect this block's
Camera Frameoutput to theShow Imageblock for an interactive viewer.To save frames or create a dataset connect
Camera Frameto theImage LoggerorRecord Videoblocks.If the camera produces noisy frames, try sending frames through
BlurorDenoisingbefore passing them to detectors.Resize high-resolution captures before heavy processing to improve speed: connect
Camera FrametoImage Resizethen to downstream analysis blocks.For region-based analysis, crop the frame using
Image ROI Selectbefore running detectors such asFind ObjectorObject Detection.Combine with AI blocks like
Object Detection - CustomorSkeleton Estimationfor live inference pipelines.Use
Scan Cameraswhen hot-plugging cameras so the block can discover new devices without restarting the whole system.
π οΈ Troubleshooting
No frames or black/blank frames:
Verify the correct integer is provided to
Camera Index. If unsure, run a scan withScan Cameras.Make sure no other application is using the camera. Release or close other apps and try again.
Try lower resolution values via
Resolution WidthandResolution Heightβ some cameras cannot stream high resolutions reliably.
Exposure controls have no effect:
Not all cameras or platforms support programmatic exposure control. If settings do not apply, try the camera vendor utility or use the block's Info label to confirm current values.
Intermittent frame drops or failures:
Try using a different USB port or a powered USB hub. Use lower resolution to reduce bandwidth.
If automatic recovery does not help, toggle
Release SignalthenActivate Signalto force a full restart.
Camera not detected on scan:
Ensure the device is powered and connected. Re-plug the camera and enable
Scan Camerasagain.On some systems device indexes may change after reboot or re-plugging β use the scan list mapping to select reliably.
If issues persist, preview frames with Show Image and capture a short recording with Record Video to inspect the behavior and share with support.
Last updated