A thyroid region segmentation method and system based on CT images
By establishing a sub-material database and using image preprocessing and segmentation technology, the accuracy of thyroid region segmentation is solved, and more accurate thyroid region segmentation and abnormal identification are achieved, providing quantitative data that facilitates diagnosis and treatment.
Patent Information
- Application Number
- CN202411345780.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-09-26
AI Technical Summary
The prior art is difficult to accurately segment the thyroid area, especially due to the different sizes, irregular shapes and variable lesions, resulting in poor segmentation effect.
By collecting thyroid CT images of different genders and ages, a sub-material database is established, information on gender, age, area and density is integrated, and pre-processing technologies such as image resampling, filters and histogram equalization are used, combining threshold segmentation and curves. The fitting method extracts the contour and shape characteristics of thyroid tissue and calculates outliers.
More accurate thyroid region segmentation is achieved, quantitative data is provided, which helps in the formulation of disease diagnosis and treatment plans, and improves data processing and abnormal identification capabilities for different populations.
Smart Images

Figure CN118864504B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical imaging technology, and in particular to a thyroid region segmentation method and system based on CT images. Background Art
[0002] Image processing technology is now widely used in many fields, including satellite imaging, marine science, and medical imaging. Image segmentation is to segment the object of interest from the image. It is one of the steps in image processing. Especially for medical images, image segmentation plays a vital role. Tumor segmentation technology based on thyroid CT images aims to improve the accuracy and efficiency of doctors' diagnosis of thyroid tumors, accurately segment the tumor area from thyroid CT images, and provide doctors with key information such as tumor size, number, and location, which helps doctors formulate specific treatment plans.
[0003] Thyroid tumor segmentation mainly involves accurately segmenting the area containing the thyroid tumor from the image and processing and analyzing the obtained data to provide a reliable basis for subsequent clinical treatment. In the existing thyroid segmentation, the thyroid is also considered to be the most difficult organ to accurately segment in the neck CT image. The main reason is that the thyroid is composed of soft tissue, and the size of the thyroid gland of different patients is affected by factors such as gender and age. The size of the thyroid gland is different for each person. At the same time, the shape of the tumor is irregular, the location of the lesion is variable, and the number is different. Therefore, the existing methods cannot meet the needs of accurate segmentation. Summary of the invention
[0004] The present invention aims at the technical problems existing in the prior art and provides a thyroid region segmentation method and system based on CT images.
[0005] The technical solution of the present invention to solve the above technical problem is as follows: a thyroid region segmentation method based on CT images, comprising the following steps:
[0006] S101. Database construction: Collect thyroid CT images containing information of different genders and ages, and establish different sub-material databases according to gender and age groups. In each sub-material database, integrate thyroid tissue information of different genders, ages, areas and densities;
[0007] S102, resampling the CT image data, applying a filter to reduce image noise, and enhancing image contrast through histogram equalization;
[0008] S103, segmenting the thyroid tissue in the CT image based on a threshold segmentation method to extract the contour of the thyroid tissue;
[0009] S104, performing curve fitting on the image file of the extracted thyroid tissue contour, calculating the shape characteristics of the thyroid tissue based on the result of the curve fitting, and calculating the abnormal value of the thyroid gland based on the shape characteristics.
[0010] In a preferred embodiment, in S101, gender and age are used as the basis for grouping, the granularity of grouping is determined, a sub-material database is created for each gender and age group combination, and the collected data is allocated to the corresponding sub-material database according to gender and age. The sub-material database includes three categories of thyroid CT image data: coronal plane, sagittal plane and cross-sectional plane. In each sub-material database, a table is created to record the gender, age, area and density information of each thyroid CT image.
[0011] In a preferred embodiment, in S102, image resampling is performed to ensure that all CT images have the same resolution and size, and the images are adjusted to the target resolution using a resampling method. When the resolution of the original image is ( ), and the target resolution is ( ), the resampled image size is:
[0012] ;
[0013] ;
[0014] ;
[0015] in, , , are the resampling factors along the x, y, and z axes respectively. Gaussian filters are applied to reduce image noise and improve image quality. The specific calculation formula is as follows:
[0016] ;
[0017] in, represents the Gaussian function, represents the standard deviation of the Gaussian function, represents normalization, ensuring that the integral value of the entire plane is 1. e is the base of the exponent, which is used to calculate the attenuation rate of the weight value. x and y represent the horizontal and vertical coordinate values of the pixel points in the image, respectively. The histogram of the image is calculated and converted into a uniform distribution to enhance the image contrast. The specific calculation formula is as follows:
[0018] ;
[0019] Among them, s represents the grayscale of the output image, represents the transformation function, r represents the gray level in the original image, Represents the probability density function of the gray level of the original image, Represents the integral variable, which traverses the value range of the grayscale of the original image. Based on the above steps, the quality of the CT image is improved to provide more accurate data for subsequent thyroid tissue segmentation and analysis.
[0020] In a preferred embodiment, in S103, the pixel intensity of the CT image is divided into two categories, foreground and background. By calculating the inter-class variance of the foreground and background under different thresholds, the threshold that maximizes the inter-class variance is selected as the optimal threshold. The specific calculation formula of the threshold method is as follows:
[0021] ;
[0022] Where T represents the threshold value, and denote the probabilities of foreground and background respectively, and is the average intensity of foreground and background, Represents the average intensity of the entire image. The threshold method is applied to the CT image to obtain a binary image, in which the thyroid tissue is the highlighted area. The contour of the thyroid tissue is extracted by selecting a seed point in the thyroid area as the starting point for growth. According to the similarity between the grayscale value of the neighboring pixels and the seed point, it is determined whether to add the neighboring pixels to the thyroid area. The grayscale value of the seed point is I(s), and the grayscale value of the neighboring pixels is I(p). The growth criterion can be expressed as:
[0023] ;
[0024] in, Represents the threshold, which is used to determine whether the neighborhood pixel is the grayscale difference standard of the thyroid region. When no new pixels are added to the thyroid region, the growth stops. The difference between the grayscale value of all neighborhood pixels and the grayscale value of the seed point does not meet the growth criterion. The opening operation is applied to remove the gaps in the thyroid region in the CT. The CT image is scanned using the structural element. Local neighborhood operations are performed on each pixel in the CT image. First, an erosion operation is performed to scan the image through the structural element. If the structural element and the image completely match, the pixel is retained. The specific calculation formula for erosion is as follows:
[0025] ;
[0026] Among them, A represents the original image, B represents the structural element, represents the corrosion operation, represents the translation of the structural element in the image, x represents the position of the pixel in the image, Represents the subset relationship, and performs a dilation operation on the eroded image to restore the foreground in the CT image. The specific calculation formula for the dilation is as follows:
[0027] ;
[0028] in, represents the intersection, Indicates that the structural element intersects with image A at least one pixel at position x. represents the expansion operation, It indicates that it is not equal to the empty set, that is, there is at least one common element. The CT image is opened to smooth the contour of the thyroid tissue in the CT image, eliminate small protrusions and depressions, and make the contour of the thyroid tissue smoother. The specific calculation formula of the opening operation is as follows:
[0029] ;
[0030] in, represents an opening operation, and according to the processed result, the contour of the thyroid tissue is extracted, and the extracted contour of the thyroid tissue is saved as an image file.
[0031] In a preferred embodiment, in S104, an edge detection algorithm is applied to perform a convolution operation with the image file to detect the edges of the thyroid tissue in the horizontal, vertical and diagonal directions in the image file. The specific calculation formula is as follows:
[0032] ;
[0033] in, and Respectively represent edge detection in the horizontal and vertical directions. For each pixel, its gradient amplitude and gradient direction are calculated. The specific calculation formula is as follows:
[0034] ;
[0035] Among them, G represents the gradient amplitude of each pixel in the image, which is obtained by and The gradient amplitude is calculated by the square root of the sum of the squares of the pixels. represents the direction of the gradient, represents the inverse tangent function, binarizes the extracted edge image, separates the edge from the non-edge area, extracts contour points from the edge image, and uses these contour points as input data for curve fitting. The contour point tracking starts from a known boundary point ( ) and the known boundary points ( ) as the starting point, and detect the right pixel of the known boundary point ( +1, ) is a boundary point, when ( +1, ) is not a boundary point, then check the next neighboring pixel in a counterclockwise direction until the next boundary point is found ( ), from the new boundary point ( ) and repeat the above process to continue looking for the next boundary point, and execute the loop until returning to the starting point. For a set of contour points ( ), an n-order polynomial fitting curve can be expressed as:
[0036] ;
[0037] Where n represents the degree of the polynomial, x represents the independent variable, represents the horizontal coordinate of the contour point, and y represents the vertical coordinate of the contour point. ( ) represents the horizontal and vertical coordinates of the i-th contour point, represents the coefficients of the polynomial, represents the constant term coefficient, represents the coefficient of the first-order term, It represents the power term of x that changes with the exponent k. The contour points are smoothed using Bezier curves. The contour of the thyroid tissue is segmented based on the smoothed contour points. The size, perimeter and area of the thyroid tissue are calculated based on the contour of the thyroid tissue. The specific calculation formula for the size of the thyroid tissue is as follows:
[0038] ;
[0039] in,( )and( ) represents two points on the contour, contour represents the set of contour points, (x y) represents the point on the contour, size represents the size of the thyroid tissue, and the specific calculation formula for the circumference of the thyroid tissue is as follows:
[0040] ;
[0041] in, represents the perimeter of the contour, N represents the total number of points on the contour, ( ) represents the i-th point on the contour, ( , ) represents the next adjacent point on the contour. The specific calculation formula for the thyroid tissue area is as follows:
[0042] ;
[0043] Among them, Area represents the area of thyroid tissue, and Region represents the pixel point set of thyroid tissue area. The key shape can be extracted from the CT image of thyroid tissue by calculating the size, perimeter and area, and the gender and age data in the sub-material database are obtained. In each sub-material database, linear regression is used to fit the relationship between thyroid size, density and age. ) represents the relationship between thyroid size, circumference, area and age, and calculates the standard value of thyroid size. The specific calculation formula is as follows:
[0044] ;
[0045] in, , , Respectively represent the relationship between male thyroid size, circumference and area and age, , Respectively represent the relationship between the size, circumference and area of the female thyroid gland and age. Indicates gender. The actual size, circumference and area of the thyroid contour calculated by extracting the thyroid contour from the CT image are used to measure the deviation of the patient's thyroid size, circumference and area from the expected value. The specific calculation formula for the comprehensive abnormal value is as follows:
[0046] ;
[0047] in, , , They represent the actual measured size, area and circumference of the thyroid gland, , , Represent the standard values according to age and gender, respectively. , , They represent the standard deviation of the corresponding parameters respectively. When the absolute value of the comprehensive abnormal value Z is greater than 2, it indicates that the patient's thyroid size, circumference and area deviate from the normal range and are abnormal.
[0048] The present invention also provides a thyroid region segmentation system based on CT images, comprising:
[0049] Database construction module: collect thyroid CT images containing information of different genders and ages, and establish different sub-material databases according to gender and age groups. In each sub-material database, integrate thyroid tissue information of different genders, ages, areas and densities;
[0050] Image preprocessing module: resamples CT image data, applies filters to reduce image noise, and enhances image contrast through histogram equalization;
[0051] Contour extraction module: based on the threshold segmentation method, the thyroid tissue in the CT image is segmented to extract the contour of the thyroid tissue;
[0052] Feature extraction module: Perform curve fitting on the image file of the extracted thyroid tissue contour, calculate the shape characteristics of the thyroid tissue based on the curve fitting results, and calculate the abnormal value of the thyroid based on the shape characteristics.
[0053] The beneficial effects of the present invention are as follows: the present invention can calculate the area, perimeter and other collective parameters of the thyroid region, provide doctors with more quantitative data, and help in the diagnosis of diseases and the formulation of treatment plans. Curve fitting and other image processing techniques can help doctors more intuitively understand the size and shape of the thyroid gland, as well as its relationship with surrounding structures. It can be used to track the patient's thyroid condition for a long time, help doctors evaluate the progression of the disease or the effect of treatment, and establish a sub-material database according to gender and age groups, taking into account the possible differences in thyroid physiological characteristics and pathological manifestations among different genders and age groups. This makes the system more targeted when processing data from different populations, can better adapt to the characteristics of different groups, improve the accuracy of segmentation and analysis, integrate thyroid tissue information of different sizes and densities, cover various possible thyroid morphologies and pathological changes, and improve the ability to identify various abnormal conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 is a flow chart of the method of the present invention;
[0055] Figure 2 It is a system block diagram of the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0057] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "plurality" means two or more, unless otherwise clearly and specifically defined.
[0058] In the description of the present application, the term "for example" is used to mean "used as an example, illustration or description". Any embodiment described as "for example" in the present application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid unnecessary details to obscure the description of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.
[0059] like Figure 1 This embodiment provides: a thyroid region segmentation method based on CT images, specifically comprising the following steps:
[0060] S101. Database construction: Collect thyroid CT images containing information of different genders and ages, and establish different sub-material databases according to gender and age groups. In each sub-material database, integrate thyroid tissue information of different genders, ages, areas and densities;
[0061] S102, resampling the CT image data, applying a filter to reduce image noise, and enhancing image contrast through histogram equalization;
[0062] S103, segmenting the thyroid tissue in the CT image based on a threshold segmentation method to extract the contour of the thyroid tissue;
[0063] S104, performing curve fitting on the image file of the extracted thyroid tissue contour, calculating the shape characteristics of the thyroid tissue based on the result of the curve fitting, and calculating the abnormal value of the thyroid gland based on the shape characteristics.
[0064] S101. Database construction: Collect thyroid CT images containing information of different genders and ages, and establish different sub-material databases according to gender and age groups. In each sub-material database, integrate thyroid tissue information of different genders, ages, areas and densities;
[0065] Furthermore, gender and age are used as the basis for grouping, the granularity of the grouping is determined, and a sub-material database is created for each gender and age group combination. The collected data are allocated to the corresponding sub-material database according to gender and age. The sub-material database includes three categories of thyroid CT image data: coronal plane, sagittal plane, and cross-sectional plane. In each sub-material database, a table is created to record the gender, age, area, and density information of each thyroid CT image.
[0066] It should be noted that the grouping is based on gender and age. For example, male is less than 30 years old, female is 30-50 years old, and older than 50 years old.
[0067] S102, resampling the CT image data, applying a filter to reduce image noise, and enhancing image contrast through histogram equalization;
[0068] Furthermore, image resampling is performed to ensure that all CT images have the same resolution and size. The resampling method is used to adjust the image to the target resolution. When the resolution of the original image is ( ), and the target resolution is ( ), the resampled image size is:
[0069] ;
[0070] ;
[0071] ;
[0072] in, , , are the resampling factors along the x, y, and z axes respectively. Gaussian filters are applied to reduce image noise and improve image quality. The specific calculation formula is as follows:
[0073] ;
[0074] in, represents the Gaussian function, represents the standard deviation of the Gaussian function, represents normalization, ensuring that the integral value of the entire plane is 1. e is the base of the exponent, which is used to calculate the attenuation rate of the weight value. x and y represent the horizontal and vertical coordinate values of the pixel points in the image, respectively. The histogram of the image is calculated and converted into a uniform distribution to enhance the image contrast. The specific calculation formula is as follows:
[0075] ;
[0076] Among them, s represents the grayscale of the output image, represents the transformation function, r represents the gray level in the original image, Represents the probability density function of the gray level of the original image, Represents the integral variable, which traverses the value range of the grayscale of the original image. Based on the above steps, the quality of the CT image is improved to provide more accurate data for subsequent thyroid tissue segmentation and analysis.
[0077] It should be noted that image resampling can adjust the resolution and pixel spacing of the image to make it more in line with the processing requirements of the system and the input standards of the model, avoiding errors caused by inconsistent image resolution or unreasonable pixel spacing.
[0078] Filters can reduce image noise and remove interfering information in the image, making the edges and details of the thyroid tissue clearer, which is helpful for subsequent segmentation and feature extraction. For example, random noise caused by equipment or environmental factors can be removed to improve the signal-to-noise ratio of the image.
[0079] Histogram equalization can enhance the image contrast, making the difference between thyroid tissue and surrounding structures more obvious, highlighting the characteristics of the thyroid region, and facilitating more accurate segmentation and identification. For example, after processing an image with low contrast, the boundary of thyroid tissue can be more easily distinguished.
[0080] S103, segmenting the thyroid tissue in the CT image based on a threshold segmentation method to extract the contour of the thyroid tissue;
[0081] Furthermore, the pixel intensity of the CT image is divided into two categories, foreground and background. By calculating the inter-class variance of the foreground and background under different thresholds, the threshold with the largest inter-class variance is selected as the optimal threshold. The specific calculation formula of the threshold method is as follows:
[0082] ;
[0083] Where T represents the threshold value, and denote the probabilities of foreground and background respectively, and is the average intensity of foreground and background, Represents the average intensity of the entire image. The threshold method is applied to the CT image to obtain a binary image, in which the thyroid tissue is the highlighted area. The contour of the thyroid tissue is extracted by selecting a seed point in the thyroid area as the starting point for growth. According to the similarity between the grayscale value of the neighboring pixels and the seed point, it is determined whether to add the neighboring pixels to the thyroid area. The grayscale value of the seed point is I(s), and the grayscale value of the neighboring pixels is I(p). The growth criterion can be expressed as:
[0084] ;
[0085] in, Represents the threshold, which is used to determine whether the neighborhood pixel is the grayscale difference standard of the thyroid region. When no new pixels are added to the thyroid region, the growth stops. The difference between the grayscale value of all neighborhood pixels and the grayscale value of the seed point does not meet the growth criterion. The opening operation is applied to remove the small gaps in the thyroid region in the CT. The CT image is scanned using the structural element. The local neighborhood operation is performed on each pixel in the CT image. The corrosion operation is first performed to scan the image through the structural element. If the structural element and the image are completely matched, the pixel is retained. The specific calculation formula for corrosion is as follows:
[0086] ;
[0087] Among them, A represents the original image, B represents the structural element, represents the corrosion operation, represents the translation of the structural element in the image, x represents the position of the pixel in the image, Represents the subset relationship, and performs a dilation operation on the eroded image to restore the foreground in the CT image. The specific calculation formula for the dilation is as follows:
[0088] ;
[0089] in, represents the intersection, Indicates that the structural element intersects with image A at least one pixel at position x. represents the expansion operation, It indicates that it is not equal to the empty set, that is, there is at least one common element. The CT image is opened to smooth the contour of the thyroid tissue in the CT image, eliminate small protrusions and depressions, and make the contour of the thyroid tissue smoother. The specific calculation formula of the opening operation is as follows:
[0090] ;
[0091] in, represents an opening operation, and according to the processed result, the contour of the thyroid tissue is extracted, and the extracted contour of the thyroid tissue is saved as an image file.
[0092] It should be noted that the thyroid tissue segmentation based on the threshold segmentation method is simple in principle and highly efficient in calculation, and can quickly separate the thyroid tissue from the background. For an organ such as the thyroid gland that has a relatively obvious density difference, threshold segmentation can usually achieve good results and accurately extract the contour of the thyroid gland.
[0093] For example, by setting an appropriate density threshold, thyroid tissue can be distinguished from surrounding tissues such as muscle and blood vessels, providing accurate boundary information for subsequent feature extraction and analysis.
[0094] S104, performing curve fitting on the image file of the extracted thyroid tissue contour, calculating the shape characteristics of the thyroid tissue based on the result of the curve fitting, and calculating the abnormal value of the thyroid gland based on the shape characteristics;
[0095] Furthermore, an edge detection algorithm is applied to perform convolution operation with the image file to detect the horizontal, vertical and diagonal edges of the thyroid tissue in the image file. The specific calculation formula is as follows:
[0096] ;
[0097] in, and Respectively represent edge detection in the horizontal and vertical directions. For each pixel, its gradient amplitude and gradient direction are calculated. The specific calculation formula is as follows:
[0098] ;
[0099] Among them, G represents the gradient amplitude of each pixel in the image, which is obtained by and The gradient amplitude is calculated by the square root of the sum of the squares of the pixels. represents the direction of the gradient, represents the inverse tangent function, binarizes the extracted edge image, separates the edge from the non-edge area, extracts contour points from the edge image, and uses these contour points as input data for curve fitting. The contour point tracking starts from a known boundary point ( ) and the known boundary points ( ) as the starting point, and detect the right pixel of the known boundary point ( +1, ) is a boundary point, when ( +1, ) is not a boundary point, then check the next neighboring pixel in a counterclockwise direction until the next boundary point is found ( ), from the new boundary point ( ) and repeat the above process to continue looking for the next boundary point, and execute the loop until returning to the starting point. For a set of contour points ( ), an n-order polynomial fitting curve can be expressed as:
[0100] ;
[0101] Where n represents the degree of the polynomial. For example, when n=2, it represents a quadratic polynomial. x represents the independent variable, represents the horizontal coordinate of the contour point, and y represents the vertical coordinate of the contour point. ( ) represents the horizontal and vertical coordinates of the i-th contour point, represents the coefficients of the polynomial, represents the constant term coefficient, represents the coefficient of the first-order term, It represents the power term of x that changes with the exponent k. The contour points are smoothed using Bezier curves. The contour of the thyroid tissue is segmented based on the smoothed contour points. The size, perimeter and area of the thyroid tissue are calculated based on the contour of the thyroid tissue. The specific calculation formula for the size of the thyroid tissue is as follows:
[0102] ;
[0103] in,( , )and( , ) represents two points on the contour, contour represents the set of contour points, (x, y) represents a point on the contour, size represents the size of the thyroid tissue, and the specific calculation formula for the circumference of the thyroid tissue is as follows:
[0104] ;
[0105] in, represents the perimeter of the contour, N represents the total number of points on the contour, ( , ) represents the i-th point on the contour, ( , ) represents the next adjacent point on the contour. The specific calculation formula for the thyroid tissue area is as follows:
[0106] ;
[0107] Among them, Area represents the area of thyroid tissue, and Region represents the pixel point set of thyroid tissue area. The key shape can be extracted from the CT image of thyroid tissue by calculating the size, perimeter and area, and the gender and age data in the sub-material database are obtained. In each sub-material database, linear regression is used to fit the relationship between thyroid size, density and age. F(age, ) represents the relationship between thyroid size, circumference, area and age, and calculates the standard value of thyroid size. The specific calculation formula is as follows:
[0108] ;
[0109] in, , , Respectively represent the relationship between male thyroid size, circumference and area and age, , Respectively represent the relationship between the size, circumference and area of the female thyroid gland and age. Indicates gender. The actual size, circumference and area of the thyroid contour calculated by extracting the thyroid contour from the CT image are used to measure the deviation of the patient's thyroid size, circumference and area from the expected value. The specific calculation formula for the comprehensive abnormal value is as follows:
[0110] ;
[0111] in, , , They represent the actual measured size, area and circumference of the thyroid gland, , , Represent the standard values according to age and gender, respectively. , , They represent the standard deviation of the corresponding parameters respectively. When the absolute value of the comprehensive abnormal value Z is greater than 2, it indicates that the patient's thyroid size, circumference and area deviate from the normal range and are abnormal.
[0112] It should be noted that the size of the thyroid gland usually refers to the overall size of the thyroid gland, which can be described using multiple dimensions such as length, width, and thickness, measuring the size of the thyroid gland from an overall perspective. The area of the thyroid gland is obtained by calculating the coverage on the thyroid plane, quantifying the size of the space occupied by the thyroid gland from a planar perspective.
[0113] It should be noted that for a pixel point (x, y) in a CT image, the coordinates of its eight neighboring pixels are as follows:
[0114] (x-1,y-1),(x,y-1),(x+1,y-1),(x-1,y),(x+1,y),(x-1,y+1),(x,y+1),(x+1,y+1),the shape characteristics of thyroid tissue are calculated by curve fitting, which can accurately quantify the morphology of the thyroid gland. Shape characteristics are an important basis for the diagnosis and analysis of thyroid lesions. For example, the irregular shape of thyroid nodules and the morphological changes of goiter can be reflected by these characteristics.
[0115] Example 2
[0116] This embodiment also provides a thyroid region segmentation system based on CT images, including:
[0117] Database construction module: collect thyroid CT images containing information of different genders and ages, and establish different sub-material databases according to gender and age groups. In each sub-material database, integrate thyroid tissue information of different genders, ages, areas and densities;
[0118] Image preprocessing module: resamples CT image data, applies filters to reduce image noise, and enhances image contrast through histogram equalization;
[0119] Contour extraction module: based on the threshold segmentation method, the thyroid tissue in the CT image is segmented to extract the contour of the thyroid tissue;
[0120] Feature extraction module: Perform curve fitting on the image file of the extracted thyroid tissue contour, calculate the shape characteristics of the thyroid tissue based on the curve fitting results, and calculate the abnormal value of the thyroid based on the shape characteristics.
[0121] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0122] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0123] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0124] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0125] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0126] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0127] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A thyroid region segmentation method based on CT images, characterized in that: The following steps are involved: S101. Database construction: Collect thyroid CT images containing information of different genders and ages, and establish different sub-material databases according to gender and age groups. In each sub-material database, integrate thyroid tissue information of different genders, ages, areas and densities; S102, resampling the CT image data, applying a filter to reduce image noise, and enhancing image contrast through histogram equalization; S103, segmenting the thyroid tissue in the CT image based on a threshold segmentation method to extract the contour of the thyroid tissue; S104, performing curve fitting on the image file of the extracted thyroid tissue contour, calculating the shape characteristics of the thyroid tissue according to the result of the curve fitting, and calculating the abnormal value of the thyroid gland according to the shape characteristics; The extraction of the thyroid tissue is performed by selecting a seed point in the thyroid region as the starting point of growth, and judging whether to add the neighboring pixels to the thyroid region according to the similarity between the grayscale value of the neighboring pixels and the seed point. The grayscale value of the seed point is I(s), and the grayscale value of the neighboring pixels is I(p). The growth criterion is expressed as: ; in, Represents the threshold, which is used to determine whether the neighborhood pixel is the grayscale difference standard of the thyroid region. When no new pixels are added to the thyroid region, the growth stops. The difference between the grayscale value of all neighborhood pixels and the grayscale value of the seed point does not meet the growth criterion. The opening operation is applied to remove the gaps in the thyroid region in the CT. The CT image is scanned using the structural element. Local neighborhood operations are performed on each pixel in the CT image. First, an erosion operation is performed to scan the image through the structural element. If the structural element and the image completely match, the pixel is retained. The specific calculation formula for erosion is as follows: ; Among them, A represents the original image, B represents the structural element, represents the corrosion operation, represents the translation of the structural element in the image, x represents the position of the pixel in the image, Represents the subset relationship, and performs a dilation operation on the eroded image to restore the foreground in the CT image. The specific calculation formula for the dilation is as follows: ; in, represents the intersection, Indicates that the structural element intersects with image A at least one pixel at position x. represents the expansion operation, It indicates that it is not equal to the empty set, that is, there is at least one common element. The CT image is opened to smooth the contour of the thyroid tissue in the CT image, eliminate small protrusions and depressions, and make the contour of the thyroid tissue smoother. The specific calculation formula of the opening operation is as follows: ; in, represents an open operation, and according to the processed result, the contour of the thyroid tissue is extracted, and the extracted contour of the thyroid tissue is saved as an image file; The specific calculation formula of the thyroid tissue size is as follows: ; in,( , )and( , ) represents two points on the contour, contour represents the set of contour points, (x, y) represents a point on the contour, size represents the size of the thyroid tissue, and the specific calculation formula for the circumference of the thyroid tissue is as follows: ; in, represents the perimeter of the contour, N represents the total number of points on the contour, ( , ) represents the i-th point on the contour, ( , ) represents the next adjacent point on the contour. The specific calculation formula for the thyroid tissue area is as follows: ; Among them, Area represents the area of thyroid tissue, and Region represents the pixel point set of thyroid tissue area. The key shapes are extracted from the CT image of thyroid tissue by calculating the size, perimeter and area, and the gender and age data in the sub-material database are obtained. In each sub-material database, linear regression is used to fit the relationship between thyroid size, density and age. F(age, ) represents the relationship between thyroid size, circumference, area and age, and calculates the standard value of thyroid size. The specific calculation formula is as follows: ; in, , , Respectively represent the relationship between male thyroid size, circumference and area and age, , , Respectively represent the relationship between the size, circumference and area of the female thyroid gland and age. Indicates gender. The actual size, circumference and area of the thyroid contour calculated by extracting the thyroid contour from the CT image are used to measure the deviation of the patient's thyroid size, circumference and area from the expected value. The specific calculation formula for the comprehensive abnormal value is as follows: ; in, , , They represent the actual measured size, area and circumference of the thyroid gland, , , They represent the standard values of thyroid size, area and circumference according to age and gender, respectively. , , They represent the standard deviation of the corresponding parameters respectively. When the absolute value of the comprehensive abnormal value Z is greater than 2, it indicates that the patient's thyroid size, circumference and area deviate from the normal range and are abnormal.
2. The thyroid region segmentation method based on CT images according to claim 1, characterized in that: In S101, gender and age are used as the basis for grouping, the granularity of grouping is determined, a sub-material database is created for each gender and age group combination, and the collected data is allocated to the corresponding sub-material database according to gender and age. The sub-material database includes three categories of thyroid CT image data: coronal plane, sagittal plane and cross-sectional plane. In each sub-material database, a table is created to record the gender, age, area and density information of each thyroid CT image.
3. The thyroid region segmentation method based on CT images according to claim 1, characterized in that: In S102, image resampling is performed to ensure that all CT images have the same resolution and size, and the images are adjusted to the target resolution using a resampling method. When the resolution of the original image is ( ), and the target resolution is ( ), the resampled image size is: ; ; ; in, , , are the resampling factors along the x, y, and z axes respectively. Gaussian filters are applied to reduce image noise and improve image quality. The specific calculation formula is as follows: ; in, represents the Gaussian function, represents the standard deviation of the Gaussian function, represents normalization, ensuring that the integral value of the entire plane is 1. e is the base of the exponent, which is used to calculate the attenuation rate of the weight value. x and y represent the horizontal and vertical coordinate values of the pixel points in the image, respectively. The histogram of the image is calculated and converted into a uniform distribution to enhance the image contrast. The specific calculation formula is as follows: ; Among them, s represents the grayscale of the output image, represents the transformation function, r represents the gray level in the original image, Represents the probability density function of the gray level of the original image, Represents the integral variable, which traverses the value range of the grayscale of the original image. Based on the above steps, the quality of the CT image is improved to provide more accurate data for subsequent thyroid tissue segmentation and analysis.
4. The thyroid region segmentation method based on CT images according to claim 1, characterized in that: In S103, the pixel intensity of the CT image is divided into two categories, foreground and background. By calculating the inter-class variance of the foreground and background under different thresholds, the threshold with the largest inter-class variance is selected as the optimal threshold. The specific calculation formula is as follows: ; Where T represents the threshold value, and denote the probabilities of foreground and background respectively, and is the average intensity of foreground and background, Represents the average intensity of the entire image. The threshold method is applied to the CT image to obtain a binary image in which the thyroid tissue is the highlighted area.
5. The thyroid region segmentation method based on CT images according to claim 1, characterized in that: In S104, an edge detection algorithm is applied to perform a convolution operation with the image file to detect the edges of the thyroid tissue in the horizontal, vertical and diagonal directions in the image file. The specific calculation formula is as follows: ; in, and Respectively represent edge detection in the horizontal and vertical directions. For each pixel, its gradient amplitude and gradient direction are calculated. The specific calculation formula is as follows: ; Among them, G represents the gradient amplitude of each pixel in the image, which is obtained by and The gradient amplitude is calculated by the square root of the sum of the squares of the pixels. represents the direction of the gradient, represents the inverse tangent function, binarizes the extracted edge image, separates the edge from the non-edge area, extracts contour points through the edge image, and uses these contour points as input data for curve fitting.
6. The thyroid region segmentation method based on CT images according to claim 5, characterized in that: The contour points are tracked from a known boundary point ( ) and the known boundary points ( ) as the starting point, and detect the right pixel of the known boundary point ( +1, ) is a boundary point, when ( +1, ) is not a boundary point, then check the next neighboring pixel in a counterclockwise direction until the next boundary point is found ( ), from the new boundary point ( ) and repeat the above process to continue looking for the next boundary point, and execute the loop until returning to the starting point. For a set of contour points ( ), an n-order polynomial fitting curve is expressed as: ; Where n represents the degree of the polynomial, x represents the independent variable, represents the horizontal coordinate of the contour point, and y represents the vertical coordinate of the contour point. ( ) represents the horizontal and vertical coordinates of the i-th contour point, represents the coefficients of the polynomial, represents the constant term coefficient, represents the coefficient of the first-order term, The power term of x that changes with the exponent k is represented. The contour points are smoothed using a Bezier curve. The contour of the thyroid tissue is segmented based on the smoothed contour points. The size, perimeter, and area of the thyroid tissue are calculated based on the contour of the thyroid tissue.
7. A thyroid region segmentation system based on CT images for implementing the method according to any one of claims 1 to 6, characterized in that: include: Database construction module: collect thyroid CT images containing information of different genders and ages, and establish different sub-material databases according to gender and age groups. In each sub-material database, integrate thyroid tissue information of different genders, ages, areas and densities; Image preprocessing module: resamples CT image data, applies filters to reduce image noise, and enhances image contrast through histogram equalization; Contour extraction module: based on the threshold segmentation method, the thyroid tissue in the CT image is segmented to extract the contour of the thyroid tissue; Feature extraction module: Perform curve fitting on the image file of the extracted thyroid tissue contour, calculate the shape characteristics of the thyroid tissue based on the curve fitting results, and calculate the abnormal value of the thyroid based on the shape characteristics.
Citation Information
Patent Citations
Breast neoplasms ultrasonic image segmentation method based on improved level set algorithm
CN104599270A
Thyroid gland regional automatic segmentation method based on CT image
CN109350089A