# HikVision Camera

This function block connects to HikVision cameras on your network and provides live image frames for downstream processing and visualization.

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

This function block does not require any inputs.

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

`Image` The live frame retrieved from the configured HikVision camera.

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

`IP Address` Enter the camera IP address (or host name) of the HikVision device you want to connect to.

Note: the block will attempt to connect to the provided address and provide frames automatically while running.

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

* Direct connection to HikVision cameras for live frame acquisition.
* automatic reconnect behavior when the camera address changes or connection is lost.
* Basic camera parameter support when the camera/SDK provides settings (exposure and related controls available via camera settings).
* Clear error messages to help diagnose connection problems.

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

1. Enter the camera network address into the `IP Address` control.
2. Run the scenario; the block will connect to the camera and start outputting frames through the `Image` socket.
3. Use the output frames with visualization, recording, or analysis blocks (examples below).

## 📊 Running behavior <a href="#evaluation" id="evaluation"></a>

When active, the block connects to the given camera address and continuously outputs the latest available frame. If the connection cannot be established or is lost, the block will report an error and will retry when the address is corrected or the camera becomes available again.

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

* Use Show Image to preview frames in the UI while building your scenario.
* Save important frames using Image Logger or Record Video for offline review.
* If your analytics are heavy, add Image Resize before model blocks to reduce processing load.
* Crop regions of interest with Image ROI or Image ROI Select to focus analysis on relevant areas.
* For counting or tracking workflows, pair with Object Detection or Object Detection - Custom and then Object\_Detection\_Tracker.
* Use Mask Detection or Background Subtractor when you need to filter persons or foreground objects before further analysis.
* Combine with Image Write or Multi Image Write to export specific frames on trigger events.

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

* Connection fails: verify the camera IP is reachable from the machine running the studio (ping the camera, check network/VLAN settings).
* No frames or black frames: check camera power, exposure/stream settings on the camera, and ensure no other application is exclusively using the camera.
* SDK/driver requirement: some HikVision models may require vendor SDK or drivers to be installed on the system—ensure required camera support packages are present.
* Authentication or firewall blocks: confirm camera credentials/network rules allow access from your PC or server.

If problems persist, preview the address with Show Image or re-check network and camera settings before continuing.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.augelab.com/function-blocks/input-output/image-inputs/hikvision-camera.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
