Skip to content

Commit

Permalink
v.1.0.5
Browse files Browse the repository at this point in the history
* fix detection on selected region
  • Loading branch information
foo123 committed Aug 5, 2023
1 parent f46a73a commit 388e695
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 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.4"
"@@VERSION@@" = "1.0.5"

@

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

var // typed arrays substitute
Array32F = (typeof Float32Array !== "undefined") ? Float32Array : Array,
Expand Down Expand Up @@ -421,8 +421,8 @@ function detectSingleStep(self)
tyw = ysize*w;
tys = ystep*w;
startty = starty*tys;
xl = selw-xsize;
yl = selh-ysize;
xl = startx+selw-xsize;
yl = starty+selh-ysize;
swh = xsize*ysize;
inv_area = 1.0/swh;

Expand Down Expand Up @@ -487,7 +487,7 @@ function detectSingleStep(self)
if (feature.tilt)
{
// tilted rectangle feature, Lienhart et al. extension
for (kr = 0; kr < nb_rects; kr++)
for (kr = 0; kr < nb_rects; ++kr)
{
r = rects[kr];

Expand Down Expand Up @@ -948,7 +948,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 +1054,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 388e695

Please sign in to comment.