
how to get the cooridinate of the lowest point on the circumference of an area in image processing?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Anjan Goswami
le 1 Mai 2020
Commenté : Ameer Hamza
le 1 Mai 2020
I have to find the lowest point on the circumference of the droplet in the attached image. The droplet shape can be circular/oblate/prolate. So how can I find the coordinate of the lowest point on the drop circumference?
0 commentaires
Réponse acceptée
Ameer Hamza
le 1 Mai 2020
Try this code
im = imread('droplet.png');
im_gray = rgb2gray(im);
im_bin = imbinarize(im_gray);
regions = bwconncomp(im_bin);
PxlList = regions.PixelIdxList{2}; % first list is for white region on edges
[r,c] = ind2sub(size(im_bin), PxlList);
[lowest_y, idx] = max(r);
lowest_x = c(idx);
imshow(im_bin)
hold on;
plot(lowest_x, lowest_y, 'r+', 'LineWidth', 2, 'MarkerSize', 10);

2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Image Processing Toolbox 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!