A method for determining hemodynamics in cerebral angiography X-ray examination
By dynamically imparting pixel point smoothing parameters in cerebral angiography images, combining grayscale symbiosis matrix and normality, the problem of traditional noise reduction algorithms losing detailed features is solved, and a more accurate hemodynamic examination is achieved.
Patent Information
- Application Number
- CN202510294259.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-06-27
- 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 acquiring the normality and edge characteristics of each pixel point in the cerebral angiography image, combining with the grayscale symbiosis matrix, each pixel point is dynamically assigned smoothing parameters, and then denoising the cerebral angiography image.
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 CN119770068B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and particularly relates to a method for determining blood dynamics for cerebral angiography X-ray examination. Background Art
[0002] Cerebral angiography X-ray examination is an imaging technique widely used in the medical field for evaluating the cerebrovascular system. This examination method combines X-ray imaging and contrast agent injection, and can clearly show the morphology and flow state of cerebral blood vessels, thus helping to diagnose and treat cerebrovascular diseases. However, during the process of obtaining cerebral angiography images by X-rays, electronic noise will be generated due to the thermal motion and electronic fluctuations of the detector's electronic components. In order to more accurately examine blood dynamics based on cerebral angiography images, it is necessary to denoise the cerebral angiography images.
[0003] During the process of denoising cerebral angiography images with traditional filtering denoising algorithms, when using the non-local means filtering algorithm to denoise cerebral angiography images, the smoothing parameter in the non-local means filtering algorithm is fixed. And the detailed 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 detailed features will be lost, and thus the blood dynamics cannot be accurately examined. Summary of the Invention
[0004] The present invention provides a method for determining blood dynamics for cerebral angiography X-ray examination to solve the existing problem: traditional filtering denoising algorithms will lose some detailed features during the process of denoising cerebral angiography images.
[0005] The method for determining blood dynamics for cerebral angiography X-ray examination of the present invention adopts the following technical solutions:
[0006] Including the following steps:
[0007] Obtain the cerebral angiography images collected at each moment;
[0008] According to the gray-scale difference between each pixel point in the cerebral angiography image and the corresponding pixel point in the adjacent cerebral angiography image, obtain the normality degree of each pixel point in the cerebral angiography image; according to the pixel points around the pixel point, obtain the gray-level co-occurrence matrices in different directions of the local area of the pixel point, and combine the normality degree of the pixel point and the surrounding pixel points to obtain the clustering weights of each non-zero element in the gray-level co-occurrence matrix; according to the position coordinates and clustering weights of each non-zero element in the gray-level co-occurrence matrix, cluster all non-zero elements to obtain several clusters; according to the distribution positions of each cluster in the gray-level co-occurrence matrix, obtain the edge features of the pixel point;
[0009] Divide each cerebral angiography image into several sub-images; according to the edge features of each pixel in the sub-image, obtain the approximate extension direction of the cerebral blood vessels in the sub-image; according to the approximate extension direction of the cerebral blood vessels in the sub-image, combine the gradient value and gradient direction of each pixel in the sub-image to obtain the possibility that each pixel in the sub-image is a cerebral blood vessel edge pixel;
[0010] According to the possibility that the pixel is a cerebral blood vessel edge pixel, assign a smoothing parameter to each pixel and denoise the cerebral angiography image.
[0011] Preferably, the specific method for obtaining the normality degree of each pixel in the cerebral angiography image includes:
[0012] For any cerebral angiography image, the cerebral angiography image collected at the adjacent moment of the acquisition moment of the cerebral angiography image is denoted as the comparison image of the cerebral angiography image;
[0013] Denote any pixel in the cerebral angiography image as the target pixel, and use the pixel with the same coordinate position as the target pixel in the comparison image of the cerebral angiography image as the relevant pixel;
[0014] With the target pixel as the center, construct a local window; denote the pixels within the local window as the local pixels of the target pixel; obtain the local pixels of the relevant pixel;
[0015] According to the gray level difference between the local pixels of the target pixel and the local pixels of the relevant pixel, obtain the normality degree of the target pixel, and the normality degree of the target pixel has a negative correlation with the gray level difference.
[0016] Preferably, the specific method for obtaining the gray level co-occurrence matrix in different directions of the local region of the pixel includes:
[0017] For any pixel in any cerebral angiography image, denote the region composed of the local pixels of the pixel as the local region of the pixel, obtain the gray level co-occurrence matrices in the 0°, 45°, 90°, and 135° directions of the local region of the pixel, and denote the diagonal line in the 135° direction in each gray level co-occurrence matrix as the main diagonal line of each gray level co-occurrence matrix.
[0018] Preferably, the specific method for obtaining the clustering weight of each non-zero element in the gray level co-occurrence matrix includes:
[0019] For any non-zero element in the gray-level co-occurrence matrix in the 0° direction of the local area of a pixel, mark the pixel corresponding to the non-zero element in the local area of the pixel as the marked pixel, and take the product of the mean value of the normal degree of all marked pixels and the non-zero element as the clustering weight of the non-zero element;
[0020] Obtain the clustering weight of any non-zero element in the gray-level co-occurrence matrix in the 90° direction of the local area of a pixel.
[0021] Preferably, the method for 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 method:
[0022] Randomly set 3 initial clustering centers in the gray-level co-occurrence matrix in the 0° direction of the local area of a pixel. For any non-zero element, obtain the weighted distance between the non-zero element and each initial clustering center, where the weight is the clustering weight of the non-zero element, and take the initial clustering center corresponding to the smallest weighted distance as the clustering center to which the non-zero element belongs;
[0023] Obtain the clustering center to which each non-zero element belongs, and group the non-zero elements belonging to the same clustering center into the same initial cluster;
[0024] For any initial cluster, obtain the weighted center of the initial cluster according to the position coordinates and clustering weights of all non-zero elements in the gray-level co-occurrence matrix;
[0025] Obtain the weighted center in each initial cluster, take the weighted center in each initial cluster as a new clustering center, and iteratively obtain the weighted center according to the weighted distance between the new clustering center and the non-zero element until the position of the weighted center does not change, and obtain 3 clusters in the gray-level co-occurrence matrix in the 0° direction of the local area of a pixel;
[0026] Obtain 3 clusters in the gray-level co-occurrence matrix in the 90° direction of the local area of a pixel.
[0027] Preferably, the method for obtaining the edge feature of a pixel includes the following specific method:
[0028] For the 3 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, mark the cluster with the largest distance as the edge cluster, and mark the remaining clusters as the internal clusters; denote 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 as the internal cluster distance, normalize 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, and take the normalized result as the edge feature of the pixel in the 0° direction;
[0029] Obtain the edge features of the pixel points in the 45°, 90°, and 135° directions.
[0030] Preferably, the method of dividing each cerebral angiography image into several sub-images includes the following specific steps:
[0031] Preset a sub-image specification of a size, and divide each cerebral angiography image into several sub-images with a specification of .
[0032] Preferably, the method of obtaining the approximate extension direction of the cerebral blood vessels in the sub-image includes the following specific steps:
[0033] For any sub-image, according to the edge features of all pixel points in the sub-image in the 0° direction, obtain the possibility that the 0° direction is the approximate extension direction of the cerebral blood vessels in the sub-image. The specific calculation formula is:
[0034]
[0035] In the formula, represents the possibility that the 0° direction is the approximate extension direction of the cerebral blood vessels in the sub-image; represents the number of pixel points in the sub-image; represents the mean value of the edge features of all pixel points in the sub-image in the 0° direction; represents the th pixel point in the sub-image in the 0° direction; represents the absolute value function; represents the exponential function with the natural constant as the base;
[0036] Obtain the possibilities that the 45°, 90°, and 135° directions are the approximate extension directions of the cerebral blood vessels in the sub-image, and take the direction corresponding to the maximum value among the possibilities that the 0°, 45°, 90°, and 135° directions are the approximate extension directions of the cerebral blood vessels in the sub-image as the approximate extension direction of the cerebral blood vessels in the sub-image.
[0037] Preferably, the method of obtaining the possibility that each pixel point in the sub-image is an edge pixel point of the cerebral blood vessels includes the following specific steps:
[0038] For any pixel point in any sub-image, according to the approximate extension direction of the cerebral blood vessels in the sub-image and the gradient value and gradient direction of the pixel point, obtain the possibility that the pixel point is an edge pixel point of the cerebral blood vessels. The specific calculation formula is:
[0039]
[0040] In the formula, represents the The possibility that a pixel is a pixel on the edge of the cerebral blood vessel; Denote the gradient value of the th pixel in the sub-image; Denote the maximum gradient value in the cerebral angiogram image; Denote the angle between the gradient direction of the th pixel in the sub-image and the general extension direction of the cerebral blood vessels in the sub-image;
[0041] Preferably, the method of assigning a smoothing parameter to each pixel and denoising the cerebral angiogram image includes the following specific steps:
[0042] Preset an initial smoothing parameter. For any pixel, use the product of the inverse normalization result of the possibility that the pixel is a pixel on the edge of the cerebral blood vessel and the initial smoothing parameter as the smoothing parameter of the pixel;
[0043] Obtain the smoothing coefficients of all pixels in each cerebral angiogram image, and use the non-local means filtering algorithm to denoise each cerebral angiogram image in combination with the smoothing parameters of all pixels in each cerebral angiogram image.
[0044] The beneficial effects of the technical solution of the present invention are as follows: Since the noise in the cerebral angiogram images collected at adjacent times changes violently, while the normal pixels do not change violently, the present invention obtains the normality of each pixel in the cerebral angiogram image according to the gray-scale difference between each pixel in the cerebral angiogram image and the corresponding pixel in the adjacent cerebral angiogram image; and because the texture in the cerebral angiogram image is rich, using the gray-level co-occurrence matrix to obtain the edge features of the pixels has better robustness. Therefore, in this embodiment, the edge features of the pixels are obtained by combining the gray-level co-occurrence matrix with the normality of the pixels.
[0045] Moreover, since the distribution directions of the cerebral blood vessels have a certain co-directionality within the local range of the cerebral angiogram image, that is, the cerebral blood vessels generally extend along one direction, each cerebral angiogram image can be divided into several sub-images. According to the similarity between the extension direction of the edge pixels in the sub-image and the general extension direction of the cerebral blood vessels along one direction, the possibility that each pixel in the sub-image is a pixel on the edge of the cerebral blood vessel is obtained, and a smoothing parameter is assigned to each pixel for denoising, which realizes the retention of the detailed features in the cerebral angiogram image while removing the noise, improves the image quality of the cerebral angiogram image, and thus improves the accuracy of examining blood dynamics. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0047] Figure 1 It is a flowchart of the steps of a method for determining blood dynamics in cerebral angiography x-ray examination according to the present invention;
[0048] Figure 2 It is a schematic diagram of local pixels of the target pixel point and related pixel points;
[0049] Figure 3 It is a schematic diagram of the gray-level co-occurrence matrix in the 0° direction of the local area of the pixel point. Detailed implementation manners
[0050] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following, in combination with the accompanying drawings and preferred embodiments, details the specific implementation manners, structures, features and effects of a method for determining blood dynamics in cerebral angiography x-ray examination according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.
[0052] The following specifically describes the specific solution of a method for determining blood dynamics in cerebral angiography x-ray examination provided by the present invention in combination with the accompanying drawings.
[0053] Please refer to Figure 1 , which shows a flowchart of the steps of a method for determining blood dynamics in cerebral angiography x-ray examination provided by an embodiment of the present invention. The method includes the following steps:
[0054] Step S001: Obtain cerebral angiography images collected at each moment.
[0055] It should be noted that, as a method for determining blood dynamics for cerebral angiography X-ray examination in this embodiment, 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, during the process of obtaining cerebral angiography images by X-rays, 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 cerebral angiography images. Therefore, in this embodiment, the cerebral angiography images are denoised to improve the image quality of cerebral angiography images. Therefore, it is first necessary to obtain cerebral angiography images.
[0056] Specifically, the contrast agent is injected into the cerebral blood vessels of the patient, and the cerebral angiography images of the patient at each moment are collected by an X-ray device, and the sampling interval is set to 1 second.
[0057] Step S002: Obtain the normality degree of each pixel point in the cerebral angiography image according to the gray-scale difference between each pixel point in the cerebral angiography image and the corresponding pixel point in the adjacent cerebral angiography image; obtain the gray-scale co-occurrence matrix in different directions of the local area of the pixel point according to the pixel points around the pixel point, and combine the normality degree of the pixel point and the surrounding pixel points to obtain the clustering weight of each non-zero element in the gray-scale co-occurrence matrix; cluster all non-zero elements according to the position coordinates and clustering weights of each non-zero element in the gray-scale co-occurrence matrix to obtain several clusters; obtain the edge feature of the pixel point according to the distribution position of each cluster in the gray-scale co-occurrence matrix.
[0058] It should be noted that since directly performing denoising with a filtering denoising algorithm will make the edges of each tissue in the cerebral angiography image blurred, it is necessary to obtain the edge feature of each pixel point in the cerebral angiography image and allocate the filtering weight between pixel points according to the edge feature; when obtaining the edge feature of the pixel point, in order to avoid noise interference and more accurately obtain the edge feature of the pixel point, it is also necessary to obtain the normality degree of the pixel point. And the noise in the cerebral angiography image is mainly the 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 violently, while the normal pixel points will not change violently. Therefore, the normality degree of the pixel point can be obtained according to the difference between the cerebral angiography images collected at adjacent moments; and since the texture in the cerebral angiography image is rich, using the gray-scale co-occurrence matrix to obtain the edge feature of the pixel point has better robustness. Therefore, in this embodiment, the edge feature of the pixel point is obtained by combining the gray-scale co-occurrence matrix with the normality degree of the pixel point.
[0059] Preferably, in an embodiment of the present invention, for any cerebral angiography image, the cerebral angiography images collected at adjacent times to the acquisition time of the cerebral angiography image, that is, the cerebral angiography images collected at the adjacent previous time and the adjacent subsequent time, are denoted as the comparison images of the cerebral angiography image;
[0060] Denote any pixel point in the cerebral angiography image as the target pixel point, and take the pixel point with the same coordinate position as the target pixel point in the comparison image of the cerebral angiography image as the relevant pixel point;
[0061] Taking the target pixel point as the center, construct a sized local window, The specific value of can be set by oneself according to the actual situation, which is not limited in this embodiment. In this embodiment, it is described by taking as an example; Denote the pixel points within the local window as the local pixel points of the target pixel point; Similarly, obtain the local pixel points of the relevant pixel points. As shown in Figure 2 , Figure 2 is a schematic diagram of the local pixel points of the target pixel point and the relevant pixel point; It should be specifically noted that if the local window of the target pixel point or the relevant pixel point exceeds the boundary of the cerebral angiography image, the local window is complemented by bilinear interpolation;
[0062] According to the gray - scale difference between the local pixel points of the target pixel point and the local pixel points of the relevant pixel point, obtain the normality of the target pixel point, and the normality of the target pixel point has a negative correlation with the gray - scale difference.
[0063] In an example, its specific calculation formula is:
[0064]
[0065] In the formula, represents the normality of the target pixel point; represents the number of relevant pixel points; represents the number of local pixel points; represents the gray - scale value of the th local pixel point of the target pixel point; represents the th relevant pixel point's th local pixel point's gray - scale value; represents the absolute - value removal function, represents the exponential function with the natural constant as the base; This embodiment uses the model to present the inverse - proportion relationship and normalization processing, is the input of the model, and the implementer can set the inverse - proportion function and the normalization function according to the actual situation.
[0066] It should be noted that, due to the drastic change in the noise in the cerebral angiography images collected at adjacent moments, while the normal pixel points do not change drastically. Therefore, the smaller the degree of difference between the local pixel points of the target pixel point and the local pixel points of the relevant pixel points, the less likely the target pixel point is to be noise; and it represents the difference between the local pixel points of the target pixel point and the local pixel points of the relevant pixel points. Therefore, the larger the value of , the less likely the target pixel point is to be noise, that is, the more normal the target pixel point is.
[0067] It should be further noted that within the local range of the pixel points at the edges of each tissue, there are two kinds of tissues. The pixel points within the tissue are similar, while the pixel points within different tissues are not similar. That is, the relationship between adjacent pixel points within the local range of the pixel points can be divided into two types: similar and dissimilar. Among the adjacent pixel points with a similar relationship, they can be further divided into pixel points within two different tissues. Therefore, in the gray-level co-occurrence matrix of the local range of the pixel points at the edges of each tissue, the non-zero elements will be concentrated in three distributions, 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 edge features of the pixel points in the cerebral angiography image can be obtained based on this.
[0068] Preferably, in an embodiment of the present invention, for any pixel point in any cerebral angiography image, the area composed of the local pixel points of the pixel point is denoted as the local area of the pixel point. Taking the horizontal right direction as the 0° direction and the vertical upward direction as the 90° direction, the gray-level co-occurrence matrices of the local area of the pixel point in the 0°, 45°, 90°, and 135° directions are obtained, and the diagonal line in the 135° direction of each gray-level co-occurrence matrix is respectively denoted as the main diagonal line of each gray-level co-occurrence matrix, as Figure 3 shown, Figure 3 is a schematic diagram of the gray-level co-occurrence matrix of the 0° direction of the local area of the pixel point; Since the gray-level co-occurrence matrix is a well-known prior art, it will not be elaborated in this embodiment.
[0069] It should be noted that since the values of the elements in the gray-level co-occurrence matrix are obtained from the gray values of the pixel points in the cerebral angiography image; in the gray-level co-occurrence matrix, each non-zero element has a corresponding pixel point in the image. Also, due to the existence of noise in the cerebral angiography image, and when the normal degree of a pixel point is greater, the lower the possibility that the pixel point is noise and the higher its reference value. Therefore, when clustering the non-zero elements in the gray-level co-occurrence matrix, by assigning a large weight to the non-zero elements corresponding to the pixel points with a large normal degree for clustering, the interference caused by noise can be reduced.
[0070] For any non-zero element in the gray-level co-occurrence matrix in the 0° direction of the local region of the pixel, mark the pixel corresponding to the non-zero element in the local region of the pixel as the marked pixel, and take the product of the mean of the normal degrees of all marked pixels and the non-zero element as the clustering weight of the non-zero element;
[0071] Similarly, obtain the clustering weight of any non-zero element in the gray-level co-occurrence matrix in the 90° direction of the local region of the pixel;
[0072] Use the improved k-means clustering algorithm, and set the value of K in the improved k-means clustering algorithm to 3, and cluster all non-zero elements in the gray-level co-occurrence matrix to obtain 3 clusters in the gray-level co-occurrence matrix. The specific clustering process of the improved k-means clustering algorithm is as follows:
[0073] Randomly set 3 initial clustering centers in the gray-level co-occurrence matrix in the 0° direction of the local region of the pixel. For any non-zero element, obtain the weighted distance between the non-zero element and each initial clustering center, and its weight is the clustering weight of the non-zero element. Take the initial clustering center corresponding to the smallest weighted distance as the clustering center to which the non-zero element belongs;
[0074] Similarly, obtain the clustering center to which each non-zero element belongs, and group the non-zero elements belonging to the same clustering center into the same initial cluster;
[0075] Furthermore, for any initial cluster, obtain the weighted center of the initial cluster according to the position coordinates and clustering weights of all non-zero elements in the gray-level co-occurrence matrix;
[0076] The specific calculation formula of the weighted center is as follows:
[0077]
[0078] In the formula, represents the abscissa 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; represents the th clustering weight of the non-zero element in the initial cluster; represents the th abscissa of the non-zero element in the initial cluster in the gray-level co-occurrence matrix; represents the th ordinate of the non-zero element in the initial cluster in the gray-level co-occurrence matrix; represents the number of non-zero elements in the initial cluster.
[0079] Obtain the weighted centers in each initial cluster class, use the weighted centers in each initial cluster class as new clustering centers, and iteratively obtain the weighted centers according to the weighted distance between the new clustering centers and non-zero elements until the positions of the weighted centers do not change, so as to obtain three cluster classes in the gray-level co-occurrence matrix in the 0° direction of the local area of the pixel points.
[0080] Similarly, obtain three cluster classes in the gray-level co-occurrence matrices in the 0°, 45°, 90°, and 135° directions of the local area of the pixel points.
[0081] For the three cluster classes in the gray-level co-occurrence matrix in the 0° direction of the local area of any pixel point, obtain the distance between the weighted center of each cluster class and the main diagonal of the gray-level co-occurrence matrix. Denote the cluster class with the largest distance as the edge cluster class, and denote the remaining cluster classes as the internal cluster classes; compare the distances from the weighted centers of the two internal cluster classes to the main diagonal of the gray-level co-occurrence matrix with the distance from the weighted center of the edge cluster class to the main diagonal of the gray-level co-occurrence matrix to obtain the edge feature of the pixel point in the 0° direction. The specific formula is:
[0082]
[0083] In the formula, represents the edge feature of the pixel point in the 0° direction; represents the distance between the weighted center of the edge cluster class and the main diagonal; represents the distance between the weighted center of the first internal cluster class and the main diagonal; represents the distance between the weighted center of the second internal cluster class and the main diagonal; represents the internal cluster class distance; represents the sigmoid function.
[0084] Similarly, obtain the edge features of the pixel point in the 45°, 90°, and 135° directions.
[0085] It should be noted that the edge feature of the pixel point represents the possibility that the pixel point is an edge pixel point. represents the distance between the cluster class 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 distance between the cluster class composed of non-zero elements around the main diagonal of the gray-level co-occurrence matrix and the main diagonal of the gray-level co-occurrence matrix; and when the pixel point is located at the tissue edge, in the gray-level co-occurrence matrix of the local area of the pixel point, the non-zero elements will be concentrated in three distributions, 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, the more it conforms to the characteristics of the pixel being an edge pixel, and the greater the possibility that the pixel is an edge pixel.
[0086] So far, the edge features of each pixel in the cerebral angiogram image in the directions of 0°, 45°, 90°, and 135° are obtained.
[0087] Step S003: Divide each cerebral angiogram image into several sub-images; according to the edge features of each pixel in the sub-image, obtain the approximate extension direction of the cerebral blood vessels in the sub-image; according to the approximate extension direction of the cerebral blood vessels in the sub-image, combine the gradient value and gradient direction of each pixel in the sub-image to obtain the possibility that each pixel in the sub-image is an edge pixel of the cerebral blood vessels.
[0088] It should be noted that since the distribution directions of the cerebral blood vessels have a certain co-directionality within the local range of the cerebral angiogram image, that is, the cerebral blood vessels generally extend along one direction, the cerebral angiogram image can be divided into several cerebral angiogram sub-images, the approximate extension direction of the cerebral blood vessels in the sub-image can be obtained, and the possibility that each pixel is an edge pixel of the cerebral blood vessels can be quantified according to the similarity between the extension direction of each pixel and the approximate extension direction of the cerebral blood vessels.
[0089] It should be further noted that the direction of the gray-level co-occurrence matrix can sensitively detect the edges perpendicular to the direction, but cannot detect the 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 feature of the cerebral blood vessel pixel in the sub-image in the direction is small, and the edge feature difference of the remaining pixels in the sub-image in the direction is small. Therefore, the approximate extension direction of the cerebral blood vessels in the sub-image can be obtained according to the edge features of all pixels in the sub-image in different directions.
[0090] Preferably, in an embodiment of the present invention, a size of the sub-image specification is preset, and each cerebral angiogram image is divided into several sub-images with the specification of The specific value of can be set by itself according to the actual situation, which is not limited in this embodiment. In this embodiment, is described.
[0091] For any sub-image, according to the edge features of all pixels in the sub-image in the 0° direction, obtain the possibility that the 0° direction is the approximate extension direction of the cerebral blood vessels in the sub-image. The specific calculation formula is:
[0092]
[0093] In the formula, represents the possibility that the 0° direction is the approximate extension direction of the cerebral blood vessels in the sub-image; represents the number of pixel points in the sub-image; represents the mean of the edge features of all pixel points in the sub-image in the 0° direction; represents the edge feature of the n-th pixel point in the sub-image in the 0° direction; represents the absolute value function; represents the exponential function with the natural constant as the base; in this embodiment, a model is used to present the inverse proportional relationship and normalization processing, is the input of the model, and the implementer can set the inverse proportional function and normalization function according to the actual situation.
[0094] Similarly, obtain the probabilities that the directions of 45°, 90°, and 135° are the approximate extension directions of cerebral blood vessels in the sub-image. Among the probabilities that the directions of 0°, 45°, 90°, and 135° are the approximate extension directions of cerebral blood vessels in the sub-image, the direction corresponding to the maximum value is used as the approximate extension direction of cerebral blood vessels in the sub-image.
[0095] It should be noted that the larger the value of, the more concentrated the edge features of all pixel points in the sub-image in the 0° direction, that is, the closer the approximate extension direction of cerebral blood vessels in the sub-image is to the 0° direction. Similarly, obtain the probabilities that the other directions are the approximate extension directions of cerebral blood vessels in the sub-image, and the direction with the largest probability is the approximate extension direction of cerebral blood vessels in the sub-image.
[0096] It should be further noted that since a contrast agent is injected into the cerebral blood vessels in the cerebral angiogram, 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 tissues. Also, since the gradient direction of the edge pixel points will be perpendicular to the extension direction of the edge pixel points, when the gradient of the pixel points in the sub-image is larger and the gradient direction of the pixel points in the sub-image is more perpendicular to the approximate extension direction of cerebral blood vessels in the sub-image, the probability that the pixel points in the sub-image are the edge pixel points of the cerebral blood vessels is greater. Therefore, based on this, the probability that each pixel point in the sub-image is the edge pixel point of the cerebral blood vessels can be obtained.
[0097] Preferably, in an embodiment of the present invention, for any pixel point in any sub-image, according to the approximate extension direction of cerebral blood vessels in the sub-image and the gradient value and gradient direction of the pixel point, obtain the probability that the pixel point is the edge pixel point of the cerebral blood vessels. The specific calculation formula is:
[0098]
[0099] In the formula, represents the probability that the n-th pixel point in the sub-image is the edge pixel point of the cerebral blood vessels; 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.
[0100] 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.
[0101] At this point, the possibility that all pixels are cerebral blood vessel edge pixels is obtained.
[0102] 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 the cerebral angiography image is denoised.
[0103] 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.
[0104] 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:
[0105]
[0106] 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 a preset initial smoothing parameter; represents the exponential function with the natural constant as the base; in this embodiment, a model is used to present the inverse proportional relationship and normalization processing, is the input of the model, and the implementer can set the inverse proportional function and the normalization function according to the actual situation.
[0107] Similarly, the smoothing coefficients of all pixel points in each cerebral angiogram image are obtained, and the non-local means filtering algorithm is used to denoise each cerebral angiogram image in combination with the smoothing parameters of all pixel points in each cerebral angiogram image. Since the non-local means filtering algorithm is a well-known prior art, it will not be elaborated in this embodiment.
[0108] Furthermore, after denoising each cerebral angiogram image, the cerebral blood vessels in the cerebral angiogram 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.
[0109] It should be noted that both the region growing method and the time density curve method are well-known prior arts, so they will not be elaborated in this embodiment.
[0110] So far, this embodiment is completed.
[0111] The above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present invention shall 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 the cerebral blood vessel, a smoothing parameter is assigned to each pixel and the cerebral angiography image is denoised; 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 at 45°, 90°, and 135° directions; 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.
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 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 .
7. 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.
8. The method for determining blood dynamics for 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