You are here: Start » AVL.NET » AVL.DownsampleImage(AvlNet.Image, int, AvlNet.Image)

AVL.DownsampleImage(AvlNet.Image, int, AvlNet.Image)

Shrinks an image by the factor of two along each axis.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void DownsampleImage(
	AvlNet.Image inImage,
	int inScaleStep,
	out AvlNet.Image outImage
)

Parameters

inImage
Type: AvlNet.Image
Input image
inScaleStep
Type: System.Int32
Defines how many times the image size is divided by 2
outImage
Type: AvlNet.Image
Output image

Description

The operation shrinks the inImage reducing its dimensions by a factor of two inScaleStep times.

Remarks

The operation produces a new image by averaging four neighboring pixels from the source image repeatedly. New width and height of image are always rounded up, thus pixels from source image at last row or column are averaged in pairs or copied when corresponding dimension is odd.

This operation can be used as faster replacement for ShrinkImageNTimes.

Hardware Acceleration

This operation is optimized for SSE2 technology for pixels of type: 1xUINT8.

This operation is optimized for SSSE3 technology for pixels of type: 3xUINT8.

This operation supports automatic parallelization for multicore and multiprocessor systems.

Hardware acceleration settings may be manipulated with Settings class.

See also