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.
Questions about image intensity
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Questions about image intensity
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
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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Questions about image intensity
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.