MATLAB: I need a function that acts like a function bwareaopen(BW, P) but the amount P to remove larger

~bwareaopen(bwp

~bwareaopen(BW, P)

Best Answer

https://www.mathworks.com/help/images/ref/bwareafilt.html