Blood vessel image extraction method, device, equipment and storage medium
By segmenting and connecting the target image in the region, vascular images are extracted, which solves the problem of slow vascular image extraction speed in the prior art, and achieves more efficient vascular image extraction.
Patent Information
- Application Number
- CN202210332192.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2042-03-30
AI Technical Summary
The existing vascular image extraction methods are complex in calculations, resulting in slow extraction speed.
By performing area segmentation and area communication on the target image, the target communication area is acquired and processed to extract the blood vessel image.
The extraction speed of blood vessel images is improved and the complex problem of algorithm calculation in the prior art is solved.
Smart Images

Figure CN114693641B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to a method, device, equipment and storage medium for extracting a vascular image. Background Art
[0002] Currently, doctors can diagnose various vascular diseases through vascular imaging technologies such as Computed Tomography Angiography (CTA). Before diagnosis, it is necessary to separate the vascular image from the image of other tissues and extract the vascular image to facilitate further observation and analysis of the vascular image.
[0003] The current method for extracting blood vessel images is to manually determine the starting point of the blood vessel, calculate the Dijkstra distance between the starting points, and then mark the blood vessel region of interest with the distance as the center. Finally, the graph cut algorithm is used to optimize the boundary of the region of interest to achieve blood vessel image extraction. However, this method is relatively complex in calculation, resulting in a slow blood vessel image extraction speed. Summary of the invention
[0004] The present application provides a vascular image extraction method, device, equipment and storage medium to solve the problem of slow vascular image extraction speed.
[0005] In a first aspect, the present application provides a method for extracting a vascular image, the method comprising: acquiring a target image; performing region segmentation on the target image to obtain a plurality of block regions; performing region connectivity on the plurality of block regions to obtain at least one connected region; acquiring a target connected region in the at least one connected region; and processing the target connected region to extract a vascular image in the target connected region.
[0006] In a second aspect, the present application provides a vascular image extraction device, comprising: a first acquisition module, a region segmentation module, a region connectivity module, a second acquisition module and a processing module, wherein the first acquisition module is used to acquire a target image; the region segmentation module is used to perform region segmentation on the target image to obtain a plurality of block regions; the region connectivity module is used to perform region connectivity on the plurality of block regions to obtain at least one connected region; the second acquisition module is used to acquire a target connected region in at least one connected region; and the processing module is used to process the target connected region to extract a vascular image in the target connected region.
[0007] According to a third aspect, an electronic device is provided, comprising: a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method in the first aspect or its various implementations.
[0008] According to a fourth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute the method according to the first aspect or its various implementations.
[0009] According to a fifth aspect, a computer program product is provided, comprising computer program instructions, wherein the computer program instructions enable a computer to execute the method according to the first aspect or its various implementations.
[0010] According to a sixth aspect, a computer program is provided, which enables a computer to execute the method according to the first aspect or its various implementations.
[0011] Through the technical solution of the present application, an electronic device can obtain a target image, and then the electronic device can perform region segmentation on the target image to obtain multiple block regions, and then the electronic device can perform region connection on the multiple block regions to obtain at least one connected region, and then the electronic device can obtain a target connected region from the at least one connected region, and finally the electronic device can process the target connected region to extract a blood vessel image in the target connected region. The above method can obtain a target connected region by performing region segmentation and region connection on the target image, and after processing the target connected region, the blood vessel image in the target connected region can be extracted, which solves the problem of complex algorithm calculation when extracting blood vessels in the prior art and improves the extraction speed of blood vessel images. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0013] Figure 1 An application scenario diagram provided for an embodiment of the present application;
[0014] Figure 2 A flow chart of a blood vessel image extraction method provided in an embodiment of the present application;
[0015] Figure 3 A schematic diagram of a blood vessel image extraction provided in an embodiment of the present application;
[0016] Figure 4 A schematic diagram of another blood vessel image extraction provided in an embodiment of the present application;
[0017] Figure 5 A schematic diagram of another blood vessel image extraction provided in an embodiment of the present application;
[0018] Figure 6 A schematic diagram of another blood vessel image extraction provided in an embodiment of the present application;
[0019] Figure 7 A schematic diagram of another blood vessel image extraction provided in an embodiment of the present application;
[0020] Figure 8 A schematic diagram of another blood vessel image extraction provided in an embodiment of the present application;
[0021] Fig. 9 A schematic diagram of another blood vessel image extraction provided in an embodiment of the present application;
[0022] Fig.10 A schematic diagram of another blood vessel image extraction provided in an embodiment of the present application;
[0023] Fig.11 A schematic diagram of another blood vessel image extraction provided in an embodiment of the present application;
[0024] Fig.12 A schematic diagram of another blood vessel image extraction provided in an embodiment of the present application;
[0025] Fig.13 A schematic diagram of another blood vessel image extraction provided in an embodiment of the present application;
[0026] Fig.14 A schematic diagram of a blood vessel image extraction 1400 provided in an embodiment of the present application;
[0027] Fig.15 It is a schematic block diagram of an electronic device 1500 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0030] As mentioned above, the current vascular image extraction method requires manually determining the starting point of the blood vessel, calculating the Dijkstra distance between the starting points, and then marking the vascular region of interest with the distance as the center. Finally, the boundary of the region of interest is optimized through the graph cutting algorithm to realize vascular image extraction. This method is relatively complex in calculation, resulting in slow vascular image extraction.
[0031] In order to solve the above technical problems, the present application can obtain the target connected area by performing region segmentation and region connectivity on the target image. After processing the target connected area, the vascular image in the target connected area can be extracted, thereby improving the extraction speed of the vascular image.
[0032] It should be understood that the technical solution of the present application can be applied to the following scenarios, but is not limited to:
[0033] For example, Figure 1 An application scenario diagram provided for an embodiment of the present application, such as Figure 1 As shown, the application scenario may include an electronic device 110 and a network device 120. The electronic device 110 may establish a connection with the network device 120 via a wired network or a wireless network.
[0034] In some implementations, the electronic device 110 may be a desktop computer, a laptop computer, a tablet computer, etc., but is not limited thereto.
[0035] In some implementations, the network device 120 may be a terminal device or a server, but is not limited thereto.
[0036] also, Figure 1 An electronic device and a network device are shown by way of example, but other numbers of electronic devices and network devices may actually be included, and the present application does not impose any limitation on this.
[0037] After introducing the application scenarios of the embodiments of the present application, the technical solution of the present application will be described in detail below:
[0038] Figure 2 A flow chart of a blood vessel image extraction method provided in an embodiment of the present application, the method can be performed as follows Figure 1 The electronic device 110 shown in the figure is executed, and this application does not limit this. Figure 2 As shown, the method may include the following steps:
[0039] S210: Acquire a target image;
[0040] S220: Segment the target image into regions to obtain a plurality of block regions;
[0041] S230: Connecting multiple block regions to obtain at least one connected region;
[0042] S240: Acquire a target connected region in at least one connected region;
[0043] S250: Processing the target connected region to extract a blood vessel image in the target connected region.
[0044] It should be understood that the target image may be a computed tomography (CT) image, a CTA image, a magnetic resonance imaging (MRI) image, or other images, and the present application does not impose any limitation on this.
[0045] It should be noted that CTA images are a special type of CT images. CTA is a special examination method for CT examinations. CTA requires that vascular contrast agents be injected into the blood vessels of the part to be scanned, and then the part to be scanned is scanned using CT equipment to finally obtain CTA images. Because X-rays cannot penetrate vascular contrast agents, the attenuation coefficient of X-rays in the blood vessels injected with vascular contrast agents will increase, so they will become whiter when displayed in CTA images. In this way, the contrast between the vascular image and other tissue images will be higher, which is more conducive to the electronic equipment's preprocessing and regional segmentation of the target image.
[0046] In some possible implementations, the electronic device may obtain the target image from a terminal device or a network device such as a server, and this application does not impose any restrictions on this.
[0047] In some possible implementations, the electronic device may send a request message to a terminal device or a network device such as a server, where the request message is used to request acquisition of a target image. Further, the electronic device may receive a response message sent by the terminal device or the network device such as a server, where the response message includes: the target image.
[0048] In the following embodiments, the present application will take the target image being a CT image as an example to introduce the technical solution of the present application.
[0049] It should be understood that the CT device can use X-rays to scan the part of the human body to be scanned and obtain the scanning results, and then calculate the scanning results to obtain the attenuation coefficient of each voxel in the part to be scanned to the X-rays, and then arrange the attenuation coefficients into a digital matrix, and then use a digital / analog converter to convert each number in the digital matrix into small squares of varying grayscales from black to white, that is, pixels, and arrange them in a matrix, so that a CT image can be formed. Therefore, the pixels in the CT image can reflect the attenuation coefficient of the corresponding voxels in the part to be scanned to the X-rays.
[0050] In addition, since the key factors that determine the attenuation coefficient of a substance to X-rays include: the atomic number of the substance itself, the X-ray energy and the density of the substance, and the substances inside the human body can be roughly divided into: air, soft tissue and bone, among which the equivalent atomic numbers of air, soft tissue and bone are equivalent to the equivalent atomic number of water, and the X-ray energy used in CT scanning is also the same, therefore, when the CT device scans the human body, the attenuation coefficient of each voxel in the part to be scanned to X-rays can be determined by the density of each voxel in the part to be scanned, then combined with the above analysis: the pixels in the CT image can reflect the attenuation coefficient of the corresponding voxels in the part to be scanned to X-rays, then it can be confirmed that: the pixels in the CT image can also reflect the density corresponding to the corresponding voxels in the part to be scanned. For example: black shadows in CT images generally indicate areas with a low attenuation coefficient for X-rays, that is, low-density areas, such as lungs containing air; gray shadows in CT images generally indicate areas with a medium attenuation coefficient for X-rays, that is, medium-density areas, such as muscles and other soft tissues; white shadows in CT images generally indicate areas with a high attenuation coefficient for X-rays, that is, high-density areas, such as bones.
[0051] In addition, the unit for describing the attenuation ability of a substance to X-rays is cm-1, that is, the intensity attenuation degree of a substance caused by it for every 1 cm of a substance. In the range of X-ray energy used clinically, the attenuation coefficient of water to X-rays is 0.2cm-1, the attenuation coefficient of muscle to X-rays is 0.21cm-1, the attenuation coefficient of air to X-rays is 0cm-1, and the attenuation coefficient of fat to X-rays is 0.18cm-1. Obviously, the values of these attenuation coefficients are difficult to remember, and the attenuation coefficients of most substances to X-rays are close to the attenuation coefficient of water to X-rays. Therefore, in clinical practice, the relative value between the attenuation coefficient of a substance to X-rays and the attenuation coefficient of water to X-rays is usually used to represent the attenuation ability of the substance to X-rays, that is, the CT value of the substance is used to represent the attenuation ability of the substance to X-rays. The CT value of a substance is equal to the difference between the attenuation coefficient of the substance and the attenuation coefficient of water, and then multiplied by the graduation factor after comparing it with the attenuation coefficient of water. When the graduation factor is 1000, the unit of the CT value is Henry unit (Hu). Combined with the above analysis, it can be seen that in clinical practice, the density of a substance determines the CT value of the substance. For a substance with a higher density, the CT value is generally higher, and the color displayed in the CT image will be darker; for a substance with a lower density, the CT value is generally lower, and the color displayed in the CT image will be lighter. For example: the density of air is lower, and the CT value of air is -1000Hu, so the lungs containing air are represented by black shadows on the CT image. In addition, the CT value of fat is about -100Hu, the CT value of muscle is about 50Hu, the CT value of bone is about 500Hu to 1000Hu, the CT value of venous blood is about 55Hu, and the CT value of lung is about -500Hu to -900Hu. It can be seen that the density of different tissues is different, so the CT values of different tissues are different. Therefore, in the following embodiment of regional segmentation of a target image such as a CT image, the CT value can be used as the basis for regional segmentation.
[0052] In some possible implementations, after the electronic device acquires the CT image, it may preprocess the CT image so that the CT image becomes a suitable grayscale image.
[0053] It should be noted that, as described above for CT images, CT images are composed of a certain number of pixels of different grayscales from black to white arranged in an intrinsic matrix. The grayscale of these pixels can reflect the attenuation coefficient of the corresponding voxels to X-rays, that is, it reflects the difference in CT values between various tissues with different densities in the human body. The CT values of various tissues with different densities in the human body range from -1000Hu to 1000Hu. If 2000 different CT values are to be represented on a CT image, 2000 different grayscales are required. However, the human eye has a relatively limited ability to distinguish 16 grayscales. Therefore, the CT device is designed to divide the grayscale from white, which represents the highest density, to black, which represents the lowest density, into 16 grayscales. If the 2000 CT values of human tissue are reflected by 16 grayscales, then the CT value range represented by each grayscale is 2000 / 16=125Hu, and the CT value difference that the human eye can distinguish should be 125Hu, that is, when the CT value difference of two tissues is more than 125Hu, the human eye can distinguish them. If the difference is less than 125Hu, the human eye cannot distinguish them clearly. For example: the CT value of human soft tissue is mostly between 20Hu and 70Hu, with a difference of 50Hu, that is, the difference is less than 125HU. If the 2000 CT values of human tissue are reflected by 16 grayscales, the human eye cannot distinguish different soft tissues. Therefore, in order to achieve the best display effect of the tissue structure to be observed on the CT image, it is necessary to select different window technologies to pre-process the CT image according to the CT value range of the tissue structure, that is, to select the appropriate window width and window position. For example: for CT examination of the lungs, the window width is generally selected as 1500Hu to 2000Hu, and the window position is generally selected as -450Hu to -600Hu; for CT examination of bone tissue, the window width is generally selected as 1000Hu to 1500Hu, and the window position is generally selected as 250Hu to 350Hu.
[0054] Among them, the window width represents the observable CT value range, that is, the CT value range displayed by the CT image. The tissues within this CT value range can be divided into 16 gray levels from white to black according to their density for observation and comparison. For example, when the window width is set to 100Hu, the CT value range represented by each gray level is 100 / 16=6.25Hu, and the CT value difference that can be distinguished by the human eye in the CT image is 6.25Hu, that is, when the CT value difference between two tissues is more than 6.25Hu, the human eye can distinguish. Therefore, the size of the window width can directly affect the contrast of the CT image. If the window width is set to a small value, the CT value range displayed by the CT image is small, and the CT value range represented by each gray level is small, so the contrast of the CT image is strong, and it can be used to observe tissues with similar density; on the contrary, if the window width is set to a large value, the CT value range displayed by the CT image is large, and the CT value range represented by each gray level is large, so the contrast of the CT image is poor, and it can be used to observe tissues with large density differences, such as bones and soft tissues.
[0055] The window level indicates the middle CT value of the observable CT value range, that is, the center value of the CT value range indicated by the window width. For example: when the window width is set to 100Hu, if the window level is set to 0Hu, the window level is the center, that is, the CT value 0Hu is the center, the CT value includes 50Hu upwards, and the CT value includes -50Hu downwards. All tissues within this 100Hu range can be displayed in the CT image, and when the CT value difference between two tissues displayed in the CT image is 100 / 16=6.25Hu, the two tissues can be distinguished by the human eye. In addition, tissues with CT values greater than 50Hu are displayed as white on the CT image, and tissues with CT values less than -50Hu are displayed as black on the CT image, that is, the differences in tissue density reflected by CT values greater than or less than 50Hu cannot be displayed.
[0056] In some achievable embodiments, the electronic device can pre-process a CT image by adjusting the window width and window position, so that the image of the blood vessels to be extracted and the surrounding tissues have a more obvious visual contrast, thereby obtaining a pre-processed image. For example: after the electronic device acquires a lung CT image, the medical staff can input a suitable window width and window position on the electronic device, and then the electronic device can adjust the lung CT image according to the above input window width and window position. Then, the medical staff can judge whether the image of the blood vessels to be extracted and the surrounding tissues have a more obvious visual contrast according to the display of the CT image at this time. If the contrast is not obvious, the window width and window position can be re-entered. When the contrast is more obvious, the pre-processed image can be obtained.
[0057] For example, Figure 3 As shown, Figure 3is the image obtained by preprocessing the lung CT image by the electronic device. Assume that the vascular image to be extracted is Figure 3 The vascular image in the lung image on the right, where the vascular image to be extracted is Figure 3 The grayscale image is represented by white, and the lung image is represented by Figure 3 The grayscale images are shown in black, and other tissue images are shown in Figure 3 The grayscale image is represented by black oblique lines. The final window width of the preprocessed image is 1500Hu and the window position is -600Hu. Figure 3 It can be seen that the vascular image to be extracted and Figure 3 The lung image on the right has a more obvious contrast, and the lung image on the right and other tissue images also have a more obvious contrast.
[0058] In some possible implementations, the electronic device may use a clustering algorithm to perform region segmentation on the target image or the target image after preprocessing to obtain a plurality of block regions, but is not limited thereto.
[0059] Exemplarily, the electronic device may use Simple Linear Iterative Clustering (SLIC) to perform region segmentation on the target image or the pre-processed target image to obtain a plurality of block regions.
[0060] It should be understood that clustering algorithms are based on similarity and divide a data set into different classes or clusters according to a specific standard, so that the data similarity within the same cluster is as large as possible, and the data differences in different clusters are as large as possible, that is, the clustering algorithm can make data belonging to the same class clustered together as much as possible, and data not belonging to the same class separated as much as possible. Common clustering algorithms include K-means clustering algorithm, and SLIC is an application of K-means clustering algorithm. SLIC belongs to the superpixel segmentation algorithm based on clustering. The superpixel segmentation algorithm can form irregular pixel blocks with adjacent pixels with certain similar features, that is, the pixels can be grouped into a small number of superpixels by using the feature similarity between pixels, so that a small number of superpixels can be used instead of a large number of pixels to express the characteristics of the picture, and SLIC belongs to the superpixel segmentation algorithm with faster operation speed and more compact generated superpixels. Therefore, SLIC can be used to perform regional segmentation on the target image or the target image after preprocessing, wherein the generated superpixels are the multiple block regions obtained.
[0061] In some implementations, when the electronic device performs region segmentation on the target image or the target image after preprocessing, the electronic device may perform region segmentation on the image based on the distance between each pixel point in the image and the pixel value of each pixel point to obtain multiple block regions. For example, when the target image is a CT image, the pixel value of each pixel point may be the CT value of each pixel point; when the target image is an MRI image, the pixel value of each pixel point may be the signal-to-noise ratio of each pixel point, but is not limited thereto.
[0062] Exemplarily, assuming that the electronic device uses SLIC to segment the CT image based on the distance between each pixel point in the CT image and the CT value of each pixel point to obtain multiple block areas, then first, the electronic device needs to obtain the CT value of each pixel point in the CT image and the coordinates of each pixel point in the CT image, wherein the electronic device can establish a plane rectangular coordinate system with the upper left corner of the CT image as the origin of the coordinate system, the upper left corner to the right as the positive direction of the X axis, and the upper left corner downward as the positive direction of the Y axis. Then, the electronic device needs to select K pixel points from all N pixel points in the CT image as the initial center point. Generally, the initial center point can be selected as the geometric center point of the CT image. For example, the electronic device first divides the CT image into K blocks according to the lines parallel to the above X axis and Y axis, and then takes the pixel points corresponding to the geometric centers of the K blocks as the K initial center points. Then, the electronic device can calculate the distance D between the other pixel points in the N pixels except the K initial center points and the K initial center points based on the coordinates of the pixel points and the CT values of the pixel points. Pji , calculate the distance D between the other pixel points and the K initial center points Pji The formula is as follows:
[0063]
[0064] Among them, C CTi represents the CT value of the i-th initial center point among the K initial center points, P CTj represents the CT value of the jth pixel among the NK other pixels, C xi represents the coordinate of the i-th initial center point among the K initial center points about the X axis, P xi represents the coordinate of the jth pixel point among the NKth other pixels among the K initial center points about the X axis, C yi represents the coordinate of the i-th initial center point among the K initial center points about the Y axis, P yi represents the coordinate of the jth pixel point among the NKth other pixels among the K initial center points about the Y axis, D Pjirepresents the distance between the jth pixel point among the NK other pixels and the ith initial center point among the K initial center points, w represents the weight of the CT value, s represents the weight of the distance, i=1, 2, ..., K, j=1, 2, ..., NK.
[0065] The electronic device calculates the distance D between other pixel points and the K initial center points. Pji After the calculation is completed, the electronic device can re-divide the NK other pixel points into the block where the initial center point with the smallest distance between them is located. For example, when determining K initial center points, the electronic device divides K initial blocks, wherein the first initial center point of the K initial center points is in the first initial block, the second initial center point of the K initial center points is in the second initial block, and the first other pixel point among the NK other pixel points also belongs to the first initial block. After the electronic device calculates the distance between the first other pixel point and the K initial center points respectively, it determines by comparison that the distance between the first other pixel point and the second initial center point among the K initial center points is the shortest, then the first other pixel point can be re-divided into the second initial block where the second initial center point is located. Then, the electronic device can select a new center point in the above-mentioned re-divided blocks. The new center point is the pixel point in the block that is closest to the initial center point. If the distances are the same, any pixel point can be randomly selected as the new center point. After selecting a new center point, the electronic device may repeat the above steps to perform region segmentation according to the new center point. When the segmentation result does not change any more, a plurality of block regions may be obtained.
[0066] For example, Figure 4 As shown, Figure 4 Schematically shows the Figure 3 The result of regional segmentation of the CT image in FIG. 1 shows that in multiple block regions, the vascular image can form a separate block region, and the block region for segmenting the lung image is different from the block region for segmenting other tissue images.
[0067] In some possible implementations, before the electronic device performs regional connectivity on the multiple block regions, it may first determine the average pixel value of each of the multiple block regions, and then perform regional connectivity on the multiple block regions according to the average pixel value of each of the multiple block regions to obtain at least one connected region. Wherein, when the target image is a CT image, the average pixel value of the multiple block regions may be an average CT value, and the average CT value may be the average CT value of all pixel points in the block region, and this application does not impose any limitation on this.
[0068] Exemplarily, when an electronic device performs regional connection on a plurality of block areas according to their respective average pixel values to obtain at least one connected area, the electronic device may first determine the difference in average pixel values between the block areas within a preset range among the plurality of block areas, and then perform regional connection on the block areas whose differences in average pixel values are less than a preset threshold to obtain at least one connected area. For example, the electronic device may first select a first block area from a plurality of block areas, and then the electronic device may calculate a first difference between an average pixel value of the first block area and an average pixel value of a second block area adjacent thereto. If the first difference is less than a preset threshold, the first block area and the second block area may form a first connected area, and the electronic device may calculate a second difference between an average pixel value of the second block area and an average pixel value of a third block area adjacent thereto. If the second difference is less than a preset threshold, the third block area may form a first connected area. If the second difference is greater than or equal to the preset threshold, the third block area may not form the first connected area, and the electronic device will not calculate a third difference between an average pixel value of the third block area and an average pixel value of a fourth block area adjacent thereto. If the first difference is greater than or equal to the preset threshold, the first block area and the second block area may not form the same connected area, and the electronic device will not calculate a second difference between an average pixel value of the second block area and an average pixel value of a third block area adjacent thereto. When each of the plurality of block areas forms a connected domain, a plurality of connected areas may be determined.
[0069] It should be noted that when the electronic device connects the multiple block areas according to their respective CT values to obtain the connected area, since the CT values of different tissues in the CT image are different, the average CT values of the block areas corresponding to different tissues will be different. When a suitable preset threshold is selected, the block areas corresponding to different tissues will not form the same connected area because the difference in average CT values is greater than or equal to the preset threshold, that is, different tissues will correspond to different connected domains.
[0070] For example, Figure 5 As shown, assuming that the blood vessel image to be extracted is the blood vessel image in the lung image on the right side of the figure, although the blood vessel image to be extracted is adjacent to the lung image on the right side of the figure, the CT value of the lung is about -500Hu to -900Hu, and the CT value of the blood is about 50Hu. Obviously, the difference in average CT value between the block area corresponding to the blood vessel image to be extracted and the block area corresponding to the lung image is large, so the block area corresponding to the blood vessel image to be extracted will not form the same connected area with the block area corresponding to the lung image, that is, the connected area corresponding to the blood vessel image to be extracted and the connected area corresponding to the lung image are different. Figure 5 As shown, Figure 5 Schematically shows the Figure 4 The result after connecting multiple block regions in , where Figure 5 Only the connected areas corresponding to the right lung image and the blood vessel image to be extracted in the CT image are shown. The connected areas corresponding to the right lung image are marked with white horizontal lines, and the connected areas corresponding to the blood vessel image to be extracted are marked in white. It can be seen that the connected area corresponding to the right lung image is a multi-connected area, the connected area corresponding to the blood vessel image to be extracted is a plurality of single-connected areas, and the connected area corresponding to the blood vessel image to be extracted is surrounded by the connected area corresponding to the right lung image. Of course, the left lung image and other tissue images in the CT image can have corresponding connected areas, which will not be introduced in this application.
[0071] In some possible implementations, when acquiring a target connected region from at least one connected region, the electronic device may first label the target connected region, and remove the region other than the target connected region from the target image or the preprocessed target image according to the labeling result of the target connected region to obtain the target connected region. The target connected region includes the blood vessel image to be extracted.
[0072] For example, Figure 6 As shown, assuming that the blood vessel image to be extracted is the blood vessel image in the lung image on the right side of the figure, the target connected area may include the connected area corresponding to the blood vessel image to be extracted and the connected area corresponding to the lung image on the right side of the figure. The electronic device may use a target color such as cyan to mark the connected area corresponding to the lung image on the right side of the figure. The cyan color is Figure 6 Indicated by white dots.
[0073] In some possible implementations, when removing the target image or the area other than the target connected area in the preprocessed target image according to the labeling result of the target connected area, the electronic device may first select the target pixel point, and then the electronic device may use the target pixel point as a seed point, and use the region growing algorithm to determine the area other than the target connected area in the target image or the preprocessed target image according to the labeling result of the target connected area. The target pixel point is a pixel point in the area other than the target connected area in the target image or the preprocessed target image.
[0074] It should be understood that the region growing algorithm can merge pixels with similar properties together, wherein a pixel needs to be determined as a seed point, i.e., the starting point of growth, and then the seed point is compared with the pixels in the surrounding area, and the pixels with similar properties are grouped into a growing region, and the seed point is continued to be compared with other pixels around the region until no pixels that meet the conditions can be included in the growing region. Among them, the criterion used to determine whether the pixels are similar is the growth criterion, "no pixels that meet the conditions can be included in the growing region" is the stop condition of growth, and the growing region generated by the region growing algorithm is a connected region.
[0075] For example, Figure 6 As shown, assuming that the vascular image to be extracted is the vascular image in the lung image on the right side of the figure, the target connected area includes the connected area corresponding to the vascular image to be extracted and the connected area corresponding to the lung image on the right side of the figure, wherein the connected area corresponding to the lung image on the right side of the figure surrounds the connected area corresponding to the vascular image to be extracted, and the electronic device uses the target color to mark the connected area corresponding to the lung image on the right side of the figure. Then, when the electronic device selects pixel points outside the target connected area as seed points, and performs region growth according to the growth criterion: non-annotated pixel points are similar to seed points, and annotated pixel points are not similar to seed points, when the electronic device compares the seed points with the pixel points at the boundary of the connected area corresponding to the lung image on the right side of the figure, since the connected area corresponding to the lung image on the right side of the figure is marked, the pixel points at its boundary are also marked, then according to Growth criteria, the pixel points at the boundary of the connected area corresponding to the lung image on the right side of the figure will not constitute a growing area. At the same time, since the growing area generated by the region growing algorithm is a connected area, when the electronic device determines that the pixel points at the boundary of the connected area corresponding to the lung image on the right side of the figure will not constitute a growing area, the electronic device will no longer compare the seed point with other pixel points in the connected area corresponding to the lung image on the right side of the figure. Then, although the connected area corresponding to the vascular image to be extracted is not labeled, it will not constitute a growing area. When the stopping condition of growth: no non-labeled pixel points in the target image or the preprocessed target image can be included in the growing area is met, the growth is stopped. At this time, the generated growing area is only the area outside the target connected area in the target image or the preprocessed target image that the electronic device needs to remove. Figure 7 As shown, the growth area can be Figure 8 The area indicated by black in .
[0076] In some possible implementations, before selecting the target pixel point, the electronic device may first expand the edge area of the target image or the preprocessed target image, and then the electronic device may select the target pixel point on the expanded edge area of the target image. In this way, the target pixel point selected by the electronic device must not be a pixel point in the target connected area. Figure 8 As shown, the electronic device can expand one pixel point in each of the upper, lower, left, and right edge regions of the target image or the preprocessed target image, and then the electronic device can select a pixel point located at the intersection of the expanded upper edge region and the expanded left edge region as the target pixel point. The target pixel point is as shown in FIG. Figure 8 As shown in the small black rectangle in the upper left corner.
[0077] In some possible implementations, the electronic device may select one or more target seed points, and this application does not impose any limitation on this.
[0078] In some possible implementations, after the electronic device determines the region other than the target connected region in the target image or the preprocessed target image, i.e., the irrelevant connected region, the electronic device can subtract the target image or the preprocessed target image from the irrelevant connected region to obtain the target connected region. Fig. 9 As shown, Fig. 9 Schematically shows Figure 3 The target image and Figure 7 The target connected area is obtained by subtracting the irrelevant connected areas in .
[0079] In other possible implementations, after the electronic device determines that the area other than the target connected area in the target image or the preprocessed target image is an irrelevant connected area, the electronic device may mark the irrelevant connected area with another color, which is different from the target color used to mark the target connected area. Fig.10 As shown, Fig.10 The figure schematically shows an image after the electronic device marks the irrelevant connected region with other colors, wherein the other color is represented by black. It can be understood that when the electronic device marks the irrelevant connected region with a target color different from that used to mark the target connected region, the target connected region may also be marked with the same color. Fig. 9 It is also shown more clearly.
[0080] In some implementations, when the electronic device processes the target connected region to extract the blood vessel image in the target connected region, ie, the blood vessel image to be extracted, the electronic device may perform intra-region inversion on the target connected region to extract the blood vessel image to be extracted.
[0081] For example, Fig. 9As shown, the target connected area includes the connected area corresponding to the blood vessel image to be extracted and the connected area corresponding to the lung image, wherein the connected area corresponding to the lung image is marked by the electronic device using the target color, and the connected area corresponding to the blood vessel image to be extracted is not marked by the electronic device using the target color. Therefore, at this time, the electronic device can invert the intra-region marking of the target connected area, that is, the electronic device can change the marked area in the target connected area to the unmarked area, and change the unmarked area to the marked area, or the electronic device can mark the unmarked area as the first color and mark the area marked with the target color as the second color. For example, Fig.11 As shown, the electronic device can mark the unmarked blood vessel images to be extracted as black, and mark the lung images marked with the target color as white, so that the blood vessel images to be extracted can be clearly displayed.
[0082] For example, Fig.10 As shown, the target connected area includes the connected area corresponding to the to-be-extracted blood vessel image and the connected area corresponding to the lung image, wherein the connected area corresponding to the lung image is marked with the target color by the electronic device, the connected area corresponding to the to-be-extracted blood vessel image is not marked with the target color by the electronic device, and the irrelevant connected area is marked with other colors by the electronic device. At this time, the electronic device can use the other color to mark the area marked with the target color, then as Fig.12 As shown, the blood vessel image to be extracted can be prominently displayed because it is not labeled.
[0083] It should be understood that the present application does not limit the manner in which the electronic device performs intra-region inversion on the target connected area.
[0084] In some possible implementations, the electronic device can extract the vascular image from multiple target images of the same part to be scanned, that is, extract multiple layers of the target image of the part to be scanned, and then the electronic device can combine the vascular images obtained from the multiple target images to obtain the following: Fig.13 Blood vessel images are shown.
[0085] In summary, the technical solution provided by the above embodiment brings at least the following beneficial effects: the electronic device can obtain a target image, then the electronic device can perform region segmentation on the target image to obtain multiple block regions, then the electronic device can perform region connection on the multiple block regions to obtain at least one connected region, then the electronic device can obtain a target connected region from the at least one connected region, and finally the electronic device can process the target connected region to extract a vascular image in the target connected region. The above method can obtain a target connected region by performing region segmentation and region connection on the target image, and after processing the target connected region, the vascular image in the target connected region can be extracted, which solves the problem of complex algorithm calculation in the prior art when extracting vascular images and improves the extraction speed of vascular images.
[0086] Furthermore, before selecting the target pixel point, the electronic device may first expand the edge area of the target image or the preprocessed target image, and then the electronic device may select the target pixel point on the expanded edge area of the target image. In this way, it can be ensured that the target pixel point selected by the electronic device is definitely not a pixel point in the target connected area.
[0087] Fig.14 A schematic diagram of a blood vessel image extraction device 1400 provided in an embodiment of the present application is shown as follows: Fig.14 As shown, the device 1400 includes:
[0088] A first acquisition module 1410 is used to acquire a target image;
[0089] The region segmentation module 1420 is used to segment the target image into regions to obtain a plurality of block regions;
[0090] A region connection module 1430 is used to connect multiple block regions to obtain at least one connected region;
[0091] A second acquisition module 1440 is used to acquire a target connected area in at least one connected area;
[0092] The processing module 1450 is used to process the target connected area to extract the blood vessel image in the target connected area.
[0093] In some possible implementations, the second acquisition module 1440 is specifically used to: mark a target connected region in at least one connected region; and remove regions other than the target connected region in the target image according to the marking result of the target connected region to obtain the target connected region.
[0094] In some possible implementations, the second acquisition module 1440 is specifically used to: select a target pixel point; use the target pixel point as a seed point, and use a region growing algorithm to determine the area in the target image other than the target connected area based on the labeling result of the target connected area.
[0095] In some possible implementations, the second acquisition module 1440 is specifically used to: expand the edge area of the target image; and select target pixel points on the expanded edge area of the target image.
[0096] In some implementations, the target pixel point is located at an intersection area of an extended upper edge area and an extended left edge area of the target image.
[0097] In some implementations, the processing module 1450 is specifically configured to perform inverse calculation on the target connected region to extract the blood vessel image in the target connected region.
[0098] In some possible implementations, the region segmentation module 1420 is specifically used to determine the distance between each pixel point and the pixel value of each pixel point in the target image; the target image is segmented according to the distance between each pixel point and the pixel value of each pixel point to obtain multiple block regions.
[0099] In some implementations, the region connectivity module 1430 is specifically used to determine the average pixel value of each of the multiple block regions; and perform region connectivity on the multiple block regions according to the average pixel values of each of the multiple block regions to obtain at least one connected region.
[0100] In some possible implementations, the region connectivity module 1430 is specifically used to determine the difference in average pixel values between block regions within a preset range among multiple block regions; the block regions whose average pixel value difference is less than a preset threshold are connected to obtain at least one connected region.
[0101] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Fig.14 The device 1400 shown can execute the above method embodiments, and the above and other operations and / or functions of each module in the device 1400 are respectively for implementing the corresponding processes in the above methods, which will not be repeated here for the sake of brevity.
[0102] The above describes the device 1400 of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.
[0103] Fig.15 It is a schematic block diagram of an electronic device 1500 provided in an embodiment of the present application.
[0104] like Fig.15 As shown, the electronic device 1500 may include:
[0105] The memory 1510 and the processor 1520, the memory 1510 is used to store the computer program and transmit the program code to the processor 1520. In other words, the processor 1520 can call and run the computer program from the memory 1510 to implement the method in the embodiment of the present application.
[0106] For example, the processor 1520 may be configured to execute the above method embodiments according to instructions in the computer program.
[0107] In some embodiments of the present application, the processor 1520 may include but is not limited to:
[0108] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
[0109] In some embodiments of the present application, the memory 1510 includes but is not limited to:
[0110] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0111] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 1510 and executed by the processor 1520 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0112] like Fig.15 As shown, the electronic device may also include:
[0113] The transceiver 1530 may be connected to the processor 1520 or the memory 1510 .
[0114] The processor 1520 may control the transceiver 1530 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 1530 may include a transmitter and a receiver. The transceiver 1530 may further include an antenna, and the number of antennas may be one or more.
[0115] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0116] The present application also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.
[0117] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.
[0118] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0119] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0120] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0121] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for extracting a blood vessel image, characterized in that: include: Get the target image; Performing region segmentation on the target image to obtain a plurality of block regions; Performing regional connectivity on the multiple block regions to obtain at least one connected region; Acquire a target connected area among the at least one connected area; Processing the target connected area to extract a blood vessel image in the target connected area; The target image is segmented into regions to obtain a plurality of block regions, including: Obtain pixel values of N pixel points in the target image and coordinates of the N pixel points in the target image; divide the target image into K blocks evenly according to lines parallel to the X-axis and Y-axis of the target image, and use the pixel points corresponding to the geometric centers of the K blocks as K initial center points; calculate the distances D between NK other pixel points in the N pixel points except the K initial center points and the K initial center points respectively by the following formula: Pji ; The NK other pixel points are re-divided into blocks where the initial center point with the smallest distance from the NK other pixel points is located; a new center point is selected in the re-divided blocks, and the new center point is the pixel point in the corresponding block with the shortest distance from the corresponding initial center point; the distance D is repeatedly calculated according to the new center point Pji To perform region segmentation, when the segmentation result no longer changes, the plurality of block regions are obtained; Among them, C CTi represents the pixel value of the i-th initial center point among the K initial center points, P CTj represents the pixel value of the jth pixel among the NK other pixels, C xi represents the coordinate of the i-th initial center point among the K initial center points about the X-axis, P xj represents the coordinate of the jth pixel point among the NK other pixels about the X axis, C yi represents the coordinate of the i-th initial center point among the K initial center points about the Y axis, P yj represents the coordinate of the jth pixel point among the NK other pixels about the Y axis, D Pji represents the distance between the jth pixel point among the NK other pixel points and the ith initial center point among the K initial center points, w represents the weight of the pixel value, s represents the weight of the distance, i=1, 2, ..., K, j=1, 2, ..., NK.
2. The method according to claim 1, characterized in that The acquiring a target connected area in the at least one connected area comprises: marking a target connected area in the at least one connected area; According to the labeling result of the target connected region, the region other than the target connected region in the target image is removed to obtain the target connected region.
3. The method according to claim 2, characterized in that The removing the area other than the target connected area in the target image according to the labeling result of the target connected area to obtain the target connected area includes: Select the target pixel; The target pixel point is used as a seed point, and a region growing algorithm is used according to a labeling result of the target connected region to determine a region in the target image other than the target connected region.
4. The method according to claim 3, characterized in that The selecting of target pixel points comprises: Expanding the edge area of the target image; The target pixel point is selected on the extended edge area of the target image.
5. The method according to claim 4, characterized in that The target pixel point is located at an intersection area of an extended upper edge area and an extended left edge area of the target image.
6. The method according to any one of claims 1 to 5, characterized in that: The processing of the target connected area to extract the blood vessel image in the target connected area includes: The target connected region is inverted within the region to extract the blood vessel image in the target connected region.
7. The method according to any one of claims 1 to 5, characterized in that: The performing regional connectivity on the multiple block regions to obtain at least one connected region includes: Determine the average pixel value of each of the plurality of block areas; The multiple block areas are connected to each other according to their respective average pixel values to obtain the at least one connected area.
8. The method according to claim 7, characterized in that The performing regional connectivity on the multiple block regions according to the respective average pixel values of the multiple block regions to obtain the at least one connected region comprises: Determine the difference in average pixel values between the block areas within a preset range of the plurality of block areas; The block regions whose average pixel value difference is less than a preset threshold are connected to obtain the at least one connected region.
9. A blood vessel image extraction device, characterized in that: include: A first acquisition module, used for acquiring a target image; A region segmentation module is used to perform region segmentation on the target image to obtain a plurality of block regions; A region connection module, used for connecting the multiple block regions to obtain at least one connected region; A second acquisition module, used to acquire a target connected area in the at least one connected area; A processing module, used for processing the target connected area to extract a blood vessel image in the target connected area; The target image is segmented into regions to obtain a plurality of block regions, including: Obtain pixel values of N pixel points in the target image and coordinates of the N pixel points in the target image; divide the target image into K blocks evenly according to lines parallel to the X-axis and Y-axis of the target image, and use the pixel points corresponding to the geometric centers of the K blocks as K initial center points; calculate the distances D between NK other pixel points in the N pixel points except the K initial center points and the K initial center points respectively by the following formula: Pji ; The NK other pixel points are re-divided into blocks where the initial center point with the smallest distance from the NK other pixel points is located; a new center point is selected in the re-divided blocks, and the new center point is the pixel point in the corresponding block with the shortest distance from the corresponding initial center point; the distance D is repeatedly calculated according to the new center point Pji To perform region segmentation, when the segmentation result no longer changes, the plurality of block regions are obtained; Among them, C CTi represents the pixel value of the i-th initial center point among the K initial center points, P CTj represents the pixel value of the jth pixel among the NK other pixels, C xi represents the coordinate of the i-th initial center point among the K initial center points about the X-axis, P xj represents the coordinate of the jth pixel point among the NK other pixels about the X axis, C yi represents the coordinate of the i-th initial center point among the K initial center points about the Y axis, P yj represents the coordinate of the jth pixel point among the NK other pixels about the Y axis, D Pji represents the distance between the jth pixel point among the NK other pixel points and the ith initial center point among the K initial center points, w represents the weight of the pixel value, s represents the weight of the distance, i=1, 2, ..., K, j=1, 2, ..., NK.
10. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Image processing method and device, storage medium and electronic equipment
CN110910400A
Method for realizing image connected region marking based on memristor array and electronic device
CN111950569A
A double-lower-limb blood vessel area judgment method and system based on a CTA image
CN112767333A