Back to Aurora Vision Library Lite website

You are here: Start » Image » Image Local Transforms » SmoothImage_Mean_Mask

SmoothImage_Mean_Mask


Header: AVL.h
Namespace: avl

Smooths an image by averaging pixels within a small rectangular kernel.

Applications: This is a faster alternative to SmoothImage_Mean when the kernel is very small.

Syntax

void avl::SmoothImage_Mean_Mask
(
	const avl::Image& inImage,
	atl::Optional<const avl::Region&> inRoi,
	avl::MeanKernel::Type inKernel,
	avl::Image& outImage
)

Parameters

Name Type Default Description
Input value inImage const Image& Input image
Input value inRoi Optional<const Region&> NIL Range of outImage pixels to be computed
Input value inKernel MeanKernel::Type Selects a predefined kernel
Output value outImage Image& Output image

Description

This operation is a simplified, fast in computation, version of SmoothImage_Mean, with predefined kernel and simplified ROI handling.

Kernel used in operation can be chosen by inKernel parameter:

  • Box_3x3: 3 by 3 pixels, the closest equivalent is SmoothImage_Mean call with inKernel = Box, inRadiusX = 1, inRadiusY = 1, inIterationsCount = 1
  • Box_5x5: 5 by 5 pixels, the closest equivalent is SmoothImage_Mean call with inKernel = Box, inRadiusX = 2, inRadiusY = 2, inIterationsCount = 1

Although above calls are described as closest equivalent their results may vary.

Hints

  • Choose kernel size by setting inKernel input.
  • If a larger kernel is required, switch to SmoothImage_Mean.
  • If you want to remove noises from an image, consider using SmoothImage_Gauss_Mask instead.

Examples

SmoothImage_Mean_Mask performed on a sample image with inKernel = Box5x5.

Hardware Acceleration

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

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

This operation is optimized for NEON technology for pixels of types: UINT8, SINT8, UINT16, SINT16.

This operation supports automatic parallelization for multicore and multiprocessor systems.

Errors

List of possible exceptions:

Error type Description
DomainError Region exceeds an input image in SmoothImage_Mean_Mask.

See Also

  • SmoothImage_Mean – Smooths an image by averaging pixels within a rectangular kernel.