BLEND Function (PV-WAVE Extreme Advantage)
Blends two images together.
Usage
result = BLEND(img1, a, img2[, b])
Input Parameters
img1—A 1D, 2D, or 3D array containing a signal; point or signal-interleaved signals; an image; image, row or pixel-interleaved images; or a volume.
a—An integer or array specifying a scaling factor for img1. When a is an array, it specifies the scaling factors for an array of multi-layered images.
img2—A 1D, 2D, or 3D array containing the second image. This parameter must be an array of exactly the same size and dimensions as img1.
b—(optional) An integer or array specifying a scaling factor for img2. When b is an array, it specifies the scaling factors for an array of multi-layered images. (Default: 1.0 – a)
Returned Value
result—An array, containing the blended image, that is the same dimensions and size as img1 and img2. The result array equals img1 multiplied by the scale factor a plus img2 multiplied by its scale factor b.
result = a[img1] + b[img2]
Keywords
Intleave—A scalar string indicating the type of interleaving of 2D input signals and 3D image arrays. Valid strings and the corresponding interleaving methods are:
'point'—The 2D input array arrangement is (
p,
x) for
p point-interleaved signals of length
x.
'signal'—The 2D input
image array arrangement is (
x,
p) for
p signal-interleaved signals of length
x.
'pixel'—The input array arrangement is (
p,
x,
y) for
p pixel-interleaved images of
x-by-
y.
'row'—The 3D
image array arrangement is (
x,
p,
y) for
p row-interleaved images of
x-by-
y.
'image'—The 3D
image array arrangement is (
x,
y,
p) for
p image-interleaved images of
x-by-
y.
'volume'—The input image array is treated as a single entity.
No_Clip—If set, the result data type is larger than the input image data type.
note | The No_Clip keyword prevents underflow or overflow conditions from occurring. |
Zero_Negatives—If set, all negative values in the result are set to zero.
Discussion
The two images, img1 and img2 are blended using the a and b scale factors to produce an image that is the linear combination of img1 and img2. Blending is sometimes used to produce a double exposure effect (e.g. fading one image out and another image in), or to combine segmented images into a single image for further analysis.
Example
Blend two images together to produce a double exposure effect.
img1 = IMAGE_READ(!IP_Data + 'mandril.tif')
img2 = IMAGE_READ(!IP_Data + 'aerial.tif')
img3 = BLEND(img1('pixels'), 0.5, img2('pixels'))
See Also