Eye detect时候为什么不用roi_img
来源:13-2 Haar识别眼鼻口

慕函数4411803
2022-02-11
您好老师,
roi_img = img[y: y+h, x: x+w]
eyes = eye.detectMultiScale(roi_img, 1.1, 5) #
for (x, y, w, h) in eyes:
cv2.rectangle(roi_img, (x, y), (x + w, y + h), (0, 255, 255), 2)
这段代码在做眼睛检测的时候取到roi_img,然后是对彩色图片做的detect。
上一步对人脸做检测时候用的是灰度图像。
请问老师这里对眼睛检测时候是否也需要用灰度图像?
写回答
1回答
-
李超
2022-02-11
不行,因为眼睛的识别是与色彩有关的,用灰度图像就没法将它们识别出来
00
相似问题