def find(self, img):
self.height, self.width = img.shape[:2]
armImg = self._extract_arm(img)
armImg2 = armImg.copy()
(contours, defects) = self._find_hull_defects(armImg)
outImg = cv2.cvtColor(armImg2, cv2.COLOR_GRAY2RGB)
(outImg, num_fingers) = self._detect_num_fingers(contours, defects, outImg)
return (outImg, num_fingers)
# return outImg
评论列表
文章目录