A method and system for thyroid ultrasound assisted scanning
By calculating the gradient change rate and edge intensity of thyroid ultrasound images, and combining the morphological parameters and contrast characteristics of the lesion area, the boundary segmentation and lesion classification of thyroid ultrasound scans were optimized. This solved the problems of inaccurate boundary detection and insufficient lesion identification in the existing technology, and achieved higher diagnostic accuracy and personalized support.
Patent Information
- Application Number
- CN202510578081.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-05-06
AI Technical Summary
In existing thyroid ultrasound-assisted scanning methods, boundary detection is easily affected by noise, lesion area identification relies on a single characteristic, resulting in insufficient ability to identify low-contrast lesions, classification relies on a single statistical model, reducing the discriminative power, and there is a lack of personalized diagnostic support.
By calculating the pixel gradient change rate and edge intensity, a gradient difference weight matrix is constructed. Combined with the morphological parameters and contrast features of the lesion area, the pixel-level matching degree with global features is calculated. Combined with thyroid volume and hormone levels, personalized diagnosis is optimized.
It improves the accuracy of glandular structure recognition, reduces the impact of noise interference, enhances the ability to detect low-contrast lesions, and improves the accuracy of lesion classification and the reliability of personalized diagnosis.
Smart Images

Figure CN120510106B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect detection technology, and in particular to a thyroid ultrasound-assisted scanning method and system. Background Technology
[0002] The field of defect detection technology encompasses methods and techniques for the automatic identification and analysis of anomalies, defects, or malfunctions in various objects, structures, or systems. The core of this technology involves utilizing computer vision, image processing, and pattern recognition techniques to detect, extract features from, and classify images or signals of target objects to identify potential defects. Overall, this field involves a variety of applications, including product quality inspection in industrial manufacturing, lesion identification in medical image analysis, and abnormal behavior detection in traffic monitoring. In medical image analysis, defect detection technology is primarily used to identify abnormal structures or tissue lesions in image data to assist doctors in diagnosis. Its systematic technical framework includes steps such as data acquisition, image preprocessing, feature extraction, and classification decision-making. Multiple algorithms are used to analyze regions of interest to determine the presence of abnormal features.
[0003] The thyroid ultrasound-assisted scanning method refers to the automatic or semi-automatic scanning, segmentation, and analysis of thyroid tissue using ultrasound imaging technology combined with computer image analysis methods to identify potential lesion areas. This method mainly encompasses thyroid region segmentation, boundary detection, texture analysis, and feature extraction based on ultrasound images to achieve accurate identification of target areas. Specifically, this method uses an ultrasound probe to acquire ultrasound image data of thyroid tissue, extracts the thyroid contour using a gradient-based boundary detection method, and then combines texture analysis to identify the echo characteristics of different tissue regions. Furthermore, this method employs pattern matching and statistical learning methods to extract the morphological, density, and echo distribution features of thyroid nodules to aid in lesion identification.
[0004] In existing technologies, fixed image processing methods are difficult to adapt to specific tissue structures during boundary detection, are susceptible to noise interference, and affect the accuracy of glandular region boundaries. Lesion identification mainly relies on single echo characteristics or grayscale distribution, ignoring gradient changes and morphological parameters, resulting in insufficient ability to identify low-contrast lesions and increasing the risk of missed detections. Lesion classification relies on a single statistical model, lacking pixel-level and global feature matching optimization, reducing classification discrimination and affecting the final judgment result. The lack of comprehensive analysis of volume, hormone levels, and the ratio of lesion morphological changes means that the diagnostic process does not adequately consider individual differences, making it difficult to provide accurate personalized diagnostic suggestions and reducing the clinical applicability of image analysis. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and to propose a thyroid ultrasound-assisted scanning method and system.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a thyroid ultrasound-assisted scanning method, comprising the following steps:
[0007] S1: Obtain the pixel grayscale value, local contrast and edge sharpness of thyroid ultrasound images, calculate the pixel gradient change rate, filter the thyroid gland boundary region based on the gradient amplitude change rate, and obtain the gradient feature parameters of thyroid ultrasound images.
[0008] S2: Based on the gradient feature parameters of the thyroid ultrasound image, calculate the gradient change rate and edge intensity at different scales, screen the glandular tissue boundary according to the edge intensity, calculate the gray level uniformity and construct the gradient difference weight matrix, adjust the boundary of the region with drastic gradient change but uniform gray level, calculate the local mean deviation of the pixel point at different scales, set the segmentation threshold according to the mean difference between categories, and obtain the thyroid gland segmentation boundary data.
[0009] S3: Based on the thyroid gland segmentation boundary data, calculate the pixel grayscale offset, gradient direction distribution and morphological parameters of the lesion area, measure the local contrast variation coefficient, screen low contrast lesion areas, and obtain the morphological and contrast characteristics of the thyroid lesion area.
[0010] S4: Based on the morphological and contrast characteristics of the thyroid lesion area, calculate the morphological change rate of the lesion area, set the classification weight according to the inter-class variance, calculate the pixel-level and global feature matching fit degree, and obtain the thyroid lesion classification matching result.
[0011] S5: Based on the thyroid lesion classification and matching results, extract the ratio of thyroid volume, hormone level and lesion morphology changes, calculate the fit between lesion characteristics and the diagnostic database, calculate the reliability of the classification method, and obtain the dynamic weight parameters for personalized thyroid diagnosis.
[0012] As a further aspect of the present invention, the gradient feature parameters of the thyroid ultrasound image include pixel gradient change rate, gradient amplitude change rate, and glandular boundary region; the thyroid gland segmentation boundary data includes differential scale gradient change rate, edge intensity, gray level uniformity, gradient difference weight matrix, local mean deviation, and segmentation threshold; the morphological and contrast features of the thyroid lesion region include pixel gray level offset, gradient direction distribution, morphological parameters, local contrast variation coefficient, and low-contrast lesion region; the thyroid lesion classification matching result includes lesion region morphological change rate, classification weight, and pixel-level and global feature matching fit degree; and the dynamic weight parameters for personalized thyroid diagnosis include thyroid volume, hormone level, lesion morphological change ratio, lesion feature and diagnostic database fit degree, and classification method reliability.
[0013] As a further aspect of the present invention, the step of obtaining the gradient feature parameters of the thyroid ultrasound image specifically includes:
[0014] S101: Obtain the pixel grayscale values of thyroid ultrasound images, traverse the image pixels, record the grayscale values of multiple pixels, calculate the grayscale histogram based on the spatial distribution of pixels, count the number of pixels corresponding to different grayscale values, calculate the grayscale mean and variance, divide into multiple spatial intervals, calculate the grayscale mean of multiple intervals, calculate the overall grayscale trend based on the changes in the grayscale mean of multiple intervals, perform grayscale characteristic calculation based on the pixel grayscale values and their distribution characteristics, and obtain pixel grayscale distribution parameters.
[0015] S102: Based on the pixel grayscale distribution parameters, select multiple window regions, calculate the ratio of the maximum grayscale value to the minimum grayscale value within the window, count the contrast values of all windows, calculate the mean and standard deviation of the regional contrast, calculate the contrast fluctuation trend of the differentiated regions according to the spatial distribution of contrast, calculate the contrast change of the overall image based on the contrast change characteristics of multiple regions, perform local contrast characteristic calculation, and obtain local contrast change parameters.
[0016] S103: Based on the local contrast change parameters, calculate the pixel gradient change rate, calculate the gradient magnitude according to the gray-level gradient of the pixel in multiple directions, filter the pixels whose gradient magnitude change rate exceeds the set threshold according to the gradient magnitude change, mark the boundary region of the thyroid gland, calculate the average gradient magnitude, gradient direction distribution and edge sharpness value of the region, perform boundary region characteristic calculation, and obtain the gradient feature parameters of the thyroid ultrasound image.
[0017] As a further aspect of the present invention, the steps for obtaining the thyroid gland segmentation boundary data are specifically as follows:
[0018] S201: Based on the gradient feature parameters of the thyroid ultrasound image, calculate the gradient change rate at the differential scale, determine the pixel gradient value at the differential scale, calculate the gradient change rate and analyze the change of gradient amplitude at the differential scale, calculate the edge intensity of multiple regions based on the change, filter pixels with edge intensity greater than a set threshold, mark the boundary region of glandular tissue, and obtain the pixel distribution of glandular tissue boundary.
[0019] S202: Based on the pixel distribution of the gland tissue boundary, calculate the gray level uniformity of multiple regions, statistically analyze the gray level mean and variance of the gland tissue region, construct a gradient difference weight matrix, adjust the boundary according to the gray level uniformity of the gradient drastic change region, filter the boundary region with uniform gray level but drastic gradient change, adjust the boundary position, and obtain the gland boundary after gradient adjustment.
[0020] S203: Based on the gland boundary after gradient adjustment, calculate the local mean deviation of pixels at the differential scale, calculate the mean difference between multiple categories, set the segmentation threshold according to the mean difference, filter pixels that meet the threshold condition, calibrate the gland segmentation boundary, and obtain thyroid gland segmentation boundary data.
[0021] As a further aspect of the present invention, the calculation of the local mean deviation of pixels at the differential scale is performed using the formula:
[0022]
[0023] Calculate the local mean deviation D p The mean difference between multiple categories is calculated, a segmentation threshold is set based on the mean difference, pixels that meet the threshold condition are selected, the gland segmentation boundary is marked, and the thyroid gland segmentation boundary data is obtained.
[0024] Among them, D p Representing pixel p at different scales s i Local mean deviation below Represents pixel p at scale s i The grayscale value below, Representative scale s i The local mean of the scale, where n represents the number of scales selected, i represents the scale index, and s i This represents the i-th selected scale.
[0025] As a further aspect of the present invention, the steps for obtaining the morphological and contrast features of the thyroid lesion region are specifically as follows:
[0026] S301: Based on the thyroid gland segmentation boundary data, calculate the pixel grayscale offset of the lesion area, extract the pixel grayscale value of the lesion area, calculate the grayscale offset of each pixel relative to the surrounding pixels, statistically analyze the grayscale offset trend in different directions, analyze the gradient direction distribution, calculate the gradient direction change amplitude, calculate the pixel feature of the lesion area based on the grayscale offset and gradient information, and obtain the grayscale offset and gradient direction data of the lesion area.
[0027] S302: Based on the gray-level offset and gradient direction data of the lesion area, calculate the morphological parameters of the lesion area, statistically analyze the area, perimeter and morphological ratio of the lesion area, calculate the gray-level distribution characteristics inside the area, calculate the local contrast variation coefficient according to the morphological parameters and gray-level distribution characteristics, analyze the contrast change of the lesion area, perform morphological and contrast feature calculations, and obtain the morphological parameters and contrast variation coefficient of the lesion area.
[0028] S303: Based on the morphological parameters and contrast variation coefficient of the lesion area, low-contrast lesion areas are screened. A screening threshold is set according to the contrast variation coefficient of the lesion area. Lesion areas that meet the threshold range are screened. The area ratio and spatial distribution of low-contrast lesion areas are calculated. Lesion area screening calculation is performed to obtain the morphological and contrast characteristics of thyroid lesion areas.
[0029] As a further aspect of the present invention, the steps for obtaining the thyroid lesion classification matching results are specifically as follows:
[0030] S401: Based on the morphological and contrast features of the thyroid lesion area, extract the contour information of the lesion area, calculate the gradient change of the contour in the differential direction, statistically analyze the gradient fluctuation of the lesion area boundary, calculate the morphological change rate based on the fluctuation amplitude, analyze the morphological change trend, perform lesion morphological feature calculation, and obtain the morphological change rate of the lesion area.
[0031] S402: Based on the morphological change rate of the lesion area, set the classification weight according to the inter-class variance, calculate the gray-level variance between the lesion area and the surrounding tissue, analyze the gray-level mean of the lesion area of the differentiated category, calculate the variance information, adjust the classification weight according to the variance ratio, calculate the classification parameters of the lesion category in combination with the morphological change characteristics, perform classification weight calculation, and obtain the classification weight parameters of the lesion area.
[0032] S403: Based on the classification weight parameters of the lesion area, calculate the matching fit between pixel-level and global features, analyze the matching between pixel features of the lesion area and global statistical features, calculate the error distribution of pixel-level features, adjust the lesion category assignment according to the error, screen the lesion categories that meet the matching conditions, perform matching calculations, and obtain the thyroid lesion classification matching results.
[0033] As a further aspect of the present invention, the error distribution for calculating pixel-level features is calculated using the following formula:
[0034]
[0035] Calculate the error distribution value, adjust the lesion category assignment according to the error situation, screen the lesion categories that meet the matching conditions, perform matching calculation, and obtain the thyroid lesion classification matching results;
[0036] Among them, E p The error distribution values represent pixel-level features, where N represents the total number of pixels within the lesion area, and P... i μ represents the grayscale value of the i-th pixel. P σ represents the mean gray value of all pixels within the lesion area. P The standard deviation of the gray values of all pixels within the lesion area is represented by M, which represents the total number of global statistical features. j F represents the weight parameter of the j-th global feature. ij This represents the feature value of the i-th pixel in the j-th feature dimension. This represents the mean of the j-th global feature.
[0037] As a further aspect of the present invention, the steps for obtaining the dynamic weight parameters for personalized thyroid diagnosis are specifically as follows:
[0038] S501: Based on the thyroid lesion classification and matching results, extract the ratio of changes in thyroid volume, hormone level and lesion morphology, calculate the volume ratio of the lesion area, statistically analyze the hormone level data of the lesion area, calculate the ratio of changes in lesion morphology at different time points, analyze the correlation between volume, hormone level and morphological changes, calculate the fluctuation range of feature data, construct a lesion feature parameter set based on the fluctuation trend, calculate the lesion feature parameters, and obtain lesion feature ratio data.
[0039] S502: Based on the lesion feature ratio data, calculate the fitting degree between the lesion features and the diagnostic database, statistically analyze the mean and standard deviation of the lesion features, calculate the feature deviation and measure the fitting degree, perform lesion feature matching calculation, and obtain the lesion feature fitting degree.
[0040] S503: Based on the fitting degree of the lesion features, calculate the reliability of the classification method, analyze the range of lesion classification error, statistically analyze the distribution of error, calculate the reliability interval and adjust the classification weight, and obtain the dynamic weight parameters for personalized thyroid diagnosis.
[0041] A thyroid ultrasound-assisted scanning system, the thyroid ultrasound-assisted scanning system being used to perform the above-described thyroid ultrasound-assisted scanning method, the system comprising:
[0042] The image gradient analysis module acquires the pixel grayscale value, local contrast and edge sharpness of thyroid ultrasound images, calculates the pixel gradient change rate, filters the thyroid gland boundary region based on the pixel gradient change rate, calculates the gradient feature parameters of the pixels in the boundary region, filters out the pixel region whose gradient amplitude change rate conforms to the gland tissue characteristics, and obtains the gradient feature parameters of thyroid ultrasound images.
[0043] The gland boundary segmentation module calls the gradient feature parameters of the thyroid ultrasound image, calculates the gradient change rate and edge intensity at different scales, filters the gland tissue boundary region based on the edge intensity, calculates the gray level uniformity and constructs the gradient difference weight matrix, adjusts the boundary of the region with drastic gradient change but uniform gray level, calculates the local mean deviation of the pixel at different scales, sets the segmentation threshold based on the mean difference between categories, and obtains the thyroid gland segmentation boundary data.
[0044] The lesion feature extraction module calls the thyroid gland segmentation boundary data, calculates the pixel grayscale offset, gradient direction distribution and morphological parameters of the lesion area, measures the local contrast variation coefficient, filters low contrast lesion areas, and obtains the morphological and contrast features of the thyroid lesion area.
[0045] The lesion classification and matching module calls the morphological and contrast features of the thyroid lesion area, calculates the morphological change rate of the lesion area, sets the classification weight according to the inter-class variance, calculates the pixel-level and global feature matching fit, and obtains the thyroid lesion classification and matching result.
[0046] The personalized diagnosis calculation module calls the thyroid lesion classification matching results, extracts the ratio of thyroid volume, hormone level and lesion morphology changes, calculates the fit between lesion characteristics and the diagnostic database, calculates the reliability of the classification method, and obtains the dynamic weight parameters for personalized thyroid diagnosis.
[0047] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0048] This invention enhances the accuracy of glandular structure recognition and reduces the impact of noise interference on boundary determination by calculating pixel gradient change rates and filtering boundary regions based on gradient magnitude change rates. It optimizes glandular tissue boundary segmentation by combining gradient change rates and edge strength calculations at different scales, reducing the probability of misidentification in areas with drastic gradient changes. A gradient difference weight matrix is constructed, and boundaries are adjusted based on gray-level uniformity to make the segmentation results more consistent with actual tissue morphology. The detection capability of low-contrast lesions is improved by combining pixel gray-level offset, gradient direction distribution, and morphological parameter calculations. The accuracy of lesion classification is improved through morphological change rate calculation and pixel-level and global feature matching. Diagnostic data support is optimized by combining thyroid volume, hormone levels, and the ratio of lesion morphological changes. The goodness of fit between lesion features and the diagnostic database is calculated to improve the credibility and scientific basis of personalized diagnosis. Attached Figure Description
[0049] Figure 1 This is a schematic diagram of the workflow of the present invention;
[0050] Figure 2 This is a flowchart of the steps for obtaining gradient feature parameters of thyroid ultrasound images according to the present invention.
[0051] Figure 3 This is a flowchart illustrating the steps for obtaining thyroid gland segmentation boundary data in this invention.
[0052] Figure 4 This is a flowchart illustrating the steps for obtaining the morphological and contrast characteristics of the thyroid lesion region in this invention.
[0053] Figure 5 This is a flowchart illustrating the steps for obtaining the thyroid lesion classification and matching results of the present invention.
[0054] Figure 6 This is a flowchart illustrating the steps for obtaining dynamic weight parameters for personalized thyroid diagnosis in this invention. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0056] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0057] Please see Figure 1 The present invention provides a technical solution: a method for ultrasound-assisted thyroid scanning, comprising the following steps:
[0058] S1: Obtain the pixel grayscale value, local contrast and edge sharpness of thyroid ultrasound images, calculate the pixel gradient change rate, filter the thyroid gland boundary region based on the gradient amplitude change rate, and obtain the gradient feature parameters of thyroid ultrasound images.
[0059] S2: Based on the gradient feature parameters of thyroid ultrasound images, calculate the gradient change rate and edge intensity at different scales, screen the boundaries of glandular tissue according to the edge intensity, calculate the gray level uniformity and construct the gradient difference weight matrix, adjust the boundaries of regions with drastic gradient changes but uniform gray level, calculate the local mean deviation of pixels at different scales, set the segmentation threshold according to the mean difference between categories, and obtain the segmentation boundary data of thyroid glands.
[0060] S3: Based on the segmentation boundary data of thyroid glands, calculate the pixel grayscale offset, gradient direction distribution and morphological parameters of the lesion area, measure the local contrast variation coefficient, screen low contrast lesion areas, and obtain the morphological and contrast characteristics of the thyroid lesion area.
[0061] S4: Based on the morphological and contrast features of the thyroid lesion area, calculate the morphological change rate of the lesion area, set the classification weight according to the inter-class variance, calculate the pixel-level and global feature matching fit, and obtain the thyroid lesion classification matching result.
[0062] S5: Based on the classification and matching results of thyroid lesions, extract the ratio of changes in thyroid volume, hormone levels and lesion morphology, calculate the fit between lesion characteristics and the diagnostic database, calculate the reliability of the classification method, and obtain the dynamic weight parameters for personalized thyroid diagnosis.
[0063] The gradient feature parameters of thyroid ultrasound images include pixel gradient change rate, gradient amplitude change rate, and glandular boundary region. Thyroid gland segmentation boundary data includes differential scale gradient change rate, edge intensity, gray level uniformity, gradient difference weight matrix, local mean deviation, and segmentation threshold. The morphological and contrast features of thyroid lesion regions include pixel gray level offset, gradient direction distribution, morphological parameters, local contrast variation coefficient, and low-contrast lesion regions. The thyroid lesion classification matching results include lesion region morphological change rate, classification weight, and pixel-level and global feature matching fit. The dynamic weight parameters for personalized thyroid diagnosis include thyroid volume, hormone level, lesion morphological change ratio, lesion features and diagnostic database fit, and classification method reliability.
[0064] Please see Figure 2 The specific steps for obtaining gradient feature parameters of thyroid ultrasound images are as follows:
[0065] S101: Obtain the pixel grayscale values of thyroid ultrasound images, traverse the image pixels, record the grayscale values of multiple pixels, calculate the grayscale histogram based on the spatial distribution of pixels, count the number of pixels corresponding to different grayscale values, calculate the grayscale mean and variance, divide into multiple spatial intervals, calculate the grayscale mean of multiple intervals, calculate the overall grayscale trend based on the changes in the grayscale mean of multiple intervals, perform grayscale characteristic calculation based on the pixel grayscale values and their distribution characteristics, and obtain pixel grayscale distribution parameters.
[0066] To obtain the pixel grayscale values of thyroid ultrasound images, the grayscale information of each pixel is first read from the ultrasound image. All pixels are traversed, and their grayscale values are recorded. Simultaneously, the spatial location of each pixel is stored using two-dimensional coordinate information, constructing a grayscale histogram. By traversing the pixel grayscale values and grouping them statistically, the number of pixels corresponding to each grayscale level is calculated. For example, if the grayscale level is set to 0-255, the pixel grayscale value distribution of a certain ultrasound image might be: grayscale value 20 corresponds to 150 pixels, grayscale value 50 corresponds to 300 pixels, and so on, obtaining complete grayscale histogram data. Subsequently, the grayscale mean and variance of the entire image are calculated. The formula for calculating the grayscale mean is... Where N is the total number of pixels, P i For pixel grayscale values, if the total number of pixels in the image is 1024×768, the calculated mean grayscale value is 128.5, and the variance is calculated using the following formula: Assuming the calculated variance is 35.6, the image is then divided into multiple spatial intervals based on its spatial location. For example, the image is divided into 16 sub-regions of 4×4. The mean gray value is calculated for each sub-region, resulting in the following gray-level mean matrix:
[0067]
[0068] Then, calculate the grayscale mean change trend of each sub-region. For example, calculate the mean change trend by row. If the mean increases with the row number, it indicates that there is a gradient change in the grayscale distribution. Use a linear fitting method to calculate the trend change rate. Assuming the trend slope is 0.15, then combine the overall pixel grayscale values and their distribution characteristics to calculate grayscale characteristic parameters. For example, calculate the global grayscale contrast by taking the ratio of the maximum grayscale value to the minimum grayscale value. Assuming the maximum grayscale value is 240 and the minimum grayscale value is 10, then calculate the contrast. Finally, pixel grayscale distribution parameters are obtained based on various calculations, which are used for subsequent image analysis and processing.
[0069] S102: Based on pixel grayscale distribution parameters, select multiple window regions, calculate the ratio of the maximum grayscale value to the minimum grayscale value within the window, count the contrast values of all windows, calculate the mean and standard deviation of the regional contrast, calculate the contrast fluctuation trend of the differentiated regions based on the spatial distribution of contrast, calculate the contrast change of the overall image based on the contrast change characteristics of multiple regions, perform local contrast characteristic calculation, and obtain local contrast change parameters.
[0070] Based on pixel grayscale distribution parameters, multiple window regions are selected, with a window size of 5×5 pixels. For each window, the ratio of the maximum grayscale value to the minimum grayscale value is calculated. For example, if the maximum grayscale value in window 1 is 230 and the minimum grayscale value is 20, then its contrast ratio is calculated as follows: The contrast values of all windows are calculated sequentially, and their mean and standard deviation are statistically analyzed. Assuming the calculated mean is 12.3 and the standard deviation is 2.5, the spatial distribution of contrast is then analyzed. A partitioning method is used to calculate the contrast variation in different regions. For example, the image is divided into four quadrants: upper, lower, left, and right. The calculated mean contrast values for each quadrant are 12.1, 13.5, 11.8, and 12.6, respectively. Based on these values, the contrast fluctuation trend in different regions is calculated, and the standard deviation is used to calculate the fluctuation amplitude in each region. For example, the standard deviation for the upper region is 2.1, for the lower region it is 2.8, for the left region it is 1.9, and for the right region it is 2.3. Subsequently, statistical analysis is performed on all regions. The overall image contrast variation is calculated based on the contrast variation characteristics of each region, and the root mean square method is used to calculate the overall contrast variation rate. For example, the calculated root mean square contrast variation value is 2.35. Finally, local contrast variation parameters are obtained, which can be used for image contrast characteristic analysis.
[0071] S103: Based on local contrast change parameters, calculate pixel gradient change rate, calculate gradient magnitude based on grayscale gradient of pixel in multiple directions, filter pixels whose gradient magnitude change rate exceeds a set threshold based on gradient magnitude change, mark the thyroid gland boundary region, calculate the average gradient magnitude, gradient direction distribution and edge sharpness value of the region, perform boundary region characteristic calculation, and obtain gradient feature parameters of thyroid ultrasound image.
[0072] Based on local contrast variation parameters, the pixel gradient change rate is calculated. First, the gray-level gradient of the pixel in multiple directions is obtained. For example, the Sobel operator is used to calculate the horizontal gradient G. x =P(x+1,y)-P(x-1,y) Vertical gradient G y =P(x,y+1)-P(x,y-1) calculates the gradient magnitude The gradient magnitude is calculated for all pixels, and their changes are statistically analyzed. A gradient change threshold of 15 is set, and pixels with a change rate exceeding this threshold are selected. For example, if 50 pixels in a certain region meet the condition of a change rate exceeding 15, then this region is marked as the boundary region of the thyroid gland. The average gradient magnitude of this region is further calculated. For example, the average gradient magnitude of all pixels is 25.3. The gradient direction distribution is calculated, and the proportion of pixels in each gradient direction is statistically analyzed. For example, 0° direction accounts for 20%, 45° direction accounts for 30%, 90° direction accounts for 25%, and 135° direction accounts for 25%. At the same time, the edge sharpness value is calculated using the root mean square gradient method, and the calculated result is 18.7. Finally, the gradient feature parameters of the thyroid ultrasound image are obtained.
[0073] Please see Figure 3 The specific steps for obtaining the thyroid gland segmentation boundary data are as follows:
[0074] S201: Based on the gradient feature parameters of thyroid ultrasound images, calculate the gradient change rate at different scales, determine the pixel gradient value at different scales, calculate the gradient change rate and analyze the change of gradient amplitude at different scales, calculate the edge intensity of multiple regions based on the change, filter pixels with edge intensity greater than a set threshold, mark the boundary region of glandular tissue, and obtain the pixel distribution of glandular tissue boundary.
[0075] Based on the gradient feature parameters of thyroid ultrasound images, the gradient change rate at different scales was calculated. First, the ultrasound image was divided into regions of different scales, with window sizes of 3×3, 5×5, and 7×7, respectively. For each scale, the local pixel gradient change rate was calculated, and the Sobel operator was used to calculate the horizontal gradient G. x =P(x+1,y)-P(x-1,y) and the gradient G in the vertical direction y=P(x,y+1)-P(x,y-1) and then calculate the gradient magnitude. Within windows of different scales, the gradient magnitude is normalized, and the gradient rate of change is calculated. The formula for calculating the gradient rate of change of pixel (i,j) at scale k is defined as follows:
[0076]
[0077] Where ∈ is used to prevent small values with a denominator of zero. Assuming the gradient magnitude at a point is 20 on a 3×3 scale and becomes 25 on a 5×5 scale, then its gradient change rate is:
[0078]
[0079] The gradient change rate of all pixels at each scale is statistically analyzed to examine the variation of gradient magnitude at different scales and calculate the trend. For example, a linear fitting method is used to calculate the average growth rate of the change rate, assuming the calculated rate is 0.12. Then, based on the gradient change, the edge intensity of each region is calculated. Edge intensity is defined as the average gradient magnitude in the local region, and the calculation formula is as follows:
[0080]
[0081] Where N is the total number of pixels in the region. If the average gradient magnitude of pixels in a certain region is 30, then the edge intensity is 30. Then, an edge intensity threshold is set, for example, the threshold is set to 25. Pixels with edge intensity greater than the threshold are filtered out. Pixels that meet the conditions are marked as the glandular tissue boundary region, and finally the pixel distribution of the glandular tissue boundary is obtained.
[0082] S202: Based on the pixel distribution of glandular tissue boundaries, calculate the gray-level uniformity of multiple regions, statistically analyze the gray-level mean and variance of glandular tissue regions, construct a gradient difference weight matrix, adjust the boundaries according to the gray-level uniformity of regions with drastic gradient changes, filter boundary regions with uniform gray-level but drastic gradient changes, adjust the boundary positions, and obtain the glandular boundaries after gradient adjustment.
[0083] Based on the pixel distribution at the glandular tissue boundary, the gray-level uniformity of multiple regions is calculated. First, the glandular region is divided into multiple sub-regions, for example, into 16 4×4 regions. The gray-level mean is calculated within each region, using the following formula: Where N is the total number of pixels in the sub-region, and P(i,j) is the pixel gray value. Assuming the mean gray value of pixels in a certain region is 128.4, the variance is then calculated. If the calculated variance is 22.5, then the gray-level distribution in this region is relatively uniform. The mean and variance of the gray levels in all sub-regions are statistically analyzed to construct a gradient difference weight matrix. This matrix is used to characterize the gray-level uniformity in regions with drastic gradient changes. The weight calculation formula is set as follows:
[0084]
[0085] Among them, G avg Let σ be the global gradient mean. G Let be the gradient standard deviation. If the gradient value of a pixel is 35, the global gradient mean is 30, and the gradient standard deviation is 5, then the weight of that pixel is calculated as follows:
[0086] The boundary is adjusted based on the gray-level uniformity of the gradient-changing region. Boundary regions with uniform gray-level but drastic gradient changes are selected by setting selection criteria, such as selecting regions with gray-level variance less than 30 but gradient change rate greater than 0.2. Finally, the boundary position is adjusted to obtain the gland boundary after gradient adjustment.
[0087] S203: Based on the gradient-adjusted gland boundary, calculate the local mean deviation of pixels at the differential scale, calculate the mean difference between multiple categories, set the segmentation threshold according to the mean difference, filter pixels that meet the threshold condition, calibrate the gland segmentation boundary, and obtain thyroid gland segmentation boundary data.
[0088] The local mean deviation of pixels at different scales is calculated using the following formula:
[0089]
[0090] Calculate the local mean deviation D p The mean difference between multiple categories is calculated, a segmentation threshold is set based on the mean difference, pixels that meet the threshold condition are selected, the gland segmentation boundary is marked, and the thyroid gland segmentation boundary data is obtained.
[0091] Among them, D p Representing pixel p at different scales s i Local mean deviation below Represents pixel p at scale s i The grayscale value below, Representative scale s i The local mean of the scale, where n represents the number of scales selected, i represents the scale index, and s i This represents the i-th selected scale.
[0092] formula:
[0093]
[0094] Detailed explanation of the formula and its calculation derivation:
[0095] This formula is used to calculate pixel p at different scales s i Local mean deviation D p The calculation steps are as follows:
[0096] Obtain image grayscale values at different scales:
[0097] For the original image, apply different scale transformations (such as Gaussian blurs of different sizes) to obtain images at different scales. i The image is then processed. Specifically, a Gaussian filter is applied to the original image, with the filter's standard deviation σ corresponding to the desired scale. Commonly used σ values range from 0.5 to 2.0, increasing by 0.5 each time. By applying these different Gaussian filters to the original image, a series of images at different scales are obtained.
[0098] Calculate local mean
[0099] At each scale s i Below, a window (e.g., a 5×5 rectangular area) is defined centered on pixel p. Within this window, the average grayscale value of all pixels is calculated to obtain the local mean. For example, for a 5x5 window, the calculation process is as follows:
[0100]
[0101] in, This indicates that the j-th pixel within the window is at scale s. i The grayscale value below.
[0102] Calculate the absolute differences and then take the average:
[0103] For each scale s i Calculate the gray value of pixel p and the corresponding local mean The absolute difference between the values is then calculated. Next, the absolute differences at all scales are summed and divided by the number of scales, n, to obtain the local mean deviation D of pixel p. p :
[0104]
[0105] Specific calculation example:
[0106] Suppose a Gaussian filter is applied to the original image, and the scale parameter σ is chosen to be 0.5, 1.0, and 1.5, resulting in three images at different scales (i.e., n = 3). For pixel p, the gray values at these three scales are 120, 125, and 130, respectively. Within a 5×5 window centered on p, the local mean at each scale is calculated:
[0107] For σ = 0.5:
[0108] For σ = 1.0:
[0109] For σ = 1.5:
[0110] Then, calculate the absolute difference at each scale:
[0111] For σ = 0.5:
[0112] For σ = 1.0:
[0113] For σ = 1.5:
[0114] Finally, calculate the local mean deviation D. p :
[0115] The results show that the average absolute deviation between the grayscale value of pixel p and the corresponding local mean is 1.67 at different selected scales. This value reflects the local brightness variation of pixel p at different scales and can be used in subsequent image segmentation or feature extraction processes.
[0116] Please see Figure 4 The specific steps for obtaining the morphological and contrast characteristics of thyroid lesion areas are as follows:
[0117] S301: Based on the segmentation boundary data of the thyroid gland, calculate the pixel grayscale offset of the lesion area, extract the pixel grayscale value of the lesion area, calculate the grayscale offset of each pixel relative to the surrounding pixels, statistically analyze the grayscale offset trend in different directions, analyze the gradient direction distribution, calculate the gradient direction change amplitude, calculate the pixel feature of the lesion area based on the grayscale offset and gradient information, and obtain the grayscale offset and gradient direction data of the lesion area.
[0118] Based on the thyroid gland segmentation boundary data, the pixel grayscale values of the lesion region are first extracted. Then, the pixels in the segmented lesion region are traversed, the grayscale value of each pixel is recorded, and the grayscale offset relative to the surrounding pixels is calculated. The grayscale offset calculation formula is as follows:
[0119]
[0120] Where D(x,y) is the grayscale offset of pixel (x,y), P(x,y) is the grayscale value of that pixel, and P(x... i ,y i Let N be the grayscale values of its N neighboring pixels. Assuming a pixel has a grayscale value of 150 and the average grayscale value of its five surrounding pixels is 140, then its grayscale offset is calculated as follows:
[0121] D(x,y) = 150 - 140 = 10;
[0122] Then, the grayscale shift trends in different directions were statistically analyzed. Using the window sliding method, the average grayscale shift was calculated in the horizontal, vertical, and diagonal directions, yielding an average horizontal shift of 8, an average vertical shift of 12, and an average diagonal shift of 10. Next, the gradient direction distribution was analyzed, and the gradient direction of each pixel was calculated using the following formula:
[0123]
[0124] Among them, G x and G y Let G be the gradient values in the horizontal and vertical directions, respectively. x =30, G y =40, then the gradient direction is calculated as follows:
[0125] Then, the magnitude of gradient direction change is statistically analyzed, and the standard deviation of the gradient direction is calculated. If the standard deviation of the gradient direction in a certain region is 15°, then the gradient change in that region is relatively drastic. Combining grayscale offset and gradient information, the pixel features of the lesion region are calculated, including grayscale fluctuation range, gradient direction concentration, etc., and finally, grayscale offset and gradient direction data of the lesion region are obtained.
[0126] S302: Based on gray-level offset and gradient direction data of the lesion area, calculate the morphological parameters of the lesion area, statistically analyze the area, perimeter and morphological ratio of the lesion area, calculate the gray-level distribution characteristics within the area, calculate the local contrast variation coefficient based on the morphological parameters and gray-level distribution characteristics, analyze the contrast changes of the lesion area, perform morphological and contrast feature calculations, and obtain the morphological parameters and contrast variation coefficient of the lesion area.
[0127] Based on the grayscale offset and gradient direction data of the lesion area, the morphological parameters of the lesion area are calculated. First, the area of the lesion area is counted, and the number of pixels in the area is calculated using the pixel counting method. Assuming that the lesion area contains 500 pixels and the pixel spacing is 0.1mm, the area of the lesion area is calculated as A = 500 × (0.1) 2 =5mm2 ;
[0128] Then, the perimeter of the lesion area is calculated using the edge pixel counting method. Assuming the number of edge pixels is 120, the perimeter is calculated as P = 120 × 0.1 = 12 mm.
[0129] Next, the morphology ratio is calculated, which is defined as follows:
[0130] Substitute calculation
[0131] Then, the gray-level distribution characteristics within the region are calculated, and the mean and variance of the gray-level in the lesion region are statistically analyzed. Assuming the mean gray-level is 135 and the variance is 20, the local contrast variation coefficient is then calculated based on the morphological parameters and gray-level distribution characteristics, defined as...
[0132] Where σ is the gray-level variance and μ is the gray-level mean, calculated as follows:
[0133] Finally, the contrast changes in the lesion area were analyzed, the contrast fluctuation range of different areas was statistically analyzed, the ratio of the maximum contrast to the minimum contrast was calculated, and the morphological parameters and contrast variation coefficient of the lesion area were obtained.
[0134] S303: Based on the morphological parameters and contrast variation coefficient of the lesion area, low-contrast lesion areas are screened. A screening threshold is set according to the contrast variation coefficient of the lesion area, and lesion areas that meet the threshold range are screened. The area ratio and spatial distribution of low-contrast lesion areas are calculated, and lesion area screening calculations are performed to obtain the morphological and contrast characteristics of thyroid lesion areas.
[0135] Based on lesion region morphological parameters and contrast variation coefficient, low-contrast lesion regions are screened. A screening threshold for the contrast variation coefficient is set, assuming the threshold is T. c =0.2, filter to satisfy C v For lesions with a contrast ratio <0.2, the area percentage of low-contrast lesions is calculated and defined as [the percentage is missing from the original text].
[0136] Among them, A low-contrast A represents the area of the low-contrast lesion region. total Let be the total lesion area. Assuming the low-contrast lesion area is 2.5 mm² and the total lesion area is 10 mm², then calculate...
[0137] Then, the spatial distribution of low-contrast lesion areas is analyzed, the distribution location of lesion areas in ultrasound images is statistically analyzed, and their concentration is determined. If the lesion is mainly distributed in the central area of the gland, it is marked as a central lesion; otherwise, it is marked as a peripheral lesion. Finally, the morphological and contrast characteristics of the thyroid lesion area are obtained.
[0138] Please see Figure 5 The specific steps for obtaining the thyroid lesion classification matching results are as follows:
[0139] S401: Based on the morphological and contrast features of the thyroid lesion area, extract the contour information of the lesion area, calculate the gradient change of the contour in the differential direction, statistically analyze the gradient fluctuation of the lesion area boundary, calculate the morphological change rate based on the fluctuation amplitude, analyze the morphological change trend, perform lesion morphological feature calculation, and obtain the morphological change rate of the lesion area.
[0140] Based on the morphological and contrast features of the thyroid lesion region, the contour information of the lesion region is first extracted. Edge detection methods such as the Sobel operator are used to calculate the gradient values of boundary pixels. The pixels of the lesion region are traversed, boundary contour points are recorded, and the gradient changes of the contour in multiple directions are calculated. The gradient change calculation formula is as follows:
[0141] Among them, G x and G y These are the gradients in the horizontal and vertical directions, respectively. Let G be the gradient at a certain pixel. x =25, G y =40, then its gradient is calculated as follows
[0142] Next, the gradient fluctuations at the lesion region boundaries are statistically analyzed, and the standard deviation of the gradients at the boundary pixels is calculated. A statistical window size of 5×5 is set, and the mean gradient within the window is calculated. If the mean gradient within a window is 45 and the standard deviation is 6, then the gradient fluctuation within that window is considered large. The morphological change rate is then calculated based on the fluctuation amplitude. The formula for calculating the morphological change rate is...
[0143] Among them, G max and G min These are the maximum and minimum gradient values of the lesion area, respectively. If G... max =50, G min =20, then
[0144] Then, the trend of morphological changes is analyzed, the rate of gradient change with boundary position is calculated, and the difference calculation method is used to analyze the change of gradient with contour curvature. A curvature threshold T is set. c=0.2. If the rate of change of curvature of a certain contour exceeds this threshold, the contour is judged to be an irregular lesion boundary. Finally, the morphological change rate of the lesion area is obtained by combining all morphological calculation data.
[0145] S402: Based on the morphological change rate of the lesion area, set the classification weight according to the inter-class variance, calculate the gray-level variance between the lesion area and the surrounding tissue, analyze the gray-level mean of the lesion area of the differential category, calculate the variance information, adjust the classification weight according to the variance ratio, calculate the classification parameters of the lesion category in combination with the morphological change characteristics, perform classification weight calculation, and obtain the classification weight parameters of the lesion area.
[0146] Based on the morphological change rate of the lesion area and setting classification weights according to the inter-class variance, the gray-level variance between the lesion area and surrounding tissues is first calculated. The pixel gray-level statistical method is used to calculate the gray-level variance of the lesion area using the following formula:
[0147] in, P represents the variance of gray levels in the lesion area. i The pixel grayscale value of the lesion area, μ b This represents the average grayscale value of the lesion area. If the lesion area contains 100 pixels, the average grayscale value is 120, and the grayscale values of individual pixels are 110, 115, 125, 130, and so on.
[0148] The calculated grayscale variance is 18.2. Similarly, the grayscale variance of the surrounding tissue is calculated. The value was set to 10.5. Then, the mean gray level of the lesion regions in the differentiated categories was analyzed, and the variance information was calculated, defined as...
[0149] Substituting into the calculation, we get
[0150] Then, the classification weights are adjusted based on the variance ratio, and a variance ratio threshold T is set. v =1.5, if V>T v If the classification weight adjustment coefficient is 1.2, then it is set to 1; otherwise, it is set to 1. Finally, the classification parameters of the lesion category are calculated by combining the morphological change characteristics, the classification weight of the lesion area of different categories is calculated, and the classification weight parameters of the lesion area are finally obtained.
[0151] S403: Based on the classification weight parameters of the lesion region, calculate the matching fit between pixel-level and global features, analyze the matching between pixel features of the lesion region and global statistical features, calculate the error distribution of pixel-level features, adjust the lesion category assignment according to the error, screen the lesion categories that meet the matching conditions, perform matching calculations, and obtain the thyroid lesion classification matching results.
[0152] The error distribution of pixel-level features is calculated using the following formula:
[0153]
[0154] Calculate the error distribution value, adjust the lesion category assignment according to the error situation, screen the lesion categories that meet the matching conditions, perform matching calculation, and obtain the thyroid lesion classification matching results;
[0155] Among them, E p The error distribution values represent pixel-level features, where N represents the total number of pixels within the lesion area, and P... i μ represents the grayscale value of the i-th pixel. P σ represents the mean gray value of all pixels within the lesion area. P The standard deviation of the gray values of all pixels within the lesion area is represented by M, which represents the total number of global statistical features. j F represents the weight parameter of the j-th global feature. ij This represents the feature value of the i-th pixel in the j-th feature dimension. This represents the mean of the j-th global feature.
[0156] formula:
[0157]
[0158] Detailed explanation of the formula and its calculation derivation:
[0159] This formula is used to calculate the pixel-level feature error distribution value E of lesion areas in medical images. p This is used to evaluate how well each pixel matches the global features.
[0160] Parameter acquisition method:
[0161] N: Total number of pixels within the lesion region. The boundaries of the lesion region are determined by segmenting the medical image, and then the number of pixels within that region is counted.
[0162] P i : The grayscale value of the i-th pixel. It is obtained directly from the image data, and the grayscale value range is usually from 0 to 255.
[0163] μ P The mean grayscale value of all pixels within the lesion area. This is obtained by calculating the average grayscale value of all pixels within the lesion area.
[0164] σ P Standard deviation of grayscale values of all pixels within the lesion area. This is obtained by calculating the standard deviation of grayscale values of all pixels within the lesion area.
[0165] M: The total number of global statistical features. Determined based on the selected types of global features, such as the number of features like texture and shape.
[0166] Wj : The weight parameter of the j-th global feature. It is determined based on the importance of the feature to the classification task, either through expert experience or by using statistical methods (such as principal component analysis).
[0167] F ij : The feature value of the i-th pixel in the j-th feature dimension. It is obtained by calculating the corresponding features (such as texture, gradient, etc.) for each pixel.
[0168] The mean of the j-th global feature. It is obtained by calculating the average value of all pixels in the entire image or lesion region along the j-th feature dimension.
[0169] Specific numerical examples:
[0170] Suppose that in a medical image, the segmented lesion region contains N = 1000 pixels.
[0171] Calculate the mean value μ of grayscale. P and standard deviation σ P :
[0172] Obtain the grayscale values of all pixels within the lesion area from the image data, and calculate their mean and standard deviation.
[0173] For example, assuming the mean gray value is μ P =120, standard deviation σ P =15.
[0174] Determine the number of global features M and the weights W j :
[0175] We choose three global features (such as texture, shape, and edge strength), so M=3.
[0176] Weights are assigned based on the importance of each feature to the classification:
[0177] W1 = 0.5 (texture feature);
[0178] W2 = 0.3 (shape characteristics);
[0179] W3 = 0.2 (edge strength feature);
[0180] Calculate the feature value F for each pixel ij and global feature mean
[0181] For each pixel i and each feature j, calculate the feature value F. ij .
[0182] For example, for the first pixel i = 1:
[0183] Texture feature value F11 =0.8;
[0184] Shape eigenvalue F 12 =0.6;
[0185] Edge strength eigenvalue F 13 =0.4;
[0186] Calculate the global feature mean
[0187]
[0188]
[0189]
[0190] Calculate the error distribution value E for each pixel. p :
[0191] For the first pixel i = 1, its grayscale value P1 = 130:
[0192] Standardized grayscale difference:
[0193]
[0194] Weighted sum of eigenvalues:
[0195]
[0196] Calculate the final error distribution value E p :
[0197]
[0198] For the first pixel i = 1:
[0199]
[0200] Derivation conclusion:
[0201] The calculation is performed for all pixels i = 1, 2, ..., 1000, and the final result is E. p This reflects the matching between pixel features within the lesion area and global statistical features. A higher E... p The value indicates a significant deviation between pixel features within the lesion area and global statistical features, suggesting that further adjustments to the lesion category assignment or optimization of the classification model may be needed. A lower E value... p The value indicates that the pixel features of the lesion area have a high degree of matching with the global statistical features.
[0202] Please see Figure 6 The specific steps for obtaining the dynamic weight parameters for personalized thyroid diagnosis are as follows:
[0203] S501: Based on the classification and matching results of thyroid lesions, extract the ratio of changes in thyroid volume, hormone level and lesion morphology, calculate the volume ratio of the lesion area, statistically analyze the hormone level data of the lesion area, calculate the ratio of changes in lesion morphology at different time points, analyze the correlation between volume, hormone level and morphological changes, calculate the fluctuation range of feature data, construct a set of lesion feature parameters based on the fluctuation trend, calculate the lesion feature parameters, and obtain lesion feature ratio data.
[0204] Based on the thyroid lesion classification and matching results, the ratios of thyroid volume, hormone levels, and lesion morphology changes were first extracted. Thyroid volume was obtained through ultrasound imaging data, and the ellipsoidal volume was calculated using the formula.
[0205] Where a, b, and c are the length, width, and height of the thyroid gland, respectively. Assuming the dimensions of the thyroid gland are a = 4.2 cm, b = 2.5 cm, and c = 1.8 cm, the volume is calculated as follows:
[0206] Then, calculate the volume percentage of the lesion area. Assuming the lesion volume is 12.5 cm³, the volume percentage calculation is as follows:
[0207] Next, hormone level data of the lesion area were statistically analyzed, and the values of thyroid hormones (such as TSH, T3, and T4) at multiple time points were recorded. The TSH level was set at 3.1 mIU / L, T3 at 1.8 nmol / L, and T4 at 9.2 μg / dL. The ratio of lesion morphology changes at different time points was calculated, and the morphological change ratio was defined as...
[0208] Among them, S t and S t:1 Let be the lesion morphology parameters at two time points. If the lesion morphology ratio changes from 0.22 to 0.25 at a certain time point, then...
[0209] Then, the correlation between volume, hormone levels, and morphological changes was analyzed, and the correlation coefficients among the three were calculated. The calculated correlation coefficients were 0.82, 0.75, and 0.68, respectively, indicating a strong correlation between the variables. Next, the fluctuation range of the characteristic data was calculated, and the maximum, minimum, mean, and standard deviation were statistically analyzed. For example, the mean of volume change was 0.14 and the standard deviation was 0.03, and the mean of hormone level change was 0.15 and the standard deviation was 0.04. Based on the fluctuation trend, a set of lesion characteristic parameters was constructed, and finally, the lesion characteristic ratio data were obtained.
[0210] S502: Based on the lesion feature ratio data, calculate the goodness of fit between the lesion features and the diagnostic database, statistically analyze the mean and standard deviation of the lesion features, calculate the feature deviation and measure the goodness of fit, perform lesion feature matching calculation, and obtain the goodness of fit of the lesion features.
[0211] Based on the ratio data of lesion features, the goodness of fit between the lesion features and the diagnostic database is calculated. First, the mean and standard deviation of the lesion features are calculated. Let the mean of the lesion features be 0.16 and the standard deviation be 0.05. The mean squared error is used to calculate the feature deviation, and the error calculation formula is defined as follows:
[0212] Among them, X i Let X be the characteristic data of individual lesions, and X be the characteristic mean of the diagnostic database. Assuming the database mean is 0.15, and the lesion characteristic sample data are 0.14, 0.16, 0.17, 0.18, and 0.13, then the error is calculated as follows:
[0213]
[0214] Then, measure the goodness of fit and define the formula for calculating the goodness of fit.
[0215] Let the standard deviation σ = 0.05, and substitute it into the calculation.
[0216] Then, lesion feature matching calculation is performed, and feature matching score is calculated. The score threshold is set to 0.7. If the matching degree is lower than 0.7, the weight of the lesion data is reduced, and finally the lesion feature fitting degree is obtained.
[0217] S503: Based on the fit of lesion features, calculate the reliability of the classification method, analyze the range of lesion classification error, statistically analyze the distribution of error, calculate the reliability interval and adjust the classification weight, and obtain the dynamic weight parameters for personalized thyroid diagnosis.
[0218] Based on the goodness of fit of lesion features, the reliability of the classification method is calculated. First, the range of lesion classification error is analyzed, and the distribution of classification error is statistically analyzed. Assuming the mean of the lesion category distribution is 0.18 and the standard deviation is 0.06, the error range is calculated.
[0219] Among them, C j The data represents the lesion classification, where C is the classification mean. For example, a certain classification might have values of 0.15, 0.17, 0.19, 0.21, and 0.14.
[0220] calculate
[0221] Then, the confidence interval is calculated using the confidence interval calculation method.
[0222] Let N = 30, calculate
[0223] Then, the classification weights are adjusted, and the classification weight thresholds are set according to the confidence interval. If the data of a certain category exceeds the confidence interval, the weight coefficient is reduced, and finally the dynamic weight parameters for personalized thyroid diagnosis are obtained.
[0224] A thyroid ultrasound-assisted scanning system is used to perform the above-described thyroid ultrasound-assisted scanning method. The system includes:
[0225] The image gradient analysis module acquires the pixel grayscale value, local contrast and edge sharpness of thyroid ultrasound images, calculates the pixel gradient change rate, filters the thyroid gland boundary region based on the pixel gradient change rate, calculates the gradient feature parameters of the pixels in the boundary region, filters out the pixel region whose gradient amplitude change rate conforms to the gland tissue characteristics, and obtains the gradient feature parameters of thyroid ultrasound images.
[0226] The gland boundary segmentation module calls the gradient feature parameters of thyroid ultrasound images to calculate the gradient change rate and edge intensity at different scales. Based on the edge intensity, it filters the gland tissue boundary regions, calculates the gray-level uniformity and constructs the gradient difference weight matrix, adjusts the boundaries of regions with drastic gradient changes but uniform gray-level, calculates the local mean deviation of pixels at different scales, sets the segmentation threshold based on the mean difference between categories, and obtains the thyroid gland segmentation boundary data.
[0227] The lesion feature extraction module calls the thyroid gland segmentation boundary data, calculates the pixel grayscale offset, gradient direction distribution and morphological parameters of the lesion area, measures the local contrast variation coefficient, filters low contrast lesion areas, and obtains the morphological and contrast features of the thyroid lesion area.
[0228] The lesion classification and matching module calls the morphological and contrast features of the thyroid lesion area, calculates the morphological change rate of the lesion area, sets the classification weights based on the inter-class variance, calculates the pixel-level and global feature matching fit, and obtains the thyroid lesion classification and matching results.
[0229] The personalized diagnosis calculation module calls the thyroid lesion classification matching results, extracts the ratio of thyroid volume, hormone level and lesion morphology changes, calculates the fit between lesion characteristics and the diagnostic database, calculates the reliability of the classification method, and obtains the dynamic weight parameters for personalized thyroid diagnosis.
[0230] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for ultrasound-assisted thyroid scanning, characterized in that, Includes the following steps: S1: Obtain the pixel grayscale value, local contrast and edge sharpness of thyroid ultrasound images, calculate the pixel gradient change rate, filter the thyroid gland boundary region based on the gradient amplitude change rate, and obtain the gradient feature parameters of thyroid ultrasound images. S2: Based on the gradient feature parameters of the thyroid ultrasound image, calculate the gradient change rate and edge intensity at different scales, screen the glandular tissue boundary according to the edge intensity, calculate the gray level uniformity and construct the gradient difference weight matrix, adjust the boundary of the region with drastic gradient change but uniform gray level, calculate the local mean deviation of the pixel point at different scales, set the segmentation threshold according to the mean difference between categories, and obtain the thyroid gland segmentation boundary data. S3: Based on the thyroid gland segmentation boundary data, calculate the pixel grayscale offset, gradient direction distribution and morphological parameters of the lesion area, measure the local contrast variation coefficient, screen low contrast lesion areas, and obtain the morphological and contrast characteristics of the thyroid lesion area. S4: Based on the morphological and contrast characteristics of the thyroid lesion area, calculate the morphological change rate of the lesion area, set the classification weight according to the inter-class variance, calculate the pixel-level and global feature matching fit degree, and obtain the thyroid lesion classification matching result. S5: Based on the thyroid lesion classification and matching results, extract the ratio of thyroid volume, hormone level and lesion morphology changes, calculate the fitting degree between lesion characteristics and the diagnostic database, calculate the reliability of the classification method, and obtain the dynamic weight parameters for personalized thyroid diagnosis. The specific steps for obtaining the dynamic weight parameters for personalized thyroid diagnosis are as follows: S501: Based on the thyroid lesion classification and matching results, extract the ratio of changes in thyroid volume, hormone level and lesion morphology, calculate the volume ratio of the lesion area, statistically analyze the hormone level data of the lesion area, calculate the ratio of changes in lesion morphology at different time points, analyze the correlation between volume, hormone level and morphological changes, calculate the fluctuation range of feature data, construct a lesion feature parameter set based on the fluctuation trend, calculate the lesion feature parameters, and obtain lesion feature ratio data. S502: Based on the lesion feature ratio data, calculate the fitting degree between the lesion features and the diagnostic database, statistically analyze the mean and standard deviation of the lesion features, calculate the feature deviation and measure the fitting degree, perform lesion feature matching calculation, and obtain the lesion feature fitting degree. S503: Based on the fitting degree of the lesion features, calculate the reliability of the classification method, analyze the range of lesion classification error, statistically analyze the distribution of error, calculate the reliability interval and adjust the classification weight, and obtain the dynamic weight parameters for personalized thyroid diagnosis.
2. The thyroid ultrasound-assisted scanning method according to claim 1, characterized in that, The gradient feature parameters of the thyroid ultrasound image include pixel gradient change rate, gradient amplitude change rate, and glandular boundary region. The thyroid gland segmentation boundary data includes differential scale gradient change rate, edge intensity, gray level uniformity, gradient difference weight matrix, local mean deviation, and segmentation threshold. The morphological and contrast features of the thyroid lesion region include pixel gray level offset, gradient direction distribution, morphological parameters, local contrast variation coefficient, and low-contrast lesion region. The thyroid lesion classification matching results include lesion region morphological change rate, classification weight, and pixel-level and global feature matching fit degree. The dynamic weight parameters for personalized thyroid diagnosis include thyroid volume, hormone level, lesion morphological change ratio, lesion feature fit degree with diagnostic database, and classification method reliability.
3. The thyroid ultrasound-assisted scanning method according to claim 2, characterized in that, The specific steps for obtaining the gradient feature parameters of the thyroid ultrasound image are as follows: S101: Obtain the pixel grayscale values of thyroid ultrasound images, traverse the image pixels, record the grayscale values of multiple pixels, calculate the grayscale histogram based on the spatial distribution of pixels, count the number of pixels corresponding to different grayscale values, calculate the grayscale mean and variance, divide into multiple spatial intervals, calculate the grayscale mean of multiple intervals, calculate the overall grayscale trend based on the changes in the grayscale mean of multiple intervals, perform grayscale characteristic calculation based on the pixel grayscale values and their distribution characteristics, and obtain pixel grayscale distribution parameters. S102: Based on the pixel grayscale distribution parameters, select multiple window regions, calculate the ratio of the maximum grayscale value to the minimum grayscale value within the window, count the contrast values of all windows, calculate the mean and standard deviation of the regional contrast, calculate the contrast fluctuation trend of the differentiated regions according to the spatial distribution of contrast, calculate the contrast change of the overall image based on the contrast change characteristics of multiple regions, perform local contrast characteristic calculation, and obtain local contrast change parameters. S103: Based on the local contrast change parameters, calculate the pixel gradient change rate, calculate the gradient magnitude according to the gray-level gradient of the pixel in multiple directions, filter the pixels whose gradient magnitude change rate exceeds the set threshold according to the gradient magnitude change, mark the boundary region of the thyroid gland, calculate the average gradient magnitude, gradient direction distribution and edge sharpness value of the region, perform boundary region characteristic calculation, and obtain the gradient feature parameters of the thyroid ultrasound image.
4. The thyroid ultrasound-assisted scanning method according to claim 3, characterized in that, The specific steps for obtaining the thyroid gland segmentation boundary data are as follows: S201: Based on the gradient feature parameters of the thyroid ultrasound image, calculate the gradient change rate at the differential scale, determine the pixel gradient value at the differential scale, calculate the gradient change rate and analyze the change of gradient amplitude at the differential scale, calculate the edge intensity of multiple regions based on the change, filter pixels with edge intensity greater than a set threshold, mark the boundary region of glandular tissue, and obtain the pixel distribution of glandular tissue boundary. S202: Based on the pixel distribution of the gland tissue boundary, calculate the gray level uniformity of multiple regions, statistically analyze the gray level mean and variance of the gland tissue region, construct a gradient difference weight matrix, adjust the boundary according to the gray level uniformity of the gradient drastic change region, filter the boundary region with uniform gray level but drastic gradient change, adjust the boundary position, and obtain the gland boundary after gradient adjustment. S203: Based on the gland boundary after gradient adjustment, calculate the local mean deviation of pixels at the differential scale, calculate the mean difference between multiple categories, set the segmentation threshold according to the mean difference, filter pixels that meet the threshold condition, calibrate the gland segmentation boundary, and obtain thyroid gland segmentation boundary data.
5. The thyroid ultrasound-assisted scanning method according to claim 4, characterized in that, The local mean deviation of pixels at the differential scale is calculated using the following formula: ; Calculate the local mean deviation The mean difference between multiple categories is calculated, a segmentation threshold is set based on the mean difference, pixels that meet the threshold condition are selected, the gland segmentation boundary is marked, and the thyroid gland segmentation boundary data is obtained. in, Representing pixels At different scales Local mean deviation below Representing pixels In scale The grayscale value below, Representative scale Local mean under, This represents the number of scales selected. Represents a scale index. Representing the The selected scale.
6. The thyroid ultrasound-assisted scanning method according to claim 5, characterized in that, The specific steps for obtaining the morphological and contrast characteristics of the thyroid lesion area are as follows: S301: Based on the thyroid gland segmentation boundary data, calculate the pixel grayscale offset of the lesion area, extract the pixel grayscale value of the lesion area, calculate the grayscale offset of each pixel relative to the surrounding pixels, statistically analyze the grayscale offset trend in different directions, analyze the gradient direction distribution, calculate the gradient direction change amplitude, calculate the pixel feature of the lesion area based on the grayscale offset and gradient information, and obtain the grayscale offset and gradient direction data of the lesion area. S302: Based on the gray-level offset and gradient direction data of the lesion area, calculate the morphological parameters of the lesion area, statistically analyze the area, perimeter and morphological ratio of the lesion area, calculate the gray-level distribution characteristics inside the area, calculate the local contrast variation coefficient according to the morphological parameters and gray-level distribution characteristics, analyze the contrast change of the lesion area, perform morphological and contrast feature calculations, and obtain the morphological parameters and contrast variation coefficient of the lesion area. S303: Based on the morphological parameters and contrast variation coefficient of the lesion area, low-contrast lesion areas are screened. A screening threshold is set according to the contrast variation coefficient of the lesion area. Lesion areas that meet the threshold range are screened. The area ratio and spatial distribution of low-contrast lesion areas are calculated. Lesion area screening calculation is performed to obtain the morphological and contrast characteristics of thyroid lesion areas.
7. The thyroid ultrasound-assisted scanning method according to claim 6, characterized in that, The specific steps for obtaining the thyroid lesion classification matching results are as follows: S401: Based on the morphological and contrast features of the thyroid lesion area, extract the contour information of the lesion area, calculate the gradient change of the contour in the differential direction, statistically analyze the gradient fluctuation of the lesion area boundary, calculate the morphological change rate based on the fluctuation amplitude, analyze the morphological change trend, perform lesion morphological feature calculation, and obtain the morphological change rate of the lesion area. S402: Based on the morphological change rate of the lesion area, set the classification weight according to the inter-class variance, calculate the gray-level variance between the lesion area and the surrounding tissue, analyze the gray-level mean of the lesion area of the differentiated category, calculate the variance information, adjust the classification weight according to the variance ratio, calculate the classification parameters of the lesion category in combination with the morphological change characteristics, perform classification weight calculation, and obtain the classification weight parameters of the lesion area. S403: Based on the classification weight parameters of the lesion area, calculate the matching fit between pixel-level and global features, analyze the matching between pixel features of the lesion area and global statistical features, calculate the error distribution of pixel-level features, adjust the lesion category assignment according to the error, screen the lesion categories that meet the matching conditions, perform matching calculations, and obtain the thyroid lesion classification matching results.
8. The thyroid ultrasound-assisted scanning method according to claim 7, characterized in that, The error distribution for calculating pixel-level features is given by the formula: ; Calculate the error distribution value, adjust the lesion category assignment according to the error situation, screen the lesion categories that meet the matching conditions, perform matching calculation, and obtain the thyroid lesion classification matching results; in, Error distribution values representing pixel-level features. Represents the total number of pixels within the lesion area. Representing the grayscale value of each pixel. This represents the average grayscale value of all pixels within the lesion area. The standard deviation of the gray values of all pixels within the lesion area. The total number representing global statistical characteristics. Representing the Weight parameters for each global feature. Representing the The pixel in the first Feature values in each feature dimension Representing the The mean of each global feature.
9. A thyroid ultrasound-assisted scanning system, characterized in that, The thyroid ultrasound-assisted scanning method according to any one of claims 1-8, wherein the system comprises: The image gradient analysis module acquires the pixel grayscale value, local contrast and edge sharpness of thyroid ultrasound images, calculates the pixel gradient change rate, filters the thyroid gland boundary region based on the pixel gradient change rate, calculates the gradient feature parameters of the pixels in the boundary region, filters out the pixel region whose gradient amplitude change rate conforms to the gland tissue characteristics, and obtains the gradient feature parameters of thyroid ultrasound images. The gland boundary segmentation module calls the gradient feature parameters of the thyroid ultrasound image, calculates the gradient change rate and edge intensity at different scales, filters the gland tissue boundary region based on the edge intensity, calculates the gray level uniformity and constructs the gradient difference weight matrix, adjusts the boundary of the region with drastic gradient change but uniform gray level, calculates the local mean deviation of the pixel at different scales, sets the segmentation threshold based on the mean difference between categories, and obtains the thyroid gland segmentation boundary data. The lesion feature extraction module calls the thyroid gland segmentation boundary data, calculates the pixel grayscale offset, gradient direction distribution and morphological parameters of the lesion area, measures the local contrast variation coefficient, filters low contrast lesion areas, and obtains the morphological and contrast features of the thyroid lesion area. The lesion classification and matching module calls the morphological and contrast features of the thyroid lesion area, calculates the morphological change rate of the lesion area, sets the classification weight according to the inter-class variance, calculates the pixel-level and global feature matching fit, and obtains the thyroid lesion classification and matching result. The personalized diagnosis calculation module calls the thyroid lesion classification matching results, extracts the ratio of thyroid volume, hormone level and lesion morphology changes, calculates the fit between lesion characteristics and the diagnostic database, calculates the reliability of the classification method, and obtains the dynamic weight parameters for personalized thyroid diagnosis.
Citation Information
Patent Citations
Ultrasonic image low-rank analysis based thyroid lesion image identification method
CN105427296A
AOI optical detection method and system based on deep learning
CN119887747A