RGB to Gray Scale Conversion

Intensity of an image is the average of the three color elements, so the gray scale image that represent the original color image can be computed as:

I0=(Ri+Gi+Bi)/3

Io is the output intensity, Ri, Gi, and Bi are the red, green, and the blue element intensity. The formula for more realistic result is by adding different weight for each R,G, and B element. We normally percept green color brighter that red color, and red color brighter than blue color. That's why we usually set the weight higher for red and higher for green.

Io=(0.299Ri + 0.587Gi + 0.144Bi)/3

Actually there is no absolute reference for each weight values because it depends on the display technology that might change in the future. The above formula is standardized by NTSC (National Television System Committee), and its usage is common in computer imaging.

1 comments:

Paweł said...

shouldn't be rather like than

Io=(0.299Ri + 0.587Gi + 0.114Bi)

http://blogs.techrepublic.com.com/howdoi/?p=120

PS