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. |
7th April 2005, 16:37 | #1 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
What would you say is a HEAVY DUTY denoiser/smoother?
Thanks to the awesomeness of Didée, I am now able to start working on a very messed up clip. The only problem is that I have no idea what to use for MAYOR cleanup. Here's a screenshot from the unfiltered source:
And here's the results of the primary filterchain: which is the following one: Code:
TFM(d2v="wherever\HaloTort.d2v",mode=2,PP=7,mChroma=false,chroma=false,mi=50) TDecimate(mode=1,chroma=false) SimpsonsRepair() Crop(22,4,692,460,align=true) Cnr2("xxx",4,5,255) Camembert(true,true) Lanczos4Resize(640,480) Deen() Unfilter(-30,-30) LimitedSharpen(ss_x=2,ss_y=2,Strength=128) |
8th April 2005, 12:23 | #3 | Link |
Registered User
Join Date: Oct 2003
Location: Germany
Posts: 377
|
I would say, a chromashift as first step is needed (i think i read in the capture-guide of doom9 something about this)
than dehalo with "blinddehalo" would be a good start. As an alternative you can use a filter, which i made some time ago. You can get it here It includes two filters: - BlindDeRingA(radius,centerweight,thresholdMin,thresholdMax,Y,U,V) - BlindDeRingB(radius,centerweight,thresholdMax,Y,U,V) The filters search in the neightbourhood of the actual pixel (defined through radius) and take all pixels into the acount, which differ maximum "thresholdMax" and minimum "thresholdMin". Then they take from all surrounding pixel acount and give the actual pixel the weight of "centerweight" (surrounding pixel get the weight 1). Y,U,V are booleans, which tells which channel shound be processed. BlindDeRingB make an averagefilter before the filterprocess. You can use it like: BlindDeRingA(3,80,0,18,true,true,true). For extensive dehalo you can use this script: Code:
function CEA(clip c, int "EdgeBias", int "thinY", int "noisegate"){c EdgeBias = default(EdgeBias,16) noisegate=default(noisegate,5) blurrY = blindDeRingA(5,60,1,22,true,false,false) edge1Y=blurrY.FineEdge(EdgeBias) xvon=25 xbis=75 xbis2=130 #Big Edge edge1YBIG=edge1Y.Levels(xbis,1,xbis2,0,255,false).inflate edge2=edge1YBig.expand.inflate.ExpandThinX(round(thinY/2-1)) edge5Big=YV12LUTxy(edge2,edge1YBig, \"y 0 > x 20 > & x y 1.3 * - x ?").inflate #Fine Edge edge1YFine=edge1Y.YV12LUT("x "+string(xvon)+"> x "+string(xbis)+" < & x "+string(xvon)+" - 255 "+string(xbis)+" "+string(xbis)+" - / * 0 ?") edge2=edge1YFine.expand.inflate.ExpandThinX(thinY) edge3=YV12LUTxy(edge2,edge1YFine,"y 0 > x 0 > & x y 1.3 * - x ?") edge3=YV12Lutxy(edge3,edge1YFine,"y 0 = x 110 < & 110 x ?") mustBeOn =YV12LutXY(c,c.RemoveGrain(4),"x y - abs "+string(noisegate)+" > 255 0 ?").inflate mustBeOff=c.RemoveGrain(2).FineEdge(5,Y=3,U=3,V=3).Levels(20,1,120,0,255,false) sub=YV12LUTxy(mustBeOn,mustBeOff,"x 0 > y 0 > & y x - y ?") edge5Fine=YV12LUTxy(edge3,sub,"x 0 > x y - x ?") sauberF=c \.BlindDeHalo2(strength=70) \.TBilateral(diameter=11,chroma=true) \.UnSharpMask(80,1,0) # \.FFT3DFilter(bt=-1, ratio=2, sigma=3, sharpen=0.6) sauberB=c \.BlindDeHalo2(strength=125) \.blindDeRingA(3,15,0,22,true,false,false) \.UnSharpMask(40,1,0) MaskedMerge(c,sauberF,edge5Fine,Y=3,U=3,V=3) MaskedMerge(sauberB,edge5Big,Y=3,U=2,V=2) } function ExpandThinX(clip c, int thin){ t0=c t1=t0.FineEdge(3) \.BicubicResize(t0.width*2,t0.height*2) \.expand.BicubicResize(t0.width,t0.height) \.inflate t1=Logic(t1,t0,"max") t2=c.FineEdge(3).expand.inflate t2=Logic(t2,t0,"max") t3=t2.FineEdge(3).BicubicResize(t0.width*2,t0.height*2).expand.BicubicResize(t0.width,t0.height).inflate t3=Logic(t3,t2,"max") t4=t2.FineEdge(3).expand.inflate t4=Logic(t4,t2,"max") t5=t4.FineEdge(3).BicubicResize(t0.width*2,t0.height*2).expand.BicubicResize(t0.width,t0.height).inflate t5=Logic(t5,t4,"max") thin > 5 ? t5 : Select(thin,t0,t1,t2,t3,t4,t5) } Code:
CEA(EdgeBias=12, thinY=3) Then maybe something hqdn3d would help, because it is very powerfull of flat areas while let edges sharp, so you can maybe use it with higher settings. TBilateral(diameter=21) or something like that could be a choise (i love this filter... but it is sooo slow) LRemoveDustMC or manaodenoise could also help... krieger2005 Last edited by krieger2005; 8th April 2005 at 12:52. |
8th April 2005, 13:50 | #4 | Link | ||
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Quote:
Quote:
*** Interesting function, will give it a try (supposely it's a little slower than BDH3, isn't it ... ) However, have a closer look at the source, krieger ... - note that these are "drop-shadow" -alike halos, only present at the right side of detail. In particular, some of the halos are *bigger* (wider) than the detail that is causing them. Plus the stronger of the halos do have halos themselves again ... This is *evil* stuff E.g. BDH3 is not at all able to do anything useful about them ... that's why there is that "SimpsonsRepair" function, which is said to come from somewhere out of never-never-land But another thing: Since you do have a plugin that does area evaluation anyways ... what about: (Since I strongly dislike any fixed thresholding, like you do through your thresholdMin|Max. Fixed thresholding is a bad thing, most times) - Get all pixels from pixel's neighborhood ( /w custom radius) - calculate area's average - upper boundary: average of (all pixels > area_average) - lower boundary: average of (all pixels < area_average) You get the idea. [edit, forgot something] @ Chainmax: Seems the noise filtering reduces contrast pretty much again. Shall we extract that "enhance" functionality, so that it can be applied after denoising, or even within and after?
__________________
- 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!) Last edited by Didée; 8th April 2005 at 13:55. |
||
8th April 2005, 22:51 | #5 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
I am going to try TBilateral in addition to Deen then. By the way, Didée, as you can see I used SimpsonsRepair with default settings, meaning that no enhancement takes place. After seeing how SimpsonsRepair darkens things (look at the timer or the kitchen handles), I think it's probably better to use enhancement (what do you mean use it within denoising?).
|
9th April 2005, 01:39 | #6 | Link | ||
Registered User
Join Date: Oct 2003
Location: Germany
Posts: 377
|
Quote:
However, since here are "horrible halos" (or like you said "drop shadows") i posted the script here... I have much effort with this script. Try it, Chainmax! If it remove not anough increase "thinY", but max. thinY should be 5. Quote:
For 3 and 4: does i understand it right, that the filter should give an average in the "upper"-"lower"-Range for a pixel? If this is right, then BlindDeRingB is the right thing. The only thing is, that it have no "lower boundary". I made the expirience (with BlindDeRingA), that with high radius-values and a "lower boundary"-value>0 the filter produce halos... I will imporve this filter in the near future, so that the weights of the pixel-values wouldn't be allways "1", but decrease, if the radius is too big (maybe in gaussian way or something). If you have an better idea how to improve it, say it to me. krieger2005 krieger2005 |
||
13th April 2005, 01:44 | #7 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
I'll try it soon, thanks . In the meantime, if anyone wants to take a stab at it, you can download a sample here. By the way, here is the latest script I tried:
Code:
TFM(d2v="wherever\HaloTort.d2v",mode=2,PP=7,mChroma=false,chroma=false,mi=50) TDecimate(mode=1,chroma=false) SimpsonsRepair() Crop(22,4,692,460,align=true) Cnr2("xxx",4,5,255) TBilateral(diameter=35,diameterC=25) LRemoveDust(4,20) BicubicResize(640,480,0,0.5) LimitedSharpen(ss_x=2,ss_y=2,Strength=200) It does look better, but shouldn't the filters have removed much more given the strengths they were set at? Maybe I should apply another kind of filtering before the smoothing? P.S: Didée, I tried using ENHmode=1 and it made the halos much more evident. I'll try ENHmode=1 and ENHmode=2 with different ENHstrength settings soon. |
13th April 2005, 07:06 | #8 | Link |
Registered User
Join Date: Jan 2004
Posts: 30
|
i had a really rare cartoon from VHS that was very dirty. I just converted it to digital and left it dirty, and only lightly compressed. for archive purposes. Then I reanimated the enitre thing in flash. Because it was more pleasent for people to watch that way. I actually did that with 5 minutes of a simpsons episode once. I exported the flash video to an uncompressed avi. converted to mpeg-2, and burned to dvd.
it looked infinitly more beautiful than any amount of filtering. very sharp, and brilliant. and yet, since i just traced every frame, it remained true looking to the original. even syncing up the audio isn't that bad. |
13th April 2005, 14:19 | #11 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Quote:
Mode 2 does darkening only, therefore is working somewhat similar to a "line darkener", and is the one to use in this case.
__________________
- 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!) |
|
14th April 2005, 19:29 | #12 | Link | |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Quote:
Anyway, I can't help but think that I might have to use some unusual filtering on this, something like DeFreq, DeScratch or DeSpot. Problem is, I wouldn't know how to identify wether this needs them or not. |
|
5th February 2011, 09:23 | #13 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
|
Since the links to BlindDeRing seem to be dead,
and I am willing to play with it, could anyone help me out with a copy of BlindDeRing ?
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." |
5th February 2011, 11:10 | #14 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
__________________
- 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!) |
6th February 2011, 20:00 | #15 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
|
Many thanks, Didée !
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." |
29th May 2019, 17:00 | #16 | Link | ||
Registered User
Join Date: Oct 2014
Posts: 34
|
Quote:
I'm getting FineEdge does not have a named argument "Y" error message with CEA(EdgeBias=12, thinY=3) How can I fix it? For FineEdge function Quote:
|
||
29th May 2019, 17:16 | #17 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Try this, is only a guess and untested. [Hacked from first d9 post here:- https://forum.doom9.org/showthread.p...100#post517100 ]
Code:
Function FineEdge( clip clp, int "div",int "Y",Int "U",iint "V") { Y=Default(Y,3) U=Default(U,1) V=Default(V,1) logic( clp.DEdgeMask(0,255,0,255,"5 10 5 0 0 0 -5 -10 -5", setdivisor=true, divisor=div) \ ,clp.DEdgeMask(0,255,0,255,"5 0 -5 10 0 -10 5 0 -5", setdivisor=true, divisor=div), "max", Y=Y,U=U,V=V ) } EDIT: Sorry, my mistake, div is not used within function, except passed on to other filter where other filter default would be used. So, reinstated div as optional arg.
__________________
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; 29th May 2019 at 17:44. |
Thread Tools | Search this Thread |
Display Modes | |
|
|