Matlab image centroid simulation
3 views (last 30 days)
Show older comments
Hi, I was given this task, I am a noob and need some pointers to get started with centroid calculation in Matlab:
Instead of an image first I was asked to simulate a Gaussian distribution(2 dimensional), add noise(random noise) and plot the intensities, now the position of the centroid changes due to noise and I need to bring it back to its original position by -clipping level to get rid of the noise, noise reduction by clipping or smoothing, sliding average (lpf) (averaging filter 3-5 samples ), calculating the means or using Convolution filter kernel - which does matrix operations which represent the 2-D images
2 Comments
Image Analyst
on 24 May 2013
Is the Gaussian distribution in the intensity dimension or the lateral dimensions. If it's in the intensity dimension you have a "uniform" image but the intensity of each pixel has noise, like 180 +/- 30 or something like that. If it's Gaussian in the lateral spatial dimensions, then the image will be brighter at the middle (or somewhere) of your image and then get darker as it goes away from that point.
Answers (1)
Image Analyst
on 30 May 2013
You would need some pretty large noise to shift the mean because it clipped. But what I would do is to identify the 255 pixels or the 0 pixels and calculate the mean of the image without those pixels:
clippedPixels = grayImage == 0 | grayImage == 255;
meanGrayLevel = mean(grayImage(~clippedPixels));
Assuming there are enough noise pixels left that are not clipped, that will give you your answer.
0 Comments
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!