🟧 Image Merge

Function Description

This operator merges two input images (which must have the same size) pixel-wise according to specified methods to generate a new image.

Usage Scenarios

  • Image fusion: Add two images from different sources or processed differently to create fusion effects, for example, combining textures of one image with contours of another.

  • Result enhancement: When two different algorithm branches both generate result images, "take maximum value" can be used to merge the two results, highlighting all detected features.

  • Background replacement/synthesis: "Weighted addition" can achieve semi-transparent mixing effects of two images.

Input Output

Input

Image: Image one to be merged.

Image: Image two to be merged, must have the same size as the first.

Output

Merged Image: Output fused image.

Parameter Description

Input images must have the same size, otherwise an error will occur.

Merge Method

Parameter Description

Select the specific method for fusing the two input images.

Parameter Adjustment

  • Take Maximum Value: Compare pixel values of the two images at the same coordinate position one by one, and use the larger pixel value as the output image pixel value.

  • Take Minimum Value: Similar to above, compare each pixel and use the smaller value as output.

  • Weighted Addition: A more flexible method that can achieve different fusion effects by adjusting subsequent weight parameters.

  • First image weight: Value range is [0,1], the larger the value, the higher the proportion in the final result, i.e., the less transparent.

  • Second image weight: Value range is also [0,1], generally the sum of the two image weight coefficients is 1, which can keep overall brightness unchanged. If the sum is greater than 1, the image becomes brighter; if less than 1, it becomes darker.

  • Grayscale coefficient: Value range is [0,500], on the basis of weighted summation, additional brightness value added to each pixel, which can be used to overall adjust the brightness of the final composite image.