Camera USB Vidgear
This function block provides a flexible USB camera input for live image capture. Use it to scan, select and configure USB cameras, then stream frames into your processing graph. It is designed for continuous capture with simple controls for activation, release and resolution management.
π₯ Inputs
Activate Signal Activate the camera and start returning frames (input socket)
Release Signal Release the camera and free resources (input socket)
π€ Outputs
Image Any Current camera frame (output socket)
πΉοΈ Controls
Scan Connected USB Cameras Scan the system and list available USB cameras
Select USB Camera Dropdown to choose which detected camera to use
Camera Resolution Dropdown to choose a preferred capture resolution
Current Resolution Label showing the active resolution returned by the camera
Open Advanced Setting Opens the camera vendor/system settings dialog when available
Message Area Inline status messages and errors shown to the user
π¨ Features
Live USB camera capture suitable for production and testing scenarios.
Easy discovery: scan and pick from connected cameras without leaving the interface.
Resolution control: select common resolutions and the block shows the actual active resolution.
Start / stop behavior via
Activate SignalandRelease Signalto manage resources.Graceful handling of temporary stream problems: the block preserves the last good frame, shows informative messages, and will attempt to recover the stream if possible.
Optional background frame uploader support for asynchronous export or logging (if configured in your environment).
Visual feedback: current status and helpful messages are displayed in the block UI.
βοΈ How it runs
Click
Scan Connected USB Camerasto populate the camera list, then choose a camera fromSelect USB Camera.Use
Camera Resolutionto request a preferred width/height; theCurrent Resolutionlabel shows what the camera actually set.When
Activate Signalis provided the block starts returning frames on theImage Anyoutput. If the signal is not active, the block continues to hold and return the last captured frame.When
Release Signalis provided the block stops the camera and frees the resource; the last available frame is still returned until the camera is reactivated.If the block encounters repeated blank/corrupted frames or a stream error, it will display an error message and attempt to recover or restart the camera automatically. This prevents silent failures in live scenarios.
π Usage Instructions
Click
Scan Connected USB Camerasto detect cameras.Choose the desired camera using
Select USB Camera.Optionally select a resolution from
Camera Resolution.Send a
Activate Signalto begin receiving frames from theImage Anyoutput.Send a
Release Signalwhen you no longer need the camera to free the device.
π‘ Tips and Tricks
Preview live frames by connecting the
Image Anyoutput to theShow Imageblock for immediate visual feedback.To log or save frames, connect the
Image Anyoutput toImage Logger,Image WriteorRecord Video.If you need faster processing and can accept lower fidelity, insert
Image Resizebefore heavy processing to reduce compute load.Improve detection robustness by inserting simple preprocessing such as
Blur,Denoising, orAuto Contrastbetween the camera output and AI blocks.For targeted analysis use
Image ROI SelectorImage ROI Polygonto crop the scene before detection.Combine with AI blocks like
Object Detection,Mask Detection,Pose EstimationorObject Detection - Customto build inspection or analytics pipelines. For tracking useObject_Detection_Trackerafter an object detection block.To publish results to external systems, route derived numeric/text outputs to
MQTT PublishorREST API - Postblocks.If you see repeated black frames, try re-scanning the camera list or toggling the
Release Signalto force a restart of the selected camera.
π οΈ Troubleshooting
No cameras listed after scan: confirm the camera is connected, powered and not exclusively used by another application. Re-scan after reconnecting.
Camera fails to start or stream: check the selected camera in
Select USB Cameraand try a different resolution inCamera Resolution. UseRelease Signaland then re-activate.Intermittent black or corrupted frames: the block keeps the last good frame to avoid gaps; if the problem persists, re-scan and re-select the camera or try a different USB port.
Advanced camera controls not available: some camera vendor dialogs are platform-specific. Use the blockβs resolution options or the cameraβs system tools when advanced settings are required.
π Example combinations
Live monitoring:
Camera USB Vidgear->Show Image.Recording and post-analysis:
Camera USB Vidgear->Record Videoand/orImage Logger; then feed recorded frames intoFind ObjectorHistogram On Line.Inspection pipeline:
Camera USB Vidgear->Image ROI Select->Object Detection->Object_Detection_Tracker->Image Write.
Use these combinations to build robust, real-time computer vision flows without touching implementation details.
Last updated
Was this helpful?