MATLAB: Image Intensity

Image Processing Toolboxintensity

Hi all, Can any one tel me the command in matlab to calculate the intensity of image.

Best Answer

The mean of a particular pixel is just simply the pixel value, since there is only one sample - nothing really to take the mean of:
intensityValue = grayImage(100, 230);
meanIntensityValue = mean(grayImage(100, 230));
Here, of course meanIntensityValue will equal intensityValue.
To get the mean of all the pixel values in the entire image, you can do any of these:
meanIntensityValue = mean2(grayImage);
meanIntensityValue = mean(grayImage(:));
meanIntensityValue = mean(mean(grayImage));
Related Question