Image cutting method, electronic equipment and storage medium

By determining the vascular orientation information and dense gradient curves in the angiographic image, the image is cropped to remove redundant blood vessels, and the problem of excessive vascular interference in the angiographic image is solved, and the rapid determination of the region of interest is achieved, which improves the efficiency and accuracy of vascular analysis.

CN120013960AActive Publication Date: 2025-05-16UNION STRONG (BEIJING) TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510016616.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-05-16
Estimated Expiration
2045-01-06

AI Technical Summary

Technical Problem

In neurosurgery, excessive vascular interferes with clinical judgment in angiographic images, resulting in difficult automatic selection of the region of interest, slow analysis speed, low efficiency and accuracy.

Method used

By acquiring an angiographic image, a first projected image is determined, and a blood vessel direction information and a blood vessel density gradient curve are determined based on the image, thereby determining a height cutoff position and a second projected image. The horizontal truncation position is determined in the second projection image, and the third projection image is further cropped to obtain the third projection image, which is perpendicular to the projection direction of the first and third projection images. Finally, the horizontal truncation position is determined in the third projection image, the image crop is completed, and the region of interest is determined.

Benefits of technology

It realizes the rapid determination of the region of interest of blood vessels in angiographic images, reduces the range of vascular analysis, speeds up the analysis, and improves efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120013960A_ABST
    Figure CN120013960A_ABST
Patent Text Reader

Abstract

The invention discloses an image cutting method, electronic equipment and a storage medium. The method comprises the following steps: determining a first projection image based on an angiography image; determining blood vessel direction information and a blood vessel dense gradient curve based on the first projection image; determining a height truncation position and a second projection image based on the blood vessel direction information and the blood vessel dense gradient curve; determining a first horizontal truncation position and a second horizontal truncation position in the second projection image; determining a third projection image based on the angiography image, the height truncation position, the first horizontal truncation position and the second horizontal truncation position; determining a third horizontal truncation position and a fourth horizontal truncation position in the third projection image; and cutting the target contrast image based on the height cut-off position, the first horizontal cut-off position, the second horizontal cut-off position, the third horizontal cut-off position and the fourth horizontal cut-off position. By means of the scheme, the blood vessel analysis speed can be increased, and the blood vessel analysis efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application generally relates to the field of image processing technology. More specifically, the present application relates to an image cropping method, an electronic device and a storage medium. Background Art

[0002] During neurosurgery, it is often necessary to scan 3D digital subtraction angiography (3D-DSA) on site as vascular viewing data and plan the surgery based on it. During the surgical planning process, the lesion area and nearby blood vessels need to be analyzed to finally determine the surgical plan. However, too many blood vessels in the angiography image will interfere with clinical judgment. Therefore, for clinical treatment scenarios, the automatic selection of the region of interest (ROI) is very important. Redundant blood vessels can be removed, thereby speeding up the analysis and improving the efficiency and accuracy of the analysis.

[0003] In view of this, there is an urgent need to provide an image cropping method so that the region of interest of the blood vessel can be quickly determined in the angiography image, effectively reducing the scope of blood vessel analysis, speeding up blood vessel analysis, and improving the efficiency and accuracy of blood vessel analysis. Summary of the invention

[0004] In order to at least solve one or more of the above-mentioned technical problems, the present application proposes an image cropping method, an electronic device and a storage medium in multiple aspects. The image cropping method can quickly determine the region of interest of a blood vessel in angiography images, effectively reduce the blood vessel analysis range, speed up the blood vessel analysis, and improve the efficiency and accuracy of blood vessel analysis.

[0005] In a first aspect, the present application provides an image cropping method, comprising: acquiring an angiography image, and determining a first projection image based on the angiography image; determining blood vessel direction information and a blood vessel dense gradient curve based on the first projection image; determining a height cutoff position based on the blood vessel direction information and the blood vessel dense gradient curve, and determining a second projection image based on the height cutoff position and the first projection image; determining a first horizontal cutoff position and a second horizontal cutoff position in a first horizontal direction in the second projection image; determining a third projection image based on the angiography image, the height cutoff position, the first horizontal cutoff position, and the second horizontal cutoff position; wherein the projection directions of the first projection image and the third projection image are perpendicular; determining a third horizontal cutoff position and a fourth horizontal cutoff position in the second horizontal direction in the third projection image; and cropping a target angiography image in the angiography image based on the height cutoff position, the first horizontal cutoff position, the second horizontal cutoff position, the third horizontal cutoff position, and the fourth horizontal cutoff position.

[0006] In some embodiments, determining the blood vessel direction information based on the first projection image includes: performing threshold segmentation on the first projection image to obtain a threshold segmented image; determining the maximum connected domain in the threshold segmented image, and removing the remaining connected domains except the maximum connected domain to obtain a cleaned projection image; extracting a first sampling area and a second sampling area at the top and bottom of the cleaned projection image based on a preset number of sampling pixel rows; and determining the blood vessel direction information based on the first sampling area and the second sampling area.

[0007] In some embodiments, determining the blood vessel direction information based on the first sampling area and the second sampling area includes: respectively determining the blood vessel skeletons in the first sampling area and the second sampling area to obtain a first blood vessel skeleton map corresponding to the first sampling area and a second blood vessel skeleton map corresponding to the second sampling area; respectively determining the skeleton pixels corresponding to the first blood vessel skeleton map and the skeleton pixel sum corresponding to the second blood vessel skeleton map to obtain a first blood vessel quantity parameter corresponding to the first blood vessel skeleton map and a second blood vessel quantity parameter corresponding to the second blood vessel skeleton map; respectively determining the pixel sum of the first sampling area and the second sampling area to obtain a first sampling pixel sum corresponding to the first sampling area and a second sampling pixel sum corresponding to the second sampling area; determining the blood vessel direction information based on the first blood vessel quantity parameter, the second blood vessel quantity parameter, the first sampling pixel sum and the second sampling pixel sum.

