Skip to content

Commit

Permalink
v.1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
foo123 committed Aug 24, 2023
1 parent 388e695 commit ffb620c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion beeld.config
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ tasks =[{}]

"@@ROOT@@" = "'undefined' !== typeof self ? self : this"
"@@MODULE@@" = "HAAR"
"@@VERSION@@" = "1.0.5"
"@@VERSION@@" = "1.0.6"

@

Expand Down
13 changes: 7 additions & 6 deletions build/haar-detector.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* modified port of jViolaJones for Java (http://code.google.com/p/jviolajones/) and OpenCV for C++ (https://github.com/opencv/opencv) to JavaScript
*
* https://github.com/foo123/HAAR.js
* @version: 1.0.5
* @version: 1.0.6
*
* Supports parallel "map-reduce" computation both in browser and node using parallel.js library
* https://github.com/adambom/parallel.js (included)
Expand All @@ -28,7 +28,7 @@ else if ( !(name in root) ) /* Browser/WebWorker/.. */
* modified port of jViolaJones for Java (http://code.google.com/p/jviolajones/) and OpenCV for C++ (https://github.com/opencv/opencv) to JavaScript
*
* https://github.com/foo123/HAAR.js
* @version: 1.0.5
* @version: 1.0.6
*
* Supports parallel "map-reduce" computation both in browser and node using parallel.js library
* https://github.com/adambom/parallel.js (included)
Expand All @@ -37,7 +37,7 @@ else if ( !(name in root) ) /* Browser/WebWorker/.. */
"use strict";

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

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

vnorm = total_x2 - total_x * total_x;
vnorm = (vnorm > 1) ? Sqrt(vnorm) : /*vnorm*/ 1 ;
if (0 >= vnorm) continue;
vnorm = /*(vnorm > 1) ?*/ Sqrt(vnorm) /*: /*vnorm* / 1*/;

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

maxScale = self.maxScale = Min(/*scaledSelection.*/width/sizex, /*scaledSelection.*/height/sizey);
maxScale = self.maxScale = Min(scaledSelection.width/sizex, scaledSelection.height/sizey);
scale = self.scale = baseScale;
self.min_neighbors = min_neighbors;
self.scale_inc = scale_inc;
Expand Down Expand Up @@ -1054,7 +1055,7 @@ Detector[proto] = {
self.epsilon = (typeof epsilon == 'undefined') ? 0.2 : (+epsilon);
self.doCannyPruning = (typeof doCannyPruning == 'undefined') ? false : (!!doCannyPruning);

maxScale = self.maxScale = Min(self/*.scaledSelection*/.width/sizex, self/*.scaledSelection*/.height/sizey);
maxScale = self.maxScale = Min(self.scaledSelection.width/sizex, self.scaledSelection.height/sizey);
self.scale = baseScale;
self.min_neighbors = min_neighbors;
self.scale_inc = scale_inc;
Expand Down
Loading

0 comments on commit ffb620c

Please sign in to comment.