Back to Aurora Vision Library Lite website
You are here: Start » Image » Image Local Transforms » SmoothImage_Median
SmoothImage_Median
Header: | AVL.h |
---|---|
Namespace: | avl |
Replaces each pixel with the median of pixels within a kernel.
Applications: Edge-preserving noise removal (but slow).
Syntax
void avl::SmoothImage_Median ( const avl::Image& inImage, atl::Optional<const avl::Region&> inRoi, atl::Optional<const avl::Region&> inSourceRoi, avl::SmoothImageMedianKernel::Type inKernel, int inRadiusX, atl::Optional<int> inRadiusY, avl::Image& outImage )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inImage | const Image& | Input image | |||
inRoi | Optional<const Region&> | NIL | Range of outImage pixels being written | ||
inSourceRoi | Optional<const Region&> | NIL | Range of inImage pixels being read | ||
inKernel | SmoothImageMedianKernel::Type | ||||
inRadiusX | int | 0 - | 1 | Nearly half of the kernel's width (2*R+1) | |
inRadiusY | Optional<int> | 0 - | NIL | Nearly half of the kernel's height (2*R+1), or same as inRadiusX | |
outImage | Image& | Output image |
Requirements
For input inImage only pixel formats are supported: uint8.
Read more about pixel formats in Image documentation.
Hints
- Define the kernel size by setting the inRadiusX and inRadiusY inputs.
Examples
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Not supported kernel in SmoothImage_Median. |
DomainError | Not supported pixel format in SmoothImage_Median. |
DomainError | Region exceeds an input image in SmoothImage_Median. |
DomainError | Source roi exceeds an input image in SmoothImage_Median. |
DomainError | Not supported inImage pixel format in SmoothImage_Median. Supported formats: UInt8. |