Ultrasonic video image display proportion self-adaption method, device and computer equipment
By acquiring the motion features and target detection model of fetal ultrasound video frames, the display ratio of fetal ultrasound images is adaptively adjusted, solving the problems of low image quality and inconsistency caused by relying on subjective experience, and achieving higher quality and more consistent image display.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUNAN UNIV
- Filing Date
- 2023-04-11
- Publication Date
- 2026-07-31
AI Technical Summary
In fetal ultrasound image observation, current technology relies on the subjective experience of medical staff to adjust the image display ratio, resulting in low and inconsistent image quality.
By acquiring the motion features of ultrasound video frames, a target detection model is used to determine the target display area and its corresponding cross section for each frame. The display ratio is then adaptively adjusted based on the ratio of the height of the ultrasound sector outline to the height of the target display area.
It improves the display quality of fetal ultrasound images, avoids poor image quality and inconsistency caused by subjective judgment, and achieves higher quality and more consistent image display.
Smart Images

Figure CN116485644B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, computer device, storage medium, and computer program product for adaptive display of ultrasonic video images. Background Technology
[0002] A key adjustment parameter in fetal ultrasound imaging is depth, which refers to the longitudinal distance displayed on the ultrasound image. When the depth is set too shallow, the image is magnified, but the resolution decreases; when the depth is set too deep, the image is shrunk, affecting observation and diagnosis. Therefore, it is necessary to adjust the appropriate depth to observe fetal structures in the ultrasound image. Specifically, from an image processing perspective, it is necessary to determine an appropriate display scale for observing fetal structures in the ultrasound image.
[0003] Typically, when medical staff observe the fetal anatomy in a frame of an ultrasound image, they make subjective judgments based on their personal experience and then adjust the image display scale, which results in low image quality. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve the display quality of ultrasound video images by adaptively adjusting the display ratio.
[0005] Firstly, this application provides a method for adaptive display scaling of ultrasound video images. The method includes:
[0006] Acquire ultrasound video frames of the target ultrasound image;
[0007] Based on the motion characteristics between multiple frames in the ultrasound video frame, the ultrasound sector outline corresponding to each frame image is obtained.
[0008] The target detection model is used to detect multiple frames of images in the ultrasound video frame to determine the target display area and the corresponding cross section of each frame image;
[0009] Based on the ratio of the height of the ultrasonic sector outline corresponding to each frame image to the height of the target display area, the target display ratio of each frame image is determined, and the area size of the target display area is adjusted based on the target display ratio and the preset magnification ratio range corresponding to the respective cross-section.
[0010] In one embodiment, obtaining the ultrasound sector outline corresponding to each frame image based on the motion features between multiple frames in the ultrasound video frame includes:
[0011] Based on each frame of the ultrasound video frame and the previous frame of each frame, obtain the optical flow vector diagram corresponding to each frame.
[0012] Preprocess the optical flow vector diagram corresponding to each frame image to obtain the first ultrasonic sector outline corresponding to each frame image;
[0013] Each frame image and the previous frame image are processed using the inter-frame difference method to obtain the difference image corresponding to each frame image;
[0014] The difference image corresponding to each frame image is preprocessed to obtain the second ultrasonic sector outline corresponding to each frame image;
[0015] The first and second ultrasonic sector outlines are superimposed and smoothed to obtain the ultrasonic sector outline corresponding to each frame image.
[0016] In one embodiment, the preprocessing of the optical flow vector diagram corresponding to each frame of the image to obtain the first ultrasonic sector outline corresponding to each frame of the image includes:
[0017] The optical flow vector image corresponding to each frame of the image is visualized and mapped to an image in a preset image format to obtain an optical flow visualization image;
[0018] The optical flow visualization image is subjected to image enhancement processing to obtain the enhanced optical flow visualization image;
[0019] The enhanced optical flow visualization image is binarized and closed-off to obtain a binary optical flow image.
[0020] Based on the contour size in the binary optical flow image, the largest contour in the binary optical flow image is determined to be the first ultrasonic sector outline corresponding to each frame image.
[0021] In one embodiment, the step of processing each frame image and the previous frame image using the inter-frame difference method to obtain the difference image corresponding to each frame image includes:
[0022] Based on each frame image and the previous frame image, the absolute value of the pixel value difference between each frame image and the previous frame image at multiple identical positions is calculated to obtain the difference image corresponding to each frame image.
[0023] In one embodiment, adjusting the size of the target display area based on the target display ratio and the magnification range corresponding to the respective cross-section includes:
[0024] If the target display ratio is greater than the maximum value of the preset magnification ratio range, a first prompt message is displayed, which is used to prompt the user to reduce the size of the target display area.
[0025] If the target display ratio is less than the minimum value of the preset magnification ratio range, a second prompt message is displayed, which is used to suggest increasing the size of the target display area.
[0026] In one embodiment, the method for obtaining the target detection model includes:
[0027] Acquire multiple standard ultrasound cross-sectional images;
[0028] The key structural regions and their respective sections in the multiple standard ultrasound section images are annotated to obtain the corresponding ultrasound structural annotation information.
[0029] The initial detection model is trained based on the multiple standard ultrasound cross-sectional images and the corresponding ultrasound structure annotation information to obtain the target detection model.
[0030] Secondly, this application provides an adaptive ultrasound video image display ratio device, the device comprising:
[0031] The frame acquisition module is used to acquire ultrasound video frames of the target ultrasound image;
[0032] The contour acquisition module is used to obtain the ultrasound sector outline corresponding to each frame image based on the motion features between multiple frames in the ultrasound video frame.
[0033] The target detection module is used to detect multiple frames of images in the ultrasound video frame using a target detection model, and to determine the target display area and its corresponding cross-section for each frame of image.
[0034] The display module is used to determine the target display ratio of each frame image based on the ratio of the height of the ultrasonic sector outline corresponding to each frame image to the height of the target display area, so as to adjust the size of the target display area based on the target display ratio and the preset magnification ratio range corresponding to the corresponding cross section.
[0035] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0036] Acquire ultrasound video frames of the target ultrasound image;
[0037] Based on the motion characteristics between multiple frames in the ultrasound video frame, the ultrasound sector outline corresponding to each frame image is obtained.
[0038] The target detection model is used to detect multiple frames of images in the ultrasound video frame to determine the target display area and the corresponding cross section of each frame image;
[0039] Based on the ratio of the height of the ultrasonic sector outline corresponding to each frame image to the height of the target display area, the target display ratio of each frame image is determined, and the area size of the target display area is adjusted based on the target display ratio and the preset magnification ratio range corresponding to the respective cross-section.
[0040] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0041] Acquire ultrasound video frames of the target ultrasound image;
[0042] Based on the motion characteristics between multiple frames in the ultrasound video frame, the ultrasound sector outline corresponding to each frame image is obtained.
[0043] The target detection model is used to detect multiple frames of images in the ultrasound video frame to determine the target display area and the corresponding cross section of each frame image;
[0044] Based on the ratio of the height of the ultrasonic sector outline corresponding to each frame image to the height of the target display area, the target display ratio of each frame image is determined, and the area size of the target display area is adjusted based on the target display ratio and the preset magnification ratio range corresponding to the respective cross-section.
[0045] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0046] Acquire ultrasound video frames of the target ultrasound image;
[0047] Based on the motion characteristics between multiple frames in the ultrasound video frame, the ultrasound sector outline corresponding to each frame image is obtained.
[0048] The target detection model is used to detect multiple frames of images in the ultrasound video frame to determine the target display area and the corresponding cross section of each frame image;
[0049] Based on the ratio of the height of the ultrasonic sector outline corresponding to each frame image to the height of the target display area, the target display ratio of each frame image is determined, and the area size of the target display area is adjusted based on the target display ratio and the preset magnification ratio range corresponding to the respective cross-section.
[0050] The aforementioned adaptive display ratio method, apparatus, computer equipment, storage medium, and computer program product for ultrasound video images obtain the ultrasound sector outline corresponding to each frame image based on the motion characteristics between multiple frames in an ultrasound video frame. It then uses a target detection model to detect the multiple frames in the ultrasound video frame, determining the target display area and its corresponding section for each frame image. Thus, when determining the target display ratio of each frame image in the target ultrasound image based on the ratio of the height of the ultrasound sector outline to the height of the target display area, the size of the display area in different frames can be adaptively adjusted based on the display ratio of different frames and the preset magnification range corresponding to the corresponding section. This improves the image quality of different frames and increases the standardization rate of the acquisition section. Compared with existing methods that adjust the image display ratio based on subjective judgment and personal experience, the method of this application avoids low image display quality caused by subjective judgment. Furthermore, it avoids inconsistencies in image display caused by different individuals' subjective judgments, thus improving the overall image display quality. Attached Figure Description
[0051] Figure 1 This is an application environment diagram of the ultrasonic video image display ratio adaptive method in one embodiment;
[0052] Figure 2 This is a flowchart illustrating an adaptive display ratio method for ultrasound video images in one embodiment;
[0053] Figure 3 This is a flowchart illustrating the process of obtaining the ultrasonic sector outline corresponding to each frame image based on the motion features between multiple frames in an ultrasonic video frame, as described in one embodiment.
[0054] Figure 4 This is a flowchart illustrating the process of preprocessing the optical flow vector diagram corresponding to each frame of an image to obtain the outline of the first ultrasonic sector frame corresponding to each frame of an image in one embodiment.
[0055] Figure 5 This is a flowchart illustrating the process of adjusting the size of a target display area based on the target display ratio and the preset magnification range corresponding to the respective cross-section in one embodiment.
[0056] Figure 6 This is a flowchart illustrating the method for acquiring a target detection model in one embodiment;
[0057] Figure 7 This is a flowchart illustrating the adaptive display ratio method for ultrasound video images in another embodiment;
[0058] Figure 8 This is a structural block diagram of an ultrasonic video image display ratio adaptive device in one embodiment;
[0059] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0061] The ultrasound video image display ratio adaptive method provided in this application can determine the display ratio of each frame in the target ultrasound image. The target ultrasound image may include fetal ultrasound images such as fetal heart section and crown-rump section. For ease of description, the following description will use fetal ultrasound image as the target ultrasound image as an example.
[0062] During ultrasound image examination, when observing a specific important fetal structure, a suitable image depth can be selected to obtain a high-quality ultrasound image. For example, when measuring the crown-rump length, the region of interest (i.e., the entire fetal outline) can be magnified to more than two-thirds of the ultrasound image area. However, current ultrasound image observation methods rely on subjective judgment based on personal experience, followed by adjustments to the image display ratio (i.e., image depth). This can lead to individual errors, as different doctors may use different standards to judge the same image, potentially resulting in low-quality images.
[0063] In view of this, this application provides an adaptive method for displaying ultrasound video images. The adaptive method for displaying ultrasound video images provided in the embodiments of this application can be applied to, for example... Figure 1In the application environment shown, the processor 102 can process the ultrasound video frames of the target ultrasound image acquired by the ultrasound instrument 104. Specifically, the processor 102 obtains the ultrasound sector outline corresponding to each frame image based on the motion characteristics between multiple frames in the ultrasound video frame, and uses a target detection model to detect the multiple frames in the ultrasound video frame to determine the target display area and its corresponding cross-section for each frame image. Then, based on the ratio of the height of the ultrasound sector outline corresponding to each frame image to the height of the target display area, the target display ratio of each frame image is determined, and the area size of the target display area corresponding to each frame image in the target ultrasound image is adjusted based on the target display ratio and the preset magnification ratio range corresponding to the corresponding cross-section.
[0064] In one embodiment, such as Figure 2 As shown, an adaptive method for displaying ultrasound video images is provided, which can be applied to... Figure 1 Taking processor 102 as an example, the following steps are included:
[0065] S202, acquire the ultrasound video frame of the target ultrasound image.
[0066] In some embodiments, the target ultrasound image is a fetal ultrasound image. The processor can obtain the ultrasound video frame of the fetal ultrasound image obtained by the ultrasound instrument through the ultrasound instrument interface. Specifically, a driver code can be written into the ultrasound instrument to upload the ultrasound video frame to the processor in real time through the ultrasound instrument interface when the ultrasound instrument is used to perform an ultrasound examination on the pregnant woman.
[0067] S204. Based on the motion characteristics between multiple frames in the ultrasound video frame, obtain the ultrasound sector outline corresponding to each frame image.
[0068] In the ultrasound video frames of a fetus, the motion characteristics of the fetus are correlated and different between different video frames. In this embodiment, the motion characteristics between multiple frames can be characterized by the optical flow corresponding to the multiple frames; or, the motion characteristics between multiple frames can be characterized by the difference in pixel values at the same position corresponding to the multiple frames.
[0069] S206, Use a target detection model to detect multiple frames of images in the ultrasound video frame, and determine the target display area and the corresponding cross section of each frame image.
[0070] The target display area is the region of interest being observed, and the corresponding section refers to the section type corresponding to the region of interest; for example, when observing the heart, the area of the heart in the chest cavity is the target display area, and the corresponding section is the heart.
[0071] S208, determine the target display ratio of each frame image based on the ratio of the height of the ultrasonic sector outline to the height of the target display area, and adjust the size of the target display area based on the target display ratio and the preset magnification range corresponding to the section.
[0072] In this embodiment, the target display ratio of each frame in the target ultrasound image is the ratio of the height of the ultrasound sector outline corresponding to each frame in the target ultrasound image to the height of the target display area. Therefore, based on the display ratio of different frame images and the preset magnification ratio range corresponding to the respective cross-section, the area size of the display area in different frame images can be displayed with high quality.
[0073] In summary, through Figure 2 The method described herein obtains the ultrasound sector outline corresponding to each frame image based on the motion characteristics between multiple frames in an ultrasound video frame, and uses a target detection model to detect the multiple frames in the ultrasound video frame to determine the target display area and its corresponding cross-section for each frame image. Thus, when determining the target display ratio of each frame image in the target ultrasound image based on the ratio of the height of the ultrasound sector outline corresponding to each frame image to the height of the target display area, the size of the display area in different frames can be adaptively adjusted based on the display ratio of different frames and the preset magnification range corresponding to the corresponding cross-section, thereby improving the image quality of different frames. Compared with existing methods that adjust the image display ratio based on subjective judgment of personal experience, the method of this application avoids the situation of poor image display quality caused by subjective judgment. At the same time, it avoids the inconsistency in image display caused by different individual subjective judgments, thus improving the image display effect.
[0074] In one embodiment, such as Figure 3 As shown, a flowchart illustrates a process for obtaining the ultrasound sector outline corresponding to each frame image based on the motion features between multiple frames in an ultrasound video frame, including the following steps:
[0075] S302, based on each frame of the ultrasound video frame and the previous frame of each frame, obtain the optical flow vector diagram corresponding to each frame.
[0076] In this embodiment, the optical flow between each frame and the previous frame can be calculated using the Gunnar Farnebak algorithm to obtain the optical flow vector map corresponding to each frame. Optical flow is a method that uses the temporal changes of pixels in an image and the correlation between adjacent frames to find the correspondence between the previous and current frames, thereby calculating the motion information of objects between adjacent frames. In this embodiment, the object described above refers to a fetus.
[0077] S304, preprocess the optical flow vector diagram corresponding to each frame of the image to obtain the first ultrasonic sector outline corresponding to each frame of the image.
[0078] In this embodiment, by preprocessing the optical flow vector image, a first ultrasonic sector outline corresponding to the optical flow vector image can be obtained. Then, an ultrasonic sector outline can be obtained based on the first ultrasonic sector outline. Thus, when determining the target display ratio of the region corresponding to each frame image in the target ultrasonic image based on the height of the ultrasonic sector outline corresponding to each frame image, the size of the display area in different frame images can be adaptively adjusted based on the display ratio of different frame images and the preset magnification ratio range corresponding to the respective cross-section, thereby improving the image quality of different frame images.
[0079] S306, use the inter-frame difference method to process each frame image and the previous frame image to obtain the difference image corresponding to each frame image.
[0080] Among them, the inter-frame difference method is a method to obtain the contour of a moving target by performing a difference operation on two adjacent frames in a video image sequence. It is well applicable to situations where there are multiple moving targets and camera movement. In this embodiment, the inter-frame difference method can perform a difference operation on adjacent frame images to obtain the corresponding difference image.
[0081] S308, preprocess the difference image corresponding to each frame image to obtain the second ultrasonic sector outline corresponding to each frame image.
[0082] Specifically, the preprocessing of the differential image includes: visualizing the differential image corresponding to each frame and mapping it to an image in a preset image format, including RGB format, to obtain a differential visualization image; performing image enhancement processing on the differential visualization image (such as increasing the contrast by a preset factor) to obtain an enhanced differential visualization image; performing binarization and closing operations on the enhanced differential visualization image to obtain a differential binary image; and determining the largest contour in the differential binary image as the second ultrasound sector outline corresponding to each frame image based on the contour size in the differential binary image.
[0083] S310, the first ultrasonic sector outline and the second ultrasonic sector outline are superimposed and smoothed to obtain the ultrasonic sector outline corresponding to each frame image.
[0084] In some embodiments, after superimposing the first ultrasonic sector outline and the second ultrasonic sector outline, the superimposed ultrasonic sector outline is smoothed by using a Gaussian filtering smoothing algorithm to obtain the ultrasonic sector outline corresponding to each frame image.
[0085] In summary, through Figure 3 The method described herein obtains the first ultrasonic sector outline corresponding to each frame image based on the optical flow vector diagram between each frame image and the previous frame image, and obtains the second ultrasonic sector outline corresponding to each frame image based on the difference image between each frame image and the previous frame image. Then, by superimposing the first and second ultrasonic sector outlines and performing contour smoothing, the ultrasonic sector outline corresponding to each frame image can be obtained. Thus, when determining the target display ratio of each frame image in the target ultrasonic image based on the ratio of the height of the ultrasonic sector outline corresponding to each frame image to the height of the target display area, the size of the display area in different frames image can be adaptively adjusted based on the display ratio of different frames image and the preset magnification range corresponding to the respective cross-section, thereby improving the image quality of different frames image displays. Compared with existing methods that adjust the image display ratio based on subjective judgment of personal experience, the method of this application can avoid the situation of poor image display quality caused by subjective judgment, and at the same time, it can avoid the inconsistency of image display caused by different individual subjective judgments, thus improving the image display effect.
[0086] In one embodiment, such as Figure 4 As shown, a flowchart illustrating the process of preprocessing the optical flow vector diagram corresponding to each frame of an image to obtain the first ultrasonic sector outline corresponding to each frame of an image is provided, including the following steps:
[0087] S402 visualizes the optical flow vector image corresponding to each frame and maps it to an image in a preset image format to obtain an optical flow visualization image.
[0088] In this embodiment, after visualizing the optical flow vector image corresponding to each frame, the visualized optical flow vector image is mapped to an image of a preset image format to obtain an optical flow visualization image. The optical flow visualization image can be a color image or other types of images. The preset image format can include RGB format, etc. The specific content of the preset image format can be set according to the actual application scenario, and this embodiment does not impose specific limitations.
[0089] S404 performs image enhancement processing on the optical flow visualization image to obtain an enhanced optical flow visualization image.
[0090] In this embodiment, the optical flow visualization image can be a color image, where color represents the direction of pixel movement and lightness or darkness represents the magnitude of displacement. Since the displacement at the edge of the sector frame is generally small, meaning the optical flow image is light in color, image enhancement processing of the optical flow visualization image can better distinguish the edges of the sector frame and the background, thus improving the accuracy of extracting the contour of the ultrasonic sector frame.
[0091] In some embodiments, when performing image enhancement processing on an optical flow visualization image, the contrast of the optical flow visualization image can be increased. Increasing the contrast of the optical flow visualization image is because when identifying and segmenting sector bounding boxes, the pixel differences between adjacent positions in the image may be small. By increasing the contrast, these differences can be magnified by a factor. Therefore, increasing the contrast of an optical flow visualization image essentially adds a factor to the pixel values of the optical flow visualization image; a factor greater than 1 enhances the contrast, while a factor less than 1 reduces the contrast. In this embodiment, the contrast of the optical flow visualization image can be increased by a factor of 5.
[0092] S406 performs binarization and closing operations on the enhanced optical flow visualization image to obtain a binary optical flow image.
[0093] Closing is a fundamental morphological operation in image processing, belonging to a mathematical morphology method. It is defined as performing dilation followed by erosion on an image. First, dilation fills the black holes inside objects, then erosion smooths the boundaries without significantly changing the area. In this application, dilation is performed on the binarized optical flow visualization image before erosion.
[0094] S408, based on the contour size in the binary optical flow image, determine the maximum contour in the binary optical flow image as the first ultrasonic sector outline corresponding to each frame image.
[0095] In summary, based on Figure 4 The method described herein obtains the first ultrasonic sector outline for each frame by processing the optical flow vector diagram corresponding to each frame image. This first ultrasonic sector outline then yields the ultrasonic sector outline for each frame image. Thus, when determining the target display ratio of each frame image in the target ultrasonic image based on the ratio of the height of the ultrasonic sector outline to the height of the target display area, the size of the display area in different frames can be adaptively adjusted based on the display ratio of different frames and the preset magnification range corresponding to the respective cross-section. This improves the image quality of different frames. Compared to existing methods that adjust the image display ratio based on subjective judgment and personal experience, the method of this application avoids poor image display quality caused by subjective judgment. Furthermore, it avoids inconsistencies in image display due to different individual subjective judgments, thus improving the image display effect.
[0096] In one embodiment, inter-frame differencing is applied to each frame image and the previous frame image to obtain a difference image corresponding to each frame image. This includes: calculating the absolute value of the difference between pixel values at multiple identical positions in each frame image and the previous frame image, based on each frame image and the previous frame image, to obtain the difference image corresponding to each frame image. Specifically, by calculating the difference between pixel values at identical positions in each frame image and the previous frame image, and determining the absolute value of this difference as the pixel value at that identical position in each frame image, the difference image corresponding to each frame image is obtained.
[0097] In one embodiment, such as Figure 5 As shown, a flowchart illustrates a process for adjusting the size of a target display area based on the target display ratio and a preset magnification range corresponding to the relevant cross-section, including the following steps:
[0098] S502, if the target display ratio is greater than the maximum value of the preset magnification ratio range, display the first prompt information. The first prompt information is used to prompt the reduction of the target display area.
[0099] S504, if the target display ratio is less than the minimum value of the preset magnification ratio range, a second prompt message is displayed. The second prompt message is used to suggest increasing the size of the target display area.
[0100] The preset magnification range corresponding to the respective section is a pre-set range; for example, if the respective section is a fetal crown-rump length section, the corresponding preset magnification range is 2 / 3-3 / 4; if the respective section is a transverse section of the cranium, the corresponding preset magnification range is 1 / 3-1; if the respective section is a midsagittal section of the face, the corresponding preset magnification range is 1 / 2-1. It can be understood that the preset magnification range described above can also be expressed as a percentage, and this embodiment does not make a specific limitation.
[0101] In summary, by comparing the target display ratio with the preset magnification range corresponding to the corresponding cross-section, when the display area size is inappropriate in different frame images, a prompt can be made to reduce or increase the display area size, thereby improving the image quality of different frame images.
[0102] In one embodiment, such as Figure 6 The diagram illustrates a process for obtaining an object detection model, including the following steps:
[0103] S602, acquire multiple standard ultrasound cross-sectional images.
[0104] Among them, standard ultrasound cross-sectional images are high-quality ultrasound cross-sectional images, which may include cross-sections of the fetal heart, etc.
[0105] S604 annotates the key structural regions and their respective sections in multiple standard ultrasound cross-sectional images to obtain the corresponding ultrasound structural annotation information.
[0106] In some embodiments, for each standard ultrasound image containing a corresponding fetal key structural region and its corresponding section, the corresponding ultrasound structural annotation information can be obtained by marking the fetal key structural region and its corresponding section with a rectangular bounding box. The ultrasound structural annotation information corresponding to the fetal key structural region may include the size of the fetal key structural region and the coordinate position corresponding to the size of the region, etc.; the ultrasound structural annotation information corresponding to the corresponding section may include the coordinate position corresponding to the corresponding section, etc. The region of fetal key structural region and its corresponding section marked with a rectangular bounding box is the region of interest in that standard ultrasound image.
[0107] Among them, the key structural regions of the fetus are the regions of interest for observation, and the corresponding section refers to the section type of the region of interest; for example, when observing the heart, the area of the heart in the chest cavity is the target display area, and the corresponding section is the heart.
[0108] S606: The initial detection model is trained based on multiple standard ultrasound cross-sectional images and corresponding ultrasound structural annotation information to obtain the target detection model.
[0109] In summary, through Figure 6 The method described herein can obtain a target detection model, and then, based on the target detection model, the target display area corresponding to each frame of the image can be obtained. Thus, when determining the target display ratio of each frame of the target ultrasound image according to the ratio of the height of the ultrasound sector outline corresponding to each frame of the image to the height of the target display area, the size of the display area in different frames of the image can be adaptively adjusted based on the display ratio of different frames of the image and the preset magnification ratio range corresponding to the respective cross-section, thereby improving the image quality of different frames of the image. Compared with the existing method of adjusting the image display ratio based on personal experience and subjective judgment, the method of this application can avoid the situation of poor image display quality caused by subjective judgment. At the same time, it can avoid the inconsistency of image display caused by different individuals' subjective judgments, thereby improving the image display effect.
[0110] In one embodiment, taking a fetal ultrasound image as the target ultrasound image as an example, such as... Figure 7 The diagram illustrates a flowchart of an adaptive method for displaying ultrasound video images, comprising the following steps:
[0111] S702, acquire the ultrasound video frame of the target ultrasound image.
[0112] S704: Based on each frame of the ultrasound video frame and the previous frame of each frame, obtain the optical flow vector diagram corresponding to each frame.
[0113] S706 visualizes the optical flow vector image corresponding to each frame and maps it to an image in a preset image format to obtain an optical flow visualization image.
[0114] S708 performs image enhancement processing on the optical flow visualization image to obtain an enhanced optical flow visualization image.
[0115] S710 performs binarization and closing operations on the enhanced optical flow visualization image to obtain a binary optical flow image.
[0116] S712, based on the contour size in the binary optical flow image, determine the maximum contour in the binary optical flow image as the first ultrasonic sector outline corresponding to each frame image.
[0117] S714 processes each frame image and the previous frame image using the inter-frame difference method to obtain the difference image corresponding to each frame image.
[0118] S716, preprocess the difference image corresponding to each frame image to obtain the second ultrasonic sector outline corresponding to each frame image.
[0119] The method of preprocessing the difference image corresponding to each frame to obtain the second ultrasonic sector outline corresponding to each frame can be referred to the method of preprocessing the optical flow vector image corresponding to each frame to obtain the first ultrasonic sector outline corresponding to each frame, which will not be elaborated here.
[0120] S718, the first ultrasonic sector outline and the second ultrasonic sector outline are superimposed and smoothed to obtain the ultrasonic sector outline corresponding to each frame image.
[0121] S720 uses a target detection model to detect multiple frames of images in an ultrasound video frame, and determines the target display area and its corresponding cross-section for each frame.
[0122] S722 determines the target display ratio of each frame image based on the ratio of the height of the ultrasonic sector outline to the height of the target display area, and adjusts the size of the target display area based on the target display ratio and the preset magnification range corresponding to the section.
[0123] The specific content of S702 to S722 can be referred to the description of the content in the foregoing embodiments, and will not be repeated here.
[0124] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0125] Based on the same inventive concept, this application also provides an ultrasonic video image display ratio adaptive device for implementing the ultrasonic video image display ratio adaptive method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more ultrasonic video image display ratio adaptive device embodiments provided below can be found in the limitations of the ultrasonic video image display ratio adaptive method described above, and will not be repeated here.
[0126] In one embodiment, such as Figure 8 As shown, an adaptive display scale device for ultrasound video images is provided, comprising: a frame acquisition module 802, a contour acquisition module 804, a target detection module 806, and a display module 808, wherein:
[0127] The frame acquisition module 802 is used to acquire ultrasound video frames of the target ultrasound image;
[0128] The contour acquisition module 804 is used to obtain the ultrasound sector outline corresponding to each frame image based on the motion features between multiple frames of images in the ultrasound video frame.
[0129] The target detection module 806 is used to detect multiple frames of images in an ultrasound video frame using a target detection model, and to determine the target display area and the corresponding cross section for each frame of image.
[0130] The display module 808 is used to determine the target display ratio of each frame image based on the ratio of the height of the ultrasonic sector outline corresponding to each frame image to the height of the target display area, so as to adjust the size of the target display area based on the target display ratio and the preset magnification ratio range corresponding to the section.
[0131] In one embodiment, the contour acquisition module 804 is further configured to: obtain an optical flow vector diagram corresponding to each frame image based on each frame image in the ultrasound video frame and the previous frame image of each frame image; preprocess the optical flow vector diagram corresponding to each frame image to obtain a first ultrasound sector outline corresponding to each frame image; process each frame image and the previous frame image using the inter-frame difference method to obtain a difference image corresponding to each frame image; preprocess the difference image corresponding to each frame image to obtain a second ultrasound sector outline corresponding to each frame image; and perform superposition processing and contour smoothing processing on the first ultrasound sector outline and the second ultrasound sector outline to obtain an ultrasound sector outline corresponding to each frame image.
[0132] In one embodiment, the contour acquisition module 804 is further configured to: visualize the optical flow vector image corresponding to each frame image and map it to an image of a preset image format to obtain an optical flow visualization image; perform image enhancement processing on the optical flow visualization image to obtain an image-enhanced optical flow visualization image; perform binarization processing and closing operation processing on the image-enhanced optical flow visualization image to obtain an optical flow binary image; and determine the maximum contour in the optical flow binary image as the first ultrasonic sector outline corresponding to each frame image based on the contour size in the optical flow binary image.
[0133] In one embodiment, the contour acquisition module 804 is further configured to: calculate the absolute value of the pixel value difference between each frame image and the previous frame image at multiple identical positions based on each frame image and the previous frame image, and obtain the difference image corresponding to each frame image.
[0134] In one embodiment, the display module 808 is further configured to: if the target display ratio is greater than the maximum value of a preset magnification ratio range, display a first prompt message, the first prompt message being used to prompt the user to reduce the size of the target display area; if the target display ratio is less than the minimum value of a preset magnification ratio range, display a second prompt message, the second prompt message being used to prompt the user to increase the size of the target display area.
[0135] In one embodiment, the target detection module 806 is further configured to: acquire multiple standard ultrasound section images; annotate the key structural regions and their respective sections in the multiple standard ultrasound section images to obtain corresponding ultrasound structural annotation information; and train an initial detection model based on the multiple standard ultrasound section images and the corresponding ultrasound structural annotation information to obtain a target detection model.
[0136] Each module in the aforementioned adaptive ultrasound video image display scale device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0137] In one embodiment, a computer device is provided, which may be a processor, and its internal structure diagram may be as shown below. Figure 9 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores ultrasound video frames of target ultrasound images. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements an adaptive ultrasound video image display ratio method.
[0138] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0139] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring ultrasound video frames of a target ultrasound image; obtaining an ultrasound sector outline corresponding to each frame image based on motion characteristics between multiple frames in the ultrasound video frame; detecting multiple frames in the ultrasound video frame using a target detection model to determine the target display area and its corresponding cross-section for each frame image; determining the target display ratio of each frame image based on the ratio of the height of the ultrasound sector outline to the height of the target display area, and adjusting the size of the target display area based on the target display ratio and a preset magnification range corresponding to the corresponding cross-section.
[0140] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining an optical flow vector diagram corresponding to each frame of an ultrasound video frame based on each frame image and the previous frame image of each frame image; preprocessing the optical flow vector diagram corresponding to each frame image to obtain a first ultrasound sector outline corresponding to each frame image; processing each frame image and the previous frame image using the inter-frame difference method to obtain a difference image corresponding to each frame image; preprocessing the difference image corresponding to each frame image to obtain a second ultrasound sector outline corresponding to each frame image; and performing superposition processing and contour smoothing processing on the first ultrasound sector outline and the second ultrasound sector outline to obtain an ultrasound sector outline corresponding to each frame image.
[0141] In one embodiment, when the processor executes the computer program, it further performs the following steps: visualizing the optical flow vector image corresponding to each frame image and mapping it to an image of a preset image format to obtain an optical flow visualization image; performing image enhancement processing on the optical flow visualization image to obtain an image-enhanced optical flow visualization image; performing binarization processing and closing operation processing on the image-enhanced optical flow visualization image to obtain an optical flow binary image; and determining the maximum contour in the optical flow binary image as the first ultrasonic sector outline corresponding to each frame image based on the contour size in the optical flow binary image.
[0142] In one embodiment, when the processor executes the computer program, it further performs the following steps: based on each frame image and the previous frame image, calculates the absolute value of the pixel value difference between each frame image and the previous frame image at multiple identical positions, and obtains the difference image corresponding to each frame image.
[0143] In one embodiment, when the processor executes the computer program, it further implements the following steps: if the target display ratio is greater than the maximum value of the preset magnification ratio range, a first prompt message is displayed, the first prompt message being used to prompt the reduction of the target display area; if the target display ratio is less than the minimum value of the preset magnification ratio range, a second prompt message is displayed, the second prompt message being used to prompt the increase of the target display area.
[0144] In one embodiment, when the processor executes the computer program, it further performs the following steps: acquiring multiple standard ultrasound section images; annotating the key structural regions and their respective sections in the multiple standard ultrasound section images to obtain corresponding ultrasound structural annotation information; and training an initial detection model based on the multiple standard ultrasound section images and the corresponding ultrasound structural annotation information to obtain a target detection model.
[0145] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps: acquiring ultrasound video frames of a target ultrasound image; obtaining an ultrasound sector outline corresponding to each frame image based on motion features between multiple frames in the ultrasound video frame; detecting multiple frames in the ultrasound video frame using a target detection model to determine the target display area and its corresponding cross-section for each frame image; determining the target display ratio of each frame image based on the ratio of the height of the ultrasound sector outline to the height of the target display area, and adjusting the size of the target display area based on the target display ratio and a preset magnification range corresponding to the corresponding cross-section.
[0146] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining an optical flow vector diagram corresponding to each frame of an ultrasound video frame based on each frame image and the previous frame image of each frame image; preprocessing the optical flow vector diagram corresponding to each frame image to obtain a first ultrasound sector outline corresponding to each frame image; processing each frame image and the previous frame image using the inter-frame difference method to obtain a difference image corresponding to each frame image; preprocessing the difference image corresponding to each frame image to obtain a second ultrasound sector outline corresponding to each frame image; and performing superposition processing and contour smoothing processing on the first ultrasound sector outline and the second ultrasound sector outline to obtain an ultrasound sector outline corresponding to each frame image.
[0147] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: visualizing the optical flow vector image corresponding to each frame image and mapping it to an image of a preset image format to obtain an optical flow visualization image; performing image enhancement processing on the optical flow visualization image to obtain an image-enhanced optical flow visualization image; performing binarization processing and closing operation processing on the image-enhanced optical flow visualization image to obtain an optical flow binary image; and determining the maximum contour in the optical flow binary image as the first ultrasonic sector outline corresponding to each frame image based on the contour size in the optical flow binary image.
[0148] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: based on each frame image and the previous frame image, calculates the absolute value of the pixel value difference between each frame image and the previous frame image at multiple identical positions, and obtains the difference image corresponding to each frame image.
[0149] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the target display ratio is greater than the maximum value of the preset magnification ratio range, a first prompt message is displayed, the first prompt message being used to prompt the user to reduce the size of the target display area; if the target display ratio is less than the minimum value of the preset magnification ratio range, a second prompt message is displayed, the second prompt message being used to prompt the user to increase the size of the target display area.
[0150] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: acquiring multiple standard ultrasound section images; annotating the key structural regions and their respective sections in the multiple standard ultrasound section images to obtain corresponding ultrasound structural annotation information; and training an initial detection model based on the multiple standard ultrasound section images and the corresponding ultrasound structural annotation information to obtain a target detection model.
[0151] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: acquiring ultrasound video frames of a target ultrasound image; obtaining an ultrasound sector outline corresponding to each frame image based on motion characteristics between multiple frames in the ultrasound video frame; detecting multiple frames in the ultrasound video frame using a target detection model to determine the target display area and its corresponding cross-section for each frame image; determining the target display ratio of each frame image based on the ratio of the height of the ultrasound sector outline to the height of the target display area, and adjusting the size of the target display area based on the target display ratio and a preset magnification range corresponding to the corresponding cross-section.
[0152] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining an optical flow vector diagram corresponding to each frame of an ultrasound video frame based on each frame image and the previous frame image of each frame image; preprocessing the optical flow vector diagram corresponding to each frame image to obtain a first ultrasound sector outline corresponding to each frame image; processing each frame image and the previous frame image using the inter-frame difference method to obtain a difference image corresponding to each frame image; preprocessing the difference image corresponding to each frame image to obtain a second ultrasound sector outline corresponding to each frame image; and performing superposition processing and contour smoothing processing on the first ultrasound sector outline and the second ultrasound sector outline to obtain an ultrasound sector outline corresponding to each frame image.
[0153] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: visualizing the optical flow vector image corresponding to each frame image and mapping it to an image of a preset image format to obtain an optical flow visualization image; performing image enhancement processing on the optical flow visualization image to obtain an image-enhanced optical flow visualization image; performing binarization processing and closing operation processing on the image-enhanced optical flow visualization image to obtain an optical flow binary image; and determining the maximum contour in the optical flow binary image as the first ultrasonic sector outline corresponding to each frame image based on the contour size in the optical flow binary image.
[0154] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: based on each frame image and the previous frame image, calculates the absolute value of the pixel value difference between each frame image and the previous frame image at multiple identical positions, and obtains the difference image corresponding to each frame image.
[0155] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the target display ratio is greater than the maximum value of the preset magnification ratio range, a first prompt message is displayed, the first prompt message being used to prompt the user to reduce the size of the target display area; if the target display ratio is less than the minimum value of the preset magnification ratio range, a second prompt message is displayed, the second prompt message being used to prompt the user to increase the size of the target display area.
[0156] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: acquiring multiple standard ultrasound section images; annotating the key structural regions and their respective sections in the multiple standard ultrasound section images to obtain corresponding ultrasound structural annotation information; and training an initial detection model based on the multiple standard ultrasound section images and the corresponding ultrasound structural annotation information to obtain a target detection model.
[0157] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0158] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0159] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0160] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An ultrasound video image display scale adaptive method, characterized by, The method includes: Acquire ultrasound video frames of the target ultrasound image; Based on the motion characteristics between multiple frames in the ultrasound video frame, the ultrasound sector outline corresponding to each frame image is obtained. The target detection model is used to detect multiple frames of images in the ultrasound video frame to determine the target display area and the corresponding cross section of each frame image; Based on the ratio of the height of the ultrasonic sector outline corresponding to each frame image to the height of the target display area, the target display ratio of each frame image is determined, and the area size of the target display area is adjusted based on the target display ratio and the preset magnification ratio range corresponding to the corresponding cross section. The step of obtaining the ultrasound sector outline corresponding to each frame image based on the motion features between multiple frames in the ultrasound video frame includes: Based on each frame of the ultrasound video frame and the previous frame of each frame, obtain the optical flow vector diagram corresponding to each frame. Preprocess the optical flow vector diagram corresponding to each frame image to obtain the first ultrasonic sector outline corresponding to each frame image; The inter-frame difference method is used to process each frame image and the previous frame image to obtain the difference image corresponding to each frame image; The difference image corresponding to each frame image is preprocessed to obtain the second ultrasonic sector outline corresponding to each frame image; The first and second ultrasonic sector outlines are superimposed and smoothed to obtain the ultrasonic sector outline corresponding to each frame image.
2. The method of claim 1, wherein, The preprocessing of the optical flow vector diagram corresponding to each frame image to obtain the first ultrasonic sector outline corresponding to each frame image includes: The optical flow vector image corresponding to each frame of the image is visualized and mapped to an image in a preset image format to obtain an optical flow visualization image; The optical flow visualization image is subjected to image enhancement processing to obtain the enhanced optical flow visualization image; The enhanced optical flow visualization image is binarized and closed-off to obtain a binary optical flow image. Based on the contour size in the binary optical flow image, the largest contour in the binary optical flow image is determined to be the first ultrasonic sector outline corresponding to each frame image.
3. The method according to claim 1, characterized in that, The step of processing each frame image and the previous frame image using the inter-frame difference method to obtain the difference image corresponding to each frame image includes: Based on each frame image and the previous frame image, the absolute value of the pixel value difference between each frame image and the previous frame image at multiple identical positions is calculated to obtain the difference image corresponding to each frame image.
4. The method according to claim 1, characterized in that, The process of adjusting the size of the target display area based on the target display ratio and the magnification range corresponding to the respective cross-section includes: If the target display ratio is greater than the maximum value of the preset magnification ratio range, a first prompt message is displayed, which is used to prompt the user to reduce the size of the target display area. If the target display ratio is less than the minimum value of the preset magnification ratio range, a second prompt message is displayed, which is used to suggest increasing the size of the target display area.
5. The method according to claim 1, characterized in that, The method for obtaining the target detection model includes: Acquire multiple standard ultrasound cross-sectional images; The key structural regions and their respective sections in the multiple standard ultrasound section images are annotated to obtain the corresponding ultrasound structural annotation information. The initial detection model is trained based on the multiple standard ultrasound cross-sectional images and the corresponding ultrasound structure annotation information to obtain the target detection model.
6. An adaptive ultrasonic video image display ratio device, characterized in that, The device includes: The frame acquisition module is used to acquire ultrasound video frames of the target ultrasound image; The contour acquisition module is used to obtain the ultrasound sector outline corresponding to each frame image based on the motion features between multiple frames in the ultrasound video frame. The target detection module is used to detect multiple frames of images in the ultrasound video frame using a target detection model, and to determine the target display area and the corresponding cross section of each frame image; The display module is used to determine the target display ratio of each frame image based on the ratio of the height of the ultrasonic sector outline corresponding to each frame image to the height of the target display area, so as to adjust the size of the target display area based on the target display ratio and the preset magnification ratio range corresponding to the corresponding section. The contour acquisition module is further configured to: obtain an optical flow vector diagram corresponding to each frame of the ultrasound video frame based on each frame image and the previous frame image of each frame image; preprocess the optical flow vector diagram corresponding to each frame image to obtain a first ultrasound sector outline corresponding to each frame image; process each frame image and the previous frame image using the inter-frame difference method to obtain a difference image corresponding to each frame image; preprocess the difference image corresponding to each frame image to obtain a second ultrasound sector outline corresponding to each frame image; and perform superposition processing and contour smoothing processing on the first ultrasound sector outline and the second ultrasound sector outline to obtain the ultrasound sector outline corresponding to each frame image.
7. The apparatus according to claim 6, characterized in that, The contour acquisition module is further configured to: The optical flow vector image corresponding to each frame of the image is visualized and mapped to an image in a preset image format to obtain an optical flow visualization image; The optical flow visualization image is subjected to image enhancement processing to obtain the enhanced optical flow visualization image; The enhanced optical flow visualization image is binarized and closed-off to obtain a binary optical flow image. Based on the contour size in the binary optical flow image, the largest contour in the binary optical flow image is determined to be the first ultrasonic sector outline corresponding to each frame image.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.