MCPcopy Index your code
hub / github.com/makelove/OpenCV-Python-Tutorial / detect

Function detect

官方samples/facedetect.py:21–27  ·  view source on GitHub ↗
(img, cascade)

Source from the content-addressed store, hash-verified

19
20
21def detect(img, cascade):
22 rects = cascade.detectMultiScale(img, scaleFactor=1.3, minNeighbors=4, minSize=(30, 30),
23 flags=cv2.CASCADE_SCALE_IMAGE)
24 if len(rects) == 0:
25 return []
26 rects[:,2:] += rects[:,:2]
27 return rects
28
29def draw_rects(img, rects, color):
30 for x1, y1, x2, y2 in rects:

Callers 1

facedetect.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected