A thyroid nodule grading identification method and system

By employing techniques such as Gaussian filtering, local brightness adjustment, Laplacian sharpening, and Canny edge detection, the feature extraction of thyroid nodule images is optimized, solving the problems of inaccurate noise processing and edge detection, improving the accuracy and stability of image analysis, and supporting the graded diagnosis of thyroid nodules.

CN120047418BActive Publication Date: 2025-12-05THE FIRST AFFILIATED HOSPITAL OF ARMY MEDICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510134206.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-06
Publication Date
2025-12-05
Estimated Expiration
2045-02-06

AI Technical Summary

Technical Problem

Existing technologies are insufficient in noise handling, inaccurate edge detection, and inadequate texture feature extraction in thyroid nodule image analysis, which affects the accuracy and stability of diagnosis.

Method used

A combined approach of Gaussian filtering, local brightness adjustment, Laplacian sharpening, Canny edge detection, and gray-level co-occurrence matrix analysis is employed to optimize image features through weighted operations and morphological manipulations, thereby extracting nodule feature vectors.

Benefits of technology

It improves image contrast and edge recognition accuracy, enhances the stability of texture features, and provides a more reliable basis for the graded diagnosis of thyroid nodules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120047418B_ABST
    Figure CN120047418B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image analysis, in particular to a thyroid nodule grading recognition method and system, which comprises the following steps: performing Gaussian filtering processing based on an ultrasonic image, constructing a two-dimensional Gaussian kernel with the same size as the image, calculating the weight of each element in the kernel, performing a weighted operation on the weight value according to the relative position and pixel value of each pixel and the neighborhood pixels, updating each pixel value in the original image through weighted average, and obtaining a denoising image.In the application, the local brightness is optimized through dynamic adjustment of a histogram, the contrast is enhanced, and the detail performance is obviously improved, the edge definition of a fast change region is strengthened through sharpening processing of a second-order gradient, and the artifact is reduced, the edge detection utilizes a composite gradient and a double threshold strategy, the accuracy of edge recognition is improved, the texture feature extraction is comprehensively analyzed through a gray level co-occurrence matrix, the stability and distinguishing force of a feature vector are enhanced, and a more reliable basis is provided for medical diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image analysis, and particularly relates to a thyroid nodule grading recognition method and system. BACKGROUND

[0002] The technical field of image analysis includes the acquisition, processing, analysis and application of image information. The core content of this field includes image acquisition, image processing algorithms, feature extraction, pattern recognition and other technologies. Image analysis technology is widely used in medicine, industry, autonomous driving and other fields, especially in the medical field, medical images are interpreted through image analysis to help diagnose diseases and evaluate lesions. In medical image analysis, accurate processing and analysis of images are crucial for early diagnosis of diseases and development of treatment plans. Image analysis techniques include but are not limited to lesion detection, segmentation, classification and other processing methods based on computer vision, which play an important role in the identification and evaluation of tumors, nodules and other diseases.

[0003] Among them, the thyroid nodule grading recognition method refers to a technical method for grading and evaluating thyroid nodules. The patent subject provides a grading recognition scheme based on image analysis for the diagnosis of thyroid nodules. Specifically, the method obtains medical image data of thyroid nodules, pre-processes the image data, extracts features, and automatically grades the nodules using machine learning or deep learning algorithms. The patent scheme involves feature extraction of image data, construction of grading model and classification criteria for nodules, and provides an effective solution for grading thyroid nodules through image analysis technology.

[0004] The existing technology has the problem of insufficient detail preservation in noise processing. Due to the weak combination of noise suppression and edge protection, the filtered image has poor detail performance. In the local brightness adjustment process, the regional differences of gray scale distribution are not fully responded, often leading to uneven contrast enhancement effect and unobvious local detail contrast effect. The sharpening process lacks targeted strengthening strategies, and the edge detail performance is insufficient and there is a certain degree of artifact problem, affecting the image quality and the accuracy of diagnosis. In the edge detection technology, due to the single gradient calculation method, the edge position recognition has deviation, and the relatively subtle boundary is easily ignored, causing the contour to be blurred. The texture feature extraction method is insufficient in analyzing the regional gray space relationship, and the feature extraction depth and accuracy are low, which makes it difficult to accurately reflect the texture characteristics of the nodule region, affecting the stability and accuracy of the grading evaluation. These problems may increase the uncertainty of the diagnosis result, making it difficult to meet the demand of high-precision processing of medical images. SUMMARY

[0005] The purpose of the present application is to solve the problems existing in the prior art and to provide a thyroid nodule grading recognition method and system.

[0006] To achieve the above object, the application adopts the following technical scheme: a thyroid nodule grading recognition method, comprising the following steps:

[0007] S1: Gaussian filtering processing is performed based on the ultrasound image, a two-dimensional Gaussian kernel with the same size as the image is constructed, the weight of each element in the kernel is calculated, the weight value is weighted according to the relative position and pixel value of each pixel and the neighborhood pixel, each pixel value in the original image is updated by weighted average, and a denoising image is obtained;

[0008] S2: brightness distribution analysis is performed based on the denoising image, the gray value distribution of the pixels in the local region is calculated, the histogram of the image is adjusted according to the contrast change of each local region, the brightness of the local region in the image is optimized, and a contrast-enhanced image is generated;

[0009] S3: the contrast-enhanced image is sharpened by a Laplace operator, the second-order gradient value of each pixel point is calculated, the pixel value is updated combined with the differential weighted coefficient, the rapidly changing part in the image is strengthened, and a sharpened image is obtained;

