A heart rate determination method, device, electronic device and storage medium
By performing time-domain signal detection and verification of characteristic pixel points of heart-like images, the problem of difficulty in determining heart-like heart-like heart rate in the prior art is solved, and accurate identification and status monitoring of heart-like heart rate are achieved.
Patent Information
- Application Number
- CN202211714992.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-12-27
AI Technical Summary
The prior art is difficult to determine the heart rate of a heart-like body and cannot accurately understand its working status.
By performing the first and second peak detection of the time domain signals of characteristic pixel points in the heart-like image, the validity of the detection result is verified. If the verification is passed, the heart rate of the heart-like heart will be determined based on the detection result. The method includes extracting the time domain signal of continuous multi-frame images, performing peak detection and filtering, and ensuring signal accuracy of feature pixel points.
Accurate determination of heart rate of heart type is achieved, the reliability and accuracy of test results are ensured, and is suitable for different types of heart type.
Smart Images

Figure CN116019435B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of heart-like technologies, and in particular to a heart-like heart rate determination method, device, electronic equipment and storage medium. Background Art
[0002] The incidence of heart disease in modern people is gradually increasing. Correspondingly, the continuous development of modern medicine has designed a variety of treatment methods to treat heart disease. Among them, related technologies that use heart-like devices to replace or assist the human heart have gradually been widely used.
[0003] Among them, in the daily working process of the heart-like heart, in the process of testing the heart-like heart, it is necessary to determine the specific heart rate of the heart-like heart, so as to understand the working status of the heart-like heart. The method or device for testing the conventional heart rate is not suitable for testing the heart rate of the heart-like heart. Therefore, it is difficult to know the heart rate of the heart-like heart by existing means, and it is also impossible to know its current status.
[0004] How to determine the heart rate of a heart-like body is a technical problem that needs to be solved by those skilled in the art. Summary of the invention
[0005] In view of this, the present invention provides a heart-like heart rate determination method, device, equipment and storage medium for determining the heart rate of a heart-like body through a heart-like video image.
[0006] In order to solve the above technical problems, the present application provides a heart rate determination method similar to a heart, comprising:
[0007] Extracting time domain signals of characteristic pixel points based on multiple consecutive frames of cardiac-like images;
[0008] Performing a first peak detection on the time domain signal to obtain a first peak detection result;
[0009] Verifying the validity of the first peak detection result;
[0010] If the first wave peak detection result passes verification, the heart rate of the cardiac-like condition is determined based on the first wave peak detection result.
[0011] Optionally, if the first peak detection result fails verification, the method further includes:
[0012] Performing a second peak detection on the time domain signal of the characteristic pixel point, obtaining a second peak detection result, and verifying the validity of the second peak detection result, and if the second peak detection result passes the verification, determining the heart rate of the heart-like heart based on the second peak detection result;
[0013] The first wave peak frequency detection and the second wave peak detection are one and the other of forward wave peak detection and reverse wave peak detection.
[0014] Optionally, the characteristic pixel points are pixel points on a heart-like boundary line of the heart-like image.
[0015] Optionally, the method further includes:
[0016] Converting the time domain signals of all the pixel points on the heart-like boundary line of the continuous plurality of frames of the heart-like images into frequency domain signals;
[0017] According to the amplitude values corresponding to the frequency domain signals of all the pixels, the pixel corresponding to the frequency domain signal which is within the normal heart rate range and has the largest amplitude value is determined as the characteristic pixel.
[0018] Optionally, determining that the pixel point corresponding to the frequency domain signal that is within the normal heart rate range and has the largest amplitude value is the characteristic pixel point specifically includes:
[0019] Determine the pixel point corresponding to the frequency domain signal which is within the normal heart rate range and has the largest amplitude value as the preliminary feature pixel point;
[0020] Determine the amplitude value corresponding to the frequency domain signal of a preset number of pixel points on the heart-like boundary line within a preset distance of the preliminary characteristic pixel point;
[0021] Comparing whether the difference between the amplitude values of the preset number of pixel points and the maximum amplitude value is within a preset difference range;
[0022] If yes, determine the preliminary feature pixel point as the feature pixel point.
[0023] Optionally, the first peak detection or the second peak detection adopts the following peak detection steps:
[0024] Determine whether the pixel value of the time domain signal of the characteristic pixel point at the current time point is greater than the pixel values at the previous time point and the next time point;
[0025] If yes, the pixel value at the current time point is taken as the peak value.
[0026] Optionally, the first peak detection result and the second peak detection result are both referred to as peak detection results;
[0027] The following validity verification steps are adopted for the peak detection result wave:
[0028] Determine a set of frequency values including a plurality of frequency values based on the peak detection result;
[0029] Obtaining a ratio of a first number of the frequency values in the normal heart rate range to a total number of the frequency values in the set of frequency values;
[0030] It is determined whether the proportion is greater than a preset proportion. If so, it is determined that the peak detection result corresponding to the set of frequency values is valid.
[0031] Optionally, also include:
[0032] If the second wave peak detection result passes the verification, the type of cardiac abnormality is determined.
[0033] Optionally, the first peak detection result and the second peak detection result are both referred to as peak detection results;
[0034] Determining the heart rate of the heart class based on the peak detection result includes:
[0035] filtering the peak detection result;
[0036] The heart rate of the heart class is determined based on the filtered peak detection results.
[0037] Optionally, filtering the peak detection result specifically includes:
[0038] Determine a peak filtering threshold based on the peak detection result, the peak filtering threshold being the maximum value when the number of peaks within a preset peak value range is less than a preset threshold number;
[0039] The peak detection result is filtered according to the peak filtering threshold to filter out peaks whose peak value is less than the peak filtering threshold.
[0040] The present application also provides a heart-like heart rate determination device, which specifically includes:
[0041] A time domain signal extraction module extracts time domain signals of characteristic pixel points based on multiple consecutive frames of cardiac-like images;
[0042] A first peak detection result acquisition module, used to perform a first peak detection on the time domain signal to obtain a first peak detection result;
[0043] A peak verification module, used to verify the validity of the first peak detection result;
[0044] A heart rate determination module is used to determine the heart rate of the heart-like body based on the first peak detection result if the first peak detection result passes the verification.
[0045] The present application also provides an electronic device, including:
[0046] Memory for storing computer programs;
[0047] A processor is used to implement the steps of the cardiac-like heart rate determination method when executing the computer program.
[0048] The present application also provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for determining a heart-like heart rate are implemented.
[0049] Compared with the prior art, the present application is applied to determine the heart rate of a cardiac-like image. The time domain signal of the characteristic pixel point is extracted based on multiple consecutive frames of cardiac-like images, a first peak detection is performed on the time domain signal, a first peak detection result is obtained, and the validity of the first peak detection result is verified. If the first peak detection result passes the verification, the heart rate of the cardiac-like image is determined based on the first peak detection result. The characteristic pixel point in the technical solution of the present application is a pixel point in the cardiac-like image that can reflect the heartbeat. The peak detection result is generated by performing peak detection on the time domain signal generated by the characteristic pixel points in the cardiac-like images of different frames to realize the detection of the time domain signal, ensure the accuracy of the time domain signal generated by the characteristic pixel point, and realize the determination of the heart-like heart rate based on the verification of multiple peak detection results.
[0050] The present application also provides a heart-like heart rate determination device, electronic device and readable storage medium, which have the above beneficial effects and are not described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0052] Figure 1 A flow chart of a heart rate determination method for a heart-like heart provided in the present application;
[0053] Figure 2a An example of the first frame of the video provided for this application;
[0054] Figure 2b Provide an example of the frame image cutting background process for this application;
[0055] Figure 2c An example of sequential arrangement of cardiac images provided in this application;
[0056] Figure 3 A schematic diagram of the result of positive peak detection of a cardiac-like waveform provided in the present application;
[0057] Figure 4A schematic diagram of the results of reverse peak detection of a cardiac-like waveform provided in the present application;
[0058] Figure 5a A schematic diagram of a third-generation heart-like device provided for this application;
[0059] Figure 5b A schematic diagram of a second-generation heart-like device provided for this application;
[0060] Figure 6 A schematic diagram of a characteristic pixel point in the inner area of a heart-like image provided by the present application;
[0061] Figure 7 A schematic diagram of a set of frequency values determined by the peak detection results provided in this application;
[0062] Figure 8 (a), (b), and (c) are schematic diagrams of the detection results of wave peak detection by forward normal wave, reverse normal wave, and forward enhanced wave provided by the present application, respectively;
[0063] Fig. 9 This is a structural diagram of a heart-like heart rate determination device provided in this application. DETAILED DESCRIPTION
[0064] The core of the present application is to provide a method for determining a heart rate similar to a heart, which can quickly identify a specific heart rate similar to a heart under a heart-like image. Another core of the present application is a heart rate determination device, equipment and a readable storage medium.
[0065] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0066] This application provides a heart rate determination method similar to that of a heart. Please refer to Figure 1 , Figure 1 A flowchart of a method for determining a heart rate similar to a heart provided in an embodiment of the present application, the method mainly comprises the following steps:
[0067] S100, preprocessing the heart-like video to obtain a heart-like image.
[0068] The embodiment of the present application mainly aims at recognizing and confirming the heart rate of the heart-like beating conditions shown in the heart-like video. Specifically, the heart-like video can be divided into a plurality of consecutive frames of heart-like images that change over time, such as Figure 2c As shown, each frame of the heart-like image can represent the beating state of the heart-like image of the current frame node. At the same time, before obtaining the heart-like image, the content of this embodiment further includes cropping each frame of the heart-like original image of the heart-like video so that the size of the cropped heart-like image is a small image including a complete heart-like image.
[0069] Specifically, after obtaining the video data of the organoid heart, we first convert the video into frame images. From the image, we can see that the organoid heart only occupies a small part of the whole picture. The rest of the background is actually not needed in the analysis process. We need to segment the area where the organoid heart is located. This can speed up the analysis and save computer resources. Therefore, we convert the first frame of the video or any frame image into a grayscale image for edge detection to find the boundary line of the organoid heart, as shown below Figure 2a As shown by the black circle in : After obtaining the contour area, the lines of the area are converted into a set of points, and the maximum and minimum x, y values are found. Based on the value and a custom edge padding (currently 20 pixels are used, that is, 20 pixels are expanded), the coordinates of the upper left corner and the lower right corner are calculated, as shown in Figure 2b According to the two gray points in the rectangle formed by the two gray points, all video frames are cropped, such as Figure 2b As shown, the first step of preprocessing can be completed to obtain the preprocessed image.
[0070] The pre-processed image is Gaussian downsampled three times to achieve image compression and speed up the calculation. The image data after the third downsampling is obtained as the data after the second step of preprocessing. At the same time, the g channel in each frame of the image is used as the analysis channel of the frame, and all the data after processing are obtained as heart-like images (after certain experiments, using three-channel data and single-channel data has basically no effect on the results, and both can accurately obtain the heart rate of the organoid heart, so single-channel data is used as the analysis data of each frame, and both R and B channels are acceptable). Figure 2c As shown, the multiple consecutive heart-like images in the figure are arranged in the time sequence of the video frame number, the image height is H, and the image width is W.
[0071] S101, extracting time domain signals of characteristic pixel points based on multiple consecutive frames of cardiac-like images.
[0072] In the above embodiment, a plurality of temporally continuous frames of heart-like images may be obtained for a heart-like video, and a segment of a heart-like video may include a plurality of frames of heart-like images. Therefore, the heart-like images are arranged in a temporal order.
[0073] This embodiment takes characteristic pixel points in a heart-like image and observes the movement of the heart-like part thereof over time, such as Figure 2c The pixel position of the upper right corner of the heart-like image shown changes with time, and its pixel value in multiple frames of heart-like images changes, wherein it should be emphasized that the relative position of the characteristic pixel and the heart-like image is unchanged. The reason why the characteristic pixel proposed in the present application generates a time domain signal is that the position of the characteristic pixel does not change, but the pixel value at the characteristic pixel changes with the movement of the heart-like image. Therefore, it can be understood that the time domain signal of the characteristic pixel is the pixel value change signal of the characteristic pixel over time, wherein the movement of the heart-like image includes contraction, expansion, etc. The content of this embodiment generates a time domain signal by observing the movement of the characteristic pixel in multiple frames of heart-like images, wherein the multiple frames of heart-like images refer to images generated by dividing the heart-like video at the time interval of each frame transmission.
[0074] S102: Perform a first peak detection on the time domain signal to obtain a first peak detection result.
[0075] In an embodiment of the present application, for the time domain signal generated by the above embodiment, in order to understand whether the time domain signal is reliable, it is necessary to identify the time domain signal. The content of this embodiment proposes to perform peak detection on the peaks of the time domain signal. The position of a pixel point consists of a main peak, a secondary peak and other peaks in the pixel values of all video frames. At the same time, different peak frequencies will be generated between peaks due to different spacings. The embodiment of the present application performs a first peak detection on the time domain signal to obtain a first peak detection result and obtain relevant data of the peak.
[0076] S103, verifying the validity of the first wave peak detection result.
[0077] After obtaining the relevant data of the peak, the embodiment of the present application proposes to verify the validity of the first peak detection result. Specifically, the beating frequency of the peak frequency of the heart-like organ is between 0.1 and 0.16. If it does not exceed the above range, the first peak detection result is determined to be valid. If the frequency content in this range is very small, the first peak detection result is invalid.
[0078] S104: If the first wave peak detection result passes the verification, a cardiac-like heart rate is determined based on the first wave peak detection result.
[0079] The content of this embodiment is for characteristic pixel points in a heart-like image, and based on the time domain signal generated by the position change of multiple frames of heart-like images along with the movement of the heart-like, the time domain signal is subjected to peak detection to generate a first peak detection result, and the heart rate of the heart-like is determined after the validity of the first peak detection result is confirmed and verified. The technical solution of this application can realize the generation of a time domain signal generated along with the heart-like movement by the characteristic pixel points contained in the heart-like image, and after verifying the first peak detection result of the time domain signal, the reliability of the time domain signal is ensured, thereby accurately calculating the heart rate of the heart-like.
[0080] In a specific embodiment of the present application, if the first peak detection result fails the verification, the method further includes:
[0081] Performing a second peak detection on the time domain signal of the characteristic pixel point, obtaining a second peak detection result, and verifying the validity of the second peak detection result, and if the second peak detection result passes the verification, determining the heart rate of the heart-like heart based on the second peak detection result;
[0082] The first wave peak frequency detection and the second wave peak detection are one and the other of forward wave peak detection and reverse wave peak detection.
[0083] The present application discloses an implementation method. When the first peak detection result fails to pass the verification, that is, most of the frequencies in the first peak detection result are outside the beating frequency of 0.1 to 0.16, this embodiment proposes to perform a second peak detection on the time domain signal, obtain the second peak test result, and verify the second peak detection result. If the second peak detection result passes the verification, the heart rate of the heart-like body is determined based on the second peak detection result. Among them, the first peak frequency detection and the second peak detection are one and the other of the forward peak detection and the reverse peak detection. Furthermore, the forward peak detection and the reverse peak detection are respectively the processes of treating the peaks and troughs of the same time domain signal as peaks for peak testing. Here, no further explanation is given on how the forward peak detection and the reverse peak detection define the peaks and troughs of the time domain signal. Figure 3 It is a schematic diagram of the result of positive peak detection; Figure 4 This is a schematic diagram of the results of reverse peak detection.
[0084] The technical solution of this embodiment takes into account the abnormal problems that may occur in the recognition of time domain signals of heart-like images during the actual measurement and calculation process, and proposes a second verification of the time domain signal to determine the heart-like heart rate based on the second frequency result.
[0085] In one embodiment of the present application, the characteristic pixel points are pixel points on the heart-like boundary line of the heart-like image.
[0086] Figure 5a This is a schematic diagram of the third generation heart; Figure 5a As shown, the internal area of the third-generation heart-like device has a complex structure. The pixel values of the pixels in the internal area of the heart-like device are similar to those in the background area. In some cases, the height difference between the main peak and the secondary peak of the pixel sequence will be very small. Therefore, if the characteristic pixel points are found in the internal area, there may be errors in the subsequent peak detection to determine the heart rate value. Considering the beating law of the heart-like device, the internal beating will be transmitted to the boundary of the heart-like device. Therefore, characteristic pixel points are selected on the heart-like boundary line so that the subsequent peak detection can determine the heart rate value with higher accuracy. Therefore, it is not only applicable to the second-generation heart-like device, but also to the third-generation heart-like device. In addition, since the characteristic pixel points are only found on the heart-like boundary line, it also has the advantage of fast processing speed.
[0087] Figure 5b This is a schematic diagram of the second-generation heart-like image. The internal area of the second-generation heart-like image is very different from the background area. The height difference between the main peak and the secondary peak of the pixel sequence change is large. Therefore, the characteristic pixel points that can better reflect the heart beat can also be determined in the internal area of the heart-like image, such as Figure 6 The frame image shown can determine a pixel point in the inner area of the heart-like image in the frame node as a characteristic pixel point, reflecting the movement of the heart-like image.
[0088] In one embodiment of the present application, the method further includes the following steps to determine the characteristic pixel points:
[0089] The first step is to convert the time domain signals of all pixels on the heart-like boundary line of the continuous multi-frame heart-like image into frequency domain signals. Specifically, for the position of a certain pixel in the continuous multi-frame heart-like image, the pixel value is taken according to the direction of the video frame, and the pixel values of this position on all frames can form a time domain signal (or pixel sequence). The change of the pixel sequence of heart-like pixels contains information about the frequency of the heart-like beating, but it is difficult to observe this kind of information from the change of pixel values alone, so for the pixel sequence of heart-like pixels, it is fast Fourier transformed to convert the time domain signal into a frequency domain signal, and the sum of countless sine and cosine sequences converted from the sequence is obtained.
[0090] The second step is to determine the pixel corresponding to the frequency domain signal with the largest amplitude value within the normal heart rate range as the characteristic pixel based on the amplitude values corresponding to the frequency domain signals of all pixels. Specifically, the normal heart rate range of the heart-like heart rate is determined. According to the experimental data statistics, the normal heart rate range of the heart-like heart rate is between 6 and 130. First, for the frequency spectrum of the pixel sequence of each heart-like pixel, perform frequency screening between 6 and 130, and delete the remaining frequencies (the frequency coefficients outside 6 to 130 are set to 0). For the pixel sequence of each heart-like pixel in the frequency range of 6 to 130, determine the maximum amplitude of each heart-like pixel; finally, compare the maximum amplitudes of all heart-like pixels, and select the pixel corresponding to a maximum value among multiple maximum amplitudes, which is the characteristic pixel.
[0091] From this, it can be understood that the characteristic pixel points are the pixel points corresponding to the maximum amplitude value and the frequency domain signal within the correct heart rate range in multiple consecutive frames of heart-like images. This method can not only ensure that the frequency of the characteristic pixel points is within the correct heart rate range of the heart-like image, but also ensure that the characteristic pixel points can reflect larger heart rate beats, which is beneficial to determine the accuracy of the heart rate value.
[0092] In one embodiment of the present application, the pixel corresponding to the frequency domain signal that is within the normal heart rate range and has the largest amplitude value is determined as the characteristic pixel, and the method further includes:
[0093] Determine the pixel point corresponding to the frequency domain signal which is within the normal heart rate range and has the largest amplitude value as the preliminary feature pixel point;
[0094] Determine the amplitude values corresponding to the frequency domain signals of a preset number of pixel points on the heart-like boundary line within a preset distance from the preliminary characteristic pixel point corresponding to the maximum amplitude value;
[0095] Comparing whether the difference between the amplitude values of the preset number of pixel points and the maximum amplitude value is within a preset difference range;
[0096] If so, determine the preliminary characteristic pixel point corresponding to the maximum amplitude value as the characteristic pixel point.
[0097] The embodiment of the present application discloses a verification method for characteristic pixel points. First, the frequency domain signal corresponding to the maximum amplitude value within the normal heart rate range is used as a preliminary characteristic pixel point, and a preset number of other pixel points within a preset distance of the preliminary characteristic pixel point are compared, and the difference between the amplitude values corresponding to the other pixel points and the amplitude value of the preliminary characteristic pixel point is calculated to calculate whether the difference is within the preset difference range. Although the preliminary characteristic pixel point corresponds to the maximum amplitude value, the amplitude values of other pixel points adjacent to it should not differ much from the maximum amplitude value, so that the preliminary characteristic pixel point can be regarded as a characteristic pixel point.
[0098] Therefore, it can be understood that the above steps actually add the noise vibration check when determining the feature pixel point to avoid selecting an erroneous pixel point. More specifically, in order to avoid the initial feature pixel point being the wrong maximum amplitude point, the amplitude of the pixels around the initial feature pixel point is also calculated. If the vibration amplitude of the surrounding points is also relatively large to a certain extent, then the initial feature pixel point is determined to be the pixel point with the largest amplitude and can be used as the feature pixel point.
[0099] In one embodiment of the present application, a peak detection step is used in the first peak detection or the second peak detection:
[0100] Determine whether the pixel value of the time domain signal of the characteristic pixel point at the current time point is greater than the pixel values at the previous time point and the next time point;
[0101] If yes, the pixel value at the current time point is taken as the peak value.
[0102] In the process of peak detection, the peak is confirmed in the order of time points, that is, in the current time period, including the current time point, the previous time point, and the next time point. The embodiment of the present application determines whether the value of the current time point is the largest. If so, the current time point is the peak.
[0103] In one embodiment of the present application, the first peak detection result and the second peak detection result are both referred to as peak detection results;
[0104] The first peak detection result or the second peak detection result is subjected to the following validity verification steps:
[0105] Determine a set of frequency values including a plurality of frequency values based on the peak detection result;
[0106] Obtaining a ratio of a first number of the frequency values in the normal heart rate range to a total number of the frequency values in the set of frequency values;
[0107] It is determined whether the proportion is greater than a preset proportion. If so, it is determined that the peak detection result corresponding to the set of frequency values is valid.
[0108] The embodiment of the present application further emphasizes the verification process of the first peak detection result or the second peak detection result. The first peak detection result or the second peak detection result each includes a group of frequencies. It is determined whether each frequency domain is within the normal heart rate range, and the number of frequencies within the normal heart rate range is counted. When the ratio of the number to the group of frequencies is greater than a threshold, it is considered that most of the group of frequencies are normal frequency domains, so they are valid. Among them, for obtaining the frequency value, such as Figure 7A peak detection result table is listed for summary. For the detection result total1, there are 8 with a frequency of 48, 3 with a frequency of 47, 3 with a frequency of 49, and 1 with a frequency of 50.
[0109] Meanwhile, in one embodiment, if the second wave peak detection result fails to be verified, the cardiac abnormality is determined.
[0110] If the first wave peak detection result and the second wave peak detection result are not verified, a cardiac abnormality is determined.
[0111] In one embodiment of the present application, the first peak detection result and the second peak detection result are both referred to as peak detection results; determining the heart rate of the heart-like body based on the peak detection results includes: filtering the peak detection results; and determining the heart rate of the heart-like body based on the filtered peak detection results.
[0112] Specifically, filtering the peak detection result includes:
[0113] Determine a peak filtering threshold based on the peak detection result, the peak filtering threshold being the maximum value when the number of peaks within a preset peak value range is less than a preset threshold number;
[0114] The peak detection result is filtered according to the peak filtering threshold to filter out peaks whose peak value is less than the peak filtering threshold.
[0115] When using the above-mentioned filtering method, in actual applications, the preset threshold number is usually set to a smaller value, preferably set to 1. The purpose is that when the number of peaks in the preset peak range is less than the preset threshold number (that is, preferably 0), it means that the number of peaks in the preset peak range is very small. In this case, the maximum value is determined within the preset peak range, and the peaks less than the maximum value are filtered out, that is, some interference signals can be filtered out. Therefore, it is beneficial to improve the accuracy of subsequent determination of the heart rate-like heart rate based on the peak detection results.
[0116] In one embodiment of the present application, determining a peak filtering threshold based on the peak detection result specifically includes: dividing the total value range into a preset first number of value ranges based on the total value range of the time domain signal of the characteristic pixel point; counting the total number of peaks within a preset second number of value ranges continuously based on the peak detection result; judging whether the total number of peaks is less than a preset threshold number; if so, determining the maximum value in the preset second number of value ranges continuously as the peak filtering threshold.
[0117] To achieve the above-mentioned determination of the peak filtering threshold according to the peak detection result, more specifically, in one embodiment of the present application, the determination of the peak filtering threshold according to the peak detection result further specifically includes: setting a class level for each of the preset first number of value ranges, and the larger the value in the value range, the higher the class level; counting the total number of peaks within a continuous preset second number of class levels according to the peak detection result; when the total number of peaks is less than the preset threshold number, determining the highest class level among the continuous preset second number of class levels; and using the highest class level as the peak filtering threshold;
[0118] In this case, the peak detection result is filtered out according to the peak filtering threshold, and the peaks that are smaller than the peak filtering threshold are specifically filtered out, which includes: filtering out the peaks in the peak detection result that are located in the class level that is less than or equal to the highest class level.
[0119] For example, in one embodiment of the present application, the entire value range of the feature pixel point is divided into 1 to 20 classes (i.e., a preset first number) according to size, and each class has a certain value range. The larger the class, the larger the value in the value range. In each class, there may be a certain number of peaks or no peaks. Specifically, based on the total number of peaks in the preset 10 consecutive classes (i.e., the preset second number), it is judged whether it is less than the preset threshold number. When the 10 consecutive classes are 2 to 11 classes, the number of peaks contained is 0, which is less than the preset threshold number 1. Therefore, the maximum value in the value range of class 12 is used as the peak filtering threshold, or class 12 is used as the peak filtering threshold.
[0120] It should be noted that the peak detection in the above text may be normal peak detection or enhanced peak detection, such as Figure 8 (a)~ Figure 8 (c) Figure 8 (a) Figure 8 (b) Figure 8 (c) are schematic diagrams of the detection results of the peak detection by the forward normal wave, the reverse normal wave, and the forward enhanced wave provided in the present application; the enhanced peak detection includes the forward enhanced peak detection and the reverse enhanced peak detection, and the forward normal peak detection refers to the detection using the peak position of the forward normal wave, such as Figure 8 (a) is shown. Reverse normal wave peak detection refers to the detection using the peak position of the reverse normal wave, such as Figure 8 (b) As shown. Forward enhanced wave peak detection refers to amplifying the position detected as a peak in the forward detected peak according to the value of the peak, that is, the peak will be multiplied by an amplification coefficient. The higher the initial peak, the larger the multiplication coefficient, such as Figure 8(c) is shown. Reverse enhanced wave peak detection refers to amplifying the position detected as a peak in the reverse detected peak according to the value of the peak, that is, the peak will be multiplied by an amplification coefficient. The higher the initial peak, the greater the multiplication coefficient. The reverse enhanced wave is similar to the forward enhanced wave.
[0121] The present application also discloses a heart rate determination device similar to a heart, such as Fig. 9 The structure diagram of a heart-like heart rate determination device shown in FIG. 1 includes:
[0122] A time domain signal extraction module 901 extracts time domain signals of characteristic pixels based on multiple consecutive frames of cardiac-like images;
[0123] A first peak detection result acquisition module 902, configured to perform a first peak detection on the time domain signal to acquire a first peak detection result;
[0124] A peak verification module 903, used to verify the validity of the first peak detection result;
[0125] The heart rate determination module 904 is configured to determine the heart rate of the heart-like condition based on the first peak detection result if the first peak detection result passes verification.
[0126] Optionally, the device further comprises:
[0127] a second peak frequency value verification module, configured to, if the first peak detection result fails to pass the verification, perform a second peak detection on the time domain signal to obtain a second peak detection result, and verify the validity of the second peak detection result; and if the second peak detection result passes the verification, determine the heart rate of the cardiac-like condition based on the second peak detection result;
[0128] The first wave peak frequency detection and the second wave peak detection are one and the other of forward wave peak detection and reverse wave peak detection.
[0129] Optionally, the characteristic pixel points are pixel points in a heart-like boundary line of the heart-like image.
[0130] Optionally, the device further comprises:
[0131] A pixel conversion module is used to convert the time domain signals of all the pixel points on the heart-like boundary line of the heart-like images of the consecutive frames into frequency domain signals;
[0132] The characteristic pixel point determination module is used to determine the pixel point corresponding to the frequency domain signal with the largest amplitude value within the normal heart rate range as the characteristic pixel point based on the amplitude values corresponding to the frequency domain signals of all pixel points.
[0133] Optionally, the feature pixel determination module is specifically used to:
[0134] Determine the pixel point corresponding to the frequency domain signal which is within the normal heart rate range and has the largest amplitude value as the preliminary feature pixel point;
[0135] Determine the amplitude value corresponding to the frequency domain signal of a preset number of pixel points on the heart-like boundary line within a preset distance of the preliminary characteristic pixel point;
[0136] Comparing whether the difference between the amplitude values of the preset number of pixel points and the maximum amplitude value is within a preset difference range;
[0137] If yes, determine the preliminary feature pixel point as the feature pixel point.
[0138] Optionally, the time domain signal extraction module 901 further includes:
[0139] The peak detection submodule is used to determine whether the pixel value of the current time point of the time domain signal of the characteristic pixel point is greater than the pixel values at the previous time point and the next time point; if so, the pixel value at the current time point is used as the peak value.
[0140] Optionally, the peak verification module 903 specifically includes:
[0141] A frequency value determination submodule, configured to determine a set of frequency values including a plurality of frequency values based on the peak detection result;
[0142] A frequency result verification submodule, used for obtaining a ratio of a first number of the frequency values in the normal heart rate range to a total number of the frequency values in the set of frequency values;
[0143] The judging submodule is used to judge whether the proportion is greater than a preset proportion, and if so, judge that the set of frequency values is valid.
[0144] Optionally, the second wave peak frequency value verification module is also used to determine a cardiac abnormality if the second wave peak detection result fails the verification.
[0145] Optionally, the heart rate determination module 904 further includes:
[0146] A filtering submodule, used for filtering the peak detection result;
[0147] A determination submodule determines the heart rate of the heart-like body based on the filtered peak detection result.
[0148] Optionally, the filtering submodule is specifically used for:
[0149] Determine a peak filtering threshold based on the peak detection result, the peak filtering threshold being the maximum value when the number of peaks within a preset peak value range is less than a preset threshold number;
[0150] The peak detection result is filtered according to the peak filtering threshold to filter out peaks whose peak value is less than the peak filtering threshold.
[0151] The present application also provides an electronic device, including:
[0152] Memory for storing computer programs;
[0153] A processor is used to implement the steps of the cardiac-like heart rate determination method when executing the computer program.
[0154] A readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for determining a heart rate similar to that of a heart.
[0155] The present application further provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the battery status determination method are implemented.
[0156] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0157] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0158] The above is a detailed introduction to a heart-like heart rate determination method, device, equipment and readable storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A method for determining a heart rate similar to a heart, characterized in that: The method comprises: Extracting time domain signals of characteristic pixel points based on multiple consecutive frames of cardiac-like images; the characteristic pixel points are pixel points on the cardiac-like boundary line of the cardiac-like images; Performing a first peak detection on the time domain signal of the characteristic pixel point to obtain a first peak detection result; Verifying the validity of the first peak detection result; If the first wave peak detection result passes the verification, determining the heart rate of the heart-like condition based on the first wave peak detection result; The method further comprises: Converting the time domain signals of all the pixel points on the heart-like boundary line of the continuous plurality of frames of the heart-like images into frequency domain signals; According to the amplitude values corresponding to the frequency domain signals of all the pixel points, the pixel point corresponding to the frequency domain signal with the largest amplitude value within the normal heart rate range is determined as the preliminary feature pixel point; Determine the amplitude value corresponding to the frequency domain signal of a preset number of pixel points on the heart-like boundary line within a preset distance of the preliminary characteristic pixel point; Comparing whether the difference between the amplitude values of the preset number of pixel points and the maximum amplitude value is within a preset difference range; If yes, determine the preliminary feature pixel point as the feature pixel point.
2. The cardiac-like heart rate determination method according to claim 1, characterized in that: If the first peak detection result fails the verification, the method further includes: Performing a second peak detection on the time domain signal of the characteristic pixel point, obtaining a second peak detection result, and verifying the validity of the second peak detection result, and if the second peak detection result passes the verification, determining the heart rate of the heart-like heart based on the second peak detection result; The first wave peak detection and the second wave peak detection are one and the other of forward wave peak detection and reverse wave peak detection respectively.
3. The method according to claim 2, characterized in that The first peak detection or the second peak detection adopts the following peak detection steps: Determine whether the pixel value of the time domain signal of the characteristic pixel point at the current time point is greater than the pixel values at the previous time point and the next time point; If yes, the pixel value at the current time point is taken as the peak value.
4. The method according to claim 2, characterized in that: The first peak detection result and the second peak detection result are both referred to as peak detection results; The following validity verification steps are adopted for the peak detection result: Determine a set of frequency values including a plurality of frequency values based on the peak detection result; Obtaining a ratio of a first number of the frequency values in the normal heart rate range to a total number of the frequency values in the set of frequency values; It is determined whether the proportion is greater than a preset proportion. If so, it is determined that the peak detection result corresponding to the set of frequency values is valid.
5. The method according to claim 2, characterized in that: Also includes: If the second wave peak detection result passes the verification, the type of cardiac abnormality is determined.
6. The method according to claim 2, characterized in that The first peak detection result and the second peak detection result are both referred to as peak detection results; Determining the heart rate of the heart class based on the peak detection result includes: filtering the peak detection result; The heart rate of the heart-like body is determined based on the filtered peak detection result.
7. The method according to claim 6, characterized in that The filtering of the peak detection result specifically includes: Determine a peak filtering threshold based on the peak detection result, the peak filtering threshold being the maximum value when the number of peaks within a preset peak value range is less than a preset threshold number; The peak detection result is filtered according to the peak filtering threshold to filter out peaks whose peak value is less than the peak filtering threshold.
8. A heart rate determination device similar to a heart, characterized in that The device comprises: A time domain signal extraction module is used to extract time domain signals of characteristic pixel points based on a plurality of consecutive frames of cardiac-like images; the characteristic pixel points are pixel points in the cardiac-like boundary line of the cardiac-like images; A first peak detection result acquisition module, used to perform a first peak detection on the time domain signal to obtain a first peak detection result; A peak verification module, used to verify the validity of the first peak detection result; a heart rate determination module, configured to determine the heart rate of the heart-like condition based on the first wave peak detection result if the first wave peak detection result passes verification; The device also includes: A pixel conversion module is used to convert the time domain signals of all the pixel points on the heart-like boundary line of the heart-like images of the consecutive frames into frequency domain signals; The feature pixel determination module is used to determine, based on the amplitude values corresponding to the frequency domain signals of all the pixel points, the pixel point corresponding to the frequency domain signal within the normal heart rate range and with the largest amplitude value as the preliminary feature pixel point; determine the amplitude values corresponding to the frequency domain signals of a preset number of pixel points on the heart-like boundary line within a preset distance from the preliminary feature pixel point; compare whether the difference between the amplitude values of the preset number of pixel points and the maximum amplitude value is within a preset difference range; if so, determine the preliminary feature pixel point as the feature pixel point.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the cardiac-like heart rate determination method as described in any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the cardiac-like heart rate determination method according to any one of claims 1 to 7.
