Research and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

Click the blue text Research and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision to follow us Research and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer VisionREADINGAbstract In response to the recent regulations issued by the National Medical Products Administration, which will comprehensively ban the use of mercury sphygmomanometers, and the current situation where electronic blood pressure monitors need regular calibration and quality testing, this paper proposes an intelligent algorithm based on digital image processing and character recognition to automatically obtain the readings of electronic blood pressure monitors during calibration or quality testing. On the hardware platform, a Raspberry Pi is connected to a camera to capture images of the electronic blood pressure monitor. The OpenCV library based on computer vision runs on the Raspberry Pi, employing image preprocessing methods such as scale transformation, grayscale conversion, Gaussian smoothing, and edge detection, combined with character segmentation and recognition technology, to achieve automatic recognition of the electronic blood pressure monitor’s readings. Experimental results show that the algorithm can automatically recognize the values of electronic blood pressure monitors, effectively avoiding errors or mistakes caused by human factors. The research and design of this digital recognition algorithm lay a foundation for developing intelligent devices for automatic calibration of electronic blood pressure monitors. Additionally, this research can be applied to character recognition in electronic instruments and has certain application value.Keywords: Electronic Blood Pressure Monitor; Digital Recognition; Computer Vision; Raspberry Pi

Introduction

Blood pressure is an important physiological parameter of the human body, commonly used for clinical diagnosis of various diseases[1]. Currently, the most widely used blood pressure measuring instruments in medical institutions are mercury sphygmomanometers and electronic blood pressure monitors. On October 14, 2020, the National Medical Products Administration issued a document stating that starting from January 1, 2026, China will comprehensively ban the production of mercury thermometers and mercury blood pressure monitor products. As the ban on mercury is gradually implemented, electronic blood pressure monitors will be forced to replace mercury sphygmomanometers, which will directly lead to a significant increase in the number of electronic blood pressure monitors. Electronic blood pressure monitors are easy to operate, provide intuitive measurement results, and have advantages such as self-measurement and memory storage. However, literature and industry analysis reports indicate that electronic blood pressure monitors have a high error rate and require regular calibration or quality testing[2-4]. Therefore, how to automatically recognize the values of electronic blood pressure monitors during calibration or quality testing, improve work efficiency, and avoid errors and omissions caused by manual recording is a pressing issue.Computer vision refers to the use of image processing, pattern recognition, artificial intelligence, and other technologies to replace human eyes in recognizing, tracking, measuring, and perceiving, recognizing, and understanding the objective world[5], ultimately achieving human visual functions on a computer platform. Computer vision technology is widely used in fields that require manual recognition and judgment, with advantages in high accuracy, speed, and the ability to avoid recording errors caused by human mistakes.01Hardware Platform and Software FoundationResearch and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

In terms of hardware platform selection, considering the functional requirements, performance requirements, and the cost, power consumption, and computing power of the processor, this design chooses the Raspberry Pi based on the ARM-Linux operating system[6-7], and designs drivers and applications on the Raspberry Pi to capture images of the electronic blood pressure monitor, achieving image acquisition of the electronic blood pressure monitor’s readings. The schematic diagram of the entire hardware acquisition platform is shown below.

Research and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

Figure 1 Schematic Diagram of the System Hardware Platform Based on Raspberry Pi

For the software development environment, the OpenCV computer vision library based on Python is selected. By installing the OpenCV-Python dependency library, real-time image acquisition is achieved, and digital image processing technology and intelligent recognition algorithms are used for digital character recognition of the captured images.

02Algorithm ImplementationResearch and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

Digital image processing involves transforming and denoising images to reduce useless information in the images, remove noise, and highlight data image features, facilitating subsequent edge detection, feature extraction, image segmentation, and character recognition.

Research and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

Figure 2 Flowchart of Image Processing and Character Segmentation Recognition

2.1Image PreprocessingResearch and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

Image preprocessing includes four steps: scale transformation, grayscale conversion, Gaussian smoothing, and edge detection. Through preprocessing, the computational load of image processing is reduced, and noise in the image is removed, lowering the complexity for subsequent character segmentation recognition and providing more accurate input images[8].

2.1.1Scale TransformationResearch and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

The resolution of the images captured by the Raspberry Pi is 1280×1024, which results in a large computational load for real-time image analysis. To reduce the computational load and speed up the recognition of character values in the images, we compress the captured images to 640×512, which reduces the data processing load to one-fourth of the original. The image after scale transformation is shown in Figure 3a.

2.1.2Grayscale ConversionResearch and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer VisionThe images captured by the Raspberry Pi are in color, with each pixel composed of R, G, and B components, each having 255 values, resulting in over 16 million (255*255*255) color variations for a single pixel. Grayscale conversion maps the R, G, and B components to a range of 0 to 255 through a special algorithm, significantly reducing the computational load on the processor. Currently, common grayscale conversion methods include component method, maximum value method, average value method, and weighted average method. This paper uses the weighted average method for image grayscale processing, specifically cv2.cvtColor(image, cv2.COLOR_BGR2GRAY), and the grayscale processed image is shown in Figure 3b.2.1.3Gaussian SmoothingResearch and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer VisionGaussian smoothing is commonly used in image processing for noise suppression and interference prevention. Its essence is to utilize the nonlinear low-pass filtering characteristics of the Gaussian filter to remove noise from the image signal, thereby obtaining an image with smooth brightness gradients and minimal noise[9]. In this paper, Gaussian smoothing is performed using a 5*5 Gaussian filter, and the effect after filtering is shown in Figure 3c.2.1.4Edge DetectionResearch and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer VisionEdges are pixel sets in the image where there is a step change in grayscale between local areas and surrounding pixels. Generally, the grayscale distribution in the same area is relatively uniform, while there are certain differences in grayscale values between different areas[10]. Utilizing this characteristic, we can obtain the LCD border line of the blood pressure monitor for subsequent analysis. This paper selects the Canny operator as the optimized edge detection operator, which has good noise resistance and can accurately detect edges; the detected edges are shown in Figure 3d.