[0010] S4: based on the sharpened image, the horizontal and vertical gradient values of each pixel are calculated, the preliminary edge position is determined according to the gradient amplitude, the edge points are screened by threshold judgment, the preliminary edge image is smoothed by using the Canny algorithm, the gradient amplitude and direction are calculated, the non-maximum suppression is performed, and after the double-threshold processing, an accurate edge image is obtained;

[0011] S5: based on the accurate edge image, the gray level co-occurrence matrix is calculated, the spatial relationship of the regional pixel gray level in the image is analyzed, the texture feature is extracted, the nodule region morphology is optimized by morphological operation, and a nodule feature vector is obtained.

[0012] As a further scheme of the application, the denoising image includes weight distribution, weighted average pixel value and denoised image pixel distribution, the contrast-enhanced image includes local gray distribution, optimized histogram and enhanced brightness distribution, the sharpened image includes second-order gradient distribution, weighted gradient image and sharpened pixel distribution, the accurate edge image includes gradient amplitude graph, non-maximum suppression graph, double-threshold processing graph and final edge position graph, and the nodule feature vector includes gray level co-occurrence matrix feature, contrast feature, uniformity feature, entropy feature and morphological optimization feature.

[0013] As a further scheme of the application, the specific steps of Gaussian filtering processing based on the ultrasound image, constructing a two-dimensional Gaussian kernel with the same size as the image, calculating the weight of each element in the kernel, performing weighted operation according to the relative position and pixel value of each pixel and the neighborhood pixel, updating each pixel value in the original image by weighted average, and obtaining a denoising image are as follows:

[0014] S101: Construct a two-dimensional Gaussian kernel with the same size as the image based on the ultrasound image, calculate the core matrix size, establish a data matrix model, select a standard deviation parameter to adjust the spatial range of the kernel, assign values to each element in the matrix for weight initialization, and generate a Gaussian kernel;

[0015] S102: Based on the Gaussian kernel, calculate the weight value of each element in the kernel, establish a position weight matrix by the distance between the pixel and the neighborhood position, establish a value weight matrix by the difference between the pixel and the neighborhood pixel value, and generate a weight matrix by normalizing the position weight and value weight through matrix operation to obtain a weighted pixel mapping.

[0016] S103: Based on the weighted pixel mapping, multiply the corresponding values of each pixel point in the image and the weight matrix, accumulate all neighborhood pixel product values to complete local weighting, and normalize the local weighting result and the weight sum to update the image pixel value, and obtain a denoising image.

[0017] As a further scheme of the present application, based on the denoising image, the brightness distribution is analyzed, the gray value distribution of the pixels in the local area is calculated, the histogram of the image is adjusted according to the contrast change of each local area, the brightness of the local area in the image is optimized, and the specific steps for generating a contrast-enhanced image are as follows:

[0018] S201: Based on the denoising image, a plurality of local areas are divided for the image, the gray values of all pixel points in the area are analyzed, a distribution histogram is generated by counting the frequency of the gray values, a gray distribution model is established by inducing the gray range of different areas, and gray distribution data is generated.

[0019] S202: Based on the gray distribution data, for the gray distribution range of each local area, the gray extreme difference in the area is calculated, the adjustment area is screened by setting a contrast change threshold, the gray mapping relationship is established to optimize the local gray distribution, and the gray value is redistributed to generate an optimized gray mapping.

[0020] S203: Based on the optimized gray mapping, the gray values of all pixel points in the local area of the denoising image are adjusted, the remapped gray values are calculated through the gray mapping model, the pixel value adjustment is completed by updating the image data matrix, and a contrast-enhanced image is obtained.

[0021] As a further scheme of the present application, the gray contrast adjustment value calculation formula is specifically:

[0022] ;

[0023] wherein, represents the gray extreme difference, a maximum gray value in the representative region, a minimum gray value in the representative region, a gray contrast adjustment value in the representative region, a small positive number is prevented from being zero.

[0024] As a further scheme of the present application, the contrast-enhanced image is sharpened by a Laplace operator to calculate a second-order gradient value of each pixel point, and the pixel value is updated in combination with a differentiated weighting coefficient to strengthen the rapidly changing part of the image, and the specific steps for obtaining a sharpened image are as follows:

[0025] S301: Based on the contrast-enhanced image, the neighborhood pixel values of each pixel point are extracted, the second-order gradient of the gray value change in the neighborhood of each pixel point is calculated, the gradient values of each pixel point are integrated by matrix operation, the gradient distribution data of the image is analyzed, and a gradient matrix is generated;

[0026] S302: Based on the gradient matrix, the gradient value of each pixel point and the neighborhood gradient value difference are adjusted by setting a gradient difference range adjustment weight coefficient, and the weighted value is calculated by combining the gradient difference and the weight coefficient to obtain a weighted update matrix;

[0027] S303: Based on the weighted update matrix, the superposition result of the original pixel value and the weighted update value is calculated for all pixel points of the contrast-enhanced image, the gray value of each pixel point in the image is gradually updated, the updated image matrix data is regenerated, and a sharpened image is obtained.

[0028] As a further scheme of the present application, based on the sharpened image, the horizontal and vertical gradient values of each pixel are calculated, the preliminary edge position is determined according to the gradient amplitude, the edge points are screened by threshold judgment, the Canny algorithm is used to smooth the preliminary edge image, the gradient amplitude and direction are calculated, the non-maximum value is suppressed, and after double-threshold processing, the specific steps for obtaining an accurate edge image are as follows:

[0029] S401: Based on the sharpened image, the pixel point and its neighborhood pixel value are extracted, the horizontal gray gradient value is obtained by difference operation, the vertical gray gradient value is obtained by vertical difference operation, the gradient amplitude data matrix is established by synthesizing the horizontal and vertical gradient values, and a gradient amplitude graph is generated;

[0030] S402: Based on the gradient amplitude graph, for the gradient amplitude value of each pixel point, the effective edge points are screened by comparing them with the set upper and lower threshold values, the edge point connection relationship is analyzed based on the gradient direction for positioning correction, the effective edge points are integrated to establish edge distribution data, and an edge positioning graph is obtained;

[0031] S403: Based on the edge positioning map, for the gradient direction and gradient amplitude value of the edge point, non-maximum value points are analyzed by gradient direction and zero processing, the boundary is screened by setting double threshold value and the edge region is constructed, and the accurate edge image is obtained by pixel-by-pixel correction.

[0032] As a further scheme of the application, based on the accurate edge image, a gray level co-occurrence matrix is calculated, the spatial relationship of the pixel gray levels in the region of the image is analyzed, the texture feature is extracted, the morphology of the nodule region is optimized by morphological operation, and the specific steps of obtaining the nodule feature vector are as follows:

[0033] S501: Based on the accurate edge image, for all pixel points and neighborhoods in the image, a data distribution is established by counting the co-occurrence frequency of pixel gray values and neighborhood gray values, a two-dimensional gray matrix data is generated by establishing the spatial correlation between pixel gray levels, and a gray level co-occurrence matrix is generated;

[0034] S502: Based on the gray level co-occurrence matrix, the distribution range of each group of data in the matrix is normalized, the contrast value of each gray level combination is calculated, the region difference is evaluated, the gray level distribution rule is judged by uniformity value, and the texture feature value matrix is obtained;

[0035] S503: Based on the texture feature value matrix, the region boundary is adjusted by morphological operation for the nodule region, the isolated pixel region is removed by connectivity analysis, the unified data vector is generated by optimizing the consistency of region shape and texture, and the nodule feature vector is obtained.

[0036] As a further scheme of the application, the contrast value calculation formula is specifically:

[0037] ;

[0038] wherein, and represent the gray level, represent the normalized frequency value, represent the contrast value.

[0039] A thyroid nodule grading and recognition system, comprising:

[0040] The Gaussian filter module performs Gaussian filtering processing based on the ultrasound image, constructs a two-dimensional Gaussian kernel with the same size as the image, calculates the weight of each element in the kernel, and obtains a denoising image by weighting operation according to the relative position and pixel value of each pixel and the neighborhood pixels.

[0041] The brightness distribution analysis module performs brightness distribution analysis based on the denoising image, calculates the gray value distribution of pixels in the local region, adjusts the histogram of the image according to the contrast change of each local region, and generates a contrast enhanced image.

[0042] The sharpening processing module performs sharpening processing on the contrast-enhanced image through a Laplace operator, calculates a second-order gradient value of each pixel point, combines a differentiated weighting coefficient, strengthens a rapidly changing part in the image, and obtains a sharpened image;

[0043] The edge detection module calculates horizontal and vertical gradient values of each pixel based on the sharpened image, determines a preliminary edge position according to a gradient amplitude, screens edge points through threshold value judgment, performs smoothing processing on the preliminary edge image using a Canny algorithm, calculates a gradient amplitude and direction, and obtains an accurate edge image after double-threshold value processing.

[0044] The feature extraction module calculates a gray level co-occurrence matrix based on the accurate edge image, analyzes a spatial relationship of regional pixel gray levels in the image, extracts texture features, optimizes a nodule region morphology through morphological operation, and obtains a nodule feature vector.

[0045] Compared with the prior art, the application has the following advantages and positive effects:

[0046] In the application, local brightness is dynamically adjusted through histogram optimization, contrast is enhanced, and detail performance is obviously improved, second-order gradient sharpening processing strengthens edge definition of a rapidly changing region, reduces artifacts, edge detection uses a composite gradient and a double-threshold value strategy to improve the accuracy of edge recognition, and texture feature extraction comprehensively analyzes through a gray level co-occurrence matrix to enhance the stability and distinguishing power of a feature vector, thereby providing a more reliable basis for medical diagnosis. BRIEF DESCRIPTION OF DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description only some embodiments of the application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of these drawings.

[0048] Figure 1 The figure is a step flowchart of the application;

[0049] Figure 2 The figure is a step flowchart of S1 of the application;

[0050] Figure 3 The figure is a step flowchart of S2 of the application;

[0051] Figure 4 The figure is a step flowchart of S3 of the application;

[0052] Figure 5 The figure is a step flowchart of S4 of the application;

[0053] Figure 6 A step flow chart for the present application S5;

[0054] Figure 7 A system module chart for the present application. DETAILED DESCRIPTION

[0055] The technical solutions in the present application will be described below with reference to the drawings.

[0056] In the embodiments of the present application, the words such as "example", "for example" are used to represent as an example, illustration or description. Any embodiment or design scheme described as "example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the word "example" is intended to present the concept in a specific manner. In addition, in the embodiments of the present application, the meaning expressed by "and / or" can be both, or can be one of the two.

[0057] In the embodiments of the present application, "image" and "picture" can be used interchangeably at times, and it should be pointed out that the meanings expressed are consistent when the distinction is not emphasized. "Of", "corresponding" and "corresponding" can be used interchangeably at times, and it should be pointed out that the meanings expressed are consistent when the distinction is not emphasized.

