I have a binary image (attached) with connected components isolated with bwconncomps. I'm trying to identify the outline of each of these components but in a way where I can still refer back to the filled object-(I am using the outline as a mask on a greyscale image to pull some value and then depending on that value performing an operation on the filled original region of interest)
When I run bwconncomps on the attached image I get 814 objects identified. I can run bwmorph(D,'remove'); and I get the outlines/perimeters of the objects but when I run bwconncomps on this I get 827 objects-(not sure where these extra objects are coming from and this screws up my ability to refer back to the filled object based on the value I pull from its' outline).
Basically I need a version of bwmorph(D,'remove') that will leave the same number of connected components as seen in bwconncomps of the original binary image..so that I can compare component #30 in the original binary to the outline of the same #30 in bwconncomps.
Hope this was clear, any suggestions?
Thanks