title: How to call cvMorphologyEx in openCV in c++?
body: <p>i need to call cvMorphologyEx in my image processing project and i do it using this line.</p>
  
  <pre><code>cvMorphologyEx(src1,dest1,NULL,NULL,CV_MOP_OPEN);
  </code></pre>
  
  <p>It compiles fine but while running it gives me this error</p>
  
  <blockquote>
    <p>OpenCV Error: Bad flag (parameter or structure field) (Unrecognized or unsupport
    ed array type) in unknown function, file ........\ocv\opencv\src\cxcore\cxarr
    ay.cpp, line 2476</p>
  </blockquote>
  
  <p>I am sure the problem is in the third and fourth arguments but the documentation says that they are optional.</p>
  
  <p>If you need anymore details please tell me.</p>
  
  <p>Thanks,</p>
  
  <p>Bye</p>