[0058] In the embodiments of the present application, sometimes the subscript such as W1 can be written in the form of non-subscript such as W1, and the meanings expressed are consistent when the distinction is not emphasized.

[0059] In order to make the technical problems, technical solutions and advantages to be solved by the present application more clear, the following will be described in detail with reference to the drawings and specific embodiments.

[0060] Please refer to Figure 1 A thyroid nodule grading identification method, comprising the following steps:

[0061] S1: Gaussian filtering processing is performed based on an ultrasound image, a two-dimensional Gaussian kernel with the same size as the image is constructed, the weight of each element in the kernel is calculated, the weight value is weighted according to the relative position and pixel value of each pixel and the neighborhood pixel, each pixel value in the original image is updated by weighted average, and a denoising image is obtained;

[0062] S2: Based on the denoising image, the brightness distribution is analyzed, the gray value distribution of the pixels in the local area is calculated, the histogram of the image is adjusted according to the contrast change of each local area, the brightness of the local area in the image is optimized, and a contrast enhanced image is generated;

[0063] S3: Sharpening the contrast-enhanced image by Laplacian operator to calculate the second-order gradient value of each pixel point, updating the pixel value by combining the differential weighting coefficient, strengthening the rapidly changing part of the image, and obtaining a sharpened image;

[0064] S4: Based on the sharpened image, calculating the horizontal and vertical gradient values of each pixel, determining the preliminary edge position according to the gradient amplitude, screening the edge points by threshold judgment, using Canny algorithm to smooth the preliminary edge image, calculating the gradient amplitude and direction, and performing non-maximum suppression, obtaining the accurate edge image after double threshold processing.

[0065] S5: Based on the accurate edge image, calculating the gray level co-occurrence matrix, analyzing the spatial relationship of the regional pixel gray level in the image, extracting the texture feature, and obtaining the nodule feature vector by morphological operation to optimize the nodule region morphology.

[0066] The denoised image includes weight distribution, weighted average pixel value, and denoised image pixel distribution, the contrast-enhanced image includes local gray level distribution, optimized histogram, and enhanced brightness distribution, the sharpened image includes second-order gradient distribution, weighted gradient image, and sharpened pixel distribution, the accurate edge image includes gradient amplitude graph, non-maximum suppression graph, double threshold processing graph, and final edge position graph, and the nodule feature vector includes gray level co-occurrence matrix feature, contrast feature, uniformity feature, entropy feature, and morphological optimization feature.

[0067] Please refer to Figure 2 , the specific steps of S1 are as follows:

[0068] S101: Based on the ultrasound image, a two-dimensional Gaussian kernel with the same size as the image is constructed, the core matrix size is calculated to establish a data matrix model, the standard deviation parameter is selected to adjust the spatial range of the kernel, each element in the matrix is assigned a weight to initialize the weight, and the Gaussian kernel is generated.

[0069] By selecting the standard deviation parameter, the pixel distribution and spatial characteristics in the image are adjusted, and the spatial range of the kernel has an important influence on feature extraction in the ultrasound image. The size of the Gaussian kernel is proportional to the degree of preservation of image details, and the standard deviation of the kernel affects the shape and range of the kernel, affecting the convolution effect of the kernel and the image. This process involves complex matrix operations and image processing theory. The two-dimensional kernel formed by the Gaussian function is not only related to the position of each pixel, but also related to the gray value of the surrounding pixels. Such weight initialization can preserve edge information while reducing noise interference, and the generated Gaussian kernel is used for weight calculation in the next step.

[0070] S102: Based on the Gaussian kernel, the weight value of each element in the kernel is calculated, the position weight matrix is established by the distance between the pixel and the neighborhood position, the value weight matrix is established by the difference between the pixel and the neighborhood pixel value, and the position weight and the value weight are normalized to generate the weight matrix through matrix operation, and the weighted pixel mapping is obtained;

[0071] Based on the Gaussian kernel, the weight value of each element in the kernel is calculated, and the formula is

[0072] ;

[0073] The position weight and the value weight are calculated. In the formula, represents the Euclidean distance between the pixel positions, represents the spatial standard deviation, and represent the neighborhood pixel value, represent the standard deviation of the pixel value difference. Considering the characteristics of the ultrasound image, the spatial standard deviation is set as a function of the image resolution, and the standard deviation of the pixel value difference is set based on the gray level range of the image. Through experimental data, for example, the resolution of the ultrasound image is 0.5mm / pixel, and the gray level range is 0 to 255, can be set and . Further calculation :

[0074] ;

[0075] The results show that after the position and value weights are combined, the pixels that are adjacent and similar in pixel value have a greater influence on the center pixel.

[0076] S103: Based on the weighted pixel mapping, the product operation is performed for each pixel point in the image and the corresponding value of the weight matrix, the local weighting is completed by accumulating the product values of all neighborhood pixels, and the image pixel value is updated by normalizing the local weighting result and the weight sum, to obtain a denoising image;

[0077] This neighborhood-based weighting strategy allows the pixel points to be affected not only by a single pixel but also by the entire neighborhood. This method can effectively smooth the image while preserving important structural features in the image. The normalization of the local weighting result and the weight sum is to ensure that the weighted pixel value does not exceed the original data range. This step is crucial for maintaining the overall dynamic range of the image. After updating the image pixel value, the image is normalized to ensure that it is within a reasonable brightness range. The obtained denoising image shows clearer structural details than before, reducing noise without introducing additional artifacts.

