## how to find intensity of a gray image?

### Sivakumaran Chandrasekaran (view profile)

on 4 May 2013
Latest activity Commented on by Image Analyst

on 11 Nov 2015

### Image Analyst (view profile)

how to find intensity of a gray image?

## Products

### Image Analyst (view profile)

on 4 May 2013

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.

Jurgen

### Jurgen (view profile)

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.

iza

### iza (view profile)

on 11 Nov 2015

I think most of people including myself is thinking that image intensity is the gray scale of 0 -255. I also try to find the average 'intensity' of segmented ROI but now I understood it's actually the luminious and (according to above comment) it's impossible to be determined. I just thinking, how to differentiate the segmented ROIs others than by colour,area, ect..

Image Analyst

### Image Analyst (view profile)

on 11 Nov 2015

The gray level of the image is proportional to the illuminance (lux level) of the scene. It does not have units of luminous intensity or lux though. Anyway, you can still segment the image regardless of what the precise definition of the units or their meaning is. See my File Exchange for a number of methods to segment based on color and "intensity". http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862

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