From: sanjay on 25 Apr 2010 09:37 Dear all, I have a binary image which is thinned and then I found centroid for each connected component, Then I specify some radii considering centroid as origin. How to find whether white pixel exist within that radii having centroid as the origin in matlab. I am sending code for thinning and for finding centroid. pls help I am new to matlab. r = 0.02; t = bwmorph(bw, 'thin',Inf); figure,imshow(t);title('thinned image'); [L, n] = bwlabel(t); hold on for k = 1:n [r,c] = find(L == k); rbar = mean(r); cbar = mean(c); plot(cbar,rbar, 'g.'); hold off
From: ImageAnalyst on 25 Apr 2010 10:31 You obviously have the Image Processing Toolbox so you can just use regionprops after you label the image to get the centroids. See my demo if you want an example: http://www.mathworks.com/matlabcentral/fileexchange/25157
|
Pages: 1 Prev: Evaluating performance of registered image Next: HELP - Newton's Method |