[0078] Please refer toFigure 3 The specific steps of S2 are:

[0079] S201: Based on the denoised image, a plurality of local regions are divided for the image, all pixel gray values in the region are analyzed, a distribution histogram is generated by counting the frequency of gray values, a gray distribution model is established by inducing different region gray ranges, and gray distribution data is generated;

[0080] This process involves an image spatial division algorithm, wherein the size and shape of each local region are determined according to the heterogeneity of image content to ensure that the pixel points in the region have similar gray characteristics. In the process of analyzing all pixel gray values in the region, a statistical method is used to calculate the frequency of gray values and generate a distribution histogram. This histogram helps to identify the gray distribution law in the region. By inducing different region gray ranges, a gray distribution model is established, which involves the construction of a mathematical model. This model can describe the frequency distribution characteristics of different gray values. The generated gray distribution data provides necessary statistical information for subsequent processing.

[0081] S202: Based on the gray distribution data, the gray distribution range of each local region is calculated, the gray extreme difference in the region is calculated, the adjustment region is screened by setting a contrast change threshold, the gray mapping relationship is established to optimize the local gray distribution, and the gray value is redistributed to generate an optimized gray mapping.

[0082] The gray contrast adjustment value calculation formula is specifically:

[0083] ;

[0084] Wherein, represents the gray extreme difference, represents the maximum gray value in the region, represents the minimum gray value in the region, represents the gray contrast adjustment value in the region, represents a small positive number to prevent zero.

[0085] Considering the actual image processing scene, the gray value samples in a local region are . According to the formula, the gray extreme difference of the region is calculated first:

[0086] Maximum gray value

[0087] Minimum gray value

[0088] Gray extreme difference

[0089] To prevent the denominator from being zero, a small positive number Now, these values are brought into the contrast adjustment formula:

[0090] ;

[0091] This calculation result represents the gray scale contrast adjustment value in the region. The smaller the value, the lower the contrast in the region, and it may not need significant adjustment, but this depends on the set contrast variation threshold If is set to , then , indicating that the region should be adjusted for contrast.

[0092] The result shows that the contrast adjustment formula can effectively reflect the contrast variation in the local region, which helps to determine which regions need to be adjusted to optimize the local gray scale distribution of the image.

[0093] S203: Based on the optimized gray scale mapping, adjust the gray scale values of all pixel points in the local region of the denoised image, calculate the remapped gray scale values through the gray scale mapping model, update the image data matrix to complete the pixel value adjustment, and obtain the contrast enhanced image;

[0094] including calculating the remapped gray scale values through the gray scale mapping model, wherein the gray scale mapping model is defined based on the gray scale extreme difference of the previous step and the set contrast variation threshold. Through this model, the gray scale value of each pixel can be adjusted according to the specific gray scale distribution of the local region. The update of the image data matrix to complete the pixel value adjustment involves matrix operation and data structure update in image processing technology. The final result of the contrast enhanced image shows a clearer and more detailed image visual effect, making the image visually closer to the real scene under natural observation conditions.

[0095] Please refer to Figure 4 , the specific steps of S3 are as follows:

[0096] S301: Based on the contrast enhanced image, extract the neighborhood pixel values of each pixel point, calculate the second order gradient of the gray scale value variation in the neighborhood of each pixel point, integrate the gradient values of each pixel point through matrix operation, analyze the gradient distribution data of the image, and generate a gradient matrix;

[0097] The algorithm involving image processing is used to identify and analyze the pixel region around each pixel point, calculate the second-order gradient of the gray value change of each pixel point in the neighborhood, integrate the gradient value of each pixel point through matrix operation, and analyze the gradient distribution data of the image. The step of generating the gradient matrix is critical because it determines the effect and quality of subsequent image sharpening. The gradient matrix shows the rate of change of each pixel point in the image in the spatial dimension, and this data is crucial for understanding the structural features of the image content.

[0098] S302: Based on the gradient matrix, for the gradient value difference of each pixel point and the neighborhood gradient value, the weight coefficient is adjusted by setting the gradient difference range, the weighted value is calculated by combining the gradient difference and the weight coefficient, and the weighted update matrix is obtained.

[0099] Based on the gradient matrix, for the gradient value difference of each pixel point and the neighborhood gradient value, the weighted value is calculated according to the formula . In the formula, and represent the gradient values in the neighborhood, and are adjustment coefficients. Assuming that the gradient values of two points in the neighborhood are and , the adjustment coefficients and , and :

[0100] ;

[0101] The results show that the pixel points with larger gradient difference will get higher weight value, which helps to strengthen the edges and details in the image.

[0102] S303: Based on the weighted update matrix, for all pixel points of the contrast-enhanced image, the superposition result of the original pixel value and the weighted update value is calculated, the gray value of each pixel point in the image is updated step by step, the updated image matrix data is regenerated, and the sharpened image is obtained.

[0103] This process is achieved through mathematical formulas and image processing techniques, and the gray value of each pixel point in the image is updated step by step, and the updated image matrix data is regenerated. These steps are the core of image sharpening, and this method can significantly improve the visual clarity of the image. The process of obtaining a sharpened image not only improves the detail contrast of the image, but also enhances the overall visual effect, making the image visually closer to the natural state observed by the human eye.

[0104] Please refer to Figure 5 , the specific steps of S4 are:

[0105] S401: Based on the sharpened image, extract each pixel point and its neighborhood pixel value, obtain the horizontal gray level gradient value through difference operation, obtain the vertical gray level gradient value through vertical difference operation, establish the gradient amplitude data matrix by synthesizing the horizontal and vertical gradient values, and generate the gradient amplitude graph;

