Difference between revisions of "AdaptiveMedian"

From Avisynth wiki
Jump to: navigation, search
(Updated "AdaptiveMedian" to Median. More compatibility with AviSynth+.)
m
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{FilterCat4|External_filters|Plugins|Denoisers|TODO}}
+
{{FilterCat|External_filters|Plugins|Denoisers}}
 
{{Filter3
 
{{Filter3
|[http://www.avisynth.nl/users/vcmohan/ V.C.Mohan]
+
|{{Author/vcmohan}}
|17 Oct 2017
+
| 22 Nov 2015
| [http://www.avisynth.nl/users/vcmohan/modPlus/modPlus.7z modPlus (includes Median filter)]
+
| [http://www.avisynth.nl/users/vcmohan/AdaptiveMedian/AdaptiveMedian_2_6.zip AdaptiveMedian_2_6.zip]
 
|4=External filters
 
|4=External filters
 
|5=[https://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
 
|5=[https://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
|6=[https://forum.doom9.org/showthread.php?p=712586#post712586 AdaptiveMedian], [https://forum.doom9.org/showthread.php?t=174162 modPlus update]}}
+
|6=[https://forum.doom9.org/showthread.php?p=712586#post712586 Doom9Forum]}}
  
 
== Description ==
 
== Description ==
  
Median value in an adaptive size grid is used to clean impulse noise, smooth out other noise and reduce excessive thinning of edges and for a full description [http://www.avisynth.nl/users/vcmohan/modPlus/Median.html click me].
+
This is an adaptive Median Filter for eliminating certain types of noise. It uses local statistics (minimum, maximum and median values) of a moving local grid, and changes grid size depending on local statistics. [http://www.avisynth.nl/users/vcmohan/AdaptiveMedian/AdaptiveMedian.html Full Description]
<br>
+
 
 +
 
 +
*For AviSynth+ see [[modPlus]], includes high bit depth colorspace support and 64-bit.
 
<br>
 
<br>
 
== Requirements ==
 
== Requirements ==
* AviSynth+ r2347 or greater
+
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6]
* <!-- color formats -->Supported color formats: [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[Y8]]
+
* Supported color formats: [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]
 +
 
 
<br>
 
<br>
 
 
== [[Script variables|Syntax and Parameters]] ==
 
== [[Script variables|Syntax and Parameters]] ==
:{{Template:FuncDef|<!-- function name --> Median (''clip'', ''int'' "maxgrid", ''bool'' "yy", ''bool'' "uu", ''bool'' "vv")}}
+
:{{Template:FuncDef|AdaptiveMedian (''clip'', ''int'' "sf", ''int'' "ef", ''int'' "maxgrid", ''bool'' "yy", ''bool'' "uu", ''bool'' "vv")}}
 
<br>
 
<br>
 
::{{Par2| |clip| }}
 
::{{Par2| |clip| }}
:::Input clip.      
+
:::Input clip.
 +
<br>
 +
::{{Par2|sf|int|0}}
 +
:::Starting frame number to process.
 +
<br>
 +
::{{Par2|ef|int| }}
 +
:::End frame number to process, default is the last frame.
 
<br>
 
<br>
 
::{{Par2|maxgrid|int|5}}
 
::{{Par2|maxgrid|int|5}}
:::Grid size to get statistics can grow to this value starting from 3x3. Maximum value allowed is 9.
+
:::Grid size to get statistics can grow to this value starting from 3x3.
 +
::::Range: 3 to 9
 
<br>
 
<br>
 
::{{Par2|yy|bool|true}}
 
::{{Par2|yy|bool|true}}
Line 31: Line 40:
 
::{{Par2|vv|bool|false}}
 
::{{Par2|vv|bool|false}}
 
:::Choose which [[YUV]] planes to process.
 
:::Choose which [[YUV]] planes to process.
:::*True : don't process  
+
::::* True : Do not process  
:::*False : process
+
::::* False: Process
 
:::By default only the luma plane (Y) is processed. If the input clip is [[RGB]], then these parameters are simply ignored.
 
:::By default only the luma plane (Y) is processed. If the input clip is [[RGB]], then these parameters are simply ignored.
 
<br>
 
<br>
  
 
== Examples ==
 
== Examples ==
Median with default settings:
+
AdaptiveMedian with default values:
  [[AviSource]]("example.avi")
+
   
  Median(maxgrid=5, yy=true, uu=false, vv=false)
+
AviSource("blah.avi")
 +
  AdaptiveMedian(a, maxgrid=5, yy=true, uu=false, vv=false)
 +
 
 
<br>
 
<br>
 
<br>
 
<br>
 
-----------------------------------------------
 
-----------------------------------------------
'''Back to [[External_filters|External Filters]] &larr;'''
+
'''Back to [[External_filters#Denoisers|External Filters]] &larr;'''

Latest revision as of 21:16, 7 June 2020

Abstract
Author V. C. Mohan
Version 22 Nov 2015
Download AdaptiveMedian_2_6.zip
Category External filters
License GPLv2
Discussion Doom9Forum

Description

This is an adaptive Median Filter for eliminating certain types of noise. It uses local statistics (minimum, maximum and median values) of a moving local grid, and changes grid size depending on local statistics. Full Description


  • For AviSynth+ see modPlus, includes high bit depth colorspace support and 64-bit.


Requirements


Syntax and Parameters

AdaptiveMedian (clip, int "sf", int "ef", int "maxgrid", bool "yy", bool "uu", bool "vv")


clip   =
Input clip.


int  sf = 0
Starting frame number to process.


int  ef =
End frame number to process, default is the last frame.


int  maxgrid = 5
Grid size to get statistics can grow to this value starting from 3x3.
Range: 3 to 9


bool  yy = true
bool  uu = false
bool  vv = false
Choose which YUV planes to process.
  • True : Do not process
  • False: Process
By default only the luma plane (Y) is processed. If the input clip is RGB, then these parameters are simply ignored.


Examples

AdaptiveMedian with default values:

AviSource("blah.avi")
AdaptiveMedian(a, maxgrid=5, yy=true, uu=false, vv=false)




Back to External Filters