[0008] In some embodiments, determining the blood vessel direction information based on the first blood vessel number parameter, the second blood vessel number parameter, the first sampling pixel sum and the second sampling pixel sum includes: determining a first blood vessel ratio parameter based on the first blood vessel number parameter and the first sampling pixel sum; determining a second blood vessel ratio parameter based on the second blood vessel number parameter and the second sampling pixel sum; comparing the first blood vessel ratio parameter and the second blood vessel ratio parameter, and determining the blood vessel direction information based on the comparison result; wherein the blood vessel direction information includes the head end blood vessel direction and the foot end blood vessel direction.

[0009] In some embodiments, determining the blood vessel density gradient curve based on the first projection image includes: performing a blood vessel scan on the first projection image from the foot end blood vessel direction to the head end blood vessel direction to obtain a blood vessel density change curve; and determining the blood vessel density gradient curve based on the blood vessel density change curve.

[0010] In some embodiments, determining the height cutoff position based on the blood vessel direction information and the blood vessel density gradient curve includes: determining the blood vessel density mutation position based on the blood vessel density gradient curve; moving the blood vessel density mutation position toward the head end blood vessel direction based on a preset offset threshold to obtain the height cutoff position.

[0011] In some embodiments, determining the first horizontal truncation position and the second horizontal truncation position in the first horizontal direction in the second projection image includes: scanning pixel rows one by one from the first vertical boundary to the second vertical boundary in the first horizontal direction until the pixel point corresponding to the blood vessel is scanned, and recording the first scanning distance corresponding to each pixel row; using the minimum first scanning distance among the first scanning distances corresponding to each pixel row as the distance between the first horizontal truncation position and the first vertical boundary; scanning pixel rows one by one from the second vertical boundary to the first vertical boundary in the first horizontal direction until the pixel point corresponding to the blood vessel is scanned, and recording the second scanning distance corresponding to each pixel row; using the minimum second scanning distance among the second scanning distances corresponding to each pixel row as the distance between the second horizontal truncation position and the second vertical boundary.

[0012] In some embodiments, determining the third projection image based on the angiography image, the height cutoff position, the first horizontal cutoff position and the second horizontal cutoff position includes: cutting out an intermediate angiography image from the angiography image based on the height cutoff position, the first horizontal cutoff position and the second horizontal cutoff position; and projecting the intermediate angiography image to obtain the third projection image.

[0013] In a second aspect, the present application provides an electronic device, comprising: a processor; and a memory, on which executable codes are stored, and when the program codes are executed by the processor, the electronic device implements the method as described above.

[0014] In a third aspect, the present application provides a non-transitory machine-readable storage medium having executable code stored thereon, and when the program code is executed by a processor, the method as described above is implemented.

[0015] The technical solution provided by this application may have the following beneficial effects:

[0016] The image cropping method, electronic device and storage medium provided by the present application obtain an angiography image, determine a first projection image based on the angiography image, determine blood vessel direction information and a blood vessel dense gradient curve based on the first projection image, determine a height cutoff position based on the blood vessel direction information and the blood vessel dense gradient curve, and determine a second projection image based on the height cutoff position and the first projection image, thereby removing some redundant blood vessels in the height direction. Then, a first horizontal cutoff position and a second horizontal cutoff position in the first horizontal direction are determined in the second projection image, thereby removing some redundant blood vessels in the first horizontal direction.

[0017] Furthermore, the present application can determine a third projection image based on the angiography image, the height cutoff position, the first horizontal cutoff position, and the second horizontal cutoff position, wherein the projection directions of the first projection image and the third projection image are perpendicular, and then determine the third horizontal cutoff position and the fourth horizontal cutoff position in the second horizontal direction in the third projection image, so that redundant blood vessels in the second horizontal direction can be removed. Then, based on the height cutoff position, the first horizontal cutoff position, the second horizontal cutoff position, the third horizontal cutoff position, and the fourth horizontal cutoff position, the target angiography image is obtained by cutting out the target angiography image from the original angiography image, and determining the region of interest for vascular analysis.

[0018] In general, the present application can quickly determine the region of interest of the blood vessel in the angiography image, effectively reduce the scope of blood vessel analysis, speed up blood vessel analysis, and improve the efficiency and accuracy of blood vessel analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0020] Figure 1 An exemplary flow chart of an image cropping method according to some embodiments of the present application is shown;

[0021] Figure 2 An exemplary flow chart showing an image cropping method according to some other embodiments of the present application is shown;

[0022] Figure 3 An exemplary flow chart of an image cropping method according to some further embodiments of the present application is shown;

[0023] Figure 4 A schematic diagram of a first projection image in an image cropping method according to an embodiment of the present application is shown;

[0024] Figure 5 A schematic diagram showing a threshold value segmentation image in the image cropping method of an embodiment of the present application is shown;

[0025] Figure 6 A schematic diagram showing a third projection image in the image cropping method of an embodiment of the present application is shown;

[0026] Figure 7 A schematic diagram showing a first sampling area in the image cropping method of an embodiment of the present application is shown;

