---
title: "Median"
url: "https://help.maxon.net/ag/en-us/Content/html/Modifier_image_median.html"
section_path: "Modifiers > Image > Blur and Sharpen > Median"
description: "Perform a median filter on the image. Pixel values within a square box of the given size around the current pixel are sorted, and the median value is …"
---

# Median

## Brief Description

Perform a median filter on the image. Pixel values within a square box of the given size around the current pixel are sorted, and the median value is output. Median filtering is performed per-channel

## Controls

| Parameter / Script Name | Type | Default | Function |
| --- | --- | --- | --- |
| `Enabled / enabled` | Boolean | On |  |
| `Red / process_red` | Boolean | On | Enable the red channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0 |
| `Green / process_green` | Boolean | On | Enable the green channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0 |
| `Blue / process_blue` | Boolean | On | Enable the blue channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0 |
| `Alpha / process_alpha` | Boolean | On | Enable the alpha channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0 |
| `Size / size` | Float 2D | 0, 0 | The size of the structuring element is Size \* 2 + 1 in each dimension |
| `Sharpness / sharpness` | Color | 0, 0, 0, 0 | Sharpen areas of the image with more contrast |
| `Unpremult / predivide` | Choice | If Needed | - *If Needed*: The image RGB channels are divided by the alpha channel before applying the effect if the image is marked as alpha-premultiplied<br>- *Never*: The image RGB channels are never divided by the alpha channel before applying the effect, even if the image is marked as alpha-premultiplied |
| `Crop To Composition Format / crop_source_to_comp` | Boolean | On | Useful to increase performances |
| `Mask / mask` | Image | - |  |
| `Mix / mix_with_source` | Float | 1 | Dissolves between the original image at 0 and the image with the effect applied at 1 |
