AlphaBlending
The AlphaBlending block blends two images by overlaying one image with a background image.
Library
ComputerVision/Images/Operations
Description
AlphaBlending blends two images by overlaying one image - typically the foreground image - with a background image. The alpha input allows you to select a masking area in which the background image is overlaid.
In the alpha blending operation, for every pixel of the output image (O), the foreground image color (F) is combined with the background image color (B) using the alpha mask (α):
O = αF + (1- α)B
• When α = 0, the output pixel color is the background
• When α = 1, the output pixel color is the foreground
• When 0 < α < 1, the output pixel color it is a blend of the foreground and background
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
externalActivation | External activation | This parameter defines if the block receives or inherits an external activation. When External Activation is used, an additional activation port is added to the block. Default is OFF. | Number | 0 |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
src0 | explicit | input | 1 | |
src1 | explicit | input | 2 | |
alpha | explicit | input | 3 | |
image | explicit | output | 1 | |
Port 5 | activation | input | externalActivation |