SegmentedAmp

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with " {{FilterCat4|External_filters|Plugins|<!-- category -->TODO|<!-- category -->TODO}} {{Filter3 |1=<!-- author -->[http://www.avisynth.nl/users/vcmohan/ V.C.Mohan] |2=<!-- ver...")
 
m (Syntax and Parameters)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
 
+
{{FilterCat4|External_filters|Plugins|Denoisers|<!-- category -->TODO}}
{{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=17 Oct 2015
|3=<!-- download 2.5.8 version URL -->2.5.8 version[http://www.avisynth.nl/users/vcmohan/SegmentedAmp/SegmentedAmp.zip SegmentedAmp] 2.6.0 alpha5 version URL -->[http://www.avisynth.nl/users/vcmohan/SegmentedAmp/SegmentedAmp_2_6.zip SegmentedAmp]
+
|3=[http://www.avisynth.nl/users/vcmohan/SegmentedAmp/SegmentedAmp_2_6.zip SegmentedAmp_2_6.zip ]
|4=<!-- category -->External filters
+
|4=External filters
 
|5=<!-- license -->[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
 
|5=<!-- license -->[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
|6=<!-- discussion URL -->[http://forum.doom9.org/showthread.php?t=117710&highlight=SegmentedAmp SegmentedAmp plugin]}}
+
|6=<!-- discussion URL -->[http://forum.doom9.org/showthread.php?t=117710 Doom9 Forum]}}
  
 
<br>
 
<br>
Line 14: Line 12:
 
<!-- a one-sentence description -->
 
<!-- a one-sentence description -->
 
Image is segmented with watershed algorithm for smoothening and or sharpening  and a full description is at  [http://www.avisynth.nl/users/vcmohan/SegmentedAmp/SegmentedAmp.html click me].
 
Image is segmented with watershed algorithm for smoothening and or sharpening  and a full description is at  [http://www.avisynth.nl/users/vcmohan/SegmentedAmp/SegmentedAmp.html click me].
<br>
+
 
 +
 
 +
*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/files/AviSynth_Alpha_Releases/ 2.6.0 Alpha 5 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: [[RGB32]], [[RGB24]], [[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[sh]i[sm]i[c4]b[useclip]b[sclip]c[smu]i[smv]i
 
 
 
 
== [[Script variables|Syntax and Parameters]] ==
 
== [[Script variables|Syntax and Parameters]] ==
:{{Template:FuncDef|<!-- function name -->SegmentedAmp(''clip'', ''<!-- par 1 type -->int'' "<!-- par 1 name -->sh", ''<!-- par 2 type -->int'' "<!-- par 2 name -->sm", ''<!-- par 3 type -->bool'' "<!-- par 3 name -->c4 ",''<!-- par 4 type -->bool'' "<!-- par 4 name -->useclip",''<!-- par 5 type -->clip'' "<!-- par 5 name -->sclip",''<!-- par 6 type -->int'' "<!-- par 6 name -->smu",''<!-- par 7 type -->int'' "<!-- par 7 name -->smv")}}
+
:{{Template:FuncDef|SegmentedAmp(''clip'', int'' "sh", ''int'' "sm", ''bool'' "c4", ''bool'' "useclip", ''clip'' "sclip", ''int'' "smu", ''int'' "smv")}}
 
<br>
 
<br>
 
::{{Par2| |clip| }}
 
::{{Par2| |clip| }}
 
:::Input clip.  
 
:::Input clip.  
 
<br>
 
<br>
::{{Par2|<!-- par 1 type -->int|<!-- par 1 name -->sh|<!-- par 1 default value -->2}}
+
::{{Par2|int|sh|-2}}
:::<!-- par 1 description -->sharpening factor.    
+
:::Sharpening factor for RGB and Y (luma plane) only.
 +
:::*Range: -10 to 10, must not be 0 for RGB formats.
 
<br>
 
<br>
::{{Par2|<!-- par 2 type -->int|<!-- par 2 name -->sm|<!-- par 2 default value -->2}}
+
::{{Par2|int|sm|2}}
:::<!-- par 2 description -->smoothening factor .
+
:::Smoothening factor for RGB and Y (luma plane) only.
 
+
:::*Range: -10 to 10, must not be 0 for RGB formats.
 
<br>
 
<br>
::{{Par2|<!-- par 3 type -->bool|<!-- par 3 name -->c4|<!-- par 3 default value -->true}}
+
::{{Par2|bool|c4|true}}
:::<!-- par 3 description -->connect 4 to be used in watershed.If false connect 8 used.
+
:::Nearest 4 or 8 to be used for connectivity:
 +
:::*<code>true</code>, connect 4 will be used in watershed.
 +
:::*<code>false</code> connect 8 will be used.
 
<br>
 
<br>
::{{Par2|<!-- par 4 type -->bool|<!-- par 4 name -->useclip|<!-- par 4 default value -->false}}
+
::{{Par2|bool|useclip|false}}
:::<!-- par 4 description -->whether a smoothed clip to be used for watershed segmentation? .
+
:::Use a different clip for watershed segmentation?.
 +
:::*<code>true</code> for use clip in provided in <code>sclip</code>.
 +
:::*<code>false</code> for segment and process the input clip.
 
<br>
 
<br>
::{{Par2|<!-- par 5 type -->clip|<!-- par 5 name -->sclip|<!-- par 5 default value -->none}}
+
::{{Par2|clip|sclip|none}}
:::<!-- par 5 description -->if useclip is true then this clip to be used.
+
:::if <code>useclip</code> is true then this clip is to be used. Does not to be specified if <code>useclip</code> is false.
 
<br>
 
<br>
::{{Par2|<!-- par 6 type -->int|<!-- par 6 name -->smu|<!-- par 6 default value -->0}}
+
::{{Par2|int|smu|0}}
:::<!-- par 6 description --> u values  smoothening factor. 0 means no .
+
::: Smoothening factor for U chroma channel.  
 +
:::*Range: -10 to 10, 0 means no smoothening.
 
<br>
 
<br>
::{{Par2|<!-- par 7 type -->int|<!-- par 7 name -->smv|<!-- par 7 default value -->0}}
+
::{{Par2|int|smv|0}}
:::<!-- par 7 description -->v value smoothening factor .
+
:::Smoothening factor for V chroma channel. 0 means no smoothening.
<br>
+
:::*Range: -10 to 10, 0 means no smoothening.
 
+
 
<br>
 
<br>
 
<br>
 
<br>
  
 +
== Examples ==
 +
* SegmentedAmp with default values:
 +
AviSource("blah.avi")
 +
SegmentedAmp(sh=-2, sm=2, c4=true, useclip=false, smu=0, smv=0)
  
== Examples ==
+
 
<!-- example code block: 1st char in each line = space -->
+
* This is some example code to sharpen and smooth  an image.
## This is some example code to sharpen and smooth  an image.
+
  AviSource("blah.avi")<br>
  imagereader("C:\..........jpg", end = 10)
+
a = avisource("C;\..........avi").converttoYV16()
+
converttoyv16()
+
 
  # use a blurred image to prevent over segmentation
 
  # use a blurred image to prevent over segmentation
  gb = GBlur()
+
  gb = [[GBlur]]()
  segmentedAmp( sh = 3,smU = 6,smv = 2, useclip = true, sclip = gb)
+
  SegmentedAmp(sh=3, smU=6, smv=2, useclip=true, sclip=gb)
+
 
 +
<br>
 
<br>
 
<br>
 
-----------------------------------------------
 
-----------------------------------------------
 
'''Back to [[External_filters|External Filters]] &larr;'''
 
'''Back to [[External_filters|External Filters]] &larr;'''

Latest revision as of 21:54, 7 June 2020

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


Contents

[edit] Description

Image is segmented with watershed algorithm for smoothening and or sharpening and a full description is at click me.


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


[edit] Requirements


[edit] Syntax and Parameters

SegmentedAmp(clip, int "sh", int "sm", bool "c4", bool "useclip", clip "sclip", int "smu", int "smv")


clip   =
Input clip.


sh  int = -2
Sharpening factor for RGB and Y (luma plane) only.
  • Range: -10 to 10, must not be 0 for RGB formats.


sm  int = 2
Smoothening factor for RGB and Y (luma plane) only.
  • Range: -10 to 10, must not be 0 for RGB formats.


c4  bool = true
Nearest 4 or 8 to be used for connectivity:
  • true, connect 4 will be used in watershed.
  • false connect 8 will be used.


useclip  bool = false
Use a different clip for watershed segmentation?.
  • true for use clip in provided in sclip.
  • false for segment and process the input clip.


sclip  clip = none
if useclip is true then this clip is to be used. Does not to be specified if useclip is false.


smu  int = 0
Smoothening factor for U chroma channel.
  • Range: -10 to 10, 0 means no smoothening.


smv  int = 0
Smoothening factor for V chroma channel. 0 means no smoothening.
  • Range: -10 to 10, 0 means no smoothening.



[edit] Examples

  • SegmentedAmp with default values:
AviSource("blah.avi")
SegmentedAmp(sh=-2, sm=2, c4=true, useclip=false, smu=0, smv=0)


  • This is some example code to sharpen and smooth an image.
AviSource("blah.avi")
# use a blurred image to prevent over segmentation gb = GBlur() SegmentedAmp(sh=3, smU=6, smv=2, useclip=true, sclip=gb)




Back to External Filters

Personal tools