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. |
11th March 2013, 11:21 | #1 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
how to sharpen big details?
I'd like to know if there's a way to sharpen big details and avoid sharpening edges
I tried a lot of things but didn't get ideal results so here's a frame it looks blurry, I want to sharpen details like Britney's eyelash If I use strong sharpening like mcsharp (sharp=1) I get this yes, the eyelash looks clear but edges are oversharped,the whole image texture just looks terrible... and If I use strong sharpening+edgemask (like lsfmod (edgemode=-1),tcanny....) I get this only very small details like noise and grains get sharped, big details like eyelash still look blurry so,what can I do about it? any ideas? Last edited by feisty2; 11th March 2013 at 11:42. |
12th March 2013, 20:33 | #4 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
If you can you manage this project, can you tell me the difference between detail and edge.
(And dont say detail is what you do want and edge is what you dont want) EDIT: And also noise.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 13th March 2013 at 10:30. |
13th March 2013, 07:53 | #6 | Link |
Registered User
Join Date: Feb 2009
Location: USA
Posts: 676
|
Couldn't you do something like use a mask to sharpen only what you want? Or take the pixels from the sharpened areas you want and put them onto the image?
(no I don't know how to do that, just tossing out ideas) |
13th March 2013, 08:27 | #7 | Link | |
Useless idea generator
Join Date: Apr 2004
Location: Europe, Czech Republic, Brno
Posts: 332
|
Quote:
while details are either textures or very small area elements, with weak to strong contrast wrt surroundings. But I agree the difference can be rather vague , sometimes. Edit> Funny distinguishing: Edges you see at the first look. Details you see at the second one.
__________________
Vista64 Premium SP2 / C2D E4700 2.6GHz/ 6GB RAM/ Intel GMA 3100 / DTV Leadtek DONGLE GOLD USB2 / focused to DVB-T MPEG2 PS capture -> ProjectX -> M2V/MP2 -> MeGUI/AVS -> MP4[AVC/AAC] Last edited by Poutnik; 13th March 2013 at 08:33. |
|
13th March 2013, 13:48 | #10 | Link |
Registered User
Join Date: May 2010
Posts: 28
|
Unfortunately we can not use wavelets. However look at this
http://people.csail.mit.edu/sparis/publi/2011/siggraph/Paris_11_Local_Laplacian_Filters_lowres.pdf Reading the article I remembered Didées NonLinUSM that looks verry similar. I scripted it, but sorry, for some reasons I can not retest it. No warranty for typo's. Function bandpassfilter(clip i, float "sigma", float "alpha", int "rad1", int "rad2", float "ldmp") { sigma = Default(sigma, 0.2) * 255 alpha = Default(alpha, 0.7) ldmp = Default(ldmp, 8) rad1 = Default(rad1, 1) rad2 = Default(rad2, rad1 * 2) gx = (rad1 == 1) ? i : i.bicubicresize(i.width()/rad1/4*4, i.height()/rad1/4*4).bicubicresize(i.width(), i.height(),1,0) gy = i.bicubicresize(i.width()/rad2/4*4, i.height()/rad2/4*4).bicubicresize(i.width(), i.height(),1,0) mt_makediff(gx, gy) mt_lut("x 128 - abs "+string(sigma)+" >= "+ \ "128 "+ \ "x 128 - abs "+string(sigma)+" / "+string(alpha)+" ^ "+string(sigma)+" * x 128 - x 128 - abs 0.001 + / * x 128 - 2 ^ x 128 - 2 ^ "+string(ldmp)+" + / * x 128 - - 128 + "+ \ "? " \ ,U=1,V=1) mt_adddiff(i).mergechroma(i) Return last } The parameters are named as in the article. ldmp is taken from NonlinUSM to handle the noise. rad1=1 is for the highest frequencies (you don't need). Call it with rad1=2 and maybe in additional with rad1=4, rad1=8, .... |
13th March 2013, 15:31 | #11 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
|
|
14th March 2013, 12:47 | #12 | Link |
Registered User
Join Date: Mar 2006
Posts: 1,049
|
We can't because there is no plugin for Avisynth or there is another reason.
As source for wavelet decompose exist http://registry.gimp.org/files/wavelet-decompose-0.1.2.tar.gz perhaps emulating in a crude way Gimp architecture can solve this problem. |
14th March 2013, 14:53 | #13 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
VagueDenoise is wavelet based and comes with source (lots of asm).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
14th March 2013, 15:01 | #14 | Link |
Registered User
Join Date: Mar 2006
Posts: 1,049
|
Aaah then seems that lack of wavelet is not Avisynth limitation but just lack of plugin - ok now i understand - i was just curious is there any reason (technical) why wavelets decomposition can't be implemented as plugin for Avisynth.
|
14th March 2013, 15:06 | #16 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
I seem to recall that one of the developers of VagueDenoise (Fizick I think) did not quite understand
wavelets or how they worked, and so would think it might be a very demanding task for any developer, very definitely beyond me.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
14th March 2013, 16:32 | #17 | Link |
Registered User
Join Date: Mar 2006
Posts: 1,049
|
Me either - i just know that wavelets can be useful in areas where other methods can't provide good results and vice versa - sometimes wavelets can be less than optimal - wavelet decomposition and chance to operate selectively only in part of signal bandwidth/spectrum (sharpen "large" details) seems to be optimal wavelet use.
|
15th March 2013, 09:25 | #18 | Link |
Registered User
Join Date: May 2010
Posts: 28
|
@pandy
Sorry for the unclear statement regarding wavelets. Of course it is possible to make a plug-in based on wavelets. But I do not know a plug-in that is ready for use for feisty2's problem. @feisty2 The solution I proposed is based on the idea to splitt it in levels of details and process each level separately. Rad1 and rad2 select the "frequency band". Sigma influences the decision if it is detail (<Sigma) or egde (> sigma). Alpha is relevant for boosting (<1.0) or reduce / denoise details (>1.0). Ldmp is required to reduce noice. In my tests I had to use ldmp also for higher levels. If you set rad2 = 2* rad1 you can create about 6 or 7 levels (bicubiresize fails with rad > 128 on a HD source - that results in a frame size less 8x8). The sricpt is 1 level, so I proposed to call it twice or 3 times starting with the second level (rad=2). Sorry again for not testing it finally. I cutted this one level out of a a recursive script. Reason was to enable it to start with a higher level (not to process the first already sharp level). Hoever, I proposed this way because I thinks masking is not the rigth way to solve the problem. |
15th March 2013, 10:53 | #19 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Maybe V.C. Mohan has an interest in wavlets or other techniques for dealing with "large details", perhaps he can comment.
Here are V.C's plugs, very interesting. EDIT: Oops, forgot the link: http://avisynth.org/vcmohan/
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 15th March 2013 at 21:38. |
15th March 2013, 15:02 | #20 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
and aliasing isn't really a problem,just use a little supersample process with eedi and it will be fixed sorry everyone, I'm just a new avs learner and know nothing about software development, I can tell wavelet is a great idea but I have no idea how to do it |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|