SmoothImage_Median
Replaces each pixel with the median of pixels within a kernel.
Applications:Edge-preserving noise removal (but slow).
Syntax
C++
Python
def SmoothImage_Median( inImage: Image, outImage: Image, /, *, inRoi: Region | None = None, inSourceRoi: Region | None = None, inKernel: SmoothImageMedianKernel = SmoothImageMedianKernel.Box, inRadiusX: int = 1, inRadiusY: int | None = None ) -> None
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inImage | Image | Input image | ||
![]() |
inRoi | Region | None | None | Range of outImage pixels being written | |
![]() |
inSourceRoi | Region | None | None | Range of inImage pixels being read | |
![]() |
inKernel | SmoothImageMedianKernel | SmoothImageMedianKernel.Box | ||
![]() |
inRadiusX | int | 0 - ![]() |
1 | Nearly half of the kernel's width (2*R+1) |
![]() |
inRadiusY | int | None | 0 - ![]() |
None | Nearly half of the kernel's height (2*R+1), or same as inRadiusX |
![]() |
outImage | Image | Output image |
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.



