title: Find mean position of blackpixels using python
body: <p>I have a binary image and I need to find the mean values of x and y of the black region. These values are calculated for a set of binary images and their mean values of x and y are plotted I don't know how to find this region and calculate their mean values of x and y. Any help is kindly appreciated.</p>
  
  <p><a href="https://i.stack.imgur.com/cXWCK.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cXWCK.jpg" alt="enter image description here"></a></p>