[go: up one dir, main page]

CN118229538B - Intelligent enhancement method for bone quality CT image - Google Patents

Intelligent enhancement method for bone quality CT image Download PDF

Info

Publication number
CN118229538B
CN118229538B CN202410634230.7A CN202410634230A CN118229538B CN 118229538 B CN118229538 B CN 118229538B CN 202410634230 A CN202410634230 A CN 202410634230A CN 118229538 B CN118229538 B CN 118229538B
Authority
CN
China
Prior art keywords
pixel
filtering
window
pixels
grayscale
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410634230.7A
Other languages
Chinese (zh)
Other versions
CN118229538A (en
Inventor
赵海恩
董鑫
任坤
李爽
廖博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fourth Military Medical University FMMU
Original Assignee
Fourth Military Medical University FMMU
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fourth Military Medical University FMMU filed Critical Fourth Military Medical University FMMU
Priority to CN202410634230.7A priority Critical patent/CN118229538B/en
Publication of CN118229538A publication Critical patent/CN118229538A/en
Application granted granted Critical
Publication of CN118229538B publication Critical patent/CN118229538B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10072Tomographic images
    • G06T2207/10081Computed x-ray tomography [CT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30008Bone
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to the technical field of image enhancement, in particular to an intelligent enhancement method for a bone quality CT image. The invention obtains a filter window of the pixel point corresponding to each analysis window; respectively acquiring the number of pixels in the gray image, which are the same as the gray value and the gradient direction of each pixel, and acquiring the possibility that each pixel is a noise pixel by combining the gradient difference characteristic between each pixel and each other pixel in the filter window; optionally selecting one pixel point as a pixel point to be detected, and obtaining the filtering weight of each other pixel point in the filtering window of the pixel point to be detected; and combining the gray values of the corresponding pixel points to obtain a filtered gray value of the pixel point to be detected, and changing the pixel point to be detected to determine the filtered gray value of each pixel point to obtain a filtered image. According to the invention, the accuracy of the filtering result is improved and the display quality of the image is enhanced by obtaining the proper filtering weight of other pixel points in the filtering window of each pixel point.

Description

一种骨质量CT影像智能增强方法A method for intelligent enhancement of bone quality CT images

技术领域Technical Field

本发明涉及图像增强技术领域,具体涉及一种骨质量CT影像智能增强方法。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

CT影像是一种利用X射线的成像技术,常被应用于医疗领域中,包括神经学、放射学、骨科、心血管等,用于诊断如肿瘤、感染、骨质分析、血管病变等各种疾病和病症。但是利用CT成像技术在获取患者骨骼图像时,由于X射线穿过骨骼表面的肌肉组织时可能发生散射现象,从而使得采集图像中存在噪声,导致采集到的图像显示效果较差。因此,需要对采集到的图像进行滤波处理,以提高图像质量。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 when X-rays pass 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.

现有技术中,采用均值滤波算法,根据每个像素点的滤波窗口内其他像素点的灰度值总和的均值来替代滤波后对应像素点的灰度值,对采集的骨质量CT图像中因散射导致的噪声进行滤波处理;由于每个像素点的滤波结果会受到滤波窗口内其他像素点的影响,若其他参考像素点为噪声像素点时,滤波后的像素点依然存在噪声,从而导致滤波结果的偏差,导致滤波效果的准确性较差,影响CT图像的显示质量。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

为了解决相关技术中由于每个像素点的滤波结果会受到滤波窗口内其他像素点的影响,从而导致滤波结果的偏差,影响CT图像的显示质量的技术问题,本发明的目的在于提供一种骨质量CT影像智能增强方法,所采用的技术方案具体如下: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 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:

本发明提出了一种骨质量CT影像智能增强方法,所述方法包括:The present invention proposes a bone quality CT image intelligent enhancement method, the method comprising:

获取骨骼部位的CT灰度图像;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 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;

分别获取灰度图像中与每个像素点的灰度值和梯度方向相同的像素点数量,结合每个像素点与对应滤波窗口内每个其他像素点之间的梯度差异特征,获得每个像素点为噪声像素点的可能性;任选一个像素点作为待测像素点,根据待测像素点的滤波窗口内像素点为噪声像素点的所述可能性,获得待测像素点的滤波窗口内每个其他像素点的滤波权重;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;

根据待测像素点的滤波窗口内每个其他像素点的所述滤波权重和灰度值,获得待测像素点的滤波灰度值;改变待测像素点确定每个像素点的滤波灰度值,获得CT滤波图像。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.

进一步地,所述滤波窗口的获取方法包括:Furthermore, 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;

计算第一特征值与初始滤波窗口参数的乘积,并向上取单数值,作为滤波窗口的尺寸。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.

进一步地,所述局部噪声密度的获取方法包括:Furthermore, 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.

进一步地,所述可能性的获取方法包括:Furthermore, 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 pixel points; represents a natural constant; Represents the normalization function.

进一步地,所述滤波权重的获取方法包括:Furthermore, the method for obtaining the filtering weights 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.

进一步地,所述滤波灰度值的获取方法包括:Furthermore, the method for obtaining the filtered grayscale value includes:

在待测像素点的滤波窗口内,计算每个其他像素点的滤波权重与灰度值的乘积,作为第一加权值;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.

进一步地,所述CT滤波图像的获取方法包括:Furthermore, the method for acquiring the CT filtered image includes:

按照预设方式依次改变待测像素点,将待测像素点的所述滤波灰度值替换对应像素点的灰度值,确定每个像素点的滤波灰度值,获得CT滤波图像。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.

进一步地,所述分析窗口的获取方法包括:Furthermore, the method for obtaining the analysis window includes:

在灰度图像中,以每个像素点为中心构建7×7大小的分析窗口。In the grayscale image, a 7×7 analysis window is constructed with each pixel as the center.

进一步地,所述正相关映射为以自然常数为底的指数函数进行正相关映射。Furthermore, the positive correlation mapping is performed by using an exponential function with a natural constant as the base.

进一步地,所述预设方式为从灰度图像的左上角像素点开始,按照从左往右从上往下的方向依次改变。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.

本发明具有如下有益效果:The present invention has the following beneficial effects:

本发明为了更好的理解和处理每个像素点周围的特征信息,构建灰度图像中每个像素点对应的分析窗口;获取每个像素点进行滤波时的初始滤波窗口参数,根据每个分析窗口内像素点的灰度级数、每个像素点与对应预设邻域范围内每个其他像素点之间的灰度差异特征以及初始滤波窗口参数,获得每个分析窗口对应像素点的滤波窗口,更准确地评估像素点的局部特性,并调整滤波窗口;分别获取灰度图像中与每个像素点的灰度值和梯度方向相同的像素点数量,结合每个像素点与滤波窗口内每个其他像素点之间的梯度差异特征,获得每个像素点为噪声像素点的可能性,更准确地评估像素点是否为噪声像素点;任选一个像素点作为待测像素点,根据待测像素点的滤波窗口内像素点为噪声像素点的可能性,获得待测像素点的滤波窗口内每个其他像素点的滤波权重,分析滤波窗口内每个其他像素点的贡献度,提高滤波过程的自适应性和效果;根据待测像素点的滤波窗口内每个其他像素点的滤波权重和灰度值,获得待测像素点的滤波灰度值;改变待测像素点确定每个像素点的滤波灰度值,获得滤波图像,保留更多的图像细节和结构信息,从而提高图像的整体质量。本发明通过获得每个像素点的滤波窗口内其他像素点合适的滤波权重,提高滤波结果的准确性,增强了CT图像的显示质量。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 with the same grayscale value and gradient direction as each pixel in the grayscale image, 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

为了更清楚地说明本发明实施例或现有技术中的技术方案和优点,下面将对实施例或现有技术描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它附图。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.

图1为本发明一个实施例所提供的一种骨质量CT影像智能增强方法的流程图。FIG1 is a flow chart of a method for intelligently enhancing bone quality CT images provided by an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

为了更进一步阐述本发明为达成预定发明目的所采取的技术手段及功效,以下结合附图及较佳实施例,对依据本发明提出的一种骨质量CT影像智能增强方法,其具体实施方式、结构、特征及其功效,详细说明如下。在下述说明中,不同的“一个实施例”或“另一个实施例”指的不一定是同一实施例。此外,一或多个实施例中的特定特征、结构或特点可由任何合适形式组合。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.

除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。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.

下面结合附图具体的说明本发明所提供的一种骨质量CT影像智能增强方法的具体方案。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.

请参阅图1,其示出了本发明一个实施例提供的一种骨质量CT影像智能增强方法的流程图,具体方法包括:Please refer to FIG1 , which shows a flow chart of a method for intelligent enhancement of bone quality CT images provided by an embodiment of the present invention. The specific method includes:

步骤S1:获取骨骼部位的CT灰度图像。Step S1: Acquire a CT grayscale image of the bone part.

在本发明的实施例中,为了对利用CT成像技术在获取患者骨骼图像时存在的噪声进行处理,提高图像的质量;首先需要利用CT成像设备获取骨骼部位的CT图像。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.

在本发明的一个实施例中,为了方便后续图像处理过程,对采集的CT图像进行灰度化处理操作,获得CT灰度图像,然后对处理后的图像进行分析。需要说明的是灰度化处理作为本领域技术人员熟知的一个技术手段,可根据具体实施场景具体设置,在本发明一个实施例中采用均值灰度化算法获得CT灰度图像,简化图像信息,提高运算速度,有助于提高图像识别的准确性。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 graying algorithm is used to obtain a CT gray image, simplify image information, increase computing speed, and help improve the accuracy of image recognition.

步骤S2:构建CT灰度图像中每个像素点对应的分析窗口;获取每个像素点进行滤波时的初始滤波窗口参数,根据每个分析窗口内像素点的灰度级数、每个像素点与对应预设邻域范围内每个其他像素点之间的灰度差异特征以及初始滤波窗口参数,获得每个分析窗口对应像素点的滤波窗口。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.

为了在一个有限的显示范围内有效地显示这些差异,通过分析一个局部区域,可以更好地理解和处理每个像素点周围的特征信息,构建灰度图像中每个像素点对应的分析窗口。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.

优选地,在本发明的一个实施例中,分析窗口的获取方法包括:Preferably, in one embodiment of the present invention, the method for acquiring the analysis window includes:

在灰度图像中,以每个像素点为中心构建大小的分析窗口。In grayscale images, each pixel is constructed as the center Size of the analysis window.

需要说明的是,在本发明的其他实施例中,分析窗口的大小可根据具体情况具体设置,在此不做限定及赘述。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.

由于噪声点主要在CT图像中肌肉组织和骨骼区域分布较为明显,相对于背景区域,不存在组织和骨骼的区域处噪声分布含量相对最少;所以不同像素点在进行滤波时,所分析像素点的灰度值分布不同,选择像素点的滤波窗口也不同;对于噪声密集区域的像素点在进行滤波时,滤波窗口应该较大,更多的像素点被考虑在内,以获得较好的滤波效果;反之选择较小的滤波窗口,以保证滤波时避免边缘细节的过度平滑滤波。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.

通过分析灰度差异特征,可以更准确地识别出图像中的边缘和细节,从而在滤波过程中保留这些信息,避免过度平滑导致的信息丢失;分析灰度级数可以帮助理解图像局部区域的特性,像素点的灰度级数反映了分析窗口内灰度值的分布情况,该范围内的像素点灰度级数很大,意味着这一区域内包含了大量不同的灰度值,存在显著的灰度变化;通过考虑像素点的灰度级数和灰度差异特征,选择合适的滤波窗口以适应不同区域的像素点特性,可以在去除噪声的同时保护图像的重要细节,避免过度平滑或模糊;所以获取每个像素点进行滤波时的初始滤波窗口参数,根据每个分析窗口内像素点的灰度级数、每个像素点与对应预设邻域范围内每个其他像素点之间的灰度差异特征以及初始滤波窗口参数,获得每个分析窗口对应像素点的滤波窗口。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, a suitable filter window is selected to adapt to the characteristics of the pixels in different areas, which can protect the important details of the image while removing noise and avoid over-smoothing or blurring; therefore, the initial filter window parameters are obtained for each pixel point when filtering, and the filter window corresponding to the pixel point of each analysis window is obtained 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 filter window parameters.

优选地,在本发明的一个实施例中,滤波窗口的获取方法包括:Preferably, in one embodiment of the present invention, the method for obtaining the filter window includes:

根据每个分析窗口内每个像素点与对应预设邻域范围内每个其他像素点之间的灰度差异特征,获得局部噪声密度;对每个分析窗口内像素点的灰度级数进行正相关映射,计算映射结果与局部噪声密度的乘积,并进行归一化,作为第一特征值;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, the product of the mapping result and the local noise density is calculated, and normalized as the first eigenvalue;

计算第一特征值与初始滤波窗口参数的乘积,并进行向上取单数值,作为滤波窗口的尺寸。在本发明的一个实施例中,滤波窗口的尺寸为: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:

;

其中,表示第个像素点的滤波窗口的尺寸;表示第个像素点的分析窗口内像素点的灰度级数;表示第个像素点的分析窗口的局部噪声密度;表示预设正奇数;表示预设正偶数;表示初始滤波窗口参数;表示自然常数;表示归一化函数;表示像上取整符号。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.

在滤波窗口尺寸的公式中,表示对乘积结果向上取单数值处理,通过以自然常数为底的指数函数将进行正相关映射,灰度级数越多,分析窗口内像素点的灰度值分布越不均匀,越需要扩大滤波窗口尺寸;局部噪声密度越大,像素点之间灰度值的连续性较差,那么该像素点所在范围内噪声的密度越大,滤波时选择的窗口应该越大。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 the 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.

需要说明的是,为了确保滤波操作的准确性和一致性,更容易地处理边界情况,避免由于像素点位置不同而产生的偏差,需要使滤波窗口表现中心像素点对称的特点;在本发明的一个实施例中,预设正奇数为1,预设正偶数为2,获得滤波窗口的尺寸为单数值,使得在处理图像时能够有一个明确的中心点,从而更准确地计算滤波结果;初始滤波窗口参数为5;在本发明的其他实施例中,预设正奇数、预设正偶数和初始滤波窗口参数的大小可根据具体情况具体设置,在此不做限定及赘述。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.

优选地,在本发明的一个实施例中,局部噪声密度的获取方法包括:Preferably, in one embodiment of the present invention, 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 local noise density. In one embodiment of the present invention, the formula of local noise density is expressed as:

;

其中,表示第个像素点的分析窗口的局部噪声密度;表示第个像素点的分析窗口内,第个像素点与对应预设邻域范围内其他像素点之间的灰度值差异的均值,即第一差异均值;表示第个像素点的分析窗口内,所有像素点与对应预设邻域范围内其他像素点之间的灰度值差异的均值和的均值,即第二均值;表示分析窗口内像素点的数量。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.

在局部噪声密度的公式中,第一差异均值与第二均值之间的差异越大,不同像素点的灰度变化情况相对分析窗口内的灰度变化情况之间的差异越大,像素点预设邻域范围内灰度差异越大,灰度值分布越不均匀,越可能存在越多噪声,局部噪声密度越大。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.

需要说明的是,在本发明的一个实施例中,每个像素点对应预设邻域范围为每个像素点与其上下左右四邻域像素点构成的范围大小;在本发明的其他实施例中,预设邻域范围的大小可根据具体情况具体设置,在此不做限定及赘述。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.

步骤S3:分别获取灰度图像中与每个像素点的灰度值和梯度方向相同的像素点数量,结合每个像素点与对应滤波窗口内每个其他像素点之间的梯度差异特征,获得每个像素点为噪声像素点的可能性;任选一个像素点作为待测像素点,根据待测像素点的滤波窗口内像素点为噪声像素点的可能性,获得待测像素点的滤波窗口内每个其他像素点的滤波权重。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 combine the gradient difference characteristics between each pixel and each other pixel in the corresponding filtering window to obtain the possibility that each pixel is a noise pixel; 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.

由于噪声是CT图像在采集时随机产生的,其灰度值具有一定的随机性,噪声像素点的灰度值通常与周围像素点的灰度值差异较大;梯度方向反映了图像中像素点的变化方向,如果像素点的梯度方向与周围像素点的梯度方向不一致,对应的像素点数量越少,那么该像素点可能是噪声点;因此,通过统计与每个像素点灰度值和梯度方向相同的像素点数量,可以识别出与周围像素点显著不同的像素点,越有可能是噪声。梯度差异反映了像素点与其邻域范围内像素点之间的方向变化一致性,梯度差异越大,变化一致性越差,像素点为噪声的可能性越大;所以分别获取CT灰度图像中与每个像素点的灰度值和梯度方向相同的像素点数量,结合每个像素点与滤波窗口内每个其他像素点之间的梯度差异特征,获得每个像素点为噪声像素点的可能性。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 direction change between a pixel and its neighboring pixels. The larger the gradient difference, the worse the consistency of 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.

优选地,在本发明的一个实施例中,可能性的获取方法包括:Preferably, in one embodiment of the present invention, 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 pixel points; represents a natural constant; Represents the normalization function.

在可能性的获取公式中,通过自然常数为底的指数函数将进行负相关映射,灰度图像中与第个像素点灰度值相同的像素点数量越多,与第个像素点梯度方向相同的像素点数量越多,像素点与其他像素点越一致,像素点为噪声像素点的可能性越小;相反地,灰度值和梯度方向相同的像素点数量越少,像素点与其他像素点越不一致,像素点为噪声像素点的可能性越大;表示第个像素点的梯度方向余弦值和第个像素点的滤波窗口内其他像素点之间的梯度方向余弦值差异总和的均值,当像素点与滤波窗口内其他像素点的梯度方向余弦值差异越大时,说明像素点与滤波窗口内其他像素点的变化规律一致性越差,那么像素点为噪声像素点的可能性越大。In the probability acquisition formula, the exponential function with the 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 it is that the pixel is 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 it is that the pixel is 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.

需要说明的是,在本发明的一个实施例中,可以采用SOBEL算子计算出灰度图像中每个像素点的梯度方向;具体SOBEL算子为本领域技术人员熟知的技术手段,在此不做赘述。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.

在对像素点进行滤波时,若滤波窗口中存在噪声像素点,滤波后的像素点仍然存在噪声,导致滤波结果的偏差,以及处于边缘的非噪声像素点滤波后可能丢失细节,从造成信息的损失;因此,对滤波窗口内每个像素点的可能性进行分析,为每个像素点分配不同的滤波权重,降低噪声像素点的占比,实现局部优化,更好地保护边缘和纹理信息,避免过度平滑。所以任选一个像素点作为待测像素点,根据待测像素点的滤波窗口内像素点为噪声像素点的可能性,获得待测像素点的滤波窗口内每个其他像素点的滤波权重。When filtering pixels, if there are noise pixels in the filter window, the pixels after filtering 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.

优选地,在本发明的一个实施例中,滤波权重的获取方法包括:Preferably, in one embodiment of the present invention, the method for obtaining the filtering weight includes:

计算待测像素点为噪声像素点的可能性比上滤波窗口内每个其他像素点为噪声像素点的可能性,作为第一比值;计算滤波窗口内所有像素点为噪声像素点的可能性之和,作为第一和值;计算对应每个其他像素点为噪声像素点的可能性比上第一和值的比值,作为第二比值;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;

计算所述第二比值与对应每个其他像素点为噪声像素点的可能性的乘积,作为第一乘积;将第一乘积进行负相关映射,计算映射结果与第一比值的乘积,并进行归一化,获得滤波窗口内每个其他像素点的滤波权重。在本发明的一个实施例中,滤波权重的公式表示为: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:

;

其中,表示第个待测像素点的滤波窗口内,第个其他像素点的滤波权重;表示第个像素点为噪声像素点的可能性;表示第个待测像素点的滤波窗口内第个其他像素点为噪声像素点的可能性;表示第个待测像素点的滤波窗口内所有像素点为噪声像素点的可能性总和;表示以自然常数为底的指数函数;表示第个待测像素点的滤波窗口内像素点的数量。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.

在滤波权重的公式中,表示第个待测像素点为噪声像素点的可能性与第个像素点的滤波窗口内第个其他像素点为噪声像素点的可能性的比值,即第一比值,第一比值越大,第个其他像素点为噪声像素点的可能性越小,对第个像素点进行滤波时的贡献度越大,即对应滤波权重也越大;表示第个待测像素点的滤波窗口内第个其他像素点为噪声像素点的可能性与第个待测像素点的滤波窗口内所有像素点为噪声像素点的可能性总和的比值;通过以自然常数为底的指数函数将进行负相关映射,第个待测像素点的滤波窗口内第个其他像素点为噪声像素点的可能性越小,第二比值越小,第个其他像素点占据滤波窗口内噪声像素点的比例越小,说明滤波窗口内第个其他像素点对像素点滤波的贡献度越大,对应滤波权重越大;表示对第个待测像素点的滤波窗口内,所有其他像素点对第个待测像素点滤波时的贡献度总和;表示第个待测像素点的滤波窗口内第个其他像素点对滤波时的贡献度比上滤波窗口内所有像素点对滤波时的贡献度总和的比值,即对第个待测像素点的滤波窗口内第个像素点对滤波时的贡献度进行归一化,第个其他像素点对于滤波窗口对应像素点的权重越大,说明像素点对进行滤波的待测像素点的滤波权重越大。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 an exponential function with a 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.

步骤S4:根据待测像素点的滤波窗口内每个其他像素点的滤波权重和灰度值,获得待测像素点的滤波灰度值;改变待测像素点确定每个像素点的滤波灰度值,获得CT滤波图像。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.

滤波权重决定了滤波窗口内每个其他像素点对像素点滤波结果的影响程度,滤波权重越大,对像素点的灰度值越有较大的影响;像素的灰度值反映了图像中对应的颜色或亮度信息;不同的灰度值意味着图像中的不同区域可能具有不同的特性,对像素点的灰度值进行调整,可以在平滑图像的同时保留边缘信息,提高图像质量。根据待测像素点的滤波窗口内每个其他像素点的滤波权重和灰度值,获得待测像素点的滤波灰度值。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.

优选地,在本发明的一个实施例中,滤波灰度值的获取方法包括:Preferably, in one embodiment of the present invention, the method for obtaining the filtering gray value includes:

在待测像素点的滤波窗口内,计算每个其他像素点的滤波权重与灰度值的乘积,作为第一加权值;计算所有其他像素点的第一加权值的均值,获得待测像素点的滤波灰度值。在本发明的一个实施例中,滤波灰度值的公式表示为: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:

;

其中,表示第个待测像素点的滤波灰度值;表示第个待测像素点的滤波窗口内第个其他像素点的滤波权重;表示第个待测像素点的滤波窗口内第个其他像素点的灰度值。表示第个待测像素点的滤波窗口内像素点的数量。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.

在滤波灰度值的公式中,表示第一加权值,第个待测像素点的滤波窗口内第个其他像素点的滤波权重越大,对第个待测像素点滤波时的贡献度越大,第个待测像素点的滤波窗口内第个其他像素点的灰度值越大,第一加权值越大,滤波灰度值越高。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.

改变待测像素点确定每个像素点的滤波灰度值,获得CT滤波图像。The pixel to be tested is changed to determine the filtering gray value of each pixel to obtain a CT filtering image.

优选地,在本发明的一个实施例中,CT滤波图像的获取方法包括:Preferably, in one embodiment of the present invention, the method for acquiring a CT filtered image includes:

按照预设方式依次改变待测像素点,将待测像素点的滤波灰度值作为对应像素点新的灰度值,确定每个像素点的滤波灰度值,获得CT滤波图像。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.

需要说明的是,在本发明的一个实施例中,预设方式为从灰度图像的左上角像素点开始,按照从左往右从上往下的方向依次改变;获得像素点新的灰度值参与后续其他待测像素点的滤波灰度值的计算。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.

通过获得滤波图像,提高采集图像的整体显示质量,有利于更准确的观察骨骼的密度和形态。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.

综上所述,本发明根据每个分析窗口内像素点的灰度级数、每个像素点与对应预设邻域范围内每个其他像素点之间的灰度差异特征以及初始滤波窗口参数,获得每个分析窗口对应像素点的滤波窗口;分别获取灰度图像中与每个像素点的灰度值和梯度方向相同的像素点数量,结合每个像素点与滤波窗口内每个其他像素点之间的梯度差异特征,获得每个像素点为噪声像素点的可能性;任选一个像素点作为待测像素点,获得待测像素点的滤波窗口内每个其他像素点的滤波权重;结合对应像素点的灰度值,获得待测像素点的滤波灰度值,改变待测像素点确定每个像素点的滤波灰度值,获得滤波图像。本发明通过获得每个像素点的滤波窗口内其他像素点合适的滤波权重,提高滤波结果的准确性,增强图像的显示质量。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.

需要说明的是:上述本发明实施例先后顺序仅仅为了描述,不代表实施例的优劣。在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。It should be noted that the sequence of the above embodiments of the present invention is for description only 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.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。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 (8)

1.一种骨质量CT影像智能增强方法,其特征在于,所述方法包括:1. A bone quality CT image intelligent enhancement method, characterized in that the method comprises: 获取骨骼部位的CT灰度图像;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 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; 分别获取灰度图像中与每个像素点的灰度值和梯度方向相同的像素点数量,结合每个像素点与对应滤波窗口内每个其他像素点之间的梯度差异特征,获得每个像素点为噪声像素点的可能性;任选一个像素点作为待测像素点,根据待测像素点的滤波窗口内像素点为噪声像素点的所述可能性,获得待测像素点的滤波窗口内每个其他像素点的滤波权重;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; 根据待测像素点的滤波窗口内每个其他像素点的所述滤波权重和灰度值,获得待测像素点的滤波灰度值;改变待测像素点确定每个像素点的滤波灰度值,获得CT滤波图像;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, and obtaining 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.根据权利要求1所述的一种骨质量CT影像智能增强方法,其特征在于,所述可能性的获取方法包括:2. The method for intelligent enhancement of bone quality CT images according to claim 1, wherein the method for obtaining the possibility comprises: 根据可能性的获取公式获得可能性,可能性的获取公式为: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 pixel points; represents a natural constant; Represents the normalization function. 3.根据权利要求1所述的一种骨质量CT影像智能增强方法,其特征在于,所述滤波权重的获取方法包括:3. The method for intelligent enhancement of bone quality CT images according to claim 1, wherein the method for obtaining the filtering weight comprises: 计算待测像素点为噪声像素点的可能性比上滤波窗口内每个其他像素点为噪声像素点的可能性,作为第一比值;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.根据权利要求1所述的一种骨质量CT影像智能增强方法,其特征在于,所述滤波灰度值的获取方法包括:4. The method for intelligent enhancement of bone quality CT images according to claim 1, wherein the method for obtaining the filtered gray 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.根据权利要求1所述的一种骨质量CT影像智能增强方法,其特征在于,所述CT滤波图像的获取方法包括:5. The method for intelligent enhancement of bone quality CT images according to claim 1, wherein the method for acquiring the CT filtered image comprises: 按照预设方式依次改变待测像素点,将待测像素点的所述滤波灰度值作为对应像素点新的灰度值,确定每个像素点的滤波灰度值,获得CT滤波图像。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.根据权利要求1所述的一种骨质量CT影像智能增强方法,其特征在于,所述分析窗口的获取方法包括:6. The method for intelligent enhancement of bone quality CT images according to claim 1, wherein the method for acquiring the analysis window comprises: 在灰度图像中,以每个像素点为中心构建7×7大小的分析窗口。In the grayscale image, a 7×7 analysis window is constructed with each pixel as the center. 7.根据权利要求1所述的一种骨质量CT影像智能增强方法,其特征在于,所述正相关映射为以自然常数为底的指数函数进行正相关映射。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 an exponential function with a natural constant as the base. 8.根据权利要求5所述的一种骨质量CT影像智能增强方法,其特征在于,所述预设方式为从灰度图像的左上角像素点开始,按照从左往右从上往下的方向依次改变。8. A bone quality CT image intelligent enhancement method according to claim 5, characterized in that the preset mode starts from the upper left corner pixel of the grayscale image and changes in sequence from left to right and from top to bottom.
CN202410634230.7A 2024-05-22 2024-05-22 Intelligent enhancement method for bone quality CT image Active CN118229538B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410634230.7A CN118229538B (en) 2024-05-22 2024-05-22 Intelligent enhancement method for bone quality CT image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410634230.7A CN118229538B (en) 2024-05-22 2024-05-22 Intelligent enhancement method for bone quality CT image

Publications (2)

Publication Number Publication Date
CN118229538A CN118229538A (en) 2024-06-21
CN118229538B true CN118229538B (en) 2024-09-06

Family

ID=91501169

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410634230.7A Active CN118229538B (en) 2024-05-22 2024-05-22 Intelligent enhancement method for bone quality CT image

Country Status (1)

Country Link
CN (1) CN118229538B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118570205B (en) * 2024-08-01 2024-10-25 苏州睿多思科技有限公司 Image processing method, device and system based on portable X-ray imaging
CN118864470B (en) * 2024-09-26 2025-01-07 瓦拉赫(大连)智能科技有限公司 Intelligent analysis system for obstetrical ultrasonic examination data
CN119107254B (en) * 2024-11-08 2025-01-28 济南宝林信息技术有限公司 Real-time enhancement method of endoscopic images for emergency treatment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117876402A (en) * 2024-03-13 2024-04-12 中国人民解放军总医院第一医学中心 An intelligent segmentation method for temporomandibular joint disorder images

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9282944B2 (en) * 2010-06-22 2016-03-15 Queen's University At Kingston C-arm pose estimation using intensity-based registration of imaging modalities
CN104778669B (en) * 2015-04-16 2017-12-26 北京邮电大学 rapid image denoising method and device
CN115100201B (en) * 2022-08-25 2022-11-11 淄博齐华制衣有限公司 Blending defect detection method of flame-retardant fiber material
CN116883537B (en) * 2023-09-06 2023-12-01 微山县人民医院 Image enhancement-based common surgical image acquisition method
CN117649357B (en) * 2024-01-29 2024-04-12 深圳市恩普电子技术有限公司 Ultrasonic image processing method based on image enhancement
CN117764864B (en) * 2024-02-22 2024-04-26 济南科汛智能科技有限公司 Nuclear magnetic resonance tumor visual detection method based on image denoising

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117876402A (en) * 2024-03-13 2024-04-12 中国人民解放军总医院第一医学中心 An intelligent segmentation method for temporomandibular joint disorder images

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于邻域局部最大均值与多尺度形态学滤波的弱小红外目标检测算法;丁云;张生伟;李国强;马军勇;张春景;;电光与控制;20171222(09);41-45 *

Also Published As

Publication number Publication date
CN118229538A (en) 2024-06-21

Similar Documents

Publication Publication Date Title
CN118229538B (en) Intelligent enhancement method for bone quality CT image
CN117649357B (en) Ultrasonic image processing method based on image enhancement
KR20220099126A (en) A method of bone fracture prediction and an apparatus thereof
JPH10503961A (en) Automated method and apparatus for computerized detection of masses and parenchymal tissue deformation in medical images
CN105488781A (en) Dividing method based on CT image liver tumor focus
CN117853386B (en) Tumor image enhancement method
CN114677391A (en) Spine image segmentation method
CN116503426B (en) Ultrasound Image Segmentation Method Based on Image Processing
CN118485852B (en) Auxiliary method for bone lesion identification in orthopedic imaging diagnosis
CN118172380B (en) Orthopedics leg bone intelligent recognition segmentation method based on local threshold
CN114972067A (en) X-ray small dental film image enhancement method
CN117745722B (en) Medical health physical examination big data optimization enhancement method
CN111260641A (en) A handheld ultrasound imaging system and method based on artificial intelligence
Kumar et al. Spatial mutual information based detail preserving magnetic resonance image enhancement
CN116993764B (en) Stomach CT intelligent segmentation extraction method
CN118628378A (en) X-ray image enhancement method based on CycleGAN
CN116681701B (en) A method for processing ultrasound images of children's lungs
CN109377461B (en) NSCT-based breast X-ray image self-adaptive enhancement method
CN117115133A (en) A system for rapid improvement of medical image quality based on artificial intelligence
CN117011195A (en) Human infrared imaging data processing system for assisting traditional Chinese medicine
CN114677713A (en) Near-infrared light-based arm vein blood sampling point identification method and system
CN119295493B (en) Tumor medical image processing method and system of tumor ablation treatment system
CN119180822B (en) Intelligent detection method of meniscus injury based on image processing
CN111091514A (en) Oral cavity CBCT image denoising method and system
CN117557587B (en) Endoscope cold light source brightness automatic regulating system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant