CIColorMap<http://developer.apple.com/documentation/GraphicsImaging/Reference/CoreImageFilterReference/Reference/reference.html#//apple_ref/doc/filter/ci/CIColorMap >
Color Map.qtz
Description: application/quartzcomposer
.xX On Jan 16, 2008, at 8:44 AM, Alex Drinkwater wrote:
As I understand it, each channel has 256 possible values (0 > 255).So, your lookup table should contain some kind of gradient, from 0 to 255, across each of the R, G, B and A channels. To limit your palette, you'd probably have to pixellete each of the gradients, so that instead of 256 possible values in each channel, you might have, say, 64, or 32, or maybe even fewer. This would limit the palette of available colours.Something like this would do the job. <LUT03.png>The only problem is, it's hard to see what the actual colours you're likely to get are...The other option of course, is to compile and use the Histogram Operation plugin, that's found in the Developer Examples folder (do a search for it).Hope this makes sense. alx On 16 Jan 2008, at 16:26, David Giovannini wrote:Hello,I am having trouble seeing in my head what the lookup table/image/ texture looks like.The 0..n and n..255 will contain the black and the white. How are the other colors distributed? The components are operating on the same table row. How do I adjust the 256 values to select from the limited pallet?Thank you, Dave On Jan 16, 2008, at 9:15 AM, Alex Drinkwater wrote:What I failed to mention of course, is that the lookup table has to be a strip with a width of 256 pixels. It only needs to be 1 pixel high. alx --- Alex Drinkwater <[EMAIL PROTECTED]> wrote:The code would be a little different in CIKernel Slang, as texture coordinates are handled differently. This code does a similar thing, in CIKernel slang: kernel vec4 lut(sampler image, sampler LUT) { // Input pixel vec4 inPix = unpremultiply(sample(image, samplerCoord(image))); // Output pixel vec4 outPix; outPix.r = unpremultiply(sample(LUT, vec2(inPix.r * 255.0,0.0))).r; outPix.g = unpremultiply(sample(LUT, vec2(inPix.g * 255.0,0.0))).g; outPix.b = unpremultiply(sample(LUT, vec2(inPix.b * 255.0,0.0))).b; outPix.a = unpremultiply(sample(LUT, vec2(inPix.a * 255.0,0.0))).a; // Output return premultiply(outPix); } alx --- vade <[EMAIL PROTECTED]> wrote:I would suggest creating a look up table as a texture, feed that in to a CIKernel, and have it map the r/g/b vales to the r/g/b values of the original image, something in GLSL like: // define our rectangular texture samplers uniform sampler2DRect tex0; uniform sampler1D tex1; // define our varying texture coordinates varying vec2 texcoord0; varying vec2 texcoord1; void main (void) { vec4 inputColor = texture2DRect(tex0, texcoord0); vec4 colorout; colorout.r = texture1D(tex1, inputColor.r).r; colorout.g = texture1D(tex1, inputColor.g).g; colorout.b = texture1D(tex1, inputColor.b).b; colorout.a = inputColor.a; gl_FragColor = colorout; } On Jan 15, 2008, at 10:10 PM, David Giovannini wrote:Hello, Let me describe what I am trying to do a littlebetter than before.Every avenue I try comes up short. My daughter got a LEGO Mosaic set for Christmas.Iam working on apattern maker application using QC. I have thepixellating and LEGOimpressions all working. The mosaic set comeswith12 colors wherethree are black, dark gray, and white. I need tohave the colors inthe resulting image limited to the 12. I keep trying to solve this problem using coreimage kernels and notgetting the results I am looking for. I keeplooking for "grayish"and attempting to find either the correct colororthe correct gray.There is nothing linear about the LEGO colorsand"grayish" is verysubjective Given a set of 12 arbitrary colors, with fixedHBS, how would Icolor match an image? Any thoughts would be appreciated. Cheers, Dave On Jan 13, 2008, at 12:40 PM, StephanieGiovanniniwrote:Hello, I am nearly done with a composition but I amstuck solving a colormatching problem. I want to apply a palette of12fixed colors(intensity, luminosity, saturation, etc allpredetermined) to animage. The palette includes 3 greys. ColorMapseems to be closebut not quite. What should I be using? Cheers, Dave _______________________________________________ Do not post admin requests to the list. Theywillbe ignored.Quartzcomposer-dev mailing list([email protected]) Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/quartzcomposer-dev/dsjove%40mac.comThis email sent to [EMAIL PROTECTED]_______________________________________________ Do not post admin requests to the list. Theywillbe ignored.Quartzcomposer-dev mailing list([email protected]) Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/quartzcomposer-dev/doktorp%40mac.comThis email sent to [EMAIL PROTECTED]_______________________________________________ Do not post admin requests to the list. They willbeignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/quartzcomposer-dev/the_voder%40yahoo.co.ukThis email sent to [EMAIL PROTECTED]__________________________________________________________Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com _______________________________________________ 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/the_voder%40yahoo.co.ukThis email sent to [EMAIL PROTECTED]__________________________________________________________ Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com _______________________________________________ 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/dsjove%40mac.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/the_voder%40yahoo.co.uk 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/asabatelli%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]

