A liver CT image classification method based on dataset
By constructing liver CT image datasets and using HVNLTP feature extraction methods, combined with block statistical histogram and support vector machines for classification and identification, solve the problem of low CT image classification rate in existing technology, and achieve higher liver CT Accuracy of image classification.
Patent Information
- Application Number
- CN202111415491.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-25
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2041-11-25
AI Technical Summary
The existing liver CT image classification methods fail to effectively utilize the local change information of CT image pixels, resulting in a low rate of feature extraction and classification recognition, making it difficult to accurately diagnose liver disease in the early stage of the onset of the disease.
By constructing a liver CT image data set, the region of interest is extracted, CT values are calculated, and the HVNLTP feature extraction method is used, combined with block statistical histograms and support vector machines for classification and identification.
This method can highlight the differences between pixels in liver CT images, improve the classification and recognition rate, has high robustness, and can achieve higher accuracy in the diagnosis of early liver disease.
Smart Images

Figure CN114049345B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image processing, and in particular to a liver CT image classification method based on a data set. Background Art
[0002] Liver disease is a highly harmful disease that is difficult to detect. Since there is no obvious difference between the CT images of normal and abnormal liver function, it is difficult to diagnose in the early stages of the disease. Usually, clinically confirmed cases have developed to the middle and late stages, causing patients to miss the opportunity for treatment.
[0003] The current existing liver image processing technology applies texture classification to the classification of medical images. By analyzing the relationship between pixels in the image, the statistical characteristics and intensity differences of the texture features of the image are evaluated, and then the differences between normal and abnormal liver function CT images are analyzed. However, since the existing classification method does not consider the local change information of CT image pixels, its feature extraction and classification recognition rate are low. Summary of the invention
[0004] Purpose of the invention: In order to overcome the deficiencies in the prior art, the purpose of the present invention is to provide a liver CT image classification method based on a data set.
[0005] Technical solution: The liver CT image classification method based on a data set described in the present invention comprises the following steps:
[0006] (1) Construct a liver CT image dataset;
[0007] (2) Preprocess the liver CT images in the dataset to extract liver regions of interest that are of the same size and do not contain tumors and blood vessels;
[0008] (3) Calculate the CT value of the region of interest;
[0009] (4) Extract HVNLTP features from unknown liver CT images;
[0010] (5) Block statistical histogram;
[0011] (6) Use support vector machine for classification and recognition.
[0012] Furthermore, in step (1), the liver CT image dataset is constructed to divide the liver CT images into CT images with normal liver function and CT images with abnormal liver function.
[0013] Furthermore, in step (2), the specific steps of preprocessing the liver CT images in the data set are:
[0014] (2.1) Extract a ROI area of 38×38 pixels from a liver CT image of 512×512 pixels;
[0015] (2.2) During the selection process, 1) avoid the vascular area: the blood vessel is a highlight area in the CT image. If this area is selected, the subsequent classification and recognition will be inaccurate; 2) avoid the tumor area: the tumor cannot reflect the health of a person's liver. The tumor area where the lesions are concentrated cannot be used as an indicator to distinguish the liver grade.
[0016] Furthermore, in step (3), the step of calculating the CT value of the region of interest is:
[0017] CT value calculation formula:
[0018] CT = pixel * slope + intercept (1)
[0019] Among them, pixel represents the value of the pixel point, slope and intercept represent the intercept value of the coordinate (0028|1052) and the slope value of the coordinate (0028|1053) in the DICOM Tag information respectively;
[0020] Save the value in txt format and store it in the corresponding directory.
[0021] Furthermore, in step (4), the specific steps of extracting HVNLTP features from unknown liver CT images are:
[0022] (4.1) Given a central pixel value Ci located in a 3×3 square neighborhood, the neighboring pixel values in eight directions are A p The neighborhood difference of HVNLTP is the sum of the absolute values of the differences between the central pixel value and the pixel values in the eight adjacent directions and then the average; the calculation formula of the neighborhood difference is as follows:
[0023]
[0024] Among them, N i It represents the neighborhood difference of HVNLTP;
[0025] (4.2) For an N×N pixel area, the neighborhood difference is calculated for each 3×3 pixel area, and a neighborhood difference is obtained from the center pixel N. a The square area of (N-2)×(N-2) pixels is formed, and this area is recorded as N;
[0026] (4.3) Given a 3×3 pixel area, the central pixel value is recorded as H5, and the adjacent pixel values are recorded as [H1, H2, H3, H4, H6, H7, H8, H9] in horizontal coding mode; the calculation formula of the horizontal difference is as shown in formula (3):
[0027] I i,i=1:8 =H i+1 -H i (3);
[0028] Among them, I i It represents the level difference of HVNLTP;
[0029] (4.4), the calculation formula of horizontal coding is as follows:
[0030]
[0031] (4.5) For an N×N pixel area, each 3×3 pixel area is horizontally encoded and a pixel consisting of the central pixel H is obtained. a The square area of (N-2)×(N-2) pixels is formed, and this area is recorded as H;
[0032] (4.6) Given a 3×3 pixel area, the central pixel value is recorded as V5, and the adjacent pixel values are recorded as [V1, V2, V3, V4, V6, V7, V8, V9] in vertical coding mode. The vertical difference calculation formula is as follows:
[0033] J i,i=1:8 =V i+1 -V i (6);
[0034] Among them, J i It indicates the vertical difference of HVNLTP;
[0035] (4.7), the calculation formula of vertical coding is as follows:
[0036]
[0037] (4.8) For an N×N pixel area, each 3×3 pixel area is vertically encoded to obtain a central pixel V a The square area of (N-2)×(N-2) pixels is formed, and this area is recorded as V;
[0038] (4.9), cascade the pixels in the N, H and V regions to obtain the neighborhood horizontal and vertical three-value pattern, as shown in formula (9):
[0039] P HVNLTP =[Na H a V a ] (9);
[0040] (4.10), for the cascaded region P, the three-value pattern is further converted into two binary patterns, using the concept of local three-value pattern, as shown in formula (10):
[0041]
[0042] Among them, P i represents the center pixel, and t represents the threshold;
[0043] (4.11), HVNLTP is divided into HVNLTP_U and HVNLTP_L, as shown in equations (11)-(14):
[0044]
[0045] Furthermore, in step (5), the block statistical histogram is specifically:
[0046] (5.1) For each pixel in a given image, the two parts of HVNLTP_U and HVNLTP_L are calculated, and the histograms of the upper and lower parts are established, as shown in equations (15) and (17):
[0047]
[0048] Among them, the image size of HVNLTP_U is M*N;
[0049]
[0050] (5.2) After generating the histograms of the upper and lower three-value patterns, the two are cascaded to obtain the histogram of the entire image, as shown in formula (19):
[0051] h HVNLTP =h HVNLTP_U [U]+h HVNLTP_L [L] (19).
[0052] Furthermore, in step (6), the support vector machine classification is a supervised learning model; it builds a model based on training data, generates predicted target values, and then assigns the data to corresponding categories.
[0053] Beneficial effects: Compared with the prior art, the present invention has the following features: the present invention directly uses the CT image database to judge unknown liver function without physiological indicators; the method makes up for the defect that the difference between CT images of normal liver function and abnormal liver function is not obvious, highlights local texture information, and increases the difference between images; the method obtains more directional information and neighborhood change information, and has a certain robustness; compared with the traditional local three-value method, the proposed HVNLTP method has a higher classification recognition rate in the classification of liver function CT images. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is an operation flow chart of the present invention;
[0055] Figure 2 It is a map of the region of interest extracted in the present invention;
[0056] Figure 3 It is the CT value calculation diagram in the present invention;
[0057] Figure 4 It is the neighborhood difference calculation graph in the present invention;
[0058] Figure 5 It is the horizontal direction calculation diagram in the present invention;
[0059] Figure 6 It is the vertical direction calculation graph in the present invention;
[0060] Figure 7 It is a schematic diagram of the upper and lower parts of HVNLTP coding in the present invention;
[0061] Figure 8 It is a 5×5 scale neighborhood difference calculation graph in the present invention. DETAILED DESCRIPTION
[0062] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.
[0063] like Figure 1The method for classifying liver CT images based on a data set described in the present invention first divides liver CT images into CT images with normal liver function and CT images with abnormal liver function when constructing a data set; preprocesses the liver CT images in the data set to extract liver regions of interest of the same size and excluding tumors and blood vessels; and calculates the CT value of the region of interest. When classifying unknown liver CT images, first obtain the neighborhood difference, horizontal difference, and vertical difference of each 3×3 pixel area, and cascade these three sets of differences to obtain a neighborhood-horizontal-vertical three-value pattern (HVNLTP), and extract features from it. Then, the upper and lower part histograms of the HVNLTP three-value pattern are statistically divided into blocks, and finally, a support vector machine is used for classification and recognition; this method directly uses the CT image database to judge unknown liver function without physiological indicators, can highlight the differences between pixels of liver CT images, has a more comprehensive ability to express texture information, and can further improve the accuracy of liver CT image classification.
[0064] Specifically, the steps of the present invention are
[0065] S1. When constructing the data set, liver CT images are divided into CT images with normal liver function and CT images with abnormal liver function;
[0066] S2, reference Figure 2 ,The liver CT images in the data set are preprocessed to extract liver regions of interest that are of the same size and do not contain tumors and blood vessels; specifically,
[0067] S21, extracting a ROI region of 38×38 pixels from a liver CT image of 512×512 pixels;
[0068] S22. During the selection process, 1) avoid the blood vessel area: the blood vessel is a highlight area in the CT image. If this area is selected, the subsequent classification and recognition will be inaccurate.
[0069] 2) Avoid tumor areas: Tumors cannot reflect the health of a person’s liver, and the tumor area where the lesions are concentrated cannot be used as an indicator to distinguish the grade of the liver.
[0070] S3. Reference Figure 3 , calculate the CT value of the region of interest; specifically:
[0071] CT value calculation formula:
[0072] CT = pixel * slope + intercept (1)
[0073] Among them, pixel represents the value of the pixel point, slope and intercept represent the intercept value of the coordinate (0028|1052) and the slope value of the coordinate (0028|1053) in the DICOM Tag information respectively; save the value in txt format and store it in the corresponding directory.
[0074] S4. Reference Figure 4 , Figure 5 and Figure 6 , extract HVNLTP features from unknown liver CT images; specifically:
[0075] S401, given a central pixel value Ci located in a 3×3 square neighborhood, the neighboring pixel values in eight directions are A p The neighborhood difference of HVNLTP is the sum of the absolute values of the differences between the central pixel value and the pixel values in the eight adjacent directions and then the average; the calculation formula of the neighborhood difference is as follows:
[0076]
[0077] Among them, N i is the neighborhood difference of HVNLTP;
[0078] S402: For an N×N pixel area, calculate the neighborhood difference of each 3×3 pixel area to obtain a neighborhood difference of the center pixel N. a The square area of (N-2)×(N-2) pixels is formed, and this area is recorded as N;
[0079] S403, given a 3×3 pixel area, the central pixel value is recorded as H5, and the adjacent pixel values are recorded as [H1, H2, H3, H4, H6, H7, H8, H9] in a horizontal coding manner; the calculation formula of the horizontal difference is as shown in formula (3):
[0080] I i,i=1:8 =H i+1 -H i (3);
[0081] Among them, I i is the level difference of HVNLTP;
[0082] S404, the calculation formula of horizontal coding is as shown in formula (4)-(5):
[0083]
[0084] S405: For an N×N pixel region, each 3×3 pixel region performs horizontal coding calculation to obtain a pixel consisting of a central pixel H aThe square area of (N-2)×(N-2) pixels is formed, and this area is recorded as H;
[0085] S406, given a 3×3 pixel area, the central pixel value is recorded as V5, and the adjacent pixel values are recorded as [V1, V2, V3, V4, V6, V7, V8, V9] in a vertical coding manner. The vertical difference calculation formula is as shown in formula (6):
[0086] J i,i=1:8 =V i+1 -V i (6);
[0087] Among them, J i is the vertical difference of HVNLTP;
[0088] S407, the calculation formula of vertical coding is as shown in formula (7)-(8):
[0089]
[0090] S408: For an N×N pixel region, each 3×3 pixel region is subjected to vertical coding calculation to obtain a pixel V a The square area of (N-2)×(N-2) pixels is formed, and this area is recorded as V;
[0091] S409, cascade the pixels in the N, H and V regions to obtain a neighborhood horizontal vertical three-value pattern (HVNLTP), as shown in formula (9):
[0092] P HVNLTP =[N a H a V a ] (9);
[0093] S410, for the cascaded region P, the three-value pattern is further converted into two binary patterns, using the concept of local three-value pattern (LTP), as shown in formula (10):
[0094]
[0095] Among them, P i is the center pixel, t is the threshold;
[0096] S411. Reference Figure 7 , HVNLTP is divided into the upper part (HVNLTP_U) and the lower part (HVNLTP_L), as shown in equations (11)-(14):
[0097]
[0098] S5, block statistical histogram; specific steps:
[0099] S51. For each pixel in a given image, the two parts of HVNLTP_U and HVNLTP_L are calculated, and histograms of the upper and lower parts are established, as shown in equations (15) and (17):
[0100]
[0101] Among them, the image size of HVNLTP_U is M*N;
[0102]
[0103] S52, after generating the histograms of the upper and lower three-value patterns, the two are cascaded to obtain the histogram of the entire image, as shown in formula (19):
[0104] h HVNLTP =h HVNLTP_U [U]+h HVNLTP_L [L] (19).
[0105] S6. Use support vector machine classification and recognition; SVM is a supervised learning model. It builds a model based on training data, generates predicted target values, and then assigns data to corresponding categories.
[0106] In this embodiment, the experimental environment is Windows 10 operating system and MATLAB R2016a programming environment. The data set contains 1680 liver CT images, including 840 normal liver CT images and 840 abnormal liver CT images; the extracted region of interest is 38×38 pixels in size, 9×9 blocks are used, and the dimension reduction parameter is 1. The verification experiment uses a 10-fold cross-validation method: the data set is randomly divided into 10 groups, the recognition rate of each group is calculated after 10 experiments, and the average of the ten groups of recognition rates is used as the final recognition rate.
[0107] In this embodiment, the experimental results corresponding to different feature descriptors under different thresholds are compared in Table 1:
[0108] Table 1 Comparison of experimental results
[0109]
[0110] In Table 1, t represents the threshold value, and different threshold values will result in different classification recognition rates.
[0111] In Table 1, the first method: local directional mode, uses the edge response calculated based on eight directions of Frei–Chen mask and the second derivative Gaussian mask to encode image texture.
[0112] In Table 1, the second method: local three-value pattern, introduces a threshold t on the original LBP operator to perform three-value encoding on the image, which effectively improves the robustness to illumination and noise. The more uniform the image texture, the better the recognition ability.
[0113] Method I of the present invention: by extracting the change information of the central pixel neighborhood and cascading the pixel information in the horizontal and vertical directions, the classification of CT images with normal and abnormal liver function is achieved.
[0114] Method II of the present invention: Figure 8 ,Based on method Ⅰ, an improvement is made by using the 5×5 scale neighborhood change information to cascade the pixel information in the horizontal and vertical directions to achieve the classification of CT images with normal and abnormal liver function.
[0115] In this embodiment, the results show that the classification method based on liver CT images provided by the present invention has better performance, and the recognition rate achieved by this method is higher than that of several other methods, with the highest reaching 71.80%.
[0116] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. A liver CT image classification method based on a data set, characterized in that: The following steps are involved: (1) Construct a liver CT image dataset; (2) Preprocess the liver CT images in the dataset to extract liver regions of interest that are of the same size and do not contain tumors and blood vessels; (3) Calculate the CT value of the region of interest; (4) Extract HVNLTP features from unknown liver CT images; The specific steps are: (4.1) Given a central pixel value Ci located in a 3×3 square neighborhood, the neighboring pixel values in eight directions are A p The neighborhood difference of HVNLTP is the sum of the absolute values of the differences between the central pixel value and the pixel values in the eight adjacent directions and then the average; the calculation formula of the neighborhood difference is as follows: Among them, N i It represents the neighborhood difference of HVNLTP; (4.2) For an N×N pixel area, the neighborhood difference is calculated for each 3×3 pixel area, and a neighborhood difference is obtained from the center pixel N. a The square area of (N-2)×(N-2) pixels is formed, and this area is recorded as N; (4.3) Given a 3×3 pixel area, the central pixel value is recorded as H5, and the adjacent pixel values are recorded as [H1, H2, H3, H4, H6, H7, H8, H9] in horizontal coding mode; the calculation formula of the horizontal difference is as shown in formula (3): I i,i=1:8 =H i+1 -H i (3); Among them, I i It represents the level difference of HVNLTP; (4.4), the calculation formula of horizontal coding is as follows: (4.5) For an N×N pixel area, each 3×3 pixel area is horizontally encoded and a pixel consisting of the central pixel H is obtained. a The square area of (N-2)×(N-2) pixels is formed, and this area is recorded as H; (4.6) Given a 3×3 pixel area, the central pixel value is recorded as V5, and the adjacent pixel values are recorded as [V1, V2, V3, V4, V6, V7, V8, V9] in vertical coding mode. The vertical difference calculation formula is as follows: J i,i=1:8 =V i+1 -V i (6); Among them, J i It indicates the vertical difference of HVNLTP; (4.7), the calculation formula of vertical coding is as follows: (4.8) For an N×N pixel area, each 3×3 pixel area is vertically encoded to obtain a central pixel V a The square area of (N-2)×(N-2) pixels is formed, and this area is recorded as V; (4.9), cascade the pixels in the N, H and V regions to obtain the neighborhood horizontal and vertical three-value pattern, as shown in formula (9): P HVNLTP =[N a H a V a ] (9); (4.10), for the cascaded region P, the three-value pattern is further converted into two binary patterns, using the concept of local three-value pattern, as shown in formula (10): Among them, P i represents the center pixel, and t represents the threshold; (4.11), HVNLTP is divided into HVNLTP_U and HVNLTP_L, as shown in equations (11)-(14): (5) Block statistical histogram; the specific steps are: (5.1) For each pixel in a given image, the two parts of HVNLTP_U and HVNLTP_L are calculated, and the histograms of the upper and lower parts are established, as shown in equations (15) and (17): Among them, the image size of HVNLTP_U is M*N; (5.2) After generating the histograms of the upper and lower three-value patterns, the two are cascaded to obtain the histogram of the entire image, as shown in formula (19): h HVNLTP h HVNLTP_U [U]+h HVNLTP_L [L] (19); (6) Use support vector machine for classification and recognition.
2. The method for classifying liver CT images based on a data set according to claim 1, characterized in that: In step (1), a liver CT image dataset is constructed, and the liver CT images are divided into CT images with normal liver function and CT images with abnormal liver function.
3. The method for classifying liver CT images based on a data set according to claim 1, characterized in that: In step (2), the specific steps of preprocessing the liver CT images in the data set are: (2.1) Extract a ROI area of 38×38 pixels from a liver CT image of 512×512 pixels; (2.2) During the extraction process, 1) avoid the vascular area: the blood vessels are the highlighted areas in the CT images. If this area is selected, the subsequent classification and recognition will be inaccurate; 2) avoid the tumor area: the tumor cannot reflect the health of a person's liver. The tumor area where the lesions are concentrated cannot be used as an indicator to distinguish the liver grade.
4. The method for classifying liver CT images based on a data set according to claim 1, characterized in that: In step (3), the step of calculating the CT value of the region of interest is specifically: CT value calculation formula: CT = pixel * slope + intercept (1) Wherein, pixel represents the value of the pixel; slope and intercept represent the intercept value of the coordinate (0028|1052) and the slope value of the coordinate (0028|1053) in the DICOM Tag information respectively; Save the value in txt format and store it in the corresponding directory.
5. The method for classifying liver CT images based on a data set according to claim 1, characterized in that: In step (6), the support vector machine classification is a supervised learning model; It builds a model based on the training data, generates predicted target values, and then assigns the data to the corresponding categories.
Citation Information
Patent Citations
CT image liver segmentation method and system based on characteristic learning
CN105894517A
Liver tumor automatic accurate robust segmentation method in CT image
CN109753997A