Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Image Local Transforms » SmoothImage_Median


Module: FoundationLite

Replaces each pixel with the median of pixels within a kernel.

Name Type Range Description
inImage Image Input image
inRoi Region* Range of outImage pixels being written
inSourceRoi Region* Range of inImage pixels being read
inKernel SmoothImageMedianKernel
inRadiusX Integer 0 - Nearly half of the kernel's width (2*R+1)
inRadiusY Integer* 0 - Nearly half of the kernel's height (2*R+1), or same as inRadiusX
outImage Image Output image


For input inImage only pixel formats are supported: uint8.

Read more about pixel formats in Image documentation.


Edge-preserving noise removal (but slow).


  • Define the kernel size by setting the inRadiusX and inRadiusY inputs.
  • For small kernels consider switching to SmoothImage_Median_Mask to achieve higher performance.


SmoothImage_Median performed on a sample image with inRadiusX = 4, inRadiusY = Nil.


This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

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.

Complexity Level

This filter is available on Basic Complexity Level.

Filter Group

This filter is member of SmoothImage filter group.