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 > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th December 2012, 06:14   #1  |  Link
x265
Registered User
 
Join Date: Oct 2012
Posts: 176
Removing Rainbow

I need to remove the rainbow which you can see in the screenshot. I've tried using bifrost, derainbow and LUTDeRainbow
and none of them removed the rainbow completely.




Last edited by x265; 26th December 2012 at 06:17.
x265 is offline   Reply With Quote
Old 26th December 2012, 08:20   #2  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
well,i have the same problem too, these rainbow removal filters don't remove rainbow completely but destroy the original color too.
but Didee's dot crawl removal script works perfectly on my sources
feisty2 is offline   Reply With Quote
Old 26th December 2012, 08:32   #3  |  Link
x265
Registered User
 
Join Date: Oct 2012
Posts: 176
Could you send me a download link for the script?
x265 is offline   Reply With Quote
Old 26th December 2012, 08:34   #4  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Quote:
Originally Posted by x265 View Post
Could you send me a download link for the script?

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)).tdecimate()
raw = IVTC.crop(ox,0,ox,oy)
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.crop(4,0,-4,0,true)

interleave(raw,clean1c) # interleave "only-IVTC" with result of full filterchain, for frame comparison
# clean1c # just result
return(last)

#--- 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)
}
feisty2 is offline   Reply With Quote
Old 26th December 2012, 08:36   #5  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Repair RemoveGrain MaskTools TIVTC Frufun are needed
feisty2 is offline   Reply With Quote
Old 26th December 2012, 09:02   #6  |  Link
x265
Registered User
 
Join Date: Oct 2012
Posts: 176
There are multiple function, which one should i call? Is there a documentation for this script?
x265 is offline   Reply With Quote
Old 26th December 2012, 09:09   #7  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Quote:
Originally Posted by x265 View Post
There are multiple function, which one should i call? Is there a documentation for this script?
xxxsource


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)
}
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)).tdecimate()
raw = IVTC.crop(ox,0,ox,oy)
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.crop(4,0,-4,0,true)

interleave(raw,clean1c) # interleave "only-IVTC" with result of full filterchain, for frame comparison
# clean1c # just result
return(last)



save this avs script
create a new avs script and import the one you saved

Import ("xxx.avs")
selectevery (2,0)
feisty2 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 01:36.


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