> 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/image-transformations/operations/divide-images.md).

# Divide Images

This function block performs a pixel-wise division of two images to produce a new image. It is useful for normalization, ratio measurements, defect highlighting and other image arithmetic tasks where one image is used to scale or correct another.

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

`Image Any` First image input (numerator). Provide a regular image to be divided.

`Image Any` Second image input (denominator). Provide an image with the same dimensions as the first.

Note: sockets above are inputs and both must be connected with images of matching size and channel layout.

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

`Image Any` Resulting image after pixel-wise division of the first input by the second input.

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

This block has no interactive widgets. Configure inputs upstream before evaluation.

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

* Pixel-wise division result with proper image range handling suitable for visualization or further processing.
* Direct replacement in pipelines where comparative or normalized images are required.
* Designed to work with images that share identical dimensions and channels.

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

When the block runs it takes the two connected images and computes a pixel-wise division of the first image by the second. The block expects both images to match in size and channel layout; if they do not match, the block cannot perform the operation and will require you to correct the inputs before successful evaluation.

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

* Connect the image you want to divide to the first `Image Any` input.
* Connect the image you want to divide by to the second `Image Any` input.
* Ensure both images have identical width, height and channels before running the block.
* Read the output from the `Image Any` output to continue processing or to view the result.

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

* If the two images are different sizes, use the `Image Resize` block upstream to resample one image to match the other.
* To avoid problems with zero or near-zero pixels in the denominator, add a small constant image before division. Create a small-value image with `Make Image` and combine it with the denominator using `Add Images` or `Add Images Weighted`.
* Normalize inputs first (for example with `Normalize Image`) if you expect wide dynamic range differences between the two images.
* For visualization after division, use `Auto Contrast` or `Adjust Colors` to make subtle differences more visible.
* Preview intermediate or final images with the `Show Image` block and save results using `Image Logger` or `Image Write` if needed.

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

* Mismatched image sizes: Ensure both inputs have the same dimensions. Use `Image Resize` to fix mismatches.
* Unexpected artifacts or blown-out pixels: Check for zero or very small values in the denominator and add a small constant if necessary. Also consider normalizing the inputs first.
* Strange color shifts: Confirm both images share the same channel order (e.g., BGR/RGB) and channel count. Use color conversion or channel operations upstream if needed.
