title: Is it safe to use the same variable as input and output in C++ OpenCV?
body: <p>A lot of OpenCV functions are defined as</p>
  
  <pre><code>function(InputArray src, OutputArray dst, otherargs..)
  </code></pre>
  
  <p>So if I want to process and overwrite the same image, can I do this: </p>
  
  <pre><code>function(myImg, myImg);
  </code></pre>
  
  <p>is it safe to do this way?</p>
  
  <p>Thanks</p>
  
  <h2>Edit:</h2>
  
  <p>I'm asking for the standard functions in OpenCV like <code>threshold</code>, <code>blur</code> etc. So I think they should have been implemented accordingly, right?</p>