> 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/detections-shapes/roi-processing/get-pixel.md).

# Get Pixel

This function block reads the color value at a specific image coordinate and returns it for further use. It supports both color (BGR) and grayscale images and validates the supplied coordinate before sampling.

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

`Image Any` Main image to sample from

`Point` Coordinate of the pixel to read (format: (x, y))

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

`(Blue, Green, Red)` Pixel value read at the given coordinate.

* For color images this is the B, G, R channels returned together.
* For grayscale images a single-channel value is returned.

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

This block has no interactive controls or widgets.

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

* Simple pixel sampling by coordinate.
* Works with color (BGR) and grayscale images.
* Input validation with clear error messaging when the image is invalid or the coordinate is outside image bounds.
* Returns values in a format ready to connect to other blocks that accept pixel or numeric data.

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

* The block reads the image from the first input socket and the coordinate from the second socket.
* If the image or coordinate is invalid, the block reports an error to help you correct inputs.
* If valid, the block samples the pixel at the given (x, y) position and outputs its channel values.

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

1. Connect an image-producing block to the `Image Any` input.
2. Provide a coordinate to the `Point` input. Coordinates are provided as (x, y).
3. Use the `(Blue, Green, Red)` output where needed (for display, comparison, logging, etc.).

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

* Combine with `Get Pixel Mouse` to pick coordinates interactively by clicking on the image.
* Use `Show Image` to preview the image while you choose sampling coordinates.
* Visualize the sampling location by sending the coordinate to `Draw Point` so you can confirm the correct pixel is being read.
* Crop the image first with `Image ROI` or `Image ROI Select` to restrict sampling to a region of interest and avoid out-of-bounds coordinates.
* Validate that a point is inside a selected area using `Check Area` before sampling to avoid errors.
* Log or export sampled values using `Image Logger` or `CSV Export` for later analysis.

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

* If you see an error about the image input, ensure the connected block actually provides an image and that the data is not empty.
* If you see an error about the coordinate, check that the (x, y) values are integers and lie within the image width and height.
* When sampling from a grayscale image, expect a single-channel value rather than three channel values.
