A medical data intelligent processing method for child chest wall abnormalities
Patent Information
- Application Number
- CN202411106730.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2026-10-09
AI Technical Summary
[0003]为了解决现有方法对儿童胸壁骨骼部分的增强效果较差的技术问题,本发明的目的在于提供一种儿童胸壁异常医疗数据智能处理方法,所采用的技术方案具体如下:
[0038]本发明首先获取儿童胸壁的X光灰度图像中的连通域,以便后续对连通域内的灰度值和质心进行分析,设置种子点,利用种子点表征连通域的灰度延展性的起点位置,进而后续可以结合儿童胸壁内组织部分的延展性特征对种子点间的灰度特征进行分析。然后,对每个种子点与其他种子点之间的灰度差异、邻域灰度分布差异和距离分布情况进行分析,得到每个种子点的辐射范围因子,种子点的辐射范围因子表征了种子点的辐射范围的大小程度,反映了种子点的灰度延展性。进一步的,根据每个像素点与其他像素点对应的种子点的辐射范围因子、像素点之间的灰度差异和距离分布,得到每两个像素点之间的聚类距离度量值。在对像素点之间的聚类度量值进行计算时,结合了像素点对应所处于被辐射范围的辐射程度,修正像素点间的灰度差异以及距离分布情况,充分考虑像素点了若像素点属于组织部分所在区域的扩散性以及渗透性,更加准确的度量了像素点之间的距离特征。最后,对像素点进行聚类时能够获得较为准确的聚类结果,进而能够自适应的确定像素点的增强系数,更好的保留了增强区域内的细节部分,对X光灰度图像内骨骼部分的增强效果较佳。
Smart Images

