Skip to content

Commit ffb620c

Browse files
committed
v.1.0.6
1 parent 388e695 commit ffb620c

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

beeld.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ tasks =[{}]
4242

4343
"@@ROOT@@" = "'undefined' !== typeof self ? self : this"
4444
"@@MODULE@@" = "HAAR"
45-
"@@VERSION@@" = "1.0.5"
45+
"@@VERSION@@" = "1.0.6"
4646

4747
@
4848

build/haar-detector.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* modified port of jViolaJones for Java (http://code.google.com/p/jviolajones/) and OpenCV for C++ (https://github.com/opencv/opencv) to JavaScript
55
*
66
* https://github.com/foo123/HAAR.js
7-
* @version: 1.0.5
7+
* @version: 1.0.6
88
*
99
* Supports parallel "map-reduce" computation both in browser and node using parallel.js library
1010
* https://github.com/adambom/parallel.js (included)
@@ -28,7 +28,7 @@ else if ( !(name in root) ) /* Browser/WebWorker/.. */
2828
* modified port of jViolaJones for Java (http://code.google.com/p/jviolajones/) and OpenCV for C++ (https://github.com/opencv/opencv) to JavaScript
2929
*
3030
* https://github.com/foo123/HAAR.js
31-
* @version: 1.0.5
31+
* @version: 1.0.6
3232
*
3333
* Supports parallel "map-reduce" computation both in browser and node using parallel.js library
3434
* https://github.com/adambom/parallel.js (included)
@@ -37,7 +37,7 @@ else if ( !(name in root) ) /* Browser/WebWorker/.. */
3737
"use strict";
3838

3939
// the export object
40-
var HAAR = {VERSION : "1.0.5"}, Detector, Feature, proto = 'prototype', undef = undefined;
40+
var HAAR = {VERSION : "1.0.6"}, Detector, Feature, proto = 'prototype', undef = undefined;
4141

4242
var // typed arrays substitute
4343
Array32F = (typeof Float32Array !== "undefined") ? Float32Array : Array,
@@ -454,7 +454,8 @@ function detectSingleStep(self)
454454
total_x2 = inv_area * (squares[p3] - squares[p2] - squares[p1] + squares[p0]);
455455

456456
vnorm = total_x2 - total_x * total_x;
457-
vnorm = (vnorm > 1) ? Sqrt(vnorm) : /*vnorm*/ 1 ;
457+
if (0 >= vnorm) continue;
458+
vnorm = /*(vnorm > 1) ?*/ Sqrt(vnorm) /*: /*vnorm* / 1*/;
458459

459460
pass = true;
460461
for (s = 0; s < sl; ++s)
@@ -948,7 +949,7 @@ Detector[proto] = {
948949
epsilon = (typeof epsilon == 'undefined') ? 0.2 : (+epsilon);
949950
doCannyPruning = (typeof doCannyPruning == 'undefined') ? false : (!!doCannyPruning);
950951

951-
maxScale = self.maxScale = Min(/*scaledSelection.*/width/sizex, /*scaledSelection.*/height/sizey);
952+
maxScale = self.maxScale = Min(scaledSelection.width/sizex, scaledSelection.height/sizey);
952953
scale = self.scale = baseScale;
953954
self.min_neighbors = min_neighbors;
954955
self.scale_inc = scale_inc;
@@ -1054,7 +1055,7 @@ Detector[proto] = {
10541055
self.epsilon = (typeof epsilon == 'undefined') ? 0.2 : (+epsilon);
10551056
self.doCannyPruning = (typeof doCannyPruning == 'undefined') ? false : (!!doCannyPruning);
10561057

1057-
maxScale = self.maxScale = Min(self/*.scaledSelection*/.width/sizex, self/*.scaledSelection*/.height/sizey);
1058+
maxScale = self.maxScale = Min(self.scaledSelection.width/sizex, self.scaledSelection.height/sizey);
10581059
self.scale = baseScale;
10591060
self.min_neighbors = min_neighbors;
10601061
self.scale_inc = scale_inc;

0 commit comments

Comments
 (0)