Skip to content

Commit

Permalink
v.1.0.7 fix stdMath not defined in Worker
Browse files Browse the repository at this point in the history
  • Loading branch information
foo123 committed Oct 28, 2023
1 parent ffb620c commit 047fc2b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 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.6"
"@@VERSION@@" = "1.0.7"

@

Expand Down
8 changes: 4 additions & 4 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.6
* @version: 1.0.7
*
* 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.6
* @version: 1.0.7
*
* 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.6"}, Detector, Feature, proto = 'prototype', undef = undefined;
var HAAR = {VERSION : "1.0.7"}, Detector, Feature, proto = 'prototype', undef = undefined;

var // typed arrays substitute
Array32F = (typeof Float32Array !== "undefined") ? Float32Array : Array,
Expand Down Expand Up @@ -391,7 +391,7 @@ function mergeSteps(d)
// used for parallel, asynchronous and/or synchronous computation
function detectSingleStep(self)
{
var Sqrt = Sqrt || stdMath.sqrt, ret = [],
var Sqrt = Math.sqrt, ret = [],
haar = self.haardata, haar_stages = haar.stages, scaledSelection = self.scaledSelection,
w = self.width, h = self.height,
selw = scaledSelection.width, selh = scaledSelection.height, imArea=w*h, imArea1=imArea-1,
Expand Down
Loading

0 comments on commit 047fc2b

Please sign in to comment.