PDA

View Full Version : Intensity



guest
09-14-2001, 02:22 PM
Hi Guys,

Had a quick question.. Is Intensity and Alpha the same thing ?? I mean is A in RGBA the intensity valuse of the color.

Thanks

zed
09-14-2001, 03:08 PM
no, intensity is different

guest
09-14-2001, 03:20 PM
Originally posted by zed:
no, intensity is different

Thanks, Thats what I thought too.. But wasnt sure http://www.opengl.org/discussion_boards/ubb/smile.gif
The other question that I have is How do I pass the intensity to an image without changing its color. Can you please help me with that ???

Thanks

DaViper
09-15-2001, 05:41 AM
Intensity and Color are directly related, so you can't change one without changing the other.

It might help if you would explain exactly what you want to do.

Greetz
Chris

john
09-16-2001, 05:30 PM
Hello,

you CAN change colour without changing intensity, but you CANNOT change intensity without also changing the colour.

(colour space is 256^3 and intensity space is 256^1, so there is many more mapping of colour space to intensity than vice versa).

cheers,
John

guest
09-17-2001, 12:15 PM
I agree to the fact that We cannot change the intensity without having a change in color. However as you have mentioned the intensity being 256^1, I have a Intensity lut (table) that has 1024 values.
The thing that I am trying to get done is : I have a image and I have a [256^3] array of color. This array I use as my color lookup table. At the same time I also have a [256^1]array which I have to use for Intensity. So basically I have to pass this image not only through the Color Lookup but also through the intensity.
I am using glColorTableSGI (EXT) for my Color lookup. However I am really confused as to what has to be used for my intensity lookup. Can I use the same Extension, or do I have to use glPixelMap or I really dont know what.. http://www.opengl.org/discussion_boards/ubb/frown.gif Too much confusion.
Do let me know If anyone has a clue what so ever about this and can help me with this problem.
Thanks

guest
09-17-2001, 12:19 PM
Originally posted by guest:
I agree to the fact that We cannot change the intensity without having a change in color. However as you have mentioned the intensity being 256^1, I have a Intensity lut (table) that has 1024 values.
The thing that I am trying to get done is : I have a image and I have a [256^3] array of color. This array I use as my color lookup table. At the same time I also have a [1024^1]array which I have to use for Intensity. So basically I have to pass this image not only through the Color Lookup but also through the intensity.
I am using glColorTableSGI (EXT) for my Color lookup. However I am really confused as to what has to be used for my intensity lookup. Can I use the same Extension, or do I have to use glPixelMap or I really dont know what.. http://www.opengl.org/discussion_boards/ubb/frown.gif Too much confusion.
Do let me know If anyone has a clue what so ever about this and can help me with this problem.
Thanks
The intensity array is 1024 ^1

guest
09-19-2001, 02:14 PM
Hey John,

Just want to know If I have a 256^1 intensity space .. How can I map it to the 256^3 color space.

Thanks in advance

john
09-19-2001, 03:07 PM
Howdy,

er, I'll need to think about your earlier posts. I read them and thought "hmm. I'll think about this later", and prompty forgot about them =)

But! In order to answer your most recent post, then... well, there's (256^3)/(256^1), or 256^2 ways of mapping intensity space to colour space. At least, I think there is. <scratches head> Something like that, anyway.

To clarify; intensity is the perceived 'brightness' of the colour, right? There are a number of ways to compute that. Three ways that I can think of right now are; the average of the RGB triplets; the distance of a colour from white; some kind of combination of S & V from the HSV colour space. The first is easiest to talk about right now, so I'll use that as an example.

If you've got some input colour such as <255, 0, 0>, then its 'intensity' is going to be 255/3, or 85, right? Now, going the other way; if I asked you for a colour with intensity of 85, what answer can you give? In fact, any of these RGB triplets would give the same intensity using the RGB average model:

<255, 0, 0>
<0, 255, 0>
<0, 0, 255>
<85, 85, 85>
<10, 20, 225>
<255, 10, 20>
... and so on

in fact, there's a lot of colours that'd map to intensity 85.

My point being.. the problem is possibly ill=defined. Maybe you want to find a grey value that has the same intensity? That's easy to do; just map 100% intensity to white, 0% intensity to black, and linearly map everything else. OpenGL can do this for you, tho' (with its GL_ILLUMINANCE thing).

I hope this helps!

cheers,
John

zed
09-19-2001, 04:20 PM
perhaps of help is

Gamma and Color FAQs by Charles A. Poynton has
ftp://ftp.inforamp.net/pub/users/poynton/doc/colour/
http://www.inforamp.net/~poynton/