This patch is usually used in a CIFilter Image Processing chain. The output image contains "count" number of buckets which is represented by an image 1 pixel tall and "count" pixels wide. The color value of the pixel is the amount of that color in the input image.
As it turns out, that image is not very useful for displaying because the alpha value of each pixel is zero. CoreImage has an optimization where alpha-zero pixels are ignored, so even if there is useful data in the other components of that pixel the whole thing is null.
So I wrote a CI filter to set the alpha value to 1 of each pixel so you can see the output. I did not ask him what the patch could be used for, but I could imagine someone needing a fast GPU based image histogram. You basically get a red pixel between zero and count where the position of the pixel represents the percentage of red in the image.
Thanks for the question, Troy
CIAreaHistogram.qtz
Description: application/quartzcomposer
On Dec 13, 2007, at 2:57 AM, Jonas S wrote:
Hello everyone, I am wondering what should this patch do? Its description says: "Calculates a histogram for the specified area in an image, returning the result in a 1D image." No other documentation I was able to find about this patch. It has following parameters: image, extent, scale, count. Image is clear. Extent (I think) also is clear - it should describe image area which I want to use. At the moment I am using extent {0, 0, imageWidth, imageHeight} After some tests I have found, that 'count' is responsible for patch output image width and is histogram bins count. No idea what scale is for. I was thinking in same way like Jonathan - I thought that result image pixels should hold image histogram information: pixels red values for red channel histogram, green value for green channel and so on. But the result of this patch is _very_ strange. I am getting image of dimensions {1, _parameter_COUNT_}. It is always black except sometimes the right side of image becomes white (when using RGB image as input). Only few last pixels. If I try to draw histogram by using this image pixels values, the result is far away from the reality... So - what information provides this patch and how it should be interpreted if I want to get some useful information about histogram? Any information is appreciate. Jonas S. _______________________________________________ Do not post admin requests to the list. They will be ignored.Quartzcomposer-dev mailing list ([email protected] )Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/tkoelling%40apple.com This email sent to [EMAIL PROTECTED]
_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]

