MATLAB: Show the position of centroids on the image

findregionprops

I have a binary image, BW and a grayscale image, I. I want to select only regions in the binary image with the same value that have an area > 50. for example there are 50 regions with area>50 and BW==1. I wonder how to show the position of the centroids of these regions with their number (1:50) on the image. Any suggestion?

Best Answer

Size filtering and finding and displaying centroids is done in my demo "BlobsDemo" as well as some other useful things.