Research and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision(a) Scale Transformation

Research and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

(b)Grayscale Conversion

Research and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

(c) Gaussian Smoothing

Research and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

(d)Edge Detection

2.2Character SegmentationResearch and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

Through image preprocessing, we obtain the region of interest, which is the largest rectangular area in the image, specifically the data area displayed on the LCD screen. Since the shooting angle of the Raspberry Pi camera cannot be adjusted adaptively, the captured LCD screen may not be a frontal view. Therefore, we use the perspective transformation function four_point_transform from the imutils library to correct the image.

On the above image, we use cv2.findContours to retrieve the character contours of the LCD area, saving the retrieved contours using the grab_contours function from the imutils library for easy character recognition.

2.3Character RecognitionResearch and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

Character recognition is the key step that determines the accuracy of the final result, divided into segment code recognition and character classification. The goal of segment code recognition is to determine whether the seven segment codes a to g in the contour are lit and to save the results in an array. If lit, the corresponding segment code is recorded as 1; if not lit, the segment code is recorded as 0. Character classification is based on the array of segment code states to classify the characters. The segment code lighting states corresponding to digits 0 to 9 are shown in the following figure:

Research and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

Figure 4 Seven-Segment Character and Segment Code Encoding Rules

Taking the recognition of segment a in the image as an example, since the image has been binarized, during recognition, we only need to count the number of non-zero pixels in the rectangular area. If this number exceeds a set threshold (the proportion of non-zero pixels is greater than 60%), it is considered that the segment is lit. Based on this, we sequentially determine whether segments b to f are lit, and then, according to the lit segment codes and the encoding rules in Figure 4, derive the final value.

Research and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

Figure 5 Coordinate System Diagram for Seven-Segment Character Recognition

03ResultsResearch and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer VisionTo verify the accuracy of the character recognition algorithm, the readings of the electronic blood pressure monitor were obtained using a Raspberry Pi 4B (ARM Cortex-A72 quad-core 1.5GHz, RAM: 8GB LPDDR4) hardware platform through the camera, applying the aforementioned preprocessing flow and recognition algorithm, ultimately achieving automatic recognition of characters with a width of 2 and 3 digits, as shown in Figure 6. From the results, this method accurately locates the area and recognizes the characters of the electronic blood pressure monitor’s readings.Research and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer VisionConclusionResearch and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer VisionResearch and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

This paper addresses the issues of manual recording of readings in the calibration and quality testing of electronic blood pressure monitors, which cannot be automated. It proposes an automatic recognition algorithm based on image processing to achieve automatic recognition of electronic blood pressure monitor readings. The paper systematically introduces the image processing flow for digital image processing of electronic blood pressure monitors, including scale transformation, grayscale conversion, Gaussian smoothing, Canny edge detection, character segmentation, and character recognition, and implements the entire design using the OpenCV library on the Raspberry Pi 4B. Experiments demonstrate that this method achieves precise positioning and accurate character recognition. The implementation of this technology can solve the current issues of high workload and time-consuming manual recording in the calibration of electronic blood pressure monitors, improving the efficiency of calibration or quality testing; at the same time, it employs intelligent image recognition algorithms to automate the interpretation and analysis of calibration results, avoiding errors or mistakes caused by human factors.

This research is part of the “Key Technology Research on Automatic Calibration Device for Static Pressure of Electronic Blood Pressure Monitors” (Project No. 2021WC0106236, Huizhou Science and Technology Bureau) preliminary research results. This algorithm provides a technical foundation for developing intelligent devices for automatic calibration of electronic blood pressure monitors. Additionally, this research can be applied to character recognition in electronic instruments or the development of automated instrument reading recording devices, which has certain application value.

Research and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

Funding Project:

“Key Technology Research on Automatic Calibration Device for Static Pressure of Electronic Blood Pressure Monitors” (Project No. 2021WC0106236, Huizhou Science and Technology Bureau).Research and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

First Author:

Wu Chao, Medical Device Engineer, Master’s degree, mainly responsible for medical equipment procurement, quality control of medical devices, management of measuring equipment, and analysis of large equipment efficiency. In recent years, as the first author, he has published 6 papers in journals such as “Chinese Medical Equipment” and “Chinese Metrology”, obtained 2 software copyrights, led 1 project of the Medical Engineering Branch of the Provincial Medical Association, and participated in 6 provincial and municipal projects.Research and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

Corresponding Author:

Wu Xiangjun, Medical Device Engineer, mainly responsible for refined management of medical equipment maintenance, operational efficiency management of medical devices, and cost control of in vitro diagnostic reagents. In terms of research projects, he has participated in 2 projects funded by the Huizhou Science and Technology Bureau, which have passed acceptance; in the past five years, he has published 4 papers in national journals such as “Chinese Medical Equipment”, “Medical Equipment”, and “Biomedical Engineering and Clinical”.ENDAuthors: Wu Chao, Huizhou Central People’s Hospital Jiang Xinfeng, Huizhou Central People’s Hospital Wu Xiangjun, Huizhou First People’s Hospital Liu Senlin, Huizhou Quality Measurement Supervision and Testing Institute Editor: Mai Haitao, Zhongshan Chen Xinghai Hospital Review: Bay Area Medical EngineeringResearch and Design of Digital Recognition Algorithm for Electronic Blood Pressure Monitors Based on Computer Vision

Leave a Comment