From 06e0fb25e92ec7abbdae75e3e502a785a11367e1 Mon Sep 17 00:00:00 2001 From: anirudt Date: Fri, 9 Sep 2016 13:23:43 +0530 Subject: [PATCH] docs: adds doxygen @note for python in docs related to contour moments --- modules/imgproc/include/opencv2/imgproc.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/imgproc/include/opencv2/imgproc.hpp b/modules/imgproc/include/opencv2/imgproc.hpp index ad71d8b8ee..15bed25b9b 100644 --- a/modules/imgproc/include/opencv2/imgproc.hpp +++ b/modules/imgproc/include/opencv2/imgproc.hpp @@ -3570,12 +3570,15 @@ results are returned in the structure cv::Moments. @param array Raster image (single-channel, 8-bit or floating-point 2D array) or an array ( \f$1 \times N\f$ or \f$N \times 1\f$ ) of 2D points (Point or Point2f ). -Note: For Python users, note that the numpy type for the input array should be either np.int32 or -np.float32, or in general of type CV_32S or CV_32F. @param binaryImage If it is true, all non-zero image pixels are treated as 1's. The parameter is used for images only. @returns moments. +@note Only applicable to contour moments calculations: For Python users, note that the numpy +type for the input array should be either np.int32 or np.float32, or in general of type CV_32S or CV_32F. +Thus, np.float will not work in this case, as it is the same as np.float64 and does not satisfy the +Point2f type check. + @sa contourArea, arcLength */ CV_EXPORTS_W Moments moments( InputArray array, bool binaryImage = false );