A method, device and equipment for generating a heart rate curve of a heart-like object and a storage medium
By identifying and processing feature pixels and boundary lines in heart-like images, a distance difference sequence is generated, solving the problem of measuring heart rate curves in heart-like images and enabling rapid and accurate observation of heart rate in heart-like images.
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
Current technology cannot effectively measure the heart rate curve of a heart-like organ, nor can it obtain the heart rate of a heart-like organ through the methods used to measure the heart rate of a normal heart.
By identifying feature pixels in multiple consecutive frames of heart-like images, feature image regions are determined, distance difference sequences are generated, and heart rate curves of heart-like images are generated based on the distance difference sequences. Watershed algorithms and segmentation models are used to determine the boundary lines of heart-like images. The time domain signal is converted into a frequency domain signal, and the frequency domain signal with the largest amplitude value is selected as the feature pixel to generate a fan-shaped feature image region.
It enables rapid and effective observation of the heart rate curve of the heart-like organ, accurately reflecting the beating status of the heart-like organ and improving measurement efficiency and accuracy.
Smart Images

Figure CN116188382B_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 generating a heart-like heart rate curve. 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] However, in the application of heart-like devices, it is necessary to measure the heart rate of the heart-like device to understand its working status by obtaining its heart rate curve. However, the heart rate of a heart-like device differs from that of a normal human heart, and its heart rate cannot be measured entirely in the same way as a normal heart.
[0004] Therefore, how to obtain the heart rate curve of a heart-like organ 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 generating a heart-like heart rate curve.
[0006] This application provides a method for determining the heart rate of a heart-like organ, including:
[0007] Identify fan-shaped feature image regions containing feature pixels in multiple consecutive frames of the heart-like images;
[0008] Based on the fan-shaped feature image regions in multiple consecutive frames, the distance difference between the heart-shaped boundary lines of each two adjacent feature image regions is determined, and a distance difference sequence is generated.
[0009] A heart-like heart rate curve is generated based on the distance difference sequence.
[0010] Optionally, identifying feature image regions in consecutive multi-frame cardiac-like images specifically includes:
[0011] The time-domain signals of all pixels on the heart-like boundary line of multiple consecutive frames of the heart-like images are converted into frequency-domain signals.
[0012] Based on the amplitude values corresponding to the frequency domain signals of all the pixels, the pixel corresponding to the frequency domain signal with the largest amplitude value within the normal heart rate range is determined as the feature pixel.
[0013] The feature image region is determined based on the identified feature pixels.
[0014] Optionally, the shape of the feature image region is fan-shaped, the center of the fan-shaped region is the center pixel of the heart-shaped image, and the arc-shaped region is the boundary line of the heart-shaped image.
[0015] Optionally, the feature pixel is located near the center point of the arc.
[0016] Optionally, the value of the central angle of the fan-shaped shape is in the range of 30° to 45°.
[0017] Optionally, the center pixel of the heart-like image is the centroid of the heart-like image or the center of its smallest bounding rectangle.
[0018] Optionally, determining the pixel corresponding to the frequency domain signal with the largest amplitude value within the normal heart rate range as the feature pixel based on the amplitude values corresponding to the frequency domain signals of all pixels specifically includes:
[0019] Based on the amplitude values corresponding to the frequency domain signals of all pixels, the pixels corresponding to two frequency domain signals within the normal heart rate range and in descending order of amplitude values are identified as the feature pixels, wherein the distance between the two feature pixels is greater than a preset distance.
[0020] Based on the two feature pixels, two feature image regions corresponding to each other are determined;
[0021] The generation of a heart-like heart rate curve based on the distance sequence specifically includes:
[0022] The heart rate curve of the heart-like structure is generated based on the distance sequence generated from each of the two feature image regions.
[0023] Optionally, determining the pixel corresponding to the frequency domain signal as the feature pixel specifically includes:
[0024] Determine the amplitude value of the frequency domain signal corresponding to a preset number of pixels within a preset distance of the preliminary feature image points;
[0025] Compare whether the difference between the amplitude values of the preset number of pixels and the maximum amplitude value of the preliminary feature pixels is within a preset difference range;
[0026] If so, the preliminary feature pixel is determined as the feature pixel.
[0027] Optionally, the method further includes:
[0028] Obtain the video of the heart-like structure;
[0029] Based on the video, a series of consecutive original heart-like images are determined, and the original heart-like images are cropped to obtain the heart-like image.
[0030] Optionally, the identification of feature image regions including feature pixels in consecutive multi-frame cardiac images specifically includes:
[0031] The feature pixels are determined in the heart-like image;
[0032] Based on the feature pixels identified in the heart-like image, the corresponding feature pixels are determined in the original heart-like image;
[0033] The feature image region is determined in the original heart-like image based on the feature pixels.
[0034] Optionally, the identification of feature image regions in consecutive multi-frame cardiac-like images further includes:
[0035] The heart-like boundary line of the heart-like image is determined by using the watershed algorithm and / or segmentation model.
[0036] This application also provides a heart rate curve generation device for a heart-like organ, the device comprising:
[0037] The recognition module is used to identify feature image regions containing feature pixels in multiple consecutive frames of cardiac-like images;
[0038] The sequence generation module is used to determine the distance between the heart-like boundary lines of each two adjacent feature image regions based on the feature image regions in multiple consecutive frames, and generate a distance sequence.
[0039] A curve generation module is used to generate a heart-like heart rate curve based on the distance sequence.
[0040] This application also provides an electronic device for generating a heart rate curve similar to that of a heart, comprising:
[0041] Memory, used to store computer programs;
[0042] A processor, used to implement the steps of a method for generating a heart rate curve similar to a heart when executing the computer program.
[0043] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of a method for generating a heart rate curve resembling a heart.
[0044] Compared with existing technologies, this application is applied to generating heart rate curves for heart-like images. By identifying feature image regions including characteristic pixels in consecutive frames of heart-like images, the distance between the boundary lines of each adjacent two frames of feature image regions is determined based on these regions, generating a distance sequence. The heart rate curve for the heart-like image is then generated based on this distance sequence. In this application, the heart-like image is divided into feature image regions, and the characteristic pixels are those that reflect the heartbeat. Therefore, these feature image regions represent the beating areas of the heart-like image. As the heart-like image beats, the position of the boundary lines on different frames of the heart-like image changes. Therefore, by determining the distance sequence of the boundary lines within each adjacent two frames of the feature image regions of consecutive frames of the heart-like image, the different changes in the degree of contraction and relaxation of the heart-like image are simulated, and a heart rate curve for the heart-like image is generated. This achieves effective observation of the heart rate of the heart-like image and allows for rapid generation of the heart rate curve.
[0045] This application also provides a heart rate curve generation device, apparatus, and readable storage medium for a heart-like structure, which has the above-mentioned beneficial effects, and will not be elaborated here. Attached Figure Description
[0046] 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.
[0047] Figure 1 A flowchart of a method for generating a heart-like heart rate curve provided in this application;
[0048] Figure 2a Example of the first frame of video provided for this application;
[0049] Figure 2b This application provides an example of a frame image background cropping process;
[0050] Figure 2c An example of sequential arrangement of heart-like images provided in this application;
[0051] Figure 2d A schematic diagram of multiple consecutive frames of heart-like images with feature pixels on the heart-like boundary line provided in the embodiments of this application;
[0052] Figure 3a This is a schematic diagram of the second-generation heart-like organ in an embodiment of this application;
[0053] Figure 3bThis is a schematic diagram of the third-generation heart-like organ in an embodiment of this application;
[0054] Figure 3c This is a schematic diagram of a fan-shaped feature image region provided in an embodiment of this application;
[0055] Figure 4 A schematic diagram of the frequency domain signal of a feature pixel provided in an embodiment of this application;
[0056] Figure 5a A schematic diagram of consecutive multi-frame heart-like images provided in an embodiment of this application;
[0057] Figure 5b A schematic diagram illustrating the extraction of the heart-like boundary provided in an embodiment of this application;
[0058] Figure 5c A schematic diagram of another fan-shaped feature image region provided in the embodiments of this application;
[0059] Figure 6 A schematic diagram of a heart-like heart rate curve generation device provided in this application. Detailed Implementation
[0060] The core of this application is to provide a method for generating a heart rate curve for a heart-like organ, which can quickly identify the specific heart rate of the heart-like organ under heart-like organ imaging. Another core aspect of this application is a heart rate curve generation device, apparatus, and readable storage medium for a heart-like organ.
[0061] 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.
[0062] See Figure 1 , Figure 1 This application provides a flowchart of a method for generating a heart-like heart rate curve, combined with... Figure 1 As shown, the method for generating a heart-like heart rate curve provided in this application embodiment may include:
[0063] S101, identify feature image regions including feature pixels in multiple consecutive frames of the heart-like images.
[0064] In the above embodiments, multiple consecutive frames of heart-like images can be acquired for the heart-like video. A heart-like video can include multiple frames of heart-like images. Therefore, the heart-like images have a sequential arrangement relationship over time.
[0065] This application identifies a feature image region in each frame of a heart-like image, wherein the feature image region includes feature pixels. Specifically, the feature image region is generated in the same way for multiple consecutive frames of heart-like images, that is, the rules for generating the feature image region are consistent, and a unified comparison standard is established for multiple frames of heart-like images. However, the gray value at the feature pixel changes with the movement of the heart-like image, which causes the boundary line of the heart-like image to change. Therefore, it can be understood that the boundary of the feature image region changes with the beating of the heart-like image, where the movement of the heart-like image includes contraction, expansion, etc.
[0066] Feature pixels can be determined based on any frame of a heart-like image. All frames of heart-like images are based on the same feature pixels, that is, pixels at the same position in the coordinate system of the heart-like image.
[0067] S102, determine the distance between the heart-like boundary lines of each two adjacent feature image regions based on the feature image regions of consecutive multiple frames, and generate a distance sequence.
[0068] In this embodiment, since multiple consecutive heart-like images are generated by cropping the heart-like video, these images are adjacent to each other. Furthermore, each heart-like image represents the motion of the heart-like entity at different time frames. Therefore, there will be differences in the state of the heart-like entity in two adjacent images, and the feature image regions will also differ accordingly with the heart-like entity's motion. Therefore, this embodiment observes the changes in the feature image regions between adjacent frames. Specifically, as the heart-like entity contracts and expands, the boundary lines of the heart-like entity in the heart-like image are also displayed in the image. Specifically, during the expansion of the heart-like entity, the boundary lines at the next moment are greater than those at the previous moment, and there is a boundary distance between them. This embodiment understands the heart-like entity by obtaining the distance between the boundary lines of the feature image regions of each two adjacent frames. The observed portion of the heart-like entity boundary lines belongs to the feature image regions. A distance sequence is generated based on the distance between each two frames, and the state changes of the heart-like entity are obtained based on the distance sequence.
[0069] Feature pixels should be selected that best reflect strong heartbeats (examples of how to select feature pixels will be provided below), so that the heart rate curve generated in subsequent steps can better reflect the heartbeat-like situation.
[0070] S103 generates a heart-like heart rate curve based on distance sequences.
[0071] After determining the distance sequence, a heart rate curve is generated based on the distance sequence. The distance sequence represents the movement of the heart-like boundary line corresponding to the feature image region driven by the heart-like movement. The heart rate curve of the heart-like is generated based on the movement.
[0072] In this embodiment, the distance sequence of the heart-like boundary line in the feature image region is observed to understand the changes in the boundary line driven by the heart-like heart during beating, thereby obtaining the heart rate curve of the heart-like heart. This embodiment utilizes the observation of the feature image region to reflect the changes in the heart-like image in each frame, thereby generating the heart rate curve of the heart-like heart.
[0073] Based on the method for generating a heart-like heart rate curve provided in the above embodiments, to further illustrate the process of acquiring a heart-like image, this application provides a process for acquiring a heart-like image, which may include:
[0074] Step 1: Obtain a video of the heart-shaped object.
[0075] The technical solution discussed in this application is how to generate a heart rate curve corresponding to a heart-like video of a heart-like beating. The heart-like video is a specific display of the heart-like beating situation. This application needs to generate a heart rate curve based on the heart-like beating situation. Therefore, before implementing the technical solution of this application, it is necessary to obtain a heart-like video.
[0076] Step 2: Based on the video, determine a series of consecutive original heart-like images, and crop the original heart-like images to obtain heart-like images.
[0077] In the process of generating a corresponding heart rate curve for a heart-like video, this application embodiment needs to identify the beating status of the heart-like video. Specifically, the heart-like video can be divided into a series of consecutive heart-like images arranged in an orderly manner over time. Each heart-like image represents the beating status of the heart-like at the current frame node, and there is a frame interval of a preset distance between every two frame nodes.
[0078] Meanwhile, in the process of cropping heart-like videos to generate heart-like images, the video is first converted into frame images, such as... Figure 2a As shown in the image, the organoid heart occupies only a small portion of the entire image; the rest of the background is unnecessary for our analysis. Therefore, it needs to be segmented during the generation of the heart-like image. Generating the corresponding heart rate curve on the segmented image can speed up curve generation and save computational resources.
[0079] The specific cutting process includes performing edge detection on the first frame of the video (converted to grayscale) to identify the edge region of the organoid heart, as follows: Figure 2a As shown by the black outer ring line, 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, and based on these values and a custom edge padding (currently using 20 pixels, i.e., an outward expansion of 20 pixels), the coordinates of the top left and bottom right corners are calculated, as follows. 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 is how a preprocessed image is generated.
[0080] The preprocessed image is subjected to three Gaussian downsampling operations to compress the image and speed up the calculation. Simultaneously, the g-channel of each frame is used as the analysis channel for that frame. All processed images are then used as heart-like images. (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.
[0081] It should be noted that, for Figure 2c In a heart-like image, a pixel value is taken at a certain location (as shown by the marker in the figure) according to the direction of the video frame. The pixel values at this location in all frames can form a pixel sequence (also referred to as the time-domain signal in this paper). For data such as heartbeats, which have certain changing patterns, the changes in this pixel sequence contain information about the frequency of heartbeats. However, it is difficult to observe this kind of information from the changes in pixel values alone. Therefore, for such a pixel sequence, a fast FFT Fourier transformation is performed to transform the change information of the pixel points into the frequency domain, resulting in the sum of countless sine and cosine sequences. Among this series of sine and cosines, the frequency of heart changes is one of them. Here, the marker can be a feature pixel located in the heart-like internal region of the heart-like image.
[0082] It should be noted that, see Figure 2d This figure is a schematic diagram of multiple consecutive frames of heart-like images with feature pixels on the boundary line of the heart-like structure, as provided in an embodiment of this application. Figure 2dThe multiple marker points shown can be used as feature pixels. At this time, the feature pixels are located on the heart boundary line. The pixel values of each of the multiple marker points in all frames can form a pixel sequence. For data with certain patterns of change, such as heartbeats, the change of this pixel contains information about the frequency change of heartbeats.
[0083] Based on the above, in one specific embodiment of this application, the relevant scheme for identifying feature image regions includes:
[0084] The temporal signals of all pixels on the cardiac-like boundary line of a series of consecutive cardiac-like images are converted into frequency-domain signals. As one feasible implementation, step 11 can specifically employ a watershed algorithm and / or a segmentation model to determine the cardiac-like boundary line of the cardiac-like image.
[0085] Based on the amplitude values corresponding to the frequency domain signals of all pixels, the pixel corresponding to the frequency domain signal with the largest amplitude value within the normal heart rate range is determined as the feature pixel. Specifically, the normal heart rate range of the heart-like heart rate is determined; according to experimental data, the normal heart rate range of the heart-like heart is between 6 and 130. First, for the spectrogram of the pixel sequence of each heart-like pixel, frequency filtering between 6 and 130 is performed, and other frequencies are deleted (frequency coefficients outside 6 to 130 are set to 0). For the pixel sequence of each heart-like pixel within the frequency range of 6 to 130, the maximum amplitude of each heart-like pixel is determined; finally, the maximum amplitudes of all heart-like pixels are compared, and the pixel corresponding to the maximum value among multiple maximum amplitudes is selected as the feature pixel.
[0086] The feature image region is determined based on the identified feature pixels.
[0087] This embodiment proposes to determine the feature image region by acquiring feature pixels. In the technical solution for selecting feature pixels provided in this application embodiment, the time-domain signals generated by all pixels of the heart-like boundary line are subjected to Fourier transform to realize the conversion from time-domain signals to frequency-domain signals. The amplitude values of the frequency-domain signals are compared, and the pixel corresponding to the largest amplitude value within the correct heart rate range is selected as the feature pixel. This method can ensure that the frequency of the feature pixel is within the correct heart rate range of the heart-like region, and can also ensure that the feature pixel reflects a large heart rate beat. Therefore, the generated feature image region can better reflect the heart-like beat.
[0088] The feature pixels can be located on the boundary line or within the interior region of the heart-like image. See also Figure 3a and Figure 3b , Figure 3a This is a schematic diagram of the second-generation heart-like organ in an embodiment of this application. Figure 3b This is a schematic diagram of the third-generation heart-like organ in the embodiments of this application, combined with... Figure 3a and Figure 3b Further research and analysis revealed that: the second-generation heart-like organ ( Figure 3a The heart-like structure (as shown) exhibits significant differences between its content and background, with substantial height differences between the main and secondary peaks in the pixel sequence variations. Therefore, selecting feature pixels within the heart-like structure's internal region is relatively accurate. However, the third-generation heart-like structure (… Figure 3b As shown, the internal structure of the heart-like structure is complex. Pixel values within the heart-like structure often overlap with the background, and the height differences between the main and secondary peaks of the pixel sequence are very small. Therefore, selecting feature pixels within the heart-like structure's interior is prone to error. However, considering the heart-like structure's beating pattern, the internal vibrations propagate to the heart-like structure's boundaries. Thus, finding feature pixels along the heart-like structure's boundaries is relatively more accurate than selecting them within the heart-like structure. Therefore, selecting feature pixels along the heart's boundaries is not only faster in computation than selecting them within the heart-like structure, but it is also suitable for both second-generation and third-generation heart-like structures.
[0089] In one embodiment of this application, the shape of the feature image region is fan-shaped, the center of the fan-shaped region is the center pixel of the heart-shaped image, and the arc of the fan-shaped region is the boundary line of the heart-shaped image.
[0090] Regarding the formation of feature image regions, this application discloses a method for forming feature image regions. The feature image region is shaped like a fan. In this embodiment, the center pixel of the heart-shaped image is used as the center of the fan-shaped feature image region. The arc-shaped portion of the fan-shaped region can be understood as a partial boundary line of the heart-shaped region. The length of the arc-shaped portion is generated by intercepting the center of the fan-shaped region and the central angle between the center and the central point of the fan-shaped region within the boundary line of the heart-shaped region. Specifically, the line connecting the center and the feature pixel is used as the midline, and a preset central angle is formed by expanding along both sides in the circumferential direction to intercept the arc-shaped portion of the fan-shaped region.
[0091] Among them, "fan-shaped" refers to a shape that resembles a fan; "arc-shaped" refers to the curved edge of a fan-shaped shape, which is similar to an arc, but not necessarily a smooth arc, and is the shape of the actual heart-shaped boundary line.
[0092] In one feasible implementation, the center of the fan-shaped circle is the center pixel of the heart-shaped image, and the feature pixel is located near the center point of the arc-shaped circle, such as... Figure 3c As shown, this figure is a schematic diagram of a fan-shaped feature image region provided in an embodiment of this application, combined with... Figure 3c As shown, this ensures that the generation of the feature image region is as reasonable as possible, including not only the feature pixels with larger heart-like beating characteristics, but also the surrounding pixels that are driven to beat, so that the heart rate curve can be generated more accurately in the future.
[0093] In this context, the center pixel of the heart-like image is the centroid or the center of the smallest bounding rectangle of the heart-like image. The centroid refers to the center of the heart-like mass, that is, the center of the plane corresponding to the center of the heart-like mass after conversion to a planar image. The center of the smallest bounding rectangle can be the center obtained after cropping in the first step described above.
[0094] In one preferred example, the value range of the fan-shaped central angle is 30° to 45°. Using this range of central angles makes the feature image region within a reasonable range, which not only reduces the amount of computation, but also allows it to reflect the heartbeat region well.
[0095] As one feasible implementation, the method may further include:
[0096] Determine the original heart-like image across multiple consecutive frames;
[0097] The original heart-like image is obtained by reducing its size. Specifically, as described above, the cropped original heart-like image is downsampled three times to achieve the reduction; this method can significantly improve processing efficiency.
[0098] Since the heart-like image is a scaled-down image, in order to improve the accuracy of the heart rate curve, when determining the feature image region with a fan-shaped shape, it is necessary to return to the original heart-like image to determine the fan-shaped region in order to obtain the accurate fan-shaped region.
[0099] Therefore, the aforementioned identification of feature image regions including feature pixels in consecutive multi-frame cardiac images specifically includes:
[0100] The first step is to identify the feature pixels in the heart-like image;
[0101] The second step is to determine the corresponding feature pixels in the original heart-like image based on the feature pixels identified in the heart-like image.
[0102] The third step is to determine the feature image region in the original heart-like image based on the feature pixels.
[0103] It should be noted that the specific function of the second step is not limited in this embodiment, and any method in the prior art can be used. Preferably, in this embodiment, if the feature pixel is on the boundary line of the heart-like image, the second step may include the following steps: determining the angle between the line connecting the feature pixel and the center pixel of the heart-like image and a preset baseline (horizontal or vertical line) passing through the center point of the heart-like image; since the center pixel of the original heart-like image and the heart-like image are the same as the preset baseline, the corresponding feature pixel is determined in the original heart-like image based on the angle, the preset baseline, and the center pixel. If the feature pixel is located in the internal region of the heart-like image, it is also necessary to determine the corresponding feature pixel in the original heart-like image based on the scaling relationship between the original heart-like image and the heart-like image, as well as the line connecting the feature pixel and the center pixel.
[0104] In one embodiment of this application, based on the amplitude values corresponding to the frequency domain signals of all pixels, the pixel corresponding to the frequency domain signal with the largest amplitude value within the normal heart rate range is determined as the feature pixel; specifically including:
[0105] The first step involves identifying the pixel points corresponding to two frequency domain signals within the normal heart rate range and ordered from largest to smallest amplitude values as the feature pixels. The distance between the two feature pixels is greater than a preset distance.
[0106] Understandably, the distance between two feature pixels is greater than a preset distance. This is to select two feature pixels that are not too close together. If the distance is too close, these two feature pixels might be generated by a single heartbeat. Using two feature pixels is to select those corresponding to the beatings of the left atrium and right ventricle, respectively. More specifically, to ensure the distance between the two feature pixels is greater than the preset distance, the two feature pixels are located on the boundary lines of the heart-like image within different quadrants. This processing method is highly operational and simple.
[0107] When two feature pixels are selected, determining the feature image region based on the determined feature pixels specifically includes: determining two feature image regions that correspond one-to-one with the two feature pixels.
[0108] In addition, the method of generating a heart-like heart rate curve based on a distance sequence specifically includes: generating a heart-like heart rate curve based on a distance sequence generated from two feature image regions respectively.
[0109] In this embodiment, emphasis is placed on selecting pixels corresponding to two maximum amplitude values, with these two pixels located within different quadrants defined by the boundary line of the heart-like image. The quadrant division uses a coordinate system with the center of a circle as the origin. Positioning the two pixels within different quadrants ensures that each feature pixel represents the left and right ventricles of the heart-like image. After determining the feature pixels, the corresponding feature image regions are further determined. Heart rate curves for the heart-like image are then generated based on the distance sequence between the two feature image regions. The purpose of this embodiment is to address the possibility of heart rate curves for both left and right ventricles in the heart-like image. By using two feature image regions to detect the motion of the left and right ventricles separately and obtaining their respective heart rate curves, the accuracy, reliability, and reasonableness of the results are ensured.
[0110] In one embodiment of this application, the determination of the pixel point corresponding to the frequency domain signal as the feature pixel point specifically includes:
[0111] The pixel corresponding to the frequency domain signal is determined as the preliminary feature pixel;
[0112] Determine the amplitude value of the frequency domain signal corresponding to a preset number of pixels within a preset distance of the initial pixel;
[0113] Compare the difference between the amplitude values of a preset number of pixels and the maximum amplitude value to see if it is within the preset difference range;
[0114] If so, determine the pixel corresponding to the maximum amplitude value as the feature pixel.
[0115] This application discloses a verification method for feature pixels. By adding noise vibration verification during the determination of feature pixels through the above steps, it avoids selecting an incorrect pixel, thereby facilitating the subsequent determination of a feature image region that better matches heart rate fluctuations. More specifically, to avoid identifying the initial feature pixel as an incorrect point of maximum amplitude, the amplitude of pixels surrounding the initial feature pixel is also calculated. If the vibration amplitude of 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.
[0116] Based on steps 11-12 and the related explanations, and using the generated consecutive multi-frame cardiac-like images, to further illustrate the process of generating a heart rate curve through a sector region, please refer to [link to relevant documentation]. Figure 5a ~c, Figure 5a This figure is a schematic diagram of multiple consecutive frames of heart-like images provided in an embodiment of this application, combined with... Figure 5a As shown, for Figure 5aThe displayed series of multiple heart-like images require further extraction of the heart-like boundary for each frame. Taking the first heart-like image as an example, see [link to example]. Figure 5b This figure is a schematic diagram of heart-like boundary extraction provided in an embodiment of this application, combined with... Figure 5b As shown, based on the watershed algorithm... Figure 5b The mark in Figure 1 Boundary extraction is performed to obtain, as follows Figure 5b The boundary of the heart-like structure is shown in Figure 2.
[0117] Further, see Figure 5c This figure is a schematic diagram of another fan-shaped feature image region provided in an embodiment of this application, combined with Figure 5c As shown, a central pixel is identified on the heart-like image, and feature pixels are located within the heart-like internal region. A line is drawn connecting the central pixels, and this line is used as the midline to extend outwards to form a central angle, ultimately creating a fan-shaped region; see also... Figure 3c ,and Figure 5c The difference lies in the fact that this feature pixel is located on the boundary line of the heart-like shape. When inverting the feature pixel onto the original heart-like image, this method is also preferred. Figure 5c or Figure 3c The feature image region is determined in this way.
[0118] This embodiment also discloses a heart rate curve generation device 600 resembling a heart, the device comprising:
[0119] The recognition module 601 is used to identify feature image regions including feature pixels in consecutive multi-frame cardiac images;
[0120] The sequence generation module 602 is used to determine the distance between the heart-like boundary lines of each two adjacent feature image regions based on the feature image regions in multiple consecutive frames, and generate a distance sequence.
[0121] The curve generation module 603 is used to generate a heart-like heart rate curve based on the distance difference sequence.
[0122] Optionally, the recognition module 601 specifically includes:
[0123] The signal conversion submodule is used to convert the time-domain signal of all pixels on the heart-like boundary line of multiple consecutive frames of the heart-like image into a frequency-domain signal;
[0124] The feature pixel determination submodule is used to determine the pixel corresponding to the frequency domain signal with the largest amplitude value within the normal heart rate range as the feature pixel based on the amplitude value corresponding to the frequency domain signal of each of all pixels.
[0125] The feature image region determination submodule is used to determine the feature image region based on the determined feature pixels.
[0126] Optionally, the shape of the feature image region is fan-shaped, the center of the fan-shaped region is the center pixel of the heart-shaped image, and the arc-shaped region is the boundary line of the heart-shaped image.
[0127] Optionally, the feature pixel is located near the center point of the arc-like structure.
[0128] Optionally, the center pixel of the heart-like image is the centroid of the heart-like image or the center of its smallest bounding rectangle.
[0129] Optional, the feature pixel point determination submodule is specifically used for:
[0130] Based on the amplitude values corresponding to the frequency domain signals of all pixels, the pixels corresponding to two frequency domain signals within the normal heart rate range and in descending order of amplitude values are identified as the feature pixels, wherein the distance between the two feature pixels is greater than a preset distance.
[0131] The feature image region determination submodule is specifically used to determine two feature image regions that correspond one-to-one with the two feature pixels.
[0132] The curve generation module 603 is specifically used to generate the heart rate curve of the heart-like shape based on the distance sequence generated by each of the two feature image regions.
[0133] Optional, the feature pixel point determination submodule is specifically used for:
[0134] Determine the amplitude value of the frequency domain signal of a preset number of pixels within a preset distance of the pixel corresponding to the maximum amplitude value on the boundary line of the heart-like structure;
[0135] Compare whether the difference between the preset number of pixel amplitude values and the maximum amplitude value is within a preset difference range;
[0136] If so, the pixel corresponding to the maximum amplitude value is determined as the feature pixel.
[0137] Optionally, the device also includes:
[0138] The video acquisition module is used to acquire video of the heart-like structure.
[0139] The preprocessing module is used to determine a series of consecutive original heart-like images based on the video, and to crop the original heart-like images to obtain the heart-like image.
[0140] The identification module 601 is also specifically used for:
[0141] The feature pixels are determined in the heart-like image;
[0142] Based on the feature pixels identified in the heart-like image, the corresponding feature pixels are determined in the original heart-like image;
[0143] The feature image region is determined in the original heart-like image based on the feature pixels.
[0144] Optionally, the device also includes:
[0145] A boundary recognition module is used to determine the heart-like boundary line of the heart-like image using a watershed algorithm and / or a segmentation model.
[0146] An electronic device, comprising:
[0147] Memory, used to store computer programs;
[0148] The processor is used to execute the steps of the heart rate curve generation method for a heart-like system.
[0149] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of a method for generating a heart rate curve resembling a heart.
[0150] 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.
[0151] 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.
[0152] 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 generating a heart-like heart rate curve, characterized in that, The method includes: Identify feature image regions containing feature pixels in consecutive multi-frame cardiac images; Based on the feature image regions in multiple consecutive frames, the distance between the heart-like boundary lines of each two adjacent feature image regions is determined, and a distance sequence is generated. Based on the distance sequence of the feature image region, different changes in the degree of contraction and relaxation of the heart-like heart are simulated to generate a heart rate curve of the heart-like heart; The identification of feature image regions including feature pixels in consecutive multi-frame cardiac images specifically includes: The time-domain signals of all pixels on the heart-like boundary line 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, the pixel corresponding to the frequency domain signal with the largest amplitude value within the normal heart rate range is determined as the feature pixel. The feature image region is determined based on the identified feature pixels.
2. The method according to claim 1, characterized in that, The shape of the feature image region is fan-shaped, the center of the fan-shaped region is the center pixel of the heart-shaped image, and the arc of the fan-shaped region is the boundary line of the heart-shaped image.
3. The method according to claim 2, characterized in that, The feature pixel is located near the center point of the arc-like shape.
4. The method according to claim 2, characterized in that, The value of the central angle of the fan-shaped structure ranges from 30° to 45°.
5. The method according to claim 2, characterized in that, The center pixel of the heart-like image is the centroid of the heart-like image or the center of its smallest bounding rectangle.
6. The method according to claim 1, characterized in that, The step of determining the pixel corresponding to the frequency domain signal with the largest amplitude value within the normal heart rate range as the feature pixel, based on the amplitude values corresponding to the frequency domain signals of all pixels, specifically includes: Based on the amplitude values corresponding to the frequency domain signals of all pixels, the pixels corresponding to two frequency domain signals within the normal heart rate range and in descending order of amplitude values are identified as the feature pixels, wherein the distance between the two feature pixels is greater than a preset distance. The step of determining the feature image region based on the determined feature pixels includes: determining two feature image regions that correspond one-to-one with the two feature pixels; The generation of a heart-like heart rate curve based on the distance sequence specifically includes: The heart rate curve of the heart-like structure is generated based on the distance sequence generated from each of the two feature image regions.
7. The method according to claim 6, characterized in that, Determining the pixel corresponding to the frequency domain signal as the feature pixel specifically includes: The pixel corresponding to the frequency domain signal is determined as the preliminary feature pixel; Determine the amplitude value of the frequency domain signal corresponding to a preset number of pixels within a preset distance of the preliminary feature pixels; Compare whether the difference between the amplitude values of the preset number of pixels and the maximum amplitude value of the preliminary feature pixels is within a preset difference range; If so, the preliminary feature pixel is determined as the feature pixel.
8. The method according to claim 1, characterized in that, The method further includes: Obtain the video of the heart-like structure; Based on the video, a series of consecutive original heart-like images are determined, and the original heart-like images are cropped to obtain the heart-like image.
9. The method according to claim 8, characterized in that, The identification of feature image regions including feature pixels in consecutive multi-frame cardiac images specifically includes: The feature pixels are determined in the heart-like image; Based on the feature pixels identified in the heart-like image, the corresponding feature pixels are determined in the original heart-like image; The feature image region is determined in the original heart-like image based on the feature pixels.
10. The method according to claim 1, characterized in that, The method further includes: The heart-like boundary line of the heart-like image is determined by using the watershed algorithm and / or segmentation model.
11. A heart-like heart rate curve generation device, characterized in that, The device includes: The recognition module is used to identify feature image regions containing feature pixels in multiple consecutive frames of cardiac-like images; The sequence generation module is used to determine the distance between the heart-like boundary lines of each two adjacent feature image regions based on the feature image regions in multiple consecutive frames, and generate a distance sequence. The curve generation module is used to simulate different changes in the degree of contraction and relaxation of the heart-like organ based on the distance sequence of the feature image region, and generate the heart rate curve of the heart-like organ; The recognition module specifically includes: The signal conversion submodule is used to convert the time-domain signal of all pixels on the heart-like boundary line of multiple consecutive frames of the heart-like image into a frequency-domain signal; The feature pixel determination submodule is used to determine the pixel corresponding to the frequency domain signal with the largest amplitude value within the normal heart rate range as the feature pixel based on the amplitude value corresponding to the frequency domain signal of each of all pixels. The feature image region determination submodule is used to determine the feature image region based on the determined feature pixels.
12. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the heart rate curve generation method as described in any one of claims 1 to 10 when executing the computer program.
13. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the method for generating a heart-like heart rate curve as described in any one of claims 1 to 10.