Log in

View Full Version : Halo killings


pila13
5th July 2010, 22:46
Hi, i try kill halo in anime, i use dehalo_alfa -

Assumeframebased()
SeparateFields()
c=last
d=mt_edge()
DeHalo_alpha(rx=0.6,ry=0.6,darkstr=0.4,ss=2)
mt_merge(last,c,d)
DeHalo_alpha(rx=0.1,ry=0.1,darkstr=0.2,ss=2)
em=c.mt_edge("prewitt",64,128).mt_expand().mt_expand()
mt_merge(c,last,em,true)
Weave()

But, i get ugly halos :confused:
http://i8.fastpic.ru/big/2010/0705/74/375af4ba40e4d04f00088137ecac3374.png

Clean video simple - http://file.qip.ru/file/VZjFMh43/testdemuxed.html(to download click "скачать"

Hope for you help!

Didée
5th July 2010, 23:02
Your script is bad. The first part, up to the 1st mt_merge, uses dehalo for the not-edge areas. Then you follow up with a ridiculously-low-radius dehalo for the edge areas (2nd mt_merge).

Did you check how the result is with just dehalo_alpha, without any ill-formed edge masking?


Perhaps it is sufficient to replace

mt_merge(last,c,d)

with

mt_merge(last,d,c)

because it really seems to me that you got it the wrong way round ...

pila13
5th July 2010, 23:13
Assumeframebased()
SeparateFields()
c=last
d=mt_edge()
DeHalo_alpha(rx=1.2,ry=1.2,darkstr=0.3,ss=2)
mt_merge(last,d,c)
DeHalo_alpha(rx=0.8,ry=0.8,darkstr=0.6,ss=2)
em=c.mt_edge("prewitt",64,128).mt_expand().mt_expand()
mt_merge(c,last,em,true)
Weave()
i Get this -
http://i8.fastpic.ru/big/2010/0706/94/4464736d47c8b43485de8831959aad94.png

____
Use -
DeHalo_alpha(rx=1.2,ry=1.2,darkstr=0.3,ss=2)
Only
___
Nothing changed
http://i8.fastpic.ru/big/2010/0706/d5/98c1e204c92494041fb27296631c56d5.png

Didée
6th July 2010, 00:27
replace mt_merge(last,c,d) with mt_merge(last,d,c)

i Get this -
http://i8.fastpic.ru/big/2010/0706/94/4464736d47c8b43485de8831959aad94.png
Ah! Purrfecct! That's how it has to be! :D

Well, my fault. I actually meant to use mt_merge(c,last,d)

But I think the problem rather is the halo² situation (halos have sharp borders with 2nd-order halos), which isn't exactly a big strength of DH_alpha.
Also, it could be that some of the more broad halos are partly contained in the chroma planes, like the bright ones on reddish backgrounds. Such can happen if the halos were created while the source was in RGB colorspace. Not quite sure if chroma really is involved - that needs closer inspection, and I didn't download your sample yet. But IF chroma is involved, then DH_alpha won't suffice, because it doesn't process YV12's chroma at all.

I've no specific advice for the moment, except for toying around with various filters and their settings.

Alas, I've tight schedule for the next week or two. You've to investigate on your own, or wait for someone else making good sugestions.

pila13
6th July 2010, 09:51
Sorry, my mistake :

I use -
Assumeframebased()
SeparateFields()
c=last
d=mt_edge()
DeHalo_alpha(rx=1.6,ry=1.6,darkstr=0.3,ss=2)
mt_merge(c,last,d)
DeHalo_alpha(rx=0.8,ry=0.8,darkstr=0.6,ss=2)
em=c.mt_edge("prewitt",64,128).mt_expand().mt_expand()
mt_merge(c,last,em,true)
Weave()