[0027] Figure 8A schematic diagram showing a second sampling area in the image cropping method of an embodiment of the present application is shown;

[0028] Fig. 9 A schematic diagram showing a first blood vessel skeleton image corresponding to a first sampling area in an image cropping method according to an embodiment of the present application is shown;

[0029] Fig.10 A schematic diagram showing a second blood vessel skeleton image corresponding to a second sampling area in an image cropping method according to an embodiment of the present application is shown;

[0030] Fig.11 A schematic diagram showing a blood vessel scan performed on a first projection image in an image cropping method according to an embodiment of the present application is shown;

[0031] Fig.12 A schematic diagram showing a blood vessel density variation curve in an image cropping method according to an embodiment of the present application is shown;

[0032] Fig.13 A schematic diagram of a blood vessel dense gradient curve in an image cropping method according to an embodiment of the present application is shown;

[0033] Fig.14 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. For the simplicity and clarity of the description, the figure marks may be repeated in the drawings to indicate corresponding or similar elements when deemed appropriate. In addition, the present application sets forth many specific details in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein may be practiced without these specific details. In other cases, well-known methods, processes, and components are not described in detail to avoid blurring the embodiments described herein. Moreover, the description should not be regarded as limiting the scope of the embodiments described herein. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0035] It should be understood that the possible terms "first" or "second" etc. in the claims, specifications and drawings disclosed in this application are used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of this application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.

[0036] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this application specification and claims, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms. It should also be further understood that the term "and / or" used in this application specification and claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0037] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0038] During neurosurgery, it is often necessary to scan 3D digital subtraction angiography (3D-DSA) on site as vascular viewing data and plan the surgery based on it. During the surgical planning process, the lesion area and nearby blood vessels need to be analyzed to finally determine the surgical plan. However, too many blood vessels in the angiography image will interfere with clinical judgment. Therefore, for clinical treatment scenarios, the automatic selection of the region of interest (ROI) is very important. Redundant blood vessels can be removed, thereby speeding up the analysis and improving the efficiency and accuracy of the analysis.

[0039] In view of this, there is an urgent need to provide an image cropping method so that the region of interest of the blood vessel can be quickly determined in the angiography image, effectively reducing the scope of blood vessel analysis, speeding up blood vessel analysis, and improving the efficiency and accuracy of blood vessel analysis.

[0040] The specific implementation of the present application is described in detail below with reference to the accompanying drawings.

[0041] Figure 1 An exemplary flow chart of an image cropping method according to some embodiments of the present application is shown. Figure 4 A schematic diagram of a first projection image in an image cropping method according to an embodiment of the present application is shown. Figure 6 A schematic diagram showing a third projection image in the image cropping method of an embodiment of the present application is shown. Figure 1 , Figure 4 and Figure 6, the image cropping method shown in the embodiment of the present application may include:

[0042] In step S101, an angiographic image is acquired, and a first projection image is determined based on the angiographic image. In the embodiment of the present application, the angiographic image is a three-dimensional image formed after a three-dimensional digital subtraction angiography (3D-DSA, 3D-Digital Subtraction Angiography) scan, which can provide more detailed vascular structure information, making the observation of the blood vessels more intuitive and detailed, and helping doctors to diagnose and treat vascular-related diseases more accurately.

[0043] In addition, the embodiment of the present application can use Maximum Intensity Projection (MIP) to perform coronal plane (a term commonly used in medical imaging and anatomy, referring to a section along the left and right direction of the human body that cuts the human body into two parts, front and back) projection processing on the angiography image, so as to obtain the following: Figure 4 The first projection image is shown. The maximum intensity projection processes the volume data and projects the pixel with the maximum intensity to form a two-dimensional image, which can better reflect the difference in tissue density and make the abnormal changes, morphology, deformation and enhancement of blood vessels visible.

[0044] In step S102, blood vessel direction information and blood vessel density gradient curve are determined based on the first projection image. In the embodiment of the present application, the aforementioned blood vessel direction information refers to the direction of the end of the human body to which the blood vessel in the first projection image is close, such as the direction close to the head end or the direction close to the foot end. Figure 4 As shown, through calculation processing, it can be determined that the blood vessels at the top of the first projection image belong to the direction close to the head end, while the blood vessels at the bottom of the first projection image belong to the direction close to the foot end.

[0045] In addition, the vascular density gradient curve of the embodiment of the present application is used to reflect the change trend and change amplitude of the vascular density on each pixel row in the first projection image. In the anterior circulation (internal carotid artery blood supply system), the position with the largest gradient in the vascular density gradient curve is generally the bifurcation of the internal carotid artery (ICA), and in the posterior circulation (vertebral basilar artery system), the position with the largest gradient in the vascular density gradient curve is generally the position of the basilar artery tip. It can be understood that the position with the largest gradient in the vascular density gradient curve needs to be determined based on the actual vascular density gradient curve, and the present application does not impose any restrictions on the position with the largest gradient in the vascular density gradient curve.

[0046] In step S103, the height cutoff position is determined based on the blood vessel direction information and the blood vessel density gradient curve, and the second projection image is determined based on the height cutoff position and the first projection image. In the embodiment of the present application, the position with the largest gradient can be used as the key point position, that is, the position where the blood vessel density changes suddenly, and then the blood vessel direction information can be used to adjust the position based on the key point position to determine the height cutoff position.

