title: OpenCV Python count pixels
body: <p>I'm working with a little project with application of <code>OpenCV</code> and I'm stuck with something that I don't know how to implement. Suppose I have an image (<code>1024x768</code>). In this image there is a red bounding box at the center.</p>
  
  <p>Is it possible to count the pixels inside the red box using <code>OpenCS</code>? given that the image is <code>1024x768</code> in dimension.</p>
  
  <p>I tried to use bounding rectangle by thresholding the red color and tried using <code>convexhull</code> but then I can't extract how many pixels are inside the red marker.</p>
  
  <p><a href="https://i.stack.imgur.com/FjPmn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FjPmn.png" alt=""></a></p>