Paper electrocardiogram voltage value reconstruction method and system based on dynamic diffusion threshold
By using a dynamic diffusion threshold method to adaptively binarize paper electrocardiograms, the problem of inconsistency between digitized data and original information is solved, achieving accurate reproduction of electrocardiogram waveforms and improving digitization quality.
Patent Information
- Application Number
- CN202510318904.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-03-18
AI Technical Summary
Existing technologies cannot ensure that digital data accurately reflects the original information of paper electrocardiograms, especially under conditions such as blurred images, uneven lighting, or paper aging, which leads to inaccurate line recognition and waveform distortion, affecting the accuracy and reliability of diagnostic results.
A dynamic diffusion threshold-based method is adopted to obtain the optimal threshold through iterative optimization. The paper electrocardiogram is then adaptively binarized. The threshold is dynamically adjusted in combination with the diffusion principle to enhance the edge clarity and detail of the electrocardiogram waveform during the digitization process, ensuring that the digitized data is consistent with the original information.
It achieves accurate reproduction of electrocardiogram waveforms, improves digitization quality, enhances the accuracy and stability of binarization results, and ensures a high degree of similarity between digitized signals and real electrocardiogram signals in terms of morphology and characteristics.
Smart Images

Figure CN120419974B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electrocardio analysis, more particularly, to a paper electrocardiogram voltage value reconstruction method and system based on dynamic diffusion threshold. BACKGROUND
[0002] With the continuous advancement of informatization, electrocardiogram, as a non-invasive heart detection method with important value for evaluating heart function, is widely used in heart monitoring and scientific research. Electrocardiogram can record the waveform of heart electrical activity, and through analyzing the waveform characteristics, heart conditions such as arrhythmia, myocardial ischemia and myocardial infarction can be accurately monitored.
[0003] Although electrocardiogram technology has been relatively mature, the management of electrocardiogram data is still relatively traditional, and currently mainly relies on paper records. These paper electrocardiograms not only occupy a large amount of physical storage space, but also are easily affected by environmental factors such as humidity, temperature fluctuations, light and physical wear during long-term storage, resulting in fading, blurring, contamination or even loss of electrocardiogram images, which brings great inconvenience to subsequent storage, reading and analysis. In addition, the retrieval efficiency of paper electrocardiograms is extremely low, and when tracing back historical electrocardiogram data, a lot of time is often spent on manual review, and more importantly, paper electrocardiograms cannot realize remote access and sharing, which limits the optimal allocation of resources and cross-regional cooperation. Therefore, digitizing paper electrocardiograms to realize efficient storage, retrieval and analysis has become an urgent need for electrocardiogram data management.
[0004] However, the method of digitizing traditional paper electrocardiogram is usually based on image scanning and binarization processing. For example, Chinese patent document CN115272112A provides a paper electrocardiogram digitization method and device, which includes: preprocessing the electronic image of the paper electrocardiogram containing twelve lead regions to obtain an electrocardiogram image; separating each lead region of the electrocardiogram image; based on the eight-neighborhood sparse outlier removal algorithm and the pre-stored refinement algorithm, the electrocardiogram image of each lead region is refined to obtain the electrocardiogram waveform curve of each lead region; the electrocardiogram waveform curves of each lead region are connected in lead dimension to obtain the digitization result of the paper electrocardiogram; for example, Chinese patent document CN113397553A provides an electrocardiogram digitization conversion method, which includes: first step, obtaining target picture information; second step, target picture information preprocessing; third step, supplement of target picture information sampling data points; fourth step, verification of sampled data points; fifth step, storage and output of sampling data point data group information. The paper electrocardiogram data is converted into digital electrocardiogram waveform. Although these methods can extract electrocardiogram lines as digital signals, they have obvious limitations in actual application. On the one hand, noise may be generated in the scanning process of paper electrocardiogram, such as image blur, uneven light or paper crease, which directly affects the binarization quality. On the other hand, due to the change of color depth and thickness of electrocardiogram lines caused by paper aging, the traditional fixed threshold or artificial intelligence binarization method is difficult to adapt to electrocardiogram images under different conditions, resulting in inaccurate line recognition, waveform distortion and other problems, thereby affecting the accuracy and reliability of the diagnosis result.
[0005] As can be seen from the above, the related art does not provide any technical inspiration for how to ensure that the digitized data can correctly reflect the original information of the paper electrocardiogram. SUMMARY
[0006] 1. Technical problem to be solved
[0007] In view of the problem of how to ensure that the digitized data can correctly reflect the original information of the paper electrocardiogram in the prior art, the present application provides a paper electrocardiogram voltage value reconstruction method and system based on dynamic diffusion threshold, which can realize adaptive adjustment of threshold for different image regions, avoid the limitations brought by fixed threshold, combine the diffusion principle, dynamically adjust the threshold of image processing according to the local features of paper electrocardiogram, make the edges of electrocardiogram waveform more clear and the details more rich in the digitization process, and thus ensure that the digitized data can accurately reflect the original information of the paper electrocardiogram.
[0008] 2. Technical solution
[0009] The object of the present application is achieved by the following technical solution.
[0010] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the DETAILED DESCRIPTION. This Summary is not intended to identify key features or essential features of the claimed technology, nor is it intended to be used to limit the scope of the claimed technology.
[0011] Some embodiments of the present application propose a voltage value reconstruction method and system based on dynamic diffusion threshold to solve the technical problems mentioned in the background section.
[0012] As a first aspect of the present application, some embodiments of the present application provide a paper electrocardiogram voltage value reconstruction method based on dynamic diffusion threshold, comprising the following steps: obtaining a standard paper electrocardiogram and a to-be-processed paper electrocardiogram, and extracting paper electrocardiogram parameters; based on a preset threshold, an optimal threshold is obtained by iterative optimization to perform binaryzation processing on the to-be-processed paper electrocardiogram, and a binaryzation paper electrocardiogram is obtained; each lead image region and a corresponding pixel-time-voltage conversion grid image region are intercepted from the binaryzation paper electrocardiogram to realize lead position positioning of electrocardiogram waveform; electrocardiogram waveform information of the lead image region is converted into a digital signal; the pixel-time-voltage conversion grid image region is subjected to differential dimension reduction processing; a time-voltage value corresponding to each pixel in the pixel-time-voltage conversion grid image region after differential dimension reduction processing is obtained by using a wave peak detection algorithm, and the obtained digital signal is converted into a voltage signal; the voltage signal is resampled to obtain a digital reconstructed electrocardiogram signal.
[0013] Further, the standard binaryzation paper electrocardiogram and the to-be-processed paper electrocardiogram are divided by a preset integer multiple;
[0014] The standard binaryzation paper electrocardiogram is divided to obtain image blocks sequentially labeled as BBZ i,j from left to right and from top to bottom, and the to-be-processed paper electrocardiogram is divided to obtain image blocks sequentially labeled as DBZ i,j from left to right and from top to bottom; i represents a row number, and j represents a column number.
[0015] Further, the process of binaryzation processing of the to-be-processed paper electrocardiogram includes primary binaryzation, secondary binaryzation and tertiary binaryzation;
[0016] The steps of the primary binaryzation include: performing gray scale processing on a first image block BBZ 1,1 of the to-be-processed paper electrocardiogram; and performing binaryzation processing on the BBZ 1,1 after the gray scale processing by using a preset threshold.
[0017] The steps of the secondary binaryzation include: setting a threshold diffusion factor to update the threshold, and performing secondary binaryzation processing on the BBZ 1,1 by using the updated threshold.
[0018] The step of performing the third binarization includes performing a third binarization process according to the results of the first binarization and the second binarization.
[0019] Further, the step of performing the third binarization according to the results of the first binarization and the second binarization includes: calculating a change amount of the signal-to-noise ratio difference of the first binarization and the signal-to-noise ratio difference of the second binarization as a change coefficient; adjusting a threshold diffusion factor by a ratio of the change coefficient to the signal-to-noise ratio difference of the second binarization to obtain an adjusted threshold diffusion factor; and updating the threshold value by using the adjusted threshold diffusion factor and performing the third binarization on the DBZ 1,1 to obtain a third binarized paper electrocardiogram.
[0020] Further, the process of repeating the binarization is iterated, and when the absolute value of the change coefficient of two consecutive iterations is less than or equal to a signal-to-noise ratio difference threshold, the iteration is terminated, and the threshold value at this time is an optimal threshold value.
[0021] The optimal threshold value is used to perform binarization on the paper electrocardiogram to be processed to obtain a binarized paper electrocardiogram.
[0022] Further, the step of positioning the lead position of the electrocardiogram waveform includes: rotating the binarized paper electrocardiogram to obtain a horizontal binarized paper electrocardiogram.
[0023] The row pixels and the column pixels of the horizontal binarized paper electrocardiogram are summed respectively, and the lead position and the QRS wave peak position are determined by combining a wave peak detection algorithm.
[0024] According to the determined lead position and the coordinates, an image area of each lead and a pixel-time-voltage conversion grid area are intercepted from the horizontal binarized paper electrocardiogram.
[0025] Further, the step of obtaining the horizontal binarized paper electrocardiogram includes: rotating the binarized paper electrocardiogram in a range of -90 degrees to 90 degrees, and calculating the row pixel sum of the rotated binarized paper electrocardiogram at each rotation angle.
[0026] The row pixel sums at each rotation angle are compared, and the rotation angle that makes the row pixel sum minimum is found as the horizontal angle to obtain the horizontal binarized paper electrocardiogram.
[0027] Further, the step of converting the electrocardiogram waveform information into a digital signal includes: coordinate processing of the lead image area and conversion of each pixel position of the lead image area into a coordinate value for extraction of the digital signal to obtain the digital signal represented by each pixel position of the lead image area.
[0028] Further, the step of differential dimension reduction processing includes: coordinate processing of the pixel-time-voltage conversion grid image area.
[0029] The sum of each row of pixel values in the pixel-time-voltage conversion grid image area is calculated, and the two-dimensional grid data is converted into a one-dimensional array;
[0030] The sum of each row of pixel values is constructed as an element to build an electrocardiogram grid differential dimension reduction array G, and differential dimension reduction of the grid data is realized.
[0031] As a second aspect of the present application, some embodiments of the present application provide a system for reconstructing paper electrocardiogram voltage values based on a dynamic diffusion threshold, comprising a data acquisition module: acquiring a standard paper electrocardiogram and a paper electrocardiogram to be processed, and extracting paper electrocardiogram parameters;
[0032] A binary processing module: based on a preset threshold, an optimal threshold is obtained by iterative optimization to perform binary processing on the paper electrocardiogram to be processed, and a binary paper electrocardiogram is obtained;
[0033] A digital signal conversion module: each lead image area and the corresponding pixel-time-voltage conversion grid image area are intercepted from the binary paper electrocardiogram to realize electrocardiogram waveform lead position positioning; and the electrocardiogram waveform information of the lead image area is converted into a digital signal;
[0034] A reconstruction module: the pixel-time-voltage conversion grid image area is subjected to differential dimension reduction processing; the time-voltage value corresponding to each pixel in the pixel-time-voltage conversion grid image area after differential dimension reduction processing is obtained by using a wave peak detection algorithm, the obtained digital signal is converted into a voltage signal; and the voltage signal is resampled to obtain a digital reconstructed electrocardiogram signal.
[0035] 3. Advantages
[0036] Compared with the prior art, the advantages of the present application are:
[0037] (1) The paper electrocardiogram voltage value reconstruction method based on a dynamic diffusion threshold can adaptively adjust the threshold for different image areas, effectively overcoming the limitations of fixed thresholds in processing diverse and complex electrocardiogram images;
[0038] (2) Combined with the diffusion principle, the threshold of image processing is dynamically adjusted according to the local features of the paper electrocardiogram, which enhances the edge definition of the electrocardiogram waveform in the digitalization process, enriches the details, and makes the digitalized data more accurately capture and reflect the original information of the paper electrocardiogram, improving the digitalization quality of the electrocardiogram;
[0039] (3) The scheme can convert the digital signal represented by pixel position into the electrocardiogram signal represented by time-voltage based on the actual paper speed and the actual unit amplitude, in combination with the specific features of the paper electrocardiogram, and realize accurate reproduction of the electrocardiogram waveform; by accurately positioning and quantifying the pixel points in the electrocardiogram image and calculating the corresponding positions of each pixel point on the time axis and the voltage axis, the scheme can ensure that the digital signal is highly consistent with the waveform form and features of the original paper electrocardiogram in the conversion process, and realizes accurate reproduction of the electrocardiogram waveform;
[0040] (4) The local electrocardiogram Figure Two value conversion method of the scheme avoids the problem of poor binarization result caused by using a global threshold value, and through local adjustment of the threshold value, the binarization process of the paper electrocardiogram is more flexible and adaptive, thereby improving the accuracy and stability of the binarization result;
[0041] (5) After the electrocardiogram Figure Two is binarized, the scheme accurately converts the digital signal according to the unit time and voltage value of the actual electrocardiogram, ensures that the reconstructed electrocardiogram signal is highly similar to the real electrocardiogram signal in form and features, and further improves the accuracy of the signal. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure One is a flowchart of the paper electrocardiogram voltage value reconstruction method based on a dynamic diffusion threshold in an embodiment of the present application;
[0043] Figure Two is a step schematic diagram of the paper electrocardiogram voltage value reconstruction method based on a dynamic diffusion threshold in an embodiment of the present application;
[0044] Figure Three is a binarization schematic diagram of the paper electrocardiogram based on a local dynamic diffusion threshold in an embodiment of the present application; Figure Two
[0045] Figure Four is a lead position positioning and digitization schematic diagram of the electrocardiogram waveform in an embodiment of the present application;
[0046] Figure Five is a rectangular region division schematic diagram in an embodiment of the present application;
[0047] Figure Six is a three electrocardiogram arrangement schematic diagram in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The present application will be described in detail below in combination with the drawings and specific embodiments.
[0049] In combination with Figures One to Six The paper electrocardiogram voltage value reconstruction method based on a dynamic diffusion threshold includes the following steps: obtaining a standard paper electrocardiogram and a paper electrocardiogram to be processed, and extracting paper electrocardiogram parameters; based on a preset threshold, an optimal threshold is obtained by iterative optimization to perform binary processing on the paper electrocardiogram to be processed, and a binary paper electrocardiogram is obtained; the image area of each lead and the corresponding pixel-time-voltage conversion grid image area are cut from the binary paper electrocardiogram to realize lead position positioning of the electrocardiogram waveform; the electrocardiogram waveform information of the lead image area is converted into a digital signal; the pixel-time-voltage conversion grid image area is subjected to differential dimension reduction processing; the time-voltage value corresponding to each pixel in the pixel-time-voltage conversion grid image area after differential dimension reduction processing is obtained by using a wave peak detection algorithm, and the obtained digital signal is converted into a voltage signal; the voltage signal is resampled to obtain a digital reconstructed electrocardiogram signal.
[0050] In a specific embodiment, the specific process of the paper electrocardiogram voltage value reconstruction method based on a dynamic diffusion threshold is as follows:
[0051] S1, data acquisition:
[0052] A standard paper electrocardiogram (Standard Binary Format Electrocardiogram, referred to as BBZ) and a paper electrocardiogram to be processed (Digitized Binary Format Electrocardiogram, referred to as DBZ) are obtained, and paper electrocardiogram parameters are extracted. By obtaining a standard paper electrocardiogram, a reference benchmark is provided for the paper electrocardiogram to be processed, ensuring that the voltage value reconstruction process in the subsequent steps has consistency and accuracy,
[0053] Specifically, the standard paper electrocardiogram is a two-dimensional binary matrix that meets the IEC 60601-2-51 international standard, and its spatial dimension is defined as an X×Y pixel array, that is, a standard paper electrocardiogram of a length X and a width Y that has been pre-processed for binary processing. The paper electrocardiogram to be processed is an original gray-scale image matrix that has not been digitized, that is, an electrocardiogram record to be converted into a binary image, and its original form needs to be preserved for subsequent steps.
[0054] The paper electrocardiogram parameters include a sampling rate fs (unit: Hz, defined according to the ISO 5726 standard) and scale information.
[0055] Specifically, the sampling rate is the sampling frequency of the electrocardiogram signal, with a unit of hertz (Hz), which defines the number of data points collected from the electrocardiogram record per second. For example, fs=500 Hz means that 500 data points are captured per second.
[0056] The scale information includes time and voltage parameters. Paper electrocardiograms (ECGs) are equipped with a scale to aid in interpretation. For a standard paper ECG, each division on the scale represents 0.2 seconds. The time corresponding to each division on the paper ECG scale serves as the time parameter, used to convert the time markers on the image into actual time units, establishing a linear mapping between the image pixel coordinate system and actual time, ensuring accurate interpretation of ECG time information. Similarly, for a standard paper ECG, each division on the scale represents 0.5 millivolts (mV). The voltage corresponding to each division on the paper ECG scale serves as the voltage parameter, used to convert the image voltage markers into actual voltage units, establishing a voltage scale mapping relationship, ensuring accurate interpretation of ECG voltage information.
[0057] S2, Paper ECG based on local dynamic diffusion threshold Figure Two Value-based:
[0058] A multi-scale superpixel segmentation strategy is adopted to perform region adaptive processing on standard binarized paper electrocardiograms (BBZ) and paper electrocardiograms to be processed (DBZ), and a dynamic threshold iterative optimization framework is constructed.
[0059] Specifically, the standard binarized paper electrocardiogram (ECG) and the paper ECG to be processed are divided into multiple rectangular regions for refined local processing. Each rectangular region is grayscaled, and an initial threshold α and a threshold diffusion factor β are preset. Through an iterative process, the threshold is dynamically adjusted and the signal-to-noise ratio difference is calculated to find the optimal threshold. The optimal threshold is then used to binarize the paper ECG to be processed, resulting in a binarized paper ECG.
[0060] In one specific embodiment, paper-based electrocardiograms based on local dynamic diffusion thresholds Figure Two The specific process of valueization is as follows:
[0061] S201, Image Segmentation
[0062] The standard binary paper electrocardiogram (BBZ) and the paper electrocardiogram to be processed (DBZ) are separated to facilitate subsequent local processing.
[0063] Specifically, the standard binarized paper ECG and the paper ECG to be processed are divided using a magnification factor of N. The magnification factor N is a preset integer that determines the level of detail in the image division. The value of N ranges from 1 to positive infinity, and users can choose an appropriate magnification factor based on the specific image and processing requirements. The specific division process is as follows:
[0064] Divide the image along its length (X) and width (Y) to ensure that the image is evenly cut into multiple rectangular regions;
[0065] like Figure FiveAs shown, based on the different edge and internal features of the image, the divided rectangular regions are divided into four types. Each type of rectangular region differs in size and location to accommodate different parts of the image.
[0066] Specifically, the first type contains (N-1)×(N-1) rectangles. The length of these rectangles is an integer part of the original image length X, and the width of these rectangles is an integer part of the original image width Y. That is, the length of each rectangle is X / / N (the integer part of X divided by N), and the width of each rectangle is Y / / N (the integer part of Y divided by 5).
[0067] like Figure Five As shown, the first type of rectangle is (N-1) × (N-1) rectangles located in the first row to the (N-1)th row and the first column to the (N-1)th column of the image.
[0068] The second type contains (N-1) rectangles. The length of each rectangle is equal to the original image length X minus (N-1) times the length division unit (X / / N), that is, the length of each rectangle is X-(N-1)×(N-1); the width of each rectangle is Y / / N. For example... Figure Five As shown, the second type of rectangle is located in the lower edge region of the image, that is, from the Nth row of the image to the bottom of the image, and from the first column of the image to the (N-1)th column of the image (N-1)th rectangle.
[0069] The third type also contains (N-1) rectangles, each with a length of X / / N; the width of each rectangle is equal to the original image width Y minus (N-1) times the width division unit (Y / / N), i.e., the width is Y-(N-1)×(Y / / N). Figure Five As shown, the third type of rectangle is located in the right edge region of the image, that is, from the first row to the (N-1)th row of the image, and from the Nth column of the image to the right side of the image.
[0070] The fourth type contains only one rectangle. The length of this rectangle is equal to the original image length X minus N-1 times the length unit, and the width is equal to the original image width Y minus N-1 times the width unit, that is, the length is X-(N-1)×(X / / N), and the width is Y-(N-1)×(Y / / N). Figure Six As shown, this rectangle is located in the lower right corner of the image, that is, in the Nth row and Nth column of the image, and covers the rest of the image.
[0071] Specifically, to facilitate subsequent processing, the location of each rectangular region in both the standard binarized paper ECG and the paper ECG to be processed is marked. For the standard binarized paper ECG, the divided rectangular regions are sequentially marked as image patches BBZ from left to right and from top to bottom.i,j Likewise, for the paper electrocardiogram to be processed, the divided rectangular regions are sequentially labeled as image blocks DBZ i,j from left to right and from top to bottom, where i represents the row number and j represents the column number; i takes values from 1 to N, and j takes values from 1 to the number of columns determined according to the image width and the division manner.
[0072] More specifically, for a standard binary paper electrocardiogram, the image blocks labeled in the first row are sequentially BBZ 1,1 , BBZ 1,2 , BBZ 1,3 ,..., BBZ 1,N from left to right; the image blocks labeled in the first column are sequentially DBZ 1,1 , DBZ 2,1 , DBZ 3,1 ,..., DBZ N,1 from top to bottom. Labeling is continued in this way to the entire standard binary paper electrocardiogram.
[0073] For the paper electrocardiogram to be processed, the image blocks labeled in the first row are sequentially BBZ 1,1 , BBZ 1,2 , BBZ 1,3 ,...; the image blocks labeled in the first column are sequentially DBZ 1,1 , DBZ 2,1 , DBZ 3,1 ,..., DBZ N,1 from top to bottom. Labeling is continued in this way to the entire paper electrocardiogram to be processed.
[0074] S202, initial binarization
[0075] The first image block BBZ 1,1 of the paper electrocardiogram to be processed is converted from a color image to an initial binarization image.
[0076] First, the first image block BBZ 1,1 of the paper electrocardiogram to be processed is subjected to grayscale processing, converting the image block BBZ 1,1 from a color image to a grayscale image.
[0077] Each pixel value in the grayscale image represents the brightness at that position, typically ranging from 0 (black) to 255 (white).
[0078] To convert the grayscale image to an initial binarization image, an initial threshold value a is preset, and the image block BBZ 1,1The binarization processing is performed to obtain a primary binarization image. The threshold value a determines which pixels are regarded as foreground (such as the electrocardiogram waveform, usually set as white) and which pixels are regarded as background (such as the paper part, usually set as black).
[0079] Specifically, the binarization processing of the grayscale image by using the threshold value is as follows: each pixel in the grayscale image is traversed, and the pixel value of each pixel in the grayscale image is compared with the preset threshold value a; if the pixel value is greater than or equal to the threshold value a, the pixel is set as white (1); if the pixel value is less than the threshold value a, the pixel is set as black (0). In this way, the primary binarization image is obtained.
[0080] More specifically, the binarization effect can be evaluated by calculating the signal-to-noise ratio (SNR) and comparing the signal-to-noise ratio difference of the images before and after the binarization processing. The signal-to-noise ratio of the image is the ratio of the signal power to the noise power, which reflects the contrast of the foreground and the background in the image.
[0081] In a specific embodiment, the contrast of the foreground (such as the electrocardiogram waveform) and the background (such as the paper part) in the image is calculated to approximately represent the signal-to-noise ratio of the image. Therefore, the signal-to-noise ratios of the images before and after the binarization processing need to be calculated, including the signal-to-noise ratio BSNR 1,1 of the DBZ 1,1 and the signal-to-noise ratio DSNR 1,1 of the BBZ 1,1 .
[0082] S203, secondary binarization
[0083] After the primary binarization processing, i.e., the first iteration, the initial threshold value is updated using a threshold diffusion factor to construct an adaptive adjustment of the threshold value, realizing a threshold diffusion process driven by the signal-to-noise ratio.
[0084] Specifically, the threshold diffusion factor b is set, the threshold value a is updated to a* b, and the threshold value is gradually adjusted in the iteration process to obtain a better binarization effect. The selection of the threshold diffusion factor b can be based on experimental data. In this embodiment, the threshold diffusion factor b is greater than 1.
[0085] In a specific embodiment, the image block DBZ 1,1 is subjected to secondary binarization processing by using the updated threshold value a* b. At this time, the iteration number is 2, the signal-to-noise ratio BSNR 1,1 of the image block DBZ 1,1 after the secondary binarization processing and the signal-to-noise ratio DSNR 1,1 of the BBZ 1,1 are calculated; and the BSNR 1,1 and the DSNR 1,1The difference is used to obtain the updated signal-to-noise ratio difference Distance2SNR. 1,1 .
[0086] Through the above steps, the second binarization of the image patch was completed, i.e., the second iteration, and the signal-to-noise ratio difference was updated, providing a foundation for subsequent iterative optimization.
[0087] S204, Threshold Diffusion Factor Adjustment
[0088] Intelligent regulation of diffusion factors is achieved by quantifying the changes in benefits during the iterative process.
[0089] Specifically, the threshold diffusion factor β is adjusted by comparing the changes in the signal-to-noise ratio (SNR) difference between two iterations (i.e., two binarization processes) to optimize subsequent iterations. The change in the SNR difference before and after the two binarization processes is calculated, i.e., Distance1SNR. 1,1 and Distance2SNR 1,1 The difference Dis 12 SNR 1,1 This difference reflects the trend of the signal-to-noise ratio difference from the first iteration to the second iteration.
[0090] The difference Dis calculated above 12 SNR 1,1 As the coefficient of change, and through the coefficient of change Dis 12 SNR 1,1 The difference in signal-to-noise ratio between the second iteration and Distance2SNR 1,1 The ratio is used to adjust the threshold diffusion factor β, and the adjusted threshold diffusion factor is:
[0091] Through the above steps, a mathematical mapping relationship between signal-to-noise ratio evolution and diffusion factor adjustment was established, realizing the adaptability of threshold update during binarization.
[0092] S205, cubic binarization
[0093] Based on the adjusted threshold diffusion factor, the threshold is updated again; the updated threshold is then used to apply the image patch DBZ. 1,1 Perform three binarization processes and calculate the corresponding signal-to-noise ratio (SNR) and SNR difference. The detailed process is as follows:
[0094] The iteration count is now 3, using the adjusted threshold diffusion factor. Calculate the updated threshold using the initial threshold α, and update threshold α to... And utilize the updated threshold For DBZ 1,1 Perform three binarization operations.
[0095] Calculate the third binaryzation of DBZ 1,1 and the signal-to-noise ratio of BBZ 1,1 , BSNR 1,1 and DSNR 1,1 , and calculate the signal-to-noise ratio difference Distance3SNR 1,1 of the third iteration.
[0096] Through the above steps, the third binaryzation of the image block is completed, and the signal-to-noise ratio difference is updated, providing a basis for subsequent iteration optimization.
[0097] S206, iteration optimization and global binaryzation
[0098] Repeat the above steps S202 to S205, and in the repeated iteration process, update the threshold value, perform binaryzation processing and calculate the signal-to-noise ratio difference for each iteration, and record the signal-to-noise ratio difference calculated for each iteration.
[0099] Set the signal-to-noise ratio difference threshold DisSNR to determine whether the binaryzation process reaches the preset target threshold of the convergence condition. In this embodiment, the signal-to-noise ratio difference threshold DisSNR can be set to 0.01.
[0100] Specifically, in the iteration process, when the absolute value of the change coefficient of the two consecutive iterations is less than or equal to the signal-to-noise ratio difference threshold DisSNR, the iteration is terminated. At this time, the iteration number is m, m is a positive integer, and Dis (m-1)m SNR 1,1 The absolute value of the change coefficient of the two consecutive iterations is less than or equal to the preset signal-to-noise ratio difference DisSNR, and the threshold value at this time is the optimal threshold value that makes the to-be-binaryzation image closest to the standard binaryzation image, which can achieve the optimal binaryzation result of the to-be-binaryzation paper electrocardiogram.
[0101] Once the optimal threshold value is found, the optimal threshold value is used to perform binaryzation processing on the to-be-processed paper electrocardiogram (DBZ) to obtain the final binaryzation paper electrocardiogram.
[0102] Specifically, all the previously divided rectangular regions are traversed, and each region is applied to the corresponding optimal threshold value for binaryzation. Since each region may have a different optimal threshold value, the optimal threshold value of each region needs to be recorded and applied. After completing the binaryzation processing of all regions, i.e., until the to-be-binaryzation paper electrocardiogram is completed, the final binaryzation paper electrocardiogram is obtained.
[0103] S3, ECG waveform lead position positioning:
[0104] The row pixel sum of the binary paper electrocardiogram is calculated to preliminarily obtain the electrocardiogram features; the horizontal angle of the electrocardiogram is determined by rotating the binary paper electrocardiogram and calculating the row pixel sum at each angle, and the horizontal binary paper electrocardiogram is obtained; the row pixel sum and the column pixel sum of the horizontal binary paper electrocardiogram are summed respectively, and the lead position and the QRS wave peak position are determined in combination with the wave peak detection algorithm; and the image area of each lead and the pixel-time-voltage conversion grid area are cut from the horizontal binary paper electrocardiogram according to the determined lead position and coordinates. The specific process is as follows:
[0105] S301, the row pixel sum Hps of the binary paper electrocardiogram is calculated:
[0106] For each row in the binary paper electrocardiogram, the number of pixels is calculated; the pixel sum of each row is stored in the row pixel sum list Hp in order, and each element in the row pixel sum list Hp corresponds to each row in the binary paper electrocardiogram, and the element value represents the pixel sum of the row.
[0107] The values of all elements in the row pixel sum list Hp are added to obtain the row pixel sum Hps of the binary paper electrocardiogram.
[0108] Since the waveform of the electrocardiogram is usually represented as a series of continuous black or white pixels in the image, each element (i.e. the pixel sum of each row) in the Hp list can reflect the intensity or density of the electrocardiogram waveform in that row; in addition, Hps as a whole indicator can evaluate the waveform intensity or density of the entire electrocardiogram.
[0109] S302, lead position positioning and feature extraction:
[0110] First, the binary paper electrocardiogram is rotated in the range of -90 degrees to 90 degrees, and the row pixel sum Hps of the rotated binary paper electrocardiogram at each rotation angle is calculated angle ;
[0111] The row pixel sum Hps at different rotation angles is compared angie , and the rotation angle that makes the row pixel sum Hps angle minimum is found, which is the horizontal angle of the binary paper electrocardiogram, and thus the horizontal binary paper electrocardiogram is obtained.
[0112] In a specific embodiment, the rotation step is 1 degree or 0.5 degree to cover the entire possible rotation range.
[0113] Through the above steps, the image space posture correction is realized to ensure that the binary paper electrocardiogram is in the correct horizontal position in subsequent processing.
[0114] After obtaining the horizontal binary paper electrocardiogram, each row and each column of the horizontal binary paper electrocardiogram is traversed respectively, the row pixel sum is calculated, and a new row pixel sum list Hp' is obtained; the column pixel sum is calculated, and a column pixel sum list Lp is obtained.
[0115] Specifically, in combination with the row pixel sum list Hp', the column pixel list Lp, and a peak detection algorithm, the lead position and the QRS peak position are obtained; and the coordinates of each lead position are located according to the lead position and the QRS peak position.
[0116] According to the obtained coordinates of each lead position, a lead image region and a pixel-time-voltage conversion grid region are cut from the horizontal binary paper electrocardiogram.
[0117] Specifically, the pixel-time-voltage conversion grid image region is named R g ; the I lead image region is R I , the II lead image region is R II , the III lead image region is R III , the aVL lead image region is R aVL , the aVR lead image region is R aVR , the aVF lead image region is R aVF , the V1 lead image region is R V1 , the V2 lead image region is R V2 , the V3 lead image region is R V3 , the V4 lead image region is R V4 , the V5 lead image region is R V5 , and the V6 lead image region is R V6 .
[0118] In one specific embodiment, the electrocardiogram contains multiple leads, and each lead reflects the electrical activity of different parts of the heart. As shown in the electrocardiogram in , the I lead image is the region where the I lead is located, the II lead image is the region where the II lead is located, the III lead image is the region where the III lead is located, the aVL lead image is the region where the aVL lead is located, the aVR lead image is the region where the aVR lead is located, the aVF lead image is the region where the aVF lead is located, the V1 lead image is the region where the V1 lead is located, the V2 lead image is the region where the V2 lead is located, the V3 lead image is the region where the V3 lead is located, the V4 lead image is the region where the V4 lead is located, the V5 lead image is the region where the V5 lead is located, and the V6 lead image is the region where the V6 lead is located.
[0119] More specifically, the lead image region refers to the waveform part corresponding to each lead separated from the entire electrocardiogram. These regions will be used for subsequent electrocardiogram waveform analysis and feature extraction. The pixel-time-voltage conversion grid region is a region used for reference and conversion in electrocardiogram processing, for converting the pixel value in the electrocardiogram image into the actual electrocardiogram signal value (voltage). In the digitization process of the electrocardiogram, factors such as the resolution of the image and the sensitivity of the acquisition device, the pixel value in the image cannot directly represent the voltage value of the electrocardiogram signal. Therefore, a known conversion grid is needed to perform the conversion.
[0120] S4, digital signal extraction:
[0121] The electrocardiogram waveform information in the lead region image is converted into a digital signal. First, the lead image region is coordinated; by calculating the electrocardiogram waveform lead position space mapping array, each pixel position of the lead image region is converted into a specific coordinate value, reflecting the position information of the electrocardiogram waveform in the image; each pixel position of the lead image region is extracted for digital signal extraction, discarding invalid or extremely low intensity pixel values, and retaining valid electrocardiogram waveform information to obtain the digital signal represented by each pixel position of the lead image region.
[0122] S401, calculating the electrocardiogram waveform position space mapping array
[0123] The length of the lead image region R is set as E, and the width is set as F. The lower left corner of the lead image region R is set as the coordinate axis origin R 0,0 ; the length of the lead image region R is set as the coordinate horizontal axis (X axis), and the width is set as the coordinate vertical axis (Y axis), that is, the X axis extends along the image length, and the Y axis extends vertically upward, forming a right-handed Cartesian coordinate system. Each pixel position in the lead image region is converted into a specific coordinate value, which can extract more accurate and reliable electrocardiogram waveform digital signals from the electrocardiogram image.
[0124] From left to right, along the direction of the horizontal axis (X axis), the mean value of all pixel values at each horizontal axis position (i.e. each row) is calculated one by one; these mean values form an array, i.e. the electrocardiogram waveform position space mapping array R tmp of the lead image region R.
[0125] R tmp Each element in the array represents the average value of the electrocardiogram waveform intensity at the corresponding horizontal axis position, thereby reflecting the position information of the electrocardiogram waveform in the image.
[0126] S402, extracting the digital signal:
[0127] In R tmpIn the array, the 0 value usually represents that there is no electrocardiogram waveform information at the position, or the electrocardiogram waveform intensity is extremely low, which has no actual significance for subsequent analysis. Therefore, in the embodiment, all elements with a value of 0 are discarded, and only non-zero elements are retained; these non-zero elements constitute the digital signal R tmp represented by the pixel position. Not only the position information of the electrocardiogram waveform is retained, but also the intensity of the waveform is accurately reflected. d
[0128] S403, traversing the lead image area to extract the digital signal
[0129] For each lead image area, the steps of S401 to S402 are repeatedly executed to obtain the digital signal represented by the pixel position of each lead. The effective electrocardiogram waveform information is extracted from each lead image.
[0130] Specifically, the steps of S401 to S402 are repeated, the I lead image area is R I , the II lead image area is R II , the III lead image area is R III , the aVL lead image area is R aVL , the aVR lead image area is R aVR , the aVF lead image area is R aVF , the V1 lead image area is R V1 , the V2 lead image area is R V2 , the V3 lead image area is R V3 , the V4 lead image area is R V4 , the V5 lead image area is R V5 , and the V6 lead image area is R V6 ; and the steps of S401 to S402 are executed respectively to obtain the digital signal represented by the pixel position of the I lead R Id , the digital signal represented by the pixel position of the II lead R IId , the digital signal represented by the pixel position of the III lead R IIId , the digital signal represented by the pixel position of the aVL lead R aVLd , the digital signal represented by the pixel position of the aVR lead R aVRd , the digital signal represented by the pixel position of the aVF lead R aVFd , the digital signal represented by the pixel position of the V1 lead R V1d , the digital signal represented by the pixel position of the V2 lead R V2d , the digital signal represented by the pixel position of the V3 lead R V3d , the digital signal represented by the pixel position of the V4 lead R V1d , the digital signal represented by the pixel position of the V5 lead RV5d and the digital signal R represented by the pixel position of lead V6 V6d .
[0131] S5, reconstructing the electrocardiogram signal in time-voltage representation:
[0132] coordinate the pixel-time-voltage conversion grid image area; difference dimension reduction processing is performed on the grid image to obtain an electrocardiogram grid difference dimension reduction array; the pixel spacing of a large grid of the paper electrocardiogram grid is detected from the dimension reduction array using a wave peak detection algorithm; the time-voltage value corresponding to each pixel of the pixel-time-voltage conversion grid image area is converted according to the large grid time-voltage standard of the paper electrocardiogram; the digital signal is converted into a voltage signal using the converted time-voltage value, and the recording time is calculated; the voltage signal is resampled according to the recording time and the sampling rate to obtain a digital reconstructed electrocardiogram signal; repeat the conversion, conversion and resampling steps to traverse all lead (I, II, III, aVL, aVR, aVF and V1-V6) digital signals to obtain the reconstructed electrocardiogram signal of each lead.
[0133] S501, difference dimension reduction processing
[0134] coordinate the pixel-time-voltage conversion grid image area R g with a length of P and a width of Q, taking its length as the coordinate horizontal axis (X axis) representing the distribution of the electrocardiogram waveform on the time axis; taking its width as the coordinate vertical axis (Y axis) representing the distribution of the electrocardiogram waveform on the voltage axis; and setting the lower left corner position as the coordinate axis origin R0 g ,0 .
[0135] coordinate each pixel in the pixel-time-voltage conversion grid image area R g . Specifically, each pixel in the pixel-time-voltage conversion grid image area is assigned a unique coordinate value (x, y), where x represents the position of the pixel on the horizontal axis (X axis) and y represents the position of the pixel on the vertical axis (Y axis). The result of coordinate processing is a two-dimensional array or matrix containing the coordinate information of each pixel in the grid.
[0136] Specifically, the two-dimensional grid data can be converted into a one-dimensional array by calculating the sum of each row of pixel values, achieving dimension reduction to simplify data and reduce calculation while retaining the main features of the electrocardiogram waveform as much as possible.
[0137] First, the pixel-time-voltage conversion grid image area R gIterate through each row in the array, calculating the sum of pixel values row by row. From left to right, that is, along the horizontal axis (X-axis), calculate the sum of all pixel values at each horizontal axis position (i.e., each row).
[0138] Secondly, the sum of the calculated pixel values for each row is used as an element of the ECG grid differential dimensionality reduction array G, thus constructing the ECG grid differential dimensionality reduction array G. The value of each element reflects the intensity of the ECG waveform at the corresponding position in the ECG grid, thereby achieving differential dimensionality reduction of the grid data. The ECG grid differential dimensionality reduction array G not only simplifies the data but also retains the main features of the ECG waveform, which can be used to analyze the distribution and changes of the ECG waveform on the time axis.
[0139] S502, Peak Detection and Pixel Spacing Calculation
[0140] Since peak detection algorithms can identify local maxima in an array, these maxima typically correspond to peak locations on a paper electrocardiogram (ECG). This paper applies the peak detection algorithm to a differentially reduced-dimensional array G of an ECG grid.
[0141] Specifically, the pixel spacing G of a large grid cell in a paper electrocardiogram (ECG) grid is detected from the differential dimensionality-reduced array G of the ECG grid using a peak detection algorithm. d This is used for subsequent time-voltage conversion.
[0142] The "large grids" on a paper electrocardiogram (ECG) are standardized cells used to mark time and space scales, specifically time and voltage. On an ECG, the horizontal axis represents time, and the vertical axis represents voltage. For the horizontal axis, each large grid represents a fixed time length (typically 0.2 seconds), and for the vertical axis, each large grid represents a fixed voltage amplitude (typically 0.5 mV). Furthermore, each large grid is evenly divided into 5 smaller grids (5 horizontal grids = 0.2 seconds, 5 vertical grids = 0.5 mV), forming a fine scale of 0.04 seconds / small grid and 0.1 mV / small grid.
[0143] S503, Time-Voltage Calculation
[0144] Each large grid is assigned a time S seconds and a voltage T millivolts. Based on the large grid time-voltage standard for paper electrocardiograms, the time and voltage values for each pixel can be calculated.
[0145] Specifically, each pixel corresponds to a time S p The calculation formula is: Time S p The unit is seconds; each pixel corresponds to a voltage T. p The calculation formula is: Voltage T p The unit is millivolt.
[0146] S504, converting the digitized signal and resampling the voltage signal
[0147] the digitized signal R d is converted into a voltage signal R dv with explicit physical meaning, and the recording time S d of the digitized signal R tmp is calculated.
[0148] According to the calculation formula of the voltage corresponding to each pixel obtained in step S503 Each pixel value in the digitized signal R d is traversed, each pixel value in the digitized signal R d is converted into a corresponding voltage value, and these voltage values are combined into a new voltage signal R dv .
[0149] According to the calculation formula of the time corresponding to each pixel obtained in step S503 The time length of the electrocardiogram waveform corresponding to the digitized signal R d , i.e. the recording time S tmp , can be calculated.
[0150] Specifically, the pixel range of the digitized signal R d on the horizontal axis is determined, and then the formula is used to calculate the time length represented by each pixel in the pixel range, and the total recording time S tmp is obtained by accumulating these time lengths.
[0151] In one specific embodiment, according to the recording time S tmp and the sampling rate fs, the voltage signal R dv is resampled to obtain the digitized reconstructed electrocardiogram signal R dECG .
[0152] According to the recording time S tmp and the sampling rate fs, the length of the voltage signal R dv is resampled to fs*S tmp to obtain the digitized reconstructed electrocardiogram signal R dECG . The reconstructed electrocardiogram signal R dECG has the same time length and sampling rate as the original electrocardiogram waveform.
[0153] S505, traversing and reconstructing the lead signal
[0154] For the digitized signal represented by each lead pixel position, the steps of S503-S504 are repeated to obtain the reconstructed electrocardiogram signal of each lead. For example, the I lead reconstructed electrocardiogram signal Rd-I-ECG reconstructed electrocardiosignal R d-II-ECG and so on, which provide reliable data basis for subsequent electrocardiogram analysis and prediction.
[0155] In particular, the digitalized signal R Id reconstructed electrocardiosignal R IId reconstructed electrocardiosignal R IIId reconstructed electrocardiosignal R aVLd reconstructed electrocardiosignal R aVRd reconstructed electrocardiosignal R aVFd reconstructed electrocardiosignal R V1d reconstructed electrocardiosignal R V2d reconstructed electrocardiosignal R V3d reconstructed electrocardiosignal R V4d reconstructed electrocardiosignal R V5d reconstructed electrocardiosignal R V6d and the steps S503-S504 are performed respectively;
[0156] reconstructed electrocardiosignal R d-I-ECG reconstructed electrocardiosignal R d-II-ECG reconstructed electrocardiosignal R d-iII-ECG reconstructed electrocardiosignal R d-aVL-ECG reconstructed electrocardiosignal R d-aVR-ECG reconstructed electrocardiosignal R d-aVF-ECG reconstructed electrocardiosignal R d-V1-ECG reconstructed electrocardiosignal R d-V2-ECG reconstructed electrocardiosignal R d-V3-ECG reconstructed electrocardiosignal R d-V4-ECG reconstructed electrocardiosignal R d-V5-ECG reconstructed electrocardiosignal R d-V6-ECG .
[0157] In summary, the electrocardiogram grid processing and signal reconstruction method of step S5 not only improves the accuracy and reliability of the digitized signal, but also provides strong support for subsequent electrocardiogram analysis, diagnosis and disease prediction. By processing the pixel-time-voltage conversion grid image area, the obtained digitized signal is converted into a reconstructed electrocardiogram signal with a clear time stamp and voltage value, so as to facilitate subsequent electrocardiogram analysis, diagnosis and disease prediction. By establishing the mapping relationship between the pixel position and the physical dimension, the conversion of the image space information to the continuous time sequence signal is realized.
[0158] The above has described the present application and its embodiments in a schematic manner, which is not restrictive, and the present application can be realized in other specific forms without departing from the spirit or essential characteristics of the present application. The embodiments shown in the drawings are only one of the embodiments of the present application, and the actual structure is not limited thereto, and any reference signs in the claims should not limit the claims involved. Therefore, if a person skilled in the art is inspired by it, without departing from the spirit of the present application, similar structure and embodiments can be designed without creative design, which should belong to the protection scope of the present patent. In addition, the word "comprising" does not exclude other elements or steps, and the word "one" before the element does not exclude "multiple" elements. The multiple elements stated in the product claim can also be realized by one element through software or hardware. The words "first", "second" and the like are used to indicate names, and do not indicate any specific order.
Claims
1. A paper electrocardiogram voltage value reconstruction method based on a dynamic diffusion threshold, comprising the following steps: obtaining a standard paper electrocardiogram and a paper electrocardiogram to be processed, and extracting paper electrocardiogram parameters; based on a preset threshold, an optimal threshold is obtained by iterative optimization to perform binaryzation processing on the paper electrocardiogram to be processed, and a binaryzation paper electrocardiogram is obtained; each lead image area and a corresponding pixel-time-voltage conversion grid image area are cut from the binaryzation paper electrocardiogram to realize lead position positioning of an electrocardiogram waveform; electrocardiogram waveform information of the lead image area is converted into a digital signal; the pixel-time-voltage conversion grid image area is subjected to differential dimension reduction processing; a time-voltage value corresponding to each pixel in the pixel-time-voltage conversion grid image area after the differential dimension reduction processing is obtained by using a wave peak detection algorithm, the obtained digital signal is converted into a voltage signal; the voltage signal is resampled to obtain a digital reconstructed electrocardiogram signal; wherein the standard binaryzation paper electrocardiogram and the paper electrocardiogram to be processed are divided by a preset integer multiple; The standard binary paper electrocardiogram is divided to obtain image blocks sequentially marked from left to right and from top to bottom as The paper electrocardiogram to be processed is divided to obtain image blocks sequentially marked from left to right and from top to bottom as i represents a row number, and j represents a column number. the binaryzation processing of the paper electrocardiogram to be processed includes primary binaryzation, secondary binaryzation and tertiary binaryzation; The step of initial binarization includes: carrying out gray processing on a first image block of the paper electrocardiogram to be processed carrying out gray processing; presetting a threshold value for the gray-processed carrying out binarization processing; The step of secondary binarization includes: setting a threshold diffusion factor to update a threshold, using the updated threshold to perform secondary binarization processing on the image the image the steps of the tertiary binaryzation include: performing tertiary binaryzation processing according to the results of the primary binaryzation and the secondary binaryzation; The step of performing the third binarization according to the results of the first binarization and the second binarization includes: calculating a change amount of the signal-to-noise ratio difference of the first binarization and the signal-to-noise ratio difference of the second binarization as a change coefficient; adjusting a threshold diffusion factor by a ratio of the change coefficient to the signal-to-noise ratio difference of the second binarization to obtain an adjusted threshold diffusion factor; updating a threshold value using the adjusted threshold diffusion factor and performing the third binarization on the image using the updated threshold value. The third binarization is performed. 2.The paper electrocardiogram voltage value reconstruction method based on a dynamic diffusion threshold according to claim 1, characterized in that: the binaryzation processing is iterated, and when the absolute value of a change coefficient of two consecutive iterations is less than or equal to a signal-to-noise difference threshold, the iteration is terminated, and the threshold at this time is an optimal threshold; the paper electrocardiogram to be processed is binaryzation processed using the optimal threshold to obtain a binaryzation paper electrocardiogram. 3.The paper electrocardiogram voltage value reconstruction method based on a dynamic diffusion threshold according to claim 1, characterized in that: the steps of the lead position positioning of the electrocardiogram waveform include: rotating the binaryzation paper electrocardiogram to obtain a horizontal binaryzation paper electrocardiogram; the row pixels and the column pixels of the horizontal binaryzation paper electrocardiogram are summed respectively, and the lead position and the QRS wave peak position are determined by combining a wave peak detection algorithm; according to the determined lead position and coordinates, the image area and the pixel-time-voltage conversion grid area of each lead are cut from the horizontal binaryzation paper electrocardiogram. 4.The paper electrocardiogram voltage value reconstruction method based on a dynamic diffusion threshold according to claim 3, characterized in that: the steps of obtaining the horizontal binaryzation paper electrocardiogram include: rotating the binaryzation paper electrocardiogram in a range of -90 degrees to 90 degrees, and calculating the row pixel sum of the rotated binaryzation paper electrocardiogram at each rotation angle; the row pixel sums at each rotation angle are compared, and the rotation angle that makes the row pixel sum minimum is found as the horizontal angle to obtain the horizontal binaryzation paper electrocardiogram. 5.The paper electrocardiogram voltage value reconstruction method based on a dynamic diffusion threshold according to claim 1, characterized in that: The step of converting the electrocardiogram waveform information into a digitized signal includes: coordinating the lead image area and converting each pixel position of the lead image area into a coordinate value for extraction of the digitized signal, and obtaining the digitized signal represented by each pixel position of the lead image area.
6. The paper electrocardiogram voltage value reconstruction method based on dynamic diffusion threshold according to claim 1, characterized in that: The step of differential dimension reduction processing includes: coordinate processing of the pixel-time-voltage conversion grid image area; The sum of each row of pixel values in the pixel-time-voltage conversion grid image area is calculated, and the two-dimensional grid data is converted into a one-dimensional array; The sum of each row of pixel values is taken as an element to construct an electrocardiogram grid differentiation dimension reduction array , and the grid data is differentiated and dimensionally reduced.
7. The system for reconstructing paper electrocardiogram voltage values based on dynamic diffusion threshold according to any one of claims 1-6, characterized in that: The data acquisition module is used to acquire the standard paper electrocardiogram and the paper electrocardiogram to be processed, and extract the paper electrocardiogram parameters; The binarization processing module is used to obtain the optimal threshold through iterative optimization based on the preset threshold, and perform binarization processing on the paper electrocardiogram to be processed to obtain the binarized paper electrocardiogram; The digitized signal conversion module is used to intercept each lead image area and the corresponding pixel-time-voltage conversion grid image area from the binarized paper electrocardiogram, realize the electrocardiogram waveform lead position positioning, and convert the electrocardiogram waveform information of the lead image area into a digitized signal; The reconstruction module is used to perform differential dimension reduction processing on the pixel-time-voltage conversion grid image area; The wave peak detection algorithm is used to obtain the time-voltage value corresponding to each pixel in the pixel-time-voltage conversion grid image area after differential dimension reduction processing, convert the obtained digitized signal into a voltage signal, resample the voltage signal, and obtain the digitized reconstructed electrocardiogram signal.
Citation Information
Patent Citations
Electrocardiogram digital conversion system, method and conversion equipment
CN113397553A
Paper electrocardiogram digitization method and device
CN115272112A
Paper electrocardiogram analysis method and device, electronic equipment and storage medium
CN117078628A
Electrocardiosignal identification method and device, electronic equipment and readable storage medium
CN118662142A