Hi there!

In BoinxTV we use the Histogram-Patch to generate a hue-histogram over the 
video source to help the user to setup a chromakeying filter. For this I 
convert the RGB image to HSL values and feed this into the "Histogram" patch.

I notice that the resulting histogram don't match with the image provided. I 
put a test composition together to find out what the problem is. The 
composition don't have the RGB to HSL conversion with it, but only tries to use 
a adjustable grey image to generate a histogram. Find this composition attached.

In this composition you will see two parameters: "grey" and "Image Pixel Color 
Space". The "grey" value is used to generate an image by a GLSL shader within a 
"Render in Image" patch. Then the resulting image is used as source for a 
"Image Pixel" patch that shows the resulting grey value in the texture. You can 
switch the color space by the "Image Pixel Color Space" input. So there are 
potential three different results for the pixel value.

At the bottom of the composition you see two vertical lines: the red line is 
the peek of the grey color of the image in the histogram and the white line is 
the representation of the "grey" input parameter.

When sliding the grey input parameter from left to right, you will notice that 
the red histogram peek will move accordingly, but won't match the "grey" input 
value (white line). For dark grey the red peek is ahead and for light grey it 
is vice versa.

This is because of different color spaces for sure. But interestingly the 
"value difference" between red and white don't match with any differences when 
choosing different colorspace settings for the "Image Pixel" patch.

Also I would expect to see a perfect match between input and output when using 
the "Absolute Linear" color space at the "Image Pixel" patch, but I don't.

I am a bit confused about which color spaces are used and what time and what 
colorspace the "Histogram" patch uses since it isn't one of those the Image 
Pixel patch uses.

Any hints a appreciated.


best,

Achim Breidenbach
Boinx Software

Attachment: Histogram Patch Test.qtz
Description: application/quartzcomposer

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to