← Fusion node reference
Cleanup & DetailIntermediate

RankFilter

Local min/median/max neighborhood filter

Filters each pixel by rank within a local neighborhood, ranging from minimum-like through median-like to maximum-like behavior.

RankFilter
DaVinci Resolve · Fusion

RankFilter is useful for suppressing isolated noise, dust and small artifacts or for expanding/contracting bright and dark image structures.

Overview

What RankFilter does

Size defines the neighborhood examined around each pixel. Rank chooses which ordered value from that neighborhood becomes the output.

Ranks near the middle behave like a median filter and are useful for impulse noise. Ranks toward the minimum or maximum can shrink or expand bright structures in ways related to morphological filtering.

Large sizes can flatten texture quickly, so cleanup work should use the smallest neighborhood that removes the unwanted artifact.

Mental model

Think of it as sorting the pixel values around each location and choosing one item from that sorted list.

Common uses

Remove isolated hot pixels
Suppress salt-and-pepper noise
Clean small dust spots
Expand or contract bright details
Prepare mattes for further processing

Flow anatomy

Inputs & outputs

The port structure shows how this node fits into a Fusion graph.

Image

Source image for the operation.

RankFilter
Fusion node

Image

The processed result from this node.

Inspector

Important parameters

Start with these controls before reaching for more complicated workarounds.

Size

Sets the radius/size of the local neighborhood.

Rank

Chooses which ordered value from the neighborhood becomes the output.

Practical setup

A reliable workflow

  1. 1

    Start with the smallest Size that covers the artifact.

  2. 2

    Set Rank near the median for impulse-noise cleanup.

  3. 3

    Move Rank toward the extremes only when you intentionally want min/max behavior.

  4. 4

    Inspect fine texture and edges.

  5. 5

    Mask the effect if only local cleanup is needed.

Typical node chain
Local Neighborhood
Rank Selection
Filtered Pixel

Examples

Where this node fits in real work

Impulse-noise cleanup

Use a median-like rank to suppress isolated bright and dark specks.

MediaInRankFilterMediaOut

Matte conditioning

Use rank behavior to alter small matte features before compositing.

MatteRankFilterMatteControlMerge

Troubleshooting

Common mistakes

Using a large Size and destroying skin or film texture.
Assuming Rank is simply an opacity control.
Applying the filter globally when only a few defects need repair.

Production notes

Practical tips

Compare before/after at 100 percent.
Use masks around problem areas for restoration work.
For matte work, combine with ErodeDilate when you need more explicit morphological control.

Related nodes