Divide Images
This function block performs a per-pixel division of two images. Use it when you need to compute a ratio image (for example: illumination correction, normalization by a reference image, or computing relative change between two captures).
π₯ Inputs
Image Any First image (numerator).
Image Any Second image (denominator).
Note: Both input sockets must provide images with the same dimensions and channel layout.
π€ Outputs
Image Any Resulting image after per-pixel division.
πΉοΈ Controls
This function block has no user-facing controls; it computes the result directly from the two inputs.
π¨ Features
Performs element-wise division between two images.
Preserves the input image type and channels when both inputs match.
Will report an input-size mismatch if images differ in resolution or channels.
π Usage Instructions
Provide the first image to the first input socket (numerator).
Provide the second image to the second input socket (denominator).
The block outputs the divided image on the output socket.
If the input images are not the same size, the block will raise an input mismatch error β resample one image first.
π Evaluation
On execution the block checks that both images have identical dimensions. If they match, the block returns the per-pixel divided image. If not, it signals an incorrect input configuration.
π‘ Tips and Tricks
If your images differ in size, add
Image ResizeorImage Resizerbefore this block to match resolutions.To avoid visual artifacts from dividing by zero, mask or replace zero-valued pixels in the denominator using
Apply Mask(or prepare a small nonzero floor in the denominator).After division, use
Normalize Imageto rescale the result for visualization or further processing.Use
BlurorDenoisingbefore division to reduce noise amplification in the ratio image.Combine with
Show Imageto preview results and withImage WriteorImage Loggerto save outputs for later analysis.
π οΈ Troubleshooting
Problem: "Images must be the same size" β Solution: insert
Image ResizeorImage Resizerto match dimensions and channels.Problem: "Black or noisy output / Inf or NaN pixels" β Solution: ensure the denominator contains no zeros (use
Apply Maskto exclude zeros or replace them), and consider smoothing (Blur) before dividing.Problem: "Unexpected color format" β Solution: ensure both inputs are using the same channel layout (both RGB/BGR or both grayscale) before connecting.
Last updated
Was this helpful?