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 );
|
int cn = CV_MAT_CN( type );
|
||||||
Size size = _src.size();
|
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 )
|
if( size.width <= 0 || size.height <= 0 )
|
||||||
return m;
|
return m;
|
||||||
|
|
||||||
if( ocl::useOpenCL() && depth == CV_8U && !binary &&
|
if( ocl::useOpenCL() && type == CV_8UC1 && !binary &&
|
||||||
_src.isUMat() && ocl_moments(_src, m) )
|
_src.isUMat() && ocl_moments(_src, m) )
|
||||||
;
|
;
|
||||||
else
|
else
|
||||||
@ -456,6 +453,9 @@ cv::Moments cv::moments( InputArray _src, bool binary )
|
|||||||
if( mat.checkVector(2) >= 0 && (depth == CV_32F || depth == CV_32S))
|
if( mat.checkVector(2) >= 0 && (depth == CV_32F || depth == CV_32S))
|
||||||
return contourMoments(mat);
|
return contourMoments(mat);
|
||||||
|
|
||||||
|
if( cn > 1 )
|
||||||
|
CV_Error( CV_StsBadArg, "Invalid image type (must be single-channel)" );
|
||||||
|
|
||||||
if( binary || depth == CV_8U )
|
if( binary || depth == CV_8U )
|
||||||
func = momentsInTile<uchar, int, int>;
|
func = momentsInTile<uchar, int, int>;
|
||||||
else if( depth == CV_16U )
|
else if( depth == CV_16U )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user