mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
Fix mistake in face detection example
Fixed #274 by changing the x2,y2 second array when drawing the rectangle to width,height (see Matrix.cc)
This commit is contained in:
parent
757de05823
commit
d79f633547
@ -12,7 +12,7 @@ cv.readImage('./files/mona.png', function(err, im) {
|
|||||||
|
|
||||||
for (var i = 0; i < faces.length; i++) {
|
for (var i = 0; i < faces.length; i++) {
|
||||||
face = faces[i];
|
face = faces[i];
|
||||||
im.rectangle([face.x, face.y], [face.x + face.width, face.y + face.height], COLOR, 2);
|
im.rectangle([face.x, face.y], [face.width, face.height], COLOR, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
im.save('./tmp/face-detection-rectangle.png');
|
im.save('./tmp/face-detection-rectangle.png');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user