WarpSharp/Xsharpen

From Avisynth wiki
Revision as of 21:05, 29 November 2015 by Reel.Deal (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

Syntax and Parameters

Xsharpen (clip, int "strength", int "threshold")


clip   =
Input 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  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.


Examples

Xsharpen with default settings:

AviSource("Blah.avi")
Xsharpen(strength=128, threshold=8) 



Back to WarpSharp

Personal tools