From c2e5418e519bdd45bf5fca71aab15c29d22e71a1 Mon Sep 17 00:00:00 2001 From: will hunt Date: Sat, 6 Aug 2016 12:24:16 +0800 Subject: [PATCH] MSER: off-by-one bug --- modules/features2d/src/mser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/features2d/src/mser.cpp b/modules/features2d/src/mser.cpp index 1143addc12..076f9e15e2 100644 --- a/modules/features2d/src/mser.cpp +++ b/modules/features2d/src/mser.cpp @@ -390,7 +390,7 @@ public: int step = cols; for( i = 1; i < rows-1; i++ ) { - Pixel* pptr = &pixbuf[i*step + 1]; + Pixel* pptr = &pixbuf[i*step]; for( j = 1; j < cols-1; j++ ) { pptr[j].val = 0;