Project: CovPass-Scanner: a dedicated solution for COVID-19 certificate scanning
Dedicated solution for COVID-19 certificate scanning.
Status: finished
Runtime: 2021 - 2022
Participants: Raphael Wimmer, Thomas Fischer, Vitus Maierhöfer
Keywords: computer vision, raspberry pi, COVID-19
Goals
Developing a standalone hardware prototype that can quickly verify digital COVID-19 vaccination certificates.
Background
Along with the europe-wide vaccination campaigns against COVID-19, the EU commission introduced a digital vaccination certificate. Information about a person and their vaccinations is digitally signed by a state agency or other trustworthy entity. This certificate is then encapsulated in a QR code that their owner can print out or import into a digital wallet. Whenever the vaccination status needs to be verified, the owner shows the QR code and their passport or ID card.
In 2021, many venues and countries required proof of vaccination against COVID-19 before entry.
Verifying certificates at scale is rather tedious when using one of the the commonly recommended mobile apps (e.g., CovPassCheck) for this task.
Dedicated personnel placed at the entrance to events or establishments need to manually scan in the QR code and verify the identity of patrons.
Processing certificate QR-codes this way, takes longer than needed, since the smartphone camera's position and orientation needs to be adjusted by the operator, each time a new person shows them their certificate. On top of that, the auto-focus of the smartphone camera needs to adjust for each scan as well, adding additional delay until the QR code can actually be scanned.
We figured that using a stationary device with a dedicated area to place the QR code and fixed-focus camera might significantly reduce the time need ed per scan and thus improve overall throughput and satisfaction.
Status
We developed two proof-of-concept prototypes for verifying certificate authenticity and validity. The second prototype also compares the person's name in the certificate to their ID card. In late 2021, proof of vaccination was no longer required at most venues in Germany or at borders to neighboring countries. Therefore, we did no longer pursue this idea. The open-source code on GitHub may be of use to others who intend to automatically verify cryptographically signed data in a QR code.
Hardware
Prototype I
For the initial prototype, we used a regular Raspberry Pi 4 with a PiCam module and 3.2“ display for our hardware. We printed a plastic case to house it and mounted it on an aluminum framework. It was designed to only read QR codes display, whether the certificate is valid or not.
Prototype II
For the second prototype, we changed the previous camera and small display for a bigger, high resolution display with integrated camera and flipped the design upside-down. This change allows it to be mounted e.g. behind transparent room separators. This version also now featured the ability to compare the personal information contained in the digital certificate with that of a personal German ID. The prototype would now only return a valid status, if the certificate is valid and matches the personal information on the person's ID. As we use slightly frosted glass for the scan area, any object farther away from the glass surface than a few millimeters appears blurred in the camera image. Only when the passport is put directly on the glass, the text on it can be read. This serves two purposes. First, privacy of passers-by is ensured, as the camera's focus depth is physically constrained to a very small distance range. Second, analyzing the sharpness of the image is fast and allows for robustly detecting whether a document is put on the glass or not. More computationally expensive processing steps - such as text recognition - are only triggered when necessary. This allows for low latency even on rather slow hardware.
Software
The program code for the prototype is written in Python3 and uses OpenCV for image processing as well as Tesseract for text recognition. The source code is available on GitHub.