Link to home
Start Free TrialLog in
Avatar of Bilce
Bilce

asked on

Greyscale or not

hi .. everyone ...
i have a problem here about the algorithm
for classifiying an image into grayscale
image and not. And if there is Delphi
source code please tell me ok ...

Regards,
Billy
Avatar of robert_marquardt
robert_marquardt

Now what IS the problem?
A picture is grayscale if for all pixels the R, G and B values are the same.
Making a colored picture grayscale is calculating the brightness of the pixel. A formula which i do not know.
That is for each pixel R, G and B value of this pixel has to be the same.
to convert from color to greyscale:

brightness = (R + G + B) / 3

set R, G, and B to the value in brightness

ASKER CERTIFIED SOLUTION
Avatar of edey
edey

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks edey for that HSV formula.  I used it and did notice an improvement.
Excellent, Glad to be of service :)

Gl
Mike