You are here: Start » AVL.NET » AVL.LerpImages(AvlNet.Image, AvlNet.Image, AvlNet.Region, float, AvlNet.Image)

AVL.LerpImages(AvlNet.Image, AvlNet.Image, AvlNet.Region, float, AvlNet.Image)

Interpolates two images linearly pixel by pixel.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void LerpImages(
	AvlNet.Image inImage1,
	AvlNet.Image inImage2,
	AvlNet.Region inRoi,
	float inLambda,
	out AvlNet.Image outImage
)

Parameters

inImage1
Type: AvlNet.Image
First input image
inImage2
Type: AvlNet.Image
Second input image
inRoi
Type: AvlNet.Region
Range of pixels to be processed, or null.
inLambda
Type: System.Single
Interpolation parameter from 0.0 to 1.0
outImage
Type: AvlNet.Image
Output image

Description

The operation computes the linear interpolation of two images. Each pixel of the output image is computed as follows. \[ outImage[i,j] = (1-inLambda) \cdot inImage1[i,j] + inLambda \cdot inImage2[i,j] \]

In multichannel (color) images each pixel channel is processed separately.

The operation requires that the images being processed have equal format and dimensions, otherwise an error with appropriate description occurs. To obtain an image of desired dimensions one can use ResizeImage or CropImage filter. To alter the pixel type of an image one can use ConvertPixelType filter. ConvertToMultichannel and AverageChannels filters allow to alter the number of image channels.

Hardware Acceleration

This operation is optimized for SSE2 technology for pixels of types: UINT8, SINT16, REAL.

This operation supports automatic parallelization for multicore and multiprocessor systems.

Hardware acceleration settings may be manipulated with Settings class.

Errors

Error type Description
DomainError Image sizes are not equal in LerpImages.
DomainError Image formats are not the same in LerpImages.

See also