But.....nothink chenge -
http://i8.fastpic.ru/big/2010/0706/11/12c2c5f9867b301bd26e6a06c9d6e711.png
Upload Clean video simpe on mediafile (http://www.mediafire.com/?jylyyi2ndwm)

Didée
6th July 2010, 12:23
Random dehalo musing during lunchbreak.

Source -------------- Result
http://img294.imageshack.us/img294/4610/sourcex.th.png (http://img294.imageshack.us/i/sourcex.png/) http://img143.imageshack.us/img143/6390/sourcerandomdehalo.th.png (http://img143.imageshack.us/i/sourcerandomdehalo.png/)
Not perfect on the reddish areas, dunno. But not bad either.


# mt_MaskTools-25.dll
# RemoveGrainSSE2.dll
# RepairSSE2.dll
# MedianBlur.dll


o = last

e1 = o.mt_edge("min/max",0,255,0,255).mt_lut("x 4 - 4 *")#.greyscale
e2 = e1.mt_expand().mt_expand()
e2 = e2.mergeluma(e2.mt_expand(),0.5).mt_inflate()

e3 = e2.mergeluma(e2.mt_expand(),0.5).mt_lutxy(e1.mt_deflate(),"x y 1.2 * -").mt_inflate()#.greyscale
# e3 = e2.mergeluma(e2.mt_expand(),0.5).mt_lutxy(e1.mt_deflate().mt_deflate(),"x y 1.2 * -").mt_inflate().mt_inflate().greyscale

# e3 = e3.nnedi2_rpow2(2,cshift="bicubicresize").bicubicresize(o.width,o.height)

blurr = o.minblur(1).removegrain(11,-1).removegrain(11,-1)

dh1 = o.repair(o.removegrain(2),1).mt_merge(blurr,e3,U=2,V=2)
dh1D = mt_makediff(o,dh1)

tmp = dh1.sbr()
med2D = mt_makediff(tmp,tmp.medianblur(2,0,0))
DD = mt_lutxy(dh1D,med2D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs 2 * < x y 128 - 2 * 128 + ? ?")
dh2 = dh1.mt_adddiff(DD,U=2,V=2)

interleave(o,dh2)
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 MinBlur(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.medianblur(2,2*medf,2*medf),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)
}

pila13
6th July 2010, 12:31
I try, sorry, but what line change FPS?

Thx you!

Didée
6th July 2010, 12:41
The line

interleave( o, dh2 )

doubles the output fps. This is meant for easier before/after comparison, by single-stepping frame by frame in e.g. VirtualDub.

pila13
6th July 2010, 14:37
Ok, i try differents config, and get this -

Clean-
http://i8.fastpic.ru/thumb/2010/0706/d1/78d109a1d6a66003f4ee09db0e98edd1.jpeg (http://fastpic.ru/view/8/2010/0706/78d109a1d6a66003f4ee09db0e98edd1.png.html)
___
1)Use Dehalo-

Assumeframebased()
SeparateFields()
c=last
d=mt_edge()
DeHalo_alpha(rx=1.6,ry=1.6,darkstr=0.4,ss=2)
mt_merge(c,last,d)
DeHalo_alpha(rx=0.8,ry=0.8,darkstr=0.3,ss=2)
em=c.mt_edge("prewitt",64,128).mt_expand().mt_expand()
mt_merge(c,last,em,true)
Weave()

Result -
http://i8.fastpic.ru/thumb/2010/0706/91/0e1da9499700faf636bc77c148202391.jpeg (http://fastpic.ru/view/8/2010/0706/0e1da9499700faf636bc77c148202391.png.html)
__
2)Try use some different script -

toon(0.5)
DeHalo_alpha(rx=1.2,ry=2.0,ss=2)
mergechroma(mt_convolution(horizontal="1",vertical="-8 0 0 128 0 0 -8"),last)
DeHalo_alpha(rx=1.2,ry=2.0,ss=2)
stackhorizontal(crop(0,0,8,0),crop(8,0,-8,0).\
mergechroma(crop(8,0,-8,0).awarpsharp(depth=10,cm=1))
\,crop(last.width-8,0,0,0))

