A method for intelligent enhancement of bone quality CT images
By constructing an analysis window and evaluating the possibility of noise, and intelligently adjusting filter weights, the noise problem caused by scattering in CT images is solved, and the display quality and accuracy of the image are improved.
Patent Information
- Application Number
- CN202410634230.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-05-22
AI Technical Summary
In the existing technology, when CT images are acquired to obtain bone images, scattering may occur when X-rays pass through the muscle tissue on the bone surface, resulting in image noise. During the filtering process, the mean filter algorithm is affected by the filter window due to the filtering result of each pixel. The influence of other pixels within the filter results in deviations in the filtering results and affects the display quality of CT images.
An intelligent enhancement method for bone quality CT images is proposed. By constructing an analysis window for each pixel, the initial filter window parameters of each pixel are obtained, and each pixel is evaluated as a noise pixel based on the gray level and gradient difference characteristics. point possibility, calculate the filter weight, and adjust the filter gray value to obtain more accurate filter results.
It improves the accuracy of filtering results, enhances the display quality of CT images, retains more image details and structural information, and improves the overall quality of the image.
Smart Images

Figure CN118229538B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image enhancement, and in particular to a method for intelligently enhancing bone quality CT images. Background Art
[0002] CT imaging is an imaging technology that uses X-rays. It is often used in the medical field, including neurology, radiology, orthopedics, cardiovascular, etc., to diagnose various diseases and conditions such as tumors, infections, bone analysis, vascular lesions, etc. However, when using CT imaging technology to obtain patient bone images, due to the possibility of scattering of X-rays when passing through the muscle tissue on the surface of the bones, noise may exist in the acquired image, resulting in poor display effect of the acquired image. Therefore, it is necessary to filter the acquired image to improve the image quality.
[0003] In the prior art, a mean filtering algorithm is used to replace the grayscale value of the corresponding pixel after filtering according to the mean of the sum of the grayscale values of other pixels in the filtering window of each pixel, so as to filter the noise caused by scattering in the collected bone quality CT image; since the filtering result of each pixel will be affected by other pixels in the filtering window, if other reference pixels are noise pixels, the pixel after filtering will still have noise, which will lead to deviation of the filtering result, resulting in poor accuracy of the filtering effect, and affecting the display quality of the CT image. Summary of the invention
[0004] In order to solve the technical problem in the related art that the filtering result of each pixel point will be affected by other pixels points in the filtering window, thereby causing deviation of the filtering result and affecting the display quality of the CT image, the purpose of the present invention is to provide a bone quality CT image intelligent enhancement method, and the technical scheme adopted is as follows:
[0005] The present invention proposes a bone quality CT image intelligent enhancement method, the method comprising:
[0006] Obtaining CT grayscale images of bone parts;
[0007] Construct an analysis window corresponding to each pixel in the grayscale image; obtain the initial filter window parameters for filtering each pixel, and obtain the filter window corresponding to the pixel in each analysis window according to the grayscale level of the pixel in each analysis window, the grayscale difference characteristics between each pixel and each other pixel in the corresponding preset neighborhood, and the initial filter window parameters;
[0008] The number of pixels in the grayscale image that have the same grayscale value and gradient direction as each pixel is obtained respectively, and the possibility of each pixel being a noise pixel is obtained by combining the gradient difference characteristics between each pixel and each other pixel in the corresponding filtering window; any one pixel is selected as the pixel to be tested, and the filtering weight of each other pixel in the filtering window of the pixel to be tested is obtained according to the possibility that the pixel in the filtering window of the pixel to be tested is a noise pixel;
[0009] The filtering grayscale value of the pixel to be tested is obtained according to the filtering weight and grayscale value of each other pixel in the filtering window of the pixel to be tested; the pixel to be tested is changed to determine the filtering grayscale value of each pixel to obtain a CT filtered image.
[0010] Furthermore, the method for obtaining the filter window includes:
[0011] Obtaining local noise density according to the grayscale difference characteristics between each pixel point in each analysis window and each other pixel point in the corresponding preset neighborhood range;
[0012] Perform positive correlation mapping on the grayscale levels of the pixels in each analysis window, calculate the product of the mapping result and the local noise density, and normalize it as the first eigenvalue;
[0013] The product of the first eigenvalue and the initial filter window parameter is calculated, and the single value is taken upward as the size of the filter window.
[0014] Furthermore, the method for obtaining the local noise density includes:
[0015] In each analysis window, the gray value difference between each pixel and each other pixel in the corresponding preset neighborhood is calculated as a first difference value; the mean of the first difference values between each pixel and all other pixels in the corresponding preset neighborhood is calculated as a first difference mean;
[0016] Calculate the mean of the first difference means of all pixels in the analysis window as the second mean;
[0017] The differences between all first difference means and second means are calculated respectively, and all difference results are averaged to obtain the local noise density.
[0018] Furthermore, the method for obtaining the possibility includes:
[0019] The possibility is obtained according to the possibility acquisition formula, which is:
[0020] ;in, Indicates The probability that a pixel is a noise pixel; Represents the grayscale image with The number of pixels with the same grayscale value; Represents the grayscale image with The number of pixels with the same gradient direction; Indicates The number of pixels in the filter window of pixels; Indicates The gradient direction cosine value of each pixel; Indicates Within the filtering window of pixels, the Gradient direction cosine values of other pixels; represents a natural constant; Represents the normalization function.
[0021] Furthermore, the method for obtaining the filtering weights includes:
[0022] Calculate the probability that the pixel to be tested is a noise pixel and the probability that each other pixel in the filtering window is a noise pixel as a first ratio;
[0023] Calculate the sum of the probabilities that all pixels in the filter window are noise pixels as the first sum value;
[0024] Calculate the ratio of the probability that each other pixel point is a noise pixel point to the first sum value as the second ratio; calculate the product of the second ratio and the probability that each other pixel point is a noise pixel point as the first product;
[0025] The first product is subjected to negative correlation mapping, and the product of the mapping result and the first ratio is calculated and normalized to obtain the filtering weight of each other pixel point in the filtering window.
[0026] Furthermore, the method for obtaining the filtered grayscale value includes:
[0027] In the filtering window of the pixel to be tested, the product of the filtering weight and the gray value of each other pixel is calculated as the first weighted value;
[0028] The average of the first weighted values of all other pixels is calculated to obtain the filtered grayscale value of the pixel to be tested.
[0029] Furthermore, the method for acquiring the CT filtered image includes:
[0030] The pixel points to be tested are changed in sequence according to a preset method, the filtered grayscale value of the pixel point to be tested replaces the grayscale value of the corresponding pixel point, the filtered grayscale value of each pixel point is determined, and a CT filtered image is obtained.
[0031] Furthermore, the method for obtaining the analysis window includes:
[0032] In the grayscale image, a 7×7 analysis window is constructed with each pixel as the center.
[0033] Furthermore, the positive correlation mapping is performed by using an exponential function with a natural constant as the base.
[0034] Furthermore, the preset method is to start from the upper left corner pixel of the grayscale image and change in sequence from left to right and from top to bottom.
[0035] The present invention has the following beneficial effects:
[0036] In order to better understand and process the feature information around each pixel, the present invention constructs an analysis window corresponding to each pixel in the grayscale image; obtains the initial filter window parameters when filtering each pixel, obtains the filter window corresponding to the pixel in each analysis window according to the grayscale level of the pixel in each analysis window, the grayscale difference characteristics between each pixel and each other pixel in the corresponding preset neighborhood, and the initial filter window parameters, more accurately evaluates the local characteristics of the pixel, and adjusts the filter window; respectively obtains the number of pixels in the grayscale image that have the same grayscale value and gradient direction as each pixel, and obtains the filter window in combination with the gradient difference characteristics between each pixel and each other pixel in the filter window. The possibility that each pixel is a noise pixel is determined to more accurately evaluate whether the pixel is a noise pixel; any pixel is selected as the pixel to be tested, and according to the possibility that the pixel in the filtering window of the pixel to be tested is a noise pixel, the filtering weight of each other pixel in the filtering window of the pixel to be tested is obtained, and the contribution of each other pixel in the filtering window is analyzed to improve the adaptability and effect of the filtering process; according to the filtering weight and gray value of each other pixel in the filtering window of the pixel to be tested, the filtering gray value of the pixel to be tested is obtained; the pixel to be tested is changed to determine the filtering gray value of each pixel, and a filtered image is obtained, which retains more image details and structural information, thereby improving the overall quality of the image. The present invention improves the accuracy of the filtering result and enhances the display quality of the CT image by obtaining the appropriate filtering weights of other pixels in the filtering window of each pixel. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are 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.
[0038] Figure 1 The present invention provides a flowchart of a method for intelligently enhancing bone quality CT images according to an embodiment of the present invention. DETAILED DESCRIPTION
[0039] 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, structure, features and effects of a bone quality CT image intelligent enhancement method 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.
[0040] 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.
[0041] The specific scheme of the bone quality CT image intelligent enhancement method provided by the present invention is described in detail below with reference to the accompanying drawings.
[0042] See also Figure 1 , which shows a flow chart of a bone quality CT image intelligent enhancement method provided by an embodiment of the present invention, and the specific method includes:
[0043] Step S1: Acquire a CT grayscale image of the bone part.
[0044] In an embodiment of the present invention, in order to process the noise existing when acquiring a patient's bone image using CT imaging technology and improve the image quality, it is first necessary to acquire a CT image of the bone part using a CT imaging device.
[0045] In one embodiment of the present invention, in order to facilitate the subsequent image processing process, the collected CT image is grayed to obtain a CT gray image, and then the processed image is analyzed. It should be noted that gray processing is a technical means well known to those skilled in the art, and can be specifically set according to the specific implementation scenario. In one embodiment of the present invention, a mean gray algorithm is used to obtain a CT gray image, simplify image information, increase computing speed, and help improve the accuracy of image recognition.
[0046] Step S2: construct an analysis window corresponding to each pixel in the CT grayscale image; obtain the initial filter window parameters when filtering each pixel, and obtain the filter window corresponding to the pixel in each analysis window according to the grayscale level of the pixel in each analysis window, the grayscale difference characteristics between each pixel and each other pixel in the corresponding preset neighborhood, and the initial filter window parameters.
[0047] In order to effectively display these differences within a limited display range, by analyzing a local area, we can better understand and process the feature information around each pixel and construct an analysis window corresponding to each pixel in the grayscale image.
[0048] Preferably, in one embodiment of the present invention, the method for acquiring the analysis window includes:
[0049] In grayscale images, each pixel is constructed as the center Size of the analysis window.
[0050] It should be noted that, in other embodiments of the present invention, the size of the analysis window may be set according to specific circumstances, and is not limited or elaborated herein.
[0051] Since the noise points are mainly distributed in the muscle tissue and bone areas in the CT images, the noise distribution content is relatively the least in the area without tissue and bone compared to the background area; therefore, when filtering different pixels, the gray value distribution of the analyzed pixels is different, and the filter window for selecting the pixels is also different; when filtering the pixels in the noise-intensive area, the filter window should be larger, and more pixels are taken into account to obtain a better filtering effect; otherwise, a smaller filter window is selected to ensure that excessive smoothing of edge details is avoided during filtering.
[0052] By analyzing the grayscale difference characteristics, the edges and details in the image can be identified more accurately, so that this information can be retained during the filtering process and information loss caused by over-smoothing can be avoided; analyzing the grayscale level can help understand the characteristics of the local area of the image. The grayscale level of the pixel reflects the distribution of the grayscale value in the analysis window. The grayscale level of the pixels in this range is large, which means that this area contains a large number of different grayscale values and there are significant grayscale changes; by considering the grayscale level and grayscale difference characteristics of the pixel points, selecting a suitable filter window to adapt to the characteristics of the pixels in different areas can remove noise while protecting the important details of the image and avoid over-smoothing or blurring; therefore, the initial filter window parameters are obtained for each pixel when filtering, and the filter window corresponding to the pixel point in each analysis window is obtained according to the grayscale level of the pixel points in each analysis window, the grayscale difference characteristics between each pixel point and each other pixel point in the corresponding preset neighborhood range, and the initial filter window parameters.
[0053] Preferably, in one embodiment of the present invention, the method for obtaining the filter window includes:
[0054] According to the grayscale difference characteristics between each pixel point in each analysis window and each other pixel point in the corresponding preset neighborhood, the local noise density is obtained; the grayscale levels of the pixel points in each analysis window are positively correlated, and the product of the mapping result and the local noise density is calculated and normalized as the first eigenvalue;
[0055] The product of the first eigenvalue and the initial filter window parameter is calculated, and the single value is taken upward as the size of the filter window. In one embodiment of the present invention, the size of the filter window is:
[0056] ;
[0057] in, Indicates The size of the filter window of pixels; Indicates The gray level of the pixel in the analysis window of pixels; Indicates The local noise density of the analysis window of pixels; Indicates a preset positive odd number; Indicates a preset positive even number; Represents the initial filter window parameters; represents a natural constant; represents the normalization function; Represents the symbol for rounding to an integer.
[0058] In the formula for the filter window size, Indicates that the product result is rounded up to a single value, and the exponential function with a natural constant as the base is used to convert For positive correlation mapping, the more gray levels there are, the more uneven the gray value distribution of pixels in the analysis window is, and the more the filter window size needs to be expanded; the greater the local noise density, the poorer the continuity of the gray value between pixels, then the greater the noise density within the range of the pixel, and the larger the window selected during filtering should be.
[0059] It should be noted that in order to ensure the accuracy and consistency of the filtering operation, to more easily handle boundary conditions and to avoid deviations caused by different pixel positions, it is necessary to make the filtering window symmetrical about the central pixel point; in one embodiment of the present invention, the preset positive odd number is 1, the preset positive even number is 2, and the size of the filtering window is obtained as a single value, so that there can be a clear center point when processing the image, thereby more accurately calculating the filtering result; the initial filtering window parameter is 5; in other embodiments of the present invention, the size of the preset positive odd number, the preset positive even number and the initial filtering window parameter can be set according to the specific situation, and no limitation or elaboration is made here.
[0060] Preferably, in one embodiment of the present invention, the method for obtaining the local noise density includes:
[0061] In each analysis window, the gray value difference between each pixel and each other pixel in the corresponding preset neighborhood is calculated as a first difference value; the mean of the first difference values between each pixel and all other pixels in the corresponding preset neighborhood is calculated as a first difference mean;
[0062] Calculate the mean of the first difference means of all pixels in the analysis window as the second mean;
[0063] The differences between all first difference means and second means are calculated respectively, and all difference results are averaged to obtain local noise density. In one embodiment of the present invention, the formula of local noise density is expressed as:
[0064] ;
[0065] in, Indicates The local noise density of the analysis window of pixels; Indicates Within the analysis window of pixels, The mean of the gray value differences between the pixel point and other pixel points in the corresponding preset neighborhood, that is, the first difference mean; Indicates The second mean is the mean of the sum of the mean values of the grayscale value differences between all pixels and other pixels in the corresponding preset neighborhood within the analysis window of pixels; Indicates the number of pixels within the analysis window.
[0066] In the formula of local noise density, the greater the difference between the first difference mean and the second mean, the greater the difference between the grayscale changes of different pixels relative to the grayscale changes in the analysis window, the greater the grayscale difference within the preset neighborhood of the pixel, the more uneven the grayscale value distribution, the more likely there is more noise, and the greater the local noise density.
[0067] It should be noted that, in one embodiment of the present invention, the preset neighborhood range corresponding to each pixel point is the range size formed by each pixel point and its four neighboring pixel points above, below, left and right; in other embodiments of the present invention, the size of the preset neighborhood range can be set according to specific circumstances, and is not limited or elaborated here.
[0068] Step S3: respectively obtain the number of pixels in the grayscale image that have the same grayscale value and gradient direction as each pixel, and obtain the possibility that each pixel is a noise pixel by combining the gradient difference characteristics between each pixel and each other pixel in the corresponding filtering window; randomly select a pixel as the pixel to be tested, and obtain the filtering weight of each other pixel in the filtering window of the pixel to be tested according to the possibility that the pixel in the filtering window of the pixel to be tested is a noise pixel.
[0069] Since noise is randomly generated when CT images are collected, its grayscale value has a certain degree of randomness. The grayscale value of noise pixels is usually quite different from that of surrounding pixels. The gradient direction reflects the direction of change of pixels in the image. If the gradient direction of a pixel is inconsistent with that of surrounding pixels, the fewer the corresponding pixels are, the more likely the pixel is a noise point. Therefore, by counting the number of pixels with the same grayscale value and gradient direction as each pixel, it is possible to identify pixels that are significantly different from the surrounding pixels, and the more likely they are noise. The gradient difference reflects the consistency of the direction change between a pixel and the pixels in its neighborhood. The larger the gradient difference, the worse the consistency of the change, and the greater the possibility that the pixel is noise. Therefore, the number of pixels with the same grayscale value and gradient direction as each pixel in the CT grayscale image is obtained, and the possibility of each pixel being a noise pixel is obtained by combining the gradient difference characteristics between each pixel and each other pixel in the filter window.
[0070] Preferably, in one embodiment of the present invention, the method for obtaining the possibility includes:
[0071] The possibility is obtained according to the possibility acquisition formula, which is:
[0072] ;
[0073] in, Indicates The probability that a pixel is a noise pixel; Represents the grayscale image with The number of pixels with the same grayscale value; Represents the grayscale image with The number of pixels with the same gradient direction; Indicates The number of pixels in the filter window of pixels; Indicates The gradient direction cosine value of each pixel; Indicates Within the filtering window of pixels, the Gradient direction cosine values of other pixels; represents a natural constant; Represents the normalization function.
[0074] In the probability acquisition formula, the exponential function with natural constant as the base is used to convert Negative correlation mapping is performed, and the grayscale image is The more pixels have the same grayscale value as the first pixel, the The more pixels with the same gradient direction, the more consistent the pixel is with other pixels, and the less likely the pixel is to be a noise pixel. On the contrary, the fewer pixels with the same grayscale value and gradient direction, the less consistent the pixel is with other pixels, and the more likely the pixel is to be a noise pixel. Indicates The gradient direction cosine value of the pixel point and the The mean of the sum of the differences in the gradient direction cosine values between the pixel and other pixels in the filtering window. The greater the difference in the gradient direction cosine value between the pixel and other pixels in the filtering window, the worse the consistency of the change law between the pixel and other pixels in the filtering window, and the greater the possibility that the pixel is a noise pixel.
[0075] It should be noted that, in one embodiment of the present invention, the SOBEL operator may be used to calculate the gradient direction of each pixel in the grayscale image; the specific SOBEL operator is a technical means well known to those skilled in the art and will not be described in detail here.
[0076] When filtering pixels, if there are noise pixels in the filter window, the pixels after filtering will still have noise, resulting in deviations in the filtering results, and non-noise pixels at the edge may lose details after filtering, resulting in information loss; therefore, the possibility of each pixel in the filter window is analyzed, and different filtering weights are assigned to each pixel to reduce the proportion of noise pixels, achieve local optimization, better protect edge and texture information, and avoid over-smoothing. Therefore, any pixel is selected as the pixel to be tested, and the filtering weights of each other pixel in the filter window of the pixel to be tested are obtained according to the possibility that the pixel in the filter window of the pixel to be tested is a noise pixel.
[0077] Preferably, in one embodiment of the present invention, the method for obtaining the filtering weight includes:
[0078] Calculate the probability that the pixel to be tested is a noise pixel to the probability that each other pixel in the filter window is a noise pixel, as a first ratio; calculate the sum of the probabilities that all pixels in the filter window are noise pixels, as a first sum; calculate the ratio of the probability that each other pixel is a noise pixel to the first sum, as a second ratio;
[0079] The product of the second ratio and the possibility that each other pixel point is a noise pixel point is calculated as the first product; the first product is negatively correlated and mapped, the product of the mapping result and the first ratio is calculated, and normalized to obtain the filtering weight of each other pixel point in the filtering window. In one embodiment of the present invention, the formula of the filtering weight is expressed as:
[0080] ;
[0081] in, Indicates Within the filter window of the pixels to be tested, the The filter weights of other pixels; Indicates The probability that a pixel is a noise pixel; Indicates The first pixel in the filter window The probability that other pixels are noise pixels; Indicates The sum of the possibilities that all pixels in the filter window of the pixel to be tested are noise pixels; represents an exponential function with a natural constant as base; Indicates The number of pixels in the filter window of the pixel to be tested.
[0082] In the formula for filter weights, Indicates The probability that the pixel to be tested is a noise pixel is The first pixel in the filter window The ratio of the probability that the other pixels are noise pixels is the first ratio. The larger the first ratio, the greater the probability that the The smaller the probability that the other pixels are noise pixels, the The greater the contribution of each pixel point when filtering, the greater the corresponding filtering weight; Indicates The first pixel in the filter window The probability that the other pixels are noise pixels is The ratio of the total probability of all pixels in the filter window of the pixel to be tested being noise pixels; through the exponential function with natural constant as the base Perform negative correlation mapping, The first pixel in the filter window The smaller the probability that the other pixels are noise pixels, the smaller the second ratio. The smaller the proportion of other pixels occupying the noise pixels in the filter window, the smaller the proportion of other pixels occupying the noise pixels in the filter window. The greater the contribution of other pixels to pixel filtering, the greater the corresponding filtering weight; Expressing the All other pixels within the filter window of the pixel to be tested are The sum of the contributions of the pixels to be tested during filtering; Indicates The first pixel in the filter window The ratio of the contribution of the other pixels to the filtering to the total contribution of all pixels in the filtering window to the filtering, that is, The first pixel in the filter window Normalize the contribution of pixels to filtering. The greater the weight of the other pixel points for the pixel point corresponding to the filtering window, the greater the filtering weight of the pixel point to be filtered.
[0083] Step S4: obtaining the filter gray value of the pixel to be tested according to the filter weight and gray value of each other pixel in the filter window of the pixel to be tested; changing the pixel to be tested to determine the filter gray value of each pixel, and obtaining a CT filtered image.
[0084] The filtering weight determines the influence of each other pixel in the filtering window on the filtering result of the pixel. The larger the filtering weight, the greater the influence on the gray value of the pixel. The gray value of the pixel reflects the corresponding color or brightness information in the image. Different gray values mean that different areas in the image may have different characteristics. Adjusting the gray value of the pixel can smooth the image while retaining the edge information and improving the image quality. The filtering gray value of the pixel to be tested is obtained according to the filtering weight and gray value of each other pixel in the filtering window of the pixel to be tested.
[0085] Preferably, in one embodiment of the present invention, the method for obtaining the filtered grayscale value includes:
[0086] In the filtering window of the pixel to be tested, the product of the filtering weight and the gray value of each other pixel is calculated as the first weighted value; the average of the first weighted values of all other pixels is calculated to obtain the filtering gray value of the pixel to be tested. In one embodiment of the present invention, the formula of the filtering gray value is expressed as:
[0087] ;
[0088] in, Indicates The filtered gray value of the pixel to be tested; Indicates The first pixel in the filter window The filter weights of other pixels; Indicates The first pixel in the filter window The grayscale value of other pixels. Indicates The number of pixels in the filter window of the pixel to be tested.
[0089] In the formula for filtering grayscale values, represents the first weighted value, The first pixel in the filter window The larger the filter weight of other pixels, the better the The greater the contribution of the pixel to be tested during filtering, the The first pixel in the filter window The larger the grayscale value of other pixels is, the larger the first weighted value is, and the higher the filtered grayscale value is.
[0090] The pixel to be tested is changed to determine the filtering gray value of each pixel to obtain a CT filtering image.
[0091] Preferably, in one embodiment of the present invention, the method for acquiring a CT filtered image includes:
[0092] The pixel points to be tested are changed in sequence according to a preset method, the filtered grayscale value of the pixel points to be tested is used as the new grayscale value of the corresponding pixel point, the filtered grayscale value of each pixel point is determined, and a CT filtered image is obtained.
[0093] It should be noted that, in one embodiment of the present invention, the preset method is to start from the upper left corner pixel of the grayscale image and change in sequence from left to right and from top to bottom; obtain the new grayscale value of the pixel to participate in the calculation of the subsequent filtered grayscale values of other pixels to be tested.
[0094] By obtaining a filtered image, the overall display quality of the acquired image is improved, which is conducive to more accurate observation of bone density and morphology.
[0095] In summary, the present invention obtains the filtering window of the corresponding pixel point in each analysis window according to the grayscale level of the pixel point in each analysis window, the grayscale difference characteristics between each pixel point and each other pixel point in the corresponding preset neighborhood range, and the initial filtering window parameters; respectively obtains the number of pixels with the same grayscale value and gradient direction as each pixel point in the grayscale image, and combines the gradient difference characteristics between each pixel point and each other pixel point in the filtering window to obtain the possibility that each pixel point is a noise pixel point; randomly selects a pixel point as the pixel point to be tested, and obtains the filtering weight of each other pixel point in the filtering window of the pixel point to be tested; combines the grayscale value of the corresponding pixel point, obtains the filtering grayscale value of the pixel point to be tested, changes the pixel point to be tested to determine the filtering grayscale value of each pixel point, and obtains the filtered image. The present invention improves the accuracy of the filtering result and enhances the display quality of the image by obtaining the appropriate filtering weights of other pixels in the filtering window of each pixel point.
[0096] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0097] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A bone quality CT image intelligent enhancement method, characterized in that: The method comprises: Obtaining CT grayscale images of bone parts; Construct an analysis window corresponding to each pixel in the grayscale image; obtain the initial filter window parameters for filtering each pixel, and obtain the filter window corresponding to the pixel in each analysis window according to the grayscale level of the pixel in each analysis window, the grayscale difference characteristics between each pixel and each other pixel in the corresponding preset neighborhood, and the initial filter window parameters; The number of pixels in the grayscale image that have the same grayscale value and gradient direction as each pixel is obtained respectively, and the possibility of each pixel being a noise pixel is obtained by combining the gradient difference characteristics between each pixel and each other pixel in the corresponding filtering window; any one pixel is selected as the pixel to be tested, and the filtering weight of each other pixel in the filtering window of the pixel to be tested is obtained according to the possibility that the pixel in the filtering window of the pixel to be tested is a noise pixel; Obtaining the filtering grayscale value of the pixel to be tested according to the filtering weight and grayscale value of each other pixel in the filtering window of the pixel to be tested; changing the pixel to be tested to determine the filtering grayscale value of each pixel to obtain a CT filtered image; The method for obtaining the filter window includes: Obtaining local noise density according to the grayscale difference characteristics between each pixel point in each analysis window and each other pixel point in the corresponding preset neighborhood range; Perform positive correlation mapping on the grayscale levels of the pixels in each analysis window, calculate the product of the mapping result and the local noise density, and normalize it as the first eigenvalue; Calculate the product of the first eigenvalue and the initial filter window parameter, and take the single value upward as the size of the filter window; The method for obtaining the local noise density includes: In each analysis window, the gray value difference between each pixel and each other pixel in the corresponding preset neighborhood is calculated as a first difference value; the mean of the first difference values between each pixel and all other pixels in the corresponding preset neighborhood is calculated as a first difference mean; Calculate the mean of the first difference means of all pixels in the analysis window as the second mean; The differences between all first difference means and second means are calculated respectively, and all difference results are averaged to obtain the local noise density.
2. The method for intelligent enhancement of bone quality CT images according to claim 1, characterized in that: The method for obtaining the possibility includes: The possibility is obtained according to the possibility acquisition formula, which is: ;in, Indicates The probability that a pixel is a noise pixel; Represents the grayscale image with The number of pixels with the same grayscale value; Represents the grayscale image with The number of pixels with the same gradient direction; Indicates The number of pixels in the filter window of pixels; Indicates The gradient direction cosine value of each pixel; Indicates Within the filtering window of pixels, the Gradient direction cosine values of other pixels; represents a natural constant; Represents the normalization function.
3. The method for intelligent enhancement of bone quality CT images according to claim 1, characterized in that: The method for obtaining the filtering weight includes: Calculate the probability that the pixel to be tested is a noise pixel and the probability that each other pixel in the filtering window is a noise pixel as a first ratio; Calculate the sum of the probabilities that all pixels in the filter window are noise pixels as the first sum value; Calculate the ratio of the probability that each other pixel point is a noise pixel point to the first sum value as the second ratio; calculate the product of the second ratio and the probability that each other pixel point is a noise pixel point as the first product; The first product is subjected to negative correlation mapping, and the product of the mapping result and the first ratio is calculated and normalized to obtain the filtering weight of each other pixel point in the filtering window.
4. The bone quality CT image intelligent enhancement method according to claim 1, characterized in that: The method for obtaining the filtering grayscale value comprises: In the filtering window of the pixel to be tested, the product of the filtering weight and the gray value of each other pixel is calculated as the first weighted value; The average of the first weighted values of all other pixels is calculated to obtain the filtered grayscale value of the pixel to be tested.
5. The bone quality CT image intelligent enhancement method according to claim 1, characterized in that: The method for acquiring the CT filtered image comprises: The pixel points to be tested are changed in sequence according to a preset method, the filtered grayscale value of the pixel points to be tested is used as the new grayscale value of the corresponding pixel point, the filtered grayscale value of each pixel point is determined, and a CT filtered image is obtained.
6. The method for intelligent enhancement of bone quality CT images according to claim 1, characterized in that: The method for obtaining the analysis window includes: In the grayscale image, a 7×7 analysis window is constructed with each pixel as the center.
7. The method for intelligent enhancement of bone quality CT images according to claim 1, characterized in that: The positive correlation mapping is performed by using an exponential function with a natural constant as the base.
8. The method for intelligent enhancement of bone quality CT images according to claim 5, characterized in that: The preset method is to start from the upper left corner pixel of the grayscale image and change in sequence from left to right and from top to bottom.
Citation Information
Patent Citations
Fast image denoising method and device
CN104778669A
Blending defect detection method for flame-retardant fiber material
CN115100201A
General surgical operation image acquisition method based on image enhancement
CN116883537A
Ultrasonic image processing method based on image enhancement
CN117649357A
Nuclear magnetic resonance tumor visual detection method based on image denoising
CN117764864A
