Page 1 of 1

Questions about image intensity

Posted: Mon Apr 23, 2012 6:59 pm
by chineduiroanyah
Good day all,
I am a final year computer Science student doing a project that involves image processing using java which am totally new to, and I have been faced with a major challenge. i have been able to get 2 dimensional arrays of the red, green and blue values for each pixel in an image.how can i calculate the mean grey intensity of the image from these arrays? please I would be most grateful if anyone could be of help.

Re: Questions about image intensity

Posted: Wed Apr 25, 2012 3:58 pm
by Mark
Hi,

Although this isn't a Java forum, maybe I can help. There are many ways to calculate the "grayness" of a colour value. This website proposes one that seems pretty simple. Another possibility is to convert RGB to HSV and use the V value for brightness. The latter is what Color Converter does. If you want a different method, just look for other solutions on the internet. They are everywhere.

Kind regards,

Mark

Re: Questions about image intensity

Posted: Wed Feb 15, 2017 8:19 am
by philip9
Seems to me that it is simply be the sum of all the r,g, b values for the all the pixels, divided by the number of pixels divided by 3.