Thyroid ultrasound-assisted scanning method and system
By calculating the pixel gradient change rate and constructing the gradient difference weight matrix, the boundary segmentation and lesion feature extraction of thyroid ultrasound images are optimized, and the problems of inaccurate gland boundary recognition and insufficient detection of low-contrast lesions in the prior art are solved, achieving higher diagnostic accuracy and personalized support.
Patent Information
- Application Number
- CN202510578081.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-05-06
AI Technical Summary
Existing thyroid ultrasound-assisted scanning methods are susceptible to noise interference in boundary detection, making it difficult to accurately identify gland areas, lack of low-contrast lesions recognition ability, lack of personalized diagnostic support, which affects the accuracy and applicability of image analysis.
By calculating the pixel gradient change rate, screening the gland boundary area, constructing a gradient difference weight matrix, combining grayscale uniformity and morphological parameters, optimizing boundary segmentation, combining pixel-level matching with global features, extracting lesion characteristics, and calculating personalized diagnostic parameters.
It enhances the accuracy of gland structure recognition, reduces the impact of noise interference, improves the detection ability of low-contrast lesions and the credibility of personalized diagnosis, and improves classification accuracy and clinical applicability.
Smart Images

Figure CN120510106A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of defect detection, and in particular to a thyroid ultrasound-assisted scanning method and system. Background Art
[0002] The field of defect detection technology includes methods and technologies for automatically identifying and analyzing anomalies, defects or faults of various objects, structures or systems. The core content of this technical field includes the use of computer vision, image processing and pattern recognition technology to detect, extract features and classify images or signals of target objects to identify possible defects. Overall, this field involves a variety of application scenarios, including product quality inspection in industrial manufacturing, lesion identification in medical image analysis, abnormal behavior detection in traffic monitoring, etc. In medical image analysis, defect detection technology is mainly 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. The region of interest is analyzed through a variety of algorithms to determine whether there are abnormal features.
[0003] Among them, the thyroid ultrasound-assisted scanning method refers to the automatic or semi-automatic scanning, segmentation and analysis of thyroid tissue through ultrasound imaging technology combined with computer image analysis methods to identify possible lesion areas. This method mainly covers thyroid region segmentation, boundary detection, texture analysis and feature extraction based on ultrasound images to achieve accurate identification of the target area. Specifically, this method uses an ultrasound probe to obtain ultrasound image data of thyroid tissue, and extracts the thyroid contour through a boundary detection method based on gradient calculation, and then combines the texture analysis method to identify the echo characteristics of different tissue areas. In addition, this method uses pattern matching and statistical learning methods to extract the morphology, density and echo distribution characteristics of thyroid nodules to assist in the identification of lesions.
[0004] In the boundary detection process of existing technologies, fixed image processing methods are difficult to adapt to specific tissue structures and are easily affected by noise, which affects the accuracy of glandular region boundaries. Identification of lesion areas mainly relies on a single echo characteristic or grayscale distribution, ignoring gradient changes and morphological parameters, resulting in insufficient recognition of low-contrast lesions and an increased risk of missed detection. Lesion classification relies on a single statistical model and lacks pixel-level and global feature matching optimization, which reduces classification discrimination and affects the final judgment result. There is a lack of comprehensive analysis of volume, hormone levels, and lesion morphological change ratios. The diagnostic process does not adequately consider individual differences, making it difficult to provide accurate personalized diagnostic recommendations, reducing the clinical applicability of image analysis. Summary of the Invention
[0005] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a thyroid ultrasound-assisted scanning method and system.
[0006] In order to achieve the above object, 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 the thyroid ultrasound image, calculate the pixel gradient change rate, screen the thyroid gland boundary area based on the gradient amplitude change rate, and obtain the gradient characteristic parameters of the thyroid ultrasound image;
[0008] S2: Based on the gradient characteristic parameters of the thyroid ultrasound image, the gradient change rate and edge strength at the differential scale are calculated, the glandular tissue boundary is screened according to the edge strength, the grayscale uniformity is calculated and a gradient difference weight matrix is constructed, the boundaries of the areas with drastic gradient changes but uniform grayscale are adjusted, the local mean deviation of the pixel points at the differential scale is calculated, and the segmentation threshold is set according to the mean difference between categories to obtain the thyroid gland segmentation boundary data;
[0009] S3: Based on the thyroid gland segmentation boundary data, calculating the pixel grayscale offset, gradient direction distribution and morphological parameters of the lesion area, measuring the local contrast coefficient of variation, screening low-contrast lesion areas, and obtaining the morphological and contrast characteristics of the thyroid lesion area;
[0010] S4: Based on the morphology and contrast characteristics of the thyroid lesion area, calculating the morphological change rate of the lesion area, setting the classification weight according to the inter-class variance, calculating the pixel-level and global feature matching fit, and obtaining the thyroid lesion classification matching result;
[0011] S5: Based on the thyroid lesion classification matching results, the thyroid volume, hormone level and lesion morphology change ratio are extracted, the fit between the lesion characteristics and the diagnosis database is calculated, the credibility of the classification method is calculated, and the dynamic weight parameters of personalized thyroid diagnosis are obtained.
[0012] As a further solution of the present invention, the thyroid ultrasound image gradient feature parameters include pixel gradient change rate, gradient amplitude change rate, and gland boundary area; the thyroid gland segmentation boundary data includes differential scale gradient change rate, edge intensity, grayscale uniformity, gradient differential weight matrix, local mean deviation, and segmentation threshold; the thyroid lesion area morphology and contrast characteristics include pixel grayscale offset, gradient direction distribution, morphological parameters, local contrast variation coefficient, and low contrast lesion area; the thyroid lesion classification matching results include lesion area morphology change rate, classification weight, pixel-level and global feature matching fit; the thyroid personalized diagnosis dynamic weight parameters include thyroid volume, hormone level, lesion morphology change ratio, lesion feature and diagnosis database fit, and classification method credibility.
[0013] As a further embodiment of the present invention, the steps for obtaining the gradient characteristic parameters of the thyroid ultrasound image are specifically as follows:
[0014] S101: Obtain pixel grayscale values of a thyroid ultrasound image, traverse image pixels, record grayscale values of multiple pixels, calculate a grayscale histogram based on the spatial distribution of the pixels, count the number of pixels corresponding to differentiated grayscale values, calculate the grayscale mean and variance, divide the image into multiple spatial intervals, calculate the grayscale mean of the multiple intervals, calculate the overall grayscale trend based on the change of the grayscale mean of the multiple intervals, calculate the grayscale characteristics based on the pixel grayscale values and their distribution characteristics, and obtain the pixel grayscale distribution parameters;
[0015] S102: Based on the pixel grayscale distribution parameter, multiple window areas are selected, the ratio of the maximum grayscale value to the minimum grayscale value in the window is calculated, the contrast values of all windows are counted, the mean and standard deviation of the regional contrast are calculated, the contrast fluctuation trend of the differentiated regions is calculated according to the spatial distribution of the contrast, the contrast change of the overall image is calculated based on the contrast change characteristics of the multiple regions, the local contrast characteristics are calculated, and the local contrast change parameter is obtained;
[0016] S103: Based on the local contrast change parameter, the pixel gradient change rate is calculated, the gradient amplitude is calculated according to the grayscale gradient of the pixel point in multiple directions, and the pixel points whose gradient amplitude change rate exceeds the set threshold are screened according to the gradient amplitude change situation. The thyroid gland boundary area is calibrated, the average gradient amplitude, gradient direction distribution and edge sharpness value of the area are calculated, the boundary area characteristics are calculated, and the gradient characteristic parameters of the thyroid ultrasound image are obtained.
[0017] As a further solution of the present invention, the steps for obtaining the thyroid gland segmentation boundary data are specifically as follows:
[0018] S201: Based on the gradient characteristic parameters of the thyroid ultrasound image, calculating the gradient change rate at the differential scale, determining the pixel gradient value at the differential scale, calculating the gradient change rate and analyzing the change of the gradient amplitude at the differential scale, calculating the edge strength of multiple regions based on the change, screening pixels with edge strength greater than a set threshold, calibrating the glandular tissue boundary area, and obtaining the glandular tissue boundary pixel distribution;
[0019] S202: Based on the pixel distribution of the glandular tissue boundary, the grayscale uniformity of multiple regions is calculated, the grayscale mean and variance of the glandular tissue region are counted, a gradient difference weight matrix is constructed, the boundary is adjusted according to the grayscale uniformity of the region with drastic gradient changes, the boundary region with uniform grayscale but drastic gradient changes is screened, the boundary position is adjusted, and the glandular boundary after gradient adjustment is obtained;
[0020] S203: Based on the gradient-adjusted gland boundary, calculate the local mean deviation of the pixel points under the differentiated scale, calculate the mean difference between multiple categories, set the segmentation threshold according to the mean difference, filter the pixels that meet the threshold conditions, calibrate the gland segmentation boundary, and obtain thyroid gland segmentation boundary data.
[0021] As a further solution of the present invention, the local mean deviation of the pixel points at the differentiated scale is calculated using the formula:
[0022]
[0023] Calculate the local mean deviation D p , calculate the mean difference between multiple categories, set the segmentation threshold based on the mean difference, filter the pixels that meet the threshold conditions, calibrate the gland segmentation boundary, and obtain the thyroid gland segmentation boundary data;
[0024] Among them, D p Represents pixel p at different scales s i The local mean deviation under , Represents pixel p at scale s i The gray value below Representative scale s i The local mean under , n represents the number of selected scales, i represents the scale index, s i Represents the i-th selected scale.
[0025] As a further embodiment of the present invention, the steps for acquiring the morphology and contrast characteristics of the thyroid lesion area 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, count the grayscale offset trends in different directions, analyze the gradient direction distribution, calculate the gradient direction change amplitude, calculate the pixel features 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: Calculating morphological parameters of the lesion region based on the grayscale offset and gradient direction data of the lesion region, calculating the area, perimeter, and morphological ratio of the lesion region, calculating the grayscale value distribution characteristics within the region, calculating the local contrast variation coefficient based on the morphological parameters and grayscale distribution characteristics, analyzing the contrast change of the lesion region, calculating the morphological and contrast characteristics, and obtaining the morphological parameters and contrast variation coefficient of the lesion region;
[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 proportion and spatial distribution of the low-contrast lesion area are calculated, and lesion area screening calculations are performed to obtain the morphological and contrast characteristics of the thyroid lesion area.
[0029] As a further embodiment of the present invention, the steps for obtaining the thyroid lesion classification matching results are specifically as follows:
[0030] S401: Based on the morphology and contrast characteristics of the thyroid lesion area, extracting contour information of the lesion area, calculating the gradient change of the contour in the differentiation direction, counting the gradient fluctuation of the lesion area boundary, calculating the morphology change rate based on the fluctuation amplitude, analyzing the morphology change trend, calculating the lesion morphology characteristics, and obtaining the lesion area morphology change rate;
[0031] S402: Based on the morphological change rate of the lesion area, a classification weight is set according to the inter-class variance, the grayscale variance of the lesion area and the surrounding tissue is calculated, the grayscale mean of the differentiated lesion area is analyzed, the variance information is calculated, the classification weight is adjusted according to the variance ratio, and the classification parameters of the lesion category are calculated in combination with the morphological change characteristics. The classification weight is calculated to obtain the classification weight parameters of the lesion area;
[0032] S403: Based on the lesion area classification weight parameters, calculate the pixel-level and global feature matching fit, analyze the matching between the lesion area pixel features and the global statistical features, calculate the error distribution of the pixel-level features, adjust the lesion category according to the error situation, screen the lesion categories that meet the matching conditions, perform matching calculations, and obtain the thyroid lesion classification matching results.
[0033] As a further solution of the present invention, the error distribution of the pixel-level features is calculated using the formula:
[0034]
[0035] Calculate the error distribution value, adjust the lesion classification based on the error situation, screen the lesion categories that meet the matching conditions, perform matching calculations, and obtain the thyroid lesion classification matching results;
[0036] Among them, E p represents the error distribution value of the pixel-level feature, N represents the total number of pixels in the lesion area, and P i Represents the grayscale value of the i-th pixel, μ P represents the mean grayscale value of all pixels in the lesion area, σ P represents the standard deviation of the grayscale values of all pixels in the lesion area, M represents the total number of global statistical features, and W j Represents the weight parameter of the jth global feature, F ij represents the eigenvalue of the i-th pixel in the j-th feature dimension, Represents the mean of the j-th global feature.
[0037] As a further solution of the present invention, the steps for obtaining the dynamic weight parameters of the personalized thyroid diagnosis are specifically as follows:
[0038] S501: Based on the thyroid lesion classification and matching results, extract the thyroid volume, hormone level, and lesion morphology change ratio, calculate the volume ratio of the lesion area, collect hormone level data of the lesion area, calculate the change ratio of the lesion morphology at different time points, analyze the correlation between volume, hormone level, and morphology changes, calculate the fluctuation range of the 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, calculating the fit between the lesion feature and the diagnosis database, calculating the mean and standard deviation of the lesion feature, calculating the feature deviation and measuring the fit, performing lesion feature matching calculation, and obtaining the lesion feature fit;
[0040] S503: Based on the lesion feature fitting degree, the credibility of the classification method is calculated, the lesion classification error range is analyzed, the distribution of the statistical error is statistically analyzed, the credibility interval is calculated and the classification weight is adjusted to obtain the dynamic weight parameter of the personalized thyroid diagnosis.
[0041] A thyroid ultrasound-assisted scanning system, which is used to perform the above-mentioned thyroid ultrasound-assisted scanning method, comprises:
[0042] The image gradient analysis module obtains the pixel grayscale value, local contrast, and edge sharpness of the thyroid ultrasound image, calculates the pixel gradient change rate, screens the thyroid gland boundary area based on the pixel gradient change rate, calculates the gradient characteristic parameters of the pixel points in the boundary area, and screens out the pixel area whose gradient amplitude change rate conforms to the glandular tissue characteristics to obtain the thyroid ultrasound image gradient characteristic parameters;
[0043] The gland boundary segmentation module calls the gradient feature parameters of the thyroid ultrasound image, calculates the gradient change rate and edge strength under differential scales, screens the glandular tissue boundary area based on the edge strength, calculates the grayscale uniformity and constructs a gradient difference weight matrix, adjusts the boundaries of areas with drastic gradient changes but uniform grayscale, calculates the local mean deviation of pixels under differential scales, sets the segmentation threshold based on the mean difference between categories, and obtains 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 coefficient of variation, screens low-contrast lesion areas, and obtains the morphological and contrast characteristics of the thyroid lesion area;
[0045] The lesion classification 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 matching result;
[0046] The personalized diagnosis calculation module calls the thyroid lesion classification matching results, extracts the thyroid volume, hormone level and lesion morphology change ratio, calculates the fit between the lesion characteristics and the diagnosis database, calculates the credibility of the classification method, and obtains the dynamic weight parameters of the personalized thyroid diagnosis.
[0047] Compared with the prior art, the advantages and positive effects of the present invention are:
[0048] In the present invention, by calculating the pixel gradient change rate and screening the boundary area based on the gradient amplitude change rate, the accuracy of glandular structure recognition is enhanced and the impact of noise interference on boundary judgment is reduced. Combined with the gradient change rate and edge strength calculation under differentiated scales, the boundary segmentation of glandular tissue is optimized and the probability of misidentification of areas with drastic gradient changes is reduced. A gradient differential weight matrix is constructed, and the boundary is adjusted based on grayscale uniformity to make the segmentation result more consistent with the actual tissue morphology. Combined with the calculation of pixel grayscale offset, gradient direction distribution and morphological parameters, the detection ability of low-contrast lesions is improved. The accuracy of lesion classification is improved by calculating the morphological change rate and matching pixel-level and global features. Combined with the thyroid volume, hormone level and lesion morphological change ratio, the diagnostic data support is optimized, and the lesion characteristics are combined with the calculation of the fitting degree of the diagnosis database to improve the credibility and scientific basis of personalized diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 It is a schematic diagram of the workflow of the present invention;
[0050] Figure 2 Flowchart of the steps for obtaining gradient characteristic parameters of thyroid ultrasound images according to the present invention;
[0051] Figure 3 Flowchart of the steps for obtaining thyroid gland segmentation boundary data according to the present invention;
[0052] Figure 4 Flowchart of the steps for obtaining the morphology and contrast characteristics of the thyroid lesion area according to the present invention;
[0053] Figure 5 This is a flow chart of the steps for obtaining thyroid lesion classification matching results of the present invention;
[0054] Figure 6 This is a flow chart of the steps for obtaining dynamic weight parameters for personalized thyroid diagnosis in the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present 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 only used to explain the present invention and are not intended to limit the present invention.
[0056] In the description of the present invention, it should be understood that the terms "length," "width," "up," "down," "front," "back," "left," "right," "vertical," "horizontal," "top," "bottom," "inside," "outside," and the like, indicating positions or relationships, are based on the positions or relationships shown in the accompanying drawings and are intended only to facilitate the description of the present invention and simplify the description. They do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limiting the present invention. Furthermore, in the description of the present invention, "plurality" means two or more, unless otherwise expressly and specifically defined.
[0057] See also Figure 1 The present invention provides a technical solution: a thyroid ultrasound-assisted scanning method, comprising the following steps:
[0058] S1: Obtain the pixel grayscale value, local contrast, and edge sharpness of the thyroid ultrasound image, calculate the pixel gradient change rate, screen the thyroid gland boundary area based on the gradient amplitude change rate, and obtain the gradient characteristic parameters of the thyroid ultrasound image;
[0059] S2: Based on the gradient characteristic parameters of thyroid ultrasound images, the gradient change rate and edge strength at the differential scale are calculated. The glandular tissue boundary is screened according to the edge strength. The grayscale uniformity is calculated and a gradient difference weight matrix is constructed. The boundaries of areas with drastic gradient changes but uniform grayscale are adjusted. The local mean deviation of pixels at the differential scale is calculated. The segmentation threshold is set according to the mean difference between categories to obtain the thyroid gland segmentation boundary data.
[0060] S3: Based on the thyroid gland segmentation boundary data, the pixel grayscale offset, gradient direction distribution and morphological parameters of the lesion area are calculated, the local contrast coefficient of variation is measured, and low-contrast lesion areas are screened to obtain the morphological and contrast characteristics of the thyroid lesion area;
[0061] S4: Based on the morphological and contrast characteristics of the thyroid lesion area, the morphological change rate of the lesion area is calculated, the classification weight is set according to the inter-class variance, and the pixel-level and global feature matching fit is calculated to obtain the thyroid lesion classification matching result;
[0062] S5: Based on the thyroid lesion classification matching results, the thyroid volume, hormone level and lesion morphology change ratio are extracted, the fit between the lesion characteristics and the diagnosis database is calculated, the credibility of the classification method is calculated, and the dynamic weight parameters of personalized thyroid diagnosis are obtained.
[0063] The gradient feature parameters of thyroid ultrasound images include pixel gradient change rate, gradient amplitude change rate, and gland boundary area. The thyroid gland segmentation boundary data include differential scale gradient change rate, edge intensity, grayscale uniformity, gradient difference weight matrix, local mean deviation, and segmentation threshold. The morphological and contrast characteristics of the thyroid lesion area include pixel grayscale offset, gradient direction distribution, morphological parameters, local contrast variation coefficient, and low-contrast lesion area. The thyroid lesion classification matching results include lesion area 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, fit between lesion characteristics and the diagnosis database, and classification method credibility.
[0064] See also Figure 2 The specific steps for obtaining the gradient characteristic parameters of thyroid ultrasound images are as follows:
[0065] S101: Obtain pixel grayscale values of a thyroid ultrasound image, traverse image pixels, record grayscale values of multiple pixels, calculate a grayscale histogram based on the spatial distribution of the pixels, count the number of pixels corresponding to differentiated grayscale values, calculate the grayscale mean and variance, divide the image into multiple spatial intervals, calculate the grayscale mean of the multiple intervals, calculate the overall grayscale trend based on the change of the grayscale mean of the multiple intervals, calculate the grayscale characteristics based on the pixel grayscale values and their distribution characteristics, and obtain the pixel grayscale distribution parameters;
[0066] To obtain the pixel grayscale value of the thyroid ultrasound image, first read the grayscale value information of the pixel points from the ultrasound image, traverse all the pixels, and record their grayscale values. At the same time, use the two-dimensional coordinate information to store the spatial position of the pixel points, construct a grayscale histogram, and traverse the pixel grayscale values and perform group statistics to calculate the number of pixels corresponding to each grayscale level. For example, if the grayscale level is set to 0-255, the pixel grayscale value distribution of a certain ultrasound image may be: grayscale value 20 corresponds to 150 pixels, grayscale value 50 corresponds to 300 pixels, and so on. The complete grayscale histogram data is obtained, and then the grayscale mean and variance of the entire image are calculated. The grayscale mean calculation formula is Among them, N is the total number of pixels, P i is the pixel grayscale value. If the total number of image pixels is 1024×768, the calculated grayscale mean is 128.5, and the variance calculation formula is Assume that the calculated variance is 35.6. Then, divide the image into multiple spatial intervals according to the spatial position. For example, divide the image into 16 4×4 sub-regions. Calculate the grayscale mean in each sub-region. The obtained grayscale mean matrix is:
[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 means that there is a gradient change in the grayscale distribution. Use the linear fitting method to calculate the trend change rate. Assume that the trend slope is 0.15. Then, combine the overall pixel grayscale value and its distribution characteristics to calculate the grayscale characteristic parameters. For example, calculate the global grayscale contrast and take the ratio of the maximum grayscale value to the minimum grayscale value. Assume that the maximum grayscale value is 240 and the minimum grayscale value is 10, then calculate the contrast. Finally, the pixel grayscale distribution parameters are obtained based on various calculations, which are used for subsequent image analysis and processing.
[0069] S102: Based on the pixel grayscale distribution parameters, multiple window areas are selected, the ratio of the maximum grayscale value to the minimum grayscale value in the window is calculated, the contrast values of all windows are counted, the mean and standard deviation of the regional contrast are calculated, the contrast fluctuation trend of the differentiated regions is calculated based on the spatial distribution of the contrast, the contrast change of the overall image is calculated based on the contrast change characteristics of the multiple regions, the local contrast characteristics are calculated, and the local contrast change parameters are obtained;
[0070] Based on the pixel grayscale distribution parameters, multiple window areas are selected and the window size is set to 5×5 pixels. The ratio of the maximum grayscale value to the minimum grayscale value is calculated for each window. For example, the maximum grayscale value in window 1 is 230 and the minimum grayscale value is 20. The contrast is calculated as Calculate the contrast values of all windows in turn, and count their mean and standard deviation. Assume that the calculated mean is 12.3 and the standard deviation is 2.5. Then, analyze the spatial distribution of contrast, and use the partitioning method to calculate the contrast changes in different regions. For example, divide the image into four quadrants: upper, lower, left, and right. The calculated contrast means of each quadrant are 12.1, 13.5, 11.8, and 12.6, respectively. Based on these values, calculate the contrast fluctuation trend of differentiated regions, and use the standard deviation to calculate the fluctuation amplitude of each region. For example, the standard deviation of the upper region is 2.1, the standard deviation of the lower region is 2.8, the standard deviation of the left region is 1.9, and the standard deviation of the right region is 2.3. Then, perform statistical analysis on all regions, calculate the contrast change of the overall image based on the contrast change characteristics of each region, and use the root mean square method to calculate the overall contrast change rate. For example, the calculated root mean square contrast change value is 2.35. Finally, obtain the local contrast change parameter, which can be used for image contrast characteristic analysis.
[0071] S103: Based on the local contrast change parameter, the pixel gradient change rate is calculated, the gradient amplitude is calculated according to the grayscale gradient of the pixel point in multiple directions, and the pixel points whose gradient amplitude change rate exceeds the set threshold are screened according to the gradient amplitude change. The thyroid gland boundary area is calibrated, the average gradient amplitude, gradient direction distribution and edge sharpness value of the area are calculated, and the boundary area characteristics are calculated to obtain the gradient characteristic parameters of the thyroid ultrasound image.
[0072] Based on the local contrast change parameter, the pixel gradient change rate is calculated. First, the grayscale 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 amplitude The gradient amplitude is calculated for all pixels, and its changes are counted. The gradient change threshold is set to 15, and the pixels with a change rate exceeding the threshold are screened out. For example, in a certain area, if 50 pixels meet the condition of a change rate exceeding 15, then the area is marked as the thyroid gland boundary area. The average gradient amplitude of the area is further calculated. For example, the average gradient amplitude of all pixels is 25.3. The gradient direction distribution is calculated, and the proportion of pixels in each gradient direction is counted. For example, the 0° direction accounts for 20%, the 45° direction accounts for 30%, the 90° direction accounts for 25%, and the 135° direction accounts for 25%. At the same time, the edge sharpness value is calculated. The gradient root mean square method is used to calculate the edge sharpness, and the calculation result is 18.7. Finally, the gradient characteristic parameters of the thyroid ultrasound image are obtained.
[0073] See also Figure 3 , the specific steps for obtaining thyroid gland segmentation boundary data are:
[0074] S201: Based on the gradient characteristic 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 the gradient amplitude at the differential scale, calculate the edge strength of multiple regions based on the change, filter pixels with edge strength greater than a set threshold, calibrate the glandular tissue boundary area, and obtain the glandular tissue boundary pixel distribution;
[0075] Based on the gradient characteristic parameters of thyroid ultrasound images, the gradient change rate under different scales is calculated. First, the ultrasound image is divided into regions of different scales, and the scale sizes are set to 3×3, 5×5, 7×7, etc. The local pixel gradient change rate is calculated for each scale, and the Sobel operator is used to calculate the horizontal gradient G x =P(x+1,y)-P(x-1,y) and vertical gradient G y=P(x,y+1)-P(x,y-1) and then calculate the gradient amplitude In windows of different scales, the gradient amplitude is normalized and the gradient change rate is calculated. The gradient change rate calculation formula of the pixel point (i, j) at scale k is set as:
[0076]
[0077] Among them, ∈ is a small value to prevent the denominator from being zero. Assuming that the gradient amplitude at a certain point is 20 in the 3×3 scale and becomes 25 in the 5×5 scale, the gradient change rate is:
[0078]
[0079] Count the gradient change rates of all pixels at each scale, analyze the changes in gradient amplitude at different scales, and calculate the change trend. For example, use the linear fitting method to calculate the average growth rate of the change rate. Assume that the calculated rate is 0.12. Then calculate the edge strength of each region based on the gradient change. The edge strength is defined as the average value of the gradient amplitude in the local area. The calculation formula is:
[0080]
[0081] Where N is the total number of pixels in the area. If the average gradient amplitude of pixels in a certain area is 30, the edge strength is 30. Then, an edge strength threshold is set. For example, the threshold is set to 25. Pixels with edge strength greater than the threshold are screened, and the pixels that meet the conditions are marked as the glandular tissue boundary area. Finally, the glandular tissue boundary pixel distribution is obtained.
[0082] S202: Based on the pixel distribution of the glandular tissue boundary, the grayscale uniformity of multiple regions is calculated, the grayscale mean and variance of the glandular tissue region are counted, and a gradient difference weight matrix is constructed. The boundary is adjusted according to the grayscale uniformity of the region with drastic gradient changes, and the boundary region with uniform grayscale but drastic gradient changes is screened. The boundary position is adjusted to obtain the glandular boundary after gradient adjustment;
[0083] Based on the pixel distribution of glandular tissue boundaries, the grayscale uniformity of multiple regions is calculated. First, the glandular region is divided into multiple sub-regions, for example, into 4×4 regions with a total of 16 regions. The grayscale mean is calculated in each region, and the grayscale mean calculation formula is set as Where N is the total number of pixels in the sub-region, P(i,j) is the pixel grayscale value, assuming that the mean grayscale value of pixels in a region is 128.4, then calculate the variance If the calculated variance is 22.5, the grayscale distribution in the area is relatively uniform. The grayscale mean and variance of all sub-areas are counted to construct a gradient difference weight matrix. This matrix is used to characterize the grayscale uniformity of areas with drastic gradient changes. The weight calculation formula is set as:
[0084]
[0085] Among them, G avg is the global gradient mean, σ G is 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 the point is calculated as
[0086] The boundary is adjusted based on the grayscale uniformity of the area with drastic gradient changes. The boundary area with uniform grayscale but drastic gradient changes is screened. The screening criteria are set. For example, the area with grayscale variance less than 30 but gradient change rate greater than 0.2 is screened. 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 the pixel points at the differentiated scale, calculate the mean difference between multiple categories, set the segmentation threshold based on the mean difference, filter the pixels that meet the threshold conditions, calibrate the gland segmentation boundary, and obtain the thyroid gland segmentation boundary data.
[0088] Calculate the local mean deviation of the pixel at the differentiated scale using the formula:
[0089]
[0090] Calculate the local mean deviation D p , calculate the mean difference between multiple categories, set the segmentation threshold based on the mean difference, filter the pixels that meet the threshold conditions, calibrate the gland segmentation boundary, and obtain the thyroid gland segmentation boundary data;
[0091] Among them, D p Represents pixel p at different scales s i The local mean deviation under , Represents pixel p at scale s i The gray value below Representative scale s i The local mean under , n represents the number of selected scales, i represents the scale index, s i Represents the i-th selected scale.
[0092] formula:
[0093]
[0094] Detailed explanation of the formula and the process of formula calculation and derivation:
[0095] The formula is used to calculate the pixel point p at different scales s i The local mean deviation D under p The calculation steps are as follows:
[0096] Get the grayscale value of the image at different scales:
[0097] For the original image, different scale transformations (such as Gaussian blur of different sizes) are applied to obtain images of different scales s i The specific operation is to apply a Gaussian filter to the original image, with the standard deviation σ of the filter 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 of different scales are obtained.
[0098] Calculate the local mean
[0099] At each scale s i In this case, a window (such as a 5×5 rectangular area) is defined with pixel point p as the center. Within this window, the average grayscale value of all pixels is calculated to obtain the local mean For example, for a 5×5 window, the calculation process is:
[0100]
[0101] in, Indicates the jth pixel in the window at scale s i The grayscale value below.
[0102] Compute and average the absolute differences:
[0103] For each scale s i , calculate the gray value of pixel p The corresponding local mean Then, the absolute differences at all scales are added together 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] Assume that a Gaussian filter is applied to the original image, and the scale parameter σ is selected as 0.5, 1.0, and 1.5, respectively, to obtain images of three different scales (i.e., n = 3). For pixel p, the grayscale values at these three scales are 120, 125, and 130, respectively. Within a 5×5 window centered on p, calculate the local mean at each scale:
[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 mean absolute deviation of the grayscale value of pixel p from the corresponding local mean at different scales is 1.67. This value reflects the local brightness variation of pixel p at different scales and can be used in subsequent image segmentation or feature extraction.
[0116] See also Figure 4 The specific steps for obtaining the morphology and contrast characteristics of the thyroid lesion area are as follows:
[0117] S301: Based on the thyroid gland segmentation boundary data, the grayscale offset of the pixels in the lesion area is calculated, the grayscale value of the pixels in the lesion area is extracted, the grayscale offset of each pixel relative to the surrounding pixels is calculated, the grayscale offset trend in different directions is counted, the gradient direction distribution is analyzed, the gradient direction change amplitude is calculated, and the pixel features of the lesion area are calculated based on the grayscale offset and gradient information to 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 area are first extracted. Then, the pixel points in the segmented lesion area 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] Among them, D(x,y) is the grayscale offset of the pixel point (x,y), P(x,y) is the grayscale value of the pixel point, and P(x i ,y i ) is the grayscale value of the surrounding N neighboring pixels. Assuming that the grayscale value of a pixel is 150 and the average grayscale value of the surrounding 5 pixels is 140, its grayscale offset is calculated as:
[0121] D(x,y)=150-140=10;
[0122] Then, the grayscale offset trends in different directions are counted. The window sliding method is used to calculate the grayscale offset mean in the horizontal, vertical and diagonal directions. The horizontal offset mean is 8, the vertical offset mean is 12, and the diagonal offset mean is 10. Then, the gradient direction distribution is analyzed and the gradient direction of each pixel is calculated. The gradient direction formula is:
[0123]
[0124] Among them, G x and G y are the gradient values in the horizontal and vertical directions respectively. Assume that G x =30, G y =40, then the gradient direction is calculated as
[0125] Then, the amplitude of the gradient direction change is counted and the standard deviation of the gradient direction is calculated. Assuming that the standard deviation of the gradient direction in a certain area is 15°, the gradient change in this area is relatively drastic. Combining the grayscale offset and gradient information, the pixel characteristics of the lesion area are calculated, including the grayscale fluctuation range, gradient direction concentration, etc., and finally the grayscale offset and gradient direction data of the lesion area are obtained.
[0126] S302: Calculating morphological parameters of the lesion region based on the grayscale offset and gradient direction data of the lesion region, calculating the area, perimeter, and morphological ratio of the lesion region, calculating the grayscale value distribution characteristics within the region, calculating the local contrast variation coefficient based on the morphological parameters and grayscale distribution characteristics, analyzing the contrast variation of the lesion region, calculating the morphological and contrast characteristics, and obtaining the morphological parameters and contrast variation coefficient of the lesion region;
[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.1 mm, the area of the lesion area is calculated as A = 500 × (0.1) 2 =5mm2 ;
[0128] Then, the perimeter of the lesion area was calculated using the edge pixel counting method. Assuming the number of edge pixels was 120, the perimeter was calculated as P = 120 × 0.1 = 12 mm;
[0129] Next, the morphology ratio is calculated, which is defined as
[0130] Substitute into the calculation
[0131] Then, the gray value distribution characteristics within the region are calculated, and the gray mean and variance of the lesion area are counted. Assuming that the gray mean is 135 and the variance is 20, the local contrast variation coefficient is calculated based on the morphological parameters and gray distribution characteristics, which is defined as
[0132] Among them, σ is the grayscale variance, μ is the grayscale mean, and the calculation is
[0133] Finally, the contrast changes in the lesion area were analyzed, the contrast fluctuation ranges in different areas were counted, the ratio of the maximum contrast to the minimum contrast was calculated, and the morphological parameters and contrast variation coefficients 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, lesion areas that meet the threshold range are screened, the area proportion and spatial distribution of the low-contrast lesion areas are calculated, and lesion area screening calculations are performed to obtain the morphological and contrast characteristics of the thyroid lesion area.
[0135] Based on the morphological parameters and contrast variation coefficient of the lesion area, low contrast lesion areas are screened and the screening threshold of the contrast variation coefficient is set. Assume that the threshold is set to T c =0.2, screening meets C v The area ratio of the lesion area with low contrast <0.2 was calculated and defined as
[0136] Among them, A low-contrast is the area of low-contrast lesion, A total is the total lesion area. Assuming that the low-contrast lesion area is 2.5 mm2 and the total lesion area is 10 mm2, then calculate
[0137] Then, the spatial distribution of low-contrast lesion areas is analyzed, the distribution positions of lesion areas in ultrasound images are counted, and their concentration is determined. If the lesions are mainly distributed in the central area of the gland, they are marked as central lesions, otherwise they are marked as marginal lesions. Finally, the morphological and contrast characteristics of the thyroid lesion area are obtained.
[0138] See also Figure 5 The specific steps for obtaining the thyroid lesion classification matching results are as follows:
[0139] S401: Based on the morphological and contrast characteristics of the thyroid lesion area, extract the contour information of the lesion area, calculate the gradient change of the contour in the differential direction, count the gradient fluctuation of the lesion area boundary, calculate the morphological change rate based on the fluctuation amplitude, analyze the morphological change trend, calculate the lesion morphological characteristics, and obtain the morphological change rate of the lesion area;
[0140] Based on the morphological and contrast characteristics of the thyroid lesion area, the contour information of the lesion area is first extracted. The edge detection method such as the Sobel operator is used to calculate the gradient value of the boundary pixels. The pixel points in the lesion area are traversed, the boundary contour points are recorded, and the gradient changes of the contour in multiple directions are calculated. The gradient change calculation formula is:
[0141] Among them, G x and G y They are the gradients in the horizontal and vertical directions respectively. Assume that G of a pixel is x =25, G y =40, then its gradient is calculated as
[0142] Then, the gradient fluctuation of the boundary of the lesion area is counted, and the gradient standard deviation of the boundary pixels is calculated. The statistical window size is set to 5×5, and the mean gradient in the window is calculated. If the mean gradient in a window is 45 and the standard deviation is 6, it is judged that the gradient fluctuation of the window is large. Then, the morphological change rate is calculated based on the fluctuation amplitude. The morphological change rate calculation formula is
[0143] Among them, G max and G min are the maximum and minimum gradient values of the lesion area respectively. If G max =50, G min =20, then
[0144] Then, the morphological change trend is analyzed, the rate of change of the gradient with the boundary position is calculated, the difference calculation method is used to analyze the change of the gradient with the contour curvature, and the curvature threshold T is set. c=0.2. If the curvature change rate of a contour exceeds the threshold, the contour is judged to be an irregular lesion boundary. Finally, all morphological calculation data are combined to obtain the morphological change rate of the lesion area.
[0145] S402: Based on the morphological change rate of the lesion area and the inter-class variance, the classification weight is set, the grayscale variance between the lesion area and the surrounding tissue is calculated, the grayscale mean of the differentiated lesion area is analyzed, the variance information is calculated, the classification weight is adjusted based on the variance ratio, and the classification parameters of the lesion category are calculated in combination with the morphological change characteristics. The classification weight is calculated to obtain the classification weight parameters of the lesion area;
[0146] Based on the morphological change rate of the lesion area, the classification weight is set according to the inter-class variance. First, the grayscale variance of the lesion area and the surrounding tissue is calculated. The grayscale variance of the lesion area is calculated using the pixel grayscale statistics method. The formula is:
[0147] in, is the grayscale variance of the lesion area, P i is the pixel grayscale value of the lesion area, μ b is the grayscale mean of the lesion area. If the lesion area contains 100 pixels, the grayscale mean is 120, and the grayscale values of individual pixels are 110, 115, 125, 130, etc.
[0148] The calculated grayscale variance is 18.2. Similarly, the grayscale variance of the surrounding tissue is calculated. is 10.5, and then the grayscale mean of the differential category lesion area is analyzed and the variance information is calculated, which is defined as
[0149] Substitute into the calculation and get
[0150] Then adjust the classification weight according to the variance ratio and set the variance ratio threshold T v =1.5, if V>T v , the classification weight adjustment coefficient is set to 1.2, otherwise it is set to 1. Finally, the classification parameters of the lesion category are calculated based on the morphological change characteristics, the classification weights of the lesion areas of different categories are calculated, and finally the classification weight parameters of the lesion area are obtained.
[0151] S403: Based on the lesion area classification weight parameters, calculate the pixel-level and global feature matching fit, analyze the matching between the lesion area pixel features and the global statistical features, calculate the error distribution of the pixel-level features, adjust the lesion category according to the error situation, screen the lesion categories that meet the matching conditions, perform matching calculations, and obtain the thyroid lesion classification matching results.
[0152] Calculate the error distribution of pixel-level features using the formula:
[0153]
[0154] Calculate the error distribution value, adjust the lesion classification based on the error situation, screen the lesion categories that meet the matching conditions, perform matching calculations, and obtain the thyroid lesion classification matching results;
[0155] Among them, E p represents the error distribution value of the pixel-level feature, N represents the total number of pixels in the lesion area, and P i Represents the grayscale value of the i-th pixel, μ P represents the mean grayscale value of all pixels in the lesion area, σ P represents the standard deviation of the grayscale values of all pixels in the lesion area, M represents the total number of global statistical features, and W j Represents the weight parameter of the jth global feature, F ij represents the eigenvalue of the i-th pixel in the j-th feature dimension, Represents the mean of the j-th global feature.
[0156] formula:
[0157]
[0158] Detailed explanation of the formula and the process of formula calculation and derivation:
[0159] This formula is used to calculate the pixel-level feature error distribution value E of the lesion area in the medical image. p , to evaluate how well each pixel matches the global feature.
[0160] Parameter acquisition method:
[0161] N: The total number of pixels in the lesion area. By segmenting the medical image, the boundary of the lesion area is determined, and then the number of pixels in the area is counted.
[0162] P i : Grayscale value of the i-th pixel. Obtained directly from the image data. Grayscale values usually range from 0 to 255.
[0163] μ P : The mean grayscale value of all pixels in the lesion area. Obtained by calculating the mean grayscale value of all pixels in the lesion area.
[0164] σ P : The standard deviation of the grayscale values of all pixels in the lesion area. Obtained by calculating the standard deviation of the grayscale values of all pixels in the lesion area.
[0165] M: The total number of global statistical features. Determined by the type of global features selected, such as the number of texture, shape, and other features.
[0166] Wj : The weight parameter of the jth global feature. It is determined by expert experience or statistical methods (such as principal component analysis) based on the importance of the feature to the classification task.
[0167] F ij : The eigenvalue 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 jth global feature is obtained by calculating the average value of all pixels in the entire image or lesion area on the jth feature dimension.
[0169] Specific numerical examples:
[0170] Assume that in a medical image, the lesion area obtained after segmentation contains N=1000 pixels.
[0171] Calculate the grayscale mean μ P and standard deviation σ P :
[0172] The grayscale values of all pixels in the lesion area are obtained from the image data, and their mean and standard deviation are calculated.
[0173] For example, assuming the grayscale value mean μ P =120, standard deviation σ P =15.
[0174] Determine the number of global features M and weight W j :
[0175] Three global features are selected (such as texture, shape, and edge strength), so M=3.
[0176] According to the importance of each feature to classification, set the weight:
[0177] W1=0.5 (texture feature);
[0178] W2=0.3 (shape characteristics);
[0179] W3 = 0.2 (edge strength feature);
[0180] Calculate the eigenvalue F of each pixel ij and the 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 eigenvalue 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] Normalized grayscale difference:
[0193]
[0194] Weighted sum of feature differences:
[0195]
[0196] Calculate the final error distribution value E p :
[0197]
[0198] For the first pixel i=1:
[0199]
[0200] Derivation conclusion:
[0201] Calculate all pixels i=1,2,...,1000, and finally get E p It reflects the matching between the pixel features in the lesion area and the global statistical features. p The value indicates that there is a large deviation between the pixel features in the lesion area and the global statistical features, and it may be necessary to further adjust the lesion category or optimize the classification model. p The value indicates that the pixel features of the lesion area have a high matching degree with the global statistical features.
[0202] See also Figure 6 The specific steps for obtaining dynamic weight parameters for personalized thyroid diagnosis are as follows:
[0203] S501: Based on the thyroid lesion classification and matching results, extract the thyroid volume, hormone level, and lesion morphology change ratio, calculate the volume ratio of the lesion area, collect hormone level data of the lesion area, calculate the change ratio of the lesion morphology at different time points, analyze the correlation between volume, hormone level, and morphology changes, calculate the fluctuation range of the feature data, construct a lesion feature parameter set 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 thyroid volume, hormone level and lesion morphology change ratio were first extracted. The thyroid volume was obtained through ultrasound imaging data and the ellipsoid volume calculation formula was used.
[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
[0206] Then, calculate the volume ratio of the lesion area. Assuming the lesion volume is 12.5 cm3, the volume ratio is calculated as
[0207] Next, the hormone level data of the lesion area were counted, and the values of thyroid hormones (such as TSH, T3, and T4) at multiple time points were recorded. Assuming the TSH level to be 3.1mIU / L, T3 to be 1.8nmol / L, and T4 to be 9.2μg / dL, the change ratio of the lesion morphology at different time points was calculated, and the morphological change ratio was defined as
[0208] Among them, S t and S t:1 is the lesion morphology parameter at two time points. If the lesion morphology ratio at a certain time point changes from 0.22 to 0.25, then
[0209] Then, the correlation between volume, hormone levels, and morphological changes was analyzed, and the correlation coefficients among the three were calculated. The designed correlation coefficients were 0.82, 0.75, and 0.68, respectively, indicating that there was a strong correlation between the variables. Then, the fluctuation range of the characteristic data was calculated, and the maximum, minimum, mean, and standard deviation were counted. For example, the mean of volume change was 0.14, and the standard deviation was 0.03; the mean of hormone level change was 0.15, and the standard deviation was 0.04. A lesion characteristic parameter set was constructed based on the fluctuation trend, and finally the lesion characteristic ratio data was obtained.
[0210] S502: Based on the lesion feature ratio data, the degree of fit between the lesion feature and the diagnosis database is calculated, the mean and standard deviation of the lesion feature are calculated, the feature deviation is calculated and the degree of fit is measured, and a lesion feature matching calculation is performed to obtain the degree of fit of the lesion feature;
[0211] Based on the lesion feature ratio data, the fit between the lesion feature and the diagnosis database is calculated. First, the mean and standard deviation of the lesion feature are calculated. Assuming the mean of the lesion feature is 0.16 and the standard deviation is 0.05, the mean square error is used to calculate the feature deviation. The error calculation formula is defined as
[0212] Among them, X i is the individual lesion feature data, X is the feature mean of the confirmed database, assuming the database mean is 0.15, and the lesion feature sample data are 0.14, 0.16, 0.17, 0.18, and 0.13, then the error is calculated as:
[0213]
[0214] Then, measure the fit and define the fit calculation formula
[0215] Assume that the standard deviation σ = 0.05 and substitute it into the calculation
[0216] Then, the lesion feature matching calculation is performed to calculate the feature matching score. 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 lesion feature fitting degree, calculate the credibility of the classification method, analyze the lesion classification error range, statistically analyze the distribution of the error, calculate the credibility interval and adjust the classification weight to obtain the dynamic weight parameter of personalized thyroid diagnosis.
[0218] Based on the lesion feature fitting degree, the reliability of the classification method is calculated. First, the error range of lesion classification is analyzed and the distribution of classification error is statistically analyzed. Assuming that the mean of lesion category distribution is 0.18 and the standard deviation is 0.06, the error range is calculated.
[0219] Among them, C j is the lesion classification data, C is the classification mean, assuming that a certain classification data is 0.15, 0.17, 0.19, 0.21, 0.14;
[0220] calculate
[0221] Then calculate the confidence interval using the confidence interval calculation
[0222] Assume N = 30, calculate
[0223] Then the classification weight is adjusted, and the classification weight threshold is set according to the credibility interval. If a certain classification data exceeds the credibility interval, the weight coefficient is reduced, and finally the dynamic weight parameter of personalized thyroid diagnosis is obtained.
[0224] A thyroid ultrasound-assisted scanning system is provided, which is used to perform the above-mentioned thyroid ultrasound-assisted scanning method. The system comprises:
[0225] The image gradient analysis module obtains the pixel grayscale value, local contrast, and edge sharpness of the thyroid ultrasound image, calculates the pixel gradient change rate, screens the thyroid gland boundary area based on the pixel gradient change rate, calculates the gradient characteristic parameters of the pixel points in the boundary area, and screens out the pixel area whose gradient amplitude change rate conforms to the glandular tissue characteristics to obtain the thyroid ultrasound image gradient characteristic parameters;
[0226] The gland boundary segmentation module uses the gradient feature parameters of thyroid ultrasound images to calculate the gradient change rate and edge strength at differential scales. It then selects the glandular tissue boundary area based on the edge strength, calculates the grayscale uniformity and constructs a gradient difference weight matrix. It adjusts the boundaries of areas with drastic gradient changes but uniform grayscale, calculates the local mean deviation of pixels at differential scales, sets the segmentation threshold based on the mean difference between categories, and obtains thyroid gland segmentation boundary data.
[0227] The lesion feature extraction module uses the thyroid gland segmentation boundary data to calculate the pixel grayscale offset, gradient direction distribution and morphological parameters of the lesion area, measure the local contrast coefficient of variation, screen low-contrast lesion areas, and obtain the morphological and contrast characteristics of the thyroid lesion area;
[0228] The lesion classification and matching module uses the morphological and contrast features of the thyroid lesion area, calculates the morphological change rate of the lesion area, sets the classification weight based on the inter-class variance, calculates the pixel-level and global feature matching fit, and obtains the thyroid lesion classification matching results;
[0229] The personalized diagnosis calculation module calls the thyroid lesion classification matching results, extracts the thyroid volume, hormone level and lesion morphology change ratio, calculates the fit between the lesion characteristics and the diagnosis database, calculates the credibility of the classification method, and obtains the dynamic weight parameters of thyroid personalized diagnosis.
[0230] The above are merely preferred embodiments of the present invention and do not limit the present invention in any other form. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.
Claims
1. A thyroid ultrasound-assisted scanning method, characterized in that: The following steps are involved: S1: Obtain the pixel grayscale value, local contrast, and edge sharpness of the thyroid ultrasound image, calculate the pixel gradient change rate, screen the thyroid gland boundary area based on the gradient amplitude change rate, and obtain the gradient characteristic parameters of the thyroid ultrasound image; S2: Based on the gradient characteristic parameters of the thyroid ultrasound image, the gradient change rate and edge strength at the differential scale are calculated, the glandular tissue boundary is screened according to the edge strength, the grayscale uniformity is calculated and a gradient difference weight matrix is constructed, the boundaries of the areas with drastic gradient changes but uniform grayscale are adjusted, the local mean deviation of the pixel points at the differential scale is calculated, and the segmentation threshold is set according to the mean difference between categories to obtain the thyroid gland segmentation boundary data; S3: Based on the thyroid gland segmentation boundary data, calculating the pixel grayscale offset, gradient direction distribution and morphological parameters of the lesion area, measuring the local contrast coefficient of variation, screening low-contrast lesion areas, and obtaining the morphological and contrast characteristics of the thyroid lesion area; S4: Based on the morphology and contrast characteristics of the thyroid lesion area, calculating the morphological change rate of the lesion area, setting the classification weight according to the inter-class variance, calculating the pixel-level and global feature matching fit, and obtaining the thyroid lesion classification matching result; S5: Based on the thyroid lesion classification matching results, the thyroid volume, hormone level and lesion morphology change ratio are extracted, the fit between the lesion characteristics and the diagnosis database is calculated, the credibility of the classification method is calculated, and the dynamic weight parameters of personalized thyroid diagnosis are obtained.
2. The thyroid ultrasound-assisted scanning method according to claim 1, characterized in that: The thyroid ultrasound image gradient feature parameters include pixel gradient change rate, gradient amplitude change rate, and gland boundary area; the thyroid gland segmentation boundary data includes differential scale gradient change rate, edge intensity, grayscale uniformity, gradient difference weight matrix, local mean deviation, and segmentation threshold; the thyroid lesion area morphology and contrast features include pixel grayscale offset, gradient direction distribution, morphological parameters, local contrast variation coefficient, and low-contrast lesion area; the thyroid lesion classification matching results include lesion area morphology change rate, classification weight, and pixel-level and global feature matching fit; the thyroid personalized diagnosis dynamic weight parameters include thyroid volume, hormone level, lesion morphology change ratio, lesion feature and diagnosis database fit, and classification method credibility.
3. The thyroid ultrasound-assisted scanning method according to claim 2, characterized in that: The steps for obtaining the gradient characteristic parameters of the thyroid ultrasound image are specifically as follows: S101: Obtain pixel grayscale values of a thyroid ultrasound image, traverse image pixels, record grayscale values of multiple pixels, calculate a grayscale histogram based on the spatial distribution of the pixels, count the number of pixels corresponding to differentiated grayscale values, calculate the grayscale mean and variance, divide the image into multiple spatial intervals, calculate the grayscale mean of the multiple intervals, calculate the overall grayscale trend based on the change of the grayscale mean of the multiple intervals, calculate the grayscale characteristics based on the pixel grayscale values and their distribution characteristics, and obtain the pixel grayscale distribution parameters; S102: Based on the pixel grayscale distribution parameter, multiple window areas are selected, the ratio of the maximum grayscale value to the minimum grayscale value in the window is calculated, the contrast values of all windows are counted, the mean and standard deviation of the regional contrast are calculated, the contrast fluctuation trend of the differentiated regions is calculated according to the spatial distribution of the contrast, the contrast change of the overall image is calculated based on the contrast change characteristics of the multiple regions, the local contrast characteristics are calculated, and the local contrast change parameter is obtained; S103: Based on the local contrast change parameter, the pixel gradient change rate is calculated, the gradient amplitude is calculated according to the grayscale gradient of the pixel point in multiple directions, and the pixel points whose gradient amplitude change rate exceeds the set threshold are screened according to the gradient amplitude change situation. The thyroid gland boundary area is calibrated, the average gradient amplitude, gradient direction distribution and edge sharpness value of the area are calculated, the boundary area characteristics are calculated, and the gradient characteristic parameters of the thyroid ultrasound image are obtained.
4. The thyroid ultrasound-assisted scanning method according to claim 3, characterized in that: The steps for obtaining the thyroid gland segmentation boundary data are specifically as follows: S201: Based on the gradient characteristic parameters of the thyroid ultrasound image, calculating the gradient change rate at the differential scale, determining the pixel gradient value at the differential scale, calculating the gradient change rate and analyzing the change of the gradient amplitude at the differential scale, calculating the edge strength of multiple regions based on the change, screening pixels with edge strength greater than a set threshold, calibrating the glandular tissue boundary area, and obtaining the glandular tissue boundary pixel distribution; S202: Based on the pixel distribution of the glandular tissue boundary, the grayscale uniformity of multiple regions is calculated, the grayscale mean and variance of the glandular tissue region are counted, a gradient difference weight matrix is constructed, the boundary is adjusted according to the grayscale uniformity of the region with drastic gradient changes, the boundary region with uniform grayscale but drastic gradient changes is screened, the boundary position is adjusted, and the glandular boundary after gradient adjustment is obtained; S203: Based on the gradient-adjusted gland boundary, calculate the local mean deviation of the pixel points under the differentiated scale, calculate the mean difference between multiple categories, set the segmentation threshold according to the mean difference, filter the pixels that meet the threshold conditions, 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 the pixel points at the differential scale is calculated using the formula: Calculate the local mean deviation D p , calculate the mean difference between multiple categories, set the segmentation threshold based on the mean difference, filter the pixels that meet the threshold conditions, calibrate the gland segmentation boundary, and obtain the thyroid gland segmentation boundary data; Among them, D p Represents pixel p at different scales s i The local mean deviation under , Represents pixel p at scale s i The gray value below Representative scale s i The local mean under n represents the number of selected scales, i represents the scale index, s i Represents the i-th selected scale.
6. The thyroid ultrasound-assisted scanning method according to claim 5, characterized in that: The steps for acquiring the morphology and contrast characteristics of the thyroid lesion area are specifically 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, count the grayscale offset trends in different directions, analyze the gradient direction distribution, calculate the gradient direction change amplitude, calculate the pixel features 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: Calculating morphological parameters of the lesion region based on the grayscale offset and gradient direction data of the lesion region, calculating the area, perimeter, and morphological ratio of the lesion region, calculating the grayscale value distribution characteristics within the region, calculating the local contrast variation coefficient based on the morphological parameters and grayscale distribution characteristics, analyzing the contrast change of the lesion region, calculating the morphological and contrast characteristics, and obtaining the morphological parameters and contrast variation coefficient of the lesion region; 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 proportion and spatial distribution of the low-contrast lesion area are calculated, and lesion area screening calculations are performed to obtain the morphological and contrast characteristics of the thyroid lesion area.
7. The thyroid ultrasound-assisted scanning method according to claim 6, characterized in that: The steps for obtaining the thyroid lesion classification matching results are specifically as follows: S401: Based on the morphology and contrast characteristics of the thyroid lesion area, extracting contour information of the lesion area, calculating the gradient change of the contour in the differentiation direction, counting the gradient fluctuation of the lesion area boundary, calculating the morphology change rate based on the fluctuation amplitude, analyzing the morphology change trend, calculating the lesion morphology characteristics, and obtaining the lesion area morphology change rate; S402: Based on the morphological change rate of the lesion area, a classification weight is set according to the inter-class variance, the grayscale variance of the lesion area and the surrounding tissue is calculated, the grayscale mean of the differentiated lesion area is analyzed, the variance information is calculated, the classification weight is adjusted according to the variance ratio, and the classification parameters of the lesion category are calculated in combination with the morphological change characteristics. The classification weight is calculated to obtain the classification weight parameters of the lesion area; S403: Based on the lesion area classification weight parameters, calculate the pixel-level and global feature matching fit, analyze the matching between the lesion area pixel features and the global statistical features, calculate the error distribution of the pixel-level features, adjust the lesion category according to the error situation, 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 of the pixel-level features is calculated using the formula: Calculate the error distribution value, adjust the lesion classification based on the error situation, screen the lesion categories that meet the matching conditions, perform matching calculations, and obtain the thyroid lesion classification matching results; Among them, E p represents the error distribution value of the pixel-level feature, N represents the total number of pixels in the lesion area, and P i Represents the grayscale value of the i-th pixel, μ P represents the mean grayscale value of all pixels in the lesion area, σ P represents the standard deviation of the grayscale values of all pixels in the lesion area, M represents the total number of global statistical features, and W j Represents the weight parameter of the jth global feature, F ij represents the eigenvalue of the i-th pixel in the j-th feature dimension, Represents the mean of the j-th global feature.
9. The thyroid ultrasound-assisted scanning method according to claim 8, characterized in that: The steps for obtaining the dynamic weight parameters of the personalized thyroid diagnosis are specifically as follows: S501: Based on the thyroid lesion classification and matching results, extract the thyroid volume, hormone level, and lesion morphology change ratio, calculate the volume ratio of the lesion area, collect hormone level data of the lesion area, calculate the change ratio of the lesion morphology at different time points, analyze the correlation between volume, hormone level, and morphology changes, calculate the fluctuation range of the 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, calculating the fit between the lesion feature and the diagnosis database, calculating the mean and standard deviation of the lesion feature, calculating the feature deviation and measuring the fit, performing lesion feature matching calculation, and obtaining the lesion feature fit; S503: Based on the lesion feature fitting degree, the credibility of the classification method is calculated, the lesion classification error range is analyzed, the distribution of the statistical error is statistically analyzed, the credibility interval is calculated and the classification weight is adjusted to obtain the dynamic weight parameter of the personalized thyroid diagnosis.
10. A thyroid ultrasound-assisted scanning system, characterized in that: The thyroid ultrasound-assisted scanning method according to any one of claims 1 to 9, wherein the system comprises: The image gradient analysis module obtains the pixel grayscale value, local contrast, and edge sharpness of the thyroid ultrasound image, calculates the pixel gradient change rate, screens the thyroid gland boundary area based on the pixel gradient change rate, calculates the gradient characteristic parameters of the pixel points in the boundary area, and screens out the pixel area whose gradient amplitude change rate conforms to the glandular tissue characteristics to obtain the thyroid ultrasound image gradient characteristic parameters; The gland boundary segmentation module calls the gradient feature parameters of the thyroid ultrasound image, calculates the gradient change rate and edge strength under differential scales, screens the glandular tissue boundary area based on the edge strength, calculates the grayscale uniformity and constructs a gradient difference weight matrix, adjusts the boundaries of areas with drastic gradient changes but uniform grayscale, calculates the local mean deviation of pixels under differential scales, sets the segmentation threshold based on the mean difference between categories, and obtains 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 coefficient of variation, screens low-contrast lesion areas, and obtains the morphological and contrast characteristics of the thyroid lesion area; The lesion classification 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 matching result; The personalized diagnosis calculation module calls the thyroid lesion classification matching results, extracts the thyroid volume, hormone level and lesion morphology change ratio, calculates the fit between the lesion characteristics and the diagnosis database, calculates the credibility of the classification method, and obtains the dynamic weight parameters of the personalized thyroid diagnosis.
Citation Information
Patent Citations
Ultrasonic image low-rank analysis based thyroid lesion image identification method
CN105427296A
Intelligent thyroid ultrasound image analysis system
CN119722543A
Remote ultrasonic diagnosis support system based on cloud computing
CN119832346A
AOI optical detection method and system based on deep learning
CN119887747A
Efficient Border Extraction Of Image Feature
US20080069421A1
Cited By
Alloy resistor surface defect real-time detection method and system based on image processing
CN120894367A