Overdrive80
13th March 2014, 18:04
Hi all, I am trying remove dot crawl of video (https://copy.com/coVtFDxPVX0gtDKu) (1.30 min) that is part of my dragon box movies. I am using this script:
DGDecode_mpeg2source("E:\DB Movies\DSSD10374\Other Stuff\DBZ 07 - Ending\VideoFile.d2v", info=3)
ColorMatrix(hints=true, threads=0)
DeCrow
DeCrawl()
DeDot(luma2d=20, lumaT=20, chromaT1=0, chromaT2=255)
LUTDeCrawl(ythresh=20,cthresh=20, maxdiff= 60, scnchg=25)
QTGMC( Preset="Slower", SubPel=2, Sourcematch=3, Lossless=2).assumefps(60000,1001)
srestore(24000.0/1001.0)
function DeCrow(clip source)
{
out1=source.checkmate()
out2=source.checkmate(tthr2=0)
return out2.mergechroma(out1)
}
However, I dont can completly remove dotcrawl in movement areas. Someone could help me with this task???
Thanks in advance.
Overdrive80
14th March 2014, 03:46
With the below script I think that had removed almost dotcrawl, although with it much details. What do you think??
DGDecode_mpeg2source("E:\DB Movies\DSSD10374\Other Stuff\DBZ 07 - Ending\VideoFile.d2v", info=3)
ColorMatrix(hints=true, threads=0)
original=last
DeCrawl(ythresht=30, ythreshs=30, cthresh=2, temporal=100, spatial=100, spatialpasses=6)
DeCrow
DeDot(luma2d=20, lumaT=20, chromaT1=0, chromaT2=255)
mask=mt_edge(last).mt_inflate()
#return mask
last=mt_merge(original, last, mask)
assumebff()
tfm(order=0,pp=6,mode=4).tdecimate(mode=1)
sangnom2aa()
maa2()
supaa()
bxyhxyh
14th March 2014, 06:34
This is dot crawl removing script by Didée. Seems created for telecined material.
# Dot Crawl removing script by Didée.
Function DDComb(clip c, float "band", int "tmode", bool "decimate")
{
band=default(band,0.35) # band removal threshold for bands caused by frfun7()
tmode=default(tmode,1)
decimate=default(decimate,false)
c
borders = bicubicresize(width()/2,height()/2).bicubicresize(width()+8,height())
stackhorizontal(borders.crop(0,0,4,0),last,borders.crop(width()+4,0,0,0))
o=last ox=o.width() oy=o.height()
drr = o.separatefields().vinverse2().weave()
both = stackhorizontal(drr,o)
IVTC = both.tfm(pp=0,clip2=stackhorizontal(drr,drr))
IVTC = !decimate ? IVTC : IVTC.tdecimate(mode=tmode)
raw = IVTC.crop(ox,0,ox,oy)
chroma = raw
clean1 = IVTC.crop(0,0,ox,oy)
D1 = mt_makediff(raw,clean1)
D8 = D1.bicubicresize(ox/2-72,oy).blur(1,0).bicubicresize(ox,oy,1,0)
D9 = mt_lutxy(D1,D8,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
clean1a = clean1.mt_adddiff(D9,U=2,V=2)
clean1b = clean1a.frfun7(1.01,8,1)
allD = mt_makediff(raw,clean1b).greyscale()
shrpD = mt_makediff(clean1b,clean1b.removegrain(20))
DD = shrpD.repair(allD,13,0).mt_lutxy(shrpD,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
clean1c = clean1b.mt_lutxy(clean1a,"x 3 + y < x 2 + x y < x 1 + x 3 - y > x 2 - x y > x 1 - x ? ? ? ?",U=2,V=2)
\.mt_adddiff(DD.sbr(),U=2,V=2)
raw = raw.crop(4,0,-4,0,true)
clean1c = clean1c.mergechroma(chroma).crop(4,0,-4,0,true)
#interleave(raw,clean1c) # interleave "only-IVTC" with result of full filterchain, for frame comparison
output = band<>0 ? clean1c.gradfun3(thr=band,smode=2) : clean1c
return output
#--- end of script ---#
}
#######################################################
#--- Helper functions below ---#
function Vinverse2(clip clp, float "sstr", int "amnt", int "uv")
{
uv = default(uv,3)
sstr = default(sstr,2.7)
amnt = default(amnt,255)
uv2 = (uv==2) ? 1 : uv
STR = string(sstr)
AMN = string(amnt)
vblur = clp.sbrV()
vblurD = mt_MakeDiff(clp,vblur,U=uv2,V=uv2)
Vshrp = mt_LutXY(vblur,vblur.mt_convolution("1","1 2 1"),expr="x x y - "+STR+" * +",U=uv2,V=uv2)
VshrpD = mt_MakeDiff(Vshrp,vblur,U=uv2,V=uv2)
VlimD = mt_LutXY(VshrpD,VblurD,expr="x 128 - y 128 - * 0 < x 128 - abs y 128 - abs < x y ? 128 - 0.25 * 128 + x 128 - abs y 128 - abs < x y ? ?",U=uv2,V=uv2)
mt_AddDiff(Vblur,VlimD,U=uv,V=uv)
(amnt>254) ? last : (amnt==0) ? clp : mt_LutXY(clp,last,expr="x "+AMN+" + y < x "+AMN+" + x "+AMN+" - y > x "+AMN+" - y ? ?",U=uv,V=uv)
return(last)
}
function sbr(clip o)
{
rg11=o.removegrain(11)
rg11D=mt_makediff(o,rg11)
rg11DD=mt_makediff(rg11D,rg11D.removegrain(11)).mt_lutxy(rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
o.mt_makediff(rg11DD,U=2,V=2)
}
function sbrV(clip o)
{
rg11=o.mt_convolution("1","1 2 1")
rg11D=mt_makediff(o,rg11)
rg11DD=mt_makediff(rg11D,rg11D.mt_convolution("1","1 2 1")).mt_lutxy(rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
o.mt_makediff(rg11DD,U=2,V=2)
}
It is good for in motion areas, but not good for static areas.
So, I use this to remove leftovers.
source()
DDComb()
t=Tcomb(mode=0, fthreshl=4, othreshl=5)
mask=mt_logic(mt_lutxy(t, last, yexpr="x y - 2 - 255 *"),mt_lutxy(t, last, yexpr="y x - 2 - 255 *"),"or").grayscale
mt_merge(last,t,mask)
#TDecimate()
It still remains some dots on static areas. But I can live with them.
Please tell us how it works on your source and compare it with your script result. I don't have a time to test it for now.
EDIT: I've tested it on your source. It wasn't helpful.
Overdrive80
14th March 2014, 19:38
Thanks for you comment, I tried and dont work, although you already said it. Is hard remove it, in this source.
bxyhxyh
2nd April 2014, 10:34
Have you tried to replace t=tcomb(mode=0, ythreshl=4, othreshl=5) with t=checkmate(tthr2=0)?
It has weakened similar dot crawl artifact.
t=tcomb(mode=0, ythreshl=4, othreshl=5).checkmate(tthr2=0) worked good too
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.