Method for determining hemodynamic force for cerebral angiography x-ray examination
By acquiring the normality and edge characteristics of pixel points in cerebral angiography images, clustering with clustering weights, and giving pixel points smoothing parameters for denoising, the problem of traditional filtering denoising algorithms losing detailed features is solved, and image quality and accuracy of hemodynamic examination is improved.
Patent Information
- Application Number
- CN202510294259.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2045-03-13
AI Technical Summary
Traditional filtering denoising algorithms will lose some detailed features when denoising cerebral angiography images, resulting in the inability to accurately check the hemodynamics.
By obtaining the normality and edge characteristics of each pixel point in the cerebral angiography image, combining the clustering weights of non-zero elements, clustering is performed to obtain the edge characteristics of the pixel point, and smoothing parameters are assigned to each pixel point according to the edge characteristics, and denoising is performed.
While removing noise, the detailed features in the cerebral angiography image are preserved, improving image quality, and thus improving the accuracy of checking hemodynamics.
Smart Images

Figure CN119770068A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a method for determining blood dynamics for cerebral angiography X-ray examination. Background Art
[0002] Cerebral angiography X-ray examination is an imaging technology widely used in the medical field to evaluate the cerebrovascular system. This examination method combines X-ray imaging and contrast agent injection to clearly show the morphology and flow state of cerebral blood vessels, thereby helping to diagnose and treat cerebrovascular diseases. However, in the process of obtaining cerebral angiography images with X-rays, electronic noise will be generated due to the thermal motion and electronic fluctuations of the detector electronic components themselves. In order to be able to more accurately examine the blood dynamics based on the cerebral angiography images, it is necessary to denoise the cerebral angiography images.
[0003] In the process of denoising cerebral angiography images using traditional filtering and denoising algorithms, when the traditional non-local mean filtering algorithm is used to denoise cerebral angiography images, the smoothing parameters in the non-local mean filtering algorithm are fixed, and the detail features contained in different pixel points of cerebral angiography are different. If the cerebral angiography is filtered and denoised with a fixed smoothing coefficient, some detail features will be lost, and the blood dynamics cannot be accurately examined. Summary of the invention
[0004] The present invention provides a method for determining blood dynamics in cerebral angiography X-ray examination to solve the existing problem that a traditional filtering denoising algorithm will lose some detail features during the denoising process of cerebral angiography images.
[0005] The method for determining blood dynamics for cerebral angiography X-ray examination of the present invention adopts the following technical solution: The following steps are involved: Acquire the cerebral angiography images collected at each moment; According to the grayscale difference between each pixel in the cerebral angiography image and the corresponding pixel in the adjacent cerebral angiography image, the normality of each pixel in the cerebral angiography image is obtained; according to the pixels around the pixel, the grayscale co-occurrence matrix of the local area of the pixel in different directions is obtained, and the clustering weight of each non-zero element in the grayscale co-occurrence matrix is obtained by combining the normality of the pixel and the surrounding pixels; according to the position coordinates and clustering weight of each non-zero element in the grayscale co-occurrence matrix, all non-zero elements are clustered to obtain several clusters; according to the distribution position of each cluster in the grayscale co-occurrence matrix, the edge features of the pixel are obtained; Each cerebral angiography image is divided into several sub-images; according to the edge features of each pixel point in the sub-image, the approximate extension direction of the cerebral blood vessels in the sub-image is obtained; according to the approximate extension direction of the cerebral blood vessels in the sub-image, the possibility of each pixel point in the sub-image being a pixel point at the edge of the cerebral blood vessel is obtained by combining the gradient value and gradient direction of each pixel point in the sub-image; According to the possibility that the pixel is the edge pixel of cerebral blood vessels, a smoothing parameter is assigned to each pixel and the cerebral angiography image is denoised.
[0006] Preferably, the specific method of obtaining the normality of each pixel in the cerebral angiography image includes: For any cerebral angiography image, a cerebral angiography image acquired at a time adjacent to the acquisition time of the cerebral angiography image is recorded as a comparison image of the cerebral angiography image; Recording any pixel point in the cerebral angiography image as a target pixel point, and recording the pixel point in the contrast image of the cerebral angiography image having the same coordinate position as the target pixel point as a relevant pixel point; Taking the target pixel as the center, construct a local window; record the pixels in the local window as the local pixels of the target pixel; obtain the local pixels of the relevant pixels; According to the grayscale difference between the local pixel point of the target pixel point and the local pixel point of the related pixel point, the normality of the target pixel point is obtained, and the normality of the target pixel point is negatively correlated with the grayscale difference.
[0007] Preferably, the gray level co-occurrence matrix of the local area of the pixel points in different directions is obtained, and the specific method includes: For any pixel point in any cerebral angiography image, the area composed of the local pixel points of the pixel point is recorded as the local area of the pixel point, the grayscale co-occurrence matrix of the local area of the pixel point in the directions of 0°, 45°, 90°, and 135° is obtained, and the diagonal line in the 135° direction of each grayscale co-occurrence matrix is recorded as the main diagonal line of each grayscale co-occurrence matrix.
[0008] Preferably, the method of obtaining the clustering weight of each non-zero element in the gray level co-occurrence matrix includes: For any non-zero element in the gray level co-occurrence matrix of the local area of the pixel point at 0°, mark the pixel point corresponding to the non-zero element in the local area of the pixel point as a marked pixel point, and take the product of the mean of the normal degree of all marked pixels and the non-zero element as the clustering weight of the non-zero element; Get the clustering weight of any non-zero element in the gray level co-occurrence matrix of the local area of the pixel at 90°.
[0009] Preferably, the method of clustering all non-zero elements according to the position coordinates and clustering weights of each non-zero element in the gray level co-occurrence matrix to obtain a number of clusters includes the following specific methods: Three initial cluster centers are randomly set in the gray-level co-occurrence matrix of the local area of the pixel point at 0° direction. For any non-zero element, the weighted distance between the non-zero element and each initial cluster center is obtained, and the weight is the clustering weight of the non-zero element. The initial cluster center corresponding to the minimum weighted distance is used as the cluster center to which the non-zero element belongs. Get the cluster center to which each non-zero element belongs, and classify the non-zero elements belonging to the same cluster center into the same initial cluster; For any initial cluster, the weighted center of the initial cluster is obtained according to the position coordinates of all non-zero elements in the initial cluster in the gray-level co-occurrence matrix and the clustering weight; Get the weighted center in each initial cluster, take the weighted center in each initial cluster as a new cluster center, iterate and obtain the weighted center according to the weighted distance between the new cluster center and the non-zero element, until the position of the weighted center does not change, and get 3 clusters in the gray level co-occurrence matrix of the local area of the pixel point in the 0° direction; Get the three clusters in the gray level co-occurrence matrix of the local area of the pixel at 90°.
[0010] Preferably, the obtaining of edge features of pixel points includes the following specific methods: For the three clusters in the gray-level co-occurrence matrix in the 0° direction of the local area of any pixel, obtain the distance between the weighted center of each cluster and the main diagonal of the gray-level co-occurrence matrix, record the cluster with the largest distance as the edge cluster, and record the remaining clusters as internal clusters; the sum of the distances between the weighted centers of the two internal clusters and the main diagonal of the gray-level co-occurrence matrix is recorded as the internal cluster distance, and the ratio of the distance between the weighted center of the edge cluster and the main diagonal of the gray-level co-occurrence matrix to the internal cluster distance is normalized, and the normalized result is used as the edge feature of the pixel in the 0° direction; Get the edge features of the pixel points in the 45°, 90°, and 135° directions.
[0011] Preferably, the specific method of dividing each cerebral angiography image into a plurality of sub-images includes: Preset one Each cerebral angiography image is divided into several sub-images of size sub-image of .
[0012] Preferably, the obtaining of the approximate extension direction of the cerebral blood vessels in the sub-image comprises the following specific methods: For any sub-image, according to the edge features of all pixels in the sub-image in the 0° direction, the possibility of obtaining the 0° direction as the approximate extension direction of the cerebral blood vessels in the sub-image is obtained. The specific calculation formula is: In the formula, Indicates the possibility that the 0° direction is the approximate extension direction of the cerebral blood vessels in the sub-image; Indicates the number of pixels in the sub-image; Represents the mean value of the edge features of all pixels in the sub-image in the 0° direction; Indicates the sub-image The edge features of the pixels in the 0° direction; It represents the absolute value function; represents an exponential function with a natural constant as base; The possibility of 45°, 90°, and 135° directions being the approximate extension directions of the cerebral blood vessels in the sub-image is obtained, and the direction corresponding to the maximum value among the possibilities of 0°, 45°, 90°, and 135° directions being the approximate extension directions of the cerebral blood vessels in the sub-image is taken as the approximate extension direction of the cerebral blood vessels in the sub-image.
[0013] Preferably, the possibility of obtaining each pixel point in the sub-image as a pixel point at the edge of a cerebral blood vessel includes the following specific methods: For any pixel point in any sub-image, the possibility of obtaining the pixel point as a pixel point at the edge of the cerebral blood vessel is obtained according to the approximate extension direction of the cerebral blood vessel in the sub-image and the gradient value and gradient direction of the pixel point. The specific calculation formula is: In the formula, Indicates the sub-image The possibility that the pixel is the edge pixel of the cerebral blood vessel; Indicates the sub-image The gradient value of each pixel; Indicates the maximum gradient value in the cerebral angiography image; Indicates the sub-image The angle between the gradient direction of each pixel and the approximate extension direction of the cerebral blood vessels in the sub-image; Represents the sine function.
[0014] Preferably, the step of assigning a smoothing parameter to each pixel and denoising the cerebral angiography image comprises the following specific methods: An initial smoothing parameter is preset, and for any pixel point, the product of the inversely proportional normalized result of the possibility that the pixel point is a cerebral blood vessel edge pixel point and the initial smoothing parameter is used as the smoothing parameter of the pixel point; The smoothing coefficients of all pixels in each cerebral angiography image are obtained, and each cerebral angiography image is denoised by using a non-local mean filtering algorithm combined with the smoothing parameters of all pixels in each cerebral angiography image.
[0015] The beneficial effects of the technical solution of the present invention are: since the noise in the cerebral angiography images collected at adjacent moments will change dramatically, while the normal pixels will not change dramatically, the present invention obtains the normality of each pixel in the cerebral angiography image based on the grayscale difference between each pixel in the cerebral angiography image and the corresponding pixel in the adjacent cerebral angiography image; and since the cerebral angiography image has rich texture, the edge features of the pixels obtained by using the grayscale co-occurrence matrix have better robustness, so this embodiment obtains the edge features of the pixels through the grayscale co-occurrence matrix combined with the normality of the pixels.
[0016] Furthermore, since the distribution direction of cerebral blood vessels in the local range of cerebral angiography images has a certain co-directionality, that is, the cerebral blood vessels generally extend in one direction, each cerebral angiography image can be divided into several sub-images. According to the similarity between the extension direction of edge pixels in the sub-image and the overall extension of cerebral blood vessels in one direction, the possibility of each pixel in the sub-image being a cerebral blood vessel edge pixel is obtained, and each pixel is assigned a smoothing parameter for denoising, thereby achieving the goal of retaining the detail features in the cerebral angiography image while removing noise, improving the image quality of the cerebral angiography image, and thus improving the accuracy of blood dynamics examination. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative work.
[0018] Figure 1 A flowchart of the steps of a method for determining blood dynamics for cerebral angiography X-ray examination according to the present invention; Figure 2 It is a local pixel point schematic diagram of the target pixel point and the related pixel points; Figure 3 Schematic diagram of the gray-level co-occurrence matrix in the 0° direction of the local area of the pixel. DETAILED DESCRIPTION
[0019] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, characteristics and effects of a method for determining blood dynamics for cerebral angiography x-ray examination proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0020] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0021] The following is a detailed description of a method for determining blood dynamics for cerebral angiography X-ray examination provided by the present invention in conjunction with the accompanying drawings.
[0022] See also Figure 1 , which shows a flowchart of a method for determining blood dynamics for cerebral angiography X-ray examination provided by an embodiment of the present invention, the method comprising the following steps: Step S001: Acquire the cerebral angiography image collected at each moment.
[0023] It should be noted that this embodiment is a method for determining blood dynamics for cerebral angiography X-ray examination, specifically, through X-ray imaging and contrast agent injection, the morphology and flow state of cerebral blood vessels are clearly displayed, thereby helping to diagnose and treat cerebrovascular diseases. However, in the process of obtaining cerebral angiography images by X-ray, electronic noise will be generated due to the thermal motion and electronic fluctuations of the detector electronic components themselves, resulting in a decrease in the image quality of the cerebral angiography images. Therefore, this embodiment improves the image quality of the cerebral angiography images by denoising the cerebral angiography images, so it is necessary to first obtain the cerebral angiography images.
[0024] Specifically, a contrast agent is injected into the patient's cerebral blood vessels, and an X-ray device is used to collect the patient's cerebral angiography images at each moment, with the sampling interval being set to 1 second.
[0025] Step S002: according to the grayscale difference between each pixel in the cerebral angiography image and the corresponding pixel in the adjacent cerebral angiography image, obtain the normality of each pixel in the cerebral angiography image; according to the pixels around the pixel, obtain the grayscale co-occurrence matrix of the local area of the pixel in different directions, and combine the normality of the pixel and the surrounding pixels to obtain the clustering weight of each non-zero element in the grayscale co-occurrence matrix; according to the position coordinates and clustering weight of each non-zero element in the grayscale co-occurrence matrix, cluster all non-zero elements to obtain a number of clusters; according to the distribution position of each cluster in the grayscale co-occurrence matrix, obtain the edge features of the pixel.
[0026] It should be noted that, since the denoising is performed directly by the filtering denoising algorithm, the edges of the tissues in the cerebral angiography image will be blurred, so it is necessary to obtain the edge features of each pixel in the cerebral angiography image, and allocate the filtering weights between the pixels according to the edge features; and when obtaining the edge features of the pixels, in order to avoid noise interference and obtain the edge features of the pixels more accurately, it is also necessary to obtain the normality of the pixels. The noise in the cerebral angiography image is mainly electronic noise generated by the thermal motion and electronic fluctuations of the detector electronic components themselves during the process. The electronic noise will be randomly distributed in each cerebral angiography image. Therefore, the noise in the cerebral angiography images collected at adjacent moments will change dramatically, while the normal pixels will not change dramatically. The normality of the pixels can be obtained according to the difference between the cerebral angiography images collected at adjacent moments; and because the texture in the cerebral angiography image is rich, the edge features of the pixels obtained by using the gray level co-occurrence matrix have better robustness. Therefore, this embodiment obtains the edge features of the pixels by combining the normality of the pixels with the gray level co-occurrence matrix.
[0027] Preferably, in one embodiment of the present invention, for any cerebral angiography image, a cerebral angiography image acquired at a time adjacent to the acquisition time of the cerebral angiography image, that is, a cerebral angiography image acquired at an adjacent previous time and an adjacent next time, is recorded as a comparison image of the cerebral angiography image; Recording any pixel point in the cerebral angiography image as a target pixel point, and recording the pixel point in the contrast image of the cerebral angiography image having the same coordinate position as the target pixel point as a relevant pixel point; With the target pixel as the center, construct a The size of the local window, The specific value of can be set according to the actual situation, and this embodiment does not limit it. Take the local pixel point in the local window as an example; record the pixel point in the local window as the local pixel point of the target pixel point; similarly, obtain the local pixel point of the relevant pixel point, such as Figure 2 As shown, Figure 2Schematic diagram of local pixels of target pixels and related pixels; it is particularly noted that if the local window of the target pixel or the related pixel exceeds the boundary of the cerebral angiography image, the local window is supplemented by quadratic linear interpolation; According to the grayscale difference between the local pixel point of the target pixel point and the local pixel point of the related pixel point, the normality of the target pixel point is obtained, and the normality of the target pixel point is negatively correlated with the grayscale difference.
[0028] In an example, the specific calculation formula is: In the formula, Indicates the normality of the target pixel; Indicates the number of related pixels; Indicates the number of local pixels; Indicates the target pixel The gray value of a local pixel; Indicates The first of the related pixels The gray value of a local pixel; represents the absolute value function, Represents an exponential function with a natural constant as the base; this embodiment adopts Model to present inverse proportional relationship and normalization processing, As the input of the model, the implementer can set the inverse proportional function and normalization function according to the actual situation.
[0029] It should be noted that since the noise in the cerebral angiography images collected at adjacent moments will change dramatically, while the normal pixels will not change dramatically, the smaller the difference between the local pixel of the target pixel and the local pixel of the related pixel, the less likely the target pixel is to be noise. It represents the difference between the local pixel of the target pixel and the local pixel of the related pixel, so The larger the value of is, the less likely the target pixel is to be noise, that is, the more normal the target pixel is.
[0030] It needs to be further explained that within the local range of the pixel points located at the edge of each tissue, there are two kinds of tissues, and the pixels inside the tissues are similar, while the pixels inside different tissues are not similar, that is, the relationship between adjacent pixels within the local range of the pixel points can be divided into similarity and dissimilarity, and the adjacent pixels in similar relationship can be divided into pixels inside two different tissues. Therefore, in the grayscale co-occurrence matrix of the local range of the pixel points located at the edge of each tissue, the non-zero elements will be concentrated in 3 distributions, and two non-zero elements will be distributed around the main diagonal of the grayscale co-occurrence matrix, and one non-zero element will not be around the main diagonal of the grayscale co-occurrence matrix. Therefore, this can be used as a basis to obtain the edge features of the pixels in the cerebral angiography image.
[0031] Preferably, in one embodiment of the present invention, for any pixel point in any cerebral angiography image, the area composed of local pixel points of the pixel point is recorded as the local area of the pixel point, and the horizontal right direction is the 0° direction and the vertical upward direction is the 90° direction, the gray level co-occurrence matrix of the local area of the pixel point in the directions of 0°, 45°, 90°, and 135° is obtained, and the diagonal line in the 135° direction of each gray level co-occurrence matrix is recorded as the main diagonal line of each gray level co-occurrence matrix, such as Figure 3 As shown, Figure 3 Schematic diagram of the gray level co-occurrence matrix of the local area of the pixel point in the 0° direction; since the gray level co-occurrence matrix is a well-known prior art, it will not be described in detail in this embodiment.
[0032] It should be noted that since the value of each element in the grayscale co-occurrence matrix is obtained by the grayscale value of the pixel in the cerebral angiography image; in the grayscale co-occurrence matrix, each non-zero element has a corresponding pixel in the image, and since there is noise in the cerebral angiography image, the greater the normality of a pixel, the lower the possibility that the pixel is noise and the higher its reference value. Therefore, when clustering the non-zero elements in the grayscale co-occurrence matrix, clustering by assigning a large weight to the non-zero elements corresponding to the pixels with a large normality can reduce the interference caused by noise.
[0033] For any non-zero element in the gray level co-occurrence matrix of the local area of the pixel point at 0°, mark the pixel point corresponding to the non-zero element in the local area of the pixel point as a marked pixel point, and take the product of the mean of the normal degree of all marked pixels and the non-zero element as the clustering weight of the non-zero element; Similarly, the clustering weight of any non-zero element in the gray level co-occurrence matrix of the local area of the pixel at 90° direction is obtained; Using the improved k-means clustering algorithm, and setting the K value in the improved k-means clustering algorithm to 3, clustering all non-zero elements in the gray-level co-occurrence matrix, and obtaining three clusters in the gray-level co-occurrence matrix. The specific clustering process of the improved k-means clustering algorithm is as follows: Three initial cluster centers are randomly set in the gray-level co-occurrence matrix of the local area of the pixel point at 0° direction. For any non-zero element, the weighted distance between the non-zero element and each initial cluster center is obtained, and the weight is the clustering weight of the non-zero element. The initial cluster center corresponding to the minimum weighted distance is used as the cluster center to which the non-zero element belongs. Similarly, the cluster center to which each non-zero element belongs is obtained, and the non-zero elements belonging to the same cluster center are classified into the same initial cluster; Furthermore, for any initial cluster, the weighted center of the initial cluster is obtained according to the position coordinates of all non-zero elements in the initial cluster in the gray level co-occurrence matrix and the clustering weight; The specific calculation formula of the weighted center is: In the formula, Represents the horizontal coordinate of the weighted center of the initial cluster in the gray-level co-occurrence matrix; Represents the ordinate of the weighted center of the initial cluster in the gray-level co-occurrence matrix; Indicates the first The cluster weights of the non-zero elements; Indicates the first The horizontal coordinate of the non-zero elements in the gray-level co-occurrence matrix; Indicates the first The ordinate of the non-zero element in the gray-level co-occurrence matrix; Represents the number of non-zero elements in the initial cluster.
[0034] The weighted center in each initial cluster is obtained, and the weighted center in each initial cluster is used as a new cluster center. According to the weighted distance between the new cluster center and the non-zero element, the weighted center is iteratively obtained until the position of the weighted center does not change, and three clusters in the gray-level co-occurrence matrix of the local area of the pixel in the 0° direction are obtained.
[0035] Similarly, three clusters in the gray-level co-occurrence matrix of the local area of the pixel at 0°, 45°, 90°, and 135° directions are obtained.
[0036] For the three clusters in the gray-level co-occurrence matrix at 0° in the local area of any pixel, obtain the distance between the weighted center of each cluster and the main diagonal of the gray-level co-occurrence matrix, record the cluster with the largest distance as the edge cluster, and record the remaining clusters as internal clusters; obtain the edge features of the pixel in the 0° direction by adding the distance from the weighted center of the two internal clusters to the main diagonal of the gray-level co-occurrence matrix and the distance from the weighted center of the edge cluster to the main diagonal of the gray-level co-occurrence matrix. The specific formula is: In the formula, Indicates the edge features of the pixel in the 0° direction; Represents the distance between the weighted center of the edge cluster and the main diagonal; Represents the distance from the weighted center of the first internal cluster to the main diagonal; Represents the distance from the weighted center of the second inner cluster to the main diagonal; represents the internal cluster distance; Represents the sigmoid function.
[0037] Similarly, the edge features of the pixels in the directions of 45°, 90°, and 135° are obtained.
[0038] It should be noted that the edge feature of a pixel represents the possibility that the pixel is an edge pixel. It represents the distance between the clusters composed of non-zero elements that are not around the main diagonal of the gray-level co-occurrence matrix and the main diagonal of the gray-level co-occurrence matrix. and The clusters of non-zero elements around the main diagonal of the gray-level co-occurrence matrix are located at the distance from the main diagonal of the gray-level co-occurrence matrix; when the pixel is located at the edge of the tissue, the non-zero elements in the gray-level co-occurrence matrix of the local area of the pixel will be concentrated in 3 places, and two non-zero elements will be distributed around the main diagonal of the gray-level co-occurrence matrix, and one non-zero element will not be around the main diagonal of the gray-level co-occurrence matrix. Therefore The larger the value of The smaller the value is, the more it conforms to the characteristics of the pixel as an edge pixel, and the greater the possibility that the pixel is an edge pixel.
[0039] At this point, the edge features of each pixel in the cerebral angiography image in the directions of 0°, 45°, 90°, and 135° are obtained.
[0040] Step S003: Divide each cerebral angiography image into several sub-images; obtain the approximate extension direction of the cerebral blood vessels in the sub-image according to the edge features of each pixel in the sub-image; obtain the possibility that each pixel in the sub-image is a cerebral blood vessel edge pixel according to the approximate extension direction of the cerebral blood vessels in the sub-image and the gradient value and gradient direction of each pixel in the sub-image.
[0041] It should be noted that since the distribution direction of cerebral blood vessels in the local range of the cerebral angiography image has a certain co-directionality, that is, the cerebral blood vessels generally extend in one direction, the cerebral angiography image can be divided into several cerebral angiography sub-images to obtain the approximate extension direction of the cerebral blood vessels in the sub-image, and the possibility of each pixel being a cerebral blood vessel edge pixel is quantified according to the similarity between the extension direction of each pixel point and the approximate extension direction of the cerebral blood vessels.
[0042] It should be further explained that the direction of the gray-level co-occurrence matrix can sensitively detect edges perpendicular to the direction, but cannot detect edges parallel to the direction. Therefore, when the edge of the cerebral blood vessels in the sub-image is similar to the direction of the gray-level co-occurrence matrix, the edge features of the cerebral blood vessel pixels in the sub-image in the direction are small, and the edge features of the remaining pixels in the sub-image in the direction are slightly different. Therefore, the approximate extension direction of the cerebral blood vessels in the sub-image can be obtained based on the edge features of all pixels in the sub-image in different directions.
[0043] Preferably, in one embodiment of the present invention, a preset Each cerebral angiography image is divided into several sub-images of size The sub-image of The specific value of can be set according to the actual situation, and this embodiment does not limit it. Give a narrative.
[0044] For any sub-image, according to the edge features of all pixels in the sub-image in the 0° direction, the possibility of obtaining the 0° direction as the approximate extension direction of the cerebral blood vessels in the sub-image is obtained. The specific calculation formula is: In the formula, Indicates the possibility that the 0° direction is the approximate extension direction of the cerebral blood vessels in the sub-image; Indicates the number of pixels in the sub-image; Represents the mean value of the edge features of all pixels in the sub-image in the 0° direction; Indicates the sub-image The edge features of the pixels in the 0° direction; It represents the absolute value function; Represents an exponential function with a natural constant as the base; this embodiment adopts Model to present inverse proportional relationship and normalization processing, As the input of the model, the implementer can set the inverse proportional function and normalization function according to the actual situation.
[0045] Similarly, the possibility of 45°, 90°, and 135° directions being the approximate extension directions of the cerebral blood vessels in the sub-image is obtained, and the direction corresponding to the maximum value among the possibilities of 0°, 45°, 90°, and 135° directions being the approximate extension directions of the cerebral blood vessels in the sub-image is taken as the approximate extension direction of the cerebral blood vessels in the sub-image.
[0046] It should be noted that The larger the value is, the more concentrated the edge features of all pixels in the sub-image in the 0° direction are, that is, the approximate extension direction of the cerebral blood vessels in the sub-image is closer to the 0° direction. Similarly, the possibility of obtaining the remaining directions as the approximate extension directions of the cerebral blood vessels in the sub-image is obtained, and the direction with the greatest possibility is the approximate extension direction of the cerebral blood vessels in the sub-image.
[0047] It should be further explained that, since contrast agent is injected into the cerebral blood vessels in the cerebral angiography image, the gradient value of the edge pixel points of the cerebral blood vessels will be much larger than the gradient value of the edge pixel points between the tissues. Since the gradient direction of the edge pixel points will be perpendicular to the extension direction of the edge pixel points, the larger the gradient of the pixel points in the sub-image and the more perpendicular the gradient direction of the pixel points in the sub-image is to the approximate extension direction of the cerebral blood vessels in the sub-image, the greater the possibility that the pixel points in the sub-image are the edge pixels of the cerebral blood vessels. Therefore, based on this, the possibility of each pixel point in the sub-image being the edge pixel point of the cerebral blood vessels can be obtained.
[0048] Preferably, in one embodiment of the present invention, for any pixel point in any sub-image, the possibility of the pixel point being a pixel point at the edge of a cerebral blood vessel is obtained according to the approximate extension direction of the cerebral blood vessel in the sub-image and the gradient value and gradient direction of the pixel point, and the specific calculation formula is: In the formula, Indicates the sub-image The possibility that the pixel is the edge pixel of the cerebral blood vessel; Indicates the sub-image The gradient value of each pixel; Indicates the maximum gradient value in the cerebral angiography image; Indicates the sub-image The angle between the gradient direction of each pixel and the approximate extension direction of the cerebral blood vessels in the sub-image; Represents the sine function.
[0049] It should be noted that The larger the value of is, the The larger the gradient value of each pixel; The larger the value of is, the more perpendicular the gradient direction of the pixel in the sub-image is to the approximate extension direction of the cerebral blood vessels in the sub-image. The larger the value of The more pixels there are, the more likely they are cerebrovascular edge pixels.
[0050] At this point, the possibility that all pixels are cerebral blood vessel edge pixels is obtained.
[0051] Step S004: According to the possibility that the pixel is a pixel at the edge of a cerebral blood vessel, a smoothing parameter is assigned to each pixel and denoising is performed on the cerebral angiography image.
[0052] It should be noted that the ultimate goal of this implementation is to retain the details in the cerebral angiography image while achieving denoising of the cerebral angiography image, and the edges of the cerebral blood vessel walls in the cerebral angiography image contain the most detail features. Therefore, when denoising the cerebral angiography image, the greater the possibility that the pixel point is a pixel point on the edge of the cerebral blood vessel wall, a smaller smoothing parameter should be assigned to retain its detail features. The smoothing parameter is a parameter in the non-local mean filtering algorithm, and the smaller the smoothing parameter, the more detail features can be retained.
[0053] Preferably, in a specific embodiment of the present invention, an initial smoothing parameter is preset , The specific value of can be set according to the actual situation. This embodiment does not make a hard requirement. For example, for any pixel point, the product of the inverse normalized result of the possibility that the pixel point is a cerebral blood vessel edge pixel point and the initial smoothing parameter is used as the smoothing parameter of the pixel point. The specific calculation formula is: In the formula, Represents the smoothing parameter of the pixel; Indicates the possibility that the pixel is the edge pixel of the cerebral blood vessel; Represents the preset initial smoothing parameter; Represents an exponential function with a natural constant as the base; this embodiment adopts Model to present inverse proportional relationship and normalization processing, As the input of the model, the implementer can set the inverse proportional function and normalization function according to the actual situation.
[0054] Similarly, the smoothing coefficients of all pixels in each cerebral angiography image are obtained, and each cerebral angiography image is denoised using a non-local mean filtering algorithm combined with the smoothing parameters of all pixels in each cerebral angiography image. Since the non-local mean filtering algorithm is a well-known prior art, it will not be described in detail in this embodiment.
[0055] Furthermore, after denoising each cerebral angiography image, the cerebral blood vessels in the cerebral angiography image can be segmented by the region growing method; the blood flow velocity can be estimated by the time density curve method to check the patient's blood dynamics.
[0056] It should be noted that the region growing method and the time density curve method are both well-known existing technologies, and therefore will not be described in detail in this embodiment.
[0057] At this point, this embodiment is completed.
[0058] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for determining blood dynamics in cerebral angiography X-ray examination, characterized in that: The method comprises the following steps: Acquire the cerebral angiography images collected at each moment; According to the grayscale difference between each pixel in the cerebral angiography image and the corresponding pixel in the adjacent cerebral angiography image, the normality of each pixel in the cerebral angiography image is obtained; according to the pixels around the pixel, the grayscale co-occurrence matrix of the local area of the pixel in different directions is obtained, and the clustering weight of each non-zero element in the grayscale co-occurrence matrix is obtained by combining the normality of the pixel and the surrounding pixels; according to the position coordinates and clustering weight of each non-zero element in the grayscale co-occurrence matrix, all non-zero elements are clustered to obtain several clusters; according to the distribution position of each cluster in the grayscale co-occurrence matrix, the edge features of the pixel are obtained; Each cerebral angiography image is divided into several sub-images; according to the edge features of each pixel point in the sub-image, the approximate extension direction of the cerebral blood vessels in the sub-image is obtained; according to the approximate extension direction of the cerebral blood vessels in the sub-image, the possibility of each pixel point in the sub-image being a pixel point at the edge of the cerebral blood vessel is obtained by combining the gradient value and gradient direction of each pixel point in the sub-image; According to the possibility that the pixel is the edge pixel of cerebral blood vessels, a smoothing parameter is assigned to each pixel and the cerebral angiography image is denoised.
2. A method for determining blood dynamics for cerebral angiography X-ray examination according to claim 1, characterized in that: The specific method of obtaining the normality of each pixel in the cerebral angiography image includes: For any cerebral angiography image, a cerebral angiography image acquired at a time adjacent to the acquisition time of the cerebral angiography image is recorded as a comparison image of the cerebral angiography image; Recording any pixel point in the cerebral angiography image as a target pixel point, and recording the pixel point in the contrast image of the cerebral angiography image having the same coordinate position as the target pixel point as a relevant pixel point; A local window is constructed with the target pixel as the center; the pixels in the local window are recorded as local pixels of the target pixel; Obtain local pixel points of relevant pixels; According to the grayscale difference between the local pixel point of the target pixel point and the local pixel point of the related pixel point, the normality of the target pixel point is obtained, and the normality of the target pixel point is negatively correlated with the grayscale difference.
3. A method for determining blood dynamics in cerebral angiography X-ray examination according to claim 2, characterized in that: The specific method of obtaining the gray level co-occurrence matrix of the local area of the pixel points in different directions includes: For any pixel point in any cerebral angiography image, the area composed of the local pixel points of the pixel point is recorded as the local area of the pixel point, the grayscale co-occurrence matrix of the local area of the pixel point in the directions of 0°, 45°, 90°, and 135° is obtained, and the diagonal line in the 135° direction of each grayscale co-occurrence matrix is recorded as the main diagonal line of each grayscale co-occurrence matrix.
4. A method for determining blood dynamics for cerebral angiography X-ray examination according to claim 1, characterized in that: The specific method of obtaining the clustering weight of each non-zero element in the gray level co-occurrence matrix includes: For any non-zero element in the gray level co-occurrence matrix of the local area of the pixel point at 0°, mark the pixel point corresponding to the non-zero element in the local area of the pixel point as a marked pixel point, and take the product of the mean of the normal degree of all marked pixels and the non-zero element as the clustering weight of the non-zero element; Get the clustering weight of any non-zero element in the gray level co-occurrence matrix of the local area of the pixel at 90°.
5. The method for determining blood dynamics for cerebral angiography X-ray examination according to claim 1, characterized in that: The method of clustering all non-zero elements according to the position coordinates and clustering weights of each non-zero element in the gray level co-occurrence matrix to obtain several clusters includes the following specific methods: Three initial cluster centers are randomly set in the gray-level co-occurrence matrix of the local area of the pixel point at 0° direction. For any non-zero element, the weighted distance between the non-zero element and each initial cluster center is obtained, and the weight is the clustering weight of the non-zero element. The initial cluster center corresponding to the minimum weighted distance is used as the cluster center to which the non-zero element belongs. Get the cluster center to which each non-zero element belongs, and classify the non-zero elements belonging to the same cluster center into the same initial cluster; For any initial cluster, the weighted center of the initial cluster is obtained according to the position coordinates of all non-zero elements in the initial cluster in the gray-level co-occurrence matrix and the clustering weight; Get the weighted center in each initial cluster, take the weighted center in each initial cluster as a new cluster center, iterate and obtain the weighted center according to the weighted distance between the new cluster center and the non-zero element, until the position of the weighted center does not change, and get 3 clusters in the gray level co-occurrence matrix of the local area of the pixel point in the 0° direction; Get the three clusters in the gray level co-occurrence matrix of the local area of the pixel at 90°.
6. A method for determining blood dynamics in cerebral angiography X-ray examination according to claim 1, characterized in that: The specific method of obtaining the edge features of the pixel points includes: For the three clusters in the gray-level co-occurrence matrix in the 0° direction of the local area of any pixel, obtain the distance between the weighted center of each cluster and the main diagonal of the gray-level co-occurrence matrix, record the cluster with the largest distance as the edge cluster, and record the remaining clusters as internal clusters; the sum of the distances between the weighted centers of the two internal clusters and the main diagonal of the gray-level co-occurrence matrix is recorded as the internal cluster distance, and the ratio of the distance between the weighted center of the edge cluster and the main diagonal of the gray-level co-occurrence matrix to the internal cluster distance is normalized, and the normalized result is used as the edge feature of the pixel in the 0° direction; Get the edge features of the pixel points in the 45°, 90°, and 135° directions.
7. A method for determining blood dynamics in cerebral angiography X-ray examination according to claim 1, characterized in that: The specific method of dividing each cerebral angiography image into a plurality of sub-images includes: Preset one Each cerebral angiography image is divided into several sub-images of size sub-image of .
8. The method for determining blood dynamics for cerebral angiography X-ray examination according to claim 1, characterized in that: The method of obtaining the approximate extension direction of the cerebral blood vessels in the sub-image includes: For any sub-image, according to the edge features of all pixels in the sub-image in the 0° direction, the possibility of obtaining the 0° direction as the approximate extension direction of the cerebral blood vessels in the sub-image is obtained. The specific calculation formula is: In the formula, Indicates the possibility that the 0° direction is the approximate extension direction of the cerebral blood vessels in the sub-image; Indicates the number of pixels in the sub-image; Represents the mean value of the edge features of all pixels in the sub-image in the 0° direction; Indicates the sub-image The edge features of the pixels in the 0° direction; It represents the absolute value function; represents an exponential function with a natural constant as base; The possibility of 45°, 90°, and 135° directions being the approximate extension directions of the cerebral blood vessels in the sub-image is obtained, and the direction corresponding to the maximum value among the possibilities of 0°, 45°, 90°, and 135° directions being the approximate extension directions of the cerebral blood vessels in the sub-image is taken as the approximate extension direction of the cerebral blood vessels in the sub-image.
9. A method for determining blood dynamics in cerebral angiography X-ray examination according to claim 1, characterized in that: The method of obtaining the possibility that each pixel point in the sub-image is a pixel point at the edge of a cerebral blood vessel includes: For any pixel point in any sub-image, the possibility of obtaining the pixel point as a pixel point at the edge of the cerebral blood vessel is obtained according to the approximate extension direction of the cerebral blood vessel in the sub-image and the gradient value and gradient direction of the pixel point. The specific calculation formula is: In the formula, Indicates the sub-image The possibility that the pixel is the edge pixel of the cerebral blood vessel; Indicates the sub-image The gradient value of each pixel; Indicates the maximum gradient value in the cerebral angiography image; Indicates the sub-image The angle between the gradient direction of each pixel and the approximate extension direction of the cerebral blood vessels in the sub-image; Represents the sine function.
10. The method for determining blood dynamics in cerebral angiography X-ray examination according to claim 1, characterized in that: The specific method of assigning a smoothing parameter to each pixel and denoising the cerebral angiography image includes: An initial smoothing parameter is preset, and for any pixel point, the product of the inversely proportional normalized result of the possibility that the pixel point is a cerebral blood vessel edge pixel point and the initial smoothing parameter is used as the smoothing parameter of the pixel point; The smoothing coefficients of all pixels in each cerebral angiography image are obtained, and each cerebral angiography image is denoised by using a non-local mean filtering algorithm combined with the smoothing parameters of all pixels in each cerebral angiography image.
Citation Information
Patent Citations
Focus area segmentation method for cardiovascular and cerebrovascular radiography
CN115661135A
Human brain image segmentation method based on watershed algorithm
CN117994271A
Medical image segmentation method for intracranial arteriosclerosis plaque of atrial fibrillation patient
CN118379313A
Method for detecting cognitive function obstruction of diabetic patient based on MRI image
CN119112120A
CT angiography clear imaging method and system for diabetic foot patient
CN119152065A
Cited By
Automatic identification method for arthropathy in motion medical image
CN120279028A