Subtract Images

This function block is designed to perform subtraction between two images. It calculates the pixel-wise difference between an "Actual Image" and a "Reference Image" to produce a "Difference Image".

📥 Inputs

Actual Image The primary image from which the reference image will be subtracted.

Reference Image The secondary image that will be subtracted from the actual image.

📤 Outputs

Difference Image The result of the pixel-wise subtraction between the actual and reference images.

🎨 Features

Pixel-wise Subtraction The block computes the difference for each pixel, allowing you to analyze the variations between two images.

Error Handling If the input images do not have the same dimensions, the block raises an error to notify the user.

🕹️ Controls

No specific controls are needed as inputs will be handled directly through the connected image blocks.

📝 Usage Instructions

  1. Connect Images: Link the desired images to the corresponding inputs: connect the actual image to Actual Image and the reference image to Reference Image.

  2. Evaluate the Block: Run the block to compute the difference. The output will show the resulting difference image.

📊 Evaluation

When evaluated, this function block returns the difference image that highlights areas of difference between the actual and reference images.

💡 Tips and Tricks

Ensuring Same Dimensions

It's critical to ensure that both input images are of the same dimensions. You can use the Image Resize function block to adjust one of the images as necessary.

Visualizing Differences

After getting the result from the Subtract Images block, consider combining or overlaying the difference image with the original images using Add Images or Multiply Images blocks for easier visualization of the changes.

🛠️ Troubleshooting

Dimension Mismatch Error

If you encounter an error indicating that the two images need to be of the same size, verify the dimensions of both images and adjust using the Image Resize function block.

Last updated

Was this helpful?