[0047] For example, the first projection image is Figure 4 In the image shown, the current surgical plan requires treatment of the lesion located in the heart artery. Then, the key point position in the first projection image can be used as the starting point, and the key point position can be moved a certain distance toward the head end (i.e., the direction of the top of the image) to avoid the loss of image information due to cropping, for example, 20mm. Then, the position after the key point is moved is the height cutoff position. After determining the height cutoff position, the image from the height cutoff position to the top of the image in the first projection image can be cropped to obtain the second projection image.

[0048] For example, the first projection image is Figure 4 The image shown is contrary to the above exemplary description. In the current surgical plan, the lesion located at the head and neck needs to be treated. Then, the key point position in the first projection image can be used as the starting point, and the key point position can be moved a certain distance, such as 30 mm, toward the foot end (i.e., the bottom of the image). Then, the position of the key point after the movement is the height cutoff position. After determining the height cutoff position, the image from the height cutoff position to the bottom of the image in the first projection image can be cut off to obtain the second projection image.

[0049] In step S104, a first horizontal truncation position and a second horizontal truncation position in the first horizontal direction are determined in the second projection image. In the embodiment of the present application, the aforementioned first horizontal direction refers to the horizontal direction in the projection direction of the first projection image. For example, if the projection direction of the first projection image is the coronal plane projection direction, then the first horizontal direction is the left-right horizontal direction of the human body. Furthermore, the first horizontal truncation position and the second horizontal truncation position can be determined by detecting the boundary of the blood vessel range.

[0050] In step S105, the third projection image is determined based on the angiography image, the height cutoff position, the first horizontal cutoff position, and the second horizontal cutoff position. In an embodiment of the present application, the projection directions of the first projection image and the third projection image are perpendicular. Assuming that the projection direction of the first projection image is the coronal plane projection direction, the projection direction of the third projection image can be the sagittal plane (Sagittal plane, a term commonly used in medical imaging and anatomy, refers to the anatomical plane that divides the human body into two left and right parts along the front-to-back direction of the human body) projection. In this case, when the height cutoff position, the first horizontal cutoff position, and the second horizontal cutoff position are determined, a rectangular stereoscopic image can be cut out from the angiography image. The length of the rectangular stereoscopic image is the distance in the front-to-back direction of the human body, the width is the distance between the first horizontal cutoff position and the second horizontal cutoff position, and the height is the distance from the height cutoff position to the top or bottom of the image of the first projection image. The rectangular stereoscopic image can then be projected in the sagittal plane, and the projection method can also use maximum intensity projection, so as to obtain the following: Figure 6 The third projection image is shown.

[0051] In step S106, a third horizontal truncation position and a fourth horizontal truncation position in the second horizontal direction are determined in the third projection image. In the embodiment of the present application, the aforementioned second horizontal direction refers to the horizontal direction in the projection direction of the third projection image. For example, if the projection direction of the third projection image is the sagittal plane projection direction, then the second horizontal direction is the front-back horizontal direction of the human body. Furthermore, the third horizontal truncation position and the fourth horizontal truncation position can be determined by detecting the boundary of the blood vessel range.

[0052] In step S107, a target angiography image is cut out from the angiography image based on the height cutoff position, the first horizontal cutoff position, the second horizontal cutoff position, the third horizontal cutoff position, and the fourth horizontal cutoff position. When the height cutoff position, the first horizontal cutoff position, the second horizontal cutoff position, the third horizontal cutoff position, and the fourth horizontal cutoff position are determined, a stereoscopic image can be cut out from the angiography image. The length of the rectangular stereoscopic image is the distance between the third horizontal cutoff position and the fourth horizontal cutoff position, the width is the distance between the first horizontal cutoff position and the second horizontal cutoff position, and the height is the distance from the height cutoff position to the top image or the bottom image of the first projection image. This stereoscopic image can be used as a target angiography image for subsequent vascular analysis.

[0053] The embodiment of the present application obtains an angiography image, determines a first projection image based on the angiography image, determines blood vessel direction information and a blood vessel dense gradient curve based on the first projection image, determines a height cutoff position based on the blood vessel direction information and the blood vessel dense gradient curve, and determines a second projection image based on the height cutoff position and the first projection image, thereby removing some redundant blood vessels in the height direction. Then, the first horizontal cutoff position and the second horizontal cutoff position in the first horizontal direction are determined in the second projection image, thereby removing some redundant blood vessels in the first horizontal direction. Further, the present application can determine a third projection image based on the angiography image, the height cutoff position, the first horizontal cutoff position and the second horizontal cutoff position, wherein the projection directions of the first projection image and the third projection image are perpendicular, and then the third horizontal cutoff position and the fourth horizontal cutoff position in the second horizontal direction are determined in the third projection image, thereby removing some redundant blood vessels in the second horizontal direction. Then, based on the height cutoff position, the first horizontal cutoff position, the second horizontal cutoff position, the third horizontal cutoff position and the fourth horizontal cutoff position, the target angiography image is cut out from the original angiography image, and the region of interest for vascular analysis is determined. In general, the present application can quickly determine the region of interest of the blood vessel in the angiography image, effectively reduce the range of blood vessel analysis, speed up blood vessel analysis, and improve the efficiency and accuracy of blood vessel analysis.

[0054] In some embodiments, the process of determining the blood vessel direction information and the blood vessel density gradient curve can be further designed. Figure 2 , Figures 5 to 13 The process of determining the vascular direction information and the vascular density gradient curve is described in detail. Figure 2 , Figures 5 to 13 , the image cropping method shown in the embodiment of the present application may include:

