using code
[B,~]=bwboundaries(I, 'noholes');
I got the list of boundaries in B. now by some criteria, I have selected B(2). So, now I want to delete all the objects in the image from B(1) to B(n) except B(2). How it can be done?
bwboundariesimage processingImage Processing Toolbox
[B,~]=bwboundaries(I, 'noholes');
Best Answer