title: Bilateral filter error, Assertion failed ((src.type() == CV_8UC1 || src.type() == CV_8UC3) && src.data != dst.data)
body: <p>My code is shown in the following:</p>
  
  <pre><code>    Bitmap b = BitmapFactory.decodeResource(getResources(), R.drawable.image1);
      int width = b.getWidth();
      int height =  b.getHeight();
      Mat tmp = new Mat (width, height, CvType.CV_8UC3);
      Mat tmp2 = tmp.clone();
      Utils.bitmapToMat(b, tmp);
      Imgproc.bilateralFilter(tmp,tmp2,10,50,10);
  </code></pre>
  
  <p>and give the following error,</p>
  
  <p>OpenCV Error: Assertion failed ((src.type() == CV_8UC1 || src.type() == CV_8UC3) &amp;&amp; src.data != dst.data) in void cv::bilateralFilter_8u(const cv::Mat&amp;, cv::Mat&amp;, int, double, double, int), file /Volumes/Linux/builds/master_pack-android/opencv/modules/imgproc/src/smooth.cpp, line 3145</p>
  
  <p>May i ask what's wrong with my code, Thanks a lot!!</p>