How can I automate Matlab to measure specific regions in an image?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Muhamed Sewidan
le 24 Déc 2019
Commenté : Muhamed Sewidan
le 27 Déc 2019
I want to make Matlab to measure these distances (red lines) automatically for every image I insert it. These measured distances will be introduced in an equation to measure some parameter. Is this possible? ![fringes.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/257060/fringes.jpeg)
![fringes.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/257060/fringes.jpeg)
0 commentaires
Réponse acceptée
Image Analyst
le 24 Déc 2019
I would go down each line of your binary image getting the centroids.
[rows, columns] = size(binaryImage);
xCentroids = zeros(rows, 8); % for the 8 blobs.
for row = 1 : rows
props = regionprops(binaryImage(row, :), 'Centroid')
xy = vertcat(props.Centroid);
xCentroids(row, :) = xy(1:8:, 1)
end
To find the bumps, you might call bwmorph(binaryImage, 'skel', inf) and then call regionprops again with the row number where the bumps are known to appear, assuming they're in the same place (row) each time.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Image Segmentation and Analysis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!