How to decide the area bounded by contour, but only the ones whose centroid have been decided?
3 views (last 30 days)
I have a stack of binary images just like the frame I've shown above. I'm tracking the movement and size of the clusters. I did the tracking in another program, ImageJ. Because I tracked the movement with certain criteria (the cluster must exist for at least 8 consecutive frames to be recorded), many of the visible clusters in this frame are actually discarded in my tracking process. In the end, I have the location of the centroids in every frame.
However, I am also interested in the sizes of the clusters. MATLAB's built in Image Region Analyzer is no good because many of the clusters have been discarded during the tracking process. Is there a way to measure the area of the regions enclosed by outlines whose centroids are calculated? In other words, regions of interest are only the ones noted by my centroids.
Shashwat Bajpai on 6 Aug 2019
Edited: Shashwat Bajpai on 6 Aug 2019
I would also use regionpropsto get the statistics of the binary image. The following lines of code find the area of all the centroids found by regionprops.
s = regionprops(im,'centroid');
centroids = cat(1,s.Centroid);
ar = regionprops(im,'area');
For your application you can feed the centroids found by your algorithm to this function and get the areas of the corresponding clusters.
Hope this helps!
You can refer to the documentation for regionprops for further information about its properties: