how to join points obtained by "imregionalmax" function?

1 view (last 30 days)
Hi All...
I am trying to find center to edge distance of lath structures indicated in black represented in the below image
https://picasaweb.google.com/116243239493929305987/ImageAnalysis02#5691495061279679666 my idea s to find the centers by distance mapping, draw a line joining those points, draw perpendiculars from those lines and find the lengths of those perpendiculars. I have found the peak intensity points using the "imregionalmax" function. Can you suggest a method to join these points in each black laths so that I get an output of something like below,
https://picasaweb.google.com/116243239493929305987/December292011#5691497323268999938 my aim is to capture the distribution of these perpendiculars and their lengths so that I can get an idea of how smooth the laths are.. If within a specified distance, the length of perpendicular lines varies too much, I assume that the laths are very rough. the code for finding points is given below. ... or is there a better method of doing this ??
Thanks in advance
Shanoob
%---------------------------------------------------------------------
% Read the image and convert to BW mask of peaks
I_orig = imread('1000C_10-2_40%_032-sr.bmp');
I = rgb2gray(I_orig);
BW_peaks = im2bw(I);
% How far is every non-peak pixel from its nearest peak?
distFromPeaks = bwdist(BW_peaks);
% pixels further from a peak than any of its neighbours
maxDistsMask = imregionalmax(distFromPeaks);
[trI,trJ] = find(maxDistsMask);
% Display what we've got:
I_norm = double(I)/double(max(I(:)));
figure, imshow(cat(3,I_norm,max(BW_peaks, I_norm),I_norm)), hold on
plot(trJ,trI,'.')

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!