I worked on this project in May and June 2020 at Building Momentum, as one of the many COVID-19 response technologies we worked on. The goal was to have an automated way to perform fever detection that would be quick, reliable, and cheap. The system was designed with two military grade infrared cameras in mind, the PAS13 and E-COTI, as many of the groups we worked with already had these cameras. The system ended up being very accurate, with calculated temperatures of each person being within a degree of using a handheld infrared thermometer.
The system worked by having two thermal references, a hot one set to 100F and a cold one set to 80F. By having a person stand between them and taking a picture, image analysis could then be done to map pixel intensity values to temperatures, identify areas above a certain threshold, and calculate an approximate temperature for the person. This could be used for fever screening at the entrance of buildings during the COVID pandemic, although as we were working on this project, the efficacy of fever detection as a sign of COVID began to be called into question.



Hardware
I worked with my boss on designing the hardware setup, the main components of which were a Raspberry Pi, temperature sensors, 3D printer beds and controller boards, and Arduino Megas. The thermal references were made from 3D printer beds, with a layer of styrofoam on the back as an insulator and a copper plate with opaque black paint on it on the front. Two PT100 temperature sensors were used for each plate and encased in milled copper to keep the air temperature from affecting the measurement. The temperature of each bed was controlled using a RAMPS 3D printer controller board mounted on an Arduino Mega and connected to a 3D printer screen. This allowed for easy adjustment, and allowed us to create a quick and inexpensive setup using spare parts we had around the shop. We built a wooden stand to hold the references in their desired locations. The final part of the hardware was the camera. I designed and 3D printed mounts for both the PAS13 and E-COTI so they could be mounted to a standard tripod.
Software
The software consisted of a Python algorithm I created. The program could run automatically off the Raspberry Pi, with a runtime of 0.7s to measure the temperature of one person. The basic structure of the algorithm is as follows:
- Take a picture using the thermal camera
- For hot and cold reference, calculate the average pixel intensity of a set of pixels on the reference
- The pixels being used for this calculation are identified with a red box, which can be moved with the keyboard if necessary
- Calculate the average pixel intensity on the person using a histogram to separate out face from background
- Calculate the face temperature by mapping the temperature sensor values to the pixel intensities from the hot and cold reference and then using the average pixel intensity for the person
- Identify areas on the face above the temperature threshold (88F) and draw contours to identify them
- Display temperatures on the image
The window on the Raspberry Pi showing the analyzed images stays open and updates continuously. It can be paused or stopped using the keyboard.






