MATLAB: Choosing locations in an image to take pixels

digital image processingImage Processing Toolbox

Hello,
If I take an image and I want to do an average of the pixels across the entire image, how do I do that? Right now when I do imshow(image) then it gives me locations where I click on the image. I just want to do the entire image.
Thanks

Best Answer

meanGrayLevel = mean(grayImage(:)); % Take mean of entire image.