[0106] This process involves spatial filter design in image processing techniques, obtaining the horizontal gray level gradient value through difference operation, this calculation method uses the difference between pixel values to evaluate the spatial changes in the image, obtaining the vertical gray level gradient value through vertical difference operation, synthesizing the horizontal and vertical gradient values to establish the gradient amplitude data matrix, which describes the edge strength of each point in the image in horizontal and vertical directions, the step of generating the gradient amplitude graph is critical because it determines the visualization effect of the edges in the image, which is very important for subsequent image analysis and processing.

[0107] S402: Based on the gradient amplitude graph, for the gradient amplitude value of each pixel point, filter the effective edge points by comparing it with the set upper and lower threshold values, correct the positioning by analyzing the edge point connection relationship based on the gradient direction, integrate the effective edge points to establish the edge distribution data, and obtain the edge positioning graph;

[0108] Based on the gradient amplitude graph, for the gradient amplitude value of each pixel point, threshold filtering is performed according to the formula . In the formula, represents the gradient amplitude value, and represent the set upper and lower threshold values. Set the gradient amplitude value , the upper threshold value , and the lower threshold value , calculate :

[0109] ;

[0110] The results show that when the gradient amplitude value is within the set threshold range, the pixel point is considered as an effective edge point, this process helps to reduce the influence of noise and improve the accuracy of edge detection.

[0111] S403: Based on the edge positioning graph, for the gradient direction and gradient amplitude value of the edge point, non-maximum points are analyzed and zero processed through the gradient direction, boundary filtering is performed by setting double threshold values and constructing edge regions, and accurate edge images are obtained through pixel-by-pixel correction;

[0112] By setting double threshold screening boundary and constructing edge region, this process utilizes the direction information of gradient to ensure the continuity and directionality of edge, and through pixel-by-pixel correction, the precision and clarity of edge can be significantly improved, and the process of obtaining accurate edge image not only enhances the visual effect of image, but also provides important edge information for further analysis of image.

[0113] Please refer to Figure 6 , the specific steps of S5 are:

[0114] S501: Based on the accurate edge image, for all pixel points and neighborhoods in the image, the data distribution is established by counting the co-occurrence frequency of pixel gray value and neighborhood gray value, the spatial correlation between pixel gray values is constructed by matrix, and a two-dimensional gray matrix data is generated, and a gray co-occurrence matrix is generated;

[0115] This process involves pixel correlation analysis in image processing technology, and the data distribution is established by counting the co-occurrence frequency of pixel gray value and neighborhood gray value. This statistical method reveals the spatial relationship between pixels, and the spatial correlation between pixel gray values is constructed by matrix, and a two-dimensional gray matrix data is generated. This process not only considers the gray value of the pixel, but also considers the position relationship between the pixels. The step of generating the gray co-occurrence matrix is key, because it provides basic data for texture analysis of image, and these data have important application value in image analysis and machine vision field.

[0116] S502: Based on the gray co-occurrence matrix, the distribution range of each group of data in the matrix is normalized, the contrast value of each gray combination is calculated, and the regional difference is evaluated, the gray distribution rule is judged by uniformity value, and the texture feature value matrix is obtained;

[0117] The specific formula of contrast value is:

[0118] ;

[0119] Among them, and represent the gray level, represent the normalized frequency value, represent the contrast value.

[0120] Then calculate In the process, suppose we have a simplified gray co-occurrence matrix from a local image region, the specific values are as follows:

[0121] ;

[0122] Among them, and respectively, representing the gray levels, taking values from 0 to 1. The normalization coefficient is calculated , which is the sum of all elements of the matrix:

[0123] ;

[0124] Then, the normalized co-occurrence matrix is calculated , in this case, since equals 1, and are the same. The next step is to calculate the contrast using the formula :

[0125] ;

[0126] ;

[0127] This calculation shows that the contrast value , which reflects the intensity of the gray level variation within the region. The higher the value, the more intense the gray level variation in the image region, which helps to distinguish the texture features of the image.

[0128] Parameter details: is the original frequency value in the position of the gray co-occurrence matrix, representing the probability of the gray level and appearing at the same time. is the normalization coefficient, which ensures that the sum of all normalized frequency values is 1, which is necessary for comparing gray co-occurrence matrices of different sizes or under different conditions. is the normalized frequency value, which is used for all further calculations, such as contrast, energy, homogeneity, and other texture descriptors. is the contrast value, which represents the degree of gray level variation within the image region. High contrast indicates that the texture of the image changes significantly, which helps to identify patterns or features.

[0129] This result shows that the contrast value provides a means of quantifying the clarity of image texture, which helps to understand the local variation of image content and can be used in image analysis, texture recognition, and further image processing tasks.

[0130] S503: Based on the texture feature value matrix, adjust the region boundary through morphological operation for the nodule region, remove isolated pixel regions through connectivity analysis, generate a unified data vector by optimizing the consistency of region shape and texture, and obtain the nodule feature vector;

[0131] The step of using morphological dilation and erosion techniques to refine and smooth the boundaries, and removing isolated pixel regions through connectivity analysis, is a post-processing stage in image processing, aiming to optimize the final visual effect of the image, and the process of generating a unified data vector by optimizing the shape of the region and the texture consistency to obtain the nodule feature vector involves advanced image analysis techniques that help improve the accuracy and reliability of image analysis, especially in the fields of medical image processing and biometric recognition.

