OpenCV 3 bilateral filter function error
<p>When I try to use the OpenCV 3 bilateral filter function </p>

<pre><code>bilateralFilter ( src, dst, 3, 3, 3 );
</code></pre>

<p>I am getting this error:</p>

<blockquote>
  <p>OpenCV Error: Assertion failed ((src.type() == CV_8UC1 || src.type()
  == CV_8UC3) &amp;&amp; src.data != dst.data) in bilateralFilter_8u, file /home/jean/opencv-3.0.0/modules/imgproc/src/smooth.cpp, line 3066
  terminate called after throwing an instance of 'cv::Exception'</p>
</blockquote>

<p>I've already tried to fix the error by using <code>cvtColor(src, src, CV_8UC3);</code> and <code>cvtColor(src, src, CV_8UC1);</code>  but the error persists.</p>

<p>Any tips for solving this?</p>