title: OpenCv copyTo() not working
body: <p>I want to apply masking to an image using copyTo() function of openCv, but masking is not working. I still obtain the same image.</p>
  
  <p>When I searched the web, I saw some suggestions like:</p>
  
  <p>-source and destination images must be different,
   -source image must have type CV_8U, 
   -mask image must have type CV_8U, etc.</p>
  
  <p>I tried all of them, but i could not fix the problem. Moreover, at the official OpenCv website, no such restrictions are mentioned.</p>
  
  <p>Here is a part of my code:</p>
  
  <pre><code>Mat source; //initialized in some way
  Mat mask; // this is also initialized in some way
  
  source.copyTo(source, mask);
  </code></pre>