> 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/detectors/find-object-multiple-image.md).

# Find Object - Multiple Image

This function block detects whether a template (object) appears across multiple corresponding regions of a larger image. It is designed for cases where both the main image and the template are compared by splitting them into a grid of tiles and checking each tile pair for a match. The block provides visual feedback by marking tiles that failed to match and outputs both counts and an overall pass/fail indicator.

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

`Main Image` Provide the image in which you want to verify the presence of the object.\
`Object Image` Provide the template image that should be present across the main image tiles.

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

`Image Any` The main image annotated to indicate tiles where the template was not found (visual feedback).\
`Match Count` The number of tiles where the template was successfully matched.\
`Matched All` Boolean that is TRUE when the template is found in every expected tile (based on the chosen slice grid), otherwise FALSE.

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

`Method` Choose the matching method to control how image similarity is evaluated between each tile pair. Different methods change matching sensitivity and behavior.

`Match Threshold %` Adjust how strict the matching is. Increasing the threshold requires closer similarity for a tile to count as matched.

`Horizontal Slice` Enter how many tiles the image should be split horizontally (columns).

`Vertical Slice` Enter how many tiles the image should be split vertically (rows).

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

* Grid-based comparison: Splits both main and template images into the same number of tiles and compares corresponding tiles.
* Visual failure indicators: The output image is annotated to show tiles that did not match (easy visual inspection).
* Match summary: Returns numeric count of matched tiles and a boolean `Matched All` to quickly know if the entire grid passed.
* Adjustable sensitivity and method: Fine-tune the detection behavior using the `Method` and `Match Threshold %` controls.
* Works with multiple scales via tile-based comparison, useful when the object should appear repeatedly across a structured layout.

## ⚙️ How it runs <a href="#how-it-works" id="how-it-works"></a>

When the block runs it:

1. Splits both the `Main Image` and the `Object Image` into a grid defined by `Horizontal Slice` and `Vertical Slice`.
2. Compares each pair of corresponding tiles using the selected `Method` and the `Match Threshold %`.
3. Marks tiles on the output image where the template was not found and increments a match counter for successful tiles.
4. Outputs the annotated image, the total matched tile count, and a boolean indicating whether all tiles matched.

Note: For reliable results the main and object images should be similarly scaled and oriented so that corresponding tiles are comparable.

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

* Choose `Horizontal Slice` and `Vertical Slice` to match the expected tiling or layout of the object in the main image (for example, a 3x3 grid for nine expected positions).
* Increase `Match Threshold %` to reduce false positives when background or pattern noise is present.
* Try different `Method` options if one method produces too many misses or false matches.

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

* If your images are too large or slow to process, use `Image Resizer` before this block to reduce input size.
* Use `Image ROI Select` to crop the main image to the area of interest so slicing only applies where needed.
* Apply `Blur` or `Denoising` to the main image to reduce high-frequency noise that may cause false mismatches.
* Adjust colors or contrast with `Adjust Colors` or `Contrast Optimization` to make the object more distinguishable from the background.
* Preview results by sending the annotated output to `Show Image`.
* Save failing cases or the annotated image using `Image Logger` or `Image Write` for offline review.
* For single-template checks (no tiling), consider `Find Object` instead when you only need to check for one occurrence rather than a tiled grid.

(hint: combine the above controls and blocks to build a robust inspection flow — crop, preprocess, compare, then log or display results)

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

* If the block reports fewer matches than expected: verify `Horizontal Slice` and `Vertical Slice` match how the object repeats in the main image; increase `Match Threshold %` or try a different `Method`.
* If the block reports too many false matches: raise the `Match Threshold %`, apply preprocessing such as `Image Threshold` or `Blur`, or use `Image Resizer` to align scales.
* If slice counts do not match or comparison seems invalid: ensure both inputs are valid images and the slice numbers are positive integers.
* If orientation or scale differs between template and main image: rotate or resize inputs so tiles align, or use `Auto Alignment` / `Image Resizer` before running comparison.
