title: How can I delete small objects by using bwareaopen?
body: <p>I have an image and I want to delete black pixels which are on the big white objects. I use <code>bwareaopen(BW,P)</code> function but it deletes only hole objects not black pixels on them. I tried for different <code>P</code> values but again fail.</p>
  
  <p>Why <code>bwareopen</code> cannot delete the black pixels on white objects and how can I delete them?</p>
  
  <p>The image:</p>
  
  <p><img src="https://i.stack.imgur.com/ZKY5o.jpg" alt="enter image description here"></p>