From 398611b7e847d1bf851d90a43036b4bae67f1946 Mon Sep 17 00:00:00 2001 From: MaximSmolskiy Date: Mon, 18 Dec 2023 16:56:05 +0300 Subject: [PATCH] Improve icvSmoothHistogram256 --- modules/calib3d/src/calibinit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/calib3d/src/calibinit.cpp b/modules/calib3d/src/calibinit.cpp index de956abe36..ede68c6b71 100644 --- a/modules/calib3d/src/calibinit.cpp +++ b/modules/calib3d/src/calibinit.cpp @@ -298,7 +298,7 @@ static void icvSmoothHistogram256(const ArrayContainer& piHist, ArrayContainer& CV_DbgAssert(iIdx >= 0 && iIdx < 256); iSmooth += piHist[iIdx]; } - piHistSmooth[i] = iSmooth/(2*iWidth+1); + piHistSmooth[i] = iSmooth/(iIdx_max-iIdx_min+1); } } /***************************************************************************************************/