MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply TodayTo resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Asked by Sivakumaran Chandrasekaran on 4 May 2013

how to find intensity of a gray image?

Answer by Image Analyst on 4 May 2013

Accepted answer

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.**

Sivakumaran Chandrasekaran on 4 May 2013

Thanks Image Analyst . I got the exact answer from your reply only... http://www.mathworks.in/matlabcentral/newsreader/view_thread/269505.... I completed my task and it works well.

Jurgen on 4 May 2013

Intensity was W/m^2 in my old high school physics problems. Though the better word is irradiance. Only use intensity when it is absolutely clear what you mean. For power per solid angle use prefix radiant, or prefix luminous for lumen.

I would guess he means luminous energy (lm.s). In which case the exposure time can be factored out to get lumen. Then divide by the area of a pixel to get illuminance. If you also know the spectral composition of the source you can even calculate backwards to get the irradiance per pixel.

## 0 Comments