DeNoise

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(Syntax and Parameters)
m (Description)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
 
+
{{FilterCat|External_filters|Plugins|Denoisers}}
{{FilterCat4|External_filters|Plugins|<!-- category -->TODO|<!-- category -->TODO}}
+
 
+
 
{{Filter3
 
{{Filter3
|1=<!-- author -->[http://www.avisynth.nl/users/vcmohan/ V.C.Mohan]
+
|1={{Author/vcmohan}}
|2=<!-- version -->17 Oct 2017
+
|2=22 Nov 2015
|3= [http://www.avisynth.nl/users/vcmohan/modPlus/modPlus.7z modPlus.7z]
+
|3= [http://www.avisynth.nl/users/vcmohan/DeNoise/DeNoise_2_6.zip DeNoise_2_6.zip]
|4=<!-- catagory --> External filters
+
|4=External filters
 
|5=<!-- license -->[https://www.gnu.org/licenses/gpl-3.0.en.html GPLv3]
 
|5=<!-- license -->[https://www.gnu.org/licenses/gpl-3.0.en.html GPLv3]
|6=<!-- discussion URL -->[https://forum.doom9.org/showthread.php?p=712586#post712586 announced DeNoise plugin], [https://forum.doom9.org/showthread.php?t=174162 modPlus]}}
+
|6=[https://forum.doom9.org/showthread.php?p=712586#post712586 Doom9 Forum]}}
  
 
<br>
 
<br>
 
== Description ==
 
== Description ==
<!-- a one-sentence description -->
+
This is an adaptive local noise reduction filter. It uses global variance of the noise, local mean and local variance in a moving grid of specified size. It tries to preserve edges as closely as possible.  
This is an adaptive local noise reduction filter. It uses global variance of the noise, local mean and local variance in a moving grid of specified size. It tries to preserve edges as closely as possible. [http://www.avisynth.nl/users/vcmohan/modPlus/minvar.html Full Description]
+
 
<br>
+
 
 +
*Official documentation: http://www.avisynth.nl/users/vcmohan/DeNoise/DeNoise.html
 +
*For AviSynth+ see [[modPlus]], includes high bit depth colorspace support and 64-bit.
 
<br>
 
<br>
  
 
== Requirements ==
 
== Requirements ==
* AviSynth+ r2347 or later
+
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6]
 +
* Supported color formats: [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]
 
<br>
 
<br>
  
 
== [[Script variables|Syntax and Parameters]] ==
 
== [[Script variables|Syntax and Parameters]] ==
:{{Template:FuncDef| minvar (clip, int "sf", int "xgrid", int "ygrid", int "lx", int "ty", int "wd", int "ht", bool "uv", bool "a", bool "show")}}
+
:{{Template:FuncDef| DeNoise (clip, int "sf", int "ef", int "xgrid", int "ygrid", bool "getvar", bool "clip", int "lx", int "ty", int "rx", int "by", int "elx", int "ety", int "erx", int "eby", int "var", int "evar", bool "uv", bool "usey", bool "show")}}
 +
 
 
<br>
 
<br>
 
::{{Par2| |clip| }}
 
::{{Par2| |clip| }}
Line 28: Line 30:
 
<br>
 
<br>
 
::{{Par2|sf|int|0}}
 
::{{Par2|sf|int|0}}
::: Frame number in which specified window is located.
+
:::Starting frame number to process.
 +
<br>
 +
::{{Par2|ef|int| }}
 +
:::End frame number to process, default is the last frame.
 
<br>
 
<br>
 
::{{Par2|xgrid|int|5}}
 
::{{Par2|xgrid|int|5}}
 
::: Number of pixels along x axis in moving grid.
 
::: Number of pixels along x axis in moving grid.
::::* Between 3 to 9
+
:::* Between 3 to 9
 
<br>
 
<br>
 
::{{Par2|ygrid|int|xgrid}}
 
::{{Par2|ygrid|int|xgrid}}
 
::: Number of pixels along y axis in moving grid.
 
::: Number of pixels along y axis in moving grid.
::::* Between 3 to 9
+
:::* Between 3 to 9
 +
<br>
 +
::{{Par2|getvar|bool|true}}
 +
::: Is Global variance to be computed?
 +
:::* True for yes, false for is specified.
 +
<br>
 +
::{{Par2|clip|bool|true}}
 +
::: Is variance valid for all clip or only frame?
 +
:::* True for yes, false for for frame.
 
<br>
 
<br>
 
::{{Par2|lx|int|None. Must be specified}}
 
::{{Par2|lx|int|None. Must be specified}}
::: Window left x computing global variance.
+
::: Window left x at start frame for computing global variance.
::::* Within clip
+
:::* Within clip, less than <code>rx</code>.
::::* Less than rx
+
 
<br>
 
<br>
 
::{{Par2|ty|int|None. Must be specified}}
 
::{{Par2|ty|int|None. Must be specified}}
::: Window top y for computing global variance.
+
::: Window top y at start frame for computing global variance.
::::* Within clip
+
:::* Within clip, less than <code>by</code>.
::::* Less than by
+
 
<br>
 
<br>
::{{Par2|wd|int|None. Must be specified}}
+
::{{Par2|rx|int|None. Must be specified}}
::: Window width for computing global variance.
+
::: Window right x at start frame for computing global variance.
::::* lx + wd be within frame
+
:::* Within clip, more than <code>lx</code>.
 
<br>
 
<br>
::{{Par2|ht|int|None. Must be specified}}
+
::{{Par2|by|int|None. Must be specified}}
::: Window height for computing global variance.
+
::: Window bottom y at start frame for computing global varianc.
::::* ty + ht be within frame
+
:::* Within clip, more than <code>ty</code>.
 +
::{{Par2|elx|int|None. Must be specified}}
 +
::: Window left x at end frame for computing global variance.
 +
:::* Within clip, less than <code>erx</code>.
 +
<br>
 +
::{{Par2|ety|int|None. Must be specified}}
 +
::: Window top y at end frame for computing global variance.
 +
:::* Within clip, less than <code>eby</code>.
 +
<br>
 +
::{{Par2|erx|int|None. Must be specified}}
 +
::: Window right x at end frame for computing global variance.
 +
:::* Within clip, more than <code>elx</code>.
 +
<br>
 +
::{{Par2|eby|int|None. Must be specified}}
 +
::: Window bottom y at end frame for computing global variance.
 +
:::* Within clip, more than <code>ety</code>.
 +
<br>
 +
::{{Par2|var|int|100}}
 +
:::Variance specified at start frame.
 +
:::*Range: greater than 0
 +
<br>
 +
::{{Par2|evar|int|<code>var</code>}}
 +
:::Variance at end frame.
 +
:::*Range: greater than 0
 
<br>
 
<br>
 
::{{Par2|uv|bool|true}}
 
::{{Par2|uv|bool|true}}
 
::: Whether U and V of YUY2 and YUV formats to be processed.
 
::: Whether U and V of YUY2 and YUV formats to be processed.
::::* true = uv process
+
:::* true = uv process
::::* false = do not process uv
+
:::* false = do not process uv
 
<br>
 
<br>
::{{Par2|a|bool|false}}
+
::{{Par2|usey|bool|false}}
::: Whether A value of RGB formats to be processed.
+
::: Whether variance of Y to be used for u and v also.
::::* true = yes
+
:::* true = yes
::::* false = no
+
:::* false = no
 
<br>
 
<br>
 
::{{Par2|show|bool|false}}
 
::{{Par2|show|bool|false}}
 
::: Whether variance values are to be displayed as an error message.
 
::: Whether variance values are to be displayed as an error message.
::::* true = yes
+
:::* true = yes
::::* false = no
+
:::* false = no
 
<br>
 
<br>
  
 
== Examples ==
 
== Examples ==
 
<!-- example code block: 1st char in each line = space -->
 
<!-- example code block: 1st char in each line = space -->
## This is some example code to remove noise from an image.
+
*DeNoise with default values:
  imagereader("C:\avi_plugins\varianslim\theoin.jpg", end = 10)
+
  AviSource("blah.avi")
  converttoyv16()
+
  DeNoise()
  minvar(sf = 35,lx=220,wd=245,ty=322,ht=150, uv = true)
+
 
 +
 
 +
*Process all frames (sf and ef parameters are omitted):
 +
  DeNoise(getvar=false, var=120, evar=160, xgrid=5, ygrid=7)
 +
 
 +
 
 +
*Process only frames 35-55:
 +
DeNoise(sf=35, ef=55, clip=false, lx=220, rx=245, ty=322, by=402)  
  
 
<br>
 
<br>
 
<br>
 
<br>
 
-----------------------------------------------
 
-----------------------------------------------
'''Back to [[External_filters|External Filters]] &larr;'''
+
'''Back to [[External_filters#Denoisers|External Filters]] &larr;'''

Latest revision as of 04:44, 10 June 2020

Abstract
Author V. C. Mohan
Version 22 Nov 2015
Download DeNoise_2_6.zip
Category External filters
License GPLv3
Discussion Doom9 Forum


Contents

[edit] Description

This is an adaptive local noise reduction filter. It uses global variance of the noise, local mean and local variance in a moving grid of specified size. It tries to preserve edges as closely as possible.



[edit] Requirements


[edit] Syntax and Parameters

DeNoise (clip, int "sf", int "ef", int "xgrid", int "ygrid", bool "getvar", bool "clip", int "lx", int "ty", int "rx", int "by", int "elx", int "ety", int "erx", int "eby", int "var", int "evar", bool "uv", bool "usey", bool "show")


clip   =
Input clip.


int  sf = 0
Starting frame number to process.


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


int  xgrid = 5
Number of pixels along x axis in moving grid.
  • Between 3 to 9


int  ygrid = xgrid
Number of pixels along y axis in moving grid.
  • Between 3 to 9


bool  getvar = true
Is Global variance to be computed?
  • True for yes, false for is specified.


bool  clip = true
Is variance valid for all clip or only frame?
  • True for yes, false for for frame.


int  lx = None. Must be specified
Window left x at start frame for computing global variance.
  • Within clip, less than rx.


int  ty = None. Must be specified
Window top y at start frame for computing global variance.
  • Within clip, less than by.


int  rx = None. Must be specified
Window right x at start frame for computing global variance.
  • Within clip, more than lx.


int  by = None. Must be specified
Window bottom y at start frame for computing global varianc.
  • Within clip, more than ty.
int  elx = None. Must be specified
Window left x at end frame for computing global variance.
  • Within clip, less than erx.


int  ety = None. Must be specified
Window top y at end frame for computing global variance.
  • Within clip, less than eby.


int  erx = None. Must be specified
Window right x at end frame for computing global variance.
  • Within clip, more than elx.


int  eby = None. Must be specified
Window bottom y at end frame for computing global variance.
  • Within clip, more than ety.


int  var = 100
Variance specified at start frame.
  • Range: greater than 0


int  evar = var
Variance at end frame.
  • Range: greater than 0


bool  uv = true
Whether U and V of YUY2 and YUV formats to be processed.
  • true = uv process
  • false = do not process uv


bool  usey = false
Whether variance of Y to be used for u and v also.
  • true = yes
  • false = no


bool  show = false
Whether variance values are to be displayed as an error message.
  • true = yes
  • false = no


[edit] Examples

  • DeNoise with default values:
AviSource("blah.avi")
DeNoise()


  • Process all frames (sf and ef parameters are omitted):
DeNoise(getvar=false, var=120, evar=160, xgrid=5, ygrid=7) 


  • Process only frames 35-55:
DeNoise(sf=35, ef=55, clip=false, lx=220, rx=245, ty=322, by=402) 




Back to External Filters

Personal tools