MATLAB: Can I make bwareafilt keep any ties for n-th place

bwareafilt()image processingImage Processing Toolbox

I've been using bwareafilt, but keep getting warnings that there are ties for n-th place, and that the ties were not selected. Is there any way to make it keep any ties for n-th place?

Best Answer

Please post your binary image where this happens. Also state the criteria where you'd delete one. For example, if you take the two largest blobs and they are both exactly 10,000 pixels and it keeps them both, then do you just want to randomly select one for deletion? Or just delete the one on top (or left, right, bottom)?
Related Question