title: Number of non-zero pixels in a cv::RotatedRect
body: <p>as the title says i'm trying to find the number of non-zero pixels in a certain area of a cv::Mat, namely within a RotatedRect.</p>
  
  <p>For a regular Rect one could simply use countNonZeroPixels on a ROI. However ROIs can only be regular (non rotated) rectangles. </p>
  
  <p>Another idea was to draw the rotated rectangle and use that as a mask. However openCV neither supports the drawing of rotated rectangles nor does countNonZeroPixels accept a mask.</p>
  
  <p>Does anyone have a solution for how to elegantly solve this ?</p>
  
  <p>Thank you !</p>