Paper electrocardiogram voltage value reconstruction method and system based on dynamic diffusion threshold
The paper electrocardiogram is adaptively binarized by the dynamic diffusion threshold method, which solves the problem that digital data does not accurately reflect the original information, and realizes the accurate reproduction of the electrocardiogram waveform and the improvement of the digital quality.
Patent Information
- Application Number
- CN202510318904.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-03-18
AI Technical Summary
The prior art is difficult to ensure that digital data correctly reflects the original information of paper electrocardiograms, especially in the case of blurred images, uneven light or paper aging, which leads to inaccurate line identification and waveform distortion, affecting the accuracy and credibility of diagnostic results.
Using a method based on dynamic diffusion threshold, the optimal threshold is obtained through iterative optimization, and the paper electrocardiogram is adaptively binarized, and the threshold is dynamically adjusted in combination with the diffusion principle to enhance the edge clarity and detail performance of the electrocardiogram waveform in the digitization process, ensuring that the digital data accurately reflects the original information.
The accurate digitization of the electrocardiogram under different conditions is achieved, the accuracy and stability of the binarization results are improved, the digital signal is highly consistent with the shape and characteristics of the original electrocardiogram, and the accuracy of the reproduction of the electrocardiogram is improved.
Smart Images

Figure CN120419974A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electrocardiogram analysis, and more particularly to a method and system for reconstructing paper electrocardiogram voltage values based on a dynamic diffusion threshold. Background Art
[0002] With the continuous advancement of informatization, the electrocardiogram (ECG), a noninvasive cardiac testing method with significant value in assessing cardiac function, has been widely used in cardiac monitoring and scientific research. The ECG records the waveforms of the heart's electrical activity. By analyzing these waveform characteristics, it can accurately monitor cardiac conditions such as arrhythmias, myocardial ischemia, and myocardial infarction.
[0003] Although ECG technology is relatively mature, the management of ECG data is still relatively traditional and currently relies mainly on paper records. These paper ECGs not only take up a large amount of physical storage space, but are also easily affected by environmental factors such as humidity, temperature fluctuations, light, and physical wear during long-term storage, causing the ECG images to fade, blur, be stained, or even missing, which brings great inconvenience to subsequent storage, reading, and analysis. In addition, the retrieval efficiency of paper ECGs is extremely low. When reviewing historical ECG data, it often takes a lot of time to manually flip through them. More importantly, paper ECGs cannot be remotely accessed and shared, which limits the optimal allocation of resources and cross-regional collaboration. Therefore, digitizing paper ECGs to achieve efficient storage, retrieval, and analysis has become an urgent need for ECG data management.
[0004] However, traditional methods for digitizing paper electrocardiograms are usually based on image scanning and binarization processing. For example, Chinese patent document CN115272112A provides a paper electrocardiogram digitization method and device, including: preprocessing an electronic image of a paper electrocardiogram containing twelve lead areas to obtain an electrocardiogram image; separating the lead areas of the electrocardiogram image; refining the electrocardiogram images of each lead area based on an eight-neighborhood sparse outlier removal algorithm and a pre-stored refinement algorithm to obtain an electrocardiogram waveform curve of each lead area; connecting the electrocardiogram waveform curves of each lead area in the lead dimension to obtain a digitized result of the paper electrocardiogram; For example, Chinese patent document CN113397553A provides an electrocardiogram digital conversion method, including the first step of obtaining target image information; the second step of preprocessing the target image information; the third step of supplementing the target image information sampling data points; the fourth step of verifying the sampled data points; and the fifth step of storing and outputting the sampled data point data group information. The paper electrocardiogram data is converted into a digitized electrocardiogram waveform. While these methods can extract ECG lines as digital signals, their effectiveness in practical applications is significantly limited. On the one hand, paper ECGs may generate noise during scanning, such as blurred images, uneven lighting, or paper creases, which directly affect the quality of binarization. On the other hand, because the color depth and thickness of ECG lines may change due to paper aging, traditional fixed threshold or artificial intelligence binarization methods are difficult to adapt to ECG images under different conditions, resulting in inaccurate line recognition and waveform distortion, which in turn affects the accuracy and credibility of diagnostic results.
[0005] As can be seen from the above, the relevant technology does not provide any technical inspiration on how to ensure that the digital data can correctly reflect the original information of the paper electrocardiogram. Summary of the Invention
[0006] 1. Technical problems to be solved
[0007] In response to the problem in the prior art of how to ensure that digitized data can correctly reflect the original information of a paper electrocardiogram, the present invention provides a method and system for reconstructing paper electrocardiogram voltage values based on a dynamic diffusion threshold. This method can adaptively adjust the threshold for different image areas, avoiding the limitations brought by a fixed threshold. Combining the diffusion principle, the threshold for image processing is dynamically adjusted according to the local characteristics of the paper electrocardiogram, so that the edges of the electrocardiogram waveform are clearer and the details are richer during the digitization process, thereby ensuring that the digitized data can accurately reflect the original information of the paper electrocardiogram.
[0008] 2. Technical solution
[0009] The purpose of the present invention is achieved through the following technical solutions.
[0010] The content of this application is used to briefly introduce concepts that will be described in detail in the detailed description section below. The content of this application is not intended to identify key features or essential features of the technical solution for which protection is sought, nor is it intended to limit the scope of the technical solution for which protection is sought.
[0011] Some embodiments of the present application propose a voltage value reconstruction method and system based on a dynamic diffusion threshold to solve the technical problems mentioned in the above background technology section.
[0012] As a first aspect of the present application, some embodiments of the present application provide a method for reconstructing paper electrocardiogram voltage values 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, iteratively optimizing to obtain an optimal threshold to binarize the paper electrocardiogram to be processed, and obtain a binarized paper electrocardiogram; intercepting each lead image area and the corresponding pixel-time-voltage conversion grid image area from the binarized paper electrocardiogram to achieve ECG waveform lead position positioning; converting the ECG waveform information of the lead image area into a digital signal; performing differential dimensionality reduction processing on the pixel-time-voltage conversion grid image area; using a peak detection algorithm to obtain the time-voltage value corresponding to each pixel in the pixel-time-voltage conversion grid image area after differential dimensionality reduction processing, and converting the obtained digitized signal into a voltage signal; resampling the voltage signal to obtain a digitally reconstructed ECG signal.
[0013] Furthermore, the standard binary paper electrocardiogram and the paper electrocardiogram to be processed are divided according to a preset integer multiple;
[0014] The standard binary paper electrocardiogram is divided into two parts and marked as BBZ from left to right and from top to bottom. i,j The image blocks to be processed are divided into two parts, which are marked as DBZ from left to right and from top to bottom. i,j The image block is represented by i, i represents the row number, and j represents the column number.
[0015] Furthermore, the process of binarizing the paper electrocardiogram to be processed includes primary binarization, secondary binarization and tertiary binarization;
[0016] The initial binarization steps include: the first image block BBZ of the paper electrocardiogram to be processed 1,1 Perform grayscale processing; preset threshold value for BBZ after grayscale processing 1,1 Perform binarization processing.
[0017] The steps of secondary binarization include: setting the threshold diffusion factor to update the threshold, using the updated threshold to BBZ 1,1 Perform secondary binarization processing.
[0018] The step of the third binarization includes: performing a third binarization process according to the results of the first binarization and the second binarization.
[0019] Furthermore, the step of performing a third binarization process based on the results of the primary binarization and the secondary binarization includes: calculating a variation of the signal-to-noise ratio difference of the primary binarization and the signal-to-noise ratio difference of the secondary binarization as a variation coefficient; adjusting a threshold diffusion factor by a ratio of the variation coefficient to the signal-to-noise ratio difference of the secondary binarization to obtain an adjusted threshold diffusion factor; and updating the threshold value using the adjusted threshold diffusion factor and adjusting the DBZ. 1,1 Perform binarization three times.
[0020] Furthermore, the binarization process is repeated iteratively. When the absolute value of the coefficient of variation of two consecutive iterations is less than or equal to the signal-to-noise ratio difference threshold, the iteration is terminated and the threshold at this time is the optimal threshold.
[0021] The paper electrocardiogram to be processed is binarized using the optimal threshold to obtain a binary paper electrocardiogram.
[0022] Furthermore, the step of locating the position of the ECG waveform lead includes: rotating the binary paper ECG to obtain a horizontal binary paper ECG;
[0023] The row pixels and column pixels of the horizontally binary paper ECG are summed separately, and the lead position and QRS peak position are determined by combining the peak detection algorithm;
[0024] According to the determined lead positions and coordinates, the image area and pixel-time-voltage conversion grid area of each lead are cut out from the horizontally binarized paper electrocardiogram.
[0025] Furthermore, the step of obtaining a horizontally binarized paper electrocardiogram includes: rotating the binarized paper electrocardiogram within 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] Compare the row pixel sums at each rotation angle, find the rotation angle that minimizes the row pixel sum as the horizontal angle, and obtain the horizontal binary paper electrocardiogram.
[0027] Furthermore, the step of converting the ECG waveform information into a digital signal includes: coordinate-izing the lead image area and converting each pixel position of the lead image area into a coordinate value to extract the digital signal and obtain the digital signal represented by each pixel position of the lead image area.
[0028] Furthermore, the steps of the differential dimensionality reduction processing include: coordinate processing of the pixel-time-voltage conversion grid image area;
[0029] Calculate the sum of the pixel values of each row in the pixel-time-voltage conversion grid image area and convert the two-dimensional grid data into a one-dimensional array;
[0030] The sum of the pixel values in each row is taken as an element to construct the electrocardiogram grid differential dimensionality reduction array G to achieve differential dimensionality reduction of the grid data.
[0031] As a second aspect of the present application, some embodiments of the present application provide a system for a method 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] Binarization processing module: Based on the preset threshold, iterative optimization is performed to obtain the optimal threshold to perform binarization processing on the paper electrocardiogram to be processed, thereby obtaining a binary paper electrocardiogram;
[0033] Digital signal conversion module: extracts each lead image area and the corresponding pixel-time-voltage conversion grid image area from the binary paper ECG to locate the ECG waveform lead position; converts the ECG waveform information in the lead image area into a digital signal;
[0034] Reconstruction module: Perform differential dimensionality reduction processing on the pixel-time-voltage conversion grid image area; use the peak detection algorithm to obtain the time-voltage value corresponding to each pixel in the pixel-time-voltage conversion grid image area after differential dimensionality reduction processing, and convert the obtained digitized signal into a voltage signal; resample the voltage signal to obtain a digitally reconstructed ECG signal.
[0035] 3. Beneficial effects
[0036] Compared with the prior art, the advantages of the present invention are:
[0037] (1) The paper ECG voltage value reconstruction method based on dynamic diffusion threshold of the present invention can adaptively adjust the threshold for different image regions, effectively overcoming the limitations of fixed thresholds in processing diverse and complex ECG images;
[0038] (2) Combining the diffusion principle, this scheme dynamically adjusts the threshold of image processing according to the local characteristics of the paper ECG, thereby enhancing the edge clarity of the ECG waveform during digitization and enriching the detail expression, so that the digitized data can more accurately capture and reflect the original information of the paper ECG, thereby improving the digitization quality of the ECG;
[0039] (3) Based on the actual paper speed and actual unit amplitude, combined with the specific characteristics of the paper electrocardiogram, this solution can convert the digitized signal represented by the pixel position into an electrocardiogram signal represented by time-voltage, thereby achieving accurate reproduction of the electrocardiogram waveform. By accurately locating and quantizing the pixel points in the electrocardiogram image and calculating the corresponding position of each pixel point on the time axis and voltage axis, this solution can ensure that the digitized signal remains highly consistent with the waveform shape and characteristics of the original paper electrocardiogram during the conversion process, thereby achieving accurate reproduction of the electrocardiogram waveform.
[0040] (4) Local ECG of this protocol Figure 2 The binarization method, targeting different noise types in the image, avoids the problem of poor binarization results that may be caused by using a global threshold. By adjusting the threshold locally, the binarization process of the paper ECG is made more flexible and adaptable, thereby improving the accuracy and stability of the binarization results.
[0041] (5) In ECG Figure 2 After quantization, this scheme accurately converts the digitized signal according to the unit time and voltage values of the actual ECG, ensuring that the reconstructed ECG signal is highly similar to the real ECG signal in morphology and characteristics, further improving the accuracy of the signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a flow chart of a method for reconstructing paper electrocardiogram voltage values based on dynamic diffusion threshold in one embodiment of the present invention;
[0043] Figure 2 Schematic diagram of the steps of a method for reconstructing paper electrocardiogram voltage values based on dynamic diffusion threshold in one embodiment of the present invention;
[0044] Figure 3 A paper ECG based on local dynamic diffusion threshold in one embodiment of the present invention Figure 2 Schematic diagram of value;
[0045] Figure 4 A schematic diagram of the positioning and digitization of ECG waveform leads in one embodiment of the present invention;
[0046] Figure 5 A schematic diagram of a rectangular area divided in one embodiment of the present invention;
[0047] Figure 6 Schematic diagram of three electrocardiogram arrangements in one embodiment of the present invention. DETAILED DESCRIPTION
[0048] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0049] Combine Figures 1 to 6The paper electrocardiogram voltage value reconstruction method based on dynamic diffusion threshold of the present invention 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, iteratively optimizing to obtain an optimal threshold to binarize the paper electrocardiogram to be processed, and obtain a binary paper electrocardiogram; intercepting each lead image area and the corresponding pixel-time-voltage conversion grid image area from the binary paper electrocardiogram to realize ECG waveform lead position positioning; converting the ECG waveform information of the lead image area into a digital signal; performing differential dimensionality reduction processing on the pixel-time-voltage conversion grid image area; using a peak detection algorithm to obtain the time-voltage value corresponding to each pixel in the pixel-time-voltage conversion grid image area after differential dimensionality reduction processing, and converting the obtained digitized signal into a voltage signal; resampling the voltage signal to obtain a digital reconstructed ECG signal.
[0050] In a specific embodiment, the specific process of the paper electrocardiogram voltage value reconstruction method based on dynamic diffusion threshold is as follows:
[0051] S1. Data acquisition:
[0052] Obtain a standard paper electrocardiogram (BBZ) and a digitized binary format electrocardiogram (DBZ) to be processed, and extract the paper electrocardiogram parameters. By obtaining the standard paper electrocardiogram, a reference benchmark is provided for the paper electrocardiogram to be processed, ensuring the consistency and accuracy of the voltage value reconstruction process in the subsequent steps.
[0053] Specifically, the standard paper ECG is a two-dimensional binary matrix that meets the IEC 60601-2-51 international standard. Its spatial dimensions are defined as an X × Y pixel array, i.e., a standard paper ECG that has been pre-binarized with dimensions of length X and width Y. The processed paper ECG is the raw, undigitized grayscale image matrix, i.e., the ECG record to be converted into a binary image. Its original form must be retained for subsequent steps.
[0054] Paper ECG parameters include the acquisition rate fs (unit: Hz, defined according to ISO 5726) and scale information.
[0055] Specifically, the acquisition rate is the sampling frequency of the ECG signal, measured in Hertz (Hz), which defines the number of ECG data points collected from the ECG recording per second. For example, fs = 500 Hz means that 500 data points are captured per second.
[0056] The scale information includes time parameters and voltage parameters. The paper ECG is equipped with a ruler to assist in interpretation. For a standard paper ECG, each grid on the ruler represents 0.2 seconds, and the time corresponding to each grid in the paper ECG scale is used as a time parameter to convert the time mark on the image into an actual time unit. A linear mapping relationship between the image pixel coordinate system and the actual time is established to ensure accurate interpretation of the ECG time information. Similarly, for a standard paper ECG, each grid on the ruler represents 0.5 millivolts (mV), and the voltage corresponding to each grid in the paper ECG scale is used as a voltage parameter to convert the image voltage mark into an actual voltage unit. A voltage scale mapping relationship is established to ensure accurate interpretation of the ECG voltage information.
[0057] S2. Paper ECG based on local dynamic diffusion threshold Figure 2 Value:
[0058] A multi-scale superpixel segmentation strategy was used to perform regional adaptive processing on the standard binary paper electrocardiogram (BBZ) and the processed paper electrocardiogram (DBZ), and a dynamic threshold iterative optimization framework was constructed.
[0059] Specifically, the standard binarized paper ECG and the paper ECG to be processed are divided into multiple rectangular areas for refined local processing; each rectangular area 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, and the paper ECG to be processed is binarized using the optimal threshold to obtain a binarized paper ECG.
[0060] In a specific embodiment, a paper ECG based on local dynamic diffusion threshold Figure 2 The specific process of value conversion is as follows:
[0061] S201, image segmentation
[0062] The standard binary paper electrocardiogram (BBZ) and the paper electrocardiogram to be processed (DBZ) are divided for subsequent local processing.
[0063] Specifically, the standard binary paper ECG and the unprocessed paper ECG are divided using a magnification of N. The magnification 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 the user is allowed to select an appropriate division magnification based on the specific conditions of the image and processing requirements. The specific division process is as follows:
[0064] Divide the image along its length X and width Y directions to ensure that the image is evenly cut into multiple rectangular areas;
[0065] like Figure 5As shown in Figure 1, the divided rectangular regions are divided into four types according to the edge and internal features of the image. Each type of rectangular region is different in size and position to adapt to different parts of the image.
[0066] Specifically, the first type contains (N-1)×(N-1) rectangles. The length of these rectangles is the integer part of 1 / N of the original image length X, and the width of these rectangles is the integer part of 1 / N 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 5 As shown, the first type of rectangles are (N-1)×(N-1) rectangles located from the first row to the (N-1)th row and from 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. Figure 5 As shown, the second type of rectangles are located in the lower edge area of the image, that is, the (N-1) rectangle 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.
[0069] The third type also contains (N-1) rectangles, each of which has 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), that is, the width is Y-(N-1)×(Y / / N). Figure 5 As shown, the third type of rectangle is located in the right edge area 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 division unit, and the width is equal to the original image width Y minus N-1 times the width division unit, that is, the length is X-(N-1)×(X / / N), and the width is Y-(N-1)×(Y / / N). Figure 5 As shown, this rectangle is located at the lower right corner of the image, that is, the rectangle located at the Nth row and Nth column of the image, covering the rest of the image.
[0071] Specifically, in order to facilitate subsequent processing, each rectangular area of the standard binary paper electrocardiogram and the paper electrocardiogram to be processed is marked. For the standard binary paper electrocardiogram, the divided rectangular areas are marked as image blocks BBZ from left to right and from top to bottom.i,j Similarly, for the paper electrocardiogram to be processed, the divided rectangular areas are marked as image blocks DBZ from left to right and from top to bottom i,j Where i represents the row number and j represents the column number; the value of i ranges from 1 to N, and the value of j ranges from 1 to the number of columns determined by the image width and division method.
[0072] More specifically, for a standard binary paper ECG, the image blocks marked in the first row are BBZ from left to right. 1,1 ,BBZ 1,2 ,BBZ 1,3 ,......,BBZ 1,N ; The image blocks marked in the first column are BBZ from top to bottom 1,1 ,BBZ 2,1 ,BBZ 3,1 ,......,BBZ N,1 The marking process continues in this way until the entire standard binary paper electrocardiogram is completed.
[0073] For the paper electrocardiogram to be processed, the image blocks marked in the first row are BBZ from left to right. 1,1 ,BBZ 1,2 ,BBZ 1,3 ,......; the image blocks marked in the first column are DBZ from top to bottom 1,1 , DBZ 2,1 , DBZ 3,1 ,......,DBZ N,1 . And so on, mark the entire paper ECG to be processed.
[0074] S202, initial binarization
[0075] The first image block BBZ of the paper electrocardiogram to be processed 1,1 Convert from a color image to a first binarized image.
[0076] First, the first image block BBZ of the paper electrocardiogram to be processed 1,1 Perform grayscale processing and convert the image block BBZ 1,1 Convert from a color image to a grayscale image.
[0077] Each pixel value in a grayscale image represents the brightness of that location, typically ranging from 0 (black) to 255 (white).
[0078] In order to convert the grayscale image into the primary binary image, an initial threshold α is preset, and the threshold α is used to process the grayscale image block BBZ. 1,1The image is binarized to obtain the initial binarized image. The threshold α determines which pixels will be considered as foreground (such as the electrocardiogram waveform, usually set to white) and which pixels will be considered as background (such as the paper part, usually set to black).
[0079] Specifically, the process of using thresholds to binarize a grayscale image is as follows: traverse each pixel in the grayscale image and compare the pixel value of each pixel in the grayscale image with the preset threshold α; if the pixel value is greater than or equal to the threshold α, then set the pixel to white (1); if the pixel value is less than the threshold α, then set the pixel to black (0). In this way, the initial binarized image is obtained.
[0080] More specifically, the effectiveness of binarization can be evaluated by calculating the signal-to-noise ratio (SNR) and comparing the difference between the image before and after binarization. The SNR of an image is the ratio of signal power to noise power, reflecting the contrast between the foreground and background in the image.
[0081] In a specific embodiment, the contrast between the foreground (e.g., electrocardiogram waveform) and the background (e.g., paper portion) in the image is calculated to approximate the signal-to-noise ratio of the image. Therefore, it is necessary to calculate the signal-to-noise ratio of the image before and after binarization, including calculating DBZ 1,1 Signal-to-noise ratio (BSNR) 1,1 and calculate BBZ 1,1 Signal-to-noise ratio (DSNR) 1,1 .
[0082] S203, secondary binarization
[0083] After the initial binarization process, i.e., the first iteration, the threshold diffusion factor is used to update the initial threshold, and the adaptive adjustment of the threshold is constructed to realize the signal-to-noise ratio driven threshold diffusion process.
[0084] Specifically, a threshold diffusion factor β is set, the threshold α is updated to α*β, and the threshold is gradually adjusted during the iteration process to obtain a better binarization effect. The selection of the threshold diffusion factor β can be based on experimental data. In this embodiment, the threshold diffusion factor β is greater than 1.
[0085] In a specific embodiment, the updated threshold α*β is used to evaluate the image block DBZ. 1,1 Perform secondary binarization. At this time, the number of iterations is 2, and the image block DBZ after secondary binarization is calculated. 1,1 Signal-to-noise ratio (BSNR) 1,1 and BBZ 1,1 Signal-to-noise ratio (DSNR) 1,1 ; and calculate the BSNR at this time 1,1 and DSNR 1,1The difference between , to get the updated signal-to-noise ratio difference Distance2SNR 1,1 .
[0086] Through the above steps, the secondary binarization processing of the image block, that is, the second iteration, is completed, and the signal-to-noise ratio difference is updated, providing a basis for subsequent iterative optimization.
[0087] S204, threshold diffusion factor adjustment
[0088] Intelligent regulation of the diffusion factor is achieved by quantifying the benefit changes during the iterative process.
[0089] Specifically, by comparing the difference in signal-to-noise ratio between two iterations, i.e., two binarization processes, we can adjust the threshold diffusion factor β to optimize the subsequent iteration process. Calculate the change in the difference in signal-to-noise ratio before and after the two binarization processes, i.e., Distance1SNR 1,1 and Distance2SNR 1,1 The difference Dis 12 SNR 1,1 ,This difference reflects the changing trend of the signal-to-noise ratio difference from the first iteration to the second iteration.
[0090] Use the difference Dis calculated above 12 SNR 1,1 as the coefficient of variation and by the coefficient of variation Dis 12 SNR 1,1 The difference between the signal-to-noise ratio of the second iteration and Distance2SNR 1,1 The threshold diffusion factor β is adjusted by the ratio of
[0091] Through the above steps, a mathematical mapping relationship between the evolution of the signal-to-noise ratio and the adjustment of the diffusion factor is established, and the adaptability of the threshold update in the binarization process is achieved.
[0092] S205, three-dimensional binarization
[0093] Based on the adjusted threshold diffusion factor, the threshold is updated again; the updated threshold is used to adjust the image block DBZ 1,1 Perform binarization three times and calculate the relevant signal-to-noise ratio and signal-to-noise ratio difference. The detailed process is as follows:
[0094] The number of iterations at this time is 3, using the adjusted threshold diffusion factor And the initial threshold α is used to calculate the updated threshold, and the threshold α is updated to And using the updated threshold DBZ 1,1 Perform three binarization processes.
[0095] Calculate DBZ after three binarizations 1,1 and BBZ 1,1 Signal-to-noise ratio, BSNR 1,1 and DSNR 1,1 , and calculate the signal-to-noise ratio difference Distance3SNR of the third iteration at this time 1,1 .
[0096] Through the above steps, the three-time binarization processing of the image block is completed, and the signal-to-noise ratio difference is updated, providing a basis for subsequent iterative optimization.
[0097] S206, Iterative Optimization and Global Binarization
[0098] Repeat the above-mentioned process of step S202 to step S205. In such a repeated iterative process, the threshold value is updated, the binarization process is performed, and the signal-to-noise ratio difference is calculated for each iteration, and the signal-to-noise ratio difference calculated for each iteration is recorded.
[0099] The signal-to-noise ratio difference threshold value DisSNR is set to determine whether the binarization process has reached a preset target threshold value of the convergence condition. In this embodiment, the signal-to-noise ratio difference threshold value DisSNR can be set to 0.01.
[0100] Specifically, during the iteration process, when the absolute value of the coefficient of change between 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 number of iterations is m, where m is a positive integer, and DisSNR is the maximum value of the signal-to-noise ratio difference threshold DisSNR. (m-1)m SNR 1,1 The absolute value of is less than or equal to the preset signal-to-noise ratio difference DisSNR. At this time, the threshold is the optimal threshold that makes the image to be binarized closest to the standard binarized image, and can achieve the optimal binarization result of the paper electrocardiogram to be binarized.
[0101] Once the optimal threshold is found, the paper electrocardiogram to be processed (DBZ) is binarized using the optimal threshold to obtain the final binarized paper electrocardiogram.
[0102] Specifically, all previously divided rectangular regions are traversed and the optimal threshold is applied to each region for binarization. Since each region may have a different optimal threshold, it is necessary to record and apply the optimal threshold for each region. After all regions are binarized, the paper ECG to be binarized is completely binarized, resulting in the final binarized paper ECG.
[0103] S3. ECG waveform lead position positioning:
[0104] Calculate the row pixel sum of the binary paper ECG to initially obtain ECG features; determine the horizontal angle of the ECG by rotating the binary paper ECG and calculating the row pixel sum at each angle, and obtain a horizontal binary paper ECG; sum the row pixels and column pixels of the horizontal binary paper ECG respectively, and combine the peak detection algorithm to determine the lead position and QRS peak position; based on the determined lead position and coordinates, extract the image area and pixel-time-voltage conversion grid area of each lead from the horizontal binary paper ECG. The specific process is as follows:
[0105] S301. Calculate the row pixels and Hps of the binary paper electrocardiogram:
[0106] For each row in the binary paper electrocardiogram, the number of pixels is calculated; the pixel sum of each row is stored in sequence in the row pixel sum list Hp, where 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] Add the row pixels and the values of all elements in the list Hp to obtain the row pixels and Hps of the binary paper electrocardiogram.
[0108] Since the ECG waveform is usually displayed as a series of continuous black or white pixels in the image, each element in the Hp list (i.e., the sum of pixels in each row) can reflect the intensity or density of the ECG waveform in that row; in addition, Hps, as an overall indicator, can evaluate the waveform intensity or density of the entire ECG.
[0109] S302. Lead Positioning and Feature Extraction:
[0110] First, the binary paper ECG is rotated in the range of -90 degrees to 90 degrees, and the row pixels and Hps of the rotated binary paper ECG at each rotation angle are calculated. angle ;
[0111] Comparison of row pixels and Hps at different rotation angles angie , find the row pixels and Hps angle The minimum rotation angle is the horizontal angle of the binary paper electrocardiogram, from which a horizontal binary paper electrocardiogram can be obtained.
[0112] In a specific embodiment, the rotation step size is 1 degree or 0.5 degree to cover the entire possible rotation range.
[0113] Through the above steps, image space posture correction is achieved to ensure that the binary paper electrocardiogram is in the correct horizontal position in subsequent processing.
[0114] After obtaining the horizontally binarized paper electrocardiogram, each row and each column of the horizontally binarized paper electrocardiogram are traversed respectively, and the row pixel sum is calculated to obtain a new row pixel sum list Hp′, and the column pixel sum is calculated to obtain a column pixel sum list Lp.
[0115] Specifically, the lead position and QRS peak position are obtained by combining the row pixel list Hp′, the column pixel list Lp and the peak detection algorithm; and the coordinates of each lead position are located according to the lead position and the QRS peak position.
[0116] Based on the obtained coordinates of each lead position, the lead image area and the pixel-time-voltage conversion grid area are cut out from the horizontally binarized paper electrocardiogram.
[0117] Specifically, the pixel-time-voltage conversion grid image area is named R g ; The image area of lead I is R I , the image area of lead II is R II , the image area of lead III is R III , the image area of lead aVL is R aVL , the image area of lead aVR is R aVR , the image area of lead aVF is R aVF , the image area of lead V1 is R V1 , the image area of lead V2 is R V2 , the image area of lead V3 is R V3 , the image area of lead V4 is R V4 , the image area of lead V5 is R V5 , the image area of lead V6 is R V6 .
[0118] In a specific embodiment, the electrocardiogram includes multiple leads, each of which reflects the electrical activity of a different part of the heart. Figure 6 In the electrocardiogram shown, the I lead image is the area where lead I is located, the II lead image is the area where lead II is located, the III lead image is the area where lead III is located, the aVL lead image is the area where lead aVL is located, the aVR lead image is the area where lead aVR is located, the aVF lead image is the area where lead aVF is located, the V1 lead image is the area where lead V1 is located, the V2 lead image is the area where lead V2 is located, the V3 lead image is the area where lead V3 is located, the V4 lead image is the area where lead V4 is located, the V5 lead image is the area where lead V5 is located, and the V6 lead image is the area where lead V6 is located.
[0119] More specifically, extracting the lead image region means separating the waveform portion corresponding to each lead from the entire ECG. These regions will be used for subsequent ECG waveform analysis and feature extraction. The pixel-time-voltage conversion grid region is used for reference and conversion in ECG processing, converting the pixel values in the ECG image into the actual ECG signal value (voltage). During the ECG digitization process, due to factors such as image resolution and the sensitivity of the acquisition device, the pixel values in the image cannot directly represent the voltage value of the ECG signal. Therefore, a known conversion grid is required for conversion.
[0120] S4. Digital signal extraction:
[0121] The ECG waveform information in the lead region image is converted into a digitized signal. First, the lead image region is coordinate-based. By calculating the ECG waveform lead position spatial mapping array, each pixel position in the lead image region is converted into a specific coordinate value, reflecting the ECG waveform position information in the image. The digitized signal is extracted from each pixel position in the lead image region, invalid or extremely low-intensity pixel values are discarded, and valid ECG waveform information is retained to obtain the digitized signal represented by each pixel position in the lead image region.
[0122] S401. Calculate the ECG waveform position space mapping array
[0123] Set the length of the lead image region R to E and the width to F. Set the lower left corner of the lead image region R as the origin of the coordinate axis R 0,0 The length of the lead image region R is used as the horizontal axis (X-axis), and the width as the vertical axis (Y-axis). With the X-axis extending along the long side of the image and the Y-axis extending vertically upward, this forms a right-handed Cartesian coordinate system. This converts each pixel position in the lead image region into a specific coordinate value, enabling the extraction of more accurate and reliable digitized ECG waveform signals from ECG images.
[0124] From left to right, along the horizontal axis (X axis), the mean 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 ECG waveform position space mapping array R of the lead image region R. tmp .
[0125] R tmp Each element in the array represents the average value of the ECG waveform intensity at the corresponding horizontal axis position, thereby reflecting the position information of the ECG waveform in the image.
[0126] S402, extracting digital signals:
[0127] In R tmpIn the array, a value of 0 usually indicates that there is no ECG waveform information at that position, or the ECG waveform intensity is extremely low, which has no practical significance for subsequent analysis. tmp In the , all elements with value 0 are discarded and only non-zero elements are retained; these non-zero elements constitute the digitized signal R represented by the pixel position d , which not only retains the position information of the ECG waveform, but also accurately reflects the intensity of the waveform.
[0128] S403, traverse the lead image area to extract digital signals
[0129] For each lead image region, steps S401 to S402 are repeated to obtain the digitized signal represented by the pixel position of each lead, thereby extracting effective ECG waveform information from each lead image.
[0130] Specifically, repeat steps S401 to S402 to traverse the image area of lead I to R I , the image area of lead II is R II , the image area of lead III is R III , the image area of lead aVL is R aVL , the image area of lead aVR is R aVR , the image area of lead aVF is R aVF , the image area of lead V1 is R V1 , the image area of lead V2 is R V2 , the image area of lead V3 is R V3 , the image area of lead V4 is R V4 , the image area of lead V5 is R V5 And the image area of lead V6 is R V6 ; and respectively perform steps S401 to S402 to obtain the digital signal R represented by the pixel position of lead I Id , the digitized signal R represented by the pixel position of lead II IId , the digitized signal R represented by the pixel position of lead III IIId , the digitized signal R represented by the pixel position of the aVL lead aVLd , the digitized signal R represented by the pixel position of lead aVR aVRd , the digitized signal R represented by the pixel position of the aVF lead aVFd , the digitized signal R represented by the pixel position of lead V1 V1d , the digitized signal R represented by the pixel position of lead V2 V2d , the digitized signal R represented by the pixel position of lead V3 V3d , the digitized signal R represented by the pixel position of lead V4 V1d , the digitized signal R represented by the pixel position of lead V5V5d And the digitized signal R represented by the pixel position of lead V6 V6d .
[0131] S5. ECG signal reconstruction represented by time-voltage:
[0132] The pixel-time-voltage conversion grid image area is coordinate-processed; the grid image is differentially dimensionally reduced to obtain an electrocardiogram grid differentially dimensionally reduced array; a peak detection algorithm is used to detect the pixel spacing of a large grid in the paper electrocardiogram grid from the dimensionally reduced array; according to the large grid time-voltage standard of the paper electrocardiogram, the time-voltage value corresponding to each pixel in the pixel-time-voltage conversion grid image area is converted; the digitized signal is converted into a voltage signal using the converted time-voltage value, and the recording time is calculated; according to the recording time and sampling rate, the voltage signal is resampled to obtain a digitized reconstructed electrocardiogram signal; the above conversion, conversion and resampling steps are repeated to traverse the digitized signals of all leads (I, II, III, aVL, aVR, aVF and V1-V6) to obtain a reconstructed electrocardiogram signal for each lead.
[0133] S501, Differentiation Dimensionality Reduction Processing
[0134] For the pixel-time-voltage conversion grid image area R with a length of P and a width of Q g Perform coordinate processing, use its length as the horizontal axis (X axis), representing the distribution of the ECG waveform on the time axis; use its width as the vertical axis (Y axis), representing the distribution of the ECG waveform on the voltage axis; and set its lower left corner as the coordinate axis origin R0 g ,0 .
[0135] Pixel-time-voltage conversion grid image area R g Coordinate processing is performed on each pixel in the pixel-time-voltage conversion grid image. Specifically, each pixel in the pixel-time-voltage conversion grid image area is assigned a unique coordinate value (x, y), where x represents the pixel's position on the horizontal axis (X axis) and y represents the pixel's position on the vertical axis (Y axis). The result of the coordinate processing is a two-dimensional array or matrix that contains the coordinate information of each pixel in the grid.
[0136] Specifically, by calculating the sum of the pixel values in each row, the two-dimensional grid data can be converted into a one-dimensional array to achieve dimensionality reduction, thereby simplifying the data and reducing the amount of 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 gTraverse each row in and calculate 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 (that is, each row) one by one.
[0138] Next, the sum of the calculated pixel values for each row is used as an element in the ECG grid differential dimensionality reduction array G. This constructs the ECG grid differential dimensionality reduction array G. The value of each element reflects the strength of the ECG waveform at the corresponding location in the ECG grid, thus achieving differential dimensionality reduction of the grid data. This ECG grid differential dimensionality reduction array G not only simplifies the data but also preserves the key features of the ECG waveform, allowing analysis of its distribution and changes along the time axis.
[0139] S502. Peak detection and pixel spacing calculation
[0140] Since the peak detection algorithm can identify local maxima in the array, which usually correspond to the peak positions on the paper ECG, the peak detection algorithm is applied to the ECG grid-differentiated dimensionality reduction array G.
[0141] Specifically, the peak detection algorithm is used to detect the pixel spacing G of a large grid of the paper ECG grid from the ECG grid differential dimensionality reduction array G. d , used for subsequent time-voltage conversion.
[0142] The "major grids" of a paper ECG grid are standardized cells used to calibrate the time and space scale on the ECG paper, marking time and voltage. On the ECG, the horizontal axis represents time and the vertical axis represents voltage. For the horizontal axis, each major grid represents a fixed time length (usually 0.2 seconds), and for the vertical axis, each major grid represents a fixed voltage amplitude (usually 0.5 mV). In addition, each major 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 / grid and 0.1 mV / grid.
[0143] S503, time-voltage value calculation
[0144] Each large grid is set to correspond to a time of S seconds and a voltage of T millivolts. Based on the large grid time-voltage standard corresponding to the paper electrocardiogram, the time value and voltage value corresponding to each pixel can be calculated.
[0145] Specifically, each pixel corresponds to 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, digital signal conversion and voltage signal resampling
[0147] The digitized signal R d Converted into a voltage signal R with clear physical meaning dv , and calculate the digitized signal R d Recording time S tmp .
[0148] According to the calculation formula of the voltage corresponding to each pixel obtained in step S503 Traverse the digitized signal R d For each pixel value in the digitized signal R d Each pixel value in the image 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 digitized signal R can be calculated d The time length of the corresponding ECG waveform, that is, the recording time S tmp .
[0150] Specifically, determine the digitized signal R d The pixel range on the horizontal axis, and then use the formula Calculate the time length represented by each pixel in the pixel range, and add up these time lengths to get the total recording time S tmp .
[0151] In a specific embodiment, according to the recording time S tmp and sampling rate fs, for the voltage signal R dv Resample to obtain the digital reconstructed ECG signal R dECG .
[0152] According to the recording time S tmp and sampling rate fs, the voltage signal R dv Resample to length fs*S tmp , obtain the digital reconstructed ECG signal R dECG . Reconstruct ECG signal R dECG Has the same time length and sampling rate as the original ECG waveform.
[0153] S505: traverse and reconstruct lead signals
[0154] Repeat steps S503 to S504 for the digitized signal represented by the pixel position of each lead to obtain the reconstructed ECG signal of each lead.d-I-ECG , II lead reconstructed ECG signal R d-II-ECG These reconstructed ECG signals provide a reliable data basis for subsequent ECG analysis and prediction.
[0155] Specifically, the digitized signal R represented by the pixel position of lead I is traversed Id , the digitized signal R represented by the pixel position of lead II IId , the digitized signal R represented by the pixel position of lead III IIId , the digitized signal R represented by the pixel position of the aVL lead aVLd , the digitized signal R represented by the pixel position of lead aVR aVRd , the digitized signal R represented by the pixel position of the aVF lead aVFd , the digitized signal R represented by the pixel position of lead V1 V1d , the digitized signal R represented by the pixel position of lead V2 V2d , the digitized signal R represented by the pixel position of lead V3 V3d , the digitized signal R represented by the pixel position of lead V4 V4d , the digitized signal R represented by the pixel position of lead V5 V5d And the digitized signal R represented by the pixel position of lead V6 V6d , and execute steps S503 to S504 respectively;
[0156] Obtain the reconstructed ECG signal R of lead I d-I-ECG , reconstructed ECG signal R of lead II d-II-ECG , reconstructed ECG signal R of lead III d-iII-ECG , reconstructed ECG signal R of lead aVL d-aVL-ECG , aVR lead reconstructed ECG signal R d-aVR-ECG , reconstructed ECG signal R of lead aVF d-aVF-ECG , V1 lead reconstructed ECG signal R d-V1-ECG , V2 lead reconstructed ECG signal R d-V2-ECG , V3 lead reconstructed ECG signal R d-V3-ECG , V4 lead reconstructed ECG signal R d-V4-ECG , V5 lead reconstructed ECG signal R d-V5-ECG And the reconstructed ECG signal R of lead V6 d-V6-ECG .
[0157] In summary, the ECG grid processing and signal reconstruction method in step S5 not only improves the accuracy and reliability of the digitized signal but also provides strong support for subsequent ECG analysis, diagnosis, and disease prediction. By processing the pixel-time-voltage conversion grid image region, the acquired digitized signal is converted into a reconstructed ECG signal with clear timestamps and voltage values, facilitating subsequent ECG analysis, diagnosis, and disease prediction. By establishing a mapping relationship between pixel position and physical dimension, the conversion of image spatial information into a continuous time series signal is achieved.
[0158] The above schematically describes the invention and its implementation methods. This description is not restrictive. Without departing from the spirit or basic features of the invention, the invention can be implemented in other specific forms. What is shown in the accompanying drawings is only one of the implementation methods of the invention. The actual structure is not limited to this. Any figure mark in the claims should not limit the claims involved. Therefore, if a person of ordinary skill in the art is inspired by it and designs a structural method and embodiment similar to the technical solution without creativity without departing from the purpose of the invention, they should all fall within the scope of protection of this patent. In addition, the word "including" does not exclude other elements or steps, and the word "one" before an element does not exclude the inclusion of "multiple" elements. The multiple elements stated in the product claim can also be implemented by one element through software or hardware. Words such as first and second are used to indicate names and do not indicate any specific order.
Claims
1. A method for reconstructing paper electrocardiogram voltage values based on 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 the preset threshold, the optimal threshold is obtained by iterative optimization to perform binarization processing on the paper electrocardiogram to be processed, thereby obtaining a binarized paper electrocardiogram; Each lead image region and the corresponding pixel-time-voltage conversion grid image region are intercepted from the binary paper electrocardiogram to locate the lead position of the electrocardiogram waveform; the electrocardiogram waveform information of the lead image region is converted into a digital signal; The pixel-time-voltage conversion grid image area is subjected to differential dimensionality reduction processing; the time-voltage value corresponding to each pixel in the pixel-time-voltage conversion grid image area after differential dimensionality reduction processing is obtained using a peak detection algorithm, and the obtained digitized signal is converted into a voltage signal; the voltage signal is resampled to obtain a digitally reconstructed ECG signal.
2. The method for reconstructing paper electrocardiogram voltage values based on dynamic diffusion threshold according to claim 1, characterized in that: Dividing the standard binary paper electrocardiogram and the paper electrocardiogram to be processed by a preset integer multiple; The standard binary paper electrocardiogram is divided into two parts and marked as BBZ from left to right and from top to bottom. i,j The image blocks to be processed are divided into two parts, which are marked as DBZ from left to right and from top to bottom. i,j The image block is represented by i, i represents the row number, and j represents the column number.
3. The method for reconstructing paper electrocardiogram voltage values based on dynamic diffusion threshold according to claim 2, characterized in that: The process of binarization of paper electrocardiogram to be processed includes primary binarization, secondary binarization and tertiary binarization; The initial binarization steps include: the first image block BBZ of the paper electrocardiogram to be processed 1,1 Perform grayscale processing; preset threshold value for BBZ after grayscale processing 1,1 Perform binarization processing. The steps of secondary binarization include: setting the threshold diffusion factor to update the threshold, using the updated threshold to BBZ 1,1 Perform secondary binarization processing; The step of the third binarization includes: performing a third binarization process according to the results of the first binarization and the second binarization.
4. The method for reconstructing paper electrocardiogram voltage values based on dynamic diffusion threshold according to claim 3, characterized in that: The steps of performing a third binarization process according to the results of the first binarization and the second binarization include: calculating the variation of the signal-to-noise ratio difference of the first binarization and the signal-to-noise ratio difference of the second binarization as a variation coefficient; adjusting the threshold diffusion factor by the ratio of the variation coefficient to the signal-to-noise ratio difference of the second binarization to obtain an adjusted threshold diffusion factor; updating the threshold value by using the adjusted threshold diffusion factor and adjusting the DBZ 1,1 Perform binarization three times.
5. The method for reconstructing paper electrocardiogram voltage values based on dynamic diffusion threshold according to claim 3, characterized in that: Repeat the binarization process for iteration. When the absolute value of the coefficient of change between two consecutive iterations is less than or equal to the signal-to-noise ratio difference threshold, the iteration is terminated and the threshold at this time is the optimal threshold. The paper electrocardiogram to be processed is binarized using the optimal threshold to obtain a binary paper electrocardiogram.
6. The method for reconstructing paper electrocardiogram voltage values based on dynamic diffusion threshold according to claim 1, characterized in that: The steps of locating the position of the ECG waveform lead include: rotating the binary paper ECG to obtain a horizontal binary paper ECG; The row pixels and column pixels of the horizontally binary paper ECG are summed separately, and the lead position and QRS peak position are determined by combining the peak detection algorithm; According to the determined lead positions and coordinates, the image area and pixel-time-voltage conversion grid area of each lead are cut out from the horizontally binarized paper electrocardiogram.
7. The method for reconstructing paper electrocardiogram voltage values based on dynamic diffusion threshold according to claim 6, characterized in that: The step of obtaining a horizontally binarized paper electrocardiogram includes: rotating the binarized paper electrocardiogram within a range of -90 degrees to 90 degrees, and calculating the row pixel sum of the rotated binarized paper electrocardiogram at each rotation angle; Compare the row pixel sums at each rotation angle, find the rotation angle that minimizes the row pixel sum as the horizontal angle, and obtain the horizontal binary paper electrocardiogram.
8. The method for reconstructing paper electrocardiogram voltage values based on dynamic diffusion threshold according to claim 1, characterized in that: The step of converting the ECG waveform information into a digital signal includes: coordinate-forming the lead image area and converting each pixel position of the lead image area into a coordinate value to extract the digital signal and obtain the digital signal represented by each pixel position of the lead image area.
9. The method for reconstructing paper electrocardiogram voltage values based on dynamic diffusion threshold according to claim 1, characterized in that: The steps of the differential dimensionality reduction processing include: coordinate processing of the pixel-time-voltage conversion grid image area; Calculate the sum of the pixel values of each row in the pixel-time-voltage conversion grid image area and convert the two-dimensional grid data into a one-dimensional array; The sum of the pixel values in each row is taken as an element to construct the electrocardiogram grid differential dimensionality reduction array G to achieve differential dimensionality reduction of the grid data.
10. The system for reconstructing paper electrocardiogram voltage values based on dynamic diffusion threshold according to any one of claims 1 to 9, characterized in that: It includes a data acquisition module: acquiring a standard paper electrocardiogram and a paper electrocardiogram to be processed, and extracting paper electrocardiogram parameters; Binarization processing module: Based on the preset threshold, iterative optimization is performed to obtain the optimal threshold to perform binarization processing on the paper electrocardiogram to be processed, thereby obtaining a binary paper electrocardiogram; Digital signal conversion module: extracts each lead image area and the corresponding pixel-time-voltage conversion grid image area from the binary paper ECG to locate the ECG waveform lead position; converts the ECG waveform information in the lead image area into a digital signal; Reconstruction module: performs differential dimensionality reduction on the pixel-time-voltage conversion grid image area; The 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 dimensionality reduction processing, and the obtained digitized signal is converted into a voltage signal; the voltage signal is resampled to obtain a digitally reconstructed ECG signal.
Citation Information
Patent Citations
Method for digitalizing paper electrocardiogram
CN102038498A
Processing method of editable electrocardiogram signal
CN108236461A
Electrocardiogram digital conversion system, method and conversion equipment
CN113397553A
Paper electrocardiogram signal area extraction method and system based on deep neural network
CN114119968A
Paper electrocardiogram digitization method and device
CN115272112A
Cited By
Paper electrocardiogram digitization method and system based on slope adaptive correction
CN121265085A
A paper electrocardiogram digitization method and system based on slope adaptive correction
CN121265085B