getGaussianKernel(int ksize, double sigma, int ktype=CV_64F )
ksize – Aperture size. It should be odd ( \texttt{ksize} \mod 2 = 1 ) and positive.
sigma – Gaussian standard deviation. If it is non-positive, it is computed from ksize as sigma = 0.3*((ksize-1)*0.5 - 1) + 0.8 .
ktype – Type of filter coefficients. It can be CV_32f or CV_64F .
int M = 101;
double sigma = 10;
Mat_ g = getGaussianKernel(M, sigma, CV_64F);
for(int i=0; i
{
double g1 = g(i,0);
Dbg("%f", g1);
}
Mat_ 접근
// more convenient forms of row and element access operators
_Tp* operator [](int y);
const _Tp* operator [](int y) const;
_Tp& operator ()(int row, int col);
const _Tp& operator ()(int row, int col) const;
_Tp& operator ()(Point pt);
const _Tp& operator ()(Point pt) const;
template
void printMat(const cv::Mat_<_tp>& mat) {
typedef typename DataType<_tp>::work_type _wTp;
for(int i = 0; i < mat.rows; i++)
for(int j=0; j < mat.cols; j++)
cout << (_wTp) mat(i,j) << " ";
cout << endl;
}
댓글 없음:
댓글 쓰기