DeSaltPepper

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (Requirements: AviSynth 2.6)
(modPlus modifications)
Line 3: Line 3:
  
 
{{Filter3
 
{{Filter3
|1=<!-- author -->[http://www.avisynth.nl/users/vcmohan/ V.C.Mohan]
+
|1=<!-- author --> [http://www.avisynth.nl/users/vcmohan/ V.C.Mohan]
|2=<!-- version -->1.0.0.0.0
+
|2=<!-- version --> 17 Oct 2017
|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=<!-- URL --> [http://www.avisynth.nl/users/vcmohan/modPlus/modPlus.7z Download]
|4=<!-- category -->External filters
+
|4=<!-- category --> External filters
|5=<!-- license -->[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
+
|5=<!-- license --> [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=<!-- discussion URL --> [https://forum.doom9.org/showthread.php?p=895926#post895926 Announced DeSaltPepper plugin]}}
  
<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].
+
 
 +
The function SaltPepper 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/modPlus/SaltPepper.html Full Description].
 +
 
 +
 
 +
Requires AviSynth+ r2347 or greater
 
<br>
 
<br>
 
<br>
 
<br>
== Requirements ==
 
* <!-- Avisynth version -->AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ 2.6.0] or greater
 
* <!-- source video: progressive
 
* <!-- 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>
 
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|<!-- function name -->DeSaltPepper(''clip'', ''<!-- par 1 type -->string'' "<!-- par 1 name -->opt", ''<!-- par 2 type -->bool'' "<!-- par 2 name -->uv ",''<!-- par 3 type -->bool'' <!-- par 3 name -->avg", ''<!-- par 4 type -->int'' "<!-- par 4 name -->feedback")}}
 
<br>
 
<br>
 
::{{Par2| |clip| }}
 
::{{Par2| |clip| }}
Line 34: Line 27:
 
<br>
 
<br>
 
::{{Par2|<!-- par 1 type -->string|<!-- par 1 name -->opt|<!-- par 1 default value -->"both"}}
 
::{{Par2|<!-- par 1 type -->string|<!-- par 1 name -->opt|<!-- par 1 default value -->"both"}}
:::<!-- par 1 description -->"salt" type or "pepper" type or "both" types to be cleaned .
+
:::<!-- par 1 description --> Option of process.  
 
<br>
 
<br>
::{{Par2|<!-- par 2 type -->int|<!-- par 2 name -->tol|<!-- par 2 default value -->0}}
+
::{{Par2|<!-- par 2 type -->bool|<!-- par 3 name -->uv|<!-- par 2 default value -->true}}
:::<!-- par 2 description -->0 to 5 . up to this value noise is tolerated .
+
:::<!-- par 2 description --> UV processing required?
<br>
+
::{{Par2|<!-- par 3 type -->bool|<!-- par 3 name -->uv|<!-- par 3 default value -->true}}
+
:::<!-- par 3 description -->in case of YUY2 or Planar u and v planes are also to be cleaned .
+
<br>
+
::{{Par2|<!-- par 4 type -->bool|<!-- par 4 name -->avg|<!-- par 4 default value -->true}}
+
:::<!-- par 3 description -->use average as replacement value. Otherwise lowest or highest of rest .
+
 
+
<br>
+
::{{Par2|<!-- par 5 type -->int|<!-- par 5 name -->feedback|<!-- par 5 default value -->0}}
+
:::<!-- par n description -->number of feed back loops to be used.0 to 10.
+
 
<br>
 
<br>
 +
::{{Par2|<!-- par 3 type -->bool|<!-- par 3 name -->avg|<!-- par 3 default value -->true}}
 +
:::<!-- par 3 description --> Is average is replacement value?
  
 
<br>
 
<br>
 +
::{{Par2|<!-- par 4 type -->int|<!-- par 4 name -->feedback|<!-- par 4 default value -->0}}
 +
:::<!-- par n description --> Number of feed back loops in processing to be used. applicable only if avg is true. 0 to 10.
 
<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.
+
  SaltPepper(img, opt = "both",UV = true, tol = 0, avg = true, feedback = 3 )
imagereader("C:\avi_plugins\varianslim\theoin.jpg", end = 10)
+
 
converttoyv16()
+
ds = SaltPepper(img, opt = "both",UV = true)
ds = DeSaltPepper(imgl, opt = "both",UV = true, tol = 0, avg = true, feedback = 3 )
+
  ds1 = SaltPepper(img, opt = "salt",UV = false, avg = false)
  ds1 = DeSaltPepper(imgl, opt = "salt",UV = false, tol = 4, avg = false, feedback = 10)
+
  ds2 = SaltPepper(ds1, opt = "pepper",UV = true)
  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|External Filters]] &larr;'''

Revision as of 04:12, 18 June 2018


Abstract
Author V.C.Mohan
Version 17 Oct 2017
Download Download
Category External filters
License GPLv2
Discussion Announced DeSaltPepper plugin

Description

The function SaltPepper 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.


Requires AviSynth+ r2347 or greater

Syntax and Parameters

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


clip   =
Input clip.


opt  string = "both"
Option of process.


uv  bool = true
UV processing required?


avg  bool = true
Is average is replacement value?


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


Examples

SaltPepper(img, opt = "both",UV = true, tol = 0, avg = true, feedback = 3 ) 
ds = SaltPepper(img, opt = "both",UV = true)
ds1 = SaltPepper(img, opt = "salt",UV = false, avg = false)
ds2 = SaltPepper(ds1, opt = "pepper",UV = true)



Back to External Filters

Personal tools