I want to smooth the histogram.
So I tried to smooth out the inner matrix cvHistogram.
typedef struct CvHistogram
{
int type;
CvArr* bins;
float thresh[CV_MAX_DIM][2];
float** thresh2;
CvMatND mat;
}
I tried to smooth the matrix as follows:
cvCalcHist( planes, hist, 0, 0 );
(...)
cvSmooth( hist->mat, hist_img, CV_GAUSSIAN, 3, 3, 0, 0 );
Unfortunately, this does not work, because for is cvSmoothneeded CvMatas input instead CvMatND. I could not convert CvMatNDto CvMat( CvMatNDin my case 2-dimensional).
Is there anyone who can help me? Thanks.
source
share