MATLAB: How to find mean pixel value of a circle and standard deviation of pixels outside the circle.

Image Processing Toolboximage segmentationimprofile averagemean pixel valuestandart deviation of pixelsstandart deviation...

Hello,
I am taking my first steps in Matlab and I would like to ask you how can I calculate the signal to noise ratio of a circle inside my image. SNR=mean pixel value of bead (circle) divided to standard deviation of pixels outside the bead. I have uploaded my image.
Furthermore, I would appreciate if you could explain me how can I get the average of 10 improfiles which cover my whole bead and plot it.
So far I managed to take 10 different improfiles (from the center of the bead till the edges for each circle) and plot the respective intensities over the distance. Now I want to average all these (for each circle) and plot the average signal(intensity). I don't know whether this is called something like polar representation?
Thank you very much in advance.

Best Answer

See the FAQ to make a circle mask:
Then get the measurements inside the circle like this:
meanInsideCircle = mean(grayImage(circleMask));
sdInsideCircle = std(grayImage(circleMask));
sdOutsideCircle = std(grayImage(~circleMask));
SNRinside = meanInsideCircle / sdInsideCircle; % Uses SD inside circle.
SNRoutside = meanInsideCircle / sdOutsideCircle; % Use SD outside circle.
Try this to get the average profile:
averageProfile = (profile1 + profile2 + profile3 + profile4 + profile5 + profile6 + profile7 + profile8 + profile9 + profile10)/10;
Related Question