Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th December 2005, 18:47   #1  |  Link
Pookie
Registered User
 
Join Date: Apr 2005
Posts: 1,339
New Sharpening Function from Didée -'SeeSaw'

Per the file - " This function provides a (simple) implementation of the "crystality sharpen" principle. In conjunction with a user-specified denoised clip, the aim is to enhance weak detail, hopefully without oversharpening or creating jaggies on strong detail, and produce a result that is temporally stable without detail shimmering, while keeping everything within reasonable bitrate requirements. This is done by intermixing source, denoised source and a modified sharpening process, in a seesaw-like manner "

More of a detail enhancer than a regular sharpener. Also lets you really turn up the denoising without the typical ringing and haloing. I've had very nice results using DegrainMedian as the function's denoiser. VagueDenoiser also seems to work well.

Requirements -

http://home.arcor.de/kassandro/Remov...emoveGrain.rar

http://manao4.free.fr/MaskTools-v1.5.8.zip

http://home.arcor.de/dhanselmann/_st...2006.01.02.rar

Call it from your script like this:

a= last

b=a.yourfavoritedenoiser()

SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)


Several additional parameters documented in the SeeSaw.avs file.


Good Stuff, Didée. Thanks.

(Examples)

Original


SeeSaw


6MB XVID Example ftp://tempclips%40avisynth.org:QfJY(...th.org/c3x.avi

(Thanks to Richard Berg for the hosting space)

Last edited by Pookie; 11th February 2006 at 22:49.
Pookie is offline   Reply With Quote
Old 27th December 2005, 20:06   #2  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
I experimented with SeeSaw on a crappy source that had little detail and needed deblocking and it didn't give me too good results. Could you post a few suggested usages, like your alternative with DeGrainMedian as denoiser?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.
Chainmax is offline   Reply With Quote
Old 27th December 2005, 20:16   #3  |  Link
Pookie
Registered User
 
Join Date: Apr 2005
Posts: 1,339
Quote:
Originally Posted by Chainmax
I experimented with SeeSaw on a crappy source that had little detail and needed deblocking and it didn't give me too good results. Could you post a few suggested usages, like your alternative with DeGrainMedian as denoiser?
You bet. As a 'detail enhancer', the SeeSaw function seems well suited for clarifying already decent looking video. A friend who saw the examples likened it to "putting the fuzz back on the peach". So, a blocky source is going to look like a pronounced blocky target. Here are the settings I used on the above examples:

a = last

b=a.degrainmedian(mode=2).VagueDenoiser(threshold=0.8, method=1, nsteps=6, chromaT=0.8)

SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)


Here's an example of a noisier source, using FFT3Dfilter in place of DegrainMedian and VagueDenoiser. This one has been pushed to demonstrate the effect. There's a huge amount of chroma cleaning/stripping applied (look at the eyes), but the target looks clean and sharp.

ftp://tempclips%40avisynth%2Eorg:QfJ...Saw-3d-CGX.avi

Last edited by Pookie; 26th June 2006 at 06:38.
Pookie is offline   Reply With Quote
Old 28th December 2005, 11:39   #4  |  Link
morsa
the dumbest
 
Join Date: Oct 2002
Location: Malvinas
Posts: 494
Big Question:
Only way to use SeeSaw is having a denoised video or can it be used alone?
morsa is offline   Reply With Quote
Old 28th December 2005, 12:18   #5  |  Link
Pookie
Registered User
 
Join Date: Apr 2005
Posts: 1,339
Quote:
Originally Posted by morsa
Big Question:
Only way to use SeeSaw is having a denoised video or can it be used alone?
Even if you don't invoke your own denoising, there's a light RemoveGrain call in there that runs. That's part of the way Didee's function gets the target video looking as clean as it does. Try it out so you can understand how the denoising portion of the function works. Just as any processing tool, you'll want to use it in certain cases, and in other cases, another function will be more appropriate.

Look at the source video still in the original post and see what can be done.

http://img508.imageshack.us/my.php?image=ozzy2iv.png

http://img231.imageshack.us/my.php?i...sawmcnr2sq.png

Last edited by Pookie; 29th December 2005 at 10:49.
Pookie is offline   Reply With Quote
Old 28th December 2005, 22:35   #6  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
Take a look at a before/after comparison with my current filterchain:



Do you think using SeeSaw could yield better results?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.
Chainmax is offline   Reply With Quote
Old 29th December 2005, 05:13   #7  |  Link
Pookie
Registered User
 
Join Date: Apr 2005
Posts: 1,339
Try it out, Chainmax. It's an easy function to test.

Last edited by Pookie; 29th December 2005 at 10:42.
Pookie is offline   Reply With Quote
Old 29th December 2005, 11:59   #8  |  Link
FredThompson
Registered User
 
FredThompson's Avatar
 
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,984
Quote:
Originally Posted by Pookie
Look at the source video still in the original post and see what can be done.

http://img508.imageshack.us/my.php?image=ozzy2iv.png

http://img231.imageshack.us/my.php?i...sawmcnr2sq.png
Those are not the same frame.
__________________
Reclusive fart.
Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers
FredThompson is offline   Reply With Quote
Old 31st December 2005, 14:29   #9  |  Link
Pookie
Registered User
 
Join Date: Apr 2005
Posts: 1,339
Quote:
Originally Posted by FredThompson
Those are not the same frame.
Sorry, Fred. Just trying to show more examples of the general effect.

Here's another one, and this one IS the same frame

Pookie is offline   Reply With Quote
Old 31st December 2005, 16:05   #10  |  Link
Dark Alchemist
Registered User
 
Join Date: Dec 2004
Posts: 93
Where exactly do I get SCSelect from that this is calling for?
Dark Alchemist is offline   Reply With Quote
Old 2nd January 2006, 02:21   #11  |  Link
FredThompson
Registered User
 
FredThompson's Avatar
 
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,984
Pookie, your video is smoothing way too much. Look at frame 266. Does the filter also remove stains and fill in cracks? Apparently, it does.

Besides, where's the fun in a clean Ozzy? It's just...wrong.
__________________
Reclusive fart.
Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers
FredThompson is offline   Reply With Quote
Old 2nd January 2006, 04:31   #12  |  Link
Pookie
Registered User
 
Join Date: Apr 2005
Posts: 1,339
Which video are you refering to ? SeeSaw works with the filter of your choice, so Deen() is going to have a different result than using Undot(). Plus, you can tune the ratio of cleaning to sharpening in order to limit artifacts.

Last edited by Pookie; 2nd January 2006 at 05:31.
Pookie is offline   Reply With Quote
Old 2nd January 2006, 04:36   #13  |  Link
FredThompson
Registered User
 
FredThompson's Avatar
 
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,984
Look at the video in the top post. Go to the frame I mentioned, or one near it, and look at the guy's shoulder. There's too much smoothing.

What is this from? It looks very interesting.
__________________
Reclusive fart.
Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers
FredThompson is offline   Reply With Quote
Old 2nd January 2006, 06:00   #14  |  Link
Pookie
Registered User
 
Join Date: Apr 2005
Posts: 1,339
This frame -



Yeah, the shoulder is overly smoothed, but as I mentioned I was posting some obvious examples of SeeSaw on different media. It would be easy to back off on the smoothing strength.

Last edited by Pookie; 7th January 2006 at 10:14.
Pookie is offline   Reply With Quote
Old 2nd January 2006, 06:41   #15  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
That's FF7: Advent Children. Seesaw gave me decent results on something I was having trouble with, but I ended up going with degrainmedian+limitedsharpen until I can figure out just how it can be tweaked best.
foxyshadis is offline   Reply With Quote
Old 2nd January 2006, 07:03   #16  |  Link
FredThompson
Registered User
 
FredThompson's Avatar
 
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,984
Hmm...I'll have to add that to my NetFlix or Blockbuster queue. Thanks for the info.

I'm wondering if SeeSaw+DeGrainMedian would give better results than:

LRemoveDust_YV12(17,2)
Soothe(LimitedSharpen(ss_x=1.0,ss_y=1.0,Smode=4),last,24)

It should, given DeGrainMedian is spatio-temporal. I've been fiddling with Heavy Metal (I'm an old fart, not into Manga...ok...young women with abnormally large...attributes...would interest me...but I digress) and the biggest annoyance I'm finding with dirty transfers is the MPEG artifacting that's left after cleaning. Blech!!! Some of that should go away with a move to SeeSaw and DeGrainMedian but some is going to require dedicated hunting and killing...
__________________
Reclusive fart.
Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers
FredThompson is offline   Reply With Quote
Old 2nd January 2006, 12:50   #17  |  Link
Dark Alchemist
Registered User
 
