Fix double definitions, correct comment.
authorcatree <catree.catreus@outlook.com>
Wed, 25 Oct 2017 15:55:40 +0000 (17:55 +0200)
committercatree <catree.catreus@outlook.com>
Wed, 25 Oct 2017 16:11:31 +0000 (18:11 +0200)
modules/objdetect/src/cascadedetect.hpp

index af0aaee..a69dcad 100644 (file)
@@ -263,7 +263,7 @@ protected:
     (p0) = sum + (rect).x + (step) * (rect).y,                            \
     /* (x + w, y) */                                                      \
     (p1) = sum + (rect).x + (rect).width + (step) * (rect).y,             \
-    /* (x + w, y) */                                                      \
+    /* (x, y + h) */                                                      \
     (p2) = sum + (rect).x + (step) * ((rect).y + (rect).height),          \
     /* (x + w, y + h) */                                                  \
     (p3) = sum + (rect).x + (rect).width + (step) * ((rect).y + (rect).height)
@@ -289,7 +289,7 @@ protected:
 (p0) = sum + (rect).x + (step) * (rect).y,                            \
 /* (x + w, y) */                                                      \
 (p1) = sum + (rect).x + (rect).width + (step) * (rect).y,             \
-/* (x + w, y) */                                                      \
+/* (x, y + h) */                                                      \
 (p2) = sum + (rect).x + (step) * ((rect).y + (rect).height),          \
 /* (x + w, y + h) */                                                  \
 (p3) = sum + (rect).x + (rect).width + (step) * ((rect).y + (rect).height)
@@ -305,11 +305,6 @@ protected:
 (p3) = tilted + (rect).x + (rect).width - (rect).height                         \
 + (step) * ((rect).y + (rect).width + (rect).height)
 
-#define CALC_SUM_(p0, p1, p2, p3, offset) \
-((p0)[offset] - (p1)[offset] - (p2)[offset] + (p3)[offset])
-
-#define CALC_SUM(rect,offset) CALC_SUM_((rect)[0], (rect)[1], (rect)[2], (rect)[3], offset)
-
 #define CALC_SUM_OFS_(p0, p1, p2, p3, ptr) \
 ((ptr)[p0] - (ptr)[p1] - (ptr)[p2] + (ptr)[p3])