WarpSharp/Xsharpen
(WarpSharp/Xsharpen) |
(more info) |
||
Line 1: | Line 1: | ||
{{FilterCat4|External_filters|Plugin_functions|Adjustment_filters|Sharpeners}} | {{FilterCat4|External_filters|Plugin_functions|Adjustment_filters|Sharpeners}} | ||
− | Sharpening filter like VirtualDub's [http://rationalqm.us/xsharp.html Xsharpen]. It | + | Sharpening filter like VirtualDub's [http://rationalqm.us/xsharp.html Xsharpen]. This filter performs a subtle but useful sharpening effect. It operates by running a small window over the frame and each center pixel is either passed through untouched (depending upon a {{Template:FuncDef3|threshold}} setting), or mapped to either the brightest or dimmest pixel in the window, depending upon which is nearest to the center pixel. If the center pixel is mapped, it is also alpha-blended with the original pixel value using a configurable {{Template:FuncDef3|strength}} setting. The result is a sharpening effect that not only avoids amplifying noise, but also tends to reduce it. A welcome side effect is that files processed with this filter tend to compress to smaller files. |
− | + | <br> | |
− | + | ||
− | + | ||
− | + | ||
<br> | <br> | ||
− | |||
== [[Script variables|Syntax and Parameters]] == | == [[Script variables|Syntax and Parameters]] == | ||
:{{Template:FuncDef|Xsharpen (clip, int "strength", int "threshold")}} | :{{Template:FuncDef|Xsharpen (clip, int "strength", int "threshold")}} | ||
Line 14: | Line 10: | ||
<br> | <br> | ||
::{{Par2|strength|int|128|}} | ::{{Par2|strength|int|128|}} | ||
− | ::: | + | :::When this value is 255, mapped pixels are not blended with the original pixel values, so a full-strength effect is obtained. As the value is reduced, each mapped pixel is blended with more of the original pixel. At a value of 0, the original pixels are passed through and there is no sharpening effect. |
<br> | <br> | ||
::{{Par2|threshold|int|8}} | ::{{Par2|threshold|int|8}} | ||
− | ::: | + | :::This value determines how close a pixel must be to the brightest or dimmest pixel to be mapped. If a pixel is more than {{Template:FuncDef3|threshold}} away from the brightest or dimmest pixel, it is not mapped. Thus, as the {{Template:FuncDef3|threshold}} is reduced, pixels in the mid range start to be spared. |
<br> | <br> | ||
Latest revision as of 21:05, 29 November 2015
Sharpening filter like VirtualDub's Xsharpen. This filter performs a subtle but useful sharpening effect. It operates by running a small window over the frame and each center pixel is either passed through untouched (depending upon a threshold setting), or mapped to either the brightest or dimmest pixel in the window, depending upon which is nearest to the center pixel. If the center pixel is mapped, it is also alpha-blended with the original pixel value using a configurable strength setting. The result is a sharpening effect that not only avoids amplifying noise, but also tends to reduce it. A welcome side effect is that files processed with this filter tend to compress to smaller files.
[edit] Syntax and Parameters
- Xsharpen (clip, int "strength", int "threshold")
- clip =
- Input clip.
- clip =
- int strength = 128
- When this value is 255, mapped pixels are not blended with the original pixel values, so a full-strength effect is obtained. As the value is reduced, each mapped pixel is blended with more of the original pixel. At a value of 0, the original pixels are passed through and there is no sharpening effect.
- int strength = 128
- int threshold = 8
- This value determines how close a pixel must be to the brightest or dimmest pixel to be mapped. If a pixel is more than threshold away from the brightest or dimmest pixel, it is not mapped. Thus, as the threshold is reduced, pixels in the mid range start to be spared.
- int threshold = 8
[edit] Examples
Xsharpen with default settings:
AviSource("Blah.avi") Xsharpen(strength=128, threshold=8)
Back to WarpSharp ←