Log in

View Full Version : Request - Sharpening Filter


jinkazuya
1st November 2013, 05:30
Just wonder if there is any sharpening filter that should sharpen the details without providing too much grain or artifacts? Finesharp is an awesome filter. However, it just sharpens everything even the artifacts appear in the video. Have been using finesharp for a while but would prefer something that could enhance videos a bit more (not anime).

I know it seems impossible to get one perfect filter which is good for everything. One filter might be good for one movie but bad for another.

Also, are there any other filters that could help eliminate the lower bit rate videos such as blocky pictures or jaggy edges?

Thanks a lot.

turbojet
1st November 2013, 08:26
LimitedSharpen/LSF does a better job of not sharpening grain and fewer artifacts but the sharpening isn't uniform. If you can use pixel shaders LumaSharpen gives a nice uniform sharpen while barely touching grain and very few artifacts but it hasn't been translated to avisynth yet.

Didée
1st November 2013, 21:06
Just wonder if there is any sharpening filter that should sharpen the details without providing too much grain or artifacts? Finesharp is an awesome filter. However, it just sharpens everything even the artifacts appear in the video.
Strictly, it's not the job of a sharpening filter to bypass noise. Specifically: there are bazillions of different ways to identify noise (that's the reason why there is a bazillion of different noise-reduction filters). Hence it makes little sense to ask for "the one very method" to avoid sharpening of noise and source artifacts.
Hint: Take the available tools, and make it your own ...
source = whatever
filter = source.AnyDenoiserThatFitsTheSource()
sharpy = filter.YourSharpenerOfChoice()
result = source.mt_makediff(mt_makediff(filter,sharpy),U=2,V=2)
This way, you are not denoising the source, but just the sharpening procedure is performed on a denoised source (which should avoid unwanted artifacts, given that the denoise filter "fits"), then the achieved sharpening-difference is applied to the original, not-denoised clip.

See also e.g. this thread (http://forum.doom9.org/showthread.php?t=153170) for same/similar/more ideas.

Gavino
1st November 2013, 21:31
result = source.mt_makediff(mt_makediff(filter,sharpy),U=2,V=2)
Should this be
result = source.mt_adddiff(mt_makediff(filter,sharpy),U=2,V=2)

Didée
2nd November 2013, 17:10
No, it shouldn't. Unless you want to turn the sharp-filter into a blur-filter.

adddiff(makediff()) is the often-used combo when constructing a sharp-filter by means of a blur-filter, i.e. applying the negative difference. Here, the script structure is using a sharp-filter directly, hence the combo is makediff(makediff()), to peel the sharpness-difference from the worker clip, and lay it onto the original.

Gavino
2nd November 2013, 21:22
Thanks, I see how it works now.

I think this (note switching the order of the args in the inner makediff) would give exactly the same result:
result = source.mt_adddiff(mt_makediff(sharpy,filter),U=2,V=2)
This seems a more intuitive expression to me, adding to the source the difference that the sharpener has made.

From the definitions, it turns out that
mt_makediff(a, mt_makediff(b, c))
is equivalent to
mt_adddiff(a, mt_makediff(c, b))

jinkazuya
4th November 2013, 03:26
Well...Thanks so much for all you guys' help. However I have a question, should the video clip get denoised first before applying the sharpening filter? I have been using finesharp for a while, it is a pretty good filter. I would just want to know if there is any compatible denoised filter that work well with finesharp or maybe a way to enhance it? I have tried different kinds of denoised filters and the theory Didée suggested. But the result is not what I want due to the denoised filters. Since my knowledge of video processing is limited. It would be great if somebody could point me to the right direction of writing a video script if I had to.