View Full Version : Needed: a way to tell the color of a pixel
HighInBC
20th June 2005, 22:13
It would help me alot when writing functions if I could query the color of a pixel and get back integers for each channel... something like:
r_color = get_color(clip=clip,channel='r',frame=26,x=234,y=144)
g_color = get_color(clip=clip,channel='g',frame=26,x=234,y=144)
b_color = get_color(clip=clip,channel='b',frame=26,x=234,y=144)
This would allow me to do auto white balancing, detecting which portions of the video are letterboxed, checking for super-saturated areas ect...
joshbm
21st June 2005, 07:13
HighInBC,
I personally don't think your WhiteBalance function could use this. Even if it did support this I would still use RGB and find the value out myself. What would be useful is if you made this AviSynth script into a VirtualDub plugin. Of course being sure to be able to integrate it in AviSynth via LoadVirtualdubPlugin.
But then have a GUI for VirtualDub that all it has is R, G, and B input boxes and a preview button with an eye dropper. This way you can hit preview and use the eye dropper to get the white you want and it will adjust snd show you the result as you use the eye dropper to get the "white" in the picture.
Regards,
joshbm
HighInBC
21st June 2005, 07:20
I am working on an app to do that right now...
joshbm
21st June 2005, 16:06
Can't wait :)
HighInBC
21st June 2005, 16:29
well, it will be in perl... and require a few modules to get running...
in other words it won't be a binary, but you will need the Perl interpreter installed. But anyone using avisynth should have perl running, it is great for creating commands.
joshbm
21st June 2005, 16:40
Well, I don't exactly have perl, but your AviSynth script should be good enough for me :).
Regards,
joshbm
HighInBC
21st June 2005, 17:52
Yes, the perl script jsut add's a graphical user interface.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.