Result -
http://i8.fastpic.ru/thumb/2010/0706/97/4407b6e835e8753b0e38c93aa6e48897.jpeg (http://fastpic.ru/view/8/2010/0706/4407b6e835e8753b0e38c93aa6e48897.png.html)
_____
3) Use Didée scrip -

# mt_MaskTools-25.dll
# RemoveGrainSSE2.dll
# RepairSSE2.dll
# MedianBlur.dll


o = last

e1 = o.mt_edge("min/max",0,255,0,255).mt_lut("x 4 - 4 *")#.greyscale
e2 = e1.mt_expand().mt_expand()
e2 = e2.mergeluma(e2.mt_expand(),0.5).mt_inflate()

e3 = e2.mergeluma(e2.mt_expand(),0.5).mt_lutxy(e1.mt_deflate(),"x y 1.2 * -").mt_inflate()#.greyscale
# e3 = e2.mergeluma(e2.mt_expand(),0.5).mt_lutxy(e1.mt_deflate().mt_deflate(),"x y 1.2 * -").mt_inflate().mt_inflate().greyscale

# e3 = e3.nnedi2_rpow2(2,cshift="bicubicresize").bicubicresize(o.width,o.height)

blurr = o.minblur(1).removegrain(11,-1).removegrain(11,-1)

dh1 = o.repair(o.removegrain(2),1).mt_merge(blurr,e3,U=2,V=2)
dh1D = mt_makediff(o,dh1)

tmp = dh1.sbr()
med2D = mt_makediff(tmp,tmp.medianblur(2,0,0))
DD = mt_lutxy(dh1D,med2D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs 2 * < x y 128 - 2 * 128 + ? ?")
dh2 = dh1.mt_adddiff(DD,U=2,V=2)

interleave(o,dh2)
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 MinBlur(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.medianblur(2,2*medf,2*medf),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://i8.fastpic.ru/thumb/2010/0706/7e/4803ee52abdb0a8fe396fd55ab3b857e.jpeg (http://fastpic.ru/view/8/2010/0706/4803ee52abdb0a8fe396fd55ab3b857e.png.html)
=========================
Now i try use script + script №1, get this =
____
1)Script 1+2
Assumeframebased()
SeparateFields()
c=last
d=mt_edge()
DeHalo_alpha(rx=1.6,ry=1.6,darkstr=0.4,ss=2)
mt_merge(c,last,d)
DeHalo_alpha(rx=0.8,ry=0.8,darkstr=0.2,ss=2)
em=c.mt_edge("prewitt",64,128).mt_expand().mt_expand()
mt_merge(c,last,em,true)
Weave()

toon(0.5)
DeHalo_alpha(rx=1.2,ry=2.0,ss=2)
mergechroma(mt_convolution(horizontal="1",vertical="-8 0 0 128 0 0 -8"),last)
DeHalo_alpha(rx=1.2,ry=2.0,ss=2)
stackhorizontal(crop(0,0,8,0),crop(8,0,-8,0).\
mergechroma(crop(8,0,-8,0).awarpsharp(depth=10,cm=1))
\,crop(last.width-8,0,0,0))

Result -
http://i8.fastpic.ru/thumb/2010/0706/f8/441dca52a415e18977d063bd94b94df8.jpeg (http://fastpic.ru/view/8/2010/0706/441dca52a415e18977d063bd94b94df8.png.html)
____
2)Last test - script 1+3
Assumeframebased()
SeparateFields()
c=last
d=mt_edge()
DeHalo_alpha(rx=0.6,ry=0.6,darkstr=0.4,ss=2)
mt_merge(c,last,d)
DeHalo_alpha(rx=0.1,ry=0.1,darkstr=0.2,ss=2)
em=c.mt_edge("prewitt",64,128).mt_expand().mt_expand()
mt_merge(c,last,em,true)
Weave()