[0055] In step S201, the first projection image is subjected to threshold segmentation to obtain a threshold segmented image. In the embodiment of the present application, the first projection image can be subjected to threshold segmentation by using a fixed threshold or by using the Otsu method to perform automatic threshold segmentation, thereby obtaining the following: Figure 5 The threshold segmentation image shown in the figure. If a fixed threshold is used, the segmentation threshold needs to be set in advance. The Otsu's Method, also known as the maximum inter-class variance method, is an adaptive image threshold segmentation method. The core idea of ​​this method is to automatically segment the image into background and foreground (target) parts according to the grayscale distribution of the image, so as to maximize the inter-class variance between the segmented foreground and background, thereby achieving the best edge segmentation.

[0056] It is understandable that there are various ways of threshold segmentation. In practical applications, a suitable threshold segmentation method needs to be determined according to the actual application situation. This application does not impose any restrictions in this regard.

[0057] In step S202, the maximum connected domain is determined in the threshold segmentation image, and the remaining connected domains except the maximum connected domain are removed to obtain a cleaned projection image. In an embodiment of the present application, the connectedComponents function in the OpenCV library can be used exemplarily to mark the connected domains of the threshold segmentation image, and a unique label is assigned to each connected domain. Furthermore, the connectedComponentsWithStats function in the OpenCV library can be used exemplarily to obtain the statistical information of each connected domain, including the area of ​​each connected domain, so that the remaining connected domains except the maximum connected domain can be removed according to the area of ​​each connected domain to obtain a cleaned projection image.

[0058] In step S203, a first sampling area and a second sampling area are extracted at the top and bottom of the cleaning projection image respectively based on a preset number of sampling pixel rows. Figure 7 and Figure 8 As shown, M rows of pixels can be extracted from the top of the image to the bottom of the image in the cleaned projection image to obtain a first sampling area. Similarly, M rows of pixels can be extracted from the bottom of the image to the top of the image in the cleaned projection image to obtain a second sampling area. Wherein, M is a positive integer. In an embodiment of the present application, the preset number of sampling pixel rows M can be set to 20 rows by way of example. In actual applications, the preset number of sampling pixel rows M needs to be reasonably set according to the actual application situation. The present application does not impose any restrictions in this regard.

[0059] In step S204, the blood vessel direction information is determined based on the first sampling area and the second sampling area. In the embodiment of the present application, the blood vessel skeletons in the first sampling area and the second sampling area can be determined respectively, and the following can be obtained: Fig. 9 and Fig.10 The first blood vessel skeleton image corresponding to the first sampling area and the second blood vessel skeleton image corresponding to the second sampling area are shown. The blood vessel skeletons in the first sampling area and the second sampling area can be determined by thinning operation. The purpose of the thinning operation is to reduce the object boundary pixels in the binary image of the object to one pixel width while maintaining the shape features of the object in the image. Exemplarily, the thinning can be achieved by erosion and dilation operations, by iteratively corroding the image and then performing an XOR operation with the original image to gradually thin the image.

[0060] Then, the skeleton pixels corresponding to the first blood vessel skeleton image and the skeleton pixels corresponding to the second blood vessel skeleton image can be determined respectively to obtain a first blood vessel quantity parameter corresponding to the first blood vessel skeleton image and a second blood vessel quantity parameter corresponding to the second blood vessel skeleton image. The skeleton pixels corresponding to the first blood vessel skeleton image can be calculated as the first blood vessel quantity parameter corresponding to the first blood vessel skeleton image, and the skeleton pixels corresponding to the second blood vessel skeleton image can be calculated as the second blood vessel quantity parameter corresponding to the second blood vessel skeleton image.

[0061] Next, the pixel sums of the first sampling area and the second sampling area are determined respectively to obtain the first sampling pixel sum corresponding to the first sampling area and the second sampling pixel sum corresponding to the second sampling area.

[0062] Furthermore, the blood vessel direction information is determined based on the first blood vessel number parameter, the second blood vessel number parameter, the first sampling pixel sum, and the second sampling pixel sum. In the embodiment of the present application, the first blood vessel ratio parameter can be determined based on the first blood vessel number parameter and the first sampling pixel sum. Specifically, the first blood vessel ratio parameter can be calculated by the following formula 1:

[0063]

[0064] Among them, ratio 1 is the first vessel ratio parameter, S 1 is the first sampled pixel and, N 1 is the first blood vessel number parameter.

[0065] Similarly, the second blood vessel ratio parameter may be determined based on the second blood vessel number parameter and the second sampling pixel sum. Specifically, the second blood vessel ratio parameter may be calculated using the following formula 2:

[0066]

[0067] Among them, ratio 2 is the second vessel ratio parameter, S 2 is the second sampled pixel and, N 2 is the second blood vessel number parameter.

[0068] Furthermore, the first blood vessel ratio parameter and the second blood vessel ratio parameter can be compared, and the blood vessel direction information can be determined based on the comparison result. The blood vessel direction information includes the head end blood vessel direction and the foot end blood vessel direction. It can be understood that if the first blood vessel ratio parameter is smaller than the second blood vessel ratio parameter, when the first sampling pixel sum is the same as the second sampling pixel sum (because the number of pixel row sampling rows in the first sampling area and the second sampling area is consistent), then it means that the first blood vessel ratio parameter is greater than the second blood vessel number parameter, that is, the number of blood vessels in the first sampling area is greater than the number of blood vessels in the second sampling area, then it can be said that the first sampling area is the head end blood vessel direction (because there are more branch blood vessels near the head and neck), and the second sampling area is the foot end blood vessel direction (because there are mostly thick trunk blood vessels near the heart).

