필터 지우기
필터 지우기

how to find intensity of a gray image?

조회 수: 12 (최근 30일)
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2013년 5월 4일
댓글: Prashanth J 2023년 3월 10일
how to find intensity of a gray image?
  댓글 수: 1
Prashanth J
Prashanth J 2023년 3월 10일
Hi. You posted the solution to your problem in the following link.
The link is not working now. Can you please share the same if you have a copy.
Thank you

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2013년 5월 4일
It depends on what you mean by intensity. I know you've been working, and instructing students at your university, long enough in the image processing field that you know how to take a histogram:
% Let's compute and display the histogram.
[pixelCount, grayLevels] = imhist(grayImage);
subplot(2, 2, 2);
bar(pixelCount);
grid on;
title('Histogram of original image', 'FontSize', fontSize);
xlim([0 grayLevels(end)]); % Scale x axis manually.
and I know that you know how to get the overall mean of the image:
meanGrayLevel = mean2(grayImage);
I know you already know all that. So now we need to have you explain what you mean by "intensity". What you (and most others) may not know is that the units of a standard optical image are NOT intensity. They're lumens-seconds, a form of visible energy. Why? Think of lumens like watts, but just in the visible wavelength. So it's like energy per second. Because you have Lux (lumens per square meter) at the sensor (CCD), and you integrate that over the area (square meters) of a pixel and over time (seconds), then the units are lumen-seconds, kind of like a visible energy. See this for further discussion.
Now, intensity is an SI base unit along with meter, second, ampere, kelvin, mole, and kilogram. Its units are candela. You can not get the luminous intensity of an image - it doesn't make sense. It is a characteristic of the light source, not a surface with light incident on it. Wikipedia goes into a great amount of detail on all these units.
Anyway, we're back to what you mean by intensity. The mean gray level and histogram are too trivial (and you already know those), so please explain exactly what you mean.
  댓글 수: 7
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2019년 8월 28일
declare FontSize variable at the beginning itself
Image Analyst
Image Analyst 2019년 8월 28일
And, of course, you'll also need to create the grayImage variable. Usually with imread(), like
grayImage = imread(fullFilename);
where you also have to create fullFileName before that by assigning it to the name of your file, like
fullFileName = c:\whatever\myRGBimage.png' % or whatever it is.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by