# Maximum Images

This function block creates a new image by taking the maximum value for each pixel from two input images. Useful for combining images where you want the brightest or strongest response at each pixel.

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

`Image Any` First input image to compare.

`Image Any` Second input image to compare.

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

`Image Any` Resulting image where each pixel is the maximum of the two inputs.

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

This function block has no interactive controls.

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

* Pixel-wise maximum merge of two images.
* Preserves per-channel pixel values (works with multi-channel images).
* Fast operation suitable for combining detection overlays, masks, or image enhancements.

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

1. Connect two image-producing blocks to the two `Image Any` inputs.
2. Run the scenario; the block outputs a single image where each pixel is the maximum of the corresponding pixels from the inputs.
3. Use the output image for visualization, further processing, or export.

## 📊 Evaluation <a href="#evaluation" id="evaluation"></a>

When evaluated, this block compares the two input images pixel-by-pixel and returns the merged image containing the maximum pixel values.

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

* If the two images have different dimensions, use `Image Resize` or `Image Resizer` before this block to match sizes.
* To combine results then visualize them, follow this block with `Show Image`.
* For the opposite effect (minimum values), use the `Minimum Images` block.
* Use `Apply Mask` beforehand to limit merging to specific regions of interest.
* When assembling multi-source visual summaries, consider `Image Concatenate` or `Add Images Weighted` after merging to create collages or blended overlays.
* If one image needs padding to align with the other, use `Image Padding` before merging.

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

* Different image sizes: Ensure both inputs share the same width, height, and channel count. Apply `Image Resize` or `Image Resizer` if they do not.
* Unexpected colors or channels: Verify both inputs use the same color format (e.g., RGB/BGR) and channel ordering before merging.
* No output or blank image: Confirm upstream blocks are providing valid image data to both inputs; use `Show Image` on each source to inspect them.


---

# 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/maximum-images.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.
