12-lead paper electrocardiogram digitization method and device
Through the 12-lead paper electrocardiogram digitization method, including image processing and segmentation network technology, the problem of manual cropping in electrocardiogram digitization is solved, efficient and high-quality digital conversion is achieved, and convenient database support is provided.
Patent Information
- Application Number
- CN202210173469.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-24
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2042-02-24
AI Technical Summary
The prior art requires manual cutting of ECG digitization, resulting in low efficiency and quality.
Using 12-lead paper electrocardiogram digitization method, including acquiring images, detecting and correcting background grid segments, extracting areas of interest, splitting ECG waveforms using segmentation networks, and dividing different lead waveforms by horizontal and vertical projection to generate extraction thresholds Extract the electrocardiogram.
The paper electrocardiogram can be converted into high-quality digital forms without manual cutting, which improves the efficiency and quality of ECG digitization, and creates an electrocardiogram electronic database of different leads to facilitate medical analysis and scientific research.
Smart Images

Figure CN114663443B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of digital image processing, and in particular to a method and device for digitizing a 12-lead paper electrocardiogram. Background Art
[0002] ECG (Electrocardiograph) is one of the most commonly used diagnostic tools for cardiovascular diseases. Its non-invasive and low-cost features make it widely used in major hospitals and clinics around the world. Some typical ECG signal changes are associated with certain specific diseases, including coronary artery disease and arrhythmia, so ECG provides a lot of useful information for the diagnosis and prognosis of cardiovascular diseases. With the development of digitization, most ECGs are now recorded and stored in both paper and digital forms. Although advances in digital technology have made it possible to process big data, there are still a large number of paper ECG data sets for a long time before digital ECGs become the norm.
[0003] When ECGs are only recorded on paper and there is no corresponding digital format, the paper needs to be scanned and digitized. Paper ECGs are difficult to store, easy to damage, and have low accuracy. Converting this paper ECG dataset to digital form can significantly expand the understanding of electrocardiographic pathology, coronary artery disease and arrhythmia mechanisms and their clinical disease relationships.
[0004] However, defects in the scanned version of the paper ECG hinder the direct extraction of waveforms from the paper ECG scan; at the same time, complex noise and interference, patient information unrelated to the ECG, and manual markings made by doctors on the ECG paper will affect the segmentation of the ECG and the extraction of clean waveforms; therefore, related technologies usually require manpower and time resources to manually cut when realizing ECG digitization, and the efficiency and quality of digitization are low. Summary of the invention
[0005] The present application provides a 12-lead paper electrocardiogram digitization method, device, electronic device and storage medium to solve the problems of related technologies that usually require manual cutting that consumes manpower and time resources when digitizing electrocardiograms, and the low efficiency and quality of digitization.
[0006] The first aspect of the present application provides a method for digitizing a 12-lead paper electrocardiogram, comprising the following steps: acquiring an image of a 12-lead electrocardiogram; extracting a region of interest from the image, and extracting an electrocardiogram waveform from the region of interest; using a segmentation network to separate the background and waveform of the electrocardiogram waveform, and using horizontal projection and vertical projection to segment different lead waveforms to obtain electrocardiograms corresponding to different leads.
[0007] Furthermore, after acquiring the image of the 12-lead electrocardiogram, the method further includes: detecting background grid segments of the 12-lead electrocardiogram and calculating the tilt angle of the image; and performing tilt correction on the image based on the tilt angle to obtain a corrected image.
[0008] Furthermore, the detecting of the background grid line segments of the 12-lead electrocardiogram includes: binarizing the image to obtain a first binarized image; performing canny edge detection on the first binarized image, and using a Hough algorithm to identify the background grid line segments.
[0009] Furthermore, the extracting of the region of interest from the image includes: binarizing the image to obtain a second binarized image; based on the second binarized image, projecting in the horizontal direction and the vertical direction respectively, and determining the coordinates of the waveform position according to the peaks obtained by the projection, and extracting the region of interest according to the coordinates.
[0010] Furthermore, the segmentation network is used to separate the background and waveform of the electrocardiogram waveform, and horizontal projection and vertical projection are used to segment the waveforms of different leads to obtain electrocardiograms corresponding to different leads, including: analyzing the difference between the electrocardiogram waveform and the background in RGB space, HSV space and grayscale space; generating an extraction threshold according to the difference obtained by the analysis, and extracting the electrocardiogram waveform according to the extraction threshold.
[0011] The second aspect of the present application provides a 12-lead paper electrocardiogram digitization device, including: an acquisition module for acquiring an image of a 12-lead electrocardiogram; an extraction module for extracting a region of interest from the image and extracting an electrocardiogram waveform from the region of interest; a processing module for separating the background and waveform of the electrocardiogram waveform by using a segmentation network, and segmenting different lead waveforms by horizontal projection and vertical projection to obtain electrocardiograms corresponding to different leads.
[0012] Furthermore, it also includes: a detection module, which is used to detect the background grid segments of the 12-lead electrocardiogram after acquiring the image of the 12-lead electrocardiogram, and calculate the tilt angle of the image; and a correction module, which is used to perform tilt correction on the image based on the tilt angle to obtain a corrected image.
[0013] Furthermore, the detection module is further used to binarize the image to obtain a first binarized image; perform canny edge detection on the first binarized image, and use the Hough algorithm to identify the background grid line segments.
[0014] Furthermore, the extraction module is further used to binarize the image to obtain a second binarized image; based on the second binarized image, projection is performed in the horizontal direction and the vertical direction respectively, and the coordinates of the waveform position are determined according to the peaks obtained by the projection, and the region of interest is extracted according to the coordinates.
[0015] Furthermore, the processing module is further used to analyze the difference between the electrocardiogram waveform and the background in RGB space, HSV space and grayscale space; generate an extraction threshold according to the difference obtained by the analysis, and extract the electrocardiogram waveform according to the extraction threshold.
[0016] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the 12-lead paper electrocardiogram digitization method as described in the above embodiment.
[0017] The fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the 12-lead paper electrocardiogram digitization method as described in the above embodiment.
[0018] Therefore, this application has at least the following beneficial effects:
[0019] When digitizing 12-lead paper ECG, there is no need to waste manpower and time resources for manual cutting. Paper ECG that is difficult to store, easy to damage, and produces color difference can be converted into a digital form that can be permanently preserved and ensures quality. It can also create an electronic database of ECGs of different leads, which provides convenience for medical practitioners to do clinical analysis, prognosis treatment and scientific research based on ECGs, and effectively improves the efficiency and quality of ECG digitization. This solves the problem that related technologies usually require manual cutting that consumes manpower and time resources when realizing ECG digitization, and the efficiency and quality of digitization are low.
[0020] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0022] Figure 1 A schematic diagram of a process for digitizing a 12-lead paper electrocardiogram according to an embodiment of the present application;
[0023] Figure 2The original image of the standard 12-lead paper electrocardiogram scan version provided according to the embodiment of the present application;
[0024] Figure 3 A schematic diagram of a process for digitizing a 12-lead paper electrocardiogram according to an embodiment of the present application;
[0025] Figure 4 This is an example diagram of an image after tilt correction of a paper electrocardiogram provided in an embodiment of the present application;
[0026] Figure 5 This is an example diagram of an image after the region of interest is extracted according to an embodiment of the present application;
[0027] Figure 6 This is an example diagram of an image after thresholding processing according to an embodiment of the present application;
[0028] Figure 7 This is an example diagram of an extracted I-lead ECG waveform provided according to an embodiment of the present application;
[0029] Figure 8 It is a block diagram of a 12-lead paper electrocardiogram digitizing device provided according to an embodiment of the present application;
[0030] Fig. 9 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0032] In the related art, the paper ECG digitization method for single-lead images is generally divided into the following four steps, including ROI (Region-Of-Interest) detection, background grid removal, ECG signal refinement and vectorization. The ROI region of interest detection operation extracts a rough ECG waveform area to avoid noise interference from irrelevant areas; then the grid is removed to further remove the background grid from the paper ECG scan and retain the clean ECG waveform. If there is no manual intervention, these two steps are highly dependent on the quality and layout of the paper ECG scan.
[0033] The ECG waveform extraction methods in related technologies are all for single-lead ECGs, so for the common 12-lead ECG, the above methods need to manually segment the image first. However, in most real-life scenarios, 12-lead ECGs are the most common form, and manual cropping is required to obtain a single-lead ECG; at the same time, the 12-lead paper ECG scans in real-life scenarios are complicated, with problems such as hospital label interference, image distortion and tilt caused by camera equipment, and interference from doctor's notes, which the methods in related technologies cannot solve.
[0034] To this end, the purpose of the embodiments of the present application is to digitize paper ECGs stored in major hospitals, and use Canny detection and Hough algorithm to perform tilt correction for the tilt problem of scanned images; in view of the noise such as hospital labels and doctor notes in real paper ECGs, ROI area extraction is used to remove interference; in view of the problem that existing methods can only solve the digitization of single-lead paper ECGs, a digitization method based on 12-lead ECG to segment different lead waveforms is developed.
[0035] The following describes the 12-lead paper electrocardiogram digitization method, device, electronic device and storage medium of the embodiment of the present application with reference to the accompanying drawings. In view of the problem that the related technology mentioned in the background technology center above usually requires manual cutting that consumes manpower and time resources when realizing the digitization of the electrocardiogram, and the efficiency and quality of digitization are low, the present application provides a 12-lead paper electrocardiogram digitization method, in which there is no need to consume manpower and time resources for manual cutting when digitizing the 12-lead paper electrocardiogram, and the paper electrocardiogram that is difficult to store, easy to damage, and produces color difference can be converted into a digital form that can be permanently preserved and ensures quality, and an electronic database of electrocardiograms of different leads can be created, which provides convenience for medical practitioners to perform clinical analysis, prognosis and scientific research based on electrocardiograms, and effectively improves the efficiency and quality of electrocardiogram digitization. As a result, the problem that the related technology usually requires manual cutting that consumes manpower and time resources when realizing the digitization of the electrocardiogram, and the efficiency and quality of digitization are low is solved.
[0036] Specifically, Figure 1 A schematic flow chart of a 12-lead paper electrocardiogram digitization method provided in an embodiment of the present application.
[0037] like Figure 1 As shown, the 12-lead paper electrocardiogram digitization method includes the following steps:
[0038] In step S101 , a 12-lead electrocardiogram image is acquired.
[0039] It is understandable that the present application embodiment can obtain the 12-lead electrocardiogram image in a variety of ways, such as a paper electrocardiogram scanning device or a photographing device, etc., and there is no specific limitation on this. Among them, the original image of the standard 12-lead paper electrocardiogram scanning version is shown in the following example: Figure 2 shown.
[0040] In this embodiment, after acquiring the image of the 12-lead electrocardiogram, it also includes: detecting the background grid segments of the 12-lead electrocardiogram and calculating the tilt angle of the image; performing tilt correction on the image based on the tilt angle to obtain a corrected image; wherein, detecting the background grid segments of the 12-lead electrocardiogram includes: binarizing the image to obtain a first binarized image; performing canny edge detection on the first binarized image, and using the Hough algorithm to identify the background grid segments.
[0041] It is understandable that if Figure 3 As shown, in order to solve the problem of low quality of paper ECG scans, the embodiment of the present application can use edge detection algorithm and Hough algorithm to detect background grid segments, calculate the tilt angle, take the average value and then perform tilt correction. Figure 4 shown.
[0042] Specifically, due to the limitations of the shooting equipment, paper ECG scans usually have different degrees of tilt, and the image needs to be tilted to different degrees. First, the image is binarized, that is, the background grid pixels are set to (0, 0, 0), and the ECG waveform pixels and other background pixels are set to (255, 255, 255). The binarized image is first subjected to canny edge detection, and then the Hough algorithm is used to identify line segments in the image.
[0043] The basic principle of Hough transform is to project the Cartesian coordinate system into Hough space, that is, the straight line y=kx+q passing through points A(x1,y1) and B(x2,y2) can be written as a Hough space expression about (k,q).
[0044]
[0045] That is, a straight line of Cartesian coordinates corresponds to a point in Hough space, and the collinear points of Cartesian coordinates in Hough space intersect at a point. The processing method after Hough transform is to select a point where as many straight lines converge as possible. After detecting line segments by Hough transform, the detected line segments close to the vertical direction are tilted 90°, and the line segments close to the horizontal direction remain unchanged. The average tilt angle of multiple line segments is calculated to complete the tilt correction.
[0046] In step S102, a region of interest is extracted from the image, and an electrocardiogram waveform is extracted from the region of interest.
[0047] In the field of computer vision or image processing, the processed area in the original image that can be marked in the form of a rectangle, an ellipse or an irregular polygon is the region of interest.
[0048] It is understandable that if Figure 3 As shown, the embodiment of the present application can then find the region of interest, remove the noise influence of irrelevant areas such as patient information, doctor's handwriting, etc., and use the threshold method or frequency method to extract the clean electrocardiogram waveform. Among them, the image example after extracting the region of interest is as follows Figure 5 shown.
[0049] In this embodiment, extracting a region of interest from an image includes: binarizing the image to obtain a second binarized image; projecting in the horizontal direction and the vertical direction based on the second binarized image, and determining the coordinates of the waveform position according to the peaks obtained by the projection, and extracting the region of interest based on the coordinates.
[0050] Specifically, the paper ECG waveform not only has background grids and ECG waveforms of different leads, but also hospital logos, patient information, doctor annotations, and noise generated during the storage of paper. Extracting the ECG waveform area can not only extract effective information, but is also an indispensable prerequisite for the subsequent segmentation of each lead waveform image. The ECG is binarized and projected in the horizontal and vertical directions respectively. The coordinates of the waveform position are determined based on the peaks obtained by the projection, so as to extract the area of interest. The ECG waveform is extracted by analyzing the HSV space, RGB space, and grayscale space using the threshold method.
[0051] In step S103, the background and waveform of the electrocardiogram waveform are separated by using a segmentation network, and the waveforms of different leads are segmented by using horizontal projection and vertical projection to obtain electrocardiograms corresponding to different leads.
[0052] It is understandable that if Figure 3 As shown in the figure, in the case of labels, a deep learning image segmentation method is considered, the waveform is regarded as the foreground, and the others are regarded as the background, and the segmentation network is used to separate the waveform from the background. Then, horizontal projection and vertical projection are used to segment the waveforms of different leads, and the electrocardiograms of different leads are derived.
[0053] In this embodiment, a segmentation network is used to separate the background and waveform of the electrocardiogram waveform, and horizontal projection and vertical projection are used to segment the waveforms of different leads to obtain electrocardiograms corresponding to different leads, including: analyzing the difference between the electrocardiogram waveform and the background in RGB space, HSV space and grayscale space; generating an extraction threshold according to the difference obtained from the analysis, and extracting the electrocardiogram waveform according to the extraction threshold.
[0054] Specifically, by analyzing the difference between the ECG waveform and the background in RGB space, HSV space, and grayscale space, the threshold is set appropriately to extract the waveform. Due to the different formats, generation times, storage times, and conditions of paper ECGs, different paper ECGs have different degrees of color difference. Therefore, it is necessary to find a suitable threshold to separate the black ECG waveform from the background, and use horizontal and vertical projections to segment the lead images in the image after the waveform is extracted. Among them, the image example after thresholding is as follows Figure 6 As shown, the I lead ECG waveform is as follows Figure 7 shown.
[0055] In summary, the embodiments of the present application are based on practical significance. For the actual 12-lead paper ECG scan data, through tilt correction, ROI extraction, threshold determination to extract ECG waveforms, and separation of each lead waveform, there is no need to manually process the paper ECG with the help of human resources. It is feasible on large paper ECG data sets.
[0056] According to the 12-lead paper ECG digitization method proposed in the embodiment of the present application, there is no need to consume manpower and time resources for manual cutting when digitizing the 12-lead paper ECG. The paper ECG that is difficult to store, easily damaged, and produces color difference can be converted into a digital form that can be permanently preserved and has guaranteed quality. An electronic database of ECGs of different leads can be created, which provides convenience for medical practitioners to perform clinical analysis, prognosis treatment and scientific research based on ECGs, and effectively improves the efficiency and quality of ECG digitization.
[0057] Next, a 12-lead paper electrocardiogram digitizing device according to an embodiment of the present application will be described with reference to the accompanying drawings.
[0058] Figure 8 It is a block diagram of a 12-lead paper electrocardiogram digitizing device according to an embodiment of the present application.
[0059] like Figure 8 As shown, the 12-lead paper electrocardiogram digitizing device 10 includes: an acquisition module 100 , an extraction module 200 and a processing module 300 .
[0060] Among them, the acquisition module 100 is used to acquire the image of the 12-lead electrocardiogram; the extraction module 200 is used to extract the region of interest from the image, and extract the electrocardiogram waveform from the region of interest; the processing module 300 is used to separate the background and waveform of the electrocardiogram waveform by using the segmentation network, and to segment the waveforms of different leads by horizontal projection and vertical projection, so as to obtain the electrocardiograms corresponding to different leads.
[0061] Furthermore, the device 10 of the embodiment of the present application further includes: a detection module and a correction module. The detection module is used to detect the background grid line segments of the 12-lead electrocardiogram after acquiring the image of the 12-lead electrocardiogram, and calculate the tilt angle of the image; the correction module is used to perform tilt correction on the image based on the tilt angle to obtain a corrected image.
[0062] Furthermore, the detection module is further used to binarize the image to obtain a first binarized image; perform canny edge detection on the first binarized image, and use the Hough algorithm to identify background grid line segments.
[0063] Furthermore, the extraction module 200 is further used to binarize the image to obtain a second binarized image; based on the second binarized image, projection is performed in the horizontal direction and the vertical direction respectively, and the coordinates of the waveform position are determined according to the peaks obtained by the projection, and the region of interest is extracted according to the coordinates.
[0064] Furthermore, the processing module 300 is further used to analyze the difference between the electrocardiogram waveform and the background in the RGB space, the HSV space and the grayscale space; generate an extraction threshold according to the difference obtained by the analysis, and extract the electrocardiogram waveform according to the extraction threshold.
[0065] It should be noted that the above explanation of the embodiment of the 12-lead paper electrocardiogram digitization method is also applicable to the 12-lead paper electrocardiogram digitization device of this embodiment, and will not be repeated here.
[0066] According to the 12-lead paper ECG digitization device proposed in the embodiment of the present application, there is no need to consume manpower and time resources for manual cutting when digitizing the 12-lead paper ECG. The paper ECG that is difficult to store, easily damaged, and produces color difference can be converted into a digital form that can be permanently preserved and has guaranteed quality. An electronic database of ECGs of different leads can be created, which provides convenience for medical practitioners to perform clinical analysis, prognosis treatment and scientific research based on ECGs, and effectively improves the efficiency and quality of ECG digitization.
[0067] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:
[0068] A memory 901 , a processor 902 , and a computer program stored in the memory 901 and executable on the processor 902 .
[0069] When the processor 902 executes the program, the 12-lead paper electrocardiogram digitization method provided in the above embodiment is implemented.
[0070] Furthermore, the electronic device further comprises:
[0071] The communication interface 903 is used for communication between the memory 901 and the processor 902 .
[0072] The memory 901 is used to store computer programs that can be executed on the processor 902 .
[0073] The memory 901 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0074] If the memory 901, the processor 902 and the communication interface 903 are implemented independently, the communication interface 903, the memory 901 and the processor 902 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0075] Optionally, in a specific implementation, if the memory 901, the processor 902 and the communication interface 903 are integrated on a chip, the memory 901, the processor 902 and the communication interface 903 can communicate with each other through an internal interface.
[0076] The processor 902 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0077] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned 12-lead paper electrocardiogram digitization method.
[0078] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0079] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0080] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0081] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0082] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0083] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0084] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0085] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for digitizing a 12-lead paper electrocardiogram, characterized in that: The following steps are involved: Acquire an image of a 12-lead electrocardiogram, and after acquiring the image of the 12-lead electrocardiogram, further include: detecting background grid line segments of the 12-lead electrocardiogram, wherein the detecting background grid line segments of the 12-lead electrocardiogram includes: binarizing the image to obtain a first binarized image, performing canny edge detection on the first binarized image, and using a Hough algorithm to identify the background grid line segments; and calculating the tilt angle of the image; and performing tilt correction on the image based on the tilt angle to obtain a corrected image; Extracting a region of interest from the image, wherein the extracting the region of interest from the image comprises: binarizing the image to obtain a second binarized image, projecting in the horizontal direction and the vertical direction respectively based on the second binarized image, and determining the coordinates of the position of the waveform according to the peaks obtained by the projection, and extracting the region of interest according to the position coordinates; and extracting the electrocardiogram waveform from the region of interest; and The background and the waveform of the electrocardiogram waveform are separated by a segmentation network, and the waveforms of different leads are segmented by horizontal projection and vertical projection to obtain the electrocardiograms corresponding to different leads. The background and the waveform of the electrocardiogram waveform are separated by a segmentation network, and the waveforms of different leads are segmented by horizontal projection and vertical projection to obtain the electrocardiograms corresponding to different leads, including: analyzing the difference between the electrocardiogram waveform and the background in RGB space, HSV space and grayscale space; generating an extraction threshold according to the difference obtained by the analysis, and extracting the electrocardiogram waveform according to the extraction threshold.
2. A 12-lead paper electrocardiogram digitizing device, characterized in that: include: An acquisition module, used for acquiring an image of a 12-lead electrocardiogram; An extraction module, used for extracting a region of interest from the image, and extracting an electrocardiogram waveform from the region of interest; as well as A processing module, used to separate the background and waveform of the electrocardiogram waveform by using a segmentation network, and segment the waveforms of different leads by using horizontal projection and vertical projection to obtain electrocardiograms corresponding to different leads; A detection module, configured to detect background grid segments of the 12-lead electrocardiogram after acquiring the image of the 12-lead electrocardiogram, and calculate a tilt angle of the image; A correction module, used for performing tilt correction on the image based on the tilt angle to obtain a corrected image; The detection module is further used to binarize the image to obtain a first binarized image; perform canny edge detection on the first binarized image, and use the Hough algorithm to identify the background grid line segments; The extraction module is further used to binarize the image to obtain a second binarized image; based on the second binarized image, perform projection in the horizontal direction and the vertical direction respectively, and determine the position coordinates of the waveform according to the peaks obtained by the projection, and extract the region of interest according to the position coordinates; The processing module is further used to analyze the difference between the electrocardiogram waveform and the background in RGB space, HSV space and grayscale space; generate an extraction threshold according to the difference obtained by analysis, and extract the electrocardiogram waveform according to the extraction threshold.
3. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the 12-lead paper electrocardiogram digitization method according to claim 1.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the 12-lead paper electrocardiogram digitization method as claimed in claim 1.
Citation Information
Patent Citations
Method for digitalizing paper electrocardiogram
CN102038498A
Inclination correction method of electrocardiograph scanning image
CN107220644A
Electrocardio waveform extraction method based on two-way communication
CN111466905A
Biological signal processing device and data generation method for automatic analysis
JP2020130772A
Electronic device and method for tracking an object using a camera module of the same
KR1020170052264A
