View Full Version : Need advice for grainy and halos source
Great Dragon
27th December 2007, 20:35
Sample video
http://rapidshare.de/files/38144648/VTS_01_1.demuxed.m2v.html
I've try this one
BlindDeHalo3(rx=2.0,ry=2.0,strength=200,sharpness=0.0,PPmode=2)
Blinddehalo3(rx=2.0,ry=2.0,strength=200,sharpness=0.0,PPmode=0)
degrainmedian(mode=1)
FFT3DFilter(sigma=3, bt=5, bw=32, bh=32, ow=16, oh=16, plane=4, sharpen=0.4)
LimitedSharpen(Smode=1,radius=3,strength=100,wide=true)
Original:
http://img100.imageshack.us/img100/2286/512320pp2.th.jpg (http://img100.imageshack.us/my.php?image=512320pp2.jpg)
After:
http://img301.imageshack.us/img301/4880/512329ah9.th.jpg (http://img301.imageshack.us/my.php?image=512329ah9.jpg)
But i think i've lost alot of details. Any advices for better filters chain?
ankurs
27th December 2007, 20:50
Sample video
http://rapidshare.de/files/38144648/VTS_01_1.demuxed.m2v.html
I've try this one
BlindDeHalo3(rx=2.0,ry=2.0,strength=200,sharpness=0.0,PPmode=2)
Blinddehalo3(rx=2.0,ry=2.0,strength=200,sharpness=0.0,PPmode=0)
degrainmedian(mode=1)
FFT3DFilter(sigma=3, bt=5, bw=32, bh=32, ow=16, oh=16, plane=4, sharpen=0.4)
LimitedSharpen(Smode=1,radius=3,strength=100,wide=true)
Original:
http://img100.imageshack.us/img100/2286/512320pp2.th.jpg (http://img100.imageshack.us/my.php?image=512320pp2.jpg)
After:
http://img301.imageshack.us/img301/4880/512329ah9.th.jpg (http://img301.imageshack.us/my.php?image=512329ah9.jpg)
But i think i've lost alot of details. Any advices for better filters chain?
wont using unsharpmask (smode=1) in itself contribute towards the loss of details ? try and compare the results with mode = 2 and 3 and let us know ..
Great Dragon
27th December 2007, 21:00
smode=2 and 3 do a little more loss of details and add some chroma noise.
smode=3 much more
http://img201.imageshack.us/img201/8483/51232999tp7.th.jpg (http://img201.imageshack.us/my.php?image=51232999tp7.jpg)
ankurs
27th December 2007, 23:32
smode=2 and 3 do a little more loss of details and add some chroma noise.
smode=3 much more
http://img201.imageshack.us/img201/8483/51232999tp7.th.jpg (http://img201.imageshack.us/my.php?image=51232999tp7.jpg)
hmm well i shared my opinion based on my experience but this contradicts it lol .. well usually i dont encode play around with english sources so dont hav such a good idea about them .. but i can see less halo"s then the previous screens even though they are minute.. also cannot download the .m2v from rapidshare .. asks me to bloody wait for 56 minutes :/ .. if u can u/l it somewhere else .. sendspace or some other sort of shit :0
Edit : why not try and see the results of temporal degrain by didee and sagekilla ? .. i tested it and right now i"m loving it .. love the way for how the script thinks for itself .. varies denoising greatly for different scenes .. also do try mc_spuds and also removenoise MC_HQ ..
P.S : here the link for Temporal Degrain : http://forum.doom9.org/showthread.php?t=132310&page=8 .. get the avs frm the codebox in post 148 ..
Spuds
27th December 2007, 23:40
BlindDehalo3 can tend to soften your image quite a bit and you have called it twice plus thrown in its post processing option.
Removing halos is not easy so be sure they are really objectionable before you go after them, its an image trade off you are making.
Give Dehalo_Alpha with default settings a try or the dehalo option of fft3dfilter since you already have that in your chain.
I'd probably start with dehalo_alpha and also decrease the blocksize of ff3dfilter so it can better clean edges (ie bw/bh=16 or even 8 if you can take the speed ... also use a 50% overlap). Also consider limitedsharpenfaster in place of limitedsharpen.
ankurs
27th December 2007, 23:55
BlindDehalo3 can tend to soften your image quite a bit and you have called it twice plus thrown in its post processing option.
Removing halos is not easy so be sure they are really objectionable before you go after them, its an image trade off you are making.
Give Dehalo_Alpha with default settings a try or the dehalo option of fft3dfilter since you already have that in your chain.
I'd probably start with dehalo_alpha and also decrease the blocksize of ff3dfilter so it can better clean edges (ie bw/bh=16 or even 8 if you can take the speed ... also use a 50% overlap). Also consider limitedsharpenfaster in place of limitedsharpen.
INTERESTING ! well my personal experience with dehalo_alpha has been very bad :O .. it increased the noise/blocks instead of fixing the halo"s(i mean minimizing) as far as i know no halo"s can be fixed to the max .. thier effect can only be minimized .. nice suggestions for ff3dfilter though :p lets see how things turn out ..
also lsf would be better if you use multiple calls of it in my opinion to sharpen and then soften .. this way less blocks will appear (also hope you have a good bitrate to play around with ) and it did help me out to enhance the details :)
something like this ..
LimitedSharpenFaster(Smode=1, radius=3, lmode=3, strength=150,soft=130,overshoot=1)
LimitedSharpenFaster(Smode=1, Lmode=1, radius=2, strength= 100, soft=80,overshoot=1)
LimitedSharpenFaster(ss_x=1.35, ss_y=1.35, Smode=3, strength=40, soft=35,overshoot=1)
and in the end round it off with soothe() ? do let us know :p
Great Dragon
28th December 2007, 12:24
BlindDehalo3 can tend to soften your image quite a bit and you have called it twice plus thrown in its post processing option.
its because video have some kind of double halos and calling BlindDehalo3 just once dont remove them all.
Dehalo_alpha cant handle with them and calling Dehalo_alpha twice make picture looks....emm...to flat, - like cartoon.
BlindDeHalo3(rx=2.0,ry=2.0,strength=200,sharpness=0.0,PPmode=2)
dehalo_alpha()
dehalo_alpha()
degrainmedian(mode=1)
FFT3DFilter(sigma=3, bt=5, bw=32, bh=32, ow=16, oh=16, plane=4, sharpen=0.4)
LimitedSharpen(Smode=3,radius=3,strength=100,wide=true)
http://img167.imageshack.us/img167/3465/512323bd31da2fi3.th.jpg (http://img167.imageshack.us/my.php?image=512323bd31da2fi3.jpg)
Dehalo option for FFT3D cant remove halos too :(
why not try and see the results of temporal degrain by didee and sagekilla ?
Main problem is not in heavy grain but in strong halos. But thanx for advice, i'll try.
Mirror for sample
http://www.sendspace.com/file/gzc8gf
Terranigma
28th December 2007, 15:49
Like spuds said, it's sort of a win-win situation: Removing halos comes at a price; that trade-off is for details. Either you like halos with detail, or soft/blurry/faded images.
Great Dragon
28th December 2007, 16:26
I've just change an order in filter chain and save much of details:
degrainmedian(mode=1)
FFT3DFilter(sigma=3, bt=5, bw=16, bh=16, ow=8, oh=8, plane=4, sharpen=0.4)
BlindDeHalo3(rx=2.00,ry=2.00,strength=200,sharpness=0.0,PPmode=2)
Blinddehalo3(rx=2.00,ry=2.00,strength=200,sharpness=1.0,PPmode=0)
LimitedSharpen(Smode=1,radius=3,strength=150,wide=true)
http://img227.imageshack.us/img227/3181/512328bd32ls150rs4.th.jpg (http://img227.imageshack.us/my.php?image=512328bd32ls150rs4.jpg)
But still have left some halos and got some chroma artefacts (on wall)
Terranigma
28th December 2007, 16:31
He looks pasted, lol. ( a sin city-ish effect? j/k)
That's one of the downsides I was talking about, but as long as it's ok with you. :D
Didée
28th December 2007, 17:15
One could believe this thread is about turning Mafia into Yakuza, or something. :p
Random musing:
"original": http://img247.imageshack.us/img247/706/orignn7.th.jpg (http://img247.imageshack.us/my.php?image=orignn7.jpg) - script below: http://img246.imageshack.us/img246/1633/randomprocim8.th.jpg (http://img246.imageshack.us/my.php?image=randomprocim8.jpg) - without MVDegrain: http://img260.imageshack.us/img260/180/randomproc0iw6.th.jpg (http://img260.imageshack.us/my.php?image=randomproc0iw6.jpg)
o = last
mb1 = o.minblurX(1,1)
mb2 = mb1.minblurX(2,1)
mb12 = mb1.mt_lutxy(mb2,"x 3 + y < x 2 + x 3 - y > x 2 - y ? ?",U=2,V=2)
e = mb1.mt_edge("prewitt",0,255,0,255)
e3 = e.mt_expand().mt_expand().mt_expand().removegrain(11,-1).mt_expand()
h = o.repair(mb12.removegrain(11,-1),17)
hD = mt_makediff(h,o)
h1 = h.minblurX(1,1)
hsD = mt_makediff(h1.minblurX(2,1),h1).mt_lut("x 128 - 8 * 128 +")
DD = mt_lutxy(hsD,hD,"x 128 - y 128 - * 0 < y 128 - 4 / 0 1 - * 128 + x 128 - abs y 128 - abs < x y ? ?").removegrain(5)
h = h.mt_makediff(DD,U=2,V=2)
x1 = o.mt_merge(h,e3,U=2,V=2) .mt_merge(o,e,U=2,V=2)
x1 .MVDegrain3( [vectors etc.] )
return( last )
# ===========
function MinBlurX(clip clp, int r, int "uv")
{
uv = default(uv,3)
uv2 = (uv==2) ? 1 : uv
rg4 = (uv==3) ? 4 : -1
rg11 = (uv==3) ? 11 : -1
rg20 = (uv==3) ? 20 : -1
medf = (uv==3) ? 1 : -200
RG11D = (r==1) ? mt_makediff(clp,clp.removegrain(11,rg11),U=uv2,V=uv2)
\ : (r==2) ? mt_makediff(clp,clp.removegrain(11,rg11).removegrain(20,rg20),U=uv2,V=uv2)
\ : mt_makediff(clp,clp.removegrain(11,rg11).removegrain(20,rg20).removegrain(20,rg20),U=uv2,V=uv2)
RG4D = (r==1) ? mt_makediff(clp,clp.removegrain(4,rg4),U=uv2,V=uv2)
\ : (r==2) ? mt_makediff(clp,clp.repair(clp.medianblur(2,2*medf,2*medf),12),U=uv2,V=uv2)
\ : mt_makediff(clp,clp.medianblur(3,3*medf,3*medf),U=uv2,V=uv2)
DD = mt_lutxy(RG11D,RG4D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=uv2,V=uv2)
clp.mt_makediff(DD,U=uv,V=uv)
return(last)
}
Terranigma
28th December 2007, 17:20
Ahh, that looks very nice. Everything seems easy for you. :P
Spuds
28th December 2007, 18:05
@Didée,
Was the use of both minblur and minblurX intentional? Hey wait a second the script is different now :) .. Never mind!
Sagekilla
28th December 2007, 19:53
It seems like the image with script below actually has worse haloing than the original. I can see some very slight halos over his head and near the bottle. Your script is sharper, but there's still that subtle halo.
Didée
28th December 2007, 20:44
*Worse* haloing than the original? I can't follow you. :confused:
Edit: Ah, the 1st two pictures were swapped, see below. Now it's correct.
Terranigma
28th December 2007, 21:25
*Worse* haloing than the original? I can't follow you. :confused:
Didée, in your post, you have the filtered source as the original and vice-versa.
Didée
28th December 2007, 21:31
Ouch! :eek: :D
Links corrected, thank you.
Great Dragon
3rd January 2008, 08:32
Im very gratefull for your help, Didée. Im starting encoding right now ;)
Happy New Year Everyone!
Great Dragon
3rd January 2008, 12:58
Sorry, but i can't get to work this script.
It loads but dont processing an image.
LoadPlugin("DGDecode.dll")
LoadPlugin("mt_masktools31.dll")
LoadPlugin("RemoveGrainSSE3.dll")
LoadPlugin("RepairSSE3.dll")
LoaDPlugin("medianblur.dll")
mpeg2source("G:\DVD\Godfather\Papa\VTS_01_1.d2v", idct=0)
next i copy/paste your script but skip x1 .MVDegrain3( [vectors etc.]. Just # this string )
and I have received an untouched picture...
talen9
3rd January 2008, 20:50
Try replacing
x1
to the line with MvDegrain3 you omitted ... ;)
Even better, change the following "return(last)" with "return(x1)" .
Great Dragon
4th January 2008, 09:20
First, i don't have MVTools 1.9.0.
Second, even without MvDegrain this scrip must processing am image but it dont at all.
Third, i want to do it without MvDegrain, because second image that Didee show us is the best IMHO.
Boulder
4th January 2008, 12:52
Try using return( x1 ) instead of return( last ).
Great Dragon
5th January 2008, 15:26
Try using return( x1 ) instead of return( last )
Thanks, it works.
I have add some denoisers and here it is. A final version of script:
LoadPlugin("DGDecode.dll")
LoadPlugin("mt_masktools31.dll")
LoadPlugin("RemoveGrainSSE3.dll")
LoadPlugin("RepairSSE3.dll")
LoaDPlugin("medianblur.dll")
LoadPlugin("FFT3DFilter.dll")
LoadPlugin("degrainmedian.dll")
Import("limitedsharpenfaster.avs")
mpeg2source("G:\DVD\Godfather\Papa\VTS_01_1.d2v", idct=0)
degrainmedian(mode=1)
FFT3DFilter(sigma=2, bt=5, bw=32, bh=32, ow=16, oh=16, plane=4)
crop(2,0,714,480)
LanczosResize(704,400)
o = last
mb1 = o.minblurX(1,1)
mb2 = mb1.minblurX(2,1)
mb12 = mb1.mt_lutxy(mb2,"x 3 + y < x 2 + x 3 - y > x 2 - y ? ?",U=2,V=2)
e = mb1.mt_edge("prewitt",0,255,0,255)
e3 = e.mt_expand().mt_expand().mt_expand().removegrain(11,-1).mt_expand()
h = o.repair(mb12.removegrain(11,-1),17)
hD = mt_makediff(h,o)
h1 = h.minblurX(1,1)
hsD = mt_makediff(h1.minblurX(2,1),h1).mt_lut("x 128 - 8 * 128 +")
DD = mt_lutxy(hsD,hD,"x 128 - y 128 - * 0 < y 128 - 4 / 0 1 - * 128 + x 128 - abs y 128 - abs < x y ? ?").removegrain(5)
h = h.mt_makediff(DD,U=2,V=2)
x1 = o.mt_merge(h,e3,U=2,V=2) .mt_merge(o,e,U=2,V=2)
return (x1)
# ===========
function MinBlurX(clip clp, int r, int "uv")
{
uv = default(uv,3)
uv2 = (uv==2) ? 1 : uv
rg4 = (uv==3) ? 4 : -1
rg11 = (uv==3) ? 11 : -1
rg20 = (uv==3) ? 20 : -1
medf = (uv==3) ? 1 : -200
RG11D = (r==1) ? mt_makediff(clp,clp.removegrain(11,rg11),U=uv2,V=uv2)
\ : (r==2) ? mt_makediff(clp,clp.removegrain(11,rg11).removegrain(20,rg20),U=uv2,V=uv2)
\ : mt_makediff(clp,clp.removegrain(11,rg11).removegrain(20,rg20).removegrain(20,rg20),U=uv2,V=uv2)
RG4D = (r==1) ? mt_makediff(clp,clp.removegrain(4,rg4),U=uv2,V=uv2)
\ : (r==2) ? mt_makediff(clp,clp.repair(clp.medianblur(2,2*medf,2*medf),12),U=uv2,V=uv2)
\ : mt_makediff(clp,clp.medianblur(3,3*medf,3*medf),U=uv2,V=uv2)
DD = mt_lutxy(RG11D,RG4D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=uv2,V=uv2)
clp.mt_makediff(DD,U=uv,V=uv)
return(last)
}
Result:
http://img255.imageshack.us/img255/9733/5123208finalresulthi5.th.jpg (http://img255.imageshack.us/my.php?image=5123208finalresulthi5.jpg)
I've also try to replace Didée script with DGDecode in dehalo mode + BlindDehalo3. I've received a good result, much better than calling BlindDehalo3 twice or BlindDehalo+dehalo_alpha, but still no good as our guru script ;)
:thanks: for help
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.