Skip to content

Commit 32e78fb

Browse files
fix: update to grey before running hogdescriptor
1 parent 865db8a commit 32e78fb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

core/strategies/detectors/hog_descriptor_strategy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ def detect_humans(frame: numpy.ndarray) -> DetectorResult:
1616
# Detect humans in the frame.
1717
hog_detector = cv2.HOGDescriptor()
1818
hog_detector.setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetector())
19+
grey = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
1920
regions, num_detections = hog_detector.detectMultiScale(
20-
frame,
21+
grey,
2122
winStride=(2, 2),
2223
padding=(4, 4),
2324
scale=1.03,

0 commit comments

Comments
 (0)