Clean up noisy thresholded binary data

Result: before and after

_images/threshold.png _images/abs_label.png

Step 1: de-noise original dataset

usually do a default gaussian, OR median filter

_images/gaussian.png _images/median.png

Step 2: threshold and de-noise binary dataset

  1. thresholding: I used interactive thresholding, the left side value ( a small number slightly > 0) somehow didn’t show in the property panel, I attach the result as threshold.png, more or less look like that.

    _images/interactiveThreshold.png
  2. apply majority filter 9x9 in xy plane

    _images/majorityFilter.png
  3. remove small spots 80 pixels, xy plane

    _images/removeSpot.png
  4. remove small holes, 60 pixels, xy plane

    _images/removeHole.png