MSER: off-by-one bug
authorwill hunt <gylpm@163.com>
Sat, 6 Aug 2016 04:24:16 +0000 (12:24 +0800)
committerwill hunt <gylpm@163.com>
Sat, 6 Aug 2016 05:12:50 +0000 (13:12 +0800)
modules/features2d/src/mser.cpp

index 1143add..076f9e1 100644 (file)
@@ -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;