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