Median
Abstract | |
---|---|
Author | ajk |
Version | v0.5 |
Download | Median-0.5.zip |
Category | Averaging |
License | Public domain. Credit would be nice, but do with this what you will. |
Discussion | Doom9 Thread, VideoHelp Thread |
Contents |
Description
Median.dll is a filter plugin for AviSynth which generates a pixel-by-pixel median of several clips. This is particularly useful for filtering out noise and glitches from multiple VHS/SVHS/8mm/Hi8 tape captures, but can be used for other purposes also.
Requirements
Syntax and Parameters
Median
- Median (clip, clip, clip, ..., bool "chroma")
- clip =
- Input clips between 3 and 25 are accepted. Odd number of clips is required.
- clip =
- bool chroma = true
- Chroma is processed by default, but this can be turned off in which case the chroma from the first clip is used. In the case of RGB input, all colour planes are always processed. With RGB32 the chroma parameter can be used to turn off alpha channel processing.
- bool chroma = true
- int field = -1
- int field = -1
MedianBlend
There is also another, more flexible filter included, MedianBlend(). This function can be adjusted to for example return a clip derived from the minimum or maximum pixel values, or to discard some low (default: 1) and high (default: 1) values and blend the others together. The chroma parameter works the same way as for Median().
- Median (clip, clip, clip, ..., int "low", int "high", bool "chroma")
- clip =
- Input clips between 3 and 25 are accepted.
- clip =
- int low = 1
- int high = 1
- int low = 1
- bool chroma = true
- bool chroma = true
TemporalMedian
You can also use the filter temporally on a single source clip. In this case you select a radius between 1 and 12 (default: 1), and the filter will take that many preceding and following frames into account when calculating the median. The chroma parameter works the same way as for Median().
- Median (clip, int "radius", bool "chroma")
- clip =
- Input clip.
- clip =
- int radius = 1
- int radius = 1
- bool chroma = true
- bool chroma = true
Examples
Median of three clips, chroma is not processed:
clip1 = AVISource("capture1.avi") clip2 = AVISource("capture2.avi") clip3 = AVISource("capture3.avi")
Median(clip1,clip2,clip3, chroma=false)
Discard two highest values (-> minimum)
MedianBlend(clip1,clip2,clip3, low=0, high=2)
Discard two lowest values (-> maximum)
MedianBlend(clip1,clip2,clip3, low=2, high=0)
Discard highest and lowest value and average the two remaining ones
MedianBlend(clip1,clip2,clip3,clip4, low=1, high=1)
Median of five frames: current, two preceding, and two following:
TemporalMedian(clip, radius=2)
Changelog
Version Date Changes
v0.5 15/03/2014 - Fixed bug with chroma=false. Added TemporalMedian() functionality. v0.4 14/02/2014 - Added MedianBlend() functionality. v0.3 13/02/2014 - Fixed output frame buffer issue. v0.2 13/02/2014 - Added support for other colour spaces (planar and RBG24/32). v0.1 12/02/2014 - Initial release. YUY2 support only.
Archived Downloads
Version | Download | Mirror |
---|---|---|
v0.5 | Median-0.5.zip | Median-0.5.zip |
For older versions take a look at ajk's repository (archived).
External Links
Back to External Filters ←