[0069] In step S205, a blood vessel density gradient curve is determined based on the first projection image. Fig.11 As shown, the first projection image can be scanned for blood vessels from the foot end blood vessels to the head end blood vessels, and the blood vessel pixels and corresponding to all pixel rows are counted, so as to convert and generate the following Fig.12 The blood vessel density change curve shown in the figure has a horizontal axis representing the pixel row number and a vertical axis representing the sum of blood vessel pixels, thereby reflecting the change in blood vessel density from the foot end blood vessel direction to the head end blood vessel direction.

[0070] Furthermore, a blood vessel density gradient curve can be determined based on the blood vessel density variation curve. The blood vessel density variation curve is converted into a blood vessel density gradient curve, so as to reflect the variation trend and variation range of the blood vessel density from the foot end blood vessel direction to the head end blood vessel direction.

[0071] In some embodiments, the determination process of the target contrast image can be further designed. Figure 3 The process of determining the target angiography image is described in detail. Figure 3 An exemplary flow chart showing the image cropping method of some other embodiments of the present application is shown in FIG. Figure 3 , the image cropping method shown in the embodiment of the present application may include:

[0072] In step S301, the position of the sudden change in blood vessel density is determined based on the blood vessel density gradient curve. In the embodiment of the present application, the pixel row corresponding to the position with the largest gradient in the blood vessel density gradient curve is taken as the key point position, and the blood vessel position at this pixel row is the position of the sudden change in blood vessel density. It can be understood that this sudden change in blood vessel density can be used as a dividing position to distinguish the blood vessel direction at the foot end from the blood vessel direction at the head end.

[0073] In step S302, the position of the sudden change in vascular density is moved toward the head end blood vessel based on a preset offset threshold to obtain a height cutoff position and determine a second projection image based on the height cutoff position and the first projection image. In the application scenario of treating lesions located in the cardiac artery, the position of the sudden change in vascular density in the cleaning projection image can be used as a starting point, and the position of the sudden change in vascular density can be moved a certain distance, such as 20 mm, toward the head end (i.e., the direction of the top of the image in the cleaning projection image) to avoid image information loss due to cutting. The position of the sudden change in vascular density can be used as the height cutoff position. After determining the height cutoff position, the image from the height cutoff position to the top of the image in the cleaning projection image can be cut off to obtain the second projection image.

[0074] In step S303, a first horizontal truncation position and a second horizontal truncation position in the first horizontal direction are determined in the second projection image. In the embodiment of the present application, pixel rows may be scanned one by one from the first vertical boundary to the second vertical boundary in the first horizontal direction until the pixel point corresponding to the blood vessel is scanned, and the first scanning distance corresponding to each pixel row is recorded, and then the minimum first scanning distance among the first scanning distances corresponding to each pixel row is used as the distance between the first horizontal truncation position and the first vertical boundary, wherein the first vertical boundary is a vertical image edge of the second projection image, in other words, the position at which the distance from the first vertical boundary is the minimum first scanning distance is the first horizontal truncation position. Then, pixel rows may be scanned one by one in the first horizontal direction from the second vertical boundary to the first vertical boundary until the pixel point corresponding to the blood vessel is scanned, and the second scanning distance corresponding to each pixel row is recorded. Then, the minimum second scanning distance among the second scanning distances corresponding to each pixel row is used as the distance between the second horizontal truncation position and the second vertical boundary, wherein the second vertical boundary is another vertical image edge of the second projection image. In other words, the position at which the distance from the second vertical boundary is the minimum second scanning distance is the second horizontal truncation position.

[0075] In step S304, a third projection image is determined based on the angiography image, the height cutoff position, the first horizontal cutoff position, and the second horizontal cutoff position. In an embodiment of the present application, an intermediate angiography image can be cut out from the angiography image based on the height cutoff position, the first horizontal cutoff position, and the second horizontal cutoff position. It can be understood that when the height cutoff position, the first horizontal cutoff position, and the second horizontal cutoff position are determined, a rectangular stereoscopic image can be cut out from the angiography image, and the rectangular stereoscopic image is the intermediate angiography image. The length of the intermediate angiography image is the distance in the front-to-back direction of the human body, the width is the distance between the first horizontal cutoff position and the second horizontal cutoff position, and the height is the distance from the height cutoff position to the top or bottom of the image of the first projection image. The intermediate angiography image can then be projected, and the projection method can also adopt maximum intensity projection, so as to obtain the following. Figure 6 The third projection image is shown.

[0076] In step S305, the third horizontal truncation position and the fourth horizontal truncation position in the second horizontal direction are determined in the third projection image. Similar to step S303, the pixel rows may be scanned one by one from the third vertical boundary to the fourth vertical boundary in the second horizontal direction until the pixel point corresponding to the blood vessel is scanned, and the third scanning distance corresponding to each pixel row is recorded, and then the smallest third scanning distance among the third scanning distances corresponding to each pixel row is used as the distance between the third horizontal truncation position and the third vertical boundary, wherein the third vertical boundary is a vertical image edge of the third projection image. In other words, the position with the smallest third scanning distance from the third vertical boundary is the third horizontal truncation position. Then, the pixel rows can be scanned one by one from the fourth vertical boundary to the third vertical boundary in the second horizontal direction until the pixel point corresponding to the blood vessel is scanned, and the fourth scanning distance corresponding to each pixel row is recorded. Then, the smallest fourth scanning distance among the fourth scanning distances corresponding to each pixel row is used as the distance between the fourth horizontal truncation position and the fourth vertical boundary, wherein the fourth vertical boundary is another vertical image edge of the third projection image. In other words, the position with the smallest fourth scanning distance from the fourth vertical boundary is the fourth horizontal truncation position.