Figure CN122887749A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image enhancement processing technology, specifically to an intelligent processing method for medical data on chest wall abnormalities in children. Background Technology
[0002] Chest wall abnormalities in children refer to abnormalities in the chest wall structure during development, which may include abnormal development of the ribs, sternum, muscles, and soft tissues. These abnormalities can lead to chest wall deformities, respiratory dysfunction, and cardiovascular compression. When medical personnel use medical imaging to observe chest wall abnormalities in children, the smaller and less dense bones of children compared to adults, coupled with the fact that children's bones are still developing and the epiphyses and articular cartilage are not fully ossified, can easily cause blurred images, making some chest wall skeletal abnormalities difficult to detect. Furthermore, children's active nature during X-ray scans often results in blurred images. Therefore, the quality of the acquired images is usually poor, which can easily affect the judgment of medical personnel. Thus, image enhancement is particularly important. To facilitate observation of the chest wall bones in children, the skeletal portion of medical images needs to be enhanced. Current methods often set the enhancement coefficient for the skeletal portion of the chest wall in children to a fixed value, resulting in poor enhancement effects. Summary of the Invention
[0003] To address the technical problem that existing methods have poor enhancement effects on the skeletal structure of the pediatric chest wall, the present invention aims to provide an intelligent processing method for medical data on pediatric chest wall abnormalities. The specific technical solution adopted is as follows:
[0004] Obtain grayscale X-ray images of the child's chest wall, extract connected components from the grayscale images and denote them as regions to be analyzed; based on the grayscale values and centroid positions of the pixels within each region to be analyzed, set seed points in each region to be analyzed;
[0005] The radiation range factor of each seed point is obtained based on the gray level difference between each seed point and other seed points, the gray level distribution difference in the neighborhood, and the distance distribution.
[0006] Based on the radiation range factor of each pixel in the X-ray grayscale image and the seed points corresponding to other pixels, the grayscale difference and distance distribution between pixels, the clustering distance metric between each pair of pixels is obtained.
[0007] The pixels in the X-ray grayscale image are clustered according to the clustering distance metric, the enhancement coefficient of the pixels in the X-ray grayscale image is determined according to the clustering results, and the X-ray grayscale image is enhanced using the enhancement coefficient.
[0008] Preferably, the step of obtaining the radiation range factor of each seed point based on the gray-level difference between each seed point and other seed points, the difference in gray-level distribution in the neighborhood, and the distance distribution specifically includes:
[0009] Select any two different seed points and denote them as the target seed point and the reference seed point respectively. Based on the gray level difference between the target seed point and the reference seed point, the gray level distribution on the path between the target seed point and the reference seed point, and the gray level value of the target seed point, the gravitational field model of the reference seed point on the target seed point is obtained.
[0010] Based on the distance distribution between the target seed point and its neighboring pixels, the grayscale distribution between the reference seed point and its neighboring pixels, and the grayscale difference between the target seed point and the reference seed point, a repulsive force field model of the reference seed point to the target seed point is obtained.
[0011] The sum of the gravitational field model and the repulsive field model is used as the resultant force field model of the reference seed point and the target seed point.
[0012] The radiation range factor of the target seed point is obtained based on the resultant force field model of other seed points on the target seed point.
[0013] Preferably, the calculation formula for the gravitational field model of the reference seed point relative to the target seed point is as follows:
[0014]
[0015] Among them, U att (r,t) represents the gravitational field model of the r-th seed point with respect to the t-th seed point, h t h represents the gray value of the t-th seed point. r σ represents the gray value of the r-th seed point. tr represents the standard deviation of the gray values of all pixels along the line connecting the t-th seed point and the r-th seed point, exp() represents an exponential function with the natural constant e as the base, and ω is the preset gravitational gain coefficient.
[0016] Preferably, the calculation formula for the repulsive field model of the reference seed point to the target seed point is as follows:
[0017]
[0018] Among them, U rep (r,t) represents the repulsive field model of the r-th seed point to the t-th seed point, h t h represents the gray value of the t-th seed point. r D represents the gray value of the r-th seed point. r,i D represents the grayscale difference between the r-th seed point and its neighboring r-th pixel.t,i denoted by t, the grayscale difference between the t-th seed point and the r-th pixel in its neighborhood, N0 represents the total number of pixels in the neighborhood, log2() represents the logarithmic function with base 2, th() is the hyperbolic tangent function, and γ is the preset repulsive gain coefficient.
[0019] Preferably, obtaining the radiation range factor of the target seed point based on the resultant force field model of other seed points on the target seed point specifically includes:
[0020] The mean of the resultant force field model of all other seed points relative to the target seed point is calculated to obtain the average resultant force value of the target seed point;
[0021] When the average resultant force value of the target seed point is less than or equal to the first preset value, the radiation range factor of the target seed point is set to the second preset value;
[0022] When the average resultant force value of the target seed point is greater than the first preset value, the radiation range factor of the target seed point is obtained based on the average resultant force value of the target seed point. The average resultant force value and the radiation range factor are positively correlated, and the second preset value is less than the radiation range factor at this time.
[0023] Preferably, the step of obtaining the clustering distance metric between every two pixels based on the radiation range factor of each pixel in the X-ray grayscale image and the seed points corresponding to other pixels, the grayscale difference between pixels, and the distance distribution specifically includes:
[0024] Find the seed point that is closest to each pixel in the X-ray grayscale image and denote it as the feature seed point of each pixel;
[0025] The clustering distance metric between any two pixels is obtained based on the distance and grayscale difference between any two pixels in the X-ray grayscale image and the radiation range factor of the feature seed point.
[0026] Preferably, the formula for calculating the clustering distance metric is as follows:
[0027]
[0028] Where W(a,b) represents the clustering distance metric between the a-th pixel and the b-th pixel, and E a E represents the radiance factor of the feature seed point of the a-th pixel. b h represents the radiance factor of the feature seed point of the b-th pixel. a h represents the grayscale value of the a-th pixel. b Let D(a,B) represent the grayscale value of the b-th pixel, and let E represent the Euclidean distance between the a-th and b-th pixels. maxThis represents the maximum value of the radiation range factor for all seed points.
[0029] Preferably, determining the enhancement coefficient of pixels in the X-ray grayscale image based on the clustering results specifically includes:
[0030] Calculate the mean gray value of all pixels in each cluster in the clustering results, and record the region formed by the pixels in the cluster with the largest mean gray value as the suspected skeletal region;
[0031] Edge detection is performed on the suspected skeletal region to obtain the edge pixels of the suspected skeletal region. The mean of the gradient of all edge pixels of the suspected skeletal region is calculated and recorded as the first coefficient. The second coefficient is obtained based on the variance of the slope of all edge pixels of the suspected skeletal region. The variance of the slope is negatively correlated with the second coefficient. The sum of the negatively correlated normalized value of the product of the first coefficient and the second coefficient and the preset value is calculated to obtain the enhancement coefficient of each pixel in the suspected skeletal region.
[0032] Set the enhancement factor of pixels in the X-ray grayscale image, excluding suspected skeletal areas, to a preset value.
[0033] Preferably, the enhancement processing of the X-ray grayscale image using the enhancement coefficient specifically includes:
[0034] The product of the enhancement coefficient of each pixel and the gray value of the pixel is used as the enhanced gray value of each pixel.
[0035] Preferably, the step of setting seed points in each region to be analyzed based on the grayscale value and centroid position of pixels within the region to be analyzed specifically includes:
[0036] The pixel at the centroid of each region to be analyzed is set as a seed point, and the gray value of the seed point is the average gray value of all pixels in the region to be analyzed where the seed point is located.
[0037] The embodiments of the present invention have at least the following beneficial effects:
[0038] This invention first obtains connected components from the grayscale X-ray image of a child's chest wall to facilitate subsequent analysis of grayscale values and centroids within these components. Seed points are then established to characterize the starting points of the grayscale extensibility of the connected components. This allows for further analysis of the grayscale features between seed points in conjunction with the extensibility characteristics of the tissue within the child's chest wall. Next, the grayscale differences, neighborhood grayscale distribution differences, and distance distributions between each seed point and other seed points are analyzed to obtain a radiation range factor for each seed point. This radiation range factor characterizes the size of the seed point's radiation range, reflecting its grayscale extensibility. Furthermore, based on the radiation range factors of each pixel and its corresponding seed points, the grayscale differences between pixels, and the distance distribution, a clustering distance metric is obtained between every two pixels. When calculating the clustering metric between pixels, the radiation level of the radiation range corresponding to the pixel is considered, correcting for grayscale differences and distance distributions between pixels. This fully considers the diffusion and permeability of pixels within the tissue region, resulting in a more accurate measurement of the distance features between pixels. Finally, when clustering pixels, more accurate clustering results can be obtained, which can adaptively determine the enhancement coefficient of pixels, better preserve the details in the enhanced area, and have a better enhancement effect on the skeletal part in X-ray grayscale images. Attached Figure Description
[0039] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a flowchart of a method for intelligent processing of medical data on abnormal chest walls in children, provided by the present invention. Detailed Implementation
[0041] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of an intelligent processing method for medical data on pediatric chest wall abnormalities proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0042] Unless otherwise defined, 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 pertains.
[0043] The following description, in conjunction with the accompanying drawings, details the specific scheme of the intelligent processing method for medical data on abnormal chest walls in children provided by this invention.
[0044] Please see Figure 1 The diagram illustrates a flowchart of an intelligent processing method for medical data on pediatric chest wall abnormalities according to an embodiment of the present invention. The method includes the following steps:
[0045] Step 1: Obtain a grayscale X-ray image of the child's chest wall and extract the connected components in the grayscale X-ray image as the region to be analyzed; based on the grayscale value and centroid position of the pixels in the region to be analyzed, set seed points in each region to be analyzed.
[0046] First, X-ray images of the child's chest wall are acquired. Since different imaging machines exist, grayscale normalization is performed on the X-ray images to facilitate image analysis and description, ensuring that the grayscale values of all pixels are distributed within the range [0, 255], resulting in a grayscale image. Considering the active nature of children, the X-ray images may be blurry, and noise may interfere with image analysis. Therefore, denoising processing is necessary. In this embodiment, minimum value filtering is used to process the grayscale image to obtain the grayscale X-ray image of the child's chest wall.
[0047] Because children's bones are smaller and less dense than adults' bones, and because children's bones are still developing and the epiphyses and articular cartilage are not fully ossified, X-ray imaging results may be less than ideal, especially in areas where the chest wall bones overlap with tissues and internal organs. Directly using threshold segmentation or connected component analysis may not accurately obtain the contours of the bones, which may prevent accurate adaptive enhancement processing of the bones. Therefore, before obtaining the adaptive enhancement coefficients of the bones in a child's chest wall, it is necessary to perform region segmentation on the grayscale X-ray image of the child's chest wall to obtain the accurate location of the bones.
[0048] In grayscale X-ray images of a child's chest, the body tissues, internal organs, and bones exhibit three different grayscale distributions. However, these three different grayscale distribution regions are closely related and have small feature differences. Using traditional thresholding or clustering segmentation methods may result in residual image information of the tissues or internal organs in the bone segmentation results, leading to inaccurate bone segmentation results.
[0049] Based on this, this embodiment addresses the uneven pixel distribution in children's chest wall X-ray grayscale images by employing a clustering algorithm to extract the skeletal portion. However, directly clustering pixels in X-ray grayscale images using common clustering algorithms yields poor results. This embodiment first extracts connected components from the X-ray grayscale image, designating them as the regions to be analyzed. The potential outward extension range of each connected component in the X-ray grayscale image is estimated, and the distance metric between pixels is adjusted. The method for connected component analysis is a well-known technique and will not be described in detail here.
[0050] Furthermore, in order to better analyze the potential outward extension range of the connected components, it is necessary to set corresponding feature points at the center of each region to be analyzed. That is, seed points are set in each region to be analyzed based on the gray values and centroid positions of the pixels within the region to be analyzed.
[0051] Specifically, a pixel at the centroid of each region to be analyzed is set as a seed point. The grayscale value of the seed point is the average grayscale value of all pixels within the region to be analyzed. In other words, a seed point is set for each region to be analyzed, with the seed point located at the centroid of the region, and its grayscale value being the average grayscale value of all pixels within that region. Thus, the seed point in each region to be analyzed represents the initial position where grayscale extension may occur within a local area.
[0052] Step 2: Based on the grayscale difference between each seed point and other seed points, the difference in grayscale distribution in the neighborhood, and the distance distribution, obtain the radiation range factor of each seed point.
[0053] Human tissues are distributed throughout the body, including various parts of a child's chest wall. However, they are only distributed in localized areas of the visceral and skeletal regions of a child's chest. Therefore, body tissues are more permeable than visceral and skeletal tissues. This is reflected in X-ray grayscale images, where tissues appear to be present around or inside visceral or skeletal areas. Based on this characteristic, seed points can be used to estimate the radiation range of pixels. Tissues are more permeable and have greater grayscale extension, meaning that the connected region containing a seed point belonging to a tissue has a larger outward radiation range. In this embodiment, the concept of an artificial potential field is used to calculate the gravitational and repulsive fields between each seed point and other seed points, constructing a resultant force field to quantify the radiation range of each seed.
[0054] First, let's take any two different seed points as an example. We select any two different seed points and denote them as the target seed point and the reference seed point, respectively. Based on the gray level difference between the target seed point and the reference seed point, the gray level distribution on the path between the target seed point and the reference seed point, and the gray level value of the target seed point, we obtain the gravitational field model of the reference seed point on the target seed point.
[0055] In this embodiment, the t-th seed point is taken as the target seed point, and the r-th seed point is taken as the reference seed point, where t ≠ r. Then, the calculation formula for the gravitational field model of the reference seed point relative to the target seed point, that is, the gravitational field model of the r-th seed point relative to the t-th seed point, can be expressed as:
[0056]
[0057] Among them, U att (r,t) represents the gravitational field model of the r-th seed point with respect to the t-th seed point, h t h represents the gray value of the t-th seed point. r σ represents the gray value of the r-th seed point. tr represents the standard deviation of the gray values of all pixels along the line connecting the t-th seed point and the r-th seed point, exp() represents the exponential function with the natural constant e as the base, and ω is the preset gravity gain coefficient, which is 1 in this embodiment. The implementer can set it according to the specific implementation scenario.
[0058] (h t -h r This reflects the grayscale difference between the t-th seed point and the r-th seed point. σ tr This reflects the grayscale distribution along the path between the t-th and r-th seed points. A smaller value indicates less grayscale fluctuation between the t-th and r-th seed points, suggesting that pixels along the straight path may belong to the same region. In other words, the smaller the grayscale value of the target seed point, the smaller the grayscale difference between it and other seed points, and the smaller the grayscale fluctuation along the straight path between them. This indicates a stronger gravitational pull from other seed points on the target seed point, meaning a larger value for the corresponding gravitational field model.
[0059] The gravitational field model of the target seed point characterizes the probability that other seed points belong to the same region as the target seed. att The larger the value of (r,t), the more likely the r-th seed point is to belong to the same part as the t-th seed point, and thus the larger the radiation range of the t-th seed point.
[0060] Then, based on the distance distribution between the target seed point and its neighboring pixels, the grayscale distribution between the reference seed point and its neighboring pixels, and the grayscale difference between the target seed point and the reference seed point, the repulsive field model of the reference seed point to the target seed point is obtained. The calculation formula for the repulsive field model of the reference seed point to the target seed point, i.e., the repulsive field model of the r-th seed point to the t-th seed point, can be expressed as:
[0061]
[0062] Among them, U rep (r,t) represents the repulsive field model of the r-th seed point to the t-th seed point, h t h represents the gray value of the t-th seed point. r D represents the gray value of the r-th seed point. r,i D represents the grayscale difference between the r-th seed point and its neighboring r-th pixel. t,i The value represents the grayscale difference between the t-th seed point and the r-th pixel in its neighborhood. N0 represents the total number of pixels in the neighborhood. log2() represents the logarithmic function with base 2. th() is the hyperbolic tangent function. γ is the preset repulsive gain coefficient, which is set to 1 in this embodiment. The implementer can set it according to the specific implementation scenario.
[0063] h t -h r This reflects the grayscale difference between the t-th seed point and the r-th seed point. express and The ratio, The gray-level density of the neighborhood of the r-th seed point is characterized. The difference between the two values represents the gray-level density of the neighborhood of the t-th seed point. The smaller the difference between the two values, the more similar the gray-level distribution of the neighborhood of the two seed points is, and the smaller the value after the square is calculated. The larger the difference between the two values, the greater the difference in the gray-level distribution of the neighborhood of the two seed points is, and the larger the value after the square is calculated.
[0064] It should be noted that, in this embodiment, the hyperbolic tangent function is used to perform positive correlation normalization on the calculated index, so as to unify the dimensions of the gravitational field and the repulsive field. Furthermore, in this embodiment, the absolute value of the difference between the grayscale value of a neighboring pixel and the grayscale value of the seed pixel is used as the grayscale difference between the two.
[0065] By combining the differences in gray-level density in the neighborhoods of two seed points and the gray-level differences between the two seed points, the repulsive force between other seed points and the target seed point is quantified. The repulsive field model corresponding to the target seed point characterizes the repulsion of other seed points towards the target seed point; the larger the value, the less likely the two are to belong to the same region.
[0066] Furthermore, the resultant force field of the r-th seed point to the t-th seed point is obtained by combining the gravitational field and the repulsive field. The sum of the gravitational field model and the repulsive field model is used as the resultant force field model of the reference seed point to the target seed point. That is, the sum of the gravitational field model of the r-th seed point to the t-th seed point and the repulsive field model of the r-th seed point to the t-th seed point is the resultant force field model of the r-th seed point to the t-th seed point.
[0067] It should be noted that the gravitational field and the repulsive field are in opposite directions. When the gravitational force of the r-th seed point to the t-th seed point is greater than the repulsive force of the r-th seed point to the t-th seed point, the t-th seed point can radiate a greater distance in the direction of the r-th seed point. When the resultant force is 0, the upper limit of the radiation range is reached.
[0068] Since many other seed points exist around the target seed point and exert potential field effects on it, the radiation range factor of the target seed point can be obtained based on the resultant force field model of the other seed points on the target seed point. Specifically, the average resultant force value of the target seed point is obtained by calculating the mean of the resultant force field model of all other seed points on the target seed point.
[0069] When the average resultant force value of the target seed point is less than or equal to the first preset value, the radiation range factor of the target seed point is set to the second preset value. In this embodiment, the first preset value is 0. When the average resultant force value of the target seed point is less than or equal to 0, it indicates that the repulsive force of other seed points on the target seed point is large, which in turn indicates that the radiation range of the target seed point is small. The smaller the radiation range factor value of the target seed point, the more the second preset value is set to 1.
[0070] When the average resultant force value of the target seed point is greater than the first preset value, the radiation range factor of the target seed point is obtained based on the average resultant force value of the target seed point. The average resultant force value and the radiation range factor are positively correlated, and the second preset value is less than the radiation range factor at this time.
[0071] When the average net force of the target seed point is greater than 0, it indicates that the gravitational pull of other seed points on the target seed point is relatively large, which in turn indicates that the radiation range of the target seed point is large and the grayscale extension is greater. Therefore, the radiation range factor of the target seed point at this time is greater than the second preset value. The formula for calculating the radiation range factor of the target seed point at this time can be expressed as:
[0072]
[0073] Among them, E t Let represent the radiation range factor of the t-th seed point, i.e., the radiation range factor of the target seed point; N1 represents the number of other seed points besides the t-th seed point; U(t,r) represents the resultant force field model of the r-th seed point with respect to the t-th seed point; and log2() represents the logarithmic function with base 2. The average resultant force value at the target seed point.
[0074] The larger the average resultant force value of the target seed point, the larger the radiation range of the target seed point, and the larger the radiation range factor of the target seed point. Therefore, the radiation range factor of the seed point characterizes the size of the radiation range of the seed point and reflects the grayscale extensibility of the seed point.
[0075] Step 3: Based on the radiation range factor of each pixel in the X-ray grayscale image and the seed points corresponding to other pixels, the grayscale difference and distance distribution between pixels, obtain the clustering distance metric between every two pixels.
[0076] When calculating the distance metric between every two pixels during the clustering process, the distance metric is adjusted by taking into account the radiation range of the seed points around the pixel, correcting the grayscale differences between pixels and the balancing weights between distance parameters.
[0077] Based on this, to calculate and analyze the clustering distance metric for any two different pixels, it is first necessary to obtain the nearest seed point that has already been deployed for each pixel, that is, to obtain the radiation level within the maximum possible radiation range of each pixel. Specifically, the nearest seed point to each pixel in the X-ray grayscale image is obtained and recorded as the feature seed point of each pixel. Then, based on the distance and grayscale difference between any two pixels in the X-ray grayscale image, and the radiation range factor of the feature seed point, the clustering distance metric between the two pixels is obtained.
[0078] In this embodiment, the a-th pixel and the b-th pixel in an X-ray grayscale image are used as examples for illustration, where a≠b. The formula for calculating the cluster distance metric between the a-th pixel and the b-th pixel can be expressed as:
[0079]
[0080] Where W(a,b) represents the clustering distance metric between the a-th pixel and the b-th pixel, E a E represents the radiance factor of the feature seed point of the a-th pixel. b h represents the radiance factor of the feature seed point of the b-th pixel. a h represents the grayscale value of the a-th pixel. b Let D(a,b) represent the grayscale value of the b-th pixel, and let E(a,b) represent the Euclidean distance between the a-th and b-th pixels. max This represents the maximum value of the radiation range factor for all seed points.
[0081] The product of the radiation range factors of the nearest seed point to two pixels is used as the ratio to the maximum value, and the product is normalized to serve as a balancing weight. The greater the radiation level within the maximum possible radiation range of a pixel, the greater its penetration and diffusion. Therefore, the clustering metric for that pixel should consider grayscale more than distance.
[0082] This is a balancing weight for the grayscale difference between two pixels. A larger value indicates greater diffusion between the two pixels, thus improving the final representation value of the grayscale difference. As a balancing weight for the distance between two pixels, the greater the diffusion between the two pixels, the smaller the corresponding balancing weight value for the distance, thus reducing the final representation value of the distance.
[0083] Using the same calculation method, the clustering distance metric between every two pixels in an X-ray grayscale image can be obtained, which can be used to perform clustering analysis on all pixels in the X-ray grayscale image.
[0084] Step four: Cluster the pixels in the X-ray grayscale image according to the clustering distance metric, determine the enhancement coefficient of the pixels in the X-ray grayscale image according to the clustering results, and use the enhancement coefficient to enhance the X-ray grayscale image.
[0085] In X-ray grayscale images, the clustering distance metric between every two pixels can more accurately reflect and balance the grayscale differences and distance characteristics between pixels, taking into account the diffusion and penetration of pixels belonging to tissue regions. The corrected clustering metric is used to cluster pixels in the X-ray grayscale image. In this embodiment, the K-means clustering algorithm is used, with K set to 3, resulting in three clusters: tissue, internal organs, and bones. Then, regions suspected to be bone regions within these three clusters can be filtered out, and an adaptive enhancement coefficient is obtained based on the grayscale characteristics within these regions.
[0086] Specifically, the mean grayscale value of all pixels in each cluster is calculated, and the region formed by the pixels in the cluster with the highest mean grayscale value is recorded as the suspected skeletal region. Since the skeletal part appears as a bright white area in an X-ray image, the cluster with the highest mean grayscale value in the clustering results is most likely the pixel corresponding to the skeletal part.
[0087] Furthermore, edge detection is performed on the suspected skeletal region to obtain edge pixels of the suspected skeletal region. The mean of the gradients of all edge pixels of the suspected skeletal region is calculated and recorded as the first coefficient. A second coefficient is obtained based on the variance of the slopes of all edge pixels of the suspected skeletal region, and the variance of the slopes is negatively correlated with the second coefficient. The sum of the negatively correlated normalized value of the product of the first coefficient and the second coefficient and a preset value is calculated to obtain the enhancement coefficient of each pixel in the suspected skeletal region. In this embodiment, the formula for calculating the enhancement coefficient corresponding to the suspected skeletal region can be expressed as:
[0088]
[0089] Where r represents the enhancement coefficient corresponding to the suspected skeletal region, that is, the enhancement coefficient of each pixel within the suspected skeletal region, and S 2 T represents the variance of the slope of all edge pixels in the suspected skeletal region, M represents the number of edge pixels contained in the suspected skeletal region, and T represents the variance of the slope of all edge pixels in the suspected skeletal region. u This represents the gradient value of the u-th edge pixel in the suspected skeletal region, and exp() represents an exponential function with the natural constant e as the base.
[0090] The first coefficient represents the average gradient of the edge pixels of the suspected skeletal region, reflecting the strength of the edge gradient of the suspected skeletal region. The second coefficient reflects the smoothness of the edges of the suspected skeletal region. The smaller the first and second coefficients, the weaker the edge gradient of the suspected skeletal region, the worse the edge decomposition smoothness, and therefore the higher the enhancement level in the corresponding region should be, i.e., the larger the corresponding enhancement coefficient.
[0091] In this embodiment, the preset value is set to 1, and the implementer can set it according to the specific implementation scenario. The negative correlation normalized value of the product of the first coefficient and the second coefficient is less than or equal to 1. The sum of the preset value and the value of the preset value is used to amplify the enhancement coefficient, thereby enhancing the pixels in the suspected skeletal region.
[0092] It should be noted that there may be multiple suspected skeletal regions in an X-ray grayscale image. Each suspected skeletal region is analyzed separately using the same method, and the enhancement coefficient of each pixel in each suspected skeletal region is adaptively obtained. Pixels located in the same suspected skeletal region have the same enhancement coefficient.
[0093] Furthermore, in X-ray grayscale images, pixels other than suspected skeletal areas do not require enhancement processing. Therefore, in this embodiment, the enhancement coefficient of pixels other than suspected skeletal areas in X-ray grayscale images is set to a preset value, which is 1.
[0094] Finally, the X-ray grayscale image is enhanced using the enhancement coefficients, specifically by multiplying the enhancement coefficient of each pixel by its grayscale value. The enhanced grayscale values of all pixels constitute the enhanced X-ray image, which strengthens the skeletal portion of the child's chest wall. Through adaptive enhancement of the overall grayscale value of the suspected skeletal region, the computational load is reduced while better preserving the details within the enhanced area, resulting in a superior image enhancement effect.
[0095] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for intelligent processing of medical data on abnormal chest walls in children, characterized in that, The method includes the following steps: Obtain grayscale X-ray images of the child's chest wall, extract connected components from the grayscale images and denote them as regions to be analyzed; based on the grayscale values and centroid positions of the pixels within each region to be analyzed, set seed points in each region to be analyzed; The radiation range factor of each seed point is obtained based on the gray level difference between each seed point and other seed points, the gray level distribution difference in the neighborhood, and the distance distribution. Based on the radiation range factor of each pixel in the X-ray grayscale image and the seed points corresponding to other pixels, the grayscale difference and distance distribution between pixels, the clustering distance metric between each pair of pixels is obtained. The pixels in the X-ray grayscale image are clustered according to the clustering distance metric, the enhancement coefficient of the pixels in the X-ray grayscale image is determined according to the clustering results, and the X-ray grayscale image is enhanced using the enhancement coefficient.
2. The intelligent processing method for medical data on pediatric chest wall abnormalities according to claim 1, characterized in that, The radiation range factor for each seed point is obtained based on the gray-level difference between each seed point and other seed points, the difference in gray-level distribution in the neighborhood, and the distance distribution. Specifically, this includes: Select any two different seed points and denote them as the target seed point and the reference seed point respectively. Based on the gray level difference between the target seed point and the reference seed point, the gray level distribution on the path between the target seed point and the reference seed point, and the gray level value of the target seed point, the gravitational field model of the reference seed point on the target seed point is obtained. Based on the distance distribution between the target seed point and its neighboring pixels, the grayscale distribution between the reference seed point and its neighboring pixels, and the grayscale difference between the target seed point and the reference seed point, a repulsive force field model of the reference seed point to the target seed point is obtained. The sum of the gravitational field model and the repulsive field model is used as the resultant force field model of the reference seed point and the target seed point. The radiation range factor of the target seed point is obtained based on the resultant force field model of other seed points on the target seed point.
3. The intelligent processing method for medical data on pediatric chest wall abnormalities according to claim 2, characterized in that, The specific formula for calculating the gravitational field model of the reference seed point relative to the target seed point is as follows: Among them, U att (r,t) represents the gravitational field model of the r-th seed point with respect to the t-th seed point, h t h represents the gray value of the t-th seed point. r σ represents the gray value of the r-th seed point. tr represents the standard deviation of the gray values of all pixels along the line connecting the t-th seed point and the r-th seed point, exp() represents an exponential function with the natural constant e as the base, and ω is the preset gravitational gain coefficient.
4. The intelligent processing method for medical data on pediatric chest wall abnormalities according to claim 2, characterized in that, The specific formula for calculating the repulsive field model of the reference seed point to the target seed point is as follows: Among them, u rep (r,t) represents the repulsive field model of the r-th seed point to the t-th seed point, h t h represents the gray value of the t-th seed point. r D represents the gray value of the r-th seed point. r,i D represents the grayscale difference between the r-th seed point and its neighboring r-th pixel. t,i denoted by t, the grayscale difference between the t-th seed point and the r-th pixel in its neighborhood, N0 represents the total number of pixels in the neighborhood, log2() represents the logarithmic function with base 2, th() is the hyperbolic tangent function, and γ is the preset repulsive gain coefficient.
5. The intelligent processing method for medical data on pediatric chest wall abnormalities according to claim 2, characterized in that, The step of obtaining the radiation range factor of the target seed point based on the resultant force field model of other seed points on the target seed point specifically includes: The mean of the resultant force field model of all other seed points relative to the target seed point is calculated to obtain the average resultant force value of the target seed point; When the average resultant force value of the target seed point is less than or equal to the first preset value, the radiation range factor of the target seed point is set to the second preset value; When the average resultant force value of the target seed point is greater than the first preset value, the radiation range factor of the target seed point is obtained based on the average resultant force value of the target seed point. The average resultant force value and the radiation range factor are positively correlated, and the second preset value is less than the radiation range factor at this time.
6. The intelligent processing method for medical data on pediatric chest wall abnormalities according to claim 1, characterized in that, The step of obtaining the clustering distance metric between every two pixels based on the radiation range factor of each pixel in the X-ray grayscale image and the seed points corresponding to other pixels, the grayscale difference between pixels, and the distance distribution specifically includes: Find the seed point that is closest to each pixel in the X-ray grayscale image and denote it as the feature seed point of each pixel; The clustering distance metric between any two pixels is obtained based on the distance and grayscale difference between any two pixels in the X-ray grayscale image and the radiation range factor of the feature seed point.
7. The intelligent processing method for medical data on pediatric chest wall abnormalities according to claim 6, characterized in that, The specific formula for calculating the cluster distance metric is as follows: Where W(a,b) represents the clustering distance metric between the a-th pixel and the b-th pixel, and E a E represents the radiance factor of the feature seed point of the a-th pixel. b h represents the radiance factor of the feature seed point of the b-th pixel. a h represents the grayscale value of the a-th pixel. b Let D(a,b) represent the grayscale value of the b-th pixel, and let E(a,b) represent the Euclidean distance between the a-th and b-th pixels. max This represents the maximum value of the radiation range factor for all seed points.
8. The intelligent processing method for medical data on pediatric chest wall abnormalities according to claim 1, characterized in that, The step of determining the enhancement coefficient of pixels in the X-ray grayscale image based on the clustering results specifically includes: Calculate the mean gray value of all pixels in each cluster in the clustering results, and record the region formed by the pixels in the cluster with the largest mean gray value as the suspected skeletal region; Edge detection is performed on the suspected skeletal region to obtain the edge pixels of the suspected skeletal region. The mean of the gradient of all edge pixels of the suspected skeletal region is calculated and recorded as the first coefficient. The second coefficient is obtained based on the variance of the slope of all edge pixels of the suspected skeletal region. The variance of the slope is negatively correlated with the second coefficient. The sum of the negatively correlated normalized value of the product of the first coefficient and the second coefficient and the preset value is calculated to obtain the enhancement coefficient of each pixel in the suspected skeletal region. Set the enhancement factor of pixels in the X-ray grayscale image, excluding suspected skeletal areas, to a preset value.
9. The intelligent processing method for medical data on pediatric chest wall abnormalities according to claim 1, characterized in that, The enhancement process of the X-ray grayscale image using the enhancement coefficient specifically includes: The product of the enhancement coefficient of each pixel and the gray value of the pixel is used as the enhanced gray value of each pixel.
10. The intelligent processing method for medical data on pediatric chest wall abnormalities according to claim 1, characterized in that, The step of setting seed points in each region to be analyzed based on the grayscale value and centroid position of pixels within the region to be analyzed specifically includes: The pixel at the centroid of each region to be analyzed is set as a seed point, and the gray value of the seed point is the average gray value of all pixels in the region to be analyzed where the seed point is located.