title: How to count number of included/excluded white circles in an overlaid binary image?
body: <p>I was wondering if there is an available method or existing function that can do this proposed problem.</p>
  <p>I create two binary image maps showing different criteria from the same parent image.</p>
  <p>For one criteria, I created a binary image that contains coordinates represented by white circles.  As shown below:</p>
  <p><a href="https://i.stack.imgur.com/v4aG9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v4aG9.png" alt="small white circles binary image" /></a></p>
  <p>For the other criteria, I have another binary image that shows a blob or region of interest also highlighted in white. However, the region isn’t always unanimously white, where there may be tiny dark spots/areas in this region or even multiple regions of blobs.</p>
  <p><a href="https://i.stack.imgur.com/GcuZE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GcuZE.png" alt="contour/blobs binary image" /></a></p>
  <p>Both binary maps are from the same image and can be overlaid one another.</p>
  <p>I basically want to know how to count the number of circles from the first binary image, that were included or excluded in the white regions from the second binary image.</p>
  <p>I’m not really sure how to solve this problem and was wondering if anyone has any robust solutions?</p>
  <p>I was considering perhaps counting the number of circles/blobs/single blocks of white pixels of a certain size in both binary images. And then from the overlaid image, counting the number of obvious circles (of a certain size) outside of the significant blobs and labelling them as “excluded”, however this may not be robust if regions from the second binary image are the same size (or smaller) than the circles in the  first binary image.</p>