[0077] In step S306, a target angiography image is obtained by cutting out the angiography image based on the height cutoff position, the first horizontal cutoff position, the second horizontal cutoff position, the third horizontal cutoff position, and the fourth horizontal cutoff position. In the embodiment of the present application, the content of step S306 is substantially the same as that of step S107, and will not be described in detail here.

[0078] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides an electronic device for executing an image cropping method and corresponding embodiments.

[0079] Fig.14 FIG. 1 is a block diagram showing a hardware configuration of an electronic device 1400 that can implement the image cropping method of an embodiment of the present application. Fig.14 As shown, the electronic device 1400 may include a processor 1410 and a memory 1420. Fig.14 In the electronic device 1400, only the components related to this embodiment are shown. Therefore, it is obvious to those skilled in the art that the electronic device 1400 may also include Fig.14 The components shown in the figure are different from the common components. For example: fixed-point arithmetic units.

[0080] The electronic device 1400 may correspond to a computing device having various processing functions, for example, a function for generating a neural network, training or learning a neural network, quantizing a floating-point neural network to a fixed-point neural network, or retraining a neural network. For example, the electronic device 1400 may be implemented as various types of devices, such as a personal computer (PC), a server device, a mobile device, etc.

[0081] The processor 1410 controls all functions of the electronic device 1400. For example, the processor 1410 controls all functions of the electronic device 1400 by executing a program stored in the memory 1420 on the electronic device 1400. The processor 1410 may be implemented by a central processing unit (CPU), a graphics processing unit (GPU), an application processor (AP), an artificial intelligence processor chip (IPU), etc. provided in the electronic device 1400. However, the present application is not limited thereto.

[0082] In some embodiments, the processor 1410 may include an input / output (I / O) unit 1411 and a computing unit 1412. The I / O unit 1411 may be used to receive various data, such as angiography images. Exemplarily, the calculation unit 1412 may be used to determine a first projection image based on the angiography image received via the I / O unit 1411; determine blood vessel direction information and a blood vessel dense gradient curve based on the first projection image; determine a height cutoff position based on the blood vessel direction information and the blood vessel dense gradient curve, and determine a second projection image based on the height cutoff position and the first projection image; determine a first horizontal cutoff position and a second horizontal cutoff position in the first horizontal direction in the second projection image; determine a third projection image based on the angiography image, the height cutoff position, the first horizontal cutoff position, and the second horizontal cutoff position; wherein the projection directions of the first projection image and the third projection image are perpendicular; determine a third horizontal cutoff position and a fourth horizontal cutoff position in the second horizontal direction in the third projection image; and cut out a target angiography image based on the height cutoff position, the first horizontal cutoff position, the second horizontal cutoff position, the third horizontal cutoff position, and the fourth horizontal cutoff position in the angiography image. This target angiography image may be output by the I / O unit 1411, for example. The output data may be provided to the memory 1420 for reading and use by other devices (not shown), or may be directly provided to other devices for use.

[0083] The memory 1420 is hardware for storing various data processed in the electronic device 1400. For example, the memory 1420 can store processed data and data to be processed in the electronic device 1400. The memory 1420 can store data sets involved in the image cropping method process that has been processed or to be processed by the processor 1410, such as angiography images, etc. In addition, the memory 1420 can store applications, drivers, etc. to be driven by the electronic device 1400. For example: the memory 1420 can store various programs related to the image cropping method to be executed by the processor 1410. The memory 1420 can be a DRAM, but the present application is not limited thereto. The memory 1420 can include at least one of a volatile memory or a non-volatile memory. The non-volatile memory can include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, a phase change RAM (PRAM), a magnetic RAM (MRAM), a resistive RAM (RRAM), a ferroelectric RAM (FRAM), etc. The volatile memory may include dynamic RAM (DRAM), static RAM (SRAM), synchronous DRAM (SDRAM), PRAM, MRAM, RRAM, ferroelectric RAM (FeRAM), etc. In an embodiment, the memory 1420 may include at least one of a hard disk drive (HDD), a solid state drive (SSD), a high-density flash memory (CF), a secure digital (SD) card, a micro secure digital (Micro-SD) card, a mini secure digital (Mini-SD) card, an extreme digital (xD) card, caches, or a memory stick.

[0084] In summary, the specific functions implemented by the memory 1420 and the processor 1410 of the electronic device 1400 provided in the implementation mode of this specification can be explained in comparison with the aforementioned implementation modes in this specification, and can achieve the technical effects of the aforementioned implementation modes, and will not be repeated here.

[0085] In this embodiment, the processor 1410 may be implemented in any suitable manner. For example, the processor 1410 may take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc.

[0086] It should also be understood that any module, unit, component, server, computer, terminal or device that executes instructions exemplified herein may include or otherwise access computer-readable media, such as storage media, computer storage media or data storage devices (removable and / or non-removable) such as disks, optical disks or tapes. Computer storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules or other data.

[0087] Although multiple embodiments of the present application have been shown and described herein, it is obvious to those skilled in the art that such embodiments are provided only by way of example. Those skilled in the art can think of many changes, modifications and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein can be adopted. The attached claims are intended to limit the scope of protection of the present application, and therefore cover equivalents or alternatives within the scope of these claims.

Claims

