Skip to content

Commit 64661b1

Browse files
committed
add grey conversion to find_faces
1 parent 8ae56e8 commit 64661b1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coderbot/cv/image.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def get_transform(cls, image_size_x):
8484
return tx
8585

8686
def find_faces(self):
87-
faces = self._face_cascade.detectMultiScale(self._data)
87+
gray = cv2.cvtColor(self._data, cv2.COLOR_BGR2GRAY)
88+
faces = self._face_cascade.detectMultiScale(gray)
8889
return faces
8990

9091
def filter_color(self, color):

0 commit comments

Comments
 (0)