Numbering bubbles and extract centers

2 vues (au cours des 30 derniers jours)
Mandar Badve le 21 Fév 2017
Commenté : Mandar Badve le 23 Juin 2017
I have a 2D image of bubbles (all connected to each other). I want to number each bubble seperately, compute its area and locate centre of each bubble along with its co-ordinatres. Can I do it with standard flood fill algorithm? attaching skeletonized image for reference.
0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

Réponse acceptée

KSSV le 1 Mar 2017
Modifié(e) : KSSV le 1 Mar 2017
You can count the number of closed regions using bwlabeln.
I = rgb2gray(I) ;
[L,num] = bwlabeln(I,6) ; % num gives you closed region
m = regionprops(L) ; % measurements of regions, gives centers of the regions
imshow(I)
hold on
for i = 1:num
c = m(i).Centroid ;
plot(c(1),c(2),'*r') ;
end
num gives you the number of closed regions. You can view them using vislabels(L). Download the function vislabels from here .
3 commentairesAfficher 1 commentaire plus ancienMasquer 1 commentaire plus ancien
KSSV le 1 Mar 2017
Modifié(e) : KSSV le 1 Mar 2017
Just curious...May I know what image is this? What is the application?
Mandar Badve le 23 Juin 2017
Is it possible to estimate velocity of the bubbles once I extract centres from the images? By analysing successive frames? Or is there any way to track shapes between successive frames to estimate velocities?

Connectez-vous pour commenter.

Plus de réponses (1)

Abel Babu le 24 Fév 2017
Hi Mandar,
Here is a MATLAB example that describes how to find circles in a given image:
It uses the ' imfindcircles ' function that internally uses Hough Transform to compute both center and radii of a circle. Here is the documentation for the same:
Abel
0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

Catégories

En savoir plus sur Morphological Operations 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!

Translated by