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 18th October 2008, 12:23   #1  |  Link
zee944
Registered User
 
Join Date: Apr 2007
Posts: 240
blurry and overenhanced edges - help needed

Hey,

Can somebody tell me how could I improve these edges? They're overenhanced and blurry at the same time. So blurry LimitedSharpenFast fails to sharpen them. I've no idea how to fix this.

The most annoying thing that the edges are "ghosted". This may not be obvious at first sight (see third pic), but become very annoying after sharpening. Is there a way to get rid of them?

I'd appreciate any help.



zee944 is offline   Reply With Quote
Old 20th October 2008, 02:35   #2  |  Link
thetoof
Sleepy overworked fellow
 
Join Date: Feb 2008
Location: Maple syrup's homeland
Posts: 933
Have you tried warp-sharpening?
__________________
AnimeIVTC() - v2.00
-http://boinc.berkeley.edu/-
Let all geeks use their incredibly powerful comps for the greater good (no, no, it won't slow your filtering/encoding :p)
thetoof is offline   Reply With Quote
Old 20th October 2008, 04:57   #3  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
You have really bad halos, that's all I can say.

I tried aWarpSharp + merge (so it isn't so shocking) which was useful to some extent:

Code:
ImageReader("blurry_halos.jpg").Crop(8,0,-8,0).ConvertToYV12()
src = last

warp = src.aWarpSharp(32,2,0.45)
merged = Merge(warp,src)

Interleave(src,merged)

try playing around with depth, blur, and threshold.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.

Last edited by Sagekilla; 20th October 2008 at 05:04.
Sagekilla is offline   Reply With Quote
Old 20th October 2008, 10:30   #4  |  Link
zee944
Registered User
 
Join Date: Apr 2007
Posts: 240
I've already applied this:

Code:
MergeChroma(aWarpSharp(depth=32, blurlevel=1, thresh=0.5, cm=1))
I've done this because of a chroma problem (greenish & purple halos). I got the advice here: http://forum.doom9.org/showthread.php?t=135546

The screencaps above are taken after appliing this, but the original source has these ghosted halos too. Thanks for the code, will try it out ASAP.
zee944 is offline   Reply With Quote
Old 20th October 2008, 11:32   #5  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
I could tell you'd already done that awarpsharp trick, because it often adds green edges, which can be seen in your images.

To avoid this, you need to add (mirror?) borders, warp sharpen, crop borders.


For the current problem, there's always the various dehalo plug-ins, but I think they'll make your source far too soft. Maybe someone can suggest "gentle" parameters.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 20th October 2008, 21:20   #6  |  Link
buletti
Registered User
 
Join Date: Jun 2007
Posts: 42
Try to sharpen everything but the edges via
Code:
LimitedSharpenFaster(ss_x=1.5, ss_y=1.5, Smode=3, strength=160, Lmode=3, wide=false, overshoot=1, soft=0, edgemode=0)
halos will increase but you can treat halos separately or just tweak "strength".
buletti is offline   Reply With Quote
Old 20th October 2008, 21:56   #7  |  Link
Undead Sega
Registered User
 
Join Date: Oct 2007
Posts: 713
hahahaha, thats Twin Dragons! love that film!

if i am correct, if that the HK Laserdisc you are using? or the early issue DVD?
Undead Sega is offline   Reply With Quote
Old 22nd October 2008, 09:52   #8  |  Link
zee944
Registered User
 
Join Date: Apr 2007
Posts: 240
Quote:
Originally Posted by Sagekilla View Post
Code:
ImageReader("blurry_halos.jpg").Crop(8,0,-8,0).ConvertToYV12()
src = last

warp = src.aWarpSharp(32,2,0.45)
merged = Merge(warp,src)

Interleave(src,merged)
This worked much better than I expected! And your settings seem to be the best - I've tried all the variations, but all of them looked worse. Although it's still not perfect, the result is now noticeable better. Thanks!

Quote:
Originally Posted by 2Bdecided View Post
For the current problem, there's always the various dehalo plug-ins, but I think they'll make your source far too soft.
I've found DeHalo_alpha the best, but still caused more damage than good to the image. Isn't there a dehaloer which specifically aims that 'ghost edge' on the third pic?

Quote:
Originally Posted by buletti View Post
Try to sharpen everything but the edges
Unfortunately LimitedSharpen doesn't look good on this source. I guess I've to reduce those halos before sharpening anyway.

Quote:
Originally Posted by Undead Sega View Post
if i am correct, if that the HK Laserdisc you are using? or the early issue DVD?
This is the French DVD, the best uncut version. I'm marrying it with the superior US version.
zee944 is offline   Reply With Quote
Old 22nd October 2008, 12:05   #9  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
Quote:
Code:
warp = src.aWarpSharp(32,2,0.45)
merged = Merge(warp,src)
Hmh. Halo reduction is not so bad, however there is plenty of the typical ugly warpsharp-deformation. Brrr.

Tried something with aWarpSharp too, but in a more behind-the-2nd-next-corner way:

Code:
# Y'et A'nother H'alo R'educing script

function YAHR(clip clp)
{
b1    = clp.minblur(2).removegrain(11,-1)
b1D   = mt_makediff(clp,b1)
w1    = clp.aWarpSharp(depth=32,blurlevel=2,thresh=0.5)
w1b1  = w1.minblur(2,1).removegrain(11,-1)
w1b1D = mt_makediff(w1,w1b1)
DD    = b1D.repair(w1b1D,13) 
DD2   = mt_makediff(b1D,DD)
clp.mt_makediff(DD2,U=2,V=2)
}
Not golden, but still. Maybe it could be improved a little, it's just an ad-hoc implementation of a basic idea.
Dependencies are mt_masktools, RemoveGrain.dll, Repair.dll, aWarpSharp.dll, MedianBlur.dll and MinBlur() as found in MCBob (or a few other places).

Assuming that your original source is 720*y, rather than 1024*y, it goes like this. (528 kB, Mediafire)
__________________
- 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 22nd October 2008, 12:39   #10  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,348
Ages ago I tried to harness the halo reduction abilities of awarpsharp, and it worked a bit, but wasn't great (line detection and all the problems that implies). This however seams to work quite well, I especially like what it does on interpolated images.
*.mp4 guy is offline   Reply With Quote
Old 22nd October 2008, 21:41   #11  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
aWarpSharp still continues to confound me. I don't see any practical use outside of anime, and even there it's deformations from high values gives some funky results.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 22nd October 2008, 23:00   #12  |  Link
zee944
Registered User
 
Join Date: Apr 2007
Posts: 240
Quote:
Originally Posted by Didée View Post
Tried something with aWarpSharp too, but in a more behind-the-2nd-next-corner way:
This is fine, too. Very gentle, but still noticable. How should I increase the effect? (Just push up 'thresh'?)

I'll try to use it together with the Merge(aWarpSharp(32,2,0.45)) line Sagekilla suggested. I like how that fixes the blurry edges, while your function reduces the halos.
zee944 is offline   Reply With Quote
Old 22nd October 2008, 23:12   #13  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
An easy way to get it stronger is to just call it two times. - For a stronger effect with one instance, replace the "13" in the repair line with "12" or even "1". However, things get more n more destructive these ways. (Well, what else?)
To use warping for actual sharpening of the edges, it probably would be better to use much weaker settings fo aWarpSharp, and chain it some times. *.mp4 guy has shown different examples in the past, search for his posts/threads related to 'sharpening'.
__________________
- 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 23rd October 2008, 00:07   #14  |  Link
martino
masktools2 (ab)user
 
martino's Avatar
 
Join Date: Oct 2006
Location: PAL-I :(
Posts: 235
Quote:
Originally Posted by Sagekilla View Post
aWarpSharp still continues to confound me. I don't see any practical use outside of anime...
Not really. It works rather well on live action too, for fixing up halos, edge noise, colour bleeding and so on.

What confounds me more is the fact that I just simply fail to see it as a sharpener no matter on what source I put it on and what settings I use.
__________________
My x264 builds (win32 only up to rev965) and useless AviSynth functions -- use at your own risk
martino is offline   Reply With Quote
Old 23rd October 2008, 04:04   #15  |  Link
Adub
Fighting spam with a fish
 
Adub's Avatar
 
Join Date: Sep 2005
Posts: 2,698
I have to admit, I really like YAHR(). It doesn't take any tweaking, and works pretty well on any source I through at it, as long as I have some post sharpening to compensate for the effect it has on non-halo's. This in combination with MC_Spuds and MCTemporalDenoise have been an answer to my prayers for a lot of tv shows recently.
__________________
FAQs:Bond's AVC/H.264 FAQ
Site:Adubvideo
Adub is offline   Reply With Quote
Old 23rd October 2008, 13:14   #16  |  Link
zee944
Registered User
 
Join Date: Apr 2007
Posts: 240
Quote:
Originally Posted by Didée View Post
To use warping for actual sharpening of the edges, it probably would be better to use much weaker settings fo aWarpSharp, and chain it some times. *.mp4 guy has shown different examples in the past, search for his posts/threads related to 'sharpening'.
On "chaining" you mean something like this? (Found in SSSharpen function by *.mp4 guy)

Code:
awarpsharp(cm=0, depth=3, blurlevel=1, thresh=0.99)
awarpsharp(cm=0, depth=3, blurlevel=1, thresh=0.99)
awarpsharp(cm=0, depth=3, blurlevel=1, thresh=0.99)
awarpsharp(cm=0, depth=3, blurlevel=1, thresh=0.99)
awarpsharp(cm=0, depth=3, blurlevel=1, thresh=0.99)

awarpsharp(cm=0, depth=3, blurlevel=1, thresh=0.99)
awarpsharp(cm=0, depth=3, blurlevel=1, thresh=0.99)
awarpsharp(cm=0, depth=3, blurlevel=1, thresh=0.99)
awarpsharp(cm=0, depth=3, blurlevel=1, thresh=0.99)
awarpsharp(cm=0, depth=3, blurlevel=1, thresh=0.99)
zee944 is offline   Reply With Quote
Old 23rd October 2008, 14:09   #17  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
Erm that's the idea usually, but that's a bit of a high threshold to be using there, even if it's very low depth.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 23rd October 2008, 15:25   #18  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,348
Thats for use with lots of supersampling, if you applied that without SS you would get heavy artifacting. Tune it down to 3 or so repetitions, and maybe take thresh to .7, or .5 for use without SS. Or you could just use the original sub-function in its entirety.
*.mp4 guy is offline   Reply With Quote
Old 1st November 2008, 21:23   #19  |  Link
Undead Sega
Registered User
 
Join Date: Oct 2007
Posts: 713
Quote:
Originally Posted by zee944 View Post
This is the French DVD, the best uncut version. I'm marrying it with the superior US version.
but i believe the Fortune Star DVD of the film is the best DVD version and uncut out there.
Undead Sega is offline   Reply With Quote
Old 2nd November 2008, 11:35   #20  |  Link
Nikos
Registered User
 
Join Date: Jun 2002
Location: Greece
Posts: 242
The right place for YAHR function is before or after denoising ?
__________________
Greece PAL User...
Nikos 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 07:27.


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