1. An image cropping method, characterized in that: include: Acquire an angiographic image, and determine a first projection image based on the angiographic image; Determine blood vessel direction information and a blood vessel density gradient curve based on the first projection image; determining a height cutoff position based on the blood vessel direction information and the blood vessel dense gradient curve, and determining a second projection image based on the height cutoff position and the first projection image; determining a first horizontal truncation position and a second horizontal truncation position in a first horizontal direction in the second projection image; Determine a third projection image based on the angiography image, the height cutoff position, the first horizontal cutoff position, and the second horizontal cutoff position; wherein the projection directions of the first projection image and the third projection image are perpendicular; determining a third horizontal truncation position and a fourth horizontal truncation position in the second horizontal direction in the third projection image; A target angiography image is obtained by cutting out the angiography image based on the height cutoff position, the first horizontal cutoff position, the second horizontal cutoff position, the third horizontal cutoff position, and the fourth horizontal cutoff position.

2. The image cropping method according to claim 1, characterized in that: Determining the blood vessel direction information based on the first projection image includes: Performing threshold segmentation on the first projection image to obtain a threshold segmentation image; Determine the largest connected domain in the threshold segmented image, and remove the remaining connected domains except the largest connected domain to obtain a cleaned projection image; Extracting a first sampling area and a second sampling area at the top and bottom of the cleaning projection image respectively based on a preset number of sampling pixel rows; The blood vessel direction information is determined based on the first sampling area and the second sampling area.

3. The image cropping method according to claim 2, characterized in that: The determining the blood vessel direction information based on the first sampling area and the second sampling area comprises: Determine the blood vessel skeletons in the first sampling area and the second sampling area respectively, and obtain a first blood vessel skeleton image corresponding to the first sampling area and a second blood vessel skeleton image corresponding to the second sampling area; respectively determining the skeleton pixels corresponding to the first blood vessel skeleton image and the skeleton pixels corresponding to the second blood vessel skeleton image, and obtaining a first blood vessel quantity parameter corresponding to the first blood vessel skeleton image and a second blood vessel quantity parameter corresponding to the second blood vessel skeleton image; Determine the pixel sum of the first sampling area and the second sampling area respectively, and obtain a first sampling pixel sum corresponding to the first sampling area and a second sampling pixel sum corresponding to the second sampling area; The blood vessel direction information is determined based on the first blood vessel number parameter, the second blood vessel number parameter, the first sampling pixel sum, and the second sampling pixel sum.

4. The image cutting method according to claim 3, characterized in that: The determining the blood vessel direction information based on the first blood vessel number parameter, the second blood vessel number parameter, the first sampling pixel sum, and the second sampling pixel sum comprises: determining a first blood vessel ratio parameter based on the first blood vessel number parameter and the first sampling pixels; determining a second blood vessel ratio parameter based on the second blood vessel number parameter and the second sampling pixel sum; The first blood vessel ratio parameter and the second blood vessel ratio parameter are compared, and the blood vessel direction information is determined based on the comparison result; wherein the blood vessel direction information includes the head end blood vessel direction and the foot end blood vessel direction.

5. The image cropping method according to claim 4, characterized in that: Determining a blood vessel density gradient curve based on the first projection image includes: Performing a blood vessel scan on the first projection image from the blood vessel direction at the foot end to the blood vessel direction at the head end to obtain a blood vessel density variation curve; The blood vessel density gradient curve is determined based on the blood vessel density variation curve.

6. The image cropping method according to claim 4, characterized in that: The determining of the height cutoff position based on the blood vessel direction information and the blood vessel dense gradient curve comprises: Determining a position of a sudden change in blood vessel density based on the blood vessel density gradient curve; The blood vessel density mutation position is moved toward the head end blood vessel based on a preset offset threshold to obtain the height cutoff position.

7. The image cropping method according to claim 1, characterized in that: The determining of a first horizontal truncation position and a second horizontal truncation position in a first horizontal direction in the second projection image comprises: Scanning pixel rows one by one from the first vertical boundary to the second vertical boundary in the first horizontal direction until a pixel point corresponding to the blood vessel is scanned, and recording a first scanning distance corresponding to each pixel row; Using the smallest first scanning distance among the first scanning distances corresponding to each pixel row as the distance between the first horizontal truncation position and the first vertical boundary; Scanning pixel rows one by one from the second vertical boundary to the first vertical boundary in the first horizontal direction until a pixel point corresponding to the blood vessel is scanned, and recording a second scanning distance corresponding to each pixel row; The shortest second scanning distance among the second scanning distances corresponding to each pixel row is used as the distance between the second horizontal truncation position and the second vertical boundary.

8. The image cropping method according to claim 1, characterized in that: The determining of the third projection image based on the angiography image, the height cutoff position, the first horizontal cutoff position and the second horizontal cutoff position comprises: Cutting out an intermediate angiography image from the angiography image based on the height cutoff position, the first horizontal cutoff position, and the second horizontal cutoff position; The intermediate contrast image is projected to obtain the third projection image.

9. An electronic device, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 8.

10. A non-transitory machine-readable storage medium having executable codes stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and apparatus for positioning interested area in medical image, and system thereof

    CN107545584A

  • Cerebrovascular atlas construction method

    CN111986101A

  • Three-dimensional blood vessel modeling method and device

    CN112184888A

  • Automatic lung lobe segmentation method based on pulmonary blood vessel clustering

    CN118297973A

  • Systems and methods for displaying region of interest on multi-plane reconstruction image

    US20210201066A1