Identify neighbours in image after finding regionprops centroids
Show older comments
I have an example image with different RGB color values. I have used ColorThresholder to create a mask to get every different RGB color and then used regionprops (extrema and centroid) to get the corner points and centroids of each shape. I would now like to calculate the distance between neighbouring centroids and corner points. In other words, I would like to store the data in such a way that it is clear that the yellow and green squares are connected to the black one and that I can thereby easily calculate the distance between those centroids. What is the best way to store the data after using regionprops to be able to achieve this?
Any help or suggestion will be appreciated.
Accepted Answer
More Answers (0)
Categories
Find more on Region and Image Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!