> For the complete documentation index, see [llms.txt](https://docs.augelab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.augelab.com/function-blocks/blocks-reference/input-output/image-inputs/camera-usb.md).

# Camera USB

This function block connects to USB cameras attached to your computer and provides live frames for processing or visualization. Use it to select a camera, change resolution, and control when the camera is active or released.

## 📥 Inputs (sockets) <a href="#inputs" id="inputs"></a>

`Activate Signal` — Boolean input to enable frame retrieval. When not active, the block will hold and return the last captured frame.

`Release Signal` — Boolean input to stop and release the camera resource.

## 📤 Outputs (sockets) <a href="#outputs" id="outputs"></a>

`Camera Frame` — Live frame image from the selected USB camera.

## 🕹️ Controls <a href="#controls" id="controls"></a>

`Scan Connected USB Cameras` — Button to discover and list USB cameras attached to the system.

`Select USB Camera` — Dropdown to pick which connected camera to use.

`Camera Resolution` — Dropdown to choose a target capture resolution supported by the camera.

`Current Resolution` — Read-only label that shows the resolution currently used by the camera.

`Open Advanced Setting` — Button that opens the camera vendor settings window (when available on the platform).

## 🎯 Key features <a href="#features" id="features"></a>

* Easy discovery and selection of multiple USB cameras.
* On-the-fly resolution selection with visible current resolution.
* Activate/release control to free camera for other apps.
* Protection against corrupted or blank frames with automatic retries.
* Works well as a live image source for downstream processing or saving workflows.

## 📝 How to use <a href="#usage" id="usage"></a>

1. Click the `Scan Connected USB Cameras` button to populate the camera list.
2. Choose the desired camera from `Select USB Camera`.
3. Optionally change `Camera Resolution` and verify the `Current Resolution` label.
4. Send `Activate Signal` (true) to start receiving frames on `Camera Frame`.
5. When finished, send `Release Signal` (true) to free the camera resource.

## ⚙️ What happens when it runs <a href="#evaluation" id="evaluation"></a>

When activated, the block captures the latest frame from the selected USB camera and outputs it through `Camera Frame`. If the camera fails or frames appear blank, the block will attempt to recover and will inform you via the message area and status indicators.

## 💡 Tips and Tricks <a href="#tips-and-tricks" id="tips-and-tricks"></a>

* Preview live output by connecting `Camera Frame` to the `Show Image` block to inspect frames and open the image viewer.
* Reduce workload before heavy AI blocks by adding an `Image Resizer` or `Image Resize` block to downscale frames.
* Improve visual quality for detection tasks by inserting `Adjust Colors`, `Auto Contrast`, or `Denoising` before AI detectors.
* Combine with `Image ROI Select` to crop a specific region and speed up downstream detectors like `Object Detection` or `Mask Detection`.
* Save important frames using `Image Logger` or record continuous footage with `Record Video`.
* For text extraction workflows, feed frames into `OCR` or `OCR (EasyOCR)` after ensuring clear focus and contrast.
* Use `Blur` or `Image Threshold` to preprocess noisy scenes before `Find Object` or other template-based detectors.
* If you plan to run cloud or remote logging, pair the camera source with `Image Logger` or `CSV Export` to store metadata along with frames.

## 🛠️ Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

* No cameras listed: Ensure the camera is connected and powered. Try reconnecting the USB cable or switching ports, then press `Scan Connected USB Cameras` again.
* Camera busy or cannot start: Close other applications that may be using the camera and try releasing then re-scanning.
* Blank or corrupted frames: Try selecting a different resolution via `Camera Resolution` or press the scan button to restart the camera. If the problem persists, unplug and replug the camera.
* Advanced settings not available: Platform limitations may prevent showing vendor settings; check platform-specific notes or use the camera's external utility.

If problems persist, try combining the camera with a simple preview using `Show Image` to isolate whether the issue is hardware or a downstream processing block.