Join Date: Dec 2004
Posts: 93
Hmmm, filter looks nice for those who can even run it.
Dark Alchemist is offline   Reply With Quote
Old 2nd January 2006, 16:39   #18  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
Oh, here's a SeeSaw thread ... should I drop a comment?

First of all, I consider SeeSaw only as an intermediate step to a more complete solution. That's why I didn't post about it, and also didn't make an in-depth description of it, yet. Posting a "new incredible enhancement function" every few weeks is not such a smart idea, especially if the incredibleness is only half-finished.

The general aim of SeeSaw is to dig out weak detail from below, while not amplifying noise. The internal sharpening process enhances weak pixel differences much stronger, and strong pixel differences much weaker than a normal "linear" sharpener. This produces the wished effect, but on its own it will also bring up noise and artefacts into ugly presence. (Anyone remembering the "unsmooth" script of mf? )

To get a stable result, usually one applies some smoothing before or after sharpening ... but however you turn it, the coin has always two sides:

a) first sharpen, then smoothe:
the sharpener has full detail to work with, but will also enhance noise. For a stable result, because of the sharpener's enhancement the smoother will need wider thresholds and/or more aggressive settings, thereby taking away much of the sharpening effect again, and also cutting deeper into the original source because of the stronger settings.

b) first smoothe, then sharpen:
result might be more stable, but most probably the smoother has already taken away much of the weak detail. Detail that has been killed can't be enhanced anymore, so there's always danger to end up with "sharp soup" (already prominent features have been enhanced, but the overall appearance is "empty").

So SeeSaw tries to do something other: to walk on the coin's border. First an intermediate clip is constructed: a version of the provided denoised clip with reduced denoising (reduction is controlled by "NRlimit2" and "bias"). This reduces temporal jitter of the source, but retains most of the present pixel differences (not all, but most). This calmed version then is sharpened with the mentioned non-linear sharpener, limited by the result of a (also non-linear)median sharpener to avoid halo'ing, and soothe'd against the calmed clip for even more temporal stableness of the effect-of-sharpening. Finally, the difference [calm]-[calm+sharp] is applied to the denoised input clip, with optional limiting of the original denoising effect.


BTW, for rather clean sources it's perfectly possible to not denoise/smoothe the source at all, but still use some denoising for a stable sharpening result: Just set NRlimit=0 and NRlimit2=1~8. This will let the original source fully unaffected, only the sharpening effect will be created on the reduce-denoised intermediate clip.

For low-bitrate artefact feasts, using SeeSaw is like digging for oil on Mount Everest: senseless.

There are lots of possible ways how SeeSaw can be set up, according to the source's characteristics. And of course the kind of used denoising should fit to that, too. Moreover, if the source contains noticeable blocking artefacts, these should be filtered out beforehand - we surely don't want to sharpen mpeg blocking at all. (Deblock_QED might be indicated, since it mostly keeps more detail than plain Deblock() or BlindPP().) Also, if the source contains halos, these should be removed beforehand. Although SeeSaw by itself will hardly create any edge halos, it will happily enhance them if they're already present in the source ...


Update with some small changes: today's version

- renamed "Sdamp" to "SdampLo"
- "SdampHi" (new) will further reduce sharpening on detail that's already strong (even less aliasing, hopefully)
- "SootheT=0" and "NRlimit=0" now are really NOPs (formerly these cases applied YV12Lutxy, with zero effect.)

Todo: replace [additive] sharpening with [multiplication] sharpening - but not today.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 2nd January 2006, 16:44   #19  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
@ Dark Alchemist

What's the actual problem? In the first post, Pookie noted all needed plugins: MaskTools and RemoveGrain (1.0 pre-release). That's all.
Oh, you mentioned something about "SCSelect" ("that this is asking for") - now you see me - where does this appear? Never heard, never seen ...
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 2nd January 2006, 17:21   #20  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 702
thats an amazing sharpener! Do you think it gives better sharpening than Limitedsharpen on a clip with low noise?
anton_foy is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:53.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.