Merge pull request #25532 from asmorkalov:as/HAL_moments_bug

Fix moments integration to OpenCV HAL
pull/25541/head
Alexander Smorkalov 7 months ago committed by GitHub
commit 6e5a53c37a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      modules/imgproc/src/moments.cpp

@ -573,9 +573,9 @@ static int moments(const cv::Mat& src, bool binary, cv::Moments& m)
int depth = CV_MAT_DEPTH(type); int depth = CV_MAT_DEPTH(type);
if( src.checkVector(2) >= 0 && (depth == CV_32F || depth == CV_32S)) if( src.checkVector(2) >= 0 && (depth == CV_32F || depth == CV_32S))
status = hal_ni_polygonMoments(src.data, src.total()/2, src.type(), m_data); status = cv_hal_polygonMoments(src.data, src.total()/2, src.type(), m_data);
else else
status = hal_ni_imageMoments(src.data, src.step, src.type(), src.cols, src.rows, binary, m_data); status = cv_hal_imageMoments(src.data, src.step, src.type(), src.cols, src.rows, binary, m_data);
if (status == CV_HAL_ERROR_OK) if (status == CV_HAL_ERROR_OK)
{ {

Loading…
Cancel
Save