title: How to put text into a bounding box in OpenCV?
body: <p>I know how to pass putText position and font size:</p>
  
  <pre><code>void TextBox( cv::Mat &amp; img, const std::string &amp; text, const cv::Rect &amp; bbox )
  {
      cv::Point position;
      double size;
      int face = CV_FONT_HERSHEY_PLAIN;
      Trick( /*in:*/ text, bbox, face /*out:*/ position, size );
      cv::putText( img, text, position, face, size, cv::Scalar( 100, 255, 100 ) );
  }
  </code></pre>
  
  <p>How to do the trick?
  I would like to scale text to fit its bounding box.
  (Font face might be unused input to that.)</p>