View Full Version : make more refined image, thinning dark lines without squaring
byme
16th June 2010, 17:03
I like to use the BlindDeHalo3 to make more refined the image
But the BlindDeHalo has defect to blur
To overcome this use the VMToon, combined to BlindDeHalo
but not could exceed with VMToon, the image is still few sharp
the DehaloAlpha, in combination with VMToon, creating an image too square for me
to refine image of a SD source, I think is very important thin the dark lines
this can do the AWarpSharp or AWarpSharpDering
but do not use, because also creates an evident squaring
which can be a method to obtain an image more refined, without blur or squaring?
Vitaliy Gorbatenko
17th June 2010, 05:18
VMToon is obsolete.
Use a more modern function like FastLineDarkenMOD2, linedarken_toon.
If you don't like squaring - use a AA functions on result clip.
byme
17th June 2010, 11:20
thanks, but where is the AA function?
Vitaliy Gorbatenko
17th June 2010, 16:08
Sorry. Its anti aliasing. Look here: http://forum.doom9.org/showthread.php?t=153835
byme
21st June 2010, 16:42
thank you
I tried the FastLineDarkenMOD2 and linedarken toon, but I still prefer the VMToon
Then I tried the LSharpAAF, but not a filter that I need.. and I do not like the result it produces
One thing I want to know and I have not yet understood
how do you to exclude the dark lines in BlindDeHalo3?
I would like to take away only the halos, without interfering with dark lines
:thanks:
Didée
21st June 2010, 17:09
That needs a custom postprocessing. BDH3 is designed to process all oversharpening. Not just one half of it.
Something along the lines of
src = whatever
BDH3 = src.BlindDeHalo3(...)
BDH3_med = BDH3.repair(BDH3.MedianBlur(2,-333,-333),1) # using radius 2
#BDH3_med = BDH3.repair(BDH3.repair(BDH3.MedianBlur(3,-333,-333),1),1) # using radius 3
BDH3_diff = mt_makediff(src,BDH3)
BDH3_med_diff = mt_makediff(BDH3,BDH3_med)
DD = mt_lutxy(BDH3_diff,BDH3_med_diff,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
BDH3.mt_adddiff(DD,U=2,V=2) # the result
Strictly, that's not "exclusion" for BDH3, but rather "contra-sharpening" after BDH3. FWIW, just try and see.
If not good enough, feel free to realize your own better ideas. :)
byme
21st June 2010, 17:39
Thanks for your interest Didée
I do not think I'll be able to make something better...
I have already problems to opening the script :p
tells me: Invalid arguments to function "BlindDehalo3"
where I was wrong?
src = AviSource("C:\Users\Propietario\Documents\Edit Video\Untitled 11.avi").ConvertToYV12()
BDH3 = src.BlindDeHalo3("C:\Users\Propietario\Documents\Edit Video\Filtri\BlindDehalo3_MT2\BlindDeHalo3_mt2.avs")
BDH3_med = BDH3.repair(BDH3.MedianFilter(2,-333,-333),1) # using radius 2
#BDH3_med = BDH3.repair(BDH3.repair(BDH3.MedianFilter(3,-333,-333),1),1) # using radius 3
BDH3_diff = mt_makediff(src,BDH3)
BDH3_med_diff = mt_makediff(BDH3,BDH3_med)
DD = mt_lutxy(BDH3_diff,BDH3_med_diff,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
BDH3.mt_adddiff(DD,U=2,V=2) # the result
GradFunkMirror()
ConvertToRGB()
Motenai Yoda
21st June 2010, 17:42
using dehalo_alpha+toon instead of blinddehalo3+vmtoon?
ps what the hell is this???
BDH3 = src.BlindDeHalo3("C:\Users\Propietario\Documents\Edit Video\Filtri\BlindDehalo3_MT2\BlindDeHalo3_mt2.avs")
(ora oltre al fatto che si scrive proprietario)
should be like
import("C:\Users\Propietario\Documents\Edit Video\Filtri\BlindDehalo3_MT2\BlindDeHalo3_mt2.avs")
src = AviSource("C:\Users\Propietario\Documents\Edit Video\Untitled 11.avi").ConvertToYV12()
BDH3 = src.BlindDeHalo3
BDH3_med = BDH3.repair(BDH3.MedianFilter(2,-333,-333),1) # using radius 2
BDH3_diff = mt_makediff(src,BDH3)
BDH3_med_diff = mt_makediff(BDH3,BDH3_med)
DD = mt_lutxy(BDH3_diff,BDH3_med_diff,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
BDH3.mt_adddiff(DD,U=2,V=2) # the result
GradFun2dbmod()#I prefer mod to mirror
I don't know MedianFilter, but u need load masktools2, repair and medianfilter too.
Didée
21st June 2010, 17:54
where I was wrong?
Here:
src = AviSource("C:\Users\Propietario\Documents\Edit Video\Untitled 11.avi").ConvertToYV12()
BDH3 = src.BlindDeHalo3("C:\Users\Propietario\Documents\Edit Video\Filtri\BlindDehalo3_MT2\BlindDeHalo3_mt2.avs")
Because that's nonsense.
Better:
import("X:\path\to\BlindDehalo3_mt2.avs")
src = AviSource("C:\Users\Propietario\Documents\Edit Video\Untitled 11.avi").ConvertToYV12()
BDH3 = src.BlindDeHalo3(rx=2.5,ry=3.5, ...etc... ) # you set the function's parameters here!!
BDH3_med = BDH3.repair(BDH3.MedianBlur(2,-333,-333),1) # using radius 2
#BDH3_med = BDH3.repair(BDH3.repair(BDH3.MedianBlur(3,-333,-333),1),1) # using radius 3
BDH3_diff = mt_makediff(src,BDH3)
BDH3_med_diff = mt_makediff(BDH3,BDH3_med)
DD = mt_lutxy(BDH3_diff,BDH3_med_diff,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
BDH3.mt_adddiff(DD,U=2,V=2) # the result
GradFunkMirror()
ConvertToRGB()
byme
21st June 2010, 18:43
using dehalo_alpha+toon instead of blinddehalo3+vmtoon?
ps what the hell is this???
(ora oltre al fatto che si scrive proprietario)
should be like
loadplugin("C:\Users\Propietario\Documents\Edit Video\Filtri\BlindDehalo3_MT2\BlindDeHalo3_mt2.avs")
src = AviSource("C:\Users\Propietario\Documents\Edit Video\Untitled 11.avi").ConvertToYV12()
BDH3 = src.BlindDeHalo3
BDH3_med = BDH3.repair(BDH3.MedianFilter(2,-333,-333),1) # using radius 2
BDH3_diff = mt_makediff(src,BDH3)
BDH3_med_diff = mt_makediff(BDH3,BDH3_med)
DD = mt_lutxy(BDH3_diff,BDH3_med_diff,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
BDH3.mt_adddiff(DD,U=2,V=2) # the result
GradFun2dbmod()#I prefer mod to mirror
I don't know MedianFilter, but u need load masktools2, repair and medianfilter too.
è vero... proprietario... non me ne ero mai accorto http://img.freeforumzone.it/smiles/2/09.gif
also for Didée:
I can not find the medianfilter :( you tell me where can I find?
I misunderstood that "src.BlindDeHalo3". I now correct BDH3 = src.BlindDeHalo3(strength=60, sharpness=0.0, interlaced=false)
as you see sharp I put it to 0
byme
22nd June 2010, 08:17
I tried with these (I found no other reference)
LoadCPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\CondTemporalMedian\CondTemporalMedian-isse.dll")
LoadCPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\CondTemporalMedian\CondTemporalMedian-gen.dll")
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\STMedianFilter\STMedianFilter.dll")
but do not work
Didée
22nd June 2010, 09:28
Ooops, sorry. In the hurry, I've accidentially mistyped the filter name. The actual filter is not "MedianFilter", but "MedianBlur". Find it here:
http://avisynth.org/warpenterprises/#medianblur
byme
22nd June 2010, 12:34
I tried
I feel absolutely good!
thank you very much Didée!!!
byme
24th June 2010, 12:47
I discovered the thinning of FastLineDarkenMOD2
I like it because thin dark lines
but has the defect to enlarge the bright parts
http://i.imagehost.org/0327/fldm1.png
http://i.imagehost.org/0432/fldm2.png
is there a way to avoid this?
Didée
24th June 2010, 12:57
I like it because thin dark lines
but has the defect to enlarge the bright parts
is there a way to avoid this?
Funny question.:)
When dark lines are thinned, the result has "less dark". When there is "less dark", there necessaricly is "more bright".
You are asking how to create "less dark", but without creating "more bright".
That is, of course, not possible.
byme
24th June 2010, 13:14
in fact it is logical :p
then not there in absolute a script able of thin dark lines, that not increases the bright parts? :(
sorry if I repeat me...
Didée
24th June 2010, 13:40
There's so many different things you can try. But in last instance, it seems you're simply searching for the holy grail of image processing. Which everyone has been searching for all time, but nobody has found it yet.
For the example pics you have posted: In that case, a valid strategy is to *not* process a "dark line" when it has a "bright line" in its direct neighborhood.
That can be done in a script: it's a nice training task. :)
byme
24th June 2010, 13:49
then you can do? Would you be able to create a script
such?
sorry if you do this question, but sometimes I difficult to understand English
I felt that the first sentence was in contrast with the second... :p
Guest
24th June 2010, 13:50
I felt that the first sentence was in contrast with the second. No, the first paragraph referred to the last instance, while the proposed solution was just a bit along the path to it.
byme
24th June 2010, 18:05
ok :)
I would ask if there a filter more faster of VMToon, that have a functions ssw, ssh
I like set VMToon to the ssw=2, ssh=4
rifinishes well the edge
the only defect is that it also square
byme
28th June 2010, 15:37
for Didée
I tried using the same script you did with HQDering, but there is something that not good
if I use without UnsharpMask seen the difference, but if I use with UnsharpMask there is no difference
examples...
comparison 1:
only HQDering with Didèe script
http://file2.net/thb/100628/6243of.png (http://file2.net/100628img6243of.png.html) http://file2.net/thb/100628/4116za.png (http://file2.net/100628img4116za.png.html)
only HQDering without Didèe script
http://file2.net/thb/100628/9949ah.png (http://file2.net/100628img9949ah.png.html) http://file2.net/thb/100628/3469yd.png (http://file2.net/100628img3469yd.png.html)
-----------------------------------------------------------------------------
comparison 2:
HQDering + UnsharpMask with Didèe script
http://file2.net/thb/100628/1848mw.png (http://file2.net/100628img1848mw.png.html) http://file2.net/thb/100628/8589xq.png (http://file2.net/100628img8589xq.png.html)
HQDering + UnsharpMask with Didèe script
src = AviSource("C:\Users\Propietario\Documents\Edit Video\Untitled 4.avi").ConvertToYV12()
y = src.Crop(814, 522, 90, 90)
a = src.AAASimple_QED()
b= a.FastLineDarkenMOD2(strength=0, luma_cap=255, threshold=0, thinning=48)
c= b.ConvertToRGB32()
d= c.VD_UnsharpMask(2, 25, 0)
e= d.Overlay(y, x=814, y=522)
f= e.VD_UnsharpMask(2, 25, 0)
g= f.ConvertToYV12()
HQDe = g.HQDering(strength=255, overall=55)
#HQDe_med = HQDe.repair(HQDe.MedianBlur(2,-333,-333),1) # using radius 2
HQDe_med = HQDe.repair(HQDe.repair(HQDe.MedianBlur(3,-333,-333),1),1) # using radius 3
HQDe_diff = mt_makediff(src,HQDe)
HQDe_med_diff = mt_makediff(HQDe,HQDe_med)
DD = mt_lutxy(HQDe_diff,HQDe_med_diff,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
HQDe.mt_adddiff(DD,U=2,V=2) # the result
GradFunkMirror()
ConvertToRGB()
HQDering + UnsharpMask without Didèe script
http://file2.net/thb/100628/2495mb.png (http://file2.net/100628img2495mb.png.html) http://file2.net/thb/100628/2200od.png (http://file2.net/100628img2200od.png.html)
as you can see the last two are equal
I do not know if I spelled correctly the code.. and I do not understand how to correct
Didée
28th June 2010, 16:30
I don't know what to tell or advice.
All those screenshots look ugly to me.
byme
28th June 2010, 18:45
try look the hair
in first and in second are different... the bright areas are more bright using the your script
while in script changed by me, with UnSharpMask, there is no difference with or without use of your script
I wonder why
the difference is not very evident, but there is still difference
---------
edit:
I misunderstood "ugly"
Why ugly?
Didée
28th June 2010, 19:58
I misunderstood "ugly"
Why ugly?
Because it looks hoplessly overfiltered. It's more close to "Cartoon" than to "Reallife source". Perhaps the source is already bad from the start, I don't know.
In any case, those filtering attempts have something of ... erh ... a hurricane came along and has broken down the house, then the houseowner tries to rescue something with a brush and a bin of paint. Which makes little sense when there's no roof, and only half of the walls left over.
byme
28th June 2010, 21:11
I understand the metaphor :D
I'll treasure
bye
byme
8th August 2010, 02:49
src = whatever
BDH3 = src.BlindDeHalo3(...)
BDH3_med = BDH3.repair(BDH3.MedianBlur(2,-333,-333),1) # using radius 2
#BDH3_med = BDH3.repair(BDH3.repair(BDH3.MedianBlur(3,-333,-333),1),1) # using radius 3
BDH3_diff = mt_makediff(src,BDH3)
BDH3_med_diff = mt_makediff(BDH3,BDH3_med)
DD = mt_lutxy(BDH3_diff,BDH3_med_diff,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
BDH3.mt_adddiff(DD,U=2,V=2) # the result
based on this script is possible amplify the brightness of bright areas without expand these?
or true same speech you did previously of fastlinedarken?
:thanks:
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.