extended morphological operations to handle arbitrary number of channels and CV_64F type; extended filter2D to handle CV_16S type. added test to check the supported formats; added description of supported formats in various filtering operations.

This commit is contained in:
Vadim Pisarevsky
2012-04-12 12:34:55 +00:00
parent 6d0c022347
commit 1371c96935
5 changed files with 181 additions and 47 deletions

View File

@@ -58,7 +58,6 @@ void crossCorr( const Mat& img, const Mat& _templ, Mat& corr,
int cdepth = CV_MAT_DEPTH(ctype), ccn = CV_MAT_CN(ctype);
CV_Assert( img.dims <= 2 && templ.dims <= 2 && corr.dims <= 2 );
CV_Assert( depth == CV_8U || depth == CV_16U || depth == CV_32F || depth == CV_64F );
if( depth != tdepth && tdepth != std::max(CV_32F, depth) )
{
@@ -74,7 +73,7 @@ void crossCorr( const Mat& img, const Mat& _templ, Mat& corr,
corr.create(corrsize, ctype);
int maxDepth = depth > CV_8U ? CV_64F : std::max(std::max(CV_32F, tdepth), cdepth);
int maxDepth = depth > CV_8S ? CV_64F : std::max(std::max(CV_32F, tdepth), cdepth);
Size blocksize, dftsize;
blocksize.width = cvRound(templ.cols*blockScale);
@@ -228,14 +227,6 @@ void crossCorr( const Mat& img, const Mat& _templ, Mat& corr,
}
}
/*void
cv::crossCorr( const Mat& img, const Mat& templ, Mat& corr,
Point anchor, double delta, int borderType )
{
CvMat _img = img, _templ = templ, _corr = corr;
icvCrossCorr( &_img, &_templ, &_corr, anchor, delta, borderType );
}*/
}
/*****************************************************************************************/