DeSaltPepper: Difference between revisions

From Avisynth wiki
Jump to navigationJump to search
m Requirements: AviSynth 2.6
mNo edit summary
 
(14 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 -->1.0.0.0.0
|2=14 Oct 2015
|3=<!-- download 2.5.8 version URL -->2.5.8 version[http://www.avisynth.nl/users/vcmohan/DeSaltPepper/DeSaltPepper.zip DeSaltPepper] 2.6.0 alpha5 version URL -->[http://www.avisynth.nl/users/vcmohan/DeSaltPepper/DeSaltPepper_2_6.zip DeSaltPepper]
|3=[http://www.avisynth.nl/users/vcmohan/DeSaltPepper/DeSaltPepper_2_6.zip DeSaltPepper_2_6.zip]
|4=<!-- category -->External filters
|4=External filters
|5=<!-- license -->[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
|5=[https://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
|6=<!-- discussion URL -->[http://forum.doom9.org/showthread.php?p=895926#post895926 Announced DeSaltPepper plugin]}}
|6=[https://forum.doom9.org/showthread.php?p=895926#post895926 Doom9 Forum]}}


<br>
<br>
== Description ==
== Description ==
<!-- a one-sentence description -->
<!-- a one-sentence description -->
Impulsive noise appears on images either as relatively white (salt) or as relatively black dots (pepper)and such noises are cleaned by this plugin and a full description is at  [http://www.avisynth.nl/users/vcmohan/DeSaltPepper/DeSaltPepper.html click me].
 
<br>
DeSaltPepper uses morphology technique to identify such noise and replace those pixels by average or minimum or maximum whichever is appropriate of the surrounding pixels. [http://www.avisynth.nl/users/vcmohan/DeSaltPepper/DeSaltPepper.html Full Description].
 
 
*For AviSynth+ see [[modPlus]], includes high bit depth colorspace support and 64-bit.
<br>
<br>
== Requirements ==
== Requirements ==
* <!-- Avisynth version -->AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ 2.6.0] 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: [[YUY2]], [[YV12]], <span style="color:red">*</span>[[YV16]], <span style="color:red">*</span>[[YV24]], <span style="color:red">*</span>[[YV411]], <span style="color:red">*</span>[[Y8]]
 
: <span style="color:red">*</span> Not available in AviSynth 2.5.8.
* <!-- CPU/GPU -->
* <!-- binaries -->
* <!-- dependent plugins -->
<br>
<br>
c[opt]s[tol]i[uv]b[avg]b[feedback]i
== [[Script variables|Syntax and Parameters]] ==
== [[Script variables|Syntax and Parameters]] ==
:{{Template:FuncDef|<!-- function name -->DeSaltPepper(''clip'', ''<!-- par 1 type -->string'' "<!-- par 1 name -->opt", ''<!-- par 2 type -->int'' "<!-- par 2 name -->tol", ''<!-- par 3 type -->bool'' "<!-- par 3 name -->uv ",''<!-- par 4 type -->bool'' <!-- par 4 name -->avg", ''<!-- par 5 type -->int'' "<!-- par 5 name -->feedback")}}
:{{Template:FuncDef| DeSaltPepper (clip, string "opt", int "tol", bool "uv", bool "avg", int "feedback")}}
<br>
<br>
::{{Par2| |clip| }}
::{{Par2| |clip| }}
:::Input clip.     
::: Input clip
<br>
<br>
::{{Par2|<!-- par 1 type -->string|<!-- par 1 name -->opt|<!-- par 1 default value -->"both"}}
::{{Par2|opt|string|"both"}}
:::<!-- par 1 description -->"salt" type or "pepper" type or "both" types to be cleaned .
::: Process option:
:::* "salt"
:::* "pepper"
:::* "both"
<br>
<br>
::{{Par2|<!-- par 2 type -->int|<!-- par 2 name -->tol|<!-- par 2 default value -->0}}
::{{Par2|tol|int|0}}
:::<!-- par 2 description -->0 to 5 . up to this value noise is tolerated .
:::Tolerance limit which is not noise.
:::Range: -5 to 5
<br>
<br>
::{{Par2|<!-- par 3 type -->bool|<!-- par 3 name -->uv|<!-- par 3 default value -->true}}
::{{Par2|uv|bool|true}}
:::<!-- par 3 description -->in case of YUY2 or Planar u and v planes are also to be cleaned .
::: UV processing required?
<br>
:::* true for u, v process
::{{Par2|<!-- par 4 type -->bool|<!-- par 4 name -->avg|<!-- par 4 default value -->true}}
:::* false for not processing u, v
:::<!-- par 3 description -->use average as replacement value. Otherwise lowest or highest of rest .
 
<br>
<br>
::{{Par2|<!-- par 5 type -->int|<!-- par 5 name -->feedback|<!-- par 5 default value -->0}}
::{{Par2|avg|bool|true}}
:::<!-- par n description -->number of feed back loops to be used.0 to 10.
::: Is average is replacement value?
::::* true for average
::::* false for max value of neighborhood for salt and minimum value for pepper
<br>
<br>
::{{Par2|feedback|int|0}}
::: Number of feed back loops in processing to be used. Applicable only if <code>avg=true</code>.
:::Range: 0 to 10


<br>
<br>
== Examples ==
DeSaltPepper with default values:
[[AviSource]]("blah.avi")
DeSaltPepper(opt="both", uv=true, tol=0, avg=true, feedback=3 ) 
<br>
<br>
== Examples ==
<!-- example code block: 1st char in each line = space -->
## This is some example code to remove noise from an image.
imagereader("C:\avi_plugins\varianslim\theoin.jpg", end = 10)
converttoyv16()
ds = DeSaltPepper(imgl, opt = "both",UV = true, tol = 0, avg = true, feedback = 3 )
ds1 = DeSaltPepper(imgl, opt = "salt",UV = false, tol = 4, avg = false, feedback = 10)
ds2 = DeSaltPepper(imgl, opt = "pepper",UV = false, tol = 3, avg = true, feedback = 0)
<br>
<br>
-----------------------------------------------
-----------------------------------------------
'''Back to [[External_filters|External Filters]] &larr;'''
'''Back to [[External_filters#Denoisers|External Filters]] &larr;'''

Latest revision as of 21:17, 7 June 2020

Abstract
Author V. C. Mohan
Version 14 Oct 2015
Download DeSaltPepper_2_6.zip
Category External filters
License GPLv2
Discussion Doom9 Forum


Description

DeSaltPepper uses morphology technique to identify such noise and replace those pixels by average or minimum or maximum whichever is appropriate of the surrounding pixels. Full Description.


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


Requirements


DeSaltPepper (clip, string "opt", int "tol", bool "uv", bool "avg", int "feedback")


clip   =
Input clip


string  opt = "both"
Process option:
  • "salt"
  • "pepper"
  • "both"


int  tol = 0
Tolerance limit which is not noise.
Range: -5 to 5


bool  uv = true
UV processing required?
  • true for u, v process
  • false for not processing u, v


bool  avg = true
Is average is replacement value?
  • true for average
  • false for max value of neighborhood for salt and minimum value for pepper


int  feedback = 0
Number of feed back loops in processing to be used. Applicable only if avg=true.
Range: 0 to 10


Examples

DeSaltPepper with default values:

AviSource("blah.avi")
DeSaltPepper(opt="both", uv=true, tol=0, avg=true, feedback=3 )  




Back to External Filters