Add Images Weighted
This function block blends two images together using a user-defined weight. It is useful for creating smooth overlays, crossfades, or controlled mixing of two visual sources.
π₯ Inputs
Image Any First image input to be blended.
Image Any Second image input to be blended.
π€ Outputs
Image Any Resulting blended image.
πΉοΈ Controls
Weight % Slider that sets how much influence the first image has in the blend. Lower values favor the second image, higher values favor the first image.
βοΈ Running mechanism
When the block runs it takes the two input images and mixes their pixel values according to the chosen Weight %. If the two images differ in size, the block will adjust the second image to match the first image so the blend can be performed. Final pixel values are kept within the valid image range to avoid visual artifacts.
π― Features
Real-time blending controlled by a single, easy-to-use slider.
Automatic size matching when inputs differ in resolution.
Safe value clamping to ensure valid image output.
Works with any image-producing blocks as long as image data is provided.
π Usage Instructions
Provide two image sources to the
Image Anyinputs.Adjust the
Weight %slider to set the mix ratio between the two images.Read the blended image from the
Image Anyoutput and pass it to further processing or display.
π‘ Tips and Tricks
If your images are different sizes, use
Image ResizerorImage Resizebefore this block to control how resizing is done (preserve aspect ratio, interpolation method, etc.).To avoid visible seams when blending images captured under different lighting, apply
Normalize ImageorContrast Optimizationto both inputs first.Use
Bluron one input to create smooth transitions or depth-of-field style overlays.If you need a simple addition without weighting, consider using the
Add Imagesblock instead.Preview results with
Show Imagewhile tuning theWeight %to speed up visual adjustments.For combining many images, chain this block with
Add Images Weightedrepeatedly or use image concatenation blocks as an intermediate step.
π οΈ Troubleshooting
If output looks stretched or cropped: check that both inputs have the expected dimensions; consider inserting an
Image Resizerto make sizes explicit.If result appears clipped or too bright: apply
Normalize Imageor reduce blending weight extremes.If no image appears: ensure upstream blocks are providing valid image data. Use a display block like
Show Imageto verify each input.If blending is slow with large images: reduce input size with
Image Resizerbefore blending to improve performance.
Last updated
Was this helpful?