Low-resolution thermal array sensors offer an inherently privacy-preserving alternative to camera-based occupancy monitoring, but their low pixel resolution poses significant challenges for accurate human detection and tracking. This paper presents a complete edge-computing solution that not only processes coarse thermal data to extract a reliable people count, but also performs the computation entirely on an ESP32 microcontroller, eliminating privacy risks associated with data transmission, while maintaining real-time performance. Our novel lightweight algorithmic pipeline employs linear interpolation, adaptive thresholding, blob feature extraction, centroid and central-points based tracking and, in addition, a persistence-based algorithm differentiates humans from static heat sources by analyzing micro-movement patterns over time, critically reducing false positives from subjects like lighting, heating, ventilation, and air conditioning (HVAC) systems in the field of view. The system’s effective 3-D detection volume and counting capacity are first experimentally mapped to establish precise operational limits. The system is subsequently tested and validated across diverse real-world scenarios including a classroom, an outdoor courtyard area, an indoor confined space, and a library study pod. Our comprehensive evaluation measures count and occupancy accuracies separately over continuous 10-minute periods, achieving a longest consecutive count error of only 28 seconds in the pod. This temporal stability enables near-perfect reliability: any connected decision-making system with a 30-second window achieves correct decisions almost all the time, unaffected by brief count variations. By implementing all processing locally on an ESP32 (520KB SRAM), this work demonstrates that deterministic algorithms can provide a practical, scalable alternative to machine learning approaches for privacy-critical sensing applications, enabling easy deployment in real-world environments without reliance on cloud infrastructure or exposure to privacy risks.
Papanashi et al. (Thu,) studied this question.