# Coloring pixels

1. May 27, 2013

### sudu.ghonge

I was working on an image processing project a while ago and was specifically working with raster images in the Hue-Saturation-Value(HSV) image format. Each is determined by mathematical values of these (HSV) parameters. I also worked with other bases such as the Red Blue Green (RGB) format. Now these HSV, RGB and many other image specifying formats are just linear transforms of each other (right?).

My question is this: to specify a color of a particular region on a screen, just two values should suffice: Wavelength( or frequency) and intensity. Where does the 3rd independent parameter come in?

Last edited: May 27, 2013
2. May 27, 2013

### Staff: Mentor

Colors that we perceive can be a mix of several "single wavelength" colors.

3. May 27, 2013

### sudu.ghonge

And adding just one more parameter covers that up?

4. May 27, 2013

### Staff: Mentor

Apparently it does. Our "hardware" recognizes the color using RGB system (see http://en.wikipedia.org/wiki/Cone_cell), and the system we use for image displaying is designed to fool our eyes.

There is probably more to that, but basically if the evolution selected RGB system for eyes, it must be a reasonably effective approach.

5. May 27, 2013

### Bobbywhy

This website may help:
The Hue/Saturation/Value model was created by A. R. Smith in 1978. It is based on such intuitive color characteristics as tint, shade and tone (or family, purety and intensity). The coordinate system is cylindrical, and the colors are defined inside a hexcone.

The hue value H runs from 0 to 360º.

The saturation S is the degree of strength or purity and is from 0 to 1. Purity is how much white is added to the color, so S=1 makes the purest color (no white).

Brightness V also ranges from 0 to 1, where 0 is the black.

http://www.cs.rit.edu/~ncs/color/t_convert.html

6. May 27, 2013

### sudu.ghonge

So wave theory and color theory are two completely different models. Its like looking at say, a computer from two perspectives: As an electronic device and a turing machine.

7. May 27, 2013

### Staff: Mentor

I am not sure if I like your analogy, but I definitely agree with the first phrase

8. May 27, 2013

### Bobbywhy

Is there a question contained within your post number six?

9. May 27, 2013

### Staff: Mentor

I think he just summarized what was posted.

10. May 27, 2013

### someGorilla

No. How could H=0° and H=360° give the same RGB values if it were linear?

How can you represent white with wavelength and intensity? Or even magenta?

11. May 28, 2013

### sudu.ghonge

Okay, so not linear then. More like Polar? Involving sine and cosine relationships?

Yeah, Borek pointed that out. I guess looking from the point of view of the wave theory, a function describing the relationship between Intensity and frequency can describe a pixel's color. I guess the confusion can be erased by realzing that the wave model applies to all wavelengths- both visible aas well as those not visible to humans. The color theory model is limited to the perception power of the rod and cone cells.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook