Link to home
Create AccountLog in
Avatar of cbodapati
cbodapati

asked on

how to calculate histogram for RGB-28 bit, bmp file

Im trying to understand how to calculate the image histogram for the RGB-24 bit, .bmp file.

Any help appreciated!

Thanks,
Srikanth.
Avatar of Markus Fischer
Markus Fischer
Flag of Switzerland image

I'm not sure were the question lies. I'm assuming you know how to read a bmp file, and know how to obtain the colour code for each pixel. Each pixel has one of 16M colours (2^16), as three RGB values among 256 (2^8).

You probably do not want the histogram over 16M, but either three histograms (one for each component -- for colour correction), or one histogram over another value (saturation, luminosity, or hue, for other types of image correction).

Do you need help in "calculating an histogram" (any histogram), do you need to learn how to manipulate colours in general, or do you need help with the bmp format?

(°v°)
Avatar of cbodapati
cbodapati

ASKER

Hi Harfang,

The title has a typo mistake.
can i edit the title.

It "how to calculate histogram for RGB-28 bit, bmp file" but it should be "how to calculate histogram for RGB-24 bit, bmp file".

I understand the bmp reading and writing.

I want to learn to edit the image in terms of brightness, conrtast, sharpness...etc
Im sorry if the question is wrong!

Please suggest me the right direction. and any links which can help me!


Thanks,
Srikanth.
ASKER CERTIFIED SOLUTION
Avatar of Markus Fischer
Markus Fischer
Flag of Switzerland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Avatar of Jose Parrot
Jose Parrot
Flag of Brazil image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ooops, please aplpy the fix:
"Please note, the horizontal scale of the histogram is the pixel value (from 0 to 255) and the VERTICAL scale is the number of pixels of each value. "
instead of
"Please note, the horizontal scale of the histogram is the pixel value (from 0 to 255) and the horizontal scale is the number of pixels of each value. "

Jose
a nice set of links for image preocessing functions:
      http://www.efg2.com/Lab/Library/Delphi/Graphics/ImageProcessing.htm
or
      http://www.delphi-treff.de/tutorials/grafik-und-spiele/bitmaps/ 
      (with all the basic algos for image processing; easy ti understand and port to other languages)
Thanks very much for your support.