Skip to main content
Menu

Resources: seven-segment digits

IBME green banner

Resources: seven-segment digits

Automated method for detecting and reading seven-segment digits from images of blood glucose metres and blood pressure monitors

There is an increasing need for fast and accurate transfer of readings from blood glucose metres and blood pressure monitors to a smartphone m-Health application, without a dependency on Bluetooth technology. Most of the medical devices recommended for home monitoring use a seven-segment display to show the recorded measurement to the patient. We aimed to achieve accurate detection and reading of the seven-segment digits displayed on these medical devices using an image taken in a realistic scenario by a smartphone camera.

A synthetic dataset of seven-segment digits was developed in order to train and test a digit classifier. A dataset containing realistic images of blood glucose metres and blood pressure monitors using a variety of smartphone cameras was also created. The digit classifier was evaluated on a dataset of seven-segment digits manually extracted from the medical device images.

These datasets along with the code for its development have been made public. The developed algorithm first preprocessed the input image using retinex with two bilateral filters and adaptive histogram equalisation. Subsequently, the digit segments were automatically located within the image by two techniques operating in parallel: Maximally Stable Extremal Regions (MSER) and connected components of a binarised image. A filtering and clustering algorithm was then designed to combine digit segments to form seven-segment digits.

The resulting digits were classified using a Histogram of Orientated Gradients (HOG) feature set and a neural network trained on the synthetic digits. The model achieved 93% accuracy on digits found on the medical devices. The digit location algorithm achieved a F1 score of 0.87 and 0.80 on images of blood glucose metres and blood pressure monitors respectively. Very few assumptions were made of the locations of the digits on the devices so that the proposed algorithm can be easily implemented on new devices.

Code repositories:

Synthetic seven-segment digit dataset generation

Automatic detection and reading of seven segment digits from blood glucose meters and blood pressure monitors.

Dataset:

Images of blood glucose and blood pressure monitors

When using the code or data set, please cite the following manuscript:

Eoin Finnegan, Mauricio Villarroel, Carmelo Velardo, Lionel Tarassenko. "Automated method for detecting and reading seven-segment digits from images of blood glucose metres and blood pressure monitors." Journal of Medical Engineering & Technology, 43(6), pp.341-355, 2019

Read online

Published version

Please email: eoin.finnegan@eng.ox.ac.uk for any troubleshooting or bug reports.

Abstract

There is an increasing need for fast and accurate transfer of readings from blood glucose metres and blood pressure monitors to a smartphone mHealth application, without a dependency on Bluetooth technology. Most of the medical devices recommended for home monitoring use a seven-segment display to show the recorded measurement to the patient. We aimed to achieve accurate detection and reading of the seven-segment digits displayed on these medical devices using an image taken in a realistic scenario by a smartphone camera. A synthetic dataset of seven-segment digits was developed in order to train and test a digit classifier. A dataset containing realistic images of blood glucose metres and blood pressure monitors using a variety of smartphone cameras was also created. The digit classifier was evaluated on a dataset of seven-segment digits manually extracted from the medical device images. These datasets along with the code for its development have been made public. The developed algorithm first preprocessed the input image using retinex with two bilateral filters and adaptive histogram equalisation. Subsequently, the digit segments were automatically located within the image by two techniques operating in parallel: Maximally Stable Extremal Regions (MSER) and connected components of a binarised image. A filtering and clustering algorithm was then designed to combine digit segments to form seven-segment digits. The resulting digits were classified using a Histogram of Orientated Gradients (HOG) feature set and a neural network trained on the synthetic digits. The model achieved 93% accuracy on digits found on the medical devices. The digit location algorithm achieved a F1 score of 0.87 and 0.80 on images of blood glucose metres and blood pressure monitors respectively. Very few assumptions were made of the locations of the digits on the devices so that the proposed algorithm can be easily implemented on new devices.

Citation
@article{finnegan2019automated,
title={Automated method for detecting and reading seven-segment digits from images of blood glucose metres and blood pressure monitors},
author={Finnegan, E and Villarroel, M and Velardo, C and Tarassenko, L},
journal={Journal of medical engineering \& technology},
volume={43},
number={6},
pages={341--355},
year={2019},
publisher={Taylor \& Francis}
}