フィルターのクリア

how to find the brightness of an image?

36 ビュー (過去 30 日間)
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2012 年 9 月 23 日
コメント済み: Image Analyst 2019 年 10 月 12 日
how to find the brightness of a particular part of an image? and how to find the brightness of an entire image?

回答 (2 件)

Walter Roberson
Walter Roberson 2012 年 9 月 23 日
If brightness is luminance, rgb2gray() the portion of the image.

Image Analyst
Image Analyst 2012 年 9 月 23 日
How do you define brightness? Is it just the mean? How about
brightness = mean2(yourImage);
or
brightness = mean2(yourImage(row1:row2, col1:col2));
  2 件のコメント
Shaun Roberts
Shaun Roberts 2019 年 10 月 11 日
Hi Image Analyst,
I am looking to expand the features so I can run an analysis of low level features to see if they can be used for video recommendation.
The first one I have been looking at is Brightness mean would it be possible to work this into your current example?
Image Analyst
Image Analyst 2019 年 10 月 12 日
The program does compute the brightness of the gray scale version as well as each of the color channels. You can find this code in there:
% Calculate the mean gray level.
grayImage = rgb2gray(thisFrame);
meanGrayLevels(frame) = mean(grayImage(:));
% Calculate the mean R, G, and B levels.
meanRedLevels(frame) = mean(mean(thisFrame(:, :, 1)));
meanGreenLevels(frame) = mean(mean(thisFrame(:, :, 2)));
meanBlueLevels(frame) = mean(mean(thisFrame(:, :, 3)));

サインインしてコメントする。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by