A heart rate determination method, device, and apparatus of a heart-like, and a storage medium
By extracting the time-domain signals of feature pixels from heart-like images for peak detection and frequency feature recognition, the problem of determining the heart rate of heart-like images is solved, and accurate heart rate calculation of heart-like images is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MEGAROBO TECH CO LTD
- Filing Date
- 2022-12-27
- Publication Date
- 2026-07-10
AI Technical Summary
Existing technologies make it difficult to accurately determine the heart rate of a heart-like organ, thus making it impossible to understand the working state of the heart-like organ.
By extracting the temporal signals of at least two feature pixels from consecutive multi-frame heart-like images, peak detection and frequency feature recognition are performed to determine the target feature pixels, and the heart rate of the heart-like image is calculated based on the target feature pixels.
This enables reliable determination of the heart rate of a heart-like organism, ensuring the accuracy and reliability of the calculation results.
Smart Images

Figure CN116228658B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of heart-like technology, and in particular to a method, apparatus, device, and storage medium for determining the heart rate of a heart-like organ. Background Technology
[0002] The incidence of heart disease is gradually increasing among modern people. Correspondingly, the continuous development of modern medicine has led to the design of various treatment methods to treat heart disease. Among them, the technology of using artificial hearts to replace or assist the human heart is gradually being widely used.
[0003] In the daily operation of a heart-like organ, testing it requires determining its specific heart rate to understand its working status. Methods or devices for testing conventional heart rates are not suitable for testing the heart rate of a heart-like organ; therefore, existing methods are insufficient to determine its heart rate and current status.
[0004] How to determine the heart rate of a heart-like organ and ensure its reliability 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 method, apparatus, device and storage medium for determining the heart rate of a heart-like organ, for realizing the determination of the heart rate of the heart-like organ itself through video images of the heart-like organ.
[0006] To address the aforementioned technical problems, this application provides a method for determining the heart rate of a heart-like organ, comprising:
[0007] Extract the temporal signals corresponding to at least two feature pixels from consecutive multi-frame cardiac images;
[0008] For each of the feature pixels, the time-domain signal is subjected to first peak detection and the corresponding first peak detection result is obtained;
[0009] The validity of the first peak detection results corresponding to at least two of the feature pixels is verified respectively;
[0010] Frequency feature identification is performed on the first peak detection results corresponding to at least two of the feature pixels that have passed the validity verification.
[0011] Based on the results of frequency feature recognition of at least two of the feature pixels, a target feature pixel is determined among the at least two feature pixels;
[0012] The heart rate of the heart-like structure is determined based on the first peak detection result of the target feature pixels.
[0013] Optionally, each of the feature pixels is located on the heart-like boundary line of the heart-like image.
[0014] Optionally, at least two of the feature pixels are located on the boundary lines of the heart-like image within different quadrants.
[0015] Optional frequency characteristics include: different types of frequency values;
[0016] The step of determining the target feature pixel among the at least two feature pixels based on the frequency feature recognition results of at least two feature pixels specifically includes:
[0017] When the validity of the peak frequency values corresponding to at least two of the feature pixels is verified, the different frequency value types contained in the peak detection results of each of the at least two feature pixels are identified.
[0018] Among at least two feature pixels, the feature pixel with the fewest different frequency value types of the peak detection result is selected as the target feature pixel.
[0019] Optionally, the frequency characteristics may also include: the cumulative number of co-frequency values;
[0020] The step of determining the target feature pixel among the at least two feature pixels based on the result of frequency feature recognition of at least two feature pixels further includes:
[0021] If the number of different frequency value types in the peak detection results of at least two feature pixels is the same, the feature pixel with the largest cumulative number of same frequency values in the peak detection results is determined as the target feature pixel based on the cumulative number of same frequency values contained in the peak detection results.
[0022] Optionally, the method further includes:
[0023] If the validity of the first peak detection results of all the feature pixels fails to pass the verification, a second peak detection is performed on the time domain signals of at least two of the feature pixels and a second peak detection result is obtained; wherein, the first peak frequency detection and the second peak detection are one and the other of forward peak detection and reverse peak detection.
[0024] The validity of the second peak detection results for at least two of the feature pixels is verified respectively;
[0025] Frequency feature identification is performed on the second peak detection results corresponding to at least two of the feature pixels;
[0026] Based on the results of frequency feature recognition of at least two of the said feature pixels, a target feature pixel is determined from the at least two said feature pixels.
[0027] The heart rate of the heart-like structure is determined based on the second peak detection result of the target feature pixels.
[0028] Optional, also includes:
[0029] If the validity of the second peak detection results for all the aforementioned feature pixels fails verification, then the cardiac-like abnormality is determined.
[0030] Displays a warning message indicating a possible cardiac abnormality.
[0031] Optionally, the method further includes:
[0032] The time-domain signal of all pixels at the heart boundary of the heart-like image in multiple consecutive frames is converted into a frequency-domain signal;
[0033] Based on the amplitude values corresponding to the frequency domain signals of all pixels, at least two pixels corresponding to the frequency domain signals within the normal heart rate range and in descending order of the amplitude values are selected as the initial feature pixels.
[0034] Optionally, based on the amplitude values corresponding to the frequency domain signals of all pixels, at least two pixels corresponding to frequency domain signals within the normal heart rate range and in descending order of amplitude values are selected as the preliminary feature pixels, including:
[0035] Based on the amplitude values corresponding to the frequency domain signals of all pixels, at least two pixels corresponding to the frequency domain signals that are within the normal heart rate range and are ordered from largest to smallest amplitude values are used as preliminary feature pixels.
[0036] For each of the preliminary feature pixels, determine the amplitude value of the frequency domain signal of a predetermined number of pixels within a predetermined distance adjacent to the preliminary feature pixel;
[0037] Compare whether the difference between the amplitude value of the preset number of pixels and the amplitude value of the preliminary feature pixel is within a preset difference range;
[0038] If so, determine the preliminary feature pixel as the feature pixel.
[0039] Optionally, the first peak detection or the second peak detection may employ the following peak detection steps:
[0040] Determine whether the pixel value of the temporal signal of the feature pixel at the current time point is greater than the values at the previous time point and the next time point;
[0041] If so, the pixel value at the current time point is taken as the peak value.
[0042] Optionally, both the first peak detection result and the second peak detection result are referred to as peak detection results;
[0043] The following validity verification steps are used to verify the peak detection results:
[0044] Based on the peak detection results, a set of frequency values including multiple frequency values is determined;
[0045] Obtain the percentage of the first number of frequency values within the normal heart rate range to the total number of frequency values in the set of frequency values;
[0046] Determine whether the percentage is greater than a preset percentage. If so, determine that the peak detection result corresponding to the set of frequency values is valid.
[0047] Optionally, both the first peak detection result and the second peak detection result are referred to as peak detection results;
[0048] Determining the heart rate of the heart-like organ based on the peak detection results includes:
[0049] The peak detection results are filtered;
[0050] The heart rate of the heart-like organ is determined based on the filtered peak detection results.
[0051] Optionally, filtering the peak detection results specifically includes:
[0052] Based on the peak detection results, a peak filtering threshold is determined. The peak filtering threshold is the maximum value when the number of peaks within a preset peak range is less than a preset threshold number.
[0053] The peak detection results are filtered according to the peak filtering threshold to filter out peaks with peak values smaller than the peak filtering threshold.
[0054] This application also provides a heart rate determination device for a type of heart, the device specifically comprising:
[0055] A time-domain signal generation module is used to extract time-domain signals corresponding to at least two feature pixels from multiple consecutive frames of the heart-like image;
[0056] The first peak frequency value acquisition module is used to perform first peak detection on the time domain signal of each feature pixel and obtain the corresponding first peak detection result.
[0057] The verification module is used to verify the validity of the first peak detection results corresponding to at least two of the feature pixels.
[0058] The frequency feature recognition module is used to perform frequency feature recognition on the first peak detection results corresponding to at least two feature pixels that have passed the validity verification.
[0059] The target feature pixel determination module is used to determine a target feature pixel among at least two feature pixels based on the result of frequency feature recognition of at least two feature pixels.
[0060] A heart rate determination module is used to determine the heart rate of the heart-like structure based on the first peak detection result of the target feature pixels.
[0061] This application also provides an electronic device, including:
[0062] Memory, used to store computer programs;
[0063] A processor for implementing a heart-like heart rate determination method when executing the computer program.
[0064] This application also provides a readable storage medium storing a computer program, which, when executed by a processor, implements the steps of a heart rate determination method similar to that of a heart.
[0065] Compared with existing technologies, this application is applied to determine the heart rate of a heart-like structure. It extracts the temporal signals corresponding to at least two feature pixels from multiple consecutive frames of heart-like images. For each feature pixel, a first peak is detected in the temporal signal, and the corresponding first peak detection result is obtained. The validity of the first peak detection results corresponding to the at least two feature pixels is verified. Frequency feature identification is performed on the first peak detection results corresponding to the at least two feature pixels that pass the validity verification. Based on the frequency feature identification results of the at least two feature pixels, a target feature pixel is determined among the at least two feature pixels. The heart rate of the heart-like structure is determined based on the first peak detection result of the target feature pixel. This application acquires multiple feature pixels from heart-like images and identifies frequency features such as the number and / or type of frequencies in the peak detection results of the temporal signals of the feature pixel motion to determine reliable target feature pixels. Finally, the heart rate of the heart-like structure is calculated using the temporal signals of the verified target feature pixels. The technical method of this application accurately calculates the heart rate of a heart-like organ by using the temporal variation of heart-like feature pixels. It also includes a process of verifying the feature pixels used to ensure the accuracy of the final calculation result.
[0066] This application also provides a heart rate determination device, apparatus, and readable storage medium that resemble a heart, which has the above-mentioned beneficial effects, and will not be elaborated here. Attached Figure Description
[0067] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0068] Figure 1 A flowchart of a heart-like heart rate determination method provided in this application;
[0069] Figure 2a Example of the first frame of video provided for this application;
[0070] Figure 2b This application provides an example of a frame image background cropping process;
[0071] Figure 2c An example of sequential arrangement of heart-like images provided in this application;
[0072] Figure 3a A schematic diagram of a third-generation heart-like organ provided in this application;
[0073] Figure 3b A schematic diagram of a second-generation heart-like organ provided in this application;
[0074] Figure 4 This is a schematic diagram of the results of positive peak detection for feature pixels;
[0075] Figure 5 This is a schematic diagram of the results of inverse peak detection for feature pixels.
[0076] Figure 6 This is a schematic diagram of the results of positive peak detection for another feature pixel.
[0077] Figure 7 This is a schematic diagram of the results of reverse peak detection for another feature pixel.
[0078] Figure 8 A table summarizing a set of frequency values for each of the two peak detection results provided in this application;
[0079] Figure 9 (a), (b), and (c) are schematic diagrams of the detection results provided in this application using forward normal wave, reverse normal wave, and forward enhanced wave for peak detection.
[0080] Figure 10 A structural diagram of a heart-like heart rate determination device provided in this application. Detailed Implementation
[0081] The core of this application is to provide a method for determining the heart rate of a heart-like organ, which can quickly identify the specific heart rate of the heart-like organ under imaging. Another core aspect of this application is a heart-like organ heart rate determination device, apparatus, and a readable storage medium.
[0082] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0083] This application provides a method for determining the heart rate of a heart-like organ. Please refer to [reference needed]. Figure 1 , Figure 1 A flowchart of a heart-like heart rate determination method provided in this application embodiment, the method mainly includes the following steps:
[0084] S100 preprocesses the heart-like video to obtain heart-like images.
[0085] This embodiment mainly focuses on heart rate recognition and confirmation based on the heart-like beating pattern observed in a heart-like video. Specifically, the process of extracting segments from the heart-like video is as follows: Figure 2c As shown, the video of the heart-like image is divided into segments at preset frame intervals to obtain heart-like images. Each frame's heart-like image represents the beating of the heart-like image at the current frame node. Based on the beating of the heart-like image at different frame nodes and the changes in the beating, the heart rate of the heart-like image is identified. Furthermore, this embodiment also includes cropping the heart-like images to ensure that the size of the cropped heart-like images is a fixed value.
[0086] Specifically, after obtaining the video data of the organoid heart, the video is first converted into frame images. From the images, it can be seen that the organoid heart occupies only a small portion of the entire image; the rest of the background is unnecessary for our analysis. We need to segment the area containing the organoid heart. This speeds up the analysis and saves computer resources. Therefore, we perform edge detection on the first frame or any frame of the video, converting it to grayscale, to find the boundary lines of the organoid heart, as follows: Figure 2aAs shown by the black rings: After obtaining the outline region, the lines of this region are transformed into a set of individual points. The maximum and minimum x and y values are found. Based on these values and a custom edge padding (currently 20 pixels are used, i.e., an outward expansion of 20 pixels), the coordinates of the top-left and bottom-right corners are calculated, as shown below. Figure 2b Based on the two gray dots in the image, and the rectangular area formed by these two gray dots, all video frames are cropped, such as... Figure 2b As shown, this completes the first step of preprocessing and yields the preprocessed image.
[0087] The preprocessed image is subjected to three Gaussian downsampling steps to compress the image and speed up the calculation. The image data after the third downsampling step is used as the data after the second preprocessing step. Simultaneously, the g channel of each frame is used as the analysis channel for that frame. All processed data are then used to obtain the heart-like image (after some experimentation, using three-channel and single-channel data has virtually no impact on the results; both can accurately obtain the heart rate of the organoid heart. Therefore, single-channel data is used as the analysis data for each frame; either the R or B channel can be used). Figure 2c As shown, multiple consecutive cardiac-like images in the figure are arranged in chronological order according to the video frame number. The image height is H and the image width is W.
[0088] S101, extract the temporal signals corresponding to at least two feature pixels from multiple consecutive frames of cardiac-like images.
[0089] In the above embodiments, the heart-like video is cropped to obtain multiple frames of heart-like images. A heart-like video may include multiple frames of heart-like images. Therefore, the heart-like images have a sequential arrangement relationship over time, that is, multiple consecutive frames of heart-like images can be combined into a heart-like video.
[0090] This embodiment generates a temporal signal by observing the movement of feature pixels in a heart-like image over time. As shown in Figure 2, the position of the upper right corner of the heart-like image changes over time. It is important to note that the feature pixels maintain the same position across multiple consecutive frames of the heart-like image. The reason this application proposes generating a temporal signal from these feature pixels is that their positions change with the movement of the heart-like image, including contraction and expansion. This embodiment generates a temporal signal by observing the movement of feature pixels in multiple frames of heart-like images. Here, "multiple frames" refers to images generated by dividing the heart-like video into segments at predetermined intervals.
[0091] Furthermore, the number of feature pixels in this technical solution is selected based on the working characteristics of the heart-like structure itself. This solution emphasizes that the number of feature pixels is at least two, and the time-domain signal corresponding to each feature pixel is calculated separately.
[0092] S102, perform first peak detection on the time domain signal of each feature pixel and obtain the corresponding first peak detection result.
[0093] After obtaining the temporal signals of the feature pixels, peak detection is performed on each temporal signal and the peak detection results are obtained. Based on the temporal signals generated by combining the temporal values of the feature pixels of each frame, the peak values in the temporal signals and the frame positions corresponding to the peak values are identified.
[0094] S103, verify the validity of the first peak detection results corresponding to at least two feature pixels respectively.
[0095] The first peak value obtained from the above steps for at least two feature pixels and the corresponding frame position are verified to confirm whether the first peak detection result for at least two feature pixels is usable.
[0096] S104, frequency feature identification is performed on the first peak detection results corresponding to at least two feature pixels that have passed the validity verification.
[0097] If the first peak detection results corresponding to at least two feature pixels are confirmed as valid, the frequency characteristics of the first peak detection results are identified. In different time domain signals, although different time domain signals are considered valid, different feature pixels will have a corresponding impact on the final heart rate value for the signal used for final heart rate recognition. Therefore, it is necessary to identify more reliable data from the feature pixels as the source of the heart rate value. The identification method is the frequency feature recognition proposed in this embodiment.
[0098] S105, based on the results of frequency feature recognition of at least two feature pixels, determine the target feature pixel among at least two feature pixels.
[0099] S106, determine the heart rate of the heart-like structure based on the first peak detection result of the target feature pixels.
[0100] The technical solution of this application is to extract time-domain signals corresponding to at least two feature pixels from multiple consecutive frames of heart-like images, first verify the validity of the time-domain signals, and then perform frequency feature recognition on the first peak detection result that has passed the validity verification, so as to select target feature pixels from multiple feature pixels, so as to determine the heart rate of the heart-like image based on the target feature pixels.
[0101] In one embodiment of this application, preferably, each feature pixel is located on the heart-like boundary line of the heart-like image. The main reason is as follows: Figure 3a This is a schematic diagram of a third-generation artificial heart; for example... Figure 3a As shown, the internal structure of the third-generation heart-like organ is complex. The pixel values of pixels in the internal region of the heart-like organ may have the same values as those in the background region. In some cases, the height difference between the main peak and the secondary peak of the pixel sequence may be very small. Therefore, if feature pixels are found in the internal region, the subsequent peak detection to determine the heart rate value may be inaccurate. However, considering the beating pattern of the heart-like organ, the internal beating will be transmitted to the boundary of the heart-like organ. Therefore, feature pixels are selected on the boundary line of the heart-like organ, so that the accuracy of subsequent peak detection to determine the heart rate value is higher. Therefore, it is applicable not only to the second-generation heart-like organ but also to the third-generation heart-like organ. In addition, since feature pixels are only found on the boundary line of the heart-like organ, it also has the advantage of fast processing speed.
[0102] Figure 3b This is a schematic diagram of the second-generation heart-like image. The internal region of the second-generation heart-like image differs greatly from the background region. The height difference between the main peak and the secondary peak of the pixel sequence change is large. Therefore, feature pixels that can better reflect the heartbeat can also be determined in the internal region of the heart-like image. A pixel in the internal region of the heart-like image in the frame node can be identified as a feature pixel to reflect the motion of the heart-like image.
[0103] In one embodiment of this application, preferably, at least two feature pixels are located in different quadrants defined by the heart boundary of the heart-like image. The purpose is to select relatively distant feature pixels for comparison, thereby improving contrast.
[0104] In this embodiment of the application, the heart-like structure is divided into four quadrants with the centroid of the heart-like structure as the origin, and each feature pixel is located in a different quadrant.
[0105] In one embodiment of this application, the frequency features include: different frequency value types;
[0106] The step of determining the target feature pixel among the at least two feature pixels based on the frequency feature recognition results of at least two feature pixels specifically includes:
[0107] When the validity of the peak frequency values corresponding to at least two of the feature pixels is verified, the different frequency value types contained in the peak detection results of each of the at least two feature pixels are identified.
[0108] Among at least two feature pixels, the feature pixel with the fewest different frequency value types of the peak detection result is selected as the target feature pixel.
[0109] This embodiment proposes that the frequency characteristics include different frequency value types. That is, when the validity of the peak frequency values corresponding to at least two feature pixels is verified, the feature pixel with the fewest types of peak frequency values corresponding to at least two feature pixels is selected as the target pixel. The different frequency values are different frequency value types. That is, the peak detection result of feature pixel A represents frequency values of 1, 2, and 3, while the peak detection result of feature pixel B represents frequency values of 4 and 5. Feature pixel B has fewer frequency value types. Therefore, feature pixel B is selected as the target pixel. This embodiment can make the frequencies of the target feature pixels that ultimately participate in the heart-like calculation more concentrated, and can make the final generated heart rate values more concentrated.
[0110] In one embodiment of this application, the frequency feature further includes: the cumulative number of co-frequency values;
[0111] Based on the results of frequency feature recognition of at least two feature pixels, determining the target feature pixel among at least two feature pixels further includes:
[0112] If the number of different frequency values in the peak detection results of at least two feature pixels is the same, the feature pixel with the largest cumulative number of the same frequency values in the peak detection results is determined as the target feature pixel.
[0113] In this embodiment, when it is confirmed that the number of different frequency value types is the same, the target feature pixel is selected based on the cumulative number of the same frequency values contained in the peak detection results. For example, if the peak detection results of feature pixel A indicate that there are 2 frequency values of 1, 3 frequency values of 2, and 9 frequency values of 3, and the peak detection results of feature pixel B indicate that there are 2 frequency values of 4, 4 frequency values of 5, and 12 frequency values of 6, with a cumulative number of at most 12, then B is selected as the target feature pixel. This embodiment prioritizes making the target feature pixels participating in the final heart-like calculation more concentrated, resulting in a more concentrated final heart rate value.
[0114] In one embodiment of this application, if the validity of the first peak detection results of all feature pixels fails to pass the verification, a second peak detection is performed on the time domain signals of at least two feature pixels and the second peak detection result is obtained; wherein, the first peak frequency detection and the second peak detection are one of forward peak detection and the other of reverse peak detection.
[0115] The validity of the second peak detection results for at least two feature pixels is verified separately.
[0116] Frequency feature identification is performed on the second peak detection results corresponding to at least two feature pixels;
[0117] Based on the frequency feature recognition results of at least two feature pixels, the target feature pixel is determined from the at least two feature pixels.
[0118] The heart rate of the heart-like structure is determined based on the second peak detection result of the target feature pixels.
[0119] If the validity verification of the first peak detection results for all feature pixels fails, a second peak detection is performed on the time-domain signals of at least two feature pixels, and the second peak detection results are obtained. The first peak frequency detection and the second peak detection are one type of forward peak detection and another type of reverse peak detection. Forward peak detection and reverse peak detection are processes that treat the peaks and troughs of the same time-domain signal as peaks for peak verification, respectively. Here, we will not further explain how forward peak detection and reverse peak detection specifically define the peaks and troughs of the time-domain signal. Frequency feature identification is performed on the second peak detection results, and the target feature pixel is confirmed based on the identification results to confirm the heart-like heart rate.
[0120] This application embodiment addresses a situation where, when the first peak detection results all fail verification, the time-domain signals of all feature pixels are judged as invalid waves. In this case, a reverse wave test is performed on the time-domain signals to reversely determine whether the frequency values corresponding to the feature pixels are valid. Figure 4 , 5 As shown, Figure 4 This diagram illustrates the result of forward peak detection of the time-domain signal of a feature pixel being found to be invalid. Figure 5 This diagram illustrates the result of reversing the inverse peak of the time-domain signal of a feature pixel to obtain the effective wave, as shown below. Figure 6 , 7 This is a schematic diagram showing the results of forward and reverse peak detection for another feature pixel.
[0121] In one embodiment of this application, if the validity of the second peak detection results for all feature pixels fails verification, a cardiac-like abnormality is determined. In practical applications, a cardiac-like abnormality alert message can be displayed to remind experimental personnel or staff.
[0122] In one embodiment, if the validity of the first peak detection results for all feature pixels fails to pass verification, and the validity of the second peak detection results also fails to pass verification, then a cardiac-like abnormality is determined.
[0123] In one embodiment of this application, the feature pixels are determined using the following steps:
[0124] The first step is to convert the time-domain signal of all pixels at the heart boundary in a series of consecutive heart-like images into a frequency-domain signal. Specifically, for a specific pixel location in a series of consecutive heart-like images, pixel values are taken according to the video frame direction. The pixel values at that location in all frames can form a time-domain signal (or pixel sequence). The changes in the pixel sequence of the heart-like pixels contain information about the frequency of the heartbeat. However, it is difficult to observe this information from the changes in pixel values alone. Therefore, the pixel sequence of the heart-like pixels is subjected to a Fast Fourier Transform (FFT) to convert the time-domain signal into a frequency-domain signal, resulting in the sum of countless sine and cosine sequences.
[0125] The second step involves determining, based on the amplitude values of the frequency domain signals corresponding to each pixel, at least two frequency domain signals with the largest amplitude values within the normal heart rate range are selected as feature pixels. Specifically, the normal heart rate range for the heart-like sensor is determined; experimental data shows this range is between 6 and 130. First, the frequency spectrum of the pixel sequence for each heart-like sensor is filtered for frequencies between 6 and 130, with other frequencies deleted (frequency coefficients outside this range are set to 0). For each heart-like sensor pixel sequence within the 6-130 frequency range, the maximum amplitude of each pixel is determined. Finally, the maximum amplitudes of all heart-like sensors are compared, and the pixel corresponding to the maximum amplitude is selected as the first feature pixel. The method for selecting other feature pixels is similar, but in descending order of amplitude. In addition, as mentioned above, preferably, the two feature pixels are located in two quadrants of the heart-like image. Therefore, when determining other feature pixels, it is necessary not only to follow the order of amplitude from largest to smallest, but also to consider the distance between the two feature pixels.
[0126] Therefore, it can be understood that the feature pixels are the pixels in the heart-like images of multiple consecutive frames that have the largest or relatively large amplitude value in the frequency domain signal within the correct heart rate range. This method can ensure that the frequency of the feature pixels is within the correct heart rate range of the heart-like image, and can also ensure that the feature pixels can reflect a large heart rate beat, thus helping to determine the accuracy of the heart rate value.
[0127] In one embodiment of this application, determining that at least two frequency domain signals within the normal heart rate range and ordered from largest to smallest amplitude values correspond to the feature pixels includes:
[0128] Based on the amplitude values corresponding to the frequency domain signals of all pixels, at least two pixels corresponding to the frequency domain signals within the normal heart rate range and in descending order of the amplitude values are used as preliminary feature pixels.
[0129] For each preliminary feature pixel, determine the amplitude value of the frequency domain signal of a predetermined number of pixels within a predetermined distance adjacent to that preliminary feature pixel;
[0130] Compare the difference between the amplitude values of a preset number of pixels and the amplitude value of the initial feature pixel to see if it is within a preset difference range;
[0131] If so, determine the preliminary feature pixel as the feature pixel.
[0132] This application discloses a verification method for each feature pixel. The method compares the initial feature pixel with other pixels within a preset distance, calculates the difference between the amplitude values of the other pixels and the amplitude value of the initial feature pixel, and determines whether the difference is within a preset range. Even if the initial feature pixel corresponds to the maximum amplitude value, the amplitude values of its adjacent pixels should not differ significantly from this maximum amplitude value for the initial feature pixel to be considered a feature pixel.
[0133] Therefore, it can be understood that the above steps essentially add a noise vibration check when determining each feature pixel, avoiding the selection of an incorrect pixel. More specifically, to avoid finding an incorrect initial pixel as the point of maximum amplitude, the amplitude of the pixels surrounding the initial feature pixel is also calculated. If the vibration amplitude of the surrounding points is also relatively large, then the initial feature pixel is determined to be the pixel with the maximum amplitude and can be used as a feature pixel.
[0134] In one embodiment of this application, the following peak detection steps are used in the first peak detection or the second peak detection:
[0135] Determine whether the pixel value of the time domain signal of the feature pixel at the current time point is greater than the values at the previous time point and the next time point;
[0136] If so, the pixel value at the current time point will be used as the peak value.
[0137] During peak detection, the peak is identified by dividing the time frame into segments, including the current time point, the previous time point, and the next time point. This embodiment determines whether the peak time point has the largest value; if so, the current time point is considered the peak.
[0138] In one embodiment of this application, both the first peak detection result and the second peak detection result are referred to as peak detection results;
[0139] The following validity verification steps were used to evaluate the peak detection results:
[0140] Based on the peak detection results, a set of frequency values including multiple frequency values is determined;
[0141] Obtain the first number of frequency values within the normal heart rate range and the percentage of the total number of frequency values in a set of frequency values;
[0142] Determine if the percentage is greater than the preset percentage. If so, the peak detection result corresponding to this set of frequency values is considered valid.
[0143] This embodiment discloses a step for validating the results of a first peak detection or a second peak detection. Specifically, the calculation process involves determining whether each frequency range falls within the normal heart rate range and counting the number of frequencies within this range. The percentage of this number within the set of frequencies is considered greater than a threshold. If it is, then the majority of the frequencies in the set are considered to be within the normal range, and therefore the result is valid. Regarding the acquisition of frequency values, such as... Figure 8 The two tables summarizing the peak detection results are as follows: Total1 shows the frequency of the peak detection results for one of the feature pixels. There are 8 peaks with a frequency of 48, 3 peaks with a frequency of 47, 3 peaks with a frequency of 49, and 1 peak with a frequency of 50. Similarly, Total2 shows the frequency of the peak detection results for the other feature pixel. There are 9 peaks with a frequency of 48, 2 peaks with a frequency of 47, and 2 peaks with a frequency of 49.
[0144] In one embodiment of this application, both the first peak detection result and the second peak detection result are referred to as peak detection results; determining the heart rate of the cardiac-like organ based on the peak detection results includes:
[0145] The peak detection results are filtered;
[0146] The heart rate of the heart-like organ is determined based on the filtered peak detection results.
[0147] Specifically, filtering the peak detection results includes:
[0148] Based on the peak detection results, a peak filtering threshold is determined. The peak filtering threshold is the maximum value when the number of peaks within a preset peak range is less than a preset threshold number.
[0149] The peak detection results are filtered according to the peak filtering threshold to filter out peaks with peak values smaller than the peak filtering threshold.
[0150] In practical applications, the number of preset thresholds is usually set to a small value, preferably 1. The purpose is that when the number of peaks within the preset peak range is less than the number of preset thresholds (i.e., preferably 0), it indicates that the number of peaks within the preset peak range is very small. In this case, the maximum value is determined within the preset peak range, and peaks smaller than the maximum value are filtered out. This means that some interference signals can be filtered out, which is beneficial to improving the accuracy of determining the heart rate based on the peak detection results.
[0151] In one embodiment of this application, determining the peak filtering threshold based on the peak detection result specifically includes: dividing the total range of values of the temporal signal of the feature pixel into a preset first number of value ranges; counting the total number of peaks in a consecutive preset second number of value ranges based on the peak detection result; determining whether the total number of peaks is less than a preset threshold number; if so, determining the largest value in the consecutive preset second number of value ranges as the peak filtering threshold.
[0152] To achieve the above-mentioned determination of the peak filtering threshold based on the peak detection results, more specifically, in one embodiment of this application, the determination of the peak filtering threshold based on the peak detection results further includes: setting a class level for each of the preset first number of value ranges, wherein the larger the value in the value range, the higher the class level; counting the total number of peaks within a consecutive preset second number of class levels based on the peak detection results; when the total number of peaks is less than the preset threshold number, determining the highest class level among the consecutive preset second number of class levels; and using the highest class level as the peak filtering threshold.
[0153] In this case, based on the peak filtering threshold, peaks that are less than the peak filtering threshold in the peak detection result are filtered out, specifically including: filtering out peaks in the peak detection result that are located in the class level less than or equal to the highest class level.
[0154] For example, in one embodiment of this application, the entire value range of the feature pixel is divided into 1 to 20 levels (i.e., a preset first number) according to size. Each level has a certain value range, and the larger the level, the larger the value range. In each level, there may be a certain number of peaks or no peaks. Specifically, based on the total number of peaks in a preset consecutive 10 levels (i.e., a preset second number), it is determined whether it is less than a preset threshold number. When the consecutive 10 levels are 2 to 11, the number of peaks contained is 0, which is less than the preset threshold number of 1. Therefore, the maximum value in the value range of level 12 is used as the peak filtering threshold, or level 12 is used as the peak filtering threshold.
[0155] It should be noted that the peak detection mentioned above can be either normal peak detection or enhanced peak detection, such as... Figure 9 (a)~ Figure 9 As shown in (c); enhanced peak detection includes positive enhanced peak detection and reverse enhanced peak detection. Positive normal peak detection refers to detection using the peak position of a positive normal wave, such as... Figure 9 As shown in (a). Reverse normal peak detection refers to detecting the peak position of a reverse normal wave, such as... Figure 9 As shown in (b). Forward enhancement peak detection refers to amplifying the detected peak positions within the forward detection peaks based on their numerical values. That is, a magnification factor is applied to each peak location; the higher the initial peak value, the larger the multiplication factor. For example... Figure 9 As shown in (c). Reverse reinforcement wave peak detection refers to amplifying the detected peak positions within the reverse-detection wave peaks based on their numerical values. Specifically, a magnification factor is applied to each peak position; the higher the initial peak, the larger the factor. Reverse reinforcement waves are similar to forward reinforcement waves.
[0156] This application also provides a heart rate determination device for a type of heart, the device specifically comprising:
[0157] The time-domain signal generation module 1001 is used to extract time-domain signals corresponding to at least two feature pixels from multiple consecutive frames of the heart-like image;
[0158] The first peak frequency value acquisition module 1002 is used to perform first peak detection on the time domain signal of each feature pixel and acquire the corresponding first peak detection result.
[0159] The verification module 1003 is used to verify the validity of the first peak detection results corresponding to at least two of the feature pixels respectively;
[0160] The frequency feature recognition module 1004 is used to perform frequency feature recognition on the first peak detection results corresponding to at least two feature pixels that have passed the validity verification.
[0161] The target feature pixel determination module 1005 is used to determine a target feature pixel among at least two feature pixels based on the result of frequency feature recognition of at least two feature pixels.
[0162] The heart rate determination module 1006 is used to determine the heart rate of the heart-like structure based on the first peak detection result of the target feature pixels.
[0163] Optionally, each of the feature pixels is located on the heart-like boundary line of the heart-like image.
[0164] Optionally, at least two of the feature pixels are located on the heart-like boundary line within different quadrants divided by the heart boundary of the heart-like image.
[0165] Optional frequency characteristics include: different types of frequency values;
[0166] The device for determining a target feature pixel among at least two feature pixels based on the result of frequency feature recognition of at least two feature pixels includes:
[0167] The frequency value type identification module is used to identify different frequency value types contained in the peak detection results of the at least two feature pixels when the validity of the peak frequency values corresponding to the at least two feature pixels is verified.
[0168] Among at least two feature pixels, the feature pixel with the fewest different frequency value types of the peak detection result is selected as the target feature pixel.
[0169] Optionally, the frequency characteristics may also include: the cumulative number of co-frequency values;
[0170] The device for determining a target feature pixel among at least two feature pixels based on the result of frequency feature recognition of at least two feature pixels further includes:
[0171] The frequency value accumulation quantity identification module is used to determine the feature pixel with the largest accumulation quantity of the same frequency value among the at least two feature pixels as the target feature pixel when the number of different frequency value types in the peak detection results of at least two feature pixels is the same.
[0172] Optionally, the device further includes:
[0173] The second peak frequency value acquisition module is used to perform second peak detection on the time domain signals of at least two of the feature pixels and acquire the second peak detection result if the validity of the first peak detection result of all the feature pixels fails to pass the verification; wherein, the first peak frequency detection and the second peak detection are one and the other of forward peak detection and reverse peak detection.
[0174] The verification module 1003 is also used to verify the validity of the second peak detection results of at least two of the feature pixels respectively;
[0175] The frequency feature recognition module 1004 is also used to perform frequency feature recognition on the second peak detection results corresponding to at least two of the feature pixels.
[0176] The target feature pixel determination module 1005 is further configured to determine a target feature pixel among at least two feature pixels based on the result of frequency feature recognition of at least two feature pixels.
[0177] The heart rate determination module 1006 is also used to determine the heart rate of the heart-like structure based on the second peak detection result of the target feature pixel.
[0178] Optionally, the device further includes an anomaly alert module, used to determine the cardiac-like abnormality if the validity of the second peak detection results of all the feature pixels fails to pass verification.
[0179] Optionally, the device further includes:
[0180] The feature pixel identification module is used to convert the time-domain signals of all pixels of the heart boundary in multiple consecutive frames of the heart-like image into frequency-domain signals; based on the amplitude values corresponding to the frequency-domain signals of all pixels, it determines that at least two pixels corresponding to the frequency-domain signals within the normal heart rate range and in descending order of the amplitude values are the feature pixels.
[0181] Optionally, the feature pixel identification module is further configured to, based on the amplitude values corresponding to the frequency domain signals of all pixels, identify at least two pixels corresponding to frequency domain signals within the normal heart rate range and in descending order of amplitude values as preliminary feature pixels; for each preliminary feature pixel, determine the amplitude values corresponding to the frequency domain signals of a predetermined number of pixels within a predetermined distance adjacent to the preliminary feature pixel; compare the difference between the amplitude values of the predetermined number of pixels and the amplitude value of the preliminary feature pixel to see if it is within a predetermined difference range; if so, determine the preliminary feature pixel as a feature pixel.
[0182] Optionally, the device also includes: a peak value verification module, used for:
[0183] Determine whether the pixel value of the temporal signal of the feature pixel at the current time point is greater than the values at the previous time point and the next time point;
[0184] If so, the pixel value at the current time point is taken as the peak value.
[0185] Optionally, the first peak detection result and the second peak detection result include: a set of frequency values of multiple frequency values;
[0186] Both the first peak detection result and the second peak detection result are referred to as peak detection results. The device includes a peak detection result verification module, used for:
[0187] Based on the peak detection results, a set of frequency values including multiple frequency values is determined;
[0188] Obtain the percentage of the first number of frequency values within the normal heart rate range to the total number of frequency values in the set of frequency values;
[0189] Determine whether the percentage is greater than a preset percentage. If so, determine that the peak detection result corresponding to the set of frequency values is valid.
[0190] Optionally, both the first peak detection result and the second peak detection result are referred to as peak detection results; the device further includes a filtering module, used for:
[0191] The peak detection results are filtered;
[0192] The heart rate of the heart-like organ is determined based on the filtered peak detection results.
[0193] Optional, filtering module, specifically used for:
[0194] Based on the peak detection results, a peak filtering threshold is determined. The peak filtering threshold is the maximum value when the number of peaks within a preset peak range is less than a preset threshold number.
[0195] The peak detection results are filtered according to the peak filtering threshold to filter out peaks with peak values smaller than the peak filtering threshold.
[0196] This application also provides an electronic device, including:
[0197] Memory, used to store computer programs;
[0198] A processor for implementing a heart-like heart rate determination method when executing the computer program.
[0199] This application also provides a readable storage medium storing a computer program, which, when executed by a processor, implements the steps of a heart rate determination method similar to that of a heart.
[0200] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0201] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0202] The foregoing has provided a detailed description of a heart rate determination method, apparatus, device, and readable storage medium for a heart-like structure provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method for determining heart rate in a heart-like manner, characterized in that, The method includes: Extract time-domain signals corresponding to at least two feature pixels from consecutive multi-frame heart-like images. The feature pixels are fixed points on the heart-like image. The time-domain signals represent the position changes of the feature pixels in the image as the heart-like image moves. For each of the feature pixels, the time-domain signal is subjected to first peak detection and the corresponding first peak detection result is obtained; The validity of the first peak detection results corresponding to at least two of the feature pixels is verified respectively; Frequency feature identification is performed on the first peak detection results corresponding to at least two of the feature pixels that have passed the validity verification. Based on the results of frequency feature recognition of at least two of the feature pixels, a target feature pixel is determined among the at least two feature pixels; The heart rate of the heart-like structure is determined based on the first peak detection result of the target feature pixels.
2. The method according to claim 1, characterized in that, Each of the feature pixels is located on the heart-like boundary line of the heart-like image.
3. The method according to claim 2, characterized in that, At least two of the feature pixels are located on the boundary lines of the heart-like image within different quadrants.
4. The method according to claim 3, characterized in that, The frequency characteristics include: different types of frequency values; The step of determining the target feature pixel among the at least two feature pixels based on the frequency feature recognition results of at least two feature pixels specifically includes: When the validity of the peak frequency values corresponding to at least two of the feature pixels is verified, the different frequency value types contained in the peak detection results of each of the at least two feature pixels are identified. Among at least two feature pixels, the feature pixel with the fewest different frequency value types of the peak detection result is selected as the target feature pixel.
5. The method according to claim 4, characterized in that, The frequency feature also includes: the cumulative number of same-frequency values; The step of determining the target feature pixel among the at least two feature pixels based on the result of frequency feature recognition of at least two feature pixels further includes: If the number of different frequency value types in the peak detection results of at least two feature pixels is the same, the feature pixel with the largest cumulative number of same frequency values in the peak detection results is determined as the target feature pixel based on the cumulative number of same frequency values contained in the peak detection results.
6. The method according to claim 1, characterized in that, Also includes: If the validity of the first peak detection results of all the feature pixels fails to pass the verification, a second peak detection is performed on the time domain signals of at least two of the feature pixels and the second peak detection results are obtained; wherein, the first peak detection and the second peak detection are one type of forward peak detection and the other type of reverse peak detection; The validity of the second peak detection results for at least two of the feature pixels is verified respectively; Frequency feature identification is performed on the second peak detection results corresponding to at least two of the feature pixels; Based on the results of frequency feature recognition of at least two of the said feature pixels, a target feature pixel is determined from the at least two said feature pixels. The heart rate of the heart-like structure is determined based on the second peak detection result of the target feature pixels.
7. The method according to claim 6, characterized in that, Also includes: If the validity of the second peak detection results for all the aforementioned feature pixels fails verification, then the cardiac-like abnormality is determined.
8. The method according to claim 2, characterized in that, The method further includes: The time-domain signals of all pixels on the heart boundary of multiple consecutive frames of the heart-like images are converted into frequency-domain signals. Based on the amplitude values corresponding to the frequency domain signals of all pixels, at least two pixels corresponding to frequency domain signals within the normal heart rate range and in descending order of amplitude values are identified as the feature pixels.
9. The method according to claim 8, characterized in that, The determination that at least two frequency domain signals within the normal heart rate range and ordered from largest to smallest amplitude values correspond to the feature pixels includes: Based on the amplitude values corresponding to the frequency domain signals of all pixels, at least two pixels corresponding to the frequency domain signals within the normal heart rate range and in descending order of the amplitude values are used as preliminary feature pixels. For each of the preliminary feature pixels, determine the amplitude value of the frequency domain signal of a predetermined number of pixels within a predetermined distance adjacent to the preliminary feature pixel; Compare the difference between the amplitude values of the preset number of pixels and the amplitude value of the preliminary feature pixel to see if it is within a preset difference range; If so, determine the preliminary feature pixel as the feature pixel.
10. The method according to claim 6, characterized in that, The following peak detection steps are used in the first peak detection or the second peak detection: Determine whether the pixel value of the temporal signal of the feature pixel at the current time point is greater than the values at the previous time point and the next time point; If so, the pixel value at the current time point is taken as the peak value.
11. The method according to claim 6, characterized in that, Both the first peak detection result and the second peak detection result are referred to as peak detection results; The following validity verification steps are used to verify the peak detection results: Based on the peak detection results, a set of frequency values including multiple frequency values is determined; Obtain the percentage of the first number of frequency values within the normal heart rate range to the total number of frequency values in the set of frequency values; Determine whether the percentage is greater than a preset percentage. If so, determine that the peak detection result corresponding to the set of frequency values is valid.
12. The method according to claim 6, characterized in that, Both the first peak detection result and the second peak detection result are referred to as peak detection results; Determining the heart rate of the heart-like organ based on the peak detection results includes: The peak detection results are filtered; The heart rate of the heart-like organ is determined based on the filtered peak detection results.
13. The method according to claim 12, characterized in that, Filtering the peak detection results includes: Based on the peak detection results, a peak filtering threshold is determined. The peak filtering threshold is the maximum value when the number of peaks within a preset peak range is less than a preset threshold number. The peak detection results are filtered according to the peak filtering threshold to filter out peaks with peak values smaller than the peak filtering threshold.
14. A heart-like heart rate determination device, characterized in that, The device includes: The temporal signal generation module is used to extract temporal signals corresponding to at least two feature pixels in multiple consecutive frames of the heart-like image. The feature pixels are fixed points on the heart-like image, and the temporal signal represents the positional change of the feature pixels in the image as the heart-like image moves. The first peak frequency value acquisition module is used to perform first peak detection on the time domain signal of each feature pixel and obtain the corresponding first peak detection result. The verification module is used to verify the validity of the first peak detection results corresponding to at least two of the feature pixels. The frequency feature recognition module is used to perform frequency feature recognition on the first peak detection results corresponding to at least two feature pixels that have passed the validity verification. The target feature pixel determination module is used to determine a target feature pixel among at least two feature pixels based on the result of frequency feature recognition of at least two feature pixels. A heart rate determination module is used to determine the heart rate of the heart-like structure based on the first peak detection result of the target feature pixels.
15. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the heart rate determination method for a heart-like structure as described in any one of claims 1 to 13 when executing the computer program.
16. A readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the steps of the heart rate determination method for a heart-like structure as described in any one of claims 1 to 13.