4
4
* modified port of jViolaJones for Java (http://code.google.com/p/jviolajones/) and OpenCV for C++ (https://github.com/opencv/opencv) to JavaScript
5
5
*
6
6
* https://github.com/foo123/HAAR.js
7
- * @version : 1.0.4
7
+ * @version : 1.0.5
8
8
*
9
9
* Supports parallel "map-reduce" computation both in browser and node using parallel.js library
10
10
* https://github.com/adambom/parallel.js (included)
@@ -28,7 +28,7 @@ else if ( !(name in root) ) /* Browser/WebWorker/.. */
28
28
* modified port of jViolaJones for Java (http://code.google.com/p/jviolajones/) and OpenCV for C++ (https://github.com/opencv/opencv) to JavaScript
29
29
*
30
30
* https://github.com/foo123/HAAR.js
31
- * @version : 1.0.4
31
+ * @version : 1.0.5
32
32
*
33
33
* Supports parallel "map-reduce" computation both in browser and node using parallel.js library
34
34
* https://github.com/adambom/parallel.js (included)
@@ -37,7 +37,7 @@ else if ( !(name in root) ) /* Browser/WebWorker/.. */
37
37
"use strict" ;
38
38
39
39
// the export object
40
- var HAAR = { VERSION : "1.0.4 " } , Detector , Feature , proto = 'prototype' , undef = undefined ;
40
+ var HAAR = { VERSION : "1.0.5 " } , Detector , Feature , proto = 'prototype' , undef = undefined ;
41
41
42
42
var // typed arrays substitute
43
43
Array32F = ( typeof Float32Array !== "undefined" ) ? Float32Array : Array ,
@@ -421,8 +421,8 @@ function detectSingleStep(self)
421
421
tyw = ysize * w ;
422
422
tys = ystep * w ;
423
423
startty = starty * tys ;
424
- xl = selw - xsize ;
425
- yl = selh - ysize ;
424
+ xl = startx + selw - xsize ;
425
+ yl = starty + selh - ysize ;
426
426
swh = xsize * ysize ;
427
427
inv_area = 1.0 / swh ;
428
428
@@ -487,7 +487,7 @@ function detectSingleStep(self)
487
487
if ( feature . tilt )
488
488
{
489
489
// tilted rectangle feature, Lienhart et al. extension
490
- for ( kr = 0 ; kr < nb_rects ; kr ++ )
490
+ for ( kr = 0 ; kr < nb_rects ; ++ kr )
491
491
{
492
492
r = rects [ kr ] ;
493
493
@@ -948,7 +948,7 @@ Detector[proto] = {
948
948
epsilon = ( typeof epsilon == 'undefined' ) ? 0.2 : ( + epsilon ) ;
949
949
doCannyPruning = ( typeof doCannyPruning == 'undefined' ) ? false : ( ! ! doCannyPruning ) ;
950
950
951
- maxScale = self . maxScale = Min ( scaledSelection . width / sizex , scaledSelection . height / sizey ) ;
951
+ maxScale = self . maxScale = Min ( /* scaledSelection.*/ width / sizex , /* scaledSelection.*/ height / sizey ) ;
952
952
scale = self . scale = baseScale ;
953
953
self . min_neighbors = min_neighbors ;
954
954
self . scale_inc = scale_inc ;
@@ -1054,7 +1054,7 @@ Detector[proto] = {
1054
1054
self . epsilon = ( typeof epsilon == 'undefined' ) ? 0.2 : ( + epsilon ) ;
1055
1055
self . doCannyPruning = ( typeof doCannyPruning == 'undefined' ) ? false : ( ! ! doCannyPruning ) ;
1056
1056
1057
- maxScale = self . maxScale = Min ( self . scaledSelection . width / sizex , self . scaledSelection . height / sizey ) ;
1057
+ maxScale = self . maxScale = Min ( self /* .scaledSelection*/ . width / sizex , self /* .scaledSelection*/ . height / sizey ) ;
1058
1058
self . scale = baseScale ;
1059
1059
self . min_neighbors = min_neighbors ;
1060
1060
self . scale_inc = scale_inc ;
0 commit comments