Questions about image intensity

Using LiveCode in research or teaching of post secondary topics? Share your interests with other academics.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
chineduiroanyah
Posts: 1
Joined: Mon Apr 23, 2012 6:32 pm

Questions about image intensity

Post by chineduiroanyah » Mon Apr 23, 2012 6:59 pm

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.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5118
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Questions about image intensity

Post by Mark » Wed Apr 25, 2012 3:58 pm

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
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/livecodebook

philip9
Posts: 3
Joined: Tue Feb 14, 2017 12:22 pm

Re: Questions about image intensity

Post by philip9 » Wed Feb 15, 2017 8:19 am

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.

Post Reply

Return to “Research and Post Secondary”