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:
Max Ehrlich 2015-07-31 11:25:28 -04:00
parent 757de05823
commit d79f633547

View File

@ -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');