View Full Version : How to achieve "film look" on PAL DV source
DSP8000
6th January 2005, 18:14
Hi AVIsynth gurus,
I'm just looking for avisynth solution how to make our newborn baby video to have "film look"
The source is PAL DV.
Tnx. in advance
DSP8000
scharfis_brain
6th January 2005, 18:15
deinterlace it.
DSP8000
7th January 2005, 05:55
Thanks scharfis_brain:), but what I meant was something similar like Magic Bullet Movie Looks;).
I can use it within Vegas but it's sooo slooow.
DSP8000
scharfis_brain
7th January 2005, 06:01
send me a before/after Magic-Bullet example.
I do not know, how magic bullets output looks like.
Mug Funky
7th January 2005, 10:29
the later builds of ffdshow can apply dust-and scratch, flicker, noise, lines, etc. you can save a preset from ffdshow config, and load that in avisynth as a plugin. deinterlace first, then run this thing.
also, you can grab a still-frame of your source and mess with the curves in photoshop, then export an ".amp" file from curves (put it on pencil mode to save this format), then load that into RGBlut in masktools.
that stuff should be enough.
but a word of warning - film look is a little too trendy, and in a few years you may regret using such an effect :)
oh, and it's a bit late now, but i hope you shot your movie in 1/50 shutter speed, or it'll look like the start of "saving private ryan" (and not in a good way).
Guest
7th January 2005, 11:36
Magic Bullet can add a combination of deinterlacing->24p/25p/deartifacting and colorgrading+low/high burns/glows to a videoclip. It's not for the 'old flim look' with scratches, dust and grain.
Magic Bullet review (http://www.creativecow.net/articles/onneweer_barend/mb_review/)
Btw. the Bleach Bypass effect of 'Ryan' can be achived by faking the actual lab process of not cleaning out the b&w of the b&w+color combi, by copying your color videoclip, making the new clip b&w, and then mixing the color clip with the b&w clip. Then you will get that high contrast, faded colors look of 'Ryan'. Tutorial (http://www.digitalproducer.com/articles/viewarticle.jsp?id=25010)
Tin2tin
Macanudo
7th January 2005, 14:26
Originally posted by Guest
Magic Bullet can add a combination of deinterlacing->24p/25p/deartifacting and colorgrading+low/high burns/glows to a videoclip. It's not for the 'old flim look' with scratches, dust and grain.
Magic Bullet review (http://www.creativecow.net/articles/onneweer_barend/mb_review/)
Btw. the Bleach Bypass effect of 'Ryan' can be achived by faking the actual lab process of not cleaning out the b&w of the b&w+color combi, by copying your color videoclip, making the new clip b&w, and then mixing the color clip with the b&w clip. Then you will get that high contrast, faded colors look of 'Ryan'.
Tin2tin
I think you may be able to achieve some of the color tone variations from the picture contained in the article you posted, by using gradients and the overlay function in avisynth.
http://img70.exs.cx/my.php?loc=img70&image=magicbullet3de.jpg
Maybe the following Gimp tutorial could be adapted to avisynth. I realize that the tutorial is for toning B&W images, but I think the technique could also be applied to color video.
Gimp Toning Tutorial (http://www.gimpguru.org/Tutorials/SampleToning/)
Thoughts?
Mug Funky
7th January 2005, 14:47
most of that stuff can be mimiced with a good deinterlacer, masktools, and the ability to generate colour-curve presets in photoshop (that's the only part that's not free, i suppose, but it's not essential).
E-Male
7th January 2005, 14:53
http://www.dcs.gla.ac.uk/~jhw/filmy/
http://forum.doom9.org/showthread.php?s=&threadid=85024
very detailed guide how to do it i photoshop, and teh thread i found it in
IMO it's a lil exegarated
most important IMO is the color/saturation/whatever-the-exact term is and if possible the sharpening
everything else is finetuning
a filmlook project in avisynth would IMO be interesting
DSP8000
7th January 2005, 16:35
oh, and it's a bit late now, but i hope you shot your movie in 1/50 shutter speed, or it'll look like the start of "saving private ryan" (and not in a good way).
Funny, that is exactly what we discused over @ Vegas forums:D
Your method is very long proces for me, all that can be done in Vegas with color curves, color correction, deinterlacing, however, by doing this I can get close to Magic Bullet but NOT the same.
The actual "deinterlacing de-artifacts" on MB web look more like de-blocking,smoothing, which can be easy done with AVIsynth.
But the "coloring" just amazes me.
There must be some sort of faster process with AVIsynth, MB is painfully slow, even on faster PC's.
most important IMO is the color/saturation/whatever-the-exact term is and if possible the sharpening
everything else is finetuning
a filmlook project in avisynth would IMO be interesting
I agree fully:)
most of that stuff can be mimiced with a good deinterlacer, masktools, and the ability to generate colour-curve presets in photoshop (that's the only part that's not free, i suppose, but it's not essential).
Mug Funky, can you please do something about that, I'm not that advanced user with masktools, I presume kernel deint. would be good solution.
tnx,
DSP8000
Didée
7th January 2005, 18:05
Someone bring down to the point what's the exact difference between "live" footage and "film look", regarding spatial image information, and the according scripts will spring up like mushrooms.
DSP8000
8th January 2005, 02:45
Very often the term "film look" is misunderstanded as the "old" film like 1960's dust,scratches,lines...
The point is, with today's modern technology regular miniDV user can achieve almost identical final results as the movies we see on DVD's.
Providing that this can be done software wise instantly reduces the overal cost for making great looking home movies.
On top of all this, providing that this can be done in AVIsynth the cost is none,zilch.
I think that almost everyone here has miniDV, shooting techniques combined with carefull planing of your project and final pre/post processing can look as close as the Hollywood movies.
All of these factors are making great need for clever AVIsynth scripting to achieve "The Hollywood Film look"
DSP8000
Macanudo
8th January 2005, 03:17
Originally posted by Mug Funky
...and the ability to generate colour-curve presets in photoshop.
How would these photoshop colour-curve presets be applied in avisynth. I guess what I am asking is what avisynth filter or function would you use to apply them? Overlay? Tweak? ColorYUV? Masktools? or would a new plugin need to be created. As far as creating the colour-curves for free couldn't presets be created in "The Gimp" and built into a function say:
Toning("bleached", startframe, endframe, strength) or
Toning("warm-fuzzy", startframe, endframe, strength) etc.
Edited to include photo from Magic Bullet Suite:
http://img70.exs.cx/img70/5624/magicbullet3de.jpg (http://img70.exs.cx/img70/5624/magicbullet3de.jpg)
or if you wanted to make a custom color-curve
CustomColorCurve("c:\custom-color-curve.gcurve", startframe, endframe, "YlevelsC=0,4,255,0,255",saturation, contrast)
Excuse my exuberance. As an amateur videographer the potential of this is all pretty exciting to me.
Macanudo
8th January 2005, 08:04
Originally posted by Didée
Someone bring down to the point what's the exact difference between "live" footage and "film look", regarding spatial image information, and the according scripts will spring up like mushrooms.
I don't know if this is of any value but here is a download link for the Magic Bullet Suite manual
Magic Bullet Suite Manual (http://www.redgiantsoftware2.com/Magic_Bullet_Manual.pdf)
E-Male
9th January 2005, 00:51
Originally posted by Didée
Someone bring down to the point what's the exact difference between "live" footage and "film look", regarding spatial image information, and the according scripts will spring up like mushrooms.
well, in computer science the actual coding never is the biggest part of the project
as i said there are 2 main steps:
-sharpening
no lack of things to try here
-colors
well, i can't put teh difference in words
have a look at that site i linked, the first step there is an exegarted example including some explaination and a curve-file
maybe that'll help you
Didée
9th January 2005, 04:51
Originally posted by E-Male
well, in computer science the actual coding never is the biggest part of the projectDepends on the definition of "big". For sure the actual coding mostly is the annoying part. Having the idea is the fun part. (And I'm still in search for my personal coding slave ;) ).
sharpening :)
colorsThat's of course the point. But to draw the conclusion right here: there's no such thing like "the" [one and only] film look. There's a rather big number of different techniques that are used from a big number of different studios. Basically one could make anything, and say "that's my 'film look'."
have a look at that site i linkedYes, we had that site mentioned already some time ago.
maybe that'll help youUh, I didn't know that I was the one being on this particular mission?
the first step there is an exegarted example including some explaination and a curve-file Currently I'm away from that of my rigs that has Photoshop installed (besides, I never use it, anyways.) A diagram'ed visualization of those curves would be nice to see. It's better to create something with formulaes through MaskTools's LUT functions, instead of *requiring* AMP files from Photoshop. It's not an application that's present on each and every machine.
Quite some of the steps' techniques of that site's example are similar to what I'm currently implanting into LS-EX. Perhaps (perhaps!) there's time to make an excusion.
Oh, another problem is, one should have DV sources to start with. Having only film sources available isn't a very good base for playing with such processing. I hand the torch on :)
E-Male
9th January 2005, 09:45
i can't add anything to that for the moment
Mug Funky
9th January 2005, 14:59
okay, i've got something going that looks pretty nice on a quick DV shot of myself (i'm not posting this one...):
- deinterlace (i'm using MVbob.selectodd())
- make a blurred clip (bilinear down*2, bicubic(1,0) up)
- greyscale the blurred clip
- run limitedsharpen on the source
- merge the greyscale blurred with the sharp by 33%
- convert to rgb
- apply a preset photoshop .amp file generated from Curves.
the only problem is RGBlut - it doesn't behave as expected with an ampfile. it seems to tint the clip red. perhaps it's only applying the red curve? maybe it's got the channels swapped? who knows. i'll post in the masktools thread so manao can have a look.
one big problem i found with the consumer-level DV camera i've used (and others i've used too) is that it only appears to shoot in 360x576! there's point-upsize artefacts on it. to remedy this (and speed up the deinterlace) i've horizontalreduceby2'd the clip, then lanczos'ed up to 720 again. this helps A LOT. i've experimented with a 32 point FFT lowpass from cooledit (ported to yv12convolution), and the lanczos upsize looks pretty much the same, so that's a big help.
[edit]
disregard the above... i tripped up on the "R=3,G=3,B=3" bit.
[edit 2]
oh, wait. it still doesn't process anything but red... hmm. i'll check my version because this is kinda weird.
[edit... etc]
latest version, still no reds :(
scharfis_brain
9th January 2005, 15:07
one big problem i found with the consumer-level DV camera i've used (and others i've used too) is that it only appears to shoot in 360x576!
For some analogue camcorders I can approve this:
Cheap analogue camcorders had low resoluted CCDs, that showed stairstepping even in a composite signal...
(about 352x576 to 480x576)
But for DV I cannot approve this.
Never seen stairstepping of the horizontal axis.
Of which camera model are you talking about?
Mug Funky
9th January 2005, 15:28
a sony one that i can't recall the model of (pretty old, ca 2000), a canon one (very new - mvsomething), and a panasonic NV-DS15 that i have in front of me. [edit] all PAL
it's a strange effect - i don't know if it's the DV compression or the de-bayer used, but it's not a perfect stairstep - there's a bit of variation in it, but basically it's half-width and point-resized (or really lousy linear, but i doubt it).
i can post frames if you like.
scharfis_brain
9th January 2005, 15:33
Very interesting!
Do all of your mentioned Cams show this behaviour?
May that be a decompression problem on your side?
i can post frames if you like.
I do.
But some frames of untouched DV I would like even more.
CraigBjorn
9th January 2005, 21:37
Film look isn't just something you can do with a push of a few buttons... if you look at even the pictures on the review site they all have at least good composition and lighting. The things you can do to make it look more like film are those sharpening, denoising, and deinterlacing tecniques which are more than plentiful on these boards.
However, I think a very crucucial part to film is the coloring. And anyone good with curves knows how useful they can be to making anwesome picture. The only downside to the current implimitations of curves is that we only have photoshops curves availible for import. If there were a way to import giimp curves I think that would be at least one step closer to a fully free alternative to things like magic bullet.
Didée
10th January 2005, 01:11
Originally posted by CraigBjorn
The only downside .. is that we only have photoshops curves availible for import. If there were a way to import giimp curves .. Photoshop curves. Gimp curves. What about CorelDraw curves? Or PaintShop curves? Personally, I'd like to see PictureWindow curves. Others might prefer even other applications.
I dislike the hooking to specific formats of specific applications. There should be something like a general curve generator. Basically, it's already there: the "adjust.dll (http://www.avisynth.org/warpenterprises/files/adjust_25_dll_20031110.zip)" plugin. Call the filter with your control points as parameter, get the resulting curve. Really a pity that it's "yuy2 only" ... [HINT!] :)
E-Male
10th January 2005, 13:18
i'm busy atm
i'll see next week if i can add something here
E-Male
10th January 2005, 14:49
ok, i couldn't rersist and i think i even got something (very simple but) usefull done this time
Originally posted by Didée
...a pity that it's "yuy2 only" ... [HINT!] :)
http://e-rels.dyndns.org/downloads/adjust.dll
AdjustRGB("R", "G", "B")
needs rgb input (else it'll act like AdjustY using R as Y)
please test
direct gimp input to follow later
E-Male
10th January 2005, 15:21
Gimp color curve file to AdustRGB parameters guide
# GIMP Curves File
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 206 255 -1 255 -1 255 -1 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 183
0 0 -1 -1 -1 -1 -1 -1 57 255 -1 255 -1 255 -1 -1 -1 255 -1 -1 -1 255 -1 255 -1 -1 -1 -1 -1 255 -1 255 -1 252
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
adjustrgb("spline(R,0,0,206,255,255,255 )", "spline(G,0,0,255,183 )", "spline(B,0,0,57,255,255,255 )")
2 numbers are always a pair
just copy them to the parmaters and replace spaces by commas
-1 means same as before, don't put that into AdustRGB (there seems to be no -1s at 255 for whatever reason)
value and alpha (first and last line of numbers) aren't supported (yet)
E-Male
10th January 2005, 19:16
automation is done:
http://e-rels.dyndns.org/downloads/gccp.exe
example:
gccp c:/gimp/testcurve.txt
i wasn't able to put my file-reading code into the plug-in, yet (http://forum.doom9.org/showthread.php?s=&threadid=88041)
CraigBjorn
10th January 2005, 22:52
Wow, that was amazingly quick, I'll have to test it as soon as I have time... the only reasons I had suggest Gimp over anything else was because it's open source, and the spline curve is easily readable, thanx.
E-Male
10th January 2005, 23:13
don't say thx to me before testing
this is very likly to be wrong in some places
for example one thing i'm not sure how to handle atm is this:
sometimes only the 1st of the 2 values in a pair is -1
i can't use that pair, because spline in avisynth won't work with 2 equal x values
but that means that i loose the second value
besides those things i plan to optimize the plug-in as soon as i have file reading added
gotta get rid of the envoke
Macanudo
11th January 2005, 08:27
Thank You E-Male!
I am having difficulty with my Windows install at the moment, and it looks as if I am going to have to do a clean installation. I will have to wait until I have resolved the windows situation to do any testing.
I think this has the potential to be a "very powerful" effects tool. Combined with the de-interlacing solution of your choice, Didee's Limited Sharpen, Gaussian Blur, and Overlay we now have a free alternative to the $1000 "magic bullet suite".
As soon as I have addressed my Windows problem, I will test and post my results and the Gimp Curves I used.
Again,
Thank You
Also, Thank you to Didee, MugFunky and others who contributed.
DSP8000
11th January 2005, 11:41
As I stated in my first post "AVIsynth Gurus" :p , amazing.
Very helpfull people, I didn't test your stuff e-male but looks promising.
Of course if we can get other people involved in the process the plugin could do unreal job.
Tnx. for spending time for this.
DSP8000
Mug Funky
11th January 2005, 12:04
some frames of untouched DV I would like even more.
http://mugfunky.no-ip.info/panasonic_NV-DS15.rar (1,049 KB)
captured direct through fahwah to hard disk. you can hear some piss-boring english history doco in the background probably :)
file is only available while i'm online.
i dug up a test pattern and printed it out, but didn't use a tripod or anything. even so, it should be clear that there's a bit of stairstepping going on. the effect is horribly clear when you separate fields (to eliminate the distraction of interlacing) and look at it like that. also note the horrible rainbows!
please note this is SP mode (though the result is identical in LP or SP regarding the stairstepping).
i'm not sure if there's some hardware deshaking going on, but i've shot stuff without it before that has this same effect.
[edit]
to remove all possible doubt, run this script:
separatefields()
subtract(last,last.blur(1).blur(1))
coloryuv(cont_y=512)
Macanudo
11th January 2005, 16:01
If anyone is interested in testing E-Male's plugin you should check out this site FootageFirm.com. (http://www.footagefirm.com/footage/freeclips/) There is some freely downloadable uncompressed DV footage on the site.
This way we can all use the same clips to do our testing.
E-Male
11th January 2005, 23:13
http://e-rels.dyndns.org/downloads/adjustgimp.dll
example:
adjustgimp("c:/gimp/curve1.txt")
the good things:
-reads gimp color curve files directly
-reads and uses all 5 lines
the bad things:
-untested!! (i hope you guys will do)
-not sure at all if i interpret everything correct (waiting for tests)
-still not sure what to do if only the x coordiante is "-1" (for now dropping the pair)
-no handling of mistyped filenames! (be carefull and remember: "/" not "\")
-still using envoke (gonna put in the spline code later)
Mug Funky
12th January 2005, 02:29
it doesn't appear to be using the luma curve properly, but the colour curves seem to be working okay. (i do contrast adjustment on the luma curve, but colour balance on the r,g,and b curves).
but i've got a gimp curve that looks pretty good so far. need to test it on more images though.
E-Male
12th January 2005, 03:02
i use the first curve on R, G and B
but i guess i need to be corrected on that
Macanudo
12th January 2005, 06:36
I couldn't wait until I fixed my machine to test AdjustGimp, so I am on a friends rig.
I think Mug Funky is right about the value curve not being applied correctly. I used the identical frame in each test.
I took a screen shot plugged it into "The Gimp" and generated a color curve. I then took the curve and plugged it into AdjustGimp.
Here are some screen shots of my results. I am using the boats clip for the source I posted in my above reply.
Original Screen Shot (frame#360)
http://img109.exs.cx/img109/9010/boats9hu.png
Gimp Curve (frame#360)
http://img109.exs.cx/img109/1163/boatsgimpcurve2uo.png
AdustGimp Curve (frame#360)
http://img109.exs.cx/img109/4074/boatsadjustgimp7kb.png
Here is the curve file I used.
# GIMP Curves File
0 0 -1 44 28 43 -1 65 67 96 -1 93 -1 65 -1 140 121 139 -1 -1 -1 204 -1 201 192 190 213 224 -1 221 -1 242 255 255
0 0 -1 56 -1 47 -1 34 61 35 -1 -1 -1 118 -1 110 128 99 -1 98 162 193 -1 213 189 241 -1 236 -1 226 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 49 63 45 -1 47 100 92 -1 149 121 149 151 191 -1 186 -1 192 196 233 -1 228 -1 -1 -1 -1 255 255
0 0 21 38 -1 35 -1 -1 63 53 -1 66 104 65 117 139 -1 138 148 201 -1 203 -1 203 -1 198 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
I notice alot of -1 values in several pairings. Could that be the source of the problem? If so would it be ok to manually change those -1 pairings to 0 or 1?
E-Male
12th January 2005, 06:53
if send a mail with questions to the gimp developer maling list
i hope to get the needed info from there to fix that
(-1,-1)-pairs are ignored, which should be correct
what i'm not sure is what to do with (-1,x)-pairs [x>0]
for now i just ignore them, too, which doesn't feel too right
also i'm not sure how to use the value curve at all
so my code for it might be just all wrong
i'll update the dll as soon as i got new infomation to work with
Mug Funky
12th January 2005, 07:13
hmm... by playing with the curve file in textpad and loading it into the gimp, it seems pairs of the form -1,x are ignored, but pairs of the form x,-1 and x,-y are actually plotted with a negative value. also, pairs of the form -x,y are done this way (the curve goes off the screen in these cases it seems).
in fact, there's a lot of points in a curve file that don't seem to be used. i wonder what they're there for? does the gimp need an equal number of points in each curve?
strange. i await the reply on the mailing list...
[edit]
it might just be formatting... i deleted all -1,x points and the file didn't load (no big surprise i guess), but when i changed them all to -1,0 there was no difference in the curve i loaded. i think you probably can ignore these points, but that still doesn't explain why they're there (perhaps when you remove a point while making the curve, it maintains it in the file, but just puts a -1 on it? but then the x coord is lost... very strange)
E-Male
12th January 2005, 07:14
i wrote a little function that allows easy exporting of 4 frames as 1
might help tuning curves in gimp
function prev(clip clp, int a, int b, int c, int d)
{ aa=clp.trim(a,-1).subtitle(string(a))
bb=clp.trim(b,-1).subtitle(string(b))
cc=clp.trim(c,-1).subtitle(string(c))
dd=clp.trim(d,-1).subtitle(string(d))
ra=stackhorizontal(aa,bb)
rb=stackhorizontal(cc,dd)
res=stackvertical(ra,rb)
return( res ) }
enter the 4 frames you want to export as parameters
example:
prev(10, 12, 14, 16)
Macanudo
12th January 2005, 07:56
Originally posted by E-Male
if send a mail with questions to the gimp developer maling list
i hope to get the needed info from there to fix that
(-1,-1)-pairs are ignored, which should be correct
what i'm not sure is what to do with (-1,x)-pairs [x>0]
for now i just ignore them, too, which doesn't feel too right
also i'm not sure how to use the value curve at all
so my code for it might be just all wrong
i'll update the dll as soon as i got new infomation to work with
I sent Gimp's developers a message on one of their mailing lists, requesting the relevant source code for the Curves function. It has been about 3 days now and I haven't had any responses.
The code is available for the entire gimp program, but I was hoping one of the developers would direct me just to the relevant code for Curves.
Since you have more specific questions, you might have better luck. Here is a list of Gimp Developer Mailing Lists
Gimp Links (http://www.gimp.org/mail_lists.html)
I posted my question on the Gmane mailing list under the Gimp Developer heading.
As soon as I hear back I will PM you their response.
Thanks Again,
Macanudo
E-Male
12th January 2005, 08:02
your mail has been answered
see their mail archive
http://www.mail-archive.com/gimp-developer%40lists.xcf.berkeley.edu/msg08867.html
i've answered back to that reply, but my mail hasn't been put on the ML yet
i've looked through the code, too much for me to handle at my current (non-existend) experience
Macanudo
12th January 2005, 11:56
Originally posted by E-Male
...i've looked through the code, too much for me to handle at my current (non-existend) experience [/B]
I can assure you, you are far more experienced than I am. I am barely competent with Avisynth script, which I am sure that there are many on this forum who, if they saw my scripts, could argue that I am not even barely competent in that. :D .
If it is over your head then I am confident it is over mine. I still intend on looking at it to satisfy my curiosity, but I am afraid that it is probably a lost cause.
Macanudo:scared:
By the way thanks for the heads up on the response by the developers.
Something is screwy. I just rechecked my gmail again and I still haven't received any mail for the Gmane mailing list. I received my authorization to post three days ago and sent my reply but nothing since.
CraigBjorn
12th January 2005, 22:34
I really want to test this out, but I recently deleted all the dv files on my hard drive, and the ones at footage firm are huge and Mug Funky isn't online... does anyone know of a place with some short uncompressed dv clips to download?
[edit]The Footage Firms wouldn't be so bad, but they appear to be shot with some good lenses and 3ccd cameras which is going to be better quality than most people's. if we're trying to show the effect of using this kinda stuff on everyday footage.
CraigBjorn
13th January 2005, 00:06
I've been testing, and when I use this curves file
# GIMP Curves File
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
-1 0 -1 0 -1 0 46 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 217 249 137 255 255
-1 0 -1 0 32 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 249 201 255 255
-1 0 22 0 -1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
It has extreme reds and blues when it should make it a slightly bluish tint. This may be due to the -1's problem though though
Mug Funky
13th January 2005, 03:28
my sample probably isn't much good for getting a film effect - it's just a test pattern under incandescent light - a very quick capture to demonstrate the lack of horizontal res.
btw, it's online now and will be for the next few hours. sorry, i get a lot of downtime on this box, as it's not a dedicated server but a piddly old home machine.
E-Male
13th January 2005, 12:28
@CraigBjorn:
the lines even start with "-1 0"
and i still don't know how to handle (-1,x) pairs
i've now registered to the gimp dev ML as they don't seem to chek mail by non-members
i hope to soon be able to fix it
E-Male
13th January 2005, 23:42
ok, found a stupid bug
instead of the value curve i aplied the alpha curve
please redownload adjustgimp and test, thx
EDIT:
just saw alpha channel is also handled wrong, but i'll only release a fix if someone needs it
E-Male
14th January 2005, 00:41
http://e-rels.dyndns.org/downloads/GiCoCu.dll
gicocu("x:/curve")
-rewritten, envoke replaced, should be much faster but need testing again (or still)
-value and alpha-channel fixed (maybe)
-single "-1"s still not fixed
Mug Funky
14th January 2005, 03:25
nice!
it appears to be using all the curves (haven't checked comprehensively yet, just eyeballed it), but appears more saturated than in the gimp for the same curve. not a big problem of course, and it's possible that virtualdub is causing this somehow (though i don't know why it'd clamp levels if the incoming colourspace is rgb32).
i suggest testing on a 256 pixel wide white to black gradient. that might show things up that natural images might not.
[edit] it's definitely using all the curves. just something slightly off... maybe something's swapped, like green and blue?
E-Male
14th January 2005, 04:25
well, except for the "-1"-mystery i can't do much more, except when i find more errors in my code, which could happen likely
still waiting for word from the gimp dev-ML to get the -1 thing cleared up, it's the last obviosue missing thing for me
the only other thing i can work on atm is optimiasation
i wanna try if converting the curve-file to a lookup-table-file will speed the filter up (less computation, but more hd-readind [both per frame])
i also follow the masktools thread which deal with photoshop curves
when both formats are understood, i think i'll write a converter
the gimp comunity might like that as well
Macanudo
14th January 2005, 05:29
Outstanding!
Here are the results of my latest test using the same video and frame number as my above test. The "gimp curve" and the "gicocu curve", for all practical purposes, appear to me to be identical.
Great Job E-Male! You are a gentleman and a scholar!
Original Screen Shot (frame#360)
http://img109.exs.cx/img109/9010/boats9hu.png
Gimp Curve (frame#360)
http://img109.exs.cx/img109/1163/boatsgimpcurve2uo.png
Gicocu Curve (frame#360)
http://img112.exs.cx/img112/1645/gicocucurve4hq.png
I used the same curve file as my above test.
# GIMP Curves File
0 0 -1 44 28 43 -1 65 67 96 -1 93 -1 65 -1 140 121 139 -1 -1 -1 204 -1 201 192 190 213 224 -1 221 -1 242 255 255
0 0 -1 56 -1 47 -1 34 61 35 -1 -1 -1 118 -1 110 128 99 -1 98 162 193 -1 213 189 241 -1 236 -1 226 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 49 63 45 -1 47 100 92 -1 149 121 149 151 191 -1 186 -1 192 196 233 -1 228 -1 -1 -1 -1 255 255
0 0 21 38 -1 35 -1 -1 63 53 -1 66 104 65 117 139 -1 138 148 201 -1 203 -1 203 -1 198 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
Just for fun, I will now attempt to replicate the "Bleached Bypass" effect in "Magic Bullet Suite", but I still haven't gotten my Window's machine running right. Too bad Avisynth won't run under Linux or Unix. I have read in the Linux portion of this forum that may be coming with the release of Avisynth 3.0.
Thanks Again to E-Male and everyone involved,
Macanudo
E-Male
14th January 2005, 06:19
waiting for some curves to eb shared here
i knwo they will only be starting points, as al lrecordings differ in lighting and stuff
but it'll be godo starting point
and gimp curves are easy to share by just posting them in plain text
Macanudo
14th January 2005, 06:53
Originally posted by E-Male
waiting for some curves to eb shared here
i knwo they will only be starting points, as al lrecordings differ in lighting and stuff
but it'll be godo starting point
and gimp curves are easy to share by just posting them in plain text
I agree. I think we should share our curve files. Like you said they would make great starting points. All that would be necessary is to load the files into "The Gimp" and adjust them to your specific video clip. I plan to post my curve files and test results as I go, for those interested in seeing them. I hope everyone does the same.
Macanudo
14th January 2005, 07:21
Mug Funky,
I have been reading the following thread Producing a Film-Like Motion Blur. (http://forum.doom9.org/showthread.php?s=&threadid=75523&perpage=30&highlight=motion%20blur&pagenumber=1).
There seems to be divergent opinions on the best method to use. I noticed that you were following this thread. Did you settle on a method? If so, which do you recommend?
My plan is to use (in order)
1.)some type of bobdeinterlacer
2.)Limited Sharpen
3.)some type of Film Motion Blur
4.)Gicocu
5.)Overlay (to overlay and blend my Gicocu color curved video over a greyscale of the same video or vice versa)
Hopefully with some trial and error I can approximate the "Bleached Bypass" effect of "Magic Bullet Suite".
Sound reasonable?
E-Male
14th January 2005, 08:37
motionblur is something i might skip completely, as to me personally it is very anoying, but i'd have to try
what i'll add at the end would be a very very low amount of grain
what i think about is: this sharpening includes supersampling (in most cases) could/should some more things be done in that high resolution?
that would be closer to how film is proccessed
E-Male
14th January 2005, 08:39
a request from me:
could someone wit ha dv camera please shoot some footage (just 15 sec or so) in a well lit place of a person, sepecially a close up of the face
so i could start trying some scripts/curves/... before getting my hands on a camera
scharfis_brain
14th January 2005, 14:26
Unfortunately I cannot make public the videos I am processing.
The persons won't like that:(
And note, that different cameras are producing very different colorations!
Also, I partially agree to E-Male regarding the motin blur thing.
Always record your videos with 1/50 (PAL) or 1/60 (NTSC) seconds shutter speed.
this will be enough to get the film-look after
deinterlacing (PAL)
convert60ito24p (NTSC)
no need for artifical motionblur.
use shorter shutters, if you want to get the 'action' effect.
Mug Funky
14th January 2005, 15:16
@ Macanudo:
here's what i've got so far:
c=last
blurry = c.bilinearresize(c.width/2,c.height/2).bicubicresize(c.width,c.height,1,0).tweak(sat=0.5)
c.limitedsharpen(strength=100).mergeluma(blurry,0.5).mergechroma(blurry,0.5).converttorgb32()
gicocu("C:\MediaTools\AviSynth 2.5\plugins\filmlook_02_.txt")
and my gimp curve is:
# GIMP Curves File
-1 0 16 0 37 17 -1 -1 -1 -1 -1 0 -1 0 -1 0 128 127 -1 -1 -1 193 -1 221 -1 210 207 219 -1 241 -1 -1 255 235
0 0 -1 -1 -1 43 41 42 -1 53 -1 -1 -1 -1 -1 57 -1 39 -1 0 -1 0 -1 0 -1 204 211 226 -1 231 -1 -1 255 255
0 0 -1 -1 -1 -1 47 52 -1 61 -1 -1 -1 -1 -1 125 121 125 -1 -1 -1 -1 -1 -1 -1 210 215 231 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 40 39 -1 0 -1 0 -1 0 -1 0 127 132 -1 147 -1 -1 -1 -1 -1 207 -1 221 222 235 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
hope this gives something useful. the reds aren't as hardcore as you get on film, but overall it gives the look of push-processed film (high contrast, slight yellow/orange cast).
[edit]
you might want to tweak the saturation in the tweak up there. if you're getting oversaturated, then turn it down until it looks better. originally it was straight greyscale, but i decided that deadened things a bit much.
scharfis_brain
14th January 2005, 15:26
@Mug Funky: I'm not able to DL your sample.
It doesn't set up a connection. (is your no-ip client running?)
alternatively, you might want to upload it on my FTP.
if so, PM me.
Mug Funky
14th January 2005, 15:34
my bad, it's up now. please get quickly, as i might need to turn it off soon...
Didée
14th January 2005, 16:11
A small'n quick modification of Mug Funky's script, giving a slightly different effect (kinda "highlight glow"):
radius = 3
LumaMix = 0.5
ChromaMix = 0.5
SatMix = 0.5
c=last
blurry = c.bilinearresize(c.width/radius/4*4,c.height/radius/4*4).bicubicresize(c.width,c.height,1,0).tweak(sat=SatMix)
c.limitedsharpen(strength=100).mergechroma(blurry,ChromaMix)
mergeluma(logic(last,blurry,"max"),LumaMix).converttorgb32()
gicocu("C:\MediaTools\AviSynth 2.5\plugins\filmlook_02_.txt")
(I hope it runs as it is: fully untested, just typed off-the-cuff.)
Mug Funky
14th January 2005, 16:14
i'd gladly post a sample, but it's my ugly mug (funky) on it, and i don't want to end up as the next Star Wars Kid :)
E-Male
14th January 2005, 19:24
Originally posted by Mug Funky
...i don't want to end up as the next Star Wars Kid :)
E-Male wonders if that would be worth a few hours of rotoscoping.... *j/k*
E-Male
14th January 2005, 19:26
i gotta say that i'm quite happy how this thread progresses
i think we really are on a way of making a free and opensource alternative to some $1000+ software
scharfis_brain
14th January 2005, 19:39
If manao releases his next version of mvtools,
I will be able to knock out some nasty things of mvbob() .
(Do you have further ideas, Mug Funky?
which version of mvbob are you using?)
So we should get a very crisp progressive 25p (PAL)
or 23.976p (NTSC) out of our cheap interlaced cameras.
Afterwards, color correction
and iiP upsize to anamorphic 16:9 can be done,
because the electronic anamorpic mode of most of those cams is crap.
they commonly crop the 4:3 image to add a following interlaced upsize to 16:9. :(
DSP8000
15th January 2005, 03:41
Hi guys,
Looking at the thread and the amount of posts gives me hope for a real free solution.
I feel realy unhelpfull because I can't help in sort of improving the process because my knowledge in AVIsynth scripting is not so great:o
However, I'd like to say thanks to everyone participating in the development.
DSP8000
E-Male
15th January 2005, 05:35
wel, you can help
help by testing
morsa
15th January 2005, 05:53
Just a HINT:
If you were using a Macbeth Color chart you would notice that every film stock available out there will give you different colors for every color patch on that chart.And that is one of the key factors to achieve a film look.
The easiest way to replicate this thing would be getting a list of the response to every Macbeth color patch from a given Film Stock, then making a correction filter in the HSV or HSI color space to move those color ranges from the video footage to the desired film stock color list.
At least that is the system used by many filmlook plug-ins.
E-Male
15th January 2005, 06:57
ok, so we just need one lookuptable-file per film stock, nice
erm, where to get??
also i prefer having a little more freedom, for 2 reasons:
-sources differ, optimisation is possible when you have the material
-the "look" i wanna have might differ, maybe i want a blueish filtered look, giving a cold atmosphere, i could do this in the same step by just adjusting my curve
plus, even if i could just get a color chart some dv-cams, a movie cam and some kinds of film, ... it would be the boring way
part of the fun of getting this freeware/opensource film-look solution done is doing it ourselves
i learn from the programming, other peopel might improve their way with gimp, curves, colors, ...
no offense intended, if you can contribute any data and/or ideas, i'm thankful
communist
15th January 2005, 10:23
Great to see more people interested in getting something like this done.
Might be a coincedent but I just discovered this (http://forum.doom9.org/showthread.php?s=&threadid=88320). BBugsBunny has updated his Curves filter for VirtualDub, it now comes with a basic 'edit curve by mouse'. It lets you create / edit / import and export curves to an *.amp file.
All that is now needed is an improved 'edit by mouse - feature" cause right you'll have to slow down your mouse otherwise you'll get a spiky curve.
Still looks very promising and I hope it helps the programmers here in this thread as the sources for the filter are also available (under GPL).
E-Male
15th January 2005, 12:27
already replied to him
hope we can help each other with a feature or 2
Mug Funky
16th January 2005, 03:07
i'm intrigued by the macbeth colour patch thingy. i don't know precisely what those things are, but i think i get the idea.
we could do our own measurements, but would probably be limited to still film stocks rather than motion picture stuff. i could take a roll of kodachrome or something similar - all we need is a colour chart that can (a) give reliable and repeatable results, and (b) be easily downloaded so anybody can test it.
i see the beginnings of an opensource project here - i'm sure most colour charts out there are protected by intellectual property laws (i'm not sure if it'd count as a patent or a copyright or both), but i'm sure some cleverdicks can create their own one. the real question is how to sync everything up colourwise. this kind of thing involves multiple conversions from digital to analog and vice versa, and at each stage it's a pain to determine whether the colours are being messed up along the way. so we need some kind of relative method where the result is a colour shift from "real" to "sampled", and all the conversions in between make negligible difference.
this is probably why most people just eyeball the difference...
[edit]
oh, and scharfi: i don't know what mvbob i'm using anymore... i put them all in the same avsi file and lost track of which was which. so i just call "mvbob" and it seems to work :). i consider it experimental, so it doesn't matter much as i don't use it in production situations.
E-Male
16th January 2005, 14:17
i daubt we can get much information that way without some budget
i think doing the curves from scratch is the best way
maybe if you know someone with access to magic bullet or something similar, ask him for some before-after-clips, so we can see how close we can get
Mug Funky
16th January 2005, 17:04
that's a pretty good idea... just run some 256x256 white-to-black gradients through it and we can get an exact match (save for a bit of banding, maybe)
Leak
16th January 2005, 17:21
Originally posted by Mug Funky
that's a pretty good idea... just run some 256x256 white-to-black gradients through it and we can get an exact match (save for a bit of banding, maybe)
I'd add red, green, blue, cyan, yellow and magenta gradients (at least) to that list, as I don't think it'll only have a different luminosity curve...
np: Zorn - Michelle's Unblockable (The City's Collapsing (But Not Tonight))
E-Male
16th January 2005, 18:41
is it sure that MB only does a color curve and spatial and/or temporal filtering?
but all in all running some test images through might give us some LUTs to work with
morsa
17th January 2005, 03:55
I can gather the info about every film stock for free.
Problem is It will take some time..
Also try google and you'll find the macbeth chart and its color values in SRGB.
Mug Funky
17th January 2005, 03:58
leak: a greyscale gradient in RGB colour should be enough - the output would be a slightly coloured gradient, no?
of course, having a whole bunch of gradients might help if magic bullet works in some way i hadn't anticipated (like separating colours out and treating them separately, rather than just 1 curve per channel like we're trying to get here).
Morsa: that would be very cool indeed :)
E-Male
17th January 2005, 15:37
another thing about filmlook we might be able to do:
AFAIK on film you have a stronger difference between the in-focus and out-of-focus parts of the picture (most noticable when you shift the focus between a person in the forground and one in teh background)
now could this be imitated by blurring unsharp and sharpening sharp parts?
for example by using my (primitive) sharpnes mask (or something more advanced) with (for example) blur and limitedsharpen...?
DSP8000
17th January 2005, 15:51
Hi,
@ E-Male, did you get my email and the images?
Good reference for some of the MB looks are Harry Potter, Catwoman, most of the new DVD movies.
Bluring with edge detection and detail preservation would be a good starting point before coloring.
DSP8000
Didée
17th January 2005, 15:54
E-Male: Basically, yes. But it's not quite that easy: you would need a blur function that blurs with a rather big radius, but stops using any pixels in a certain direction for averaging as soon as an "edge" is found.
Unrestricted blurring, and applying the result to the "non-ede" areas only, leads to suboptimal results (already tried that, many times). It gets better by using a smart smoother, but that doesn't solve the basic problem of including pixels "from the other side" of an edge into averaging (although it's probably not an issue with blurring radii <= 5, or so).
E-Male
17th January 2005, 17:53
@DSP8000:
yep, got them
would be great if you could make new ones when we got some dv-test-footage (as mentioned i prefer close-ups of faces) and/or some test-paterns
@didée:
"out of focus" means totally blurred, so why stop at edges??
doesn't make any sense to me
(although such a denosier would be similar to something have on my ideas-to-code-list, just for cartoons)
i agree on the need for a big radius
is there a blur-filter with variable radius?
if not i'll quickly hack that together
tsp
17th January 2005, 18:10
is there a blur-filter with variable radius?
medianblur :rolleyes:
E-Male
17th January 2005, 18:32
wouldn't a simple averaging blur be more effective then median?
since in this case we WANT it blurred badly/strongly
tsp
17th January 2005, 19:04
it would yes. I just don't think anyone has made such a filter. Although you could use YV12Convolution it wouldn't be the most effective. I think I will make one. What colorspace do you need?
E-Male
17th January 2005, 19:14
i'd like to do it myself, i can use the training (doesn't mean you can't do one, too, of course)
morsa
18th January 2005, 02:09
Guys, if that were so easy nobody would be selling a 35mm lenses adaptor for MiniDV Camcorders at around U$ 8,000.
35mm DOF cannot be emulated using a filter, of course you can do it by hand...
www.pstechnik.de/datasheets/d_mini35.htm
E-Male
18th January 2005, 07:46
a) i did not say it would be easy, i never said that
b) i never said we would reach the quality of comercial projects, i even daubted it
c) there are many expensive things sold which have free alternatives
summa summarum: i won't stop because there is some expensive hardware avaible
and i hope the others here won't either
morsa
18th January 2005, 10:05
I never meant to stop you, if that is exactly what it sounded like.
Sorry.
I was just trying to say that it is "almost" impossible to make a filter that autonomously (if that is the intended way for it to work) detects what should be in focus and what should be out of focus.
Just that.
Sorry again, it seems everytime I say anything I upset you.
E-Male
18th January 2005, 10:50
i'm sorry, too
i often sound ruder than i want, too
it's just that to me you sound very negative, but i'm overreacting, i know
about the focus thing, i know it will only help a bit, if at all
but it can be improved, maybe to something usefull, we'll see
i know it'll be slow, but we got some people here that won't be stopped by that
if nothing usefull comes out at the end, i guess the experience will still make it worth it
maybe we should make a list of the variouse part that could/should be in a film-look-script (like sharpening, color curve, ...)
so we can later mark which are done in freeware, which are to improved, which are less neccessary as we thought, ....
Mug Funky
18th January 2005, 13:22
one way to get _slightly_ more DOF is to move the camera back and zoom in a little. obviously the aperture should be open as far as it can be.
i'm intrigued by the DOF simulation in avisynth though. it may be possible to get something that looks okay, but i think DOF isn't all that big a part of the film "look". perhaps something that uses edge-direction to adapt the shape of the filter around edges (this might give a "warpy" look though, and be slow as hell).
look at a film like "24 hour party people" that was actually shot in PAL, interlaced (i didn't realise this until i looked at the out-takes that were still interlaced. though when you watch it critically, it's quite obvious in places).
E-Male
18th January 2005, 14:37
is it correct that DV also shows blur on out-of-focus objects, just much less than film?
Didée
18th January 2005, 15:04
I'm curious how you'll try to make the distinction between in-focus and out-of-focus areas. An edgemask-approch will, depending on sensibility, either detect too much edges in the flat areas, or consider parts as out-of-focus that are actually in ...
Before too much fiddling is done, I could imagine that e.g. VagueDenoiser can be set up so that something (roughly) similar is achieved: blur the flat parts, keep the detail.
Bilateral filtering could also be a possibility, when setting the thresholds so that the assumingly "flat" areas just get catched.
edit:
Think about *skin*: A scene of a face that fills 30%-50% of the frame, background is out of focus. But too much area of the skin will show little enough detail to be considered out of focus, although it is in. - Naah, I don't want to think about that any more :(
E-Male
18th January 2005, 15:34
ok, let's put that sub-topic on hold, i'll report if i get something usefull done there
so, back to making a list:
-colors [very well in progress]
-sharpening [well in progress]
-grain(optional)[done]
-focus(laaaaater)
-..........
please add
Didée
18th January 2005, 16:07
-grain(optional)[done]
Hey! You say "done", and didn't even see that "emboss noise":
o=last
ox=last.width
oy=last.height
blank1 = blankclip(o,width=ox/2 /4*4,height=oy/2 /4*4,color=$000000)
noise1 = blank1.addgrain(15,.0,.0)
noise2 = noise1.DEdgeMask(0,255,0,255,"2 0 0 0 1 0 0 0 0",U=-128,V=-128)
NoiseDiff1=yv12lutxy(noise1,noise2,yexpr="x y - 128 +",U=-128,V=-128).bicubicresize(ox,oy)
x=yv12lutxy(o,NoiseDiff1,yexpr="x y 128 - 1.0 / +",U=2,V=2)
blank3 = blankclip(o,width=ox/2 /4*4,height=oy/2 /4*4,color=$808080)
noise3 = blank3.addgrain(15,.0,.0)
noise3a = noise3.FineEdge(1).levels(0,1.0,255,128-15,128+15).greyscale
noise3b = noise3a.DEdgeMask(0,255,0,255,"2 0 0 0 1 0 0 0 0",U=-128,V=-128)
NoiseDiff2=yv12lutxy(noise3a,noise3b,yexpr="x y - 128 +",U=-128,V=-128).bicubicresize(ox,oy)
y=yv12lutxy(o,noisediff2,yexpr="x y 128 - 1.0 / +",U=2,V=2)
#NoiseDiff1
NoiseDiff2
return last
#===================================================
function FineEdge( clip clp, int "div" )
{ logic( clp.DEdgeMask(0,255,0,255,"8 16 8 0 0 0 -8 -16 -8", divisor=div)
\ ,clp.DEdgeMask(0,255,0,255,"8 0 -8 16 0 -16 8 0 -8", divisor=div), "max", Y=3,U=2,V=2 ) }
Code suffers from major uglyness, I just teared it out of one of those brainstorming scripts ;) - but it's fun to play around with it (different strenghts & blankclip-sizes)
Guest
18th January 2005, 17:15
@E-Male
Other neat things could be black, warm, cold glows - or maybe this can be done with Didée's script above?
And maybe gradients in color/b&w - to grade down a blown out sky, make it ex. more red/blue or darker - or to grade down the corners of the image like A short film about killing (http://www.dvdbeaver.com/film/DVDReview/short-killing.htm).
Great work!
Tin2tin
E-Male
18th January 2005, 19:11
@Didée:
i thought addgrain would do the job
but seems like you scripted together some improvement again
what does your script do exactly? (i honestly can't understand it all, except that you do something with edges and LUTs again)
@Guest:
the corners thing should be done with a mask i think
for the rest:
i'm a victim of my lack of vocabulary in this area (english isn't my native language)
"glow" and "gradient" need some explaination in this context
(googeling for "gradient definition" gave some nasty mathematic non-video-related stuff)
communist
18th January 2005, 19:43
Several gradients:
http://home.att.net/~arwomack01/images/CMYKRGB-TEST-GRADIENT.jpg
Glow-effect:
http://www.aons58.dsl.pipex.com/tutorials/graphics/glowing_text.jpg
How this should look like with real footage:
Original (http://www.stud.uni-goettingen.de/~s304280/D9/pics/original_.png)
The glowing version (http://www.stud.uni-goettingen.de/~s304280/D9/pics/glowing_.png)
And the glowing version with the mask used to limit the effect
Glow mask (http://www.stud.uni-goettingen.de/~s304280/D9/pics/glow_mask.png)
The effect is deliberately overdone ;)
E-Male
18th January 2005, 20:53
thx, very nice examples
but what would the gradient thing do in this context? (sorry, but i'm a bit slow today)
the glow thing, well, i knew it with text, plan to use a variation of it on titles
but in how far has this to do with film look? couldn't get that much info from the extrem picture (but nice messiah-look)
i'm also not sure how to do it in avisynth, i mean finding the edges is done, but i think the glow should only go to the outside of teh object, which cannot easily be found outomatically
Mug Funky
19th January 2005, 03:13
glow in film is caused by crap on the lens though... meaning that everything gets the same amount of glow (not just the objects).
bright objects appear to glow more because of overexposure - the effect can be mimiced using high dynamic range images (ie, 32-bit floating-point images captured using multiple images at different exposures).
this can be fudged with a simple gamma curve on the glow mask.
joshbm
19th January 2005, 05:02
For NTSC material I bob my clip from 30i to 60p using either TDeint() (then supersample it using TomsMoComp) or MVBob(). Then use scharfis_brain's convert60ito24p() script to convert 60p to 24p.
By doing this you are left with 24 progressive frames per second -- the same as a film camera.
After this I do a Tweak() on saturation in the colors. Of course it depends on what your "film" to look like. If you want it colder, obviously reduce the saturation. If you want it to look like a modern film, where colors are more warm, then increase the saturation. I then use the Histogram() to find out where my blacks need to be and then use Levels() to increase the grayscale.
You can also make your own DOF adapter for your video camera (instead of buying one-- hefty price involved). You can check out a how-to at http://www.marlathemovie.com/, a movie totally shot on DV.
Another good thing to do is to use a sharpener to sharpen your video. Look into LimitedSharpen(). Also adding grain (as mentioned before) does help the illusion of film. 16:9 is always a good thing as well (which I have made a custom script to do for me as well).
Regards,
joshbm
Macanudo
19th January 2005, 06:14
E-Male,
Here is a photoshop tutorial that may give you some ideas on how to achieve the Depth of Field simulation you are pursuing - Hocus Pocus Focus (http://www.russellbrown.com/images/tips_movies/Hocus%20Pocus%20Focus.mov)
It is a mov tutorial, so you will need Quicktime installed to view it. I think you might find the portion dealing with a DOF gradient mask of particular interest. I realize that Avisynth doesn't have an equivalent of a "lens blur" filter found in the tutorial, but IMHO I think that the idea of a "gradient mask" would be the best approach to simulating DOF.
If you duplicate the original clip and apply a "Gaussian Blur" of a radius of say 50.0(I used Didee's suggestion in this thread (http://forum.doom9.org/showthread.php?s=&threadid=88482) to simulate the Gaussian Blur.), then using Overlay() sandwich a Gradient mask(I created my mask in Gimp) between the blurred clip and the original clip with the Lightest area of the mask being the most blurred and the Darkest area being the most focused.
Here is the script I used:
a=AviSource("C:\boats.avi")
b=a.bicubicresize(150,100,1.0,.0).bilinearresize(720,480)
g=ImageReader("C:\gradient-2.bmp").AssumeFPS(29.97)
Overlay(a, b, mask=g, mode="blend", opacity=1.0)
Here is my result:
Original Screen Shot (frame#360)
http://img109.exs.cx/img109/9010/boats9hu.png
Gradient Mask (frame#360)
http://img116.exs.cx/img116/9352/gradient25qw.png
Gaussian Blur Simulation Screen Shot (frame#360)
http://img68.exs.cx/img68/7870/boatsgaussianblur5di.png
DOF Simulation Screen Shot (frame#360)
http://img91.exs.cx/img91/5149/boatsdofsimulation2nw.png
I purposely exaggerated the effect for this test, so you may want to adjust it a little. You can customize this method by creating different gradients, Gaussian Blur radiuses, and Overlay options.
This may not be exactly what you are looking for, but it may give you a jumping off point.
Hope I have contributed,
Macanudo
Edit: Included Gaussian Blur Simulation Screenshot. Don't ask me where the blue band on the Gaussian simulation came from, I suspect it was a side effect of the resizing used to create the blur, but I am not sure.
Didee,
Is the blue band a product of the Bicubic or Bilinear Resizing?
Did I follow your suggested method for creating the Gaussian Blur incorrectly?
Mug Funky
19th January 2005, 07:56
the blur looks a little pixelly. try bilinear down, and bicubic(1,0) up to get a smoother blur.
Macanudo
19th January 2005, 09:27
Originally posted by Mug Funky
the blur looks a little pixelly. try bilinear down, and bicubic(1,0) up to get a smoother blur.
Here is the result:
http://img32.exs.cx/img32/5069/boatsdofsimulation24hx.png
I see a noticeable improvement. What do you think?
Mug Funky
19th January 2005, 11:04
yeah, looks better now.
what's that blue line on the right?
Macanudo
19th January 2005, 11:25
Originally posted by Mug Funky
yeah, looks better now.
what's that blue line on the right?
I am not sure...I think it may have something to do with the resizing used to simulate to Gaussian Blur. If you will look up at the screenshot of just the Blur Simulation that is when it first appears.
Didée
19th January 2005, 12:10
Try the intermediate resizing with MOD4 resolutions. You did 150*100, where 150 is only MOD2.
Macanudo
19th January 2005, 12:16
Originally posted by Didée
Try the intermediate resizing with MOD4 resolutions. You did 150*100, where 150 is only MOD2.
Bingo...that fixed it. No more blue band.
Thanks Didee!
Later,
Macanudo
E-Male
19th January 2005, 13:32
so this means, the higher up a pixel is the more it gets blurred, right?
this works ok for shots like this, when you see a lot of floor (i hope you get what i mean)
but on a close-up this would look odd i assume
Macanudo
19th January 2005, 13:53
Originally posted by E-Male
so this means, the higher up a pixel is the more it gets blurred, right?
this works ok for shots like this, when you see a lot of floor (i hope you get what i mean)
but on a close-up this would look odd i assume
It has its limitations, but by gradiently blurring you get a more realistic impression of depth, as opposed to blurring the background uniformly.
You can create gradient masks in a variety of shapes to suit your application. I used a simple linear gradient mask for this test, but you can create radial, diamond, or custom shaped gradient masks.
The major set back with this method is that the gradient mask remains stationary. If your subject moves the gradient mask does not move with it. If there was some way to create a mask that would track the subject you could resolve one of the major limitations IMHO. I think it can be done with motion prediction, but that is way over my head. That would require one of the resident GURUS to work out.
As far as a close up goes, you could try a radial or eliptical gradient mask that encirles the face and/or body of your subject. I think that would give you the desired effect, provided your subject doesn't move their head very much within the frame.
EditOh sorry, Yes, the further up you go the the blurrier.
E-Male
19th January 2005, 14:14
i see, so we have a "great looking but not automatic" solution
i think i'll use that on some scenes
i should be able to build a focus shift function on that
Macanudo
19th January 2005, 14:57
Here is an example of a radial gradient mask applied to the boat the the far right. It isn't the best example, because it doesn't look very realistic just having the right bottom corner in focus. I just wanted to show you what a different shaped gradient would yield.
Radial Gradient
http://img40.exs.cx/img40/5695/gradient44gt.jpg
DOF using Radial Blur (frame#360)
http://img130.exs.cx/img130/1535/boatsdofradialblur3rt.png
E-Male
19th January 2005, 16:01
wow, pretty nice effect
but it's not so easy to make thos masks without some knowledge of graphic programs (which i don't have)
but i'll look into it
E-Male
19th January 2005, 16:36
i think i got an idea for a plug-in (in fact 2) that will allow creating the masks directly in avisynth
E-Male
19th January 2005, 18:51
good news
i was able to dublicate both masks
plug-in release later tonight or tomorrow
E-Male
20th January 2005, 00:32
i finished a little plug-in that can create such masks directly in avisynth
EDIT: see next page
Macanudo
20th January 2005, 07:18
E-Male,
I think there is a bug.
Here is my script
LoadPlugin("C:\Program Files\AviSynth 2.5\Filters\maskmaker.dll")
a=AviSource("K:\boats.avi")
b=a.bilinearresize(104,48,1.0,.0).bicubicresize(720,480,1.0,0.0)
g=b.maskmaker(1,3,0,0,500)
Overlay(a, b, mask=g, mode="blend", opacity=1.0)
If you will look at the following screencaps you will see what I mean. These are consecutive frames.
MaskMaker Test Screen Shot #1(frame#430)
http://img58.exs.cx/img58/3001/boatsmaskmaker18lw.png
MaskMaker Test Screen Shot #2(frame#431)
http://img109.exs.cx/img109/3233/boatsmaskmaker22zu.png
The masked area shifts back and forth every few frames between these two locations.
I wish there were someway to send you the video, but I don't have any host space. I think you get the idea from my screen shots though.
Question:
Does the mask layer have a transparent or white background? Because, in order to be truly effective as a mask the background of the mask created should be white.
I hope I have helped,
Macanudo
Edit I goofed and posted the wrong frame for screen shot #1. Fixed it with this edit
E-Male
20th January 2005, 07:43
duplicated it
i'll have a look
Macanudo
20th January 2005, 08:00
Wait a minute...After replacing the Gaussain Blur simulation code in my script with tsp's new filter "Variable Blur" the masked areas shift changes positions again, now they shift between the bottom right corner to the top left corner instead of the bottom left to the top right as before.
Here is the new code:
LoadPlugin("C:\Program Files\AviSynth 2.5\Filters\variableblur.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\Filters\maskmaker.dll")
a=AviSource("K:\boats.avi").ConverttoYV12()
b=a.VariableBlur(radY=50)
g=b.maskmaker(1,3,0,0,500)
Overlay(a, b, mask=g, mode="blend", opacity=1.0)
The results are far more pleasing using "Variable Blur" as well. I think you will prefer tsp's new filter. By the way I have exaggerated the blur so you could see the contrast between focused to blurred better. Try VariableBlur(radY=10), it is great effect.
E-Male
20th January 2005, 08:03
well, i couldn't exactly duplicate it, but similar
for mode 1-3 on odd frames the coordinates are from top-left (c=1)
even frames are correct
i just triple-checked the code and got no idea what causes this
but i'm sleepy, i might find it later
it's just the the frame number shouldn't make any difference at all
a note i forgot:
the filter atm is yv12 only
about white/transparent:
well, i just have luma go from black to white
and keep the chroma at grey
(i do not knot that much about masks, as always i worked without doing proper research)
Macanudo
20th January 2005, 08:15
Originally posted by E-Male
well, i couldn't exactly duplicate it, but similar
for mode 1-3 on odd frames the coordinates are from top-left (c=1)
even frames are correct
i just triple-checked the code and got no idea what causes this
but i'm sleepy, i might find it later
it's just the the frame number shouldn't make any difference at all
a note i forgot:
the filter atm is yv12 only
about white/transparent:
well, i just have luma go from black to white
and keep the chroma at grey
(i do not knot that much about masks, as always i worked without doing proper research)
I wasn't aware that it was YV12 only, that is probably why the gradient didn't look quite right to me. After adding ConverttoYV12 to the script the quality is much improved, so the white background comment is nonsense on my part and should be treated accordingly(LOL).
The masked areas still shift from the top left to the top bottom even after adding ConverttoYV12 though.
Oh well, Good Night. Pleasant Dreams.
Macanudo
E-Male
20th January 2005, 08:21
there are 2 work arounds:
either use c = 1 (which stays corerct for me) and adjust x & y accordingly (i daubt you'll have any trouble with this simple math)
or use trim(0,-1).loop(x) (x = length)
the strange thing that nothing in my code should react to the frame-number and all my tries to trace the error to the IFs and CASEs that might cause it eliminate each other
Macanudo
20th January 2005, 08:36
Originally posted by E-Male
there are 2 work arounds:
either use c = 1 (which stays corerct for me) and adjust x & y accordingly (i daubt you'll have any trouble with this simple math)
or use trim(0,-1).loop(x) (x = length)
the strange thing that nothing in my code should react to the frame-number and all my tries to trace the error to the IFs and CASEs that might cause it eliminate each other
c=1 and adjusting the x, y coordinates to 720,480 fixed it.
It looks awesome by the way! Great Job!
Good Night,
Macanudo
E-Male
20th January 2005, 08:44
thx for the kind words
btw, it should be 719,479 :cool:
joshbm
20th January 2005, 20:32
I think it's kind of funny you all are talking about DOF plugin. I mentioned this a while back and got almost 0 replies.
I think it would be good if a plugin would be able to calculate distance accordingly to movement of the camera in what is in focus, then a DOF plugin could actually become an automated reality.
Regards,
joshbm
E-Male
20th January 2005, 20:38
@joshbm:
you talk about technology which by now only exists in experimental state at research labs of universities
if you wanna discuss this, please do it in a seperate thread
no chance to use this right here and now
much too less advanced and i guess much too resource intensive
joshbm
20th January 2005, 21:13
This is true.
E-Male
20th January 2005, 21:30
ok, i think narrowed down the code that contains the bug:
switch (d) {
case 1:
break;
case 2:
a=(src_width-1)-a;
break;
case 3:
a=(src_width-1)-a;
b=(src_height-1)-b;
break;
case 4:
b=(src_height-1)-b;
break;
}
this only has an effect on every second frame
any ideas
E-Male
21st January 2005, 04:42
fixed the bug (and learned something about avisynth again)
also renamed the plug-in to GraMaMa (Gradient Mask Maker)
http://e-rels.dyndns.org/downloads/GraMaMa.dll
GraMaMa(m, c, x, y, r)
m = mode (int)
1: circle ("radial gradient" 2nd example)
2: square
3: square diagonal
4: line ("gradient mask" 1st example)
c = center corner/side (int)
1: (top) left
2-4 clockwise respectively
x&y, coordinates (float)
center coordinates of the gradient / line coordinate (no y then)
the center can be outside the picture
r, "radius" (float)
"size" of the gradient
the 2 examples on the last page should look like this:
maskmaker(4,3,-170,2.8)
maskmaker(1,3,0,0,500)
please post feedback (bugs; suggestion, maybe for new modes, ...)
this filter is YV12 only for now
CraigBjorn
24th January 2005, 22:38
In response to joshbm about calculating the distance, and E-male's reply.. it's not really experimental (unless you consider programs like avisynth it's self experimental) There are camera trackers likeVooDoo (http://www.digilab.uni-hannover.de/docs/manual.html) that could be used for something like this... the only thing about it is that it's impractical. Especially when it's ALOT easier to just make your own 35mm adaptor....
This forum has alot of good threads on 35mm adaptors. (http://www.dvinfo.net/conf/forumdisplay.php?forumid=70)
And this forum has alot of info on getting that "film look" (http://www.dvinfo.net/conf/forumdisplay.php?forumid=34)
Hope some of that helps
E-Male
24th January 2005, 23:07
well, maybe "experitmental" wasn't the right choice of words
but it doesn't simply work on all scenes, you need movement
also i wonder if this is, yet, pratical for our project
but i'll have a closer look
EDIT: i wrote to the programmers of voodoo to see if this will help us
E-Male
25th January 2005, 20:55
i got a reply
the program by now can only work on camera rotation on at ripod and there is are no plans to add stereoscopic features or anything similar
i got some links from him, one is worth looking at:
http://cat.middlebury.edu/stereo/
but i think it's not as easy as some people think
there won't be fully automated high quality depth detection for every material in avisynth any time soon
*.mp4 guy
26th January 2005, 20:23
Well even the latest Gicuco borks on Gimp color curves, I've got a screenshot to demonstrate the problem, but no way to post it. Anyway the problem is very obvous, the clouds turn pink. Can someone please help me post the screenshot?
E-Male
26th January 2005, 20:50
http://imageshack.us/
please post an original frame and it's gicocued version
as well as the avs-script and the curves
*.mp4 guy
26th January 2005, 21:01
Just checking to see if the image works, ill post the other stuff in a followup.
http://img177.exs.cx/img177/4959/frames3ha.jpg
hey it works!
and heres the original:
http://img165.exs.cx/img165/9189/original1om.jpg
heres my script:
#loadplugin("G:\warpsharp_2003_1103\LoadPluginEx.dll")
#loadplugin("G:\avishader.dll")
#loadplugin("G:\dust.dll")
#loadplugin("G:\smoothd.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\decomb.dll")
#LoadPlugin("C:\PROGRA~1\GORDIA~1\FluxSmooth.dll")
loadplugin("G:\GiCoCu.dll")
#loadplugin("G:\warpsharp.dll")
avisource("C:\DC.avi")
#Telecide(order=1,guide=1).Decimate()
FieldDeinterlace()
#fluxsmooth(3,3)
#lanczosresize(2560,1920)
#Xsharpen(255,255)
#lanczosresize(1024,768)
#smoothd(1,6)
converttorgb()
GiCoCu("C:/cvr4.txt")
(heheh kinda messy)
and the curves:
# GIMP Curves File
2 27 -1 -1 -1 -1 54 51 -1 56 -1 -1 -1 108 106 115 -1 180 -1 185 157 189 -1 140 -1 198 -1 208 -1 199 -1 -1 255 255
0 0 -1 -1 -1 0 -1 0 61 0 84 76 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 50 66 0 87 79 -1 180 -1 203 133 134 -1 133 -1 139 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
-1 0 -1 0 -1 0 -1 0 64 0 -1 -1 -1 70 -1 126 126 128 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
E-Male
26th January 2005, 22:07
i assume that if you just remove gicocu and keep everything else that the output looks correct, please doublecheck that
i see no problem in the script, gicocu should take any rgb input
it might be the curve file, as it includes the not yet understood [by me] (-1/x)-pairs, even has a line starting with "-1 0"
please try some other curve files on this to see if it might be that
also it would be nice if the the pics would be from the same frame
*.mp4 guy
26th January 2005, 22:15
Other curve files all display similar distortion althogh in different color ranges(for istance more greent than in the gimp). I'll check with some other curves and post screenies form the same frame.(althogh imo it's colors who cares:p ). Also thanks for the grate tool!
*.mp4 guy
26th January 2005, 22:41
Heres the green one...its a bit more subtle than pink clouds;)
http://img193.exs.cx/img193/7605/comparison22fw.jpg
Heres the curve file:
# GIMP Curves File
0 0 22 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 -1 -1 116 139 108 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 59 86 44 -1 44 -1 143 -1 120 140 115 -1 199 -1 226 194 235 -1 175 -1 -1 -1 -1 255 255
0 0 -1 56 -1 54 -1 42 67 38 -1 34 -1 137 108 143 -1 137 -1 247 -1 223 168 221 -1 223 -1 -1 -1 -1 -1 -1 252 246
0 37 -1 53 -1 -1 -1 61 -1 74 72 73 -1 -1 108 136 -1 131 -1 214 -1 218 175 211 -1 190 -1 135 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
Fyi if u want the full source it's on that free stock footage site, this is frame 230 of the dc clip.
E-Male
26th January 2005, 22:56
i daubt i can visually improve gicocu atm
i could if soemone from the gim ml would finally respond
or someone with the needed skills go through the gimpsource (i know which files) and tell me how the files are to be read
*.mp4 guy
26th January 2005, 23:24
Thanks for all of your effort so far. I wish I could help, but I can hardly coble together a simple avs script:D . Man opensource is supposed to be better then this, darned Gimp people:rolleyes: .
morsa
27th January 2005, 00:24
I will insist so people I don't want anybody to get angry.
The nice way to get better results is using LUTs in the HSV colorspace...
DSP8000
27th January 2005, 02:24
Hi guys,
Just recently I found a very useful tool, DCE Digital Camera Enhance.
Oscar, the guy who writes Real-Draw Pro, DVD-Lab, has some very good filters in this tool.I'll contact him to see if he can help us a bit.
The images that I did with DCE look very close to MB.
Also the chroma filter in Microsoft Digital Image Suite Pro v10 works wonders, maybe I can find something in the Microsoft knowledge base about this.
DSP8000
E-Male
27th January 2005, 02:24
ok, i did some googeling to find some info on HSV
i think i understood what it is
but i'm not sure how it'll help us here
could you go into some detail please
thx
EDIT1: so we basicly would use an LUT version of "tweak"?
sound ok to me, but:
what makes that better than usign the LUTs in rgb?
where/how do we get data for hsv LUTs?
sorry if i ask dumb questions, but it seems i can't really get the idea of your's, yet
E-Male
27th January 2005, 03:58
i think i got some ideas what's going wrong with GiCoCu
expect a new test version soon
EDIT:
http://e-rels.dyndns.org/downloads/GiCoCu.dll
has 2 additional parameters, both bool
GiCoCu("x:\abc", false, false)
i won't tell yet what the 2 bool-parameters do
please test with all 4 combinatons and report which is closest to gimp and which have more or less visible errors
this release includes some moving around of code, so there could be new bugs
looking forward to results
morsa
27th January 2005, 08:56
Well, the nice thing about HSV is that you can change ranges of colors.(Like touching just the yellowish color and nothing else, etc)
For example you could turn a red T-shirt into a blue one, etc.( H )
then you have the Saturation thing ( S ) so you can rip off for example color saturation on the blacks if needed (that way it is easier to get a "bleach by-pass" effect if desired.Anyway I think more or less the same can be done in YUV too, so forget about this :) ).
And then you have the Intensity or "brightness" value ( V ) so you can remap luminance more or less as usual.
I know my explanation is really poor but I guess it helps as to give a basic idea.
I will try to find some links in google for you.THX
(As another easy example, we all know in PAL land that the range of the yellows isn't always nice, it has a really "video" look.On contrary yellow colors on film tend to look a little bit diferent and way much nicer and natural.This difference also changes when you change film stocks.Colors don't look the same on 50 ASA film than on 320 ASA.
The only easy way to change this without needing some strange LUT working with RGB triplets is using just a LUT with H data in HSV colorspace)
E-Male
27th January 2005, 09:34
ok, but is there any method (gui) to make HSV-LUTs?
if yes, i'll look into making the plug-in
morsa
27th January 2005, 09:55
I don't understand very well your question, sorry.
If you are asking about any Paint program with support for HSV, the answer is Photoshop, Combustion, Gimp (I guess), I suppose After effects too...
PS: Anyway if you aren't convinced I guess some other people here could clarfy things a little bit, cause as always I can be wrong about everything ;)
E-Male
27th January 2005, 10:07
my point is that we need a (preferably free) program that allows creating HSV-curve-files, just like we can use gimp or photoshop for RGB now
or would you like to enter all values in into the LUT by hand? ;)
morsa
27th January 2005, 10:25
So I must assume Photoshop and/or Gimp don't support HSV (I would prefer HSL instead anyway)inside their curves editors? :confused:
E-Male
27th January 2005, 10:44
gimp doesn't seem to
don't know about photoshop, i don't have it at home
but from internet-research it doesn't have hsv curves either
but their is a plug-in for it, expensive i assume
i also wonder if a simple LUT like with RGB would be enough
many examples about HSV seem to be about changeing S or V based on H
Wilbert
27th January 2005, 11:12
Perhaps there will be a HSV in AviSynth v3 ;)
@E-Male,
also renamed the plug-in to GraMaMa (Gradient Mask Maker)
Nice stuff! Could you include the source please?
E-Male
27th January 2005, 11:35
HSV as a colorspace would be nice
for now but i wouldn't mind going RGB->HSV->do_something->HSV->RGB inside the plugin
but only if do_something is something usefull
i'll see if i can get the source into some readable condition and make it avaible for download right after
(gotta find that gpl text again...)
*.mp4 guy
27th January 2005, 11:59
Im going to try out the 4 combinations of the new GiCoCu on the pink cloud sample...so there will be a Looooonnnnnnnnnggg post coming up:D .
*.mp4 guy
27th January 2005, 12:33
ok here they all are
http://img177.exs.cx/img177/4959/frames3ha.jpg
http://img172.exs.cx/img172/189/trueorfalse2nn.jpg
and links to some lossless pngs
http://img182.exs.cx/my.php?loc=img182&image=thegimp7lz.png
http://img182.exs.cx/my.php?loc=img182&image=trueorfalse011pm.png
http://img182.exs.cx/my.php?loc=img182&image=trueorfalse026tq.png
http://img182.exs.cx/my.php?loc=img182&image=trueorfalse037om.png
http://img182.exs.cx/my.php?loc=img182&image=trueorfalse048vm.png
I apologise they aren't all from the same frame, although I could have sworn I took the pictures from frame 230.
Furthermore they are all a little bit different and all a littlebit off. However the color acuracy does seem to have improved a lot. Oh and...
Thanks to ImageShack for Free Image Hosting (http://www.imageshack.us)
E-Male
27th January 2005, 19:36
i'll analyse the pictures ASAP
this is giving me headdaches...
*.mp4 guy
27th January 2005, 21:35
From what my eyes are telling me(prolly complete nonsense) the first true fixes the blue curve and the second fixes the red curve, so all thats left is to fix the green curve. Anyway keep at it this is imo the most important filter to have for a convincing film look.
E-Male
27th January 2005, 22:35
Originally posted by Wilbert
...Nice stuff! Could you include the source please?
http://e-rels.dyndns.org/downloads/GraMaMa.dll
http://e-rels.dyndns.org/downloads/GraMaMa.cpp
hope it's readable (lacks comments, i'll fix that on request)
E-Male
27th January 2005, 22:37
Originally posted by *.mp4 guy
From what my eyes are telling me(prolly complete nonsense) the first true fixes the blue curve and the second fixes the red curve, so all thats left is to fix the green curve. Anyway keep at it this is imo the most important filter to have for a convincing film look.
the parameters have more general meanings
i'll run some tests with a series of curves when i have time (not this week)
morsa
31st January 2005, 23:46
if you want HSV colorspce code you can look into HSV Virtualdub filter.
Also you can look at this.He added HSV after my request.
http://neuron2.net/board/viewtopic.php?t=623
E-Male
1st February 2005, 13:37
i've started some tests
i still haven't figured out what is wrong
gicocu only differes from gimp on complicated curves
i'm working on finding out what exatly throws it off
i'll also look into hsv
if bugsbunny's vdub filter supports it we'd have a gui
so i'd use his format
BBugsBunny
1st February 2005, 23:59
@ E-Male:
I will use a nonstandard HSV space:
Standard:
S float from 0-1 (or int from 0-100%)
V float from 0-1 (or int from 0-100%)
H 0 from 360°
I will use 0 - 255 integer values for H,S,V so I can use it with my curves interface.
The conversion from RGB to HSV works fine already, the conversion back still is a bit buggy but I can already play around a bit with the curves.
As soon as I got it working I can PM you the conversion code.
CMYK and YUV colorspaces are already working in a test version I've put online.
E-Male
2nd February 2005, 01:20
i think it would be nice to have an option to eitehr save the curve in the colorspace it was created in or convert it to rgb (both LUTs should be equivalent)
EDIT: i now think i was wrong with this assumption!!!
i should be able to write an avisynth plug-in that reads the hsv curves in your format
i'd look into writing some hsv related avisynth stuff now
but still nobody has given me an explicit example of what we can do with it to achive film look
so i got no idea what to work on with it
morsa
2nd February 2005, 01:36
if I can get somepalce to send you a before and after example I can show you some results manipulating curves in HLS
MSN: fiebelk AT h o t m a i l Doty COM
E-Male
2nd February 2005, 03:23
i could give you ftp access to my pc when needed, no problem
but before-after-pics won't help
i need a method, something i can turn into code
morsa
2nd February 2005, 04:47
Ohh, so I didn't understand.
It was in reply to this: "but still nobody has given me an explicit example of what we can do with it to achive film look"
So I started preparing a quick and dirty horrible example of how you can use this method for a correct film look.
I think the method of curves and the code is available through BBugsBunny's filter.
Anyway I think an HSV curve should be possible to translate into RGB curves, though I don't really know how easy or difficult it could be...
E-Male
3rd February 2005, 00:45
i thought converting a HSV curve/LUT to a RGB LUT wouldn't be a problem
!!but know i think i was wrong!!!
E-Male
3rd February 2005, 00:52
the quick and dirty example would only help if i also got some info on how it is done
i got some easy ideas on what to do with with HSV, but nothing that looks really helpfull
morsa
3rd February 2005, 01:41
Well, I know for sure I have problems understanding you.Sorry.
I made a before and after image which has a macbeth chart in it to show you what you can do thru HSV curves.If that is usefull I don't know then.
E-Male
3rd February 2005, 02:12
the point is that i daubt i'll able to write a plug-in based on 2 images
but i'll have a look
EDIT: you got PM
morsa
3rd February 2005, 02:35
:confused:
E-Male
3rd February 2005, 06:13
i did some more testing with GiCoCU
and the problems seem to be worse than i thought
EDIT: i thin ki foudn the problem
i was using avisynth's spline code, which is cubic
but gimp doesn't use cubic splines, it uses Catmull Rom splines
i'll do some research and will update the plug-in ASAP
EDIT2: possibly more good news
i think i finally found the code i need ín the gimp source
i might be able to have the plug-in act 100% the same
BBugsBunny
4th February 2005, 00:37
HSV support is now working in my test version of the gradation curves VirtualDub filter.
Info can be found here:
http://neuron2.net/board/viewtopic.php?t=623
E-Male
4th February 2005, 05:27
@bbugsbunny:
good news, will try later
@all:
that gimp code is tricky
might take some time until i get it duplicated in avisynth
E-Male
4th February 2005, 19:02
new GiCoCu, based completely on the original gimp code
seems to completely reproduce gimps handling of the curve-files
http://e-rels.dyndns.org/downloads/GiCoCu.dll
example: GiCoCu("c:/curves/my_curve.cur")
notes:
-it's "/" not "\" (i'm gonna fix that)
-it's rgb24 only (rgb32 incl alpha to follow soon, more maybe later)
the good:
-seems to finally work correctly (looking like results by gimp itself)
the bad:
-not optimized in any way (yet)
!!WARNING: there is no error handling, yet!!
please test and report your results!
a little by-product from my testing:
http://e-rels.dyndns.org/downloads/GiCoCu.dll
produces a color pattern that might help you testing some plug-ins
needs rgb24 fed (i was to lazy to work myself into source-filters)
example: colors(colorbars().converttorgb24())
E-Male
7th February 2005, 09:59
well, nobody interested in this anymore?
Mug Funky
7th February 2005, 12:05
wha? of course we're interested!
thanks for the update. i'm between a few things at the moment, but i'll play with it a little.
E-Male
7th February 2005, 14:16
sorry, i write that in a bit of a bad mood
i just hoped that after i got back from my WE-trip that there would be some replies, after i spend quite some headdaches on this filter
i again am just to impatient...
Macanudo
7th February 2005, 17:45
I am still very interested as well. I have been busy with a project for my job and have had very little spare time to play and test your new versions.
Keep up the good work.
Macanudo
E-Male
7th February 2005, 19:29
GiCoCu.dll - a Gimp Color Curve File reader for Avisynth (http://e-rels.dyndns.org/downloads/GiCoCu.dll)
new version
GiCoCu(string filename, bool alpha, bool photoshop, bool hsv)
changes:
-catches some errors
-"\" accepted in filenames ("/" still work, too)
-rgb32 support (as well as rgb24)
-optional alpha channal support:
if alpha = true and colorspace is rgb32 the alpha-channel of the video is processed as well
default: false
-amp files support (format of photoshop and bugsbunny's vdub plug-in)
if photoshop = true the plug-in expects a photoshop amp-file instead of a gimp color curve file
default: false
-hsv support (thx to bugsbunny)
if hsv = true the curves are applyed in HSV color-space (DOES NOT WORK, YET)
default: false
CraigBjorn
8th February 2005, 00:29
It seems to crash on all my curve files. Any ideas?
E-Male
8th February 2005, 22:50
define crash!
post your script!
gimp or photoshop curve?
if gimp, post your curve!
@all:
photoshop curves aren't applyed right as it seems
CraigBjorn
9th February 2005, 01:52
It crashes on all of my gimp curves. Here's an example one
# GIMP Curves File
7 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 -1 255 243 255 -1 255
0 0 -1 49 -1 50 -1 48 65 39 -1 51 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 172 189 123 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 145 187 142 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
I'm using virtualdubmod , and as soon as I hit play virtualdubmod crashes.
E-Male
9th February 2005, 04:24
please post the script, i can't do anything without it
crash means vdub show an error or just dissappears?
it crashes when you hit play, not on (re)loading?
*.mp4 guy
9th February 2005, 13:21
Hey thanks for fixing GiCoCu! Anyway didn't say anything earlier because I kinda thought it was a lost cause anyway just wanted to say thx for all they effort. No more pink clouds for me:D. Also I'll see if GiCoCu crashes on my system aswell with that curve file.
Edit: Bad news that curve file crashes on my computer too. Also by crash I mean virtualdub apears then disapears, no error window or displayed video, crash takes place in less then a second.
Edit: Forgot to mention none of my 6 curve files crash.
Yet Another Edit: The Gimp identifies that there is an error in that curve file that curve file so its nothing wron with GiCoCu.
E-Male
9th February 2005, 14:42
"..The Gimp identifies that there is an error in that curve file.."
ok, i forgot to mention this:
i catch the following errors:
-curve file can't be opened
-there was an error processing the curve (using the error detection form the gimp code itself)
but instead of showing the error message "env->throwerror(..)" makes vdubmod just vanish
so if gimp can't load it, cicocu will make vdubmod dissappear
i personally don't see the problem with that curve atm
EDIT: the color-format error is shown correctly on my vdubmod
i'll look into improving the error-handling
EDIT2: i got no idea why throwerror doesn't work in this 2 cases
according to avisynthorg i can use it almost anywhere in the code
if nobody here got an idea, i'll ask in a new thread
tsp
9th February 2005, 18:14
EDIT2: i got no idea why throwerror doesn't work in this 2 cases
according to avisynthorg i can use it almost anywhere in the code
if nobody here got an idea, i'll ask in a new thread
I think throwerror only works in the constructor and not in the getframe function. Maybe you could try to just show a messagebox with the error and return the source frame.
E-Male
9th February 2005, 18:18
Originally posted by tsp
I think throwerror only works in the constructor and not in the getframe function.
seems to be like that
which would mean avisynth.org needs updating on this
Originally posted by tsp
Maybe you could try to just show a messagebox with the error and return the source frame.
i don't know how to do that in avisynth
but i'll think of something to do the error handling
EDIT: no luck
it seems that for now you'll have to live with a vanishing vdubmod as error-msg
tsp
9th February 2005, 19:48
it's easy to get a messagebox up. Just use:
MessageBox(NULL,
"ErrorMesssage",
"errorMessageTitle",
MB_OK
);
you can try MB_ICONINFORMATION or MB_ICONERROR instead of MB_OK or do a search in MSDN for MessageBox
Leak
10th February 2005, 09:41
Originally posted by E-Male
seems to be like that
which would mean avisynth.org needs updating on this
i don't know how to do that in avisynth
but i'll think of something to do the error handling
EDIT: no luck
it seems that for now you'll have to live with a vanishing vdubmod as error-msg
Why not load the GIMP file in the constructor, where throwerror should work? It's not as if it has to be reloaded each frame, right?
Otherwise, why don't you just use Subtitle to show the error message on the image?
E-Male
10th February 2005, 13:52
on what image? :D :D without the curve i got no output
but moving the file processing into the constructor might be a good idea
Leak
10th February 2005, 14:49
Originally posted by E-Male
on what image?
Ummm... the unprocessed source image? A blank image? A random image pulled out of the user's browser cache? ;)
np: Eight Frozen Modules - Dogsbark People Grow (Clicks & Cuts 4)
E-Male
10th February 2005, 15:49
i like the browser cache idea...... :devil: :devil: :devil:
E-Male
10th February 2005, 16:38
new version of GiCoCu (http://e-rels.dyndns.org/downloads/GiCoCU.dll) avaible
followed Leak's advise and moved the curve processing into teh constructor
should fix crashes and improve error handling
BBugsBunny
11th February 2005, 20:59
@ E-Male:
Wanted to send you a PM but your inbox seems to be full again.
E-Male
11th February 2005, 23:19
really?
well, i deleted older msgs
should work again
joshbm
17th February 2005, 03:38
Tried the following:
GiCoCU("J:\link2\s-curve.amp",photoshop=true)
Yielded different results, than the expected S-Curve.
Regards,
Joshbm
E-Male
17th February 2005, 03:56
i never used the variable=value method on parameters
can you try
GiCoCU("J:\link2\s-curve.amp",false,true,false)
or
GiCoCU("J:\link2\s-curve.amp",true,true,false)
and see if that works?
if not, could you post the result and how it should be, preferably using my "color"-filter as source?
thx
joshbm
18th February 2005, 04:35
The results can be found here (http://www.videocdpro.com/josh/gimp.htm).
PS- Sorry about the load time-- they are high quality PNG's.
Also if you would like I can post the .amp file.
[edit] It appears to work, although it is RGB + R/G/B, instead of RGB Only. Maybe you could create similar modes as the gradation filter?
Regards,
Josh
E-Male
18th February 2005, 06:24
AFAIK gimp and photoshop, both use VRGBA in their curve files (value, red, green, blue, alpha)
and also AFAIK the vdubfilter should produce correct amp files in any mode
i could add options to disable any of the 5 curves seperately, if that would help
i'll rework the filter (including workign hsv hopefully) when the next version of the vdub filter is ready
(besides gimp and photoshop, it is the tool i want my filter to work alike with. (b)bugsbunny and i exchange code now and then and help each other)
Backwoods
21st February 2005, 10:54
I've stumbled on this thread a little late but I was playing around with the methods listed on the original website (Photoshop method). For the most part it is a straight port of his method, except the green mask is toned down a bit and I merged the original base layer with the final result.
On the left is the "film" look and on the right is the original video. Xvid@Q5:
http://rapidshare.de/files/665159/Lizard_COMPARE_xvid.avi.html
Tomorrow I'll see how it looks on my TV and play around with the FPS. Also, I suck at Subtitle(), can anyone post a sample of a simple Subtitle line for showing text on the bottom right?
E-Male
21st February 2005, 20:57
nice effect, looks really good IMO
only thing i'd add would be addgrain with very mild settings
and please post your complete script/procedure
http://www.avisynth.org/Subtitle
maybe subtitle(text="abc", align=3)
Backwoods
21st February 2005, 21:19
First I captured footage from my HDR-FX1, saved a portion of my cousin's lizard eating in DGIndex, used this script to export BMPs from Virtual Dub: Mpeg2Source("00.d2v")
SeparateFields()
Lanczos4Resize(960,540)
Then applied the procedure listed @ http://www.dcs.gla.ac.uk/~jhw/filmy/ in Photoshop to each frame using the batch feature (I would post the action file, but not sure where it saves.)
Then this script was used to compare the two and lower the green a little bit in the "film" clip.
a=AVISource("Lizard_FILM.avi").crop(0,0,-480,0).RGBAdjust(1, .955, 1, 1, 0, 0, 0, 0).subtitle("FILM",-1,-1,0,900,"arial",30,$ffffff)
b=AVISource("Lizard_VIDEO.avi").crop(480,0,0,0).subtitle("VIDEO",-1,-1,0,900,"arial",30,$ffffff)
return StackHorizontal(a,b)
Now some of this was done after a night of drinking, so I'm sure I could have done some things differently and I'll hopefully figure that out today and tonight. Oh and another thing I'd like to figure out is ImageSource, another thing that escapes me. So I can import the series of BMPs instead of making a lossless AVI.
Originally posted by E-Male
http://www.avisynth.org/Subtitle
maybe subtitle(text="abc", align=3)
Yea I've read up on that and searched the forums, still not settling in for me. And that line gives an error. Sooner or later I'll get it(something simple like this escapes me sometimes). Thanks though.
E-Male
22nd February 2005, 03:00
ah, i see
didn't know photoshop does allow batch processing
my goal is to do everything in avisynth
since you understand that photoshop guide, would help me porting it by answering some questions?
Backwoods
22nd February 2005, 03:06
As best as I can, sure. I'm actually about to start trying the same method in AVISynth now.
EDIT: The procedure listed on that website can definitely be done in AVISynth...I think to the T. It might take me a bit to get it, have to learn all about Overlay() but I think it will work. And I'm sure it'll be MIGHTY slow. For now, I loaded up two AMP files with your plugin and they worked just like how they should.
E-Male
23rd February 2005, 04:23
i'll go through the guide step by step tomorrow (or when i have time)
i'll then post which steps will work in avisynth now and which will need new plug-ins
i'll also post which steps i don't undertsand
Backwoods
23rd February 2005, 04:49
Which features do you think AVISynth can't do? From what I can tell, all can be done. The only problem I see is when the image has to be converted to LAB color and effects applied to certain layers.
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\GiCoCU.dll")
Mpeg2Source("menu.d2v")
#base=Mpeg2Source("menu.d2v")
#FILM=Mpeg2Source("menu.d2v")
#Mpeg2Source("menu.d2v")
ConvertToRGB()
SeparateFields()
#FILM Layer
GiCoCU("C:\download\filmy.amp",photoshop=true)
#Sharpen & Gaussian Blur [Unsharp Mask on Luminance Layer + GB on A/B Channels]
#Contrast Layer 1 [Dup FILM layer - (70% blue, 10% green, 20% red) Opacity 20%]
#Highlight Layer [Dup FILM Layer - Gaussian Blur Radius 5 pixels Layer blend Screen, Opacity 52%]
#Detail Layer [Dup FILM layer - Highpass Radius 6 pixels Image/Adjust/Desaturate Layer blend Soft Light, opacity 30%]
#Color Cast [Fill with color cast choice; medium dark green or orange are good Layer blend Soft Light, Opacity 40%. Use lower opacity for less dramatic effect]
#Original Blend [Dup base (unmodified) layer. Layer blend normal, opacity 30%. Adjust this opacity to get a balance between contrast and smoothness.]
#Shadow Pull-up [Layer blend Lighten, Opacity 15% - Base Layer]
GiCoCU("C:\download\shadow.amp",photoshop=true)
#Highlight Pull-Down [Layer blend Lighten, Opacity 20% - Base Layer]
GiCoCU("C:\download\highlight.amp",photoshop=true)
#Contrast Layer 2 [Dup FILM Layer - Desaturate by 50% Layer blend Soft Light, Opacity 10%]
That is the script so far, just loading 2 AMP files and commenting on what else is needed. The use of Overlay and naming commands, then applying certain effects to them is still needed.
I've done an other test using PS and it came out pretty good I think, have to make a couple AVIs comparing again and output to TV. I'll post an Xvid of it tonight or tomorrow.
E-Male
23rd February 2005, 11:30
OK, here is mylist:
Original:
baselayer=dv.deinterlace...
not sure which deinterlacer, should be tested
also we have to convert to rgb
FILM Layer:
filmlayer=baselayer.gicocu....
i see no problem here
Sharpen and Grain:
filmlayer=filmlayer.limitedsharpen...
filmlayer=filmlayer.addgrain...
modified for avisynth, other filter can be used here aswell
also i skipped the chroma blurring for now
we need yuv colorspace here
Contrast Layer 1 :
contrastlayera=filmlayer.channelmixer...
AFAIK there is no channelmixer in avisynth
but it should be very easy to code
Highlight Layer:
highlightlayer=filmalyer.gaussianblur...
there is a gaussian blut plug-in
Detail Layer:
detaillayer=filmlayer.highpass...
detaillayer=detaillayer.tweak...
desaturatino can be done with tweak i suppose
for highpass filterign there is no plug-in i know off
but if seen it done in a script by subtracting a blurred image from the original
not sure if this is what we need here
Color Cast:
colorcast=blankclip....
not sure if this really needs an extra layer
EDIT:
rgblut should be able to do the same job
:EDIT
Original Blend:
no problem
Shadow Pull-up / Highlight Pull-Down
here we'd need LAB colorspace
EDIT:
i got some code in my test-app that looks good
i think i can implement processing of L-curves
:EDIT
Contrast Layer 2:
no problem
Illumination coloring layer:
don't knwo of a filter doing a "Gradient Map"
but i think i can code such a filter for yuv colorspace
Grain Layer:
no problem
addgrain should do the job in avisynth
For black and white [optional]:
no problem i think
then we just have to overlay everything properly
EDIT:
i found a site with algorithms for "lighten", "screen", ...
i think they'll be doable in rgblut
:EDIT
so, i'll wait for some comments now, before i start looking into coding the missing plug-ins
Backwoods
23rd February 2005, 21:00
Gaussian blur for AVISynth: http://forum.doom9.org/showthread.php?s=&threadid=88645
Unsharp Mask for AVISynth shouldn't be too hard for someone to code. I believe there is such a plugin for VDub.
Overlay can do lighten but I do not see screen, so screen would be needed.
LAB color I have no idea about.
The LAB color part was the only thing I saw as a problem, but like you mentioned: "then we just have to overlay everything properly." Scripting that would take me some trial and error but I'm confident in that.
By the looks of it, we have just about everything.
E-Male
23rd February 2005, 21:59
yep, that the gausian blur i meant
i think we don't have to use the same sharpener
lighten, but not softlighten
rgblut IMO is the best solution, fast and programabel
as long as the curve only manipulated tha L-channel the formulas aren't that hard, but i haven't testet it yet
3 plug-ins and some scripting to go, looks like we'll soon have a test version
Backwoods
24th February 2005, 09:31
Originally posted by E-Male
lighten, but not softlighten
rgblut IMO is the best solution, fast and programabel
I'll check out RGBlut tomorrow and work on the script also.
E-Male
24th February 2005, 09:43
i just noticed there is no rgblutxy
so i'll have to add the blending features to the plug-ins to do list
this might slow down things again
i daubt working on the script will be worth the effort as long as we don't have the plug-ins/functions for all teh steps
FredThompson
26th February 2005, 19:02
How about packaging GiCoCu with a readme and a page?
Dark-Cracker
26th February 2005, 20:25
you have an unsharp mask filter in the warpsharp.dll plugin if i right remember.
Backwoods
27th February 2005, 00:03
Originally posted by Dark-Cracker
you have an unsharp mask filter in the warpsharp.dll plugin if i right remember.
I tried that and the valves didn't seem to give the same effect as they did in Photoshop.
The script is coming along and I'm taking progress shots to compare to the same procedure in Photoshop. Hopefully by the middle of the week I'll have everything done that I can possibly do as of now.
E-Male
27th February 2005, 10:58
i know i'm lazy with readmes, i'll try to improve on that
why do we have to use the same sharpener as in photoshop
there are great sharpeners for avisynth, like limited sharpen
i think some modification of that script might be the best we can get
Backwoods
27th February 2005, 23:02
Sure some modification will have to be done, I was just going along with the original at first and we can always improve from there. Also I think using LimitedSharpen would make the script run slower. That is why I'd like to hold off on that for now.
E-Male
28th February 2005, 00:14
then warpsharp (one of them) should be the best for beginning
Backwoods
28th February 2005, 03:00
Original Video from HD cam
http://img227.exs.cx/img227/7879/lizardvideo3fg.th.jpg (http://img227.exs.cx/my.php?loc=img227&image=lizardvideo3fg.jpg)
Video processed frame by frame in Photoshop
http://img227.exs.cx/img227/2589/lizardfilmps9we.th.jpg (http://img227.exs.cx/my.php?loc=img227&image=lizardfilmps9we.jpg)
Video processed with AVISynth
http://img227.exs.cx/img227/6880/lizardfilmavs6ho.th.jpg (http://img227.exs.cx/my.php?loc=img227&image=lizardfilmavs6ho.jpg)
E-Male, I think we're there.
Script: LoadPlugin("C:\Program Files\AviSynth 2.5\yea\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\Decomb521.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\GiCoCU.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\TweakColor.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\FFT3DFilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\WarpSharp.dll")
#LoadPlugin("C:\Program Files\AviSynth 2.5\yea\.dll")
BaseLayer=AVISource("Menu_VIDEO2.avi")
ColorLayer=ImageSource("c:\download\color_cast.bmp")
#FILM Layer
FILM=BaseLayer.ConvertToRGB24().GiCoCU("C:\download\filmy.amp",photoshop=true)
#Sharpen & Gaussian Blur [Unsharp Mask on Luminance Layer + GB on A/B Channels]
SG=FILM.ConvertToYUY2().unsharpmask(300,2,0).FFT3dFilter(plane=1,bt=1,sharpen=-5).FFT3dFilter(plane=2,bt=1,sharpen=-5)
#Contrast Layer 1 [Dup FILM layer - (70% blue, 10% green, 20% red) Opacity 20%]
CONT=SG.Levels(5, 1, 255,0, 255)
#Highlight Layer [Dup FILM Layer - Gaussian Blur Radius 5 pixels Layer blend Screen, Opacity 52%]
HIGH=FILM.Blur(1)
#Detail Layer [Dup FILM layer - Highpass Radius 6 pixels Image/Adjust/Desaturate Layer blend Soft Light, opacity 30%]
DETAIL=FILM.ConvertToYUY2().TweakColor(sat=.5)
#Color Cast [Fill with color cast choice; medium dark green or orange are good Layer blend Soft Light, Opacity 40%. Use lower opacity for less dramatic effect]
COLORCAST=ColorLayer.BicubicResize(720,540)
#Original Blend [Dup base (unmodified) layer. Layer blend normal, opacity 30%. Adjust this opacity to get a balance between contrast and smoothness.]
OBLEND=BaseLayer
#Shadow Pull-up [Layer blend Lighten, Opacity 15% - Base Layer]
SHADOW=BaseLayer.ConvertToRGB24.GiCoCU("C:\download\shadow.amp",photoshop=true)
#Highlight Pull-Down [Layer blend Lighten, Opacity 20% - Base Layer]
HIGHPD=BaseLayer.ConvertToRGB24.GiCoCU("C:\download\highlight.amp",photoshop=true)
#Contrast Layer 2 [Dup FILM Layer - Desaturate by 50% Layer blend Soft Light, Opacity 10%]
CONT2=SG.ConvertToYUY2().TweakColor(sat=.5)
#Return ()
a=Overlay(SG, CONT, mode="Blend", opacity=.4)
b=Overlay(a,HIGH, mode="Add", opacity=0.52)
c=Overlay(b, DETAIL, mode="SoftLight", opacity=.3)
d=Overlay(c, COLORCAST, mode="SoftLight", opacity=.15)
e=Overlay(d, OBLEND, mode="Blend", opacity=.3)
f=Overlay(e, SHADOW, mode="Lighten", opacity=0.15)
g=Overlay(f, HIGHPD, mode="Lighten", opacity=0.2)
h=Overlay(g, CONT2, mode="SoftLight", opacity=0.1)
Overlay(h, BaseLayer, mode="Blend", opacity=0.7)
I'm sure there are a couple methods that can be changed, but this what I can do quickly and have so far.
I couldn't get AVISynth's Tweak to work for me, so I used TweakColor, I rather not use FFT3DFilter but that came to mind when I had to apply blur to UV only. Not sure if it's doing what it's intended, but maybe someone else can help out before the time it taks me to figure some other methods out. Also I'm not sure if the CONT layer is doing what I want it to. Probably not.
I'm pretty satisfied with the result.
E-Male
28th February 2005, 13:49
looks pretty nice already
on
"#Sharpen & Gaussian Blur [Unsharp Mask on Luminance Layer + GB on A/B Channels]
SG=FILM.ConvertToYUY2().unsharpmask(300,2,0).FFT3dFilter(plane=1,bt=1,sharpen=-5).FFT3dFilter(plane=2,bt=1,sharpen=-5)"
try
"SG=FILM.ConvertToYUY2()
SG=mergeluma(s.unsharpmask(300,2,0))
SG=SG.VariableBlur(2, 2, 2, 3, 3, true, false, true)"
see
http://www.avisynth.org/Merge
http://forum.doom9.org/showthread.php?s=&threadid=88645
"#Contrast Layer 1 [Dup FILM layer - (70% blue, 10% green, 20% red) Opacity 20%]"
won't work without a channel-mixer plug-in which i yet have to write
"#Highlight Layer [Dup FILM Layer - Gaussian Blur Radius 5 pixels Layer blend Screen, Opacity 52%]"
could also be done with VariableBlur, not sure if i'll be better
"#Detail Layer [Dup FILM layer - Highpass Radius 6 pixels Image/Adjust/Desaturate Layer blend Soft Light, opacity 30%]
DETAIL=FILM.ConvertToYUY2().TweakColor(sat=.5)"
doesn't have the highpass filter
i've seen it done with subtracting a blurred version
try something like
"DETAIL=FILM.ConvertToYUY2()
DETAIL=DETAIL.subtract(DETAIL.VariableBlur(6, 6, 3, 3, 3, false, false, false))
DETAIL=DETAIL.TweakColor(sat=.5)""
for
"#Color Cast [Fill with color cast choice; medium dark green or orange are good Layer blend Soft Light, Opacity 40%. Use lower opacity for less dramatic effect]"
see
http://www.avisynth.org/BlankClip
"#Shadow Pull-up [Layer blend Lighten, Opacity 15% - Base Layer]"
and
"#Highlight Pull-Down [Layer blend Lighten, Opacity 20% - Base Layer]"
can't be done that way, because the cuves are for lab colorspace, not rgb
i'll do a L-curve plug-in
"Illumination coloring layer"
is missing
can be done with blankclip and overlay i think
"Grain Layer"
is missing aswell
could be done without an additional layer
by using addgrain on the result IMO
does "overlay" really supports all needed modes and do they work/look like in photoshop??
can you really just overlay images with different colorspaces?
still to do for me are these plug-ins:
channel-mixer & L-curve (& new overlay ?)
posssible improvements / modifications on the procedure:
do artefact removal before the film-look procedure
add grain after it with addgrain
try different sharpeners
.....
E-Male
28th February 2005, 15:09
channel-mixer plug-in
http://e-rels.dyndns.org/downloads/chanmix.rar
chanmix(float r, float g, float b)
Wilbert
28th February 2005, 15:15
It should be forbidden to release stuff without documentation :) What does channel-mixer do?
E-Male
28th February 2005, 15:40
i thought it was obviouse from the previouse posts and the photoshop guide
it creates a greyscale image from a rgb24 source, the 3 paramaters specify how much of each color-channel is used
gray = (red*r + green*g + blue*b) / (r+g+b)
i hope this resembles the photoshop feature well
E-Male
28th February 2005, 16:04
i just noticed that the "Illumination coloring layer" can be done with blankclip and overlay
so i'll focus on the other 2 plug-ins
i think i can finish them today
Backwoods
28th February 2005, 23:52
Originally posted by E-Male
"Illumination coloring layer"
is missing
can be done with blankclip and overlay i think
Personally I didn't care for that so I left it out when I did the method in Photoshop, if you could figure it out in AVISynth, that'd be good for others.
"Grain Layer"
is missing aswell
could be done without an additional layer
by using addgrain on the result IMO
Another I left out because I felt it wasn't needed and enough grain was made from the sharpening.
does "overlay" really supports all needed modes and do they work/look like in photoshop??
can you really just overlay images with different colorspaces?
I believe so,
still to do for me are these plug-ins:
channel-mixer & L-curve (& new overlay ?)
I'll try your plugin tonight.
posssible improvements / modifications on the procedure:
do artefact removal before the film-look procedure
add grain after it with addgrain
try different sharpeners
.....
I was thinking of a deblocker too, grain again I'm iffy on but I will try it in the script, and I'm pretty happy with the sharpener now but again there is always room to play around.
Also the blankclip and color I'll do tonight also.
As is though, the script emulates what I did in PS just about to the T. Anything from here on is improving on the original method, IMO.
Backwoods
1st March 2005, 01:20
This crashes VDub when advancing one frame when replacing DETAIL, AVISynth didn't know what DETAIL meant on that line:
DETAIL=FILM.ConvertToYUY2()
DETAIL=DETAIL.subtract(DETAIL.VariableBlur(6, 6, 3, 3, 3, false, false, false))
DETAIL=DETAIL.TweakColor(sat=.5)""
And can you give an example line for your channer mixer?
E-Male
1st March 2005, 06:01
please tell me the exact error msg, especially which line/column (if it's mentioned)
#Contrast Layer 1 [Dup FILM layer - (70% blue, 10% green, 20% red) Opacity 20%]
CONT=SG.chanmix(20,10,70)
Guest
13th March 2005, 01:10
Is the link down atm?
Great stuff you are doing E-Male!!
Tin2tin:)
E-Male
13th March 2005, 22:11
my pc didn't stay online over the weekend while i was away
soon i'll have a router that'll fix this
file should be up agai
Backwoods
14th March 2005, 06:28
Sony HD cam - Left Original, Right Filtered
http://img226.exs.cx/img226/8646/0101zx.jpg
Sony HD cam - Left Original, Right Filtered
http://img226.exs.cx/img226/3410/0207sw.jpg
Sony DV cam - Left Filtered, Right Original
http://img226.exs.cx/img226/472/0307fu.jpg
Changes:
Invert for Highpass
No gaussian blur (wasn't happy with the end result)
No blurring of UV channels (didn't seem to matter in the end)
Blankclip() instead of loading BMPs
Added some color values at the bottom of the script for reference
AddGrain (in script for whoever wants to use it)
ToDo:
Use Tweak instead of Tweak color.
What command would be for Saturation? Something so simple escapes me, but I can recreate this Photoshop method easily.
#[V2F] Video2Film
LoadPlugin("DGDecode.dll")
LoadPlugin("Decomb521.dll")
LoadPlugin("GiCoCU.dll")
LoadPlugin("TweakColor.dll")
LoadPlugin("FFT3DFilter.dll")
LoadPlugin("WarpSharp.dll")
LoadPlugin("AddGrain.dll")
LoadPlugin("Chanmix.dll")
BaseLayer=AVISource("...")#.FieldDeinterlace(blend=false).Lanczos4Resize(720,360)
BaseLayer=MPEG2Source("...")#.FieldDeinterlace(blend=false).Lanczos4Resize(720,360)
#FILM Layer
FILM=BaseLayer.ConvertToRGB24().GiCoCU("film.amp",photoshop=true)
#Sharpen & Gaussian Blur [Unsharp Mask on Luminance Layer + GB on A/B Channels]
SG=FILM.ConvertToYUY2().unsharpmask(400,2,0)
#Contrast Layer 1 [Dup FILM layer - (70% blue, 10% green, 20% red) Opacity 20%]
CONT=SG.ConvertToRGB24().Chanmix(20, 10, 70)
#Highlight Layer [Dup FILM Layer - Gaussian Blur Radius 5 pixels Layer blend Screen, Opacity 52%]
HIGH=FILM.Blur(1.5)
#Detail Layer [Dup FILM layer - Highpass Radius 6 pixels Image/Adjust/Desaturate Layer blend Soft Light, opacity 30%]
DETAIL=FILM.Invert().ConvertToYUY2().TweakColor(sat=.25)
#Color Cast [Fill with color cast choice; medium dark green or orange are good Layer blend Soft Light, Opacity 40%. Use lower opacity for less dramatic effect]
COLORCAST=BlankClip(width=720,height=360,color=$C0C0C0)
#Original Blend [Dup base (unmodified) layer. Layer blend normal, opacity 30%. Adjust this opacity to get a balance between contrast and smoothness.]
OBLEND=BaseLayer
#Shadow Pull-up [Layer blend Lighten, Opacity 15% - Base Layer]
SHADOW=BaseLayer.ConvertToRGB24.GiCoCU("shadow.amp",photoshop=true)
#Highlight Pull-Down [Layer blend Lighten, Opacity 20% - Base Layer]
HIGHPD=BaseLayer.ConvertToRGB24.GiCoCU("highlight.amp",photoshop=true)
#Contrast Layer 2 [Dup FILM Layer - Desaturate by 50% Layer blend Soft Light, Opacity 10%]
CONT2=SG.ConvertToYUY2().TweakColor(sat=.5)
a=Overlay(SG, CONT, mode="Blend", opacity=.2)
b=Overlay(a,HIGH, mode="Add", opacity=0.52)
c=Overlay(b, DETAIL, mode="SoftLight", opacity=.3)
d=Overlay(c, COLORCAST, mode="SoftLight", opacity=.3)
e=Overlay(d, OBLEND, mode="Blend", opacity=.3)
f=Overlay(e, SHADOW, mode="Lighten", opacity=0.15)
g=Overlay(f, HIGHPD, mode="Lighten", opacity=0.2)
h=Overlay(g, CONT2, mode="SoftLight", opacity=0.1)
LAST=Overlay(h, BaseLayer, mode="Blend", opacity=0.8)
FINAL=LAST.AddBorders(0,60,0,60)
Return(FINAL)
#ConvertToYV12()
#AddGrain(18,0,0)
#ColorCast Color Values
#blue,medium = 4F4FBD
#blue,dark = 03036B
#blue,pure = 0000FF
#green,medium = 2E703F,22AC1C
#grey,light = C0C0C0
#grey,dark = 808080
#orange,light = F7D6730
#purple, medium = AC4FBD
#red,light = FF4646
#red, medium = A60505
#red, dark = 890101
tin3tin
5th April 2005, 08:39
DVX-100A Gamma Curves Chart for inspiration:
Kino-eye (http://www.kino-eye.com/archives/2005/01/dvx100a_gamma_c.html)
Have fun,
Tin3tin
onesoul
16th April 2005, 14:39
Awesome work that is been done here, definitely worthy of going to avisynth shared functions.
E-Male
16th April 2005, 21:21
but not before it's finished
Backwoods
16th April 2005, 23:20
Using Overlay really kills the speed of this process. If that was sped up or if a plugin that can do Overlay faster is made, that would be very productive. Now it doesn't seem to matter what you do to each layer, the resolution, or such...it still runs about the same speed.
Since my last post I did a couple changes to the script. I'm always using it and playing with it, so maybe so I'll post that update. I rather have a speed increase to show off. Maybe I should look into MaskTools...don't know as of now.
Mug Funky
17th April 2005, 08:46
yv12lutxy may be what you need. the syntax is a brain-killer though (reverse polish i think it's called). easy when you get the hang of it though.
E-Male
17th April 2005, 12:04
that syntax isn't that hard once you got the basics
IIRC there are 2-3 plug-ins missing
i'll do that when i got time
i'll also look into a correct overlay function, that includes all the photoshop modes we need
let's see how fast/slow i can make it
joshbm
17th April 2005, 19:01
Instead of using overlay use merge:
function merge(clip a,clip b,float "opacity"){
opacity=default(opacity,0.5)
return a.MergeLuma(b,opacity).MergeChroma(b,opacity)
}
It is also faster than it's yv12overlay counterpart:
function yv12overlay(clip a,clip b,float "opacity")
{
aExp="x "+string(opacity)+" * y 1 "+string(opacity)+" - * +"
return yv12lutxy(a,b,yexpr=aExp,uexpr=aExp,vexpr=aExp)
}
Take a look at this thread for actual tested results:
http://forum.doom9.org/showthread.php?s=&threadid=82127
Regards,
joshbm
E-Male
17th April 2005, 19:23
erm, we don't need a simple 50:50 mix
we need different algos
Backwoods
17th April 2005, 22:26
-I'll look into merge, yv12overlay, and yv12lutxy today.
-Gaussian Blur is working with a script
-Need to see if it's possible to apply a filter to UV and not the Y channel without using FFT3DFilter
-Overlay's functions mimic Photoshop's exactly. Just with different names. I did comparisons.
Other than that, I forget what else I changed. I'll do some speed tests and post samples tonight or tomorrow. Thanks for the suggestions.
Didée
17th April 2005, 22:47
> we need different algos
... and you can put together just anything through yv12lutxy.
Backwoods:
You're doing 11 (eleven) Overlay()'s in a row. I can imagine speed is no big fun with that script.
Using LUTs from MaskTools would increase the speed quite a bit. Plus, the overlay of "colorcast" would not be needed, as it could be packed into the preceeding "detail" overlay.
BTW, you're generating three clips from "baselayer", and do ConvertToRGB24()all three times. One time would be enough:
> baselayer24 = baselayer.ConvertToRGB24()
> FILM=BaseLayer24.GiCoCU("film.amp",photoshop=true)
> SHADOW=BaseLayer24.GiCoCU("shadow.amp",photoshop=true)
> HIGHPD=BaseLayer24.GiCoCU("highlight.amp",photoshop=true)
In similar manner, you could avoid one of those FILM.ConvertToYUY2() that are done two times.
Overall, there are pretty much colorspace conversions going on. Cutting them down as far as possible, and doing all the processing with LUTs, speed should get in acceptable range.
If only you all would come up with some processing description more specific than "PhotoShop Filter XYZ" ... ;)
edit: only thing that can *not* be done with yv12lut/xy is that weird "Hardlight" overlay of Photoshop (with transporting luma over/underflows to the chroma planes), since "inter-plane" operations are not available.
I never understood why PS uses that weird sort of Hardlight'ing. Why not use a clean algo that floors down at 0 resp. 255 ...
For me it's a strange dogma that something is "right", only because Photoshop is doing somthing just as it does ;)
Backwoods
18th April 2005, 01:56
http://www.uploadhouse.com/images/838867510000.JPG (http://www.uploadhouse.com/)
Plain = Original footage resized (1440x1080 to 720x480)
V2F_TEST = Merge replacing Overlay (no algos)
V2F = Latest rendition of V2F
AVS in VDub to Xvid. (just for testing and speed check)
Just using Merge doesn't cut it quality wise and I don't know if I can get yv12lutxy. That stuff is a bit beyond me. There is a speed increase using Merge though, from 2-4fps (on and off) to 4-6fps (with 4 being constant with the occasional 6). Replacing the Overlay lines that use "Blend" with Merge give off the same effect with a slight speed increase.
I touched up the ConvertXXX lines (I didn't even think of that) and just changing them didn't seem to add to any speed up. It is still much cleaner to do it the way you suggested Didée.
I'll do more testing on...Wednesday? Going away tomorrow and maybe the next day.
WorBry
2nd September 2005, 23:34
E-male, or somebody,
I cant seem to get GiCoCu to work. For my avi source I'm using a 50fps HufYuv "master" file that was encoded from my Pal DV Type II footage using the following script:
avisource("E:\DV Type II Clip.avi")
ConvertToYUY2(interlaced=true)
ColorYUV(off_y=-16,gain_y=16) #luma shift correction for Sony DV codec
Assumebff()
mvbob()
LanczosResize(720,544)
Convolution3D(1,4,5,3,4,2.8,0)
RemoveGrain(mode=2)
I would now like to apply some curvature with a little sharpening to acheive more of a "film effect". I've taken a few frameshots (jpg) using VDub and opened them in Gimp 2.2. I've then constructed a suitable S-curve and saved it first as a Gimp file and then as a txt file. As I understand it, I should then be able to import the file into my AVS script using GiCoCu.dll as folows:
avisource("E:\HufYuv master clip.avi")
ConvertToRGB32()
GiCoCu("C:\......\.gimp-2.2\curves\Gimp Curve.txt")
ConvertToYUY2()
LimitedSharpen(Smode=1, strength=100)
However, all I get is this weird yellowish mosaic image (see attached png image). Any idea how to resolve this?
Thanks
Wilbert
2nd September 2005, 23:53
I don't see an attachment. Could you attach it as jpg, and post the contents of the curve.txt.
WorBry
3rd September 2005, 05:46
Sorry about that - I thought the image had uploaded. Anyway, here it is again as a jpg at half-sized resolution.
The test Gimp curve I created is nothing special, just a slight S-curve created in the RGB channel:
# GIMP Curves File
0 0 -1 -1 -1 -1 -1 -1 64 54 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 192 200 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
I also observed the same effect with a more complex Gimp curve posted by Mug Funky earlier in this thread:
# GIMP Curves File
-1 0 16 0 37 17 -1 -1 -1 -1 -1 0 -1 0 -1 0 128 127 -1 -1 -1 193 -1 221 -1 210 207 219 -1 241 -1 -1 255 235
0 0 -1 -1 -1 43 41 42 -1 53 -1 -1 -1 -1 -1 57 -1 39 -1 0 -1 0 -1 0 -1 204 211 226 -1 231 -1 -1 255 255
0 0 -1 -1 -1 -1 47 52 -1 61 -1 -1 -1 -1 -1 125 121 125 -1 -1 -1 -1 -1 -1 -1 210 215 231 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 40 39 -1 0 -1 0 -1 0 -1 0 127 132 -1 147 -1 -1 -1 -1 -1 207 -1 221 222 235 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
So I really dont know what's going wrong.
E-Male
3rd September 2005, 13:35
please also post the original image
try a more simple script like
---------
avisource(..)
converttorgb24()
gicocu(..)
--------
also try a curve that changes nothing
also, what avisynth version do you use?
WorBry
3rd September 2005, 18:46
Thanks for replying E-Male,
please also post the original image
Original HufYuv frameshot attached below (half size res)
try a more simple script like
---------
avisource(..)
converttorgb24()
gicocu(..)
Same yellow mosaic image
also try a curve that changes nothing
Same result
also, what avisynth version do you use?
AVS 2.5.5
E-Male
3rd September 2005, 19:31
i'm waiting for the image to be aproved, but i must say i got no idea what's wrong
communist
6th September 2005, 14:52
Successfully used the posted script for several videos and I really like the results.
Thanks :)
WorBry
6th September 2005, 21:09
Yeah, its a shame I cant get GiCoCu to work. So instead I've turned to a method described in the below link that uses a AVS import of the Vdub Gradation Curves filter:
http://aqua-web.dyndns.org/avisynth_24p.php
Unfortunately, the filter cant read Gimp curves, but I've been busily compiling a collection of amp files created in Photoshop CS2 (while the trial lasts !) to suit different circumstances (low-light, backlit etc). The procedure for customizing the code string in the vd_gradation curves avsi script (as advised by the author of the above article) is as follows:
1. Open avi source in Vdub
2. Load and open VD Gradation Curves filter in VDub
3. Import custom amp file and select desired mode*
4. Save VD processing settings (File>Save Settings)
5. Open the vcf file in Notepad to reveal amp code string
6. Copy and paste string into vd_gradation curves.avsi and change mode as appropriate*
* Note:
Mode 0 = RGB only
Mode 1 = RGB + R/G/B
Mode 2 = RGB weighted
Mode 3 = RGB weighted + R/G/B
Mode 4 = no processing
Mode 5 = YUV
I was rather hoping that the "YUV" mode option (in beta version 1.21) would avoid the need to pre-convert to RGB32, but alas that is not the case. Also, the output is still RGB, which means further re-conversion to YUY2 or YV12 in order to use Limited Sharpen. Maybe further development of the filter will lead to a YUV compatible AVS plug-in that would avoid these color space conversions and so better preserve image quality. Gimp curve code support would be great too.
Still, the results are still pretty amazing
E-Male
7th September 2005, 07:27
the question is if yuv curves will work with for film look
i often heard people prefer hsv
i plan to go for gicocu v2 when avisynth 2.6 is out, but i don't know how many other things will have to be doen first
TheWolfer
22nd September 2005, 18:57
Great script all!
Stupid question I know. . . I assume it would be better to deinterlace prior to performing the "film look" than after -- due all the frame manipulation, but. . . Any advice or recommendations here.
As well, would anything be different in the script to accomodate NTSC material vs. PAL?
Thanks.
mg262
22nd September 2005, 19:09
i often heard people prefer hsvI am going to stick my neck out and say that hsv is a thoroughly b0rked colourspace. Charles Poynton discusses this in his Colour FAQ, but the basic reason is that the Value component has no relation to luma/luminance/perceptual brightness/anything like that (and of course the human eye is much more sensitive to luma than to chroma). A much better bet is polar yuv -- i.e. use the luma from yuv , and get your saturation and hue as the radius and angle of a point in the uv-colourspace.
Mug Funky
23rd September 2005, 03:05
perhaps GiCoCu would be a good opportunity to make a really useful plugin with a GUI? i'm not really hot on the idea of having to use a completely different program just to generate curves. should be fun :) (easy to say that when i'm not a coder)
Guest
23rd September 2005, 03:10
easy to say that when i'm not a coder Become one! It's so easy that even I can do it. I taught myself back when the 8085 was all the rage, and I was a Technical Writer/Editor for Bell Labs. :)
Mug Funky
23rd September 2005, 03:18
very tempting. i'm sure it'd be quite easy (and i'm always hassling devs to make little changes, so it'd feel good to do it all myself and offer it back), but i simply don't have time right now :( there's projects i've been putting off for months because of more pressing stuff at work.
but learning to code would be extremely useful. one day i'll do it...
Guest
23rd September 2005, 04:11
one day i'll do it... With your fertile brain, you'd be a great addition to the coding community. I'll wait for you. :)
mg262
23rd September 2005, 11:39
Mug Funky,
In the meantime, I think you should post a filter wish list. I've been meaning to say that ever since you described blend removal as "one of the holy grails of" anime restoration...
CruNcher
30th January 2006, 15:37
*bump*
Somebody an idea how this effect http://cruncher.mufflastig.com/projects/dv2film/ could be reproduced with avisynth ?
smok3
30th January 2006, 17:03
any other ideas on how to fake smaller DOFS? (automagically maybe?)
idea:
this seems to work for cameras that do uncontrolable amount of sharpening (oversharpened borders on hair and generally on objects):
upscale to 1000 x 1000
do some sharpening on some other freq than the one produces by camera
downscale back to 720 x 576
(pal 25p = input = ouput)
-----
question: would it be possible to do random frame based upscaling in avisynth? (this could hide the ccd grill a bit...)
like
f1= upscale frame 1 to 1830x1830
f2= upscale frame 2 to 1845x1845
fn = upscale frame n to XxY
final = scaledowntooriginal (f1 + f2 + fn) ?
question2: i dont see how an S curve could work, maybe C curve would be better? we are dealing with allready curved data (remember that ccd is basically a linear device)
question3: has anyone tryed selective sharpening on dv material? (like sharpen red more than green and blue?)
E-Male
30th January 2006, 19:29
*bump*
Somebody an idea how this effect http://cruncher.mufflastig.com/projects/dv2film/ could be reproduced with avisynth ?
try this:
http://e-rels.dyndns.org/downloads/test.lut
with GiCoCu in photoshop mode
CruNcher
31st January 2006, 03:09
CoronaSequence("F:\test\color correction\original%d.png", start=1, stop=1, fps=25, textmode=0, posx=0, posy=0)
ConvertToRGB24()
GiCoCU("test.lut",photoshop=true)
result
http://cruncher.mufflastig.com/projects/dv2film/prob.png
E-Male
31st January 2006, 08:04
guess my quick conversion didn't work
CruNcher
31st January 2006, 22:41
nope doesn't seem so ;)
Backwoods
1st February 2006, 00:05
Levels in PS:
48,0.83,255 RGB
0,0.86,255 R
Produces a similar result.
tin3tin
3rd March 2006, 11:00
If you'll get it up and running again, here's som inspiration for some great looks:
Magic Bullet film looks (http://redgiantsoftware2.com/Web/demoBground.swf)
WorBry
7th March 2006, 11:43
Just discovered that there is also a Curves option in the FFDShow Decoder 'Levels' settings, with provision for manual manipulation of the curve and loading of Photoshop acv files. Although it does not appear to permit separate manipulation of the chroma channels, it does at least provide the option for modification of luma only. Works for me.
matthiasb
14th March 2006, 13:16
I wanted to achieve Backwoods' V2F look. (http://forum.doom9.org/showpost.php?p=624524&postcount=230)
It's working except not having the right amps. (film.amp, shadow.amp, highlight.amp)
Where do i get those?
Thanks
Backwoods
14th March 2006, 21:33
Here you go:
www.flmpro.com/amps.zip
matthiasb
15th March 2006, 12:38
Thanks Backwoods
Dark-Cracker
6th May 2006, 17:18
hi,
the e-male siteweb seems down where could i download the needed plugin ? (chainmix, GigoGU, ...etc)
thanks.
++
Wilbert
6th May 2006, 20:41
I don't know about chainmix, but Gigocu can be obtained from WarpEnterprises' site.
E-Male
8th May 2006, 18:19
sorry, my site goes up and down with my PC, and in the last days is was off a view times
didn't know people still dl from it :)
Dark-Cracker
18th May 2006, 15:08
@e-male
any new version of this wonderfull script ?
keep up the good work :)
++
videoFred
18th May 2006, 16:00
First, the real film look is much much better then most people are thinking.
Grain, yes, but very subtle.
Dynamic range and colors can be even better then digital.
Sharpness is different, less hard.
Detail depends on the format. (8-16-35mm ect)
Can I suggest something?
You can buy old but very good Super-8 cams on Ebay.
Or even on the local flea market.
I never pay more then 50 Euro's for them.
Some of them where the absolute 1970-80 top models.
(very expensive toys in those days)
Film and film processing is still available.
Good transfering to digital is possible.
Many people are working this way.
Avisynth is a great help for processing the digital files.
Now, is this film look or not?
Nothing beats the real thing if you ask me :D
Fred.
Backwoods
19th May 2006, 00:52
And that totally defeats the purpose of this thread.
FredThompson
19th May 2006, 06:07
Maybe, but it will taste more like chicken if you start with chicken...
videoFred
19th May 2006, 08:27
And that totally defeats the purpose of this thread.
Haha! :)
But of cource I did not meant this.
I was trying to say real film look does not have to flicker, does not have that much scrathes etc...
Actualy, a decent filmtransfer does not flicker at all.
Scratches are caused by dirty projectors.
I have lots of old filmreels without any scratches.
But of cource I understand the original meaning of this thread. The vintage film look!
Fred.
smok3
19th May 2006, 08:45
the real problem is DOF (if you want to simulate more than 8mm at least) and that is not easily simulated in post.
Backwoods
19th May 2006, 21:34
Haha! :)
But of cource I did not meant this.
I was trying to say real film look does not have to flicker, does not have that much scrathes etc...
Actualy, a decent filmtransfer does not flicker at all.
Scratches are caused by dirty projectors.
I have lots of old filmreels without any scratches.
But of cource I understand the original meaning of this thread. The vintage film look!
Fred.
The point of the thread is to give video a puesdo-film look, not applying scratches or flicker.
FredThompson
20th May 2006, 01:01
You're starting to resemble your avatar... :P
He already agreed with you.
Backwoods
20th May 2006, 23:44
While he brings up flicker and scratches when that was never brought up. Couldn't let it go.
FredThompson
21st May 2006, 01:09
Those are typically discussed when people talk about "film look."
"Couldn't let it go."?!?! Zombies are slow-witted, not thin skinned... :P
Backwoods
21st May 2006, 01:57
Never said I was a zombie. After using AVISynth for hours I may resemble one though.
Well after 15 pages I figured someone would figure out what was going on in this thread. On the count of three, letting it go...1.2.3...YAY.
FredThompson
21st May 2006, 04:52
Ah, well, that's true. I was treating your avatar as your portrait. That can't be you, though, his jaw is moving sideways, not up and down. You'd starve if yours did that.
Backwoods
21st May 2006, 18:40
Mature.
On a note RELATED to the actual topic of the thread, I've got my A machine back up and have been fixing the script up. Since new plugins have been released, I've been trying to cut down on some steps to produce the same results.
FredThompson
22nd May 2006, 01:36
FWIW, Every time I see your avatar it reminds me of an old Mad magazine bit about how cockroach jaws move sideways so they can't possibly take over the world because they'd starve. :P
EasyStart
22nd May 2006, 04:27
Looks like I came in too late. Can some one kindly re-upload the plugin DLLs for [V2F] Video2Film's AVS scripts.
Thank you in advance.
EasyStart
23rd May 2006, 00:16
I've found some plugins for [V2F] Video2Film's AVS scripts. There's two that I can not find. They are GiCoCU.dll and Chanmix.dll. Please, kingly re-upload these two filters.
Thank you.
FredThompson
23rd May 2006, 05:30
GoCoCu.dll
I don't have ChainMix.
Backwoods
23rd May 2006, 07:16
www.flmpro.com/DLLreq.zip
Chanmix and GiCoCu
EasyStart
23rd May 2006, 07:55
Thanks all to Backwoods and FredThompson trying to help. I have downloaded DLLreq.zip. Will try [V2F] Video2Film's AVS scripts tonight.
actionman133
29th June 2006, 15:04
This one is for people who have been looking at the grading for MagicBullet (mentioned way earlier in the thread).
I've managed to recreate the 'warm/cool hue' available in MagicBullet's postprocessing section, where you can apply color casts. You have the same options, although to a different layout...
Function Tint (clip Last, int color, int "strength") {
strength = Default (strength, 128)
hue = BlankClip (last, color = color, pixel_type = "YV12")
mask = GreyScale ()
mask = mask.isYUV () ? mask.ColorYUV (levels = "tv->pc") : mask
mask = Overlay (mask, mask, mask = mask.Levels (127, 1, 128, 0, 255, false), \
mode = "exclusion").Levels (0, 1, 255, 0, strength, false)
Overlay (last, hue.ConvertToYUY2 (), mode = "chroma", mask = mask)
}
color is a hex number to form the base colour of the colour cast, created by BlankClip. Good values are $FF8000 for orange and $0080FF for a cyan-blue.
I've attached a screenshot from the movie Heat. It tests both reversing an existing grade, and adding a new one. Just note that I double saturation via Tweak, because the colour is quite faint in the frame. The first image shows the original grade (after saturation). The second is an attempt to remove the blue cast, and the third adds a new cast of orange.
Tweak (sat = 2)
o = Subtitle ("Original - blue tint")
a = Tint ($FF8000, 80).Subtitle ("Color Corrected - neutral tint")
b = Tint ($FF8000, 511).Subtitle ("Regraded - orange tint")
StackVertical (o, a, b)
Anybody like it?
Backwoods
30th June 2006, 03:36
Looks good. Time to experiment.
actionman133
30th June 2006, 04:57
Hey Backwoods, I've revised it a little. The mask was actually halving the overall strength of the tint. It should work *perfectly* now... that's a loosely applied term of course.
Function Tint (clip Last, int color, int "strength") {
strength = Default (strength, 64)
hue = BlankClip (last, color = color, pixel_type = "YV12")
mask = GreyScale ()
mask = mask.isYUV () ? mask.ColorYUV (levels = "tv->pc") : mask
mask = Overlay (mask.Levels (0, 1, 127, 0, 255, false), \
mask.Levels (128, 1, 255, 255, 0, false), \
mask = mask.Levels (127, 1, 128, 0, 255, false))\
.Levels (0, 1, 255, 0, strength, false)
Overlay (last, hue.ConvertToYUY2 (), mode = "chroma", mask = mask)
}
I've uploaded another test, although it's a bit bigger, so it's on my website. This is actually a more complete grade and I'm surprised how well these turned out, considering the limited colour palette in the original frame. Again, it's from Heat and changed a bleak, metallic blue to a saturated sunset orange. It shows each step with the appropriate function subtitled over it. What's great about this is that it never changes from the YV12 colourspace, so there's no conversion loss...
http://actionman133.isa-geek.net:8080/preview/grading.jpg
EDIT: Added linebreaks to the script
Wilbert
30th June 2006, 10:15
What's great about this is that it never changes from the YV12 colourspace, so there's no conversion loss...
Overlay converts internally to YUV 4:4:4 before any processing.
actionman133
1st July 2006, 05:21
I was originally concerned about this when I wrote my bloom filter, however (at least with YV12) their didn't appear to be loss.
To give a synopsis of Bloom: it overlays a blurred version of a clip over the original, using the 'lighten' mode and a greyscale mask of the blurred clip to reduce intensities in the shadows.
However, when I did a subtraction - Subtract (clip, clip.Bloom () - and narrowed with VirtualDub's levels, a lot of the frame came up blank.... no difference.
Could it be that Overlay expands the chroma via point resize, then uses ReduceBy2 () upon output? That could explain why Subtract shows no difference...
But even so, the slight differences of chroma error are less than using RGBAdjust (requiring two conversions).
Perhaps a way out would be to apply a full strength tint of 255 (which completely replaces the chroma with the tint colour), then use merge to get a midpoint. That would change the strength input to a float between 0 and 1. Would that avoid the upsampling and downsampling errors?
foxyshadis
1st July 2006, 05:53
With Subtract(x,y).levels(127,1,129,0,255) black and white are both changes, only neutral grey is no-change!
YUV upsampling errors aren't very important; if done too often it'll start to turn some of your chroma into sludge, but 8-bit roundoff will mostly give you back what you had anyway.
maskedmerge or mt_merge will work better (for yv12 only), in fact the whole thing could be reduced to a lut or two, but I'd rather not convert it until you think it's finished because it'll be nigh unreadable. :p A decent option on the side for yv12 processing.
Anyway, I think it's a really cool idea and a cool effect, I'd like to try it out in concert with HDRAGC. Something tells me this is a filter that will make me long for 16-bit yuv though.
actionman133
1st July 2006, 06:49
With Subtract(x,y).levels(127,1,129,0,255) black and white are both changes, only neutral grey is no-change!
The 'blank' I was referring to was the neutral grey.
Regarding your masktools solution, I always try to write my functions so that they don't require external plugins. It makes it easier to integrate with new scripts.
Would my idea to use Merge be suitable? Using a full tint wouldn't have chroma upsampling errors because the chroma is a flat colour that is manipulated at 4:4:4 by the mask, then downsampled to either 4:2:0 or 4:2:2. Then merging it with the original would reduce the intensity of the tint and restore some of the original colour.
That seems to be a plausible internal solution in theory... would it ultimately provide better quality than just using overlay?
actionman133
3rd July 2006, 22:41
How does this look as a filmizing script?
LoadPlugin ("F:\Core\AVISynth Plugins\GiCoCu.dll")
AVISource ("Desolation.avi").SwapUV () # UV channels swapped
Bob ().SelectEven () # Better bobber here of course
ConvertToRGB32 ()
GiCoCu ("F:\Core\Curve.txt")
ConvertBackToYUY2 ()
Merge (Greyscale (), last, 0.95) # desaturate 5%
Tint ($FF8000, 37) # warm the image slightly
BilinearResize (768, 576, 9, 0, 702, 576)
Note - the Tint line uses the same scripted function I posted just a few days ago, so if you want to test it, copy and paste that function in.
Here is the curve file:http://actionman133.isa-geek.net:8080/preview/curve.txt
And three before/after pics in JPEG format: http://actionman133.isa-geek.net:8080/preview/filmizing.jpg
I think the second pic in the preview came out great. What do you guys think about it?
smok3
4th July 2006, 08:10
actionman133, the curve does look pretty good althought i think you introduced some cliping, also the saturation should be lower in the final version imho.
(Color correction shouldnt be necesary if youd get the wb right at shooting time, unless you are going for some 'warm look' feel?)
actionman133
4th July 2006, 09:23
Well, having some filmmaking experience myself, I've always been taught (and believe in it too) that you should always white balance correctly and grade it warm or cool in post. It gives you the cleanest and purest signal to work with and you have more control with colour in the editing room than on location.
Film generally records reds slightly more than greens, which in turn record more than blue. It lends a warm orangey tint to the image a little when shooting on film, which video doesn't do (unless you trick the white balance). Of course you could choose to cool the image as well, which is a common choice (eg Minority Report), but the warming happens on 'conventional' celluloid.
I don't know how any clipping might occur as that wasn't part of the curve. It had only two points and they were were well within the 0-255 range, one at (64, 48) and another at (192, 216). If it is indeed clipping, then surely it must be a bug, as no curve that I've seen with those inputs ever approach clipping. And tint doesn't touch the luma channel at all, so it can't be that... any idea where the clipping might originate?
bananacreamandpeca
15th July 2006, 20:06
Hi,
I like to try some of the things posted in this thread.
But I am new to avisynth and its workings.
Can someone point me to a step-by-step that tells me how to make use
of those scripts?
I want to movie-look my dv-content (sony d8 cam) first,
Before I convert all my videocam material to xvid.
This, because editing my cam-material to look more movielike with de-jitter etc.
, ll hopefully bring down the bitrate during encodewith xvid
(I use autogk)
Right now, xvid just sky-highs the bitrate for my dv-content during encoding.
It lowers the resolution, degrades details and pumps up the bitrate.
While the source material looks shitty anyway.
And the end result in xvid will look even worse lacking detail.
Can someone give me directions or maybe some ready2go avisynth-scripts?
I can also post some 1 minute video material if you'd like.
actionman133
15th July 2006, 21:17
Well, these scripts we're coming up with aren't miracle workers. Rubbish in = Rubbish out is the commonly accepted term. They also aren't designed to improve compressibility, so chances are that XviD won't improve on file sizes.
Having said that, if you still want us to provide recommendations, we need to see samples, and we need to know what you want it to look like as well.
zambelli
12th September 2006, 01:04
This a good thread - let's not let it die out now. :)
I just recently got a PAL camera (Canon Elura 100, aka MVX-460i), even though I live in NTSC land, pretty much for the sole purpose of shooting stuff at 25i and then converting it to 24p.
Here are my first impressions:
Getting color to look filmlike is really, really difficult - perhaps the most difficult aspect of this. So if it's not absolutely necessary for your project, why bother with color? Just go black-and-white. It's much easier to achieve a convincing film look with grainy black-and-white. Think Darren Aronofsky's "Pi". That was shot on very grainy 16mm B&W reversal stock (Kodak 7278 and 7276 according to IMDb), yet, it looks like something that could easily be achieved artifically by shooting on digital.
Another huge DV giveaway are jaggies in deinterlaced diagonal lines. It's very indicative of DV's low resolution and the interlaced nature of the source. If you're getting jaggies after deinterlacing, either find a better deinterlacer or smooth out the picture until you get rid of them.
Artifical grain is a great way to hide DV's imperfections and simulate film stock grain. TrBarry's AddGrain plugin works great for this. Add it last after everything else is done.
Use the image stabilizing feature in your camera whenever you're shooting handheld. I know many people disable this feature to get extra resolution, but I really don't think the extra resolution is worth the trouble of trying to stabilize the image in post-processing. DeShaker is a great tool and I love it, but it can't perform miracles. One of the biggest problems with having shaky interlaced footage is that the shakes exist as movements between fields. So stabilizing such footage in post requires bobbing the video to 50fps, deshaking it, re-interlacing it to 25i, and finally deinterlacing it to 25p. The result, though stable, is rarely sharp. So do yourself a favor and let the camera do the stabilizing so you don't have to. :)
I'm working on some PAL DV videos right now that I'll try to post when I'm done with them, along with the Avisynth scripts.
Pookie
12th September 2006, 02:56
Depth of Field always gives it away. There are some interesting lens attachments, like the rotating quartz Brevis35 that look pretty authentic, but that obviously isn't an Avisynth function. Some clips:
http://www.cinevate.com/index.php?page=demo
anton_foy
12th September 2006, 12:41
As a real fan of filmlook I have been up all nights the past year making my own "look"-presets in various programs and the best way for me is to grab a still from two or three of your favourite films/looks that has been shot in similar conditions as your footage and trying to imitate that.
My upcoming film is a horror movie wich take place in London in the 1890s, filmed in HDV (Sony HC1e) 1440x1080 anamorphic 25i, I later deinterlace and upconvert (1920x1080 25p) in Avisynth...my favourite program btw.
Here are some still downconverted because of filesize problems on the server:
http://www.xtreem.nu/jonas/HDV-butler.jpg
http://www.xtreem.nu/jonas/HDV-night.jpg
http://www.xtreem.nu/jonas/HDV-face.jpg
http://www.xtreem.nu/jonas/HDV-table.jpg
http://www.xtreem.nu/jonas/HDV-drkroom.jpg
http://www.xtreem.nu/jonas/S-V_con.jpg
http://www.xtreem.nu/jonas/SV_nature1.jpg
The two last ones I fiddle a bit to make it look like silent film from the 20s. Gaussian blur was used thats why they are a bit blurry/smooth.
Edit: I have built two DOF adaptors for my camera and I plan to make a third. The present adaptor is a spinning cd construction wich is used on the butler pic and S-V_con.jpg.
smok3
12th September 2006, 12:51
anton_foy, cool, what commercial dof adaptor would you pick if you would have to? (movietube, redrock, ....?)
anton_foy
12th September 2006, 12:55
Hi there Smok3!
Personally I like the G35 because it looks so portable and it is static which prevents artifacts. Spinning constructions like mine and Redrock gives mpeg compressed material some bad artifacts on the vertical plane. BTW. redrock doesn't even give you the full area of 35mm, mine does ;)
smok3
12th September 2006, 13:12
this one http://cinemek.com/ ? (movietube is static as well)
anton_foy
12th September 2006, 13:14
Yeah thats the one.
Movietube cant stand heat I think and after a while the groundglass get distorted. The example footage I've seen isnt very good IMHO.
smok3
12th September 2006, 13:19
ic, but uhmm, g35 doesnt seem to be buyable?
anton_foy
12th September 2006, 13:25
The G35 is byable I think if you contact them by e-mail. Though I suggest you check out if they have any samples in HiDef before you buy.
Completed a Saving Private Ryan Bleach bypass-filter last week. I can add some screenshots if someone is interested to see the results :)
DSP8000
12th September 2006, 15:23
Completed a Saving Private Ryan Bleach bypass-filter last week. I can add some screenshots if someone is interested to see the results
Please do :)
DSP8000
scharfis_brain
12th September 2006, 16:10
Use the image stabilizing feature in your camera whenever you're shooting handheld. I know many people disable this feature to get extra resolution, but I really don't think the extra resolution is worth the trouble of trying to stabilize the image in post-processing. DeShaker is a great tool and I love it, but it can't perform miracles. One of the biggest problems with having shaky interlaced footage is that the shakes exist as movements between fields. So stabilizing such footage in post requires bobbing the video to 50fps, deshaking it, re-interlacing it to 25i, and finally deinterlacing it to 25p. The result, though stable, is rarely sharp. So do yourself a favor and let the camera do the stabilizing so you don't have to.
This is wrong.
Digtal deshakers of cameras are much worse than deshaker, cause they produce a kind of jumpy movement, if you reach their correction limits.
also deinterlacing 50p -> deshaking -> reinterlacing 25i -> deinterlacing 25p is nonsense.
just go for:
HQdeinterlacing 50p -> deshaking -> remove every 2nd frame.
and you are done.
Anyways, optical image are preferrable, cause they won't introduce shaking motionblur.
anton_foy
12th September 2006, 21:37
Here are a few bleachbypass-filtered pictures in different strength of bleach.
http://www.xtreem.nu/jonas/transylvania.jpg
http://www.xtreem.nu/jonas/Butt-ler.jpg
http://www.xtreem.nu/jonas/SC.jpg
http://www.xtreem.nu/jonas/MOTCAM.jpg
enjoy!
Backwoods
12th September 2006, 22:00
:script:
anton_foy
12th September 2006, 22:07
:) @Backwoods: You like them? Im sorry but this filter is made in either Photoshop and or After Effects, the only thing I do for the footage in Avisynth is deinterlace, deblock, denoise, and that stuff. I use levels, color balance, curves, grain to make this look and can be achieved quite easily.
The filtering isnt fully optimized for different kinds of lightning conditions yet.
edit: and the filter is based on the look of the Sony hdr-hc1e model so if its used on a different source the image get a very different look but I will check into that ;)
Backwoods
13th September 2006, 00:06
Levels, color balance, Photoshop curves (saved from PS and loaded with a plugin) and grain can all be done in AVISynth.
On one of your images give a basic rundown of the settings used and we can do it in AVISynth.
zambelli
13th September 2006, 00:11
This is wrong.
Digtal deshakers of cameras are much worse than deshaker, cause they produce a kind of jumpy movement, if you reach their correction limits.
The problem with shaky footage is the motion blur between fields/frames due to slight rapid movement. Even when deshaked properly, you will still end up with a video that constantly goes out of focus, seemingly for no reason.
I think that built-in camera stabilizers are suitable for most scenarios. Deshaker can be additionally used for really difficult footage, but shooting everything handheld w/o stabilization and Deshaking in post is going to be really time-consuming. It can take 6-8 hours just to deshake 10 minutes of footage.
also deinterlacing 50p -> deshaking -> reinterlacing 25i -> deinterlacing 25p is nonsense.
just go for:
HQdeinterlacing 50p -> deshaking -> remove every 2nd frame.
and you are done.
Do you have empirical proof to back up this claim? Why do you think removing every 2nd frame wouldn't cause the footage to be overly jumpy?
Anyways, optical image are preferrable, cause they won't introduce shaking motionblur.
Optical image what? Stabilization? Like SteadyCam? Yes.
Mug Funky
13th September 2006, 04:35
a cheap deshaking:
make the camera heavier. if motion is considered to be a noise-like wave, making the camera heavier will be like a lowpass filter :)
of course it'll make you tired of shooting quicker...
scharfis_brain
13th September 2006, 09:28
The problem with shaky footage is the motion blur between fields/frames due to slight rapid movement. Even when deshaked properly, you will still end up with a video that constantly goes out of focus, seemingly for no reason.This will happen with electronic image stabilizers builtin in Camcorders, too.
I think that built-in camera stabilizers are suitable for most scenarios.
It can help for big zoom factors, to be able to track an object at all. But I don't like the look of these inbuilt electronic image stabilisators.
Deshaker can be additionally used for really difficult footage, but shooting everything handheld w/o stabilization and Deshaking in post is going to be really time-consuming. It can take 6-8 hours just to deshake 10 minutes of footage.
Who cares. Making the filmlook is time consuming, too.
Do you have empirical proof to back up this claim? Why do you think removing every 2nd frame wouldn't cause the footage to be overly jumpy?
It seem like you didn't understand reinterlacing and deinterlacing properly.
three examples:
1) DeInterlacing 50p -> Deshaking -> ReInterlacing 25i -> DeInterlacing 25p
2) DeInterlacing 50p -> Deshaking -> ReInterlacing 25i -> DeInterlacing 50p -> remove every 2nd frame
3) DeInterlacing 50p -> Deshaking -> remove every 2nd frame.
examples 1 & 2 are bit indentical. But exanple 3 has much better image detail, cause you aren't deinterlacing twice.
Fluidity of motion is exactly the same in all thress examples.
Optical image what? Stabilization? Like SteadyCam? Yes.
Optical Image Stabilization is not steadycam.
OIS uses different tecniques to compensate hand movement within the optics.
commonly used tecniques are lens shift or sensor shift.
A gyro sensor notices all your hand movement and forces the movable part in the optices (lens or sensor) to compensate your hand movement. This results in steadycam like look, cause therre isn't any false motionblur due to (de)shaking.
anton_foy
13th September 2006, 16:21
I have noticed that if shutter is on 1/50 on the camcorder (PAL that is) the motion blur doesnt look the same as if it would be shot on film. Dont know if this is correct but it looks to me as if film motion blur has got a thicker blur somehow while digital feels more transparent. Maybe Im wrong about this, the eye can often get tricked by knowing its digital from the beginning.
zambelli
14th September 2006, 01:14
It seem like you didn't understand reinterlacing and deinterlacing properly.
three examples:
1) DeInterlacing 50p -> Deshaking -> ReInterlacing 25i -> DeInterlacing 25p
2) DeInterlacing 50p -> Deshaking -> ReInterlacing 25i -> DeInterlacing 50p -> remove every 2nd frame
3) DeInterlacing 50p -> Deshaking -> remove every 2nd frame.
examples 1 & 2 are bit indentical. But exanple 3 has much better image detail, cause you aren't deinterlacing twice.
Fluidity of motion is exactly the same in all thress examples.
I disagree. Deinterlacing 25i to 50p is bobbing. You can do it dumb (Avisynth Bob, EEDIBob), you can do it smart (TDeint, LeakKernel, MVbob). In both cases, the full frame is reconstructed from ALL of the lines in the current field. In the former case, missing lines are interpolated only from the current field. In the latter case, missing lines are interpolated from adjacent fields too.
On the other hand, when you're deinterlacing 25i to 25p, lines from both fields are used to construct a full frame and which pixels get used depends on the quality of the deinterlacer and the nature of the video sequence.
I don't think 1) and 2) are bit identical because 25i->50p and 25i->25p function in a completely different manner.
I agree the deinterlacing twice (regardless of the method) is not good for quality. However, I don't think throwing away every other frame from a 50p video is going to give you superior quality either.
Sounds like it's time for some Avisynth scripts and demos? :rolleyes:
actionman133
14th September 2006, 01:31
zambelli, I believe he was trying to say the examples 1 & 2 will produce the same output. Deinterlacing (25i -> 25p) is basically the same as bobbing (25i -> 50p) then dropping every second frame (50p -> 25p).
@anton_foy
Film and video do record slightly differently. Film actually records several film frames. It opens and closes the shutter three times for each frame, basically recording three similar (but slightly disconnected) images into one frame. Video is continuous, recording one long blur.
PS, for an example of seeing the individual images that can be recorded in film, scan frame by frame through a scene shot on film with a strobe light (or simulated lightning). Lethal Weapon IV is very good with that and the final fight in Matrix Revolutions might also be interesting.
I think the only way video could truly simulate that would be to shoot with a 1/144 shutter (1/120 for most cameras), then use MVConv () to interpolate in between frames and merge them together... I might look into this actually...
anton_foy
14th September 2006, 02:30
@actionman133
What!? I own a Bolex 16mm camera (which I have rebuilt to Super 16) and the mechanism is a simple shutter system that opens only once to let the negative catch light. The shutter however can be set minus three steps for shorter exposure which would be about 1/700 at the lowest step. But I have never heard of a camera that will catch three frames in one.
@Zambelli & Scharfis
I think I understand Scharfis examples, what I dont get is what one would win by reinterlace an already deinteraced clip?
And However, I don't think throwing away every other frame from a 50p video is going to give you superior quality either. as I understand it the deinterlacer just deinterlaces every field (2 fields per interlaced frame) and if you only want 25 fps every second frame (that is deinterlaced by now) is discarded. Perhaps I get this wrong?
actionman133
14th September 2006, 02:42
I *may* actually have my facts mixed up. I do *know* that projectors close the shutter 72 times a second when displaying a film (3 shuts per frame... helps to avoid flickering), but I thought I also read that the camera shutter does a similar thing.
Take a look at the attached picture... you can clearly see three defined images of Jet Li's hand and sleeve. None of those images has motion blur, it looks like three non-blurry stills were blended together. Unless the lightning flickered on and off three times while the frame was exposed, I can't think of how this may happen. But in all the frames where I can see it, I can usually see three distinct frames. Could this explain that look?
Mug Funky
14th September 2006, 04:33
@ actionman133:
electric lights in the USA go at 60Hz...
you'll get 2.5 flashes per frame (looks pretty much like 3), in the same way 24fps to 60hz gives you a 3:2:3:2 pattern.
notice that the same strobe effects in european originated films will be 2 flickers instead of 3 per frame.
scharfis_brain
14th September 2006, 04:35
@zambelli:
deinterlacers vs bobbers
kerneldeint(oder=1) is a deinterlacer,
the current field (the even one) is leaved untouched, the missing information is getting weaved or interpolated.
kernelbob(order=1) is a bobber,
even and odd fields are passed untouched to the output while interpolating or weaving missing information.
interleave(kerneldeint(order = 1), doubleweave().selectodd().kerneldeint(order = 0)) is the same like kernelbob(order=1)
so I conclude
kernelbob(order=1).selecteven() is bit identical to kerneldeint(order=1)
also, a proper deinterlacer NEVER should mess up with the current field, as you are describing it.
and even is this would be the case my claim is still right, cause
bobbing is nearly always* chaining two deinterlacers:
interleave(deinterlacer(), doubleweave().selectodd().deinterlacer())
you may try that with any deinterlacer out there. you won't find a difference!
*some bobbers aren't dividable into a deinterlacer due to their architecture, but that doesn't mean, that a following selecteven will harm quality.
zambelli
14th September 2006, 23:00
@zambelli:
deinterlacers vs bobbers
Sir, I stand corrected. I should've known better than to argue with a person who's written more deinterlacer scripts than I've had hot meals. ;)
interleave(kerneldeint(order = 1), doubleweave().selectodd().kerneldeint(order = 0)) is the same like kernelbob(order=1)
Ah! I was not aware of the fact that bobbers only interpolate missing lines from the other field in the frame. I had always assumed that advanced bobbers used the previous field as well. So if frames 0 and 1 had fields 0a, 0b, 1a and 1b, I thought 1a would be bobbed to 1A (full height) by using all lines from 1a, and then interpolating the rest from 0b and 1b - if both fields are proven to be similar enough to have been recorded a moment before and after field 1a.
I suppose we do in fact learn something new every day. ;)
also, a proper deinterlacer NEVER should mess up with the current field, as you are describing it.
I didn't mean to imply that. I understand that one field always needs to be fully preserved in order to preserve the parity and thus fluidity of motion.
you may try that with any deinterlacer out there. you won't find a difference!
I did indeed. This proved your theory:
AVISource("720x480_29.97i_900f.avi")
AssumeTFF()
v1 = TDeint(mode=0, order=1).Subtitle("v1")
v2 = TDeint(mode=1, order=1).SelectEven().Subtitle("v2")
Interleave(v1, v2)
Both v1 and v2 were identical.
OK, I stand corrected. Reinterlacing after deshaking bobbed video is unnecessary (unless, of course, one is looking to deliver interlaced video, I suppose).
zambelli
14th September 2006, 23:04
I *may* actually have my facts mixed up. I do *know* that projectors close the shutter 72 times a second when displaying a film (3 shuts per frame... helps to avoid flickering), but I thought I also read that the camera shutter does a similar thing.
Anton is right. Only projectors use shutter blades, cameras don't. Shutter blades are used in projectors to improve the stability of the image. An image projected at 24Hz would look very choppy. With shutter blades, the image is "refreshed" on the screen 2-3 times (48Hz or 72Hz) at the expense of reduced light output, but with much improved stability and decreased eye strain.
Take a look at the attached picture... you can clearly see three defined images of Jet Li's hand and sleeve. None of those images has motion blur, it looks like three non-blurry stills were blended together.
Easy. It was shot at 72fps, and then every 3 frames were blended together into a single frame.
anton_foy
14th September 2006, 23:49
I cant see actionmans picture of Jet Li, would be interesting to examine it. :)
edit: now It shows! I would guess that light is simulated lightningflash (thunder) using an electric lightsource like Mug said.
scharfis_brain
15th September 2006, 08:34
Zambelli, one last correction regarding deinterlacers:
any deinterlacer/bobber can use as much previous/future fields it like. Whether this is godd or not I don't want to judge now.
Anton is right. Only projectors use shutter blades, cameras don't. Shutter blades are used in projectors to improve the stability of the image. An image projected at 24Hz would look very choppy. With shutter blades, the image is "refreshed" on the screen 2-3 times (48Hz or 72Hz) at the expense of reduced light output, but with much improved stability and decreased eye strain.
A cinamatic Film displayed with only one small shutter blade (for the time interval of the film transport) will look smooth and not choppy, but it will flicker awully cause you'll get a 24 Hz flicker with maybe 1:10 dark to bright ratio.
with two or three shutter blades you get 48 or 72 Hz, as you described :)
Easy. It was shot at 72fps, and then every 3 frames were blended together into a single frame.
Unlikely. I think it is the artificial lighting of the set.
In some movies they use standard 60Hz or 50Hz current to light up a set. In the case of 60Hz power you get a 120Hz pulsing light. This causes a patterned strobe effect in the film:
even frames: three strobes
odd frames : two strobes
(or vice versa)
Of course, it could be a special effect, too.
DSP8000
15th September 2006, 15:23
Hi guys,
is it somehow possible to do pre/post contrast, gamma in one avisynth script?
Or, maybe lens filter based on color/gradient?
If it is, can someone post a sample?
I'm trying to figure it out how MagicBullet works internally.
anton_foy, I had a look at your pictures, nice:)
here's my before and after:
source: KodakEasyShare CX7300 3.2 mega pixels, 37mm KODAK Lens, 15FPS, 320,240.
Clip recorded by my daughter :).
source converted to 25FPS, 720,576.
before (http://members.iinet.com.au/~isdmultimedia/files/before.png)
after (http://members.iinet.com.au/~isdmultimedia/files/after.png)
anton_foy
15th September 2006, 17:45
@DSP8000
Hello! Thats a cute baby. :)
Have you used Magic Bullet on this pic?
Magic Bullet I think is absolute crap and can't be used properly to make digital look like film. Although MB can be good to use on already scanned film to get a certain stock look but if you want a good film look the only way to get it really authentic is to do it yourself actually. I have tried almost every known film look program/plugin there is and all of them still gives a very digital look.
I made a new look yesterday in the look of 400 kodak stock I think :p
Not the best picture to begin with but I wanted to show the colour change and this had a quite nice motive to :rolleyes:
http://www.xtreem.nu/jonas/House_copy.png
top=after
below=before
BTW. what do you mean by prepost contrast? The source is better of having a low contrast (hope I didnt put that wronlgy) by that I mean it should look like you drag the contrast to the min. Then you wont have problems with clipping after the filmfilter is applied. The are some optical filters for this but I can't remember what its called right now...try looking up low contrast filter. :) cheers!
actionman133
15th September 2006, 19:56
I've come up with a general list of filters to apply that seems to look really good in Paint Shop Pro. First, I apply a diffusion/bloom/glow filter (if I want to soften the image a little). Then I apply a curves function for more contrast, desaturate 10-15%, and apply a 10-15% colour cast (for film warmth, RGB - 255, 64, 0).
I really like the look of the result of the photos I've tested. I'll post a before and after when I get a chance (too busy, atm).
By the way, I've used Magic Bullet and I think it's great. One thing it can do that I love is the ability to use two casts. The tint works like the colour cast I use above, but it can then additionally warm or cool. It gives the colour pallette a slight complexity and I like it. It also just simplifies the process for you as well (I don't understand how they can call it a filmizer without a curves function, though). I get past that by using AfterEffects' internal curves filter before applying the Magic Bullet.
anton_foy
15th September 2006, 21:59
I don't know how it is possible but I can't see your pics actionman :p
When you use MB for the purpose of colour grading I can agree with you but it needs other adjustments before to make the look of real film stock. I guess many here are used to look at unprocessed films even in HD. There is a great difference between scanned and unprocessed film from negative to the encoded versions (often).
Many films are denoised and broadcast (colour/contrast) adjusted to make it compatible for Television and when comparing a screenshot from a DVD to the original scan can look very different.
I use the glow func in almost all of my scenes because the built-in sharpening in my camera can't be turned off entirely. Glow removes the edge or contour of for example a lit candle.
Would it be possible to tint the glow towards the faded areas of it? I mean where the blur takes of into fully transparent.
actionman133
16th September 2006, 06:56
@anton_foy,
I believe the pictures need to be approved by a moderator before they can be viewed by everyone, so perhaps you're just getting in too quickly. I can see them in my own post, so have a look now.
I use the glow func in almost all of my scenes because the built-in sharpening in my camera can't be turned off entirely. Glow removes the edge or contour of for example a lit candle.
Would it be possible to tint the glow towards the faded areas of it? I mean where the blur takes of into fully transparent.
I don't know what you mean by this? Sounds like a regular diffusion algorithm to me... layering a blurry version of an image over itself, using the blurred frame as a mask. I used this method on the pic in my previous post... is that what you're talking about?
anton_foy
16th September 2006, 13:39
@actionman
Actually what I meant was that I only use the glow in areas where the light is clipping. Such as the flame on a lit candle, a lightbulb, the sun light peeking between leaves of a tree for example. Anywhere the light is too strong so that it will create an outline (because of the built-in sharpening), thats why I use the glow effect to make the outline covered by the glow. I like your glow in the last picture but it wont make it look more like film. More like a dream feeling or a better quality "Sunset Beach" -look. Filmstock has a greater resolution and uses no extra sharpening as many digital formats. Thats why I use the glow only at the very bright areas of the picture. Because they are the only spots that will get this outline or halo side effect. In my earlier post my question was if it is possible to tint the glow slightly. But I dont want the glow to be tinted towards the middle where the white should be, only towards the outer areas. See pic.
Glow (http://www.xtreem.nu/jonas/Glow_tint.jpg)
the tint I made by putting in RGBadjust in the Glow script but gives tint all over the light. Without tint it gives a grey and artificial glow. Zoom in to see more clearly.
zambelli
18th September 2006, 07:30
Zambelli, one last correction regarding deinterlacers:
any deinterlacer/bobber can use as much previous/future fields it like. Whether this is godd or not I don't want to judge now.
Which bobber would you recommend for a deshaking scenario such as this? I'm currently using TDeint because it gives me the sharpest results without any interlacing artifacts, but I'm wondering... would switching to MVBob have any benefit? Would its motion compensation get canceled out by the extraneous camera shaking?
FredThompson
18th September 2006, 11:31
sidebar: Try shooting PAL DV with a combination of 60 Hz and natural lights or NTSC DV witha combinaiton of 40 Hz and natural light. You get the strobe and constant levels...
scharfis_brain
18th September 2006, 18:38
@zambelli: always deinterlace using no motion adaption (thresholds <= 0!).
for mvbob that means to disable the motion adaption of the internal deinterlacer, too.
mvbob will still gain quality, even with shaky footage.
but IMO it is not worth the cost of the processing time...
just bob the source using
assume?ff().separatefields().eedi2(field=-2)
zambelli
19th September 2006, 06:54
@zambelli: always deinterlace using no motion adaption (thresholds <= 0!).
Interesting. Does that mean that the interpolation is then based only on current field and the next field is disregarded?
for mvbob that means to disable the motion adaption of the internal deinterlacer, too.
Is that only bobth=0, or also th=0 and ths=0?
gatekeeper_007
21st September 2006, 08:47
I've just read this thread 2 days ago... -Great stuff !!!
Well I won't pretend to understand much, because I don't.
Even though I've made some tests... messing around with the curves (via the GIMP),and I must say I had very nice results.
Now I would like to test with an (.amp) file (via the adobe photoshop) since it has more options, but I'll need some help
with it because I never had to create an '.AMP' file before and it seems that 'adobe ph.' save's the curves in (*.AVC) format.
I've searched the guied (of adobe photoshop) but I couldn't get nothing out of it, I even made some attempts to create one but nothing... the .amps I've created from a layer had nothing to do with the ones I should be creating.
Could anybody pls explain to me how I could create this (.AMP)file...
...or point me to a tutorial for it ? (I couldn't find one)
pc. I know, I'm stupid :P but I have to ask...
- is it possible to create an .amp file with a compilation of settings :P (curves,+...,+...) all into one file? or 'GiCoCu' can only handle curve parameters ?
cause that would be @#^*Great! {^_^}
Thx.
gatekeeper_007
21st September 2006, 09:27
I've just read this thread 2 days ago... -Great stuff !!!
Well I won't pretend to understand much, because I don't.
Even though I've made some tests... messing around with the curves (via the GIMP),and I must say I had very nice results.
Now I would like to test with an (.amp) file (via the adobe photoshop) since it has more options, but I'll need some help
with it because I never had to create an '.AMP' file before and it seems that 'adobe ph.' save's the curves in (*.AVC) format.
I've searched the guied (of adobe photoshop) but I couldn't get nothing out of it, I even made some attempts to create one but nothing... the .amps I've created from a layer had nothing to do with the ones I should be creating.
Could anybody pls explain to me how I could create this (.AMP)file...
...or point me to a tutorial for it ? (I couldn't find one)
pc. I know, I'm stupid :P but I have to ask...
- is it possible to create an .amp file with a compilation of settings :P (curves,+...,+...) all into one file? or 'GiCoCu' can only handle curve parameters ?
cause that would be @#^*Great! {^_^}
Thx.
You're so stupid m8.... just use the 'pencil'
ok I got it!
actionman133
21st September 2006, 13:57
Hey guys,
I've gone back and improved my old glow filter and I've also written a new one which is giving stellar results... Diffusion.
Function Glow (clip original, int "radius", int "minlevels", float "opacity") {
LoadVirtualDubPlugin ("BoxBlur.vdf", "BoxBlur")
radius = Default (radius, original.width/32)
opacity = Default (opacity, 1.0)
minlevels = Default (minlevels, 224)
minlevels = Default (minlevels, 224)
blurred = original.ConvertToRGB32 ("pc.601").BoxBlur (radius, 3, 1000).ConvertBackToYUY2 ("pc.601")
blurmask = original.ConvertToRGB32().Levels(minlevels, 1, 255, 0, 255).BoxBlur(radius, 3, 1000). \
ConvertBackToYUY2 ("pc.601").Greyscale()
Overlay (original, blurred, mode = "lighten", mask = blurmask, opacity = opacity)
}
This glow filter differs from my old one (which was pretty dodgy, to be honest). This one doesn't lay white haloes over bright areas of the frame. Rather it isolates the bright areas and adds halos that correspond to the colours in the image, creating a more realistic glow.
You probably won't have to touch radius, but if you do, remember that bright objects tend to have large halos, so start with larger radii. The main determining factor here is minlevels. Use VDub's levels filter and adjust the input minimum so that all areas that WILL NOT glow appear black in the preview. Set minlevels to that number...
And diffusion...
Function Diffusion (clip original, int "radius", float "opacity") {
LoadVirtualDubPlugin ("BoxBlur.vdf", "BoxBlur")
radius = Default (radius, original.width/80)
opacity = Default (opacity, 1.0)
blurred = original.ConvertToRGB32 ("pc.601").BoxBlur (radius, 3, 1000).ConvertBackToYUY2 ("pc.601")
blurmask = original.ConvertToRGB32().BoxBlur(radius, 3, 1000).ConvertBackToYUY2("pc.601").Greyscale()
Overlay (original, blurred, mask = blurmask, opacity = opacity)
}
This one is awesome!! I love this one. This works like a diffusion filter placed over the lens, softening the image without really losing too much detail. It's default setting is pretty strong, so reduce it by lowering the opacity to 0.5-0.7.
NOTE OF WARNING:
I have only tested these with YUV test samples. I've always had problems with RGB material in Overlay, so I've since not bothered. Ensure that your input is either YUY2 or YV12 (or Y8/YV24 for the smart alec's with v2.60! :rolleyes: )...
Test images will be up soon, probably tomorrow...
anton_foy
21st September 2006, 15:51
@Actionman133
Wow man this is just what I have been looking for! Can't wait to try it out :)
I made some changes to your old Glow script because it was very slow, will see if I can make this faster by modifying the same lines.
...If its not already fater I mean;)
actionman133
21st September 2006, 16:23
Actually, this glow script will probably be much slower, because it now does two box blurs for each frame. The old one only did one boxblur per frame. This is necessary for the filter to work properly...
The results of this Glow () are completely different to the old Glow (), so don't just replace the function and expect it to look similar. I was actually thinking of calling it Halo () or AddHalo () just to make sure people didn't get confused by it...
anton_foy
21st September 2006, 16:26
I get an error saying: "invalid argument to function BoxBlur"
Have got the boxblur.vdf I even tried the boxblur for avisynth with the same result.
actionman133
21st September 2006, 16:56
One 'mistake' in the function I posted is that it loads the BoxBlur VirtualDub plugin from an unusual location. Did you change it to where you have BoxBlur stored?
Also, make sure you have the latest version downloaded, v1.5...
If those don't solve the problem, then I'm stumped!
anton_foy
21st September 2006, 17:07
yes I changed the path but I dont know which version of boxblur Ive got.
anton_foy
21st September 2006, 21:20
I can't find boxblur 1.5, someone got a link to it?
actionman133
21st September 2006, 22:55
Direct link from Neuron2's website:
http://www.neuron2.net/boxblur/boxblur15.zip
anton_foy
22nd September 2006, 03:28
Thank you Actionman got it to work now ;)
But I cant see much difference when I add this line: Glow(radius=3, minlevels=229, opacity=100)
If I understand this correctly it it gives a more halo than "glow" and it keeps the colouration from the footage so the halo will be tinted?
Edit: btw. your old Glow script I edited so it got faster, actually I think it was Mug who suggested that I should try fastgaussblur instead of spatialsoften
Function Glow (clip Last, int "radius", int "min", int "max", int "opacity") {
radius = Default (radius, 5)
edges = (radius % 4) == 0 ? radius : radius + 4 - (radius % 4)
min = Default (min, 254)
max = Default (max, min + 1)
opacity = Default (opacity, 1.0)
Mask = ConvertToYUY2 ().Levels (min, 1, max, 0, 255, false)
Mask = Mask.AddBorders (edges, edges, edges, edges).FastGaussBlur(24).Crop (edges, edges, edges * -1, edges * -1).Levels (0, 1, 127, 0, 255, False)
White = Blankclip (Mask).Invert ("Y")
Overlay (Last, White, mask = mask, opacity = opacity, output = "YV12")
}
function FastGaussBlur(clip clp, float rx, float "ry")
{
ry = default(ry, rx)
rx = rx+1.0
ry = ry+1.0
ox = clp.width
oy = clp.height
oxs1 = int(round(ox/4.0/sqrt(rx))*4)
oys1 = int(round(oy/4.0/sqrt(ry))*4)
oxs2 = int(round(sqrt(ox*oxs1)/4.0)*4)
oys2 = int(round(sqrt(oy*oys1)/4.0)*4)
oxs1 = oxs1<16 ? 16 : oxs1
oys1 = oys1<16 ? 16 : oys1
clp.bicubicresize(oxs1,oys1)
rx>9.0||ry>9.0 ? bicubicresize(oxs2,oys2,0.5,0.25) : last
return bicubicresize(ox,oy,1,0)
}
actionman133
22nd September 2006, 08:02
You are correct, Anton. The intent of the new glow filter is to add halos to bright objects to make them appear as if they are glowing.
You should also be using a larger radius for a more authentic effect. Halos tend to be fairly large, radius 10 or 12 pixels on VCD size footage even. So a radius of 3 won't do much at all.
I remember you were mentioning before about removing sharpening artifacts... Diffusion () would probably do that better with a small radius and high opacity, but Glow wouldn't be the best filter for fixing oversharpening...
Wilbert
24th September 2006, 21:36
Could someone add this to the script page at avisynth.org? Thx!
Backwoods
25th September 2006, 20:57
Edit: btw. your old Glow script I edited so it got faster, actually I think it was Mug who suggested that I should try fastgaussblur instead of spatialsoften
Actually I think it was Didee from me using Blurx3 (mainly b.c I didn't go into my archives to find the FastGaussBlur script).
Could someone add this to the script page at avisynth.org? Thx!
Which? Diffusion, Glow or V2F?
Wilbert
25th September 2006, 21:04
Which? Diffusion, Glow or V2F?
All of them. I noticed that someone already started with it?
anton_foy
25th September 2006, 22:11
Actually I think it was Didee from me using Blurx3 (mainly b.c I didn't go into my archives to find the FastGaussBlur script).
Sorry Backwoods my memory isn't what it use to be :P
I think I remember that now that you mention it.
actionman133
25th September 2006, 23:34
I have started it Wilbert. I'll get around to finishing it when I can...
anton_foy
26th April 2007, 13:54
Does anyone have the ChanMix plugin E-male made?
I can't find it anywhere but in this thread but the link is dead and E-male is not answering my PM. Would be so great if someone could either put it in the plugins section or send to me personally:
(email) jonas.hed82@gmail.com
Thanks everyone
BlueCup
28th April 2007, 00:22
www.flmpro.com/DLLreq.zip
Chanmix and GiCoCu
You didn't look hard enough.
anton_foy
28th April 2007, 13:23
Whohoooo!
@ BlueCup
Thank you my friend, they like to hide for some reason hehe.
E-Male
28th April 2007, 14:06
I haven't been here for some time, so I din't see the requests until today.
I currently can't access the HD with my old programming stuff.
But I'll try to get the dlls and sources as soon as I got my new PC and will upload anything I could save to some webspace.
THX a lot to anyone providing mirrors.
anton_foy
28th April 2007, 17:36
Thats ok E-Male I got it now. Was a fool not knowing it was in the DLLreq.rar.
But cannot get ChanMix to work. The image just comes out black and white when testing.
Converttorgb24().ChanMix(10,10,10).Converttoyv12()
Is Chanmix exactly like in photoshop BTW.? In photoshop you can adjust RGB for each.
Like:
Red: red
green
blue
Constant
Green: red
green
blue
Constant
Blue: red
green
blue
Constant
And values between -200 to +200
E-Male
29th April 2007, 14:28
It is supposed to create greyscale output.
The 3 parameters are the weight of each color channel.
Korben
2nd May 2007, 11:41
actionman133 could you please post your curve.txt again. And beside this,the Tint function on avisynth homepage (http://avisynth.org/index.php?page=Tint) doesnt work properly.
It says:
---------------------------
VirtualDub Error
---------------------------
Avisynth open failure:
Overlay: Mask and overlay must have the same image size! (Height is not the same)
(tint.avs, line 29)
(O:\Capture\Project_107\720p.avs, line 33)
Any ideas?
BR
actionman133
4th May 2007, 16:35
Sorry Korben, I've long since deleted that curve file and I can't remember what values I used.
I had a look at the script but I can't see where it's going wrong... What are the dimensions and colourspace of your clip?
Korben
5th May 2007, 09:42
Ok.. no problem, if anybody has still the curve.txt please post it.
I dont know why, but it works now. The video is just SD-Video, 720x480. Iam almost using YUY2.
anton_foy
12th May 2007, 14:43
Recently my friend Gustaf Ullberg made another ChannelMixer plugin. It is identical to the Photoshop ChannelMixer and it supports RGB24 and RGB32 colorspaces. Hope you like it.
http://redshift.xtreem.nu/gustaf/filters/channelmixer_v1_0.zip
BlueCup
12th May 2007, 22:18
Great news, thank you.
anton_foy
18th May 2007, 15:02
When using a Photoshop curve with GiCoCu everything works fine but if I use two curves in a row like this:
GiCoCU("C:\Projekt\Curve1.amp",photoshop=true)
GiCoCU("C:\Projekt\Curve2.amp",photoshop=true)
my image gets a strong blue tint all over.
Possible bugg or Im doing something wrong?
BlueCup
19th May 2007, 08:40
Just curious, what version of Photoshop are you using?
anton_foy
19th May 2007, 11:44
@BlueCup
Im using 7.0...I know its old
BlueCup
20th May 2007, 05:51
Just making sure because I think CS1/2 (don't know about 3) save curves in a different file format.
WorBry
30th May 2007, 07:48
Sorry Korben, I've long since deleted that curve file and I can't remember what values I used
I'd be interested in that curve file also. Does anyone still have a copy?
jkwarras
24th July 2007, 11:38
I'm using the Backwoords script V2F on some DV PAL interlaced footage. It's great! Some thoughts:
1) Anyone has worked out a new version with new plugins, simpler, or with less color conversions?
2) I see in the output (it's a weeding video, outdoors, natural lights) some artifacts, like mosquito noise around edges. I guess it's due to some of the overlay, blur, masks stuff in the scripts.
3) Deinterlacing with leakkerneldeint (0) gives a progressive video and more film look feeling.
4) Grain is difficult, because adding addgrain(18,0,0) it's too much for me. Adding 10 is fine, but I see it too much. It's "over" the picture, not "in" the picture as in film. Adding it on the second step (FILM) brings more edges and it look worst. I've tried noisegenerator.dll and I get weird results, with colour changes.
5) Does someone knows if it'll be better (and quicker/simpler) to apply curves like the Panasonic DVX100 or HVX200 does? Another think is to get them and how to apply them to video.
scharfis_brain
24th July 2007, 12:02
3) use a more sophisticated deinterlacer like yadif, or mcbob/mvbob.
jkwarras
24th July 2007, 17:19
3) use a more sophisticated deinterlacer like yadif, or mcbob/mvbob.
Nice, I'll try one of these. Thanks.
Mug Funky
25th July 2007, 03:22
4) Grain is difficult, because adding addgrain(18,0,0) it's too much for me. Adding 10 is fine, but I see it too much. It's "over" the picture, not "in" the picture as in film. Adding it on the second step (FILM) brings more edges and it look worst. I've tried noisegenerator.dll and I get weird results, with colour changes.
5) Does someone knows if it'll be better (and quicker/simpler) to apply curves like the Panasonic DVX100 or HVX200 does? Another think is to get them and how to apply them to video.
film grain is tricky. negative film has much more grain in the darks than the highlights. however, most "film look" people experience is telecined film on TV. telecine machines on neg film will add their own noise to the highlights, but it's a different sort of noise. a simple luma mask could sort this out though.
applying curves to get a film look is also tricky - 1D LUTs aren't enough to reproduce some of the effects of exposed film. it doesn't take crosstalk into account (channel mixing). a 3D LUT can handle this very well though, and in fact there's a lot going on in the DI world that involves getting good 3d LUTs to simulate certain effects (bleach bypass, certain specific stocks, etc). these tend to be proprietary though, and usually made via direct measurements.
i'd love to see a 3d LUT plugin for avisynth, but it'd only be really useful in 10 bits or more (preferably float).
IanB
25th July 2007, 04:50
3d LUT, well it ain't gonna be fast, 256x256x256=16,777,216 table entries. At 3 bytes per entry give a 48Mb table. Certainly do-able with current machines, but oh what it will do to the L1 and L2 caches.
Full 10 bit is even worse, 1024x1024x1024=1,073,741,824 tables entries. At 3 words per entry gives a 6Gb table, sure you could spec an x64 machine to cope.
Compromise 10bit might just fit, 1024x256x256=67,108,864 table entries. At 1 word plus 2 bytes per entry gives a 256Mb table.
By understanding a particular table some clever tricks may be possible to drastically reduce the load, but then it's not general LUT anymore.
jkwarras
25th July 2007, 22:54
film grain is tricky. negative film has much more grain in the darks than the highlights. however, most "film look" people experience is telecined film on TV. telecine machines on neg film will add their own noise to the highlights, but it's a different sort of noise. a simple luma mask could sort this out though.
So I guess I'll have to stick with addgrain, right? Maybe a gaussian noise will have better 'cheap' results because it'll be less uniform... Maybe addgrain is already gaussian noise and I don't know it.
The luma mask for the grain is difficult? Sorry, my level of avisynth scripting is quite limited.
Pookie
26th July 2007, 01:42
Didee has a function which allows you to add more grain to the dark areas. Can't remember the name at the moment. Grainiac ? Grain Factory ?
Needs Masktools 1.5x and AddGrain plugins
function GrainFactory(clip last,int "grain1_strength",int "grain2_strength",int "grain1_sharpness",int "grain2_sharpness")
{
grain1_strength=default(grain1_strength,5)
grain2_strength=default(grain2_strength,2)
grain1_sharpness=default(grain1_sharpness,75)
grain2_sharpness=default(grain2_sharpness,75)
#grain1_strength = 7 # [ 0 - ???] strength of grain / for mid-tone areas
grain1_size = 1.15 # [0.5 - 4.0] size of grain / for mid-tone areas
#grain2_strength = 0 # [ 0 - ???] strength of grain / for dark & bright areas
grain2_size = 0.8 # [0.5 - 4.0] size of grain / for dark & bright areas
#grain1_sharpness = 75 # [ 0 - 100] very soft (0) to very sharp(100)
#grain2_sharpness = 75 # [ 0 - 100] grain definition
grain1_texture = 0 # [ 0 - 100] strength of "material texture" appearance
grain2_texture = 0 # [ 0 - 100] (in fact: 'bump' effect)
ontop_grain = 0 # [ 0 - ???] additional grain to put on top of prev. generated grain
temp_avg = 20 # [ 0 - 100] percentage of noise's temporal averaging
brightness_bias = 0.96 # [0.5 - 2.0] bias for dark|bright --> midtone fading
#-----------------------------------------------------------------------------------
o = last
ox = o.width
oy = o.height
sx1 = m4(ox/grain1_size)
sy1 = m4(oy/grain1_size)
sx1a = m4((ox+sx1)/2.0)
sy1a = m4((oy+sy1)/2.0)
sx2 = m4(ox/grain2_size)
sy2 = m4(oy/grain2_size)
sx2a = m4((ox+sx2)/2.0)
sy2a = m4((oy+sy2)/2.0)
b1 = grain1_sharpness/(-50.0) + 1.0
b2 = grain2_sharpness/(-50.0) + 1.0
b1a = b1/2.0
b2a = b2/2.0
c1 = (1.0-b1)/2.0
c2 = (1.0-b2)/2.0
c1a = c1/2.0
c2a = c2/2.0
t1a = string(grain1_texture)
t1b = string(100-grain1_texture)
t2a = string(grain2_texture)
t2b = string(100-grain2_texture)
tmpavg = temp_avg/100.0
#-----------------------------------------------------------------------------------
ADD_DIFF = "x y - 128 +"
BUMPKERNEL1 = T1a + " 0 0 0 " + T1b + " 0 0 0 0"
BUMPKERNEL2 = T2a + " 0 0 0 " + T2b + " 0 0 0 0"
CENTER2MAX_BIAS = "x 120 - abs "+string(brightness_bias)+" ^ 2.5 *"
#-----------------------------------------------------------------------------------
grainlayer1 = blankclip(o, width=sx1, height=sy1, color=$808080) .AddGrain(grain1_strength, 0, 0)
grainlayer1 = (grain1_texture==0)
\ ? grainlayer1
\ : yv12lutxy(grainlayer1,grainlayer1.DEdgeMask(0,255,0,255, BUMPKERNEL1), ADD_DIFF)
grainlayer1 = (grain1_size == 1.0) ? grainlayer1
\ : (grain1_size < 0.75) ? grainlayer1.bicubicresize(sx1a,sy1a, b1a, c1a).bicubicresize(ox,oy, b1a,c1a)
\ : grainlayer1.bicubicresize(ox,oy, b1,c1)
#-----------------------------------------------------------------------------------
grainlayer2 = blankclip(o, width=sx2, height=sy2, color=$808080) .AddGrain(grain2_strength, 0, 0)
grainlayer2 = (grain2_texture==0)
\ ? grainlayer2
\ : yv12lutxy(grainlayer2,grainlayer2.DEdgeMask(0,255,0,255, BUMPKERNEL1), ADD_DIFF)
grainlayer2 = (grain2_size == 1.0) ? grainlayer2
\ : (grain2_size < 0.75) ? grainlayer2.bicubicresize(sx2a,sy2a, b2a, c2a).bicubicresize(ox,oy, b2a,c2a)
\ : grainlayer2.bicubicresize(ox,oy, b2,c2)
#-----------------------------------------------------------------------------------
grainlayer = MaskedMerge(grainlayer1, grainlayer2, o.yv12lut(CENTER2MAX_BIAS), U=1,V=1)
grainlayer = (temp_avg==0) ? grainlayer
\ : grainlayer.mergeluma(grainlayer.temporalsoften(1,255,255,255,2), tmpavg)
grainlayer = (ontop_grain==0) ? grainlayer
\ : grainlayer.AddGrain(ontop_grain,0,0)
#-----------------------------------------------------------------------------------
result = yv12lutxy(o, grainlayer, ADD_DIFF, U=2,V=2)
return result
}
#-----------------------------------------------------------------------------------
function m4(float x) {return( x<16?16:int(round(x/4.0)*4)) }
#===================================================================================
Terranigma
26th July 2007, 02:13
Thanks Pookie, Never came across this one. Hope it's good like blockbuster (Or possibly even better knowing it's something from Didée :D).
foxyshadis
26th July 2007, 02:30
AddGrain is normal (gaussian), yes. For a very basic mask:
grain=Addgrain(100,.2,.2)
mt_merge(grain,last,last,chroma="copy")
You might get somewhat better results by pushing the chroma toward grey where the grain appears, and testing the U channel channel to test for deeper blues as well.
I have a more complex algorithm, but it needs a lot of tweaking to get different looks, and it's not really "correct" yet - just a hack, until I remember the right formula. And then yes, there's grainfactory, but since I didn't make it I don't know how to get the grain I like out of it. :p
jkwarras
27th July 2007, 00:02
Thanks a lot pookie and foxyshadis for the scripts, I'll try on my next post-processing :)
espy2
18th September 2007, 23:15
GiCoCu sounds absolutely wonderful in principle, I definitely want to use it, but it isn't working as expected. I see that someone else (WorBry) has had exactly the same problem.
I have tried everything including flat curves (1:1 linear) and various examples from webpages. Tried it on BlankClip examples giving pure R, G, B and Luma. Also tried on video and images. Even tried playing with the photoshop flag. Always the same effect - the result is just yellow tint.
Please, is there an explanation for this? I use GiCoCu 2005-06-20 from avisynth.org/warpenterprises under AviSynth v2.57 on Windows XP (SP2 etc.). For example does it only work under an older version of AviSynth?
This person had the same problem:
Sorry about that - I thought the image had uploaded. Anyway, here it is again as a jpg at half-sized resolution.
The test Gimp curve I created is nothing special, just a slight S-curve created in the RGB channel:
# GIMP Curves File
0 0 -1 -1 -1 -1 -1 -1 64 54 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 192 200 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
I also observed the same effect with a more complex Gimp curve posted by Mug Funky earlier in this thread:
# GIMP Curves File
-1 0 16 0 37 17 -1 -1 -1 -1 -1 0 -1 0 -1 0 128 127 -1 -1 -1 193 -1 221 -1 210 207 219 -1 241 -1 -1 255 235
0 0 -1 -1 -1 43 41 42 -1 53 -1 -1 -1 -1 -1 57 -1 39 -1 0 -1 0 -1 0 -1 204 211 226 -1 231 -1 -1 255 255
0 0 -1 -1 -1 -1 47 52 -1 61 -1 -1 -1 -1 -1 125 121 125 -1 -1 -1 -1 -1 -1 -1 210 215 231 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 40 39 -1 0 -1 0 -1 0 -1 0 127 132 -1 147 -1 -1 -1 -1 -1 207 -1 221 222 235 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
So I really dont know what's going wrong.
espy2
25th September 2007, 20:01
Tried some PhotoShop '.amp' files (downloaded) e.g. from http://members.chello.at/nagiller/vdub/curves.html and used them with GiCoCu in photoshop mode but the end result was no change to the original. The only time I got a change was when I hacked randomly inside the .amp file (using Notepad!).
I looked at GiCoCu source (GiCoCu.cpp) and also at Gimp source (gimpcurvestool.c) for color curves. I am confused why (in both sources) the code appears to read 6 rows yet it looks like are only 5 rows of data in a .cur file. The code says for (i = 0; i < 5; i++) Not that it's likely to explain the problem, since Gimp's color curves application does work (I tried it), but would be nice to be on more certain ground.
Anyone got any advice/directions here?
Leak
25th September 2007, 20:51
for (i = 0; i < 5; i++)
That counts i from 0 to 4; the loop terminates as soon as I becomes 5.
I.e. it reads exactly 5 rows.
np: Modeselektor - Em Ocean (Happy Birthday!)
espy2
25th September 2007, 21:30
Oh gawsh...
well I am here to solve a problem, not establish credibility...
Thanks for that quick answer.
zee944
3rd March 2008, 11:25
I'm trying to use GiCoCu for boosting up the darker parts of video a little, leaving the black level and the white peak untouched.
Comparing with Ylevels (http://forum.doom9.org/showthread.php?t=79898) and HDR AGC (http://forum.doom9.org/showthread.php?t=93571) it seems GiCoCu doesn't process only luma, thus the colours become unnatural so easily. Is there way to make GiCoCu to process only luma?
I use Gimp to draw the curve which already suggests the RGB values will be touched, and it's not good for me. Am I missing something here?
Leak
3rd March 2008, 18:17
Is there way to make GiCoCu to process only luma?
MergeChroma(GiCoCu(...),last)
That'll replace whatever chroma GiCoCu produces with that of the unfiltered clip.
np: The Orb - Assassin (Chocolate Hills Of Bohol Mix) (U.F.Orb Remixes)
BBugsBunny
3rd March 2008, 22:34
Maybe emale or someone else could update gicocu? My filter
http://members.chello.at/nagiller/vdub/index.html
does in principle the same as gicocu only for VirtualDub.
I did work pretty much lately on the filter and the code is open source.
@ zee944: what you ask for is the RGB weighted mode in my filter. It calculates Luma the RGB value and applies the curve accordingly. This way the color is preserved. No full RGB->YUV->RGB conversion is needed.
It should be no big deal to add this in gicocu.
Also I'm not sure if the latest gimp uses the same interpolation to draw the curves as in earlier versions of gim and I'm not sure if gicocu generates exactly the same curve with the given coordinates. The actual gimp version definitely does a different interpolation than photoshop.
I added a spline (+ line + gamma) mode to my filter interface and thus was doing some research in that area... My spline mode produces an identical curve to photoshop with a given .acv curve. A new final (incl. source code) will be available soon. If someone is interested to test the spline mode of my filter can send me a PM. It should then be more practical to use VirtualDub + my gradation curves filter to generate cuves than using gimp to do this.
zee944
4th March 2008, 12:38
MergeChroma(GiCoCu(...),last)
That'll replace whatever chroma GiCoCu produces with that of the unfiltered clip.
How should it work? GiCoCu wants RGB24 or RGB32 colorspace, while MergeChroma accepts YUV. Using this code:
MergeChroma(GiCoCU("Ylevels_gradationcurves138b-ben_rajzolva.amp",photoshop=true),last)
...VirtualDub says: "Avisynth open failure: MergeLuma: YUV data only (no RGB); use ConvertToYUY2 or ConvertToYV12".
@ zee944: what you ask for is the RGB weighted mode in my filter. It calculates Luma the RGB value and applies the curve accordingly.
Thanks, I've already figured out that your filter works fine in weighted mode. My problem is that I have to do it in Avisynth.
It would be so fine if I could use your filter to draw the curve in weighted RGB/YUV mode, and then feed GiCoCu with it and do exactly the same. I wouldn't even mind if Gradation.vdf wouldn't have that spline effect for smoothing the curve.
Leak
4th March 2008, 15:50
How should it work? GiCoCu wants RGB24 or RGB32 colorspace, while MergeChroma accepts YUV.
Oh. Well, I've never used GiCoCu myself... :D
But appending a ".ConvertToYUY2()" to both parameters of MergeChroma should do the trick. You can of course also append a ".ConvertToRGB32()" to the MergeChroma call itself if you really need RGB.
I don't think you'll be able to do this without colorspace conversions, at any rate...
zee944
4th March 2008, 16:24
But appending a ".ConvertToYUY2()" to both parameters of MergeChroma should do the trick.
Oh, thank you very much! It does work:
MergeChroma(GiCoCU("Ylevels_gradationcurves138b-ben_rajzolva.amp",photoshop=true).ConvertToYUY2,last.ConvertToYUY2)
If the footage (taken from a DVD) is already within the 15..235 values, I don't loose any details converting back and forth to RGB32/YUY2, do I? I'm not really aware of this colorspace-conversion thing...
Leak
4th March 2008, 18:27
If the footage (taken from a DVD) is already within the 15..235 values, I don't loose any details converting back and forth to RGB32/YUY2, do I? I'm not really aware of this colorspace-conversion thing...
I was more thinking of rounding errors, since converting between RGB and YUV involves non-integer maths with the results having to be rounded to an integer (i.e. to a byte's 0-255 range).
But it should be hardly noticeable unless you keep converting back and forth between colorspaces... :)
np: The Orb - Sleeping Tiger & The Gods Unknown (The Dream)
BBugsBunny
22nd March 2008, 15:34
Curves could be applied in YUV directly as well. But someone has to update the gicocu plugin for that to work...
BTW a new version of my gradation curves virtualdub plugin is out:
http://forum.doom9.org/showthread.php?t=133191
Now has got a nice spline editor mode as well. Can export .amp files that gicocu should be able to read.
So now it is problably a better alternative than to build the curve in in gimp.
The amp file does not include the color space and the gicocu plugin does not support all color spaces, that my plugin does support, so be careful configuring gicocu.
zee944
23rd March 2008, 11:05
Thanks BBugsBunny, I became a regular user of your Gradation filter in the past few weeks. I draw the curve with your stuff and then feed GiCoCu with the curve file.
I have one problem though. When I want to grab a point (coordinate) to move it, I have to place the mouse cursor above and left to it. Sometimes it makes a bit problematic to draw the curve.
The two extremes (between these two I have to click above and left to the coordinate accordingly):
http://i179.photobucket.com/albums/w286/zee944/th_gradation_filter_mouse_problem_2.jpg (http://i179.photobucket.com/albums/w286/zee944/gradation_filter_mouse_problem_2.jpg)http://i179.photobucket.com/albums/w286/zee944/th_gradation_filter_mouse_problem_1.jpg (http://i179.photobucket.com/albums/w286/zee944/gradation_filter_mouse_problem_1.jpg)
I'm using Windows 2000 SP4 and Virtualdub-MPEG2 1.6.9. I've never encountered similar problem with anything else. Any idea?
BBugsBunny
23rd March 2008, 12:46
zee944 thanks a lot for that bug report!
I think I know the cause of this. I think you use 125% DPI Windows metrics size, do you?
Well I did take the windows metrics into account for the routine that draws the curve, but forgot to do so for the routine that captures the mouse commands...
I can probably fix this soon and will then release a bugfix version for this.
I think the 125% DPI Windows metrics settings is used reletively seldom. Most leave them standard. For that reason this bug was undiscovered for so long.
zee944
23rd March 2008, 17:36
I think I know the cause of this. I think you use 125% DPI Windows metrics size, do you?
Right! And the cursor movement indeed looks about 25% false, too. Surely it's the problem.
Should I be able to edit an already saved curve? When I import an .amp file I drawed earlier and switch the curve type on the right side, the filter resets the curve.
BBugsBunny
23rd March 2008, 20:19
Should I be able to edit an already saved curve? When I import an .amp file I drawed earlier and switch the curve type on the right side, the filter resets the curve.
The problem with an .amp file is, that it does not store the coordinates, only the raw data. When importing later it will switch to freehand mode. For a later version an interpolation when going from freehand to spline is planed, but even then it is not certain, that you will get the original curve and coordinates. If you want to store the coordinates, you can export to .acv. This format stores the coordinates only. So if you work with coordinates you should export to acv and amp. Or you can store the processing settings in VirtualDub (vcf). There all data is stored. The crv and map formats from Corel Draw are much more complete, but currently only import is possible. To the csv export I will probably add all the other data (coordinates/drawing mode...) in a later version. Currently it only stores the raw data in text format. The gimp format is somewhat borked also. Raw Data is never stored, so if you store a freehand curve and import it back in you will get a differnt curve. They also changed the interpolation from 2.2 to 2.4.
Regarding the bug, I got it nearly fixed...
WorBry
23rd May 2008, 02:46
For me, one of the by-products (to a greater or lesser degree) of bob-deinterlaced DV that most detracts from a 'filmic-look' is the flicker (shimmer, 'inter-line twitter', 'moire') on high contrast edges and patterns (stripes etc). Once again, Didee has come up with a marvellous function (TempGaussMC) that deals very effectively with this. Check it out:
http://forum.doom9.org/showthread.php?p=1138514#post1138514
outcomes
3rd February 2009, 07:50
http://img523.imageshack.us/img523/967/snapshot20090202225710og4.jpg (http://imageshack.us)
.never got what i wanted
what could be wrong..
i'm using a simple script
using vurve in photoshop then saving it as save as - ###.amp file and loading it avisynth,.
am i doing somehting wrong can anyone go over the steps .
zee944
22nd February 2009, 14:18
.never got what i wanted
what could be wrong..
i'm using a simple script
using vurve in photoshop then saving it as save as - ###.amp file and loading it avisynth,.
am i doing somehting wrong can anyone go over the steps .
Probably you're trying to load the .AMP file without "photoshop=true".
Try this:
GiCoCU("curve.amp",photoshop=true)
2Bdecided
18th March 2009, 16:35
A bit late to mention this, but I just stumbled across a great paper from the BBC which discusses "the film look" in detail...
http://downloads.bbc.co.uk/rd/pubs/whp/whp-pdf-files/WHP053.pdf
It goes through transfer characteristics in great detail, also MTF, motion judder, depth of field, and aperture correction.
Cheers,
David.
WorBry
4th May 2010, 17:09
If, anyone is (still) interested in 'film looks', I've put together this script for 'Bleach Bypass'. All processing in YV12.
http://forum.doom9.org/showthread.php?p=1397257#post1397257
sonu patel
18th October 2010, 02:49
automation is done:
http://e-rels.dyndns.org/downloads/gccp.exe
example:
gccp c:/gimp/testcurve.txt
i wasn't able to put my file-reading code into the plug-in, yet (http://forum.doom9.org/showthread.php?s=&threadid=88041)
gccp.exe plz upload the file link is dead rqst
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.