o = last

e1 = o.mt_edge("min/max",0,255,0,255).mt_lut("x 4 - 4 *")#.greyscale
e2 = e1.mt_expand().mt_expand()
e2 = e2.mergeluma(e2.mt_expand(),0.5).mt_inflate()

e3 = e2.mergeluma(e2.mt_expand(),0.5).mt_lutxy(e1.mt_deflate(),"x y 1.2 * -").mt_inflate()#.greyscale
# e3 = e2.mergeluma(e2.mt_expand(),0.5).mt_lutxy(e1.mt_deflate().mt_deflate(),"x y 1.2 * -").mt_inflate().mt_inflate().greyscale

# e3 = e3.nnedi2_rpow2(2,cshift="bicubicresize").bicubicresize(o.width,o.height)

blurr = o.minblur(1).removegrain(11,-1).removegrain(11,-1)

dh1 = o.repair(o.removegrain(2),1).mt_merge(blurr,e3,U=2,V=2)
dh1D = mt_makediff(o,dh1)

tmp = dh1.sbr()
med2D = mt_makediff(tmp,tmp.medianblur(2,0,0))
DD = mt_lutxy(dh1D,med2D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs 2 * < x y 128 - 2 * 128 + ? ?")
dh2 = dh1.mt_adddiff(DD,U=2,V=2)

#interleave(o,dh2)
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 MinBlur(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.medianblur(2,2*medf,2*medf),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://i8.fastpic.ru/thumb/2010/0706/2b/543793dfcf48999d1ef5f7a50acbeb2b.jpeg (http://fastpic.ru/view/8/2010/0706/543793dfcf48999d1ef5f7a50acbeb2b.png.html)
_______________
Fuf, The best result I think this script 1 +3, but the picture looks very "soapy". Perhaps there are other ideas?
Thank you very much - Didée and nonsens112
For your help!

Vitaliy Gorbatenko
7th July 2010, 05:21
Maybe I'm blind, but in the second example I'm do not see Halo artifacts. But the ringing artifact is present. Accordingly, а combine 2 dehalo scripts make no sense.
To remove ringing and clean lines a'm use this: http://www.mediafire.com/?oam2mnd1lui
Try:
DeRing_and_Halo(2, 10, Maska=false)
or/and
AdaptiveEdgeCleaner2(1, 24)

dansrfe
7th July 2010, 07:43
Forgive me Didée, but can you please explain in-depth what you are doing in the script? I really would like to have a better idea of how the script is actually working in order to enhance my understand the specific reasons why what is being used at its respective location in the script.

Didée
7th July 2010, 08:09
@ Vitaliy:

Funny to see that many-years-old code of mf to come up again. Back then I told him that all the masking stuff could be greatly simplyfied and sped up, but it seems the old whacky code still persists. :D
(But apart from that, the good functionality is out of question.)


@ dansfre

Briefly, it is ..

1) edgemask#1-> (gives one line at edges)

2) edgemask#2(edgemask#1) -> (gives hull edge around emask#1)

3) median+blur -> (clean halo/ringing artifacts)

4) copy 3) onto source via 2)

5) enhance 4) via median-sharpen (to counter any not-wished blurring that might've been created)


No 5) uses the property that a median-sharpen will never-ever introduce halos IF a source is free of halos to begin with.

pila13
7th July 2010, 08:10
[foreign language removed]

pila13
7th July 2010, 09:32
http://i8.fastpic.ru/thumb/2010/0707/e0/c2385d046a9c7dff022ea0ddaeb9d5e0.jpeg (http://fastpic.ru/view/8/2010/0707/c2385d046a9c7dff022ea0ddaeb9d5e0.png.html)

The best result that I turned, changed
LimitedSharpenFaster() ===> LSFmod() +
EdgeCleaner()+BlindDeHalo3(PPmode=-3,strength=150,rx=2.5,ry=2.5)+DeHalo_alpha

Didée
7th July 2010, 09:52
"Your best result" still has halos.

pila13
7th July 2010, 09:57
I know, can't 100% kill halos :(
Now i try your script + BlindDeHalo3, maybe rx=.1.8, ry=2.0, strength=200

pila13
7th July 2010, 20:48
No more ideas? :(

*.mp4 guy
8th July 2010, 03:46
These sorts of artifacts are annoying because there isn't any cheap way to kill them, and they aren't huge, so its easy to justify ignoring them. Anyway (http://img51.imageshack.us/img51/2550/slowp.png). The compression artifacts are also annoying.

Vitaliy Gorbatenko
8th July 2010, 06:40
@ Didée:
I'm can't get the same mask as Camembert with mask tool's. I'm know that is slow.. But it almost perfect..

pila13
8th July 2010, 08:59
These sorts of artifacts are annoying because there isn't any cheap way to kill them, and they aren't huge, so its easy to justify ignoring them. Anyway. The compression artifacts are also annoying.
You use awarpsharp().awarpsharp2()?

Didée
8th July 2010, 10:37
@ Didée:
I'm can't get the same mask as Camembert with mask tool's.
The you aren't doing it right.

A tricky point is that mf's mask creation code is a bit convoluted. The choises are
- making it a good bit faster with the same result,
or
- making it even faster with almost the same result.

One of the easiest and most obvious:
function GCtoMask(clip input) {
input.Levels(128, 1, 255, 0, 255, false)
one = last
input.Levels(0, 1, 128, 255, 0, false)
two = last
Overlay(one, two, mode="lighten")
}
Embarrassing. Let's say this has speed of "100%".

The not-braindead way of doing exactly the same:

function GCtoMask2(clip input) {
input.mt_lut("x 128 - abs 2 *")
}
In relation to the first function, this one has 500% speed.

The minimum optimization to do is: Replace all levels with mt_lut, all Blur(1) with RemoveGrain(12), all Blur(1.5) with RemoveGrain(20), and all Overlay() with the according mt_logic/mt_makedfiff/mt_whatever.

The current code does waste lots of time. Waste. For absolutely no good reason.

Vitaliy Gorbatenko
8th July 2010, 11:05
@ Didée: >_< I'm not good with mt_ notation =(
Help Please!!


Overlay(last, Blur(1).Blur(1), mode="difference")
GreyCenteredToMask()
will be:

b=last
a=RemoveGrain(12).RemoveGrain(12)
mt_adddiff(b,mt_makediff(a,b))
mt_lut("x 128 - abs 2 *")
?

than this part

greyscale()
Levels(0, 1, 115, 0, 255, false)
Blur(1)
Levels(0, 0.4, 64, 0, 255, false)
Blur(1).Blur(1)
Levels(0, 1, 30, 0, 255, false)
Blur(1)

I'm don't know >_< ...

Didée
8th July 2010, 11:34
From Avisynth.org/MediaWiki ...

function Ylevels(clip clp,
\ int "input_low", float "gamma", int "input_high",
\ int "output_low", int "output_high", int "show_function")
{
input_low = Default(input_low, 0)
gamma = Default(gamma, 1.0)
input_high = Default(input_high, 255)
output_low = Default(output_low, 0)
output_high = Default(output_high, 255)
show_function = Default(show_function, false)

wicked = "x " +string(input_low)+ " - " +string(input_high)+ " " +string(input_low)+ " - / 1 " +string(gamma)+
\ " / ^ " +string(output_high)+ " " +string(output_low)+ " - * " +string(output_low)+ " +"

return( show_function ? clp.subtitle(wicked) : clp.mt_lut(Yexpr = wicked, U=2,V=2) )
}

Vitaliy Gorbatenko
8th July 2010, 15:59
@Didée:

function Camembert2(clip input)
{
input
a=RemoveGrain(12).RemoveGrain(12)
mt_adddiff(input,mt_makediff(a,input))
mt_lut("x 128 - abs 2 *")
greyscale()
mt_lut(Yexpr = "X 0 - 115 0 - / 1 1.0 / ^ 255 0 - * 0 +", U=2,V=2)
RemoveGrain(12)
mt_lut(Yexpr = "X 0 - 64 0 - / 1 0.4 / ^ 255 0 - * 0 +", U=2,V=2)
RemoveGrain(12)
RemoveGrain(12)
mt_lut(Yexpr = "X 0 - 30 0 - / 1 1.0 / ^ 255 0 - * 0 +", U=2,V=2)
RemoveGrain(12)
return (last)
}

I'm right????
Than why so much difference:

original camembert result:
http://img375.imageshack.us/img375/2439/originalcamembertresult.png
original camembert mask:
http://img444.imageshack.us/img444/8651/originalcamembertmask.png
modded camembert result:
http://img4.imageshack.us/img4/1818/moddedcamembertresult.png
modded camembert mask:
http://img694.imageshack.us/img694/4387/moddedcamembertmask.png

Didée
8th July 2010, 16:37
Because
Overlay(last, Blur(1).Blur(1), mode="difference")

does not translate to
input
a=RemoveGrain(12).RemoveGrain(12)
mt_adddiff(input,mt_makediff(a,input))

but, much more simple, into
input
a=RemoveGrain(12,-1).RemoveGrain(12,-1)
mt_makediff(a,input)
(The "-1" parameter is not mandatory. It's just a speed improvement since it tells removegrain to not process UV planes - those are not needed for making the mask.)

Vitaliy Gorbatenko
9th July 2010, 03:50
>_< 1:1 result now!!!

pila13
9th July 2010, 14:49
Everything looks ugly, but script Vitaliya look best then others...

http://i8.fastpic.ru/thumb/2010/0709/5c/0ed6ee15ae57d2b7335d7905e817425c.jpeg (http://fastpic.ru/view/8/2010/0709/0ed6ee15ae57d2b7335d7905e817425c.png.html)

Didée
9th July 2010, 17:22
In the left-bottom picture, you are not using the script or anything. Since you just commented-out the "interleave(o,dh2)", the final "return(last)" is returning the untouched original input.

To see the script actually doing its work, you need to write it like

#interleave(o,dh2)
return(dh2)

or

#interleave(o,dh2)
dh2
return(last)

At least a tiny little bit understanding of Avisynth grammar & syntax is of advantage.

pila13
9th July 2010, 17:54
I try, thx you. Need learn more about avisynth grammar & syntax...

http://i8.fastpic.ru/thumb/2010/0709/fb/a2c2f5451e51f5d57461a36df42082fb.jpeg (http://fastpic.ru/view/8/2010/0709/a2c2f5451e51f5d57461a36df42082fb.png.html)

Realy, script work... Thx you Didee. I know...i made stupid mistake...

Vitaliy Gorbatenko
9th July 2010, 19:02
This is not my script .. simply by long rebounds and anguish has turned a little to suppress the ringing effect due to the connection scripts "HQDering v0.1 by mf" and "Camembert-v0.1 by mf" and "HybridFuPP 0.98a by FuPP"
Camembert - the best mask that I saw. Almost perfect cover line.

Firebird
12th July 2010, 17:48
This is not my script .. simply by long rebounds and anguish has turned a little to suppress the ringing effect due to the connection scripts "HQDering v0.1 by mf" and "Camembert-v0.1 by mf" and "HybridFuPP 0.98a by FuPP"
Camembert - the best mask that I saw. Almost perfect cover line.

So maybe you'll post an updated version? :rolleyes:

Vitaliy Gorbatenko
13th July 2010, 01:46
I am not fully tested it, but judging by the mask to work 1:1 http://mediafire.com/download.php?dz2ok72zceem3fk