Mean luminance Values of an Image

174 views (last 30 days)
I want to calculate the means luminance value of an image block
i found the formula is..
luminance= 0.3 R + 0.59 G + 0.11 B
but how i can calculate the R, G and B values.
i know that
but it give in the shape of matrix, i think i need only a single value of R,G and B, to use above luminance formula.
please help me out.
Thanks in Advance

Accepted Answer

Walter Roberson
Walter Roberson on 1 Feb 2013
provided you have the toolbox installed.
Otherwise, calculate a luminance array using the R, G, B arrays, and then mean2() the luminance array.
Maria Hernandez
Maria Hernandez on 6 Jul 2017
Thanks for taking the time to answer, Walter =)

Sign in to comment.

More Answers (1)

Rodrigo Souza
Rodrigo Souza on 28 Jan 2019
Hi all,
I have put together three scripts for calculating (mean and SD), matching or normalizing luminance of colored images (using HSV and CIE Lab color spaces).
They may be specially useful for pupillometry measures of infant research.
The scripts and their descriptions are available at my OSF page:
Hope it helps.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by