[0132] Please refer to Figure 7 A thyroid nodule grading and recognition system comprises:

[0133] The Gaussian filtering module performs Gaussian filtering processing based on the ultrasound image, constructs a two-dimensional Gaussian kernel with the same size as the image, calculates the weight of each element in the kernel, and performs a weighted operation on the weight value according to the relative position and pixel value of each pixel and the neighborhood pixels to obtain a denoising image.

[0134] The brightness distribution analysis module performs brightness distribution analysis based on the denoising image, calculates the gray value distribution of the pixels in the local region, adjusts the histogram of the image according to the contrast change of each local region, and generates a contrast-enhanced image.

[0135] The sharpening processing module performs sharpening processing on the contrast-enhanced image through a Laplacian operator, calculates the second-order gradient value of each pixel point, combines the differentiated weighting coefficient, and strengthens the rapidly changing part of the image to obtain a sharpened image.

[0136] The edge detection module calculates the horizontal and vertical gradient values of each pixel based on the sharpened image, determines the preliminary edge position according to the gradient amplitude, screens the edge points through threshold judgment, uses the Canny algorithm to perform smoothing processing on the preliminary edge image, calculates the gradient amplitude and direction, and obtains an accurate edge image after double-threshold processing.

[0137] The feature extraction module calculates the gray level co-occurrence matrix based on the accurate edge image, analyzes the spatial relationship of the region pixel gray level in the image, extracts the texture features, optimizes the nodule region morphology through morphological operation, and obtains the nodule feature vector.

[0138] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for identifying thyroid nodule grading, characterized in that, The method comprises the following steps: S1: Gaussian filtering is performed based on an ultrasound image, a two-dimensional Gaussian kernel with the same size as the image is constructed, the weight of each element in the kernel is calculated, the weight value is weighted according to the relative position and pixel value of each pixel and the neighborhood pixel, each pixel value in the original image is updated through weighted average, and a denoising image is obtained; S2: brightness distribution analysis is performed based on the denoising image, the distribution of the gray value of the pixels in the local region is calculated, the histogram of the image is adjusted according to the contrast change of each local region, the brightness of the local region in the image is optimized, and a contrast-enhanced image is generated; S3: the contrast-enhanced image is sharpened through a Laplace operator, the second-order gradient value of each pixel point is calculated, the pixel value is updated by combining the differential weighted coefficient, the rapidly changing part in the image is strengthened, and a sharpened image is obtained; S4: based on the sharpened image, the horizontal and vertical gradient values of each pixel are calculated, the preliminary edge position is determined according to the gradient amplitude, the edge points are screened through threshold judgment, the preliminary edge image is smoothed using the Canny algorithm, the gradient amplitude and direction are calculated, the non-maximum suppression is performed, and after the double-threshold processing, an accurate edge image is obtained; S5: based on the accurate edge image, a gray level co-occurrence matrix is calculated, the spatial relationship of the regional pixel gray level in the image is analyzed, the texture feature is extracted, the morphology of the nodule region is optimized through morphological operation, and a nodule feature vector is obtained; The specific steps of S2 are: S201: based on the denoising image, a plurality of local regions are divided for the image, the gray values of all pixel points in the region are analyzed, the distribution histogram is generated by counting the frequency of the gray value, the gray distribution model is established by inducing the gray range of different regions, and the gray distribution data is generated; S202: based on the gray distribution data, the gray extreme difference in the region is calculated for the gray distribution range of each local region, the adjustment region is screened and adjusted by setting the contrast change threshold, the gray mapping relationship is established to optimize the local gray distribution, and the gray value is re-distributed to generate an optimized gray mapping; S203: based on the optimized gray mapping, the gray values of all pixel points in the local region of the denoising image are adjusted, the remapped gray value is calculated through the gray mapping model, the pixel value adjustment is completed by updating the image data matrix, and a contrast-enhanced image is obtained; The specific steps of S3 are: S301: based on the contrast-enhanced image, the neighborhood pixel value of each pixel point is extracted, the second-order gradient of the gray value change in the neighborhood of each pixel point is calculated, the gradient value of each pixel point is integrated through matrix operation, the gradient distribution data of the image is analyzed, and a gradient matrix is generated; S302: based on the gradient matrix, the gradient difference between the gradient value of each pixel point and the neighborhood gradient value is adjusted by setting the gradient difference range to adjust the weight coefficient, the weighted value is calculated by combining the gradient difference and the weight coefficient, and a weighted update matrix is obtained; S303: Based on the weighted update matrix, the superimposition result of the original pixel value and the weighted update value is calculated for all pixel points of the contrast enhancement image, the gray value of each pixel point in the image is updated gradually, the updated image matrix data is regenerated, and a sharpened image is obtained; The specific steps of S5 are: S501: Based on the accurate edge image, a data distribution is established by counting the co-occurrence frequency of pixel gray value and neighborhood gray value for all pixel points and neighborhoods in the image, a two-dimensional gray matrix data is generated by establishing a spatial correlation between pixel gray values through matrix construction, and a gray co-occurrence matrix is generated; S502: Based on the gray co-occurrence matrix, the distribution range of each group of data in the matrix is normalized, the contrast value of each gray combination is calculated, and the regional difference is evaluated, the gray distribution rule is judged by the uniformity value, and a texture feature value matrix is obtained; S503: Based on the texture feature value matrix, the region boundary is adjusted by morphological operation for the nodule region, the isolated pixel region is removed by connectivity analysis, and a unified data vector is generated by optimizing the region shape and texture consistency, and a nodule feature vector is obtained. 2.The thyroid nodule grading identification method of claim 1, characterized in that, The specific steps of the Gaussian filtering processing based on the ultrasound image are: S101: Based on the ultrasound image, a two-dimensional Gaussian kernel with the same size as the image is constructed, the weight of each element in the kernel is calculated, the weight value is weighted according to the relative position and pixel value of each pixel and its neighborhood, each pixel value in the original image is updated by weighted average, and a denoising image is obtained. S102: Based on the Gaussian kernel, the weight value of each element in the kernel is calculated, the position weight matrix is established by the distance between the pixel and the neighborhood position, the value weight matrix is established by the difference between the pixel and the neighborhood pixel value, and the position weight and the value weight are normalized to generate the weight matrix by matrix operation, and the weighted pixel mapping is obtained. S103: Based on the weighted pixel mapping, the product operation is performed on each pixel point in the image and the corresponding value of the weight matrix, the local weighting is completed by accumulating the product values of all neighborhood pixels, and the image pixel value is updated by normalizing the local weighting result and the weight sum, and a denoising image is obtained. 3.The thyroid nodule grading identification method of claim 1, characterized in that, The specific part of S2 is realized by , The gray scale contrast adjustment value in the representative area is calculated according to the following formula: ; wherein, represents a gray scale extremum difference, represents a maximum gray scale value within a region, represents a minimum gray scale value within a region, represents a gray scale contrast adjustment value within a region, represents a guard against zero small positive number. 4.The thyroid nodule grading identification method of claim 1, characterized in that, The specific steps of the sharpened image based on the sharpened image are: S401: Based on the sharpened image, the pixel point and its neighborhood pixel value are extracted, the horizontal gray gradient value is obtained by difference operation, the vertical gray gradient value is obtained by vertical difference operation, the gradient amplitude data matrix is established by synthesizing the horizontal and vertical gradient values, and a gradient amplitude graph is generated. S402: Based on the gradient amplitude map, for the gradient amplitude value of each pixel point, the effective edge point is screened by comparing it with the set upper and lower threshold values, the edge point connection relationship is analyzed based on the gradient direction for positioning correction, the effective edge point is integrated to establish the edge distribution data, and the edge positioning map is obtained; S403: Based on the edge positioning map, for the gradient direction and gradient amplitude value of the edge point, the non-maximum value point is analyzed and zero processed by the gradient direction, the boundary is screened and the edge region is constructed by setting the double threshold value, the accurate edge image is obtained by pixel-by-pixel correction. 5.The thyroid nodule grading identification method of claim 1, characterized in that, Based on the accurate edge image, the gray level co-occurrence matrix is calculated, the spatial relationship of the regional pixel gray level in the image is analyzed, the texture feature is extracted, and the specific steps of obtaining the nodule feature vector by optimizing the morphology of the nodule region through morphological operation are as follows: S501: Based on the accurate edge image, for all pixel points and neighborhoods in the image, the data distribution is established by counting the co-occurrence frequency of pixel gray value and neighborhood gray value, the spatial correlation between pixel gray levels is generated by matrix construction to generate two-dimensional gray matrix data, and the gray level co-occurrence matrix is generated; S502: Based on the gray level co-occurrence matrix, the distribution range of each group of data in the matrix is normalized, the contrast value of each gray combination is calculated, and the regional difference is evaluated, the gray distribution rule is judged by the uniformity value, and the texture feature value matrix is obtained; S503: Based on the texture feature value matrix, the region boundary is adjusted by morphological operation for the nodule region, the isolated pixel region is removed by connectivity analysis, and the unified data vector is generated by optimizing the region shape and texture consistency to obtain the nodule feature vector. 6.The thyroid nodule grading identification method according to claim 5, characterized in that, The contrast value calculation formula is specifically: ; wherein, and represents a gray scale, represents a normalized frequency value, represents a contrast value.

