Log in

View Full Version : How to achieve "film look" on PAL DV source


Pages : 1 2 3 [4] 5 6 7 8 9

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)