title: Histogram of a region of an image
body: <p>I want to get the histogrm of a region in a numpy image in python. I found a solution on how to use a mask <a href="https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_histograms/py_histogram_begins/py_histogram_begins.html" rel="nofollow noreferrer">here.</a></p>
  
  <p>this solution didnt help me because if i use it I will loose the real number of black pixels. Also, the region that i want to get is not necessarly rectangular. </p>