mirror of
https://github.com/opencv/opencv.git
synced 2025-01-19 06:53:50 +08:00
hopefully fixed test failures and complains from the doc builder
This commit is contained in:
parent
a760c454dd
commit
e97dd57dc7
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user