# Image Resolution and Channel Value

This function block reports basic size and channel information for an input image. It is useful for quickly checking image dimensions before applying processing or sending data to other blocks.

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

`Image Any` — Image input socket. Provide any image (color or grayscale) to analyze.

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

`Width` — Width of the input image in pixels (number).

`Height` — Height of the input image in pixels (number).

`Channel` — Number of channels in the input image (e.g., 1 for grayscale, 3 for RGB).

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

`Resolution` — Readout label on the block that shows a human-friendly string with image width, height and channel count.

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

* Fast metadata extraction: instantly returns image width, height and channel count when an image is present on the input socket.
* Grayscale and color aware: recognizes single-channel images and multi-channel images and reports channel count accordingly.
* Visual feedback: the `Resolution` label on the block displays the current result for quick inspection.

## ⚙️ Running mechanism <a href="#running-mechanism" id="running-mechanism"></a>

When this block runs it inspects the supplied image from the `Image Any` input socket, determines its pixel dimensions and channel count, updates the on-block `Resolution` label, and sends the numeric values through the `Width`, `Height` and `Channel` output sockets so downstream blocks can use them.

## 📝 Usage <a href="#usage" id="usage"></a>

* Connect any image-producing block to the `Image Any` input socket (for example `Camera USB`, `Camera IP (ONVIF)` or `Load Image`).
* Read the `Resolution` label for a quick summary.
* Use the numeric outputs `Width`, `Height` and `Channel` to drive logic, preprocessing decisions, or display information in other blocks.

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

* To visually check the image while inspecting size, connect the same image source to `Show Image` so you can preview frames while reading dimensions.
* If you only need a specific region, use `Image ROI Select` before this block to measure the crop area resolution rather than the full image.
* To inspect color information further, combine this block with `Split Image` to separate channels or with `Merge Channels` after custom adjustments.
* Use `Image Memory` when working with a static test image so the reported values remain stable while you tune other processing steps.

(hint) Combine this block early in your processing chain to make adaptive decisions (for example selecting an appropriate algorithm or resizing strategy) based on the actual image size and channel count.

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

* No data output: ensure an image-producing block is connected to the `Image Any` input socket and that it is actively providing images.
* Unexpected channel count: some grayscale images are single-channel while color images are three-channel. If you need a different channel format, use `Split Image` and `Merge Channels` or color-conversion blocks before this block.
* Very large image sizes slowing the flow: resize upstream with `Image Resizer` to reduce processing load before sending images to compute-heavy blocks.


---

# 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/image-transformations/analysis/image-resolution-and-channel-value.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.
