hopefully fixed test failures and complains from the doc builder

This commit is contained in:
Vadim Pisarevsky 2013-12-26 22:00:29 +04:00
parent a760c454dd
commit e97dd57dc7
4 changed files with 31 additions and 31 deletions

View File

@ -441,13 +441,10 @@ cv::Moments cv::moments( InputArray _src, bool binary )
int cn = CV_MAT_CN( type );
Size size = _src.size();
if( cn > 1 )
CV_Error( CV_StsBadArg, "Invalid image type (must be single-channel)" );
if( size.width <= 0 || size.height <= 0 )
return m;
if( ocl::useOpenCL() && depth == CV_8U && !binary &&
if( ocl::useOpenCL() && type == CV_8UC1 && !binary &&
_src.isUMat() && ocl_moments(_src, m) )
;
else
@ -456,6 +453,9 @@ cv::Moments cv::moments( InputArray _src, bool binary )
if( mat.checkVector(2) >= 0 && (depth == CV_32F || depth == CV_32S))
return contourMoments(mat);
if( cn > 1 )
CV_Error( CV_StsBadArg, "Invalid image type (must be single-channel)" );
if( binary || depth == CV_8U )
func = momentsInTile<uchar, int, int>;
else if( depth == CV_16U )