title: How to smooth a histogram?
body: <p>I want to smooth a histogram.</p>
  
  <p>Therefore I tried to smooth the internal matrix of <code>cvHistogram</code>.</p>
  
  <pre><code>typedef struct CvHistogram
  {
      int     type;
      CvArr*  bins;
      float   thresh[CV_MAX_DIM][2]; /* for uniform histograms */
      float** thresh2; /* for non-uniform histograms */
      CvMatND mat; /* embedded matrix header for array histograms */
  }
  </code></pre>
  
  <p>I tried to smooth the matrix like this:</p>
  
  <pre><code>cvCalcHist( planes, hist, 0, 0 ); // Compute histogram
  (...)
  
  // smooth histogram with Gaussian Filter
  cvSmooth( hist-&gt;mat, hist_img, CV_GAUSSIAN, 3, 3, 0, 0 );
  </code></pre>
  
  <p>Unfortunately, this is not working because <code>cvSmooth</code> needs a <code>CvMat</code> as input instead of a <code>CvMatND</code>. I couldn't transform <code>CvMatND</code> into <code>CvMat</code> (<code>CvMatND</code> is 2-dim in my case).</p>
  
  <p>Is there anybody who can help me? Thanks.</p>