DeNoise

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(Undo revision 10334 by Yakub2.X (talk))
m (Description)
 
(5 intermediate revisions by 2 users 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.
Using Variance of a given window, minimizes noise and tries to preserve edges and a full description is at  [http://www.avisynth.nl/users/vcmohan/modPlus/minvar.html click me].
+
 
<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 greater
+
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6]
* <!-- source video: progressive
+
* Supported color formats: [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]
* <!-- color formats -->Supported color formats: [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[Y8]]
+
 
<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 29: 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
 
+
<br>
 
+
::{{Par2|getvar|bool|true}}
::* Between 3 to 9
+
::: 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, less than <code>rx</code>.
 
+
 
+
::* Within clip
+
::* 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, less than <code>by</code>.
 
+
 
+
::* Within clip
+
::* 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.
 
+
:::* Within clip, more than <code>lx</code>.
 
+
 
+
::* lx + wd be within frame
+
 
<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.
 
+
:::* Within clip, more than <code>ty</code>.
 
+
::{{Par2|elx|int|None. Must be specified}}
 
+
::: Window left x at end frame for computing global variance.
::* ty + ht be within frame
+
:::* 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
 
+
:::* false = do not process uv
 
+
::* true for uv process, false for not process
+
 
<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
 
+
:::* false = no
 
+
::* true yes, 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
 +
:::* false = no
 +
<br>
  
 +
== Examples ==
 +
<!-- example code block: 1st char in each line = space -->
 +
*DeNoise with default values:
 +
AviSource("blah.avi")
 +
DeNoise()
  
  
::* true yes, false no
+
*Process all frames (sf and ef parameters are omitted):
<br>
+
DeNoise(getvar=false, var=120, evar=160, xgrid=5, ygrid=7)
  
<br>
 
<br>
 
  
== Examples ==
+
*Process only frames 35-55:
<!-- example code block: 1st char in each line = space -->
+
  DeNoise(sf=35, ef=55, clip=false, lx=220, rx=245, ty=322, by=402)  
## This is some example code to remove noise from an image.
+
  imagereader("C:\avi_plugins\varianslim\theoin.jpg", end = 10)
+
converttoyv16()
+
minvar(sf = 35,lx=220,wd=245,ty=322,ht=150, uv = true)
+
  
 
<br>
 
<br>
 
<br>
 
<br>
 
-----------------------------------------------
 
-----------------------------------------------
'''Back to [[External_filters|External Filters]] &larr;'''
+
'''Back to [[External_filters#Denoisers|External Filters]] &larr;'''

Latest revision as of 03: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