This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import cv2.cv as cv | |
def detect(img, cascade_fn='haarcascades/haarcascade_frontalface_alt.xml', | |
scaleFactor=1.3, minNeighbors=4, minSize=(20, 20), | |
flags=cv.CV_HAAR_SCALE_IMAGE): | |
cascade = cv2.CascadeClassifier(cascade_fn) | |
rects = cascade.detectMultiScale(img, scaleFactor=scaleFactor, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
function extendEach () { | |
var args = Array.prototype.slice.call(arguments), | |
child = this; | |
_.each(args, function (proto) { | |
child = child.extend(proto); | |
}); |