Skip to content

Commit f46a73a

Browse files
committed
v.1.0.4
* fix regression error
1 parent 78c1db8 commit f46a73a

File tree

7 files changed

+13
-11
lines changed

7 files changed

+13
-11
lines changed

build/haar-detector.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,10 @@ function groupRectangles(rects, min_neighbors, epsilon)
349349
{
350350
for (j=i+1; j<rlen; ++j)
351351
{
352-
if ((!feats[i].isInside && feats[i].inside(feats[j]))
353-
|| (!feats[j].isInside && feats[j].inside(feats[i])))
352+
if (!feats[i].isInside && feats[i].inside(feats[j], epsilon))
354353
feats[i].isInside = true;
354+
if (!feats[j].isInside && feats[j].inside(feats[i], epsilon))
355+
feats[j].isInside = true;
355356
}
356357
}
357358
i = rlen;

build/haar-detector.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/eye.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ <h1>Eye Detection with eye haar cascade by Mar Canet in JavaScript</h1>
8383
log('Selection Rectangle: ');
8484
log(this.Selection.toString());
8585
log('Detected Features (' + l +') :');
86-
log(this.objects.toString());
86+
log(JSON.stringify(this.objects));
8787
alert(l+" Objects found");
8888
})
8989
.cannyThreshold({low:5, high:200}) // custom thresholds for canny pruning (for best results)

examples/face.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ <h1>Face Detection with OpenCV haar cascades in JavaScript</h1>
7676
log('Selection Rectangle: ');
7777
log(this.Selection.toString());
7878
log('Detected Features (' + l +') :');
79-
log(this.objects.toString());
79+
log(JSON.stringify(this.objects));
8080
alert(l+" Objects found");
8181
})
8282
.detect(1, 1.1, 0.12, 1, 0.2, true); // go

examples/faces.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ <h1>Many Faces Detection with OpenCV haar cascades in JavaScript</h1>
7979
log('Selection Rectangle: ');
8080
log(this.Selection.toString());
8181
log('Detected Features (' + l +') :');
82-
log(this.objects.toString());
82+
log(JSON.stringify(this.objects));
8383
alert(l+" Objects found");
8484
})
85-
.cannyThreshold({low:20, high:400}) // custom thresholds for canny pruning (for best results)
86-
.detect(1, 1.1, 0.12, 1, 0.2, true); // go
85+
.cannyThreshold({low:20, high:600}) // custom thresholds for canny pruning (for best results)
86+
.detect(1, 1.1, 0.1, 1, 0.2, true); // go
8787
};
8888
image.src='Group_Faces2.jpg'; // load it
8989
//]]>

examples/mouth.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ <h1>Mouth Detection with OpenCV haar cascades in JavaScript</h1>
7676
log('Selection Rectangle: ');
7777
log(this.Selection.toString());
7878
log('Detected Features (' + l +') :');
79-
log(this.objects.toString());
79+
log(JSON.stringify(this.objects));
8080
alert(l+" Objects found");
8181
})
8282
.cannyThreshold({low:50, high:110}) // custom thresholds for canny pruning (for best results)

src/haar-detector.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,10 @@ function groupRectangles(rects, min_neighbors, epsilon)
325325
{
326326
for (j=i+1; j<rlen; ++j)
327327
{
328-
if ((!feats[i].isInside && feats[i].inside(feats[j]))
329-
|| (!feats[j].isInside && feats[j].inside(feats[i])))
328+
if (!feats[i].isInside && feats[i].inside(feats[j], epsilon))
330329
feats[i].isInside = true;
330+
if (!feats[j].isInside && feats[j].inside(feats[i], epsilon))
331+
feats[j].isInside = true;
331332
}
332333
}
333334
i = rlen;

0 commit comments

Comments
 (0)