From f3cbb0f941977e7f7f4a121ec29fa5bfebcd8497 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 25 May 2018 15:35:36 +0300 Subject: [PATCH] calib3d: chess board - perform full range (with 0) histogram smooth --- 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 283a9217a9..597269138f 100644 --- a/modules/calib3d/src/calibinit.cpp +++ b/modules/calib3d/src/calibinit.cpp @@ -252,7 +252,7 @@ static int icvSmoothHistogram( const std::vector& piHist, std::vector& for ( int ii=-iWidth; ii<=iWidth; ii++) { iIdx = i+ii; - if (iIdx > 0 && iIdx < 256) + if (iIdx >= 0 && iIdx < 256) { iSmooth += piHist[iIdx]; }