Nawab / detect_people.py
neerajkalyank's picture
Upload 6 files
12a4e72 verified
raw
history blame contribute delete
279 Bytes
import cv2
def detect_people_from_image(image):
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
height, width = gray.shape
# Dummy logic for simulation
if cv2.countNonZero(gray) > (height * width * 0.2):
return 3 # pretend 3 people detected
return 1