Nawab / table_occupancy.py
neerajkalyank's picture
Upload 6 files
12a4e72 verified
raw
history blame contribute delete
202 Bytes
import cv2
def is_table_occupied(image):
# Heuristic simulation for seated person
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
nonzero = cv2.countNonZero(gray)
return nonzero > 20000