fixed parser bug.
authorEvgeniy Kozinov <no@email>
Fri, 15 Jul 2011 06:35:12 +0000 (06:35 +0000)
committerEvgeniy Kozinov <no@email>
Fri, 15 Jul 2011 06:35:12 +0000 (06:35 +0000)
fixed TBB version in LatentSVM.
example works ok.

modules/objdetect/src/lsvmparser.cpp
modules/objdetect/src/matching.cpp

index 69a192f..49724a5 100644 (file)
@@ -671,11 +671,11 @@ void parserModel(FILE * xmlf, CvLSVMFilterObject *** model, int *last, int *max,
                         * b    = bb;\r
                         * count = N_comp + 1; \r
                     } else {\r
-                        cmp = (int    *)malloc(sizeof(int)    * (N_comp + 1));\r
+                        cmp = (int   *)malloc(sizeof(int)   * (N_comp + 1));\r
                         bb  = (float *)malloc(sizeof(float) * (N_comp + 1));\r
                         for(ii = 0; ii < N_comp; ii++){\r
-                            cmp[i] = (* comp)[ii];\r
-                            bb [i] = (* b   )[ii];\r
+                            cmp[ii] = (* comp)[ii];\r
+                            bb [ii] = (* b   )[ii];\r
                         }\r
                         free(* comp);\r
                         free(* b   );\r
index df0c944..4ad4b85 100644 (file)
@@ -1575,7 +1575,7 @@ int tbbThresholdFunctionalScore(const CvLSVMFilterObject **all_F, int n,
     // Computation the number of levels for seaching object,\r
     // first lambda-levels are used for computation values\r
     // of score function for each position of root filter\r
-    numLevels = H->numLevels;\r
+    numLevels = H->numLevels - LAMBDA;\r
     kLevels = (int *)malloc(sizeof(int) * threadsNum);\r
     procLevels = (int **)malloc(sizeof(int*) * threadsNum);\r
     computeBorderSize(maxXBorder, maxYBorder, &bx, &by);\r