Multiply Images

This function block performs a per-pixel multiplication of two images. Use it when you want to combine two image streams such that each output pixel is the product of the corresponding pixels from the two inputs (useful for masking, weighting, and per-channel modulation).

πŸ“₯ Inputs

Image Any First input image (source A). Accepts color or grayscale images.

Image Any Second input image (source B). Must have the same dimensions as the first image to produce a valid result.

πŸ“€ Outputs

Image Any Resulting image after pixel-wise multiplication of the two inputs.

πŸ•ΉοΈ Controls

This block has no user-configurable controls.

🎨 Features

  • Per-pixel multiplication across channels β€” the operation is applied to matching pixels in both inputs.

  • Works with color and grayscale images as long as sizes and channel layouts are compatible.

  • Requires equal image dimensions; mismatched images must be resized before connecting.

  • Useful for applying binary or soft masks, combining illumination maps, or multiplying feature maps.

πŸ“ Usage Instructions

  1. Provide the first image to the first Image Any input.

  2. Provide the second image (mask, multiplier, or another image) to the second Image Any input.

  3. Ensure both images have the same width, height, and channel layout. If they do not, use an image resampling block before connecting.

  4. Read the product from the Image Any output and send it to subsequent processing or display blocks.

πŸ“Š Running Behavior

When the scenario runs, the block multiplies corresponding pixel values of the two inputs and outputs the resulting image. If inputs are not the same size, the block will not produce a valid result β€” resize one input first.

πŸ’‘ Tips and Tricks

Image Resize Use this block when your two images differ in size β€” resize one input so both match before multiplication.

Image Resizer An alternative to adjust image dimensions or reduce resolution for higher processing speed.

Image Threshold Create a binary mask from a grayscale image, then feed that mask as the second input to apply hard masking via multiplication.

Apply Mask When you need a cleaner masking workflow, combine this block with the mask-producing blocks for intuitive masking control.

Blur Apply slight blur to noisy inputs before multiplication to reduce speckle and avoid sharp artifacts.

Normalize Image After multiplication you may want to rescale pixel intensities; use this block to adjust the output range for better visualization or downstream processing.

Add Images Weighted To blend the multiplied result with the original or another image, use this block to perform weighted addition.

Show Image Preview the resulting image during development to validate visual results quickly.

Image Logger Save outputs automatically for logging or later analysis.

πŸ› οΈ Troubleshooting

  • If the output looks blank or incorrect, check that both inputs have identical width, height and compatible channels.

  • If the result is too dark, remember multiplication reduces intensity; consider normalizing or scaling one input (for example, by using a float mask with values between 0–1 instead of 0–255).

  • To apply a binary mask, convert the mask to a matching format (same channels or a single-channel mask that gets broadcast) before connecting it.

Last updated

Was this helpful?