title: How to put a text in an image in opencv c++
body: <p>I am currently working on my assignment and where I will load an image and display the same image with text in it. The problem is I don't know how to use the putText function.</p>
  
  <p>This is the code I have right now:</p>
  
  <pre><code>cvInitFont(CV_FONT_HERSHEY_SIMPLEX, 1.0, 1.0, 0.0, 1, 8);
  
  cvPutText(img, "You are drinking a lot of water. You may want to cut back.", cvPoint(20, 20), CV_FONT_HERSHEY_SIMPLEX, cvScalar(255, 0, 0));
  </code></pre>
  
  <p>Please help me. Thanks in advance.</p>