You are here: Start » AVL.NET » AVL.SmoothImage_Mean Method

AVL.SmoothImage_Mean Method

Smooths an image by averaging pixels within a rectangular kernel.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

public static void SmoothImage_Mean(
	AvlNet.Image inImage,
	AvlNet.Region inRoi,
	AvlNet.Region inSourceRoi,
	AvlNet.Pixel? inBorderColor,
	AvlNet.SmoothImageMeanKernel inKernel,
	int inRadiusX,
	int? inRadiusY,
	out AvlNet.Image outImage
)

Parameters

Name Type Range Default Description
inImageAvlNet.ImageInput image.
inRoiAvlNet.RegionRange of outImage pixels to be computed. Default value: atl::NIL, or null.
inSourceRoiAvlNet.RegionRange of inImage pixels to be read. Default value: atl::NIL, or null.
inBorderColorAvlNet.Pixel?Color of the imaginary pixels outside the image boundaries. Default value: atl::NIL, or null.
inKernelAvlNet.SmoothImageMeanKernelKernel shape.
inRadiusXint<0, INF>1Nearly half of the kernel's width (2*R+1). Default value: 1.
inRadiusYint?<0, INF>Nearly half of the kernel's height (2*R+1), or same as inRadiusX. Default value: atl::NIL, or null.
outImageAvlNet.ImageOutput image.

Description

Replaces each pixel with the average of all pixels contained in a rectangular kernel. The width of the kernel is 2 * inRadiusX + 1, the height is 2 * inRadiusY + 1. When inRadiusY is set to Auto, then its value is implicitly copied from inRadiusX.

Examples

SmoothImage_Mean performed on a sample image with inRadiusX = 4.

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.

Hardware acceleration settings may be manipulated with Settings class.

Errors

Error type Description
DomainError inBorderColor is relevant only when inSourceRoi is set to Auto (NIL) in SmoothImage_Mean.
DomainError Not supported kernel on input in SmoothImage_Mean.

See also