7. A thyroid nodule grading identification system, characterized by, A thyroid nodule grading recognition method for realizing any one of claims 1-6, the system comprises: A Gaussian filtering module performs Gaussian filtering processing based on an ultrasound image, constructs a two-dimensional Gaussian kernel with the same size as the image, calculates the weight of each element in the kernel, and obtains a denoising image by weighting operation according to the relative position and pixel value of each pixel and the neighborhood pixel. A brightness distribution analysis module performs brightness distribution analysis based on the denoising image, calculates the gray value distribution of pixels in a local region, adjusts the histogram of the image according to the contrast change of each local region, and generates a contrast enhanced image; A sharpening processing module performs sharpening processing on the contrast enhanced image by Laplace operator, calculates the second order gradient value of each pixel point, and strengthens the rapidly changing part of the image by combining the differential weighting coefficient to obtain a sharpening image; An edge detection module calculates the horizontal and vertical gradient values of each pixel based on the sharpening image, determines the preliminary edge position according to the gradient amplitude, screens the edge points by threshold judgment, uses Canny algorithm to smooth the preliminary edge image, calculates the gradient amplitude and direction, and obtains the accurate edge image after double threshold processing. The feature extraction module calculates a gray level co-occurrence matrix based on the accurate edge image, analyzes the spatial relationship of the pixel gray levels in the region of the image, extracts texture features, optimizes the morphology of the nodule region through morphological operation, and obtains a nodule feature vector.

Citation Information

Patent Citations

  • Thyroid ultrasound region feature analysis method, system and device based on echo intensity and texture information and medium

    CN117830656A

  • Image analysis method and system based on deep learning

    CN118429242A