Colon polyp identification and segmentation method and system based on digestive endoscopy

By using support vector classifiers and ellipse fitting algorithms in colon polyp image analysis, recognition and segmentation methods, the problems of slow processing speed and low recognition accuracy in the prior art are solved, and more accurate and efficient detection and segmentation of colon polyp are achieved.

CN120013854APending Publication Date: 2025-05-16YUEYANG INTEGRATED TRADITIONAL CHINESE & WESTERN MEDICINE HOSPITAL SHANGHAI UNIV OF CHINESE TRADITIONAL MEDICINE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411848837.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

The existing colon polyp image analysis, recognition and segmentation methods are slow to process and have low recognition accuracy. It is impossible to predict the re-lesion area between the time after detection and before the operation, which affects the doctor's judgment.

Method used

An image analysis, recognition and segmentation method based on the properties of colon polyps is adopted. The support vector machine classifier is used to classify candidate regions in the colonoscopy image. Combined with image preprocessing, candidate region extraction, feature extraction, candidate region classification and colon polyps segmentation steps, the ellipse fitting algorithm is used for precise segmentation.

Benefits of technology

It improves the detection accuracy and efficiency of colon polyps, can more accurately identify and locate colon polyps, avoid misjudgment, and provides more detailed colon polyps information, such as accurate contour, area, perimeter, etc.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120013854A_ABST
    Figure CN120013854A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data recognition, and particularly discloses a colon polyp recognition and segmentation method and system based on a digestive endoscope. The method comprises the steps of image preprocessing, candidate region extraction, feature extraction, candidate region classification and colon polyp segmentation. According to the method, the candidate areas in the colonoscope image are classified by using the support vector machine classifier, so that the detection accuracy and efficiency of the colon polyp are improved. Meanwhile, a morphological analysis method is adopted, more detailed colon polyp information including accurate contour, area, perimeter and the like can be obtained, and the accuracy of recognition and segmentation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data recognition, and more specifically, to a method for recognizing and segmenting colon polyps based on digestive endoscopy. Background Art

[0002] Colon polyps are a common benign colon lesion, but they may develop into colon cancer. At present, the commonly used method is colonoscopy, but this method has many limitations, such as cumbersome operation and strong invasiveness. In order to solve these problems, image analysis, recognition, and segmentation technologies are widely used in colon polyps. These technologies can extract the attribute characteristics of colon polyps from colonoscopy images, automatically identify and segment them, and thus achieve fast and accurate analysis. However, there are some problems with the existing colon polyp image analysis, recognition, and segmentation methods, such as slow processing speed and low recognition accuracy. In addition, since the lesion area varies in shape, size, and texture, it is impossible to predict the area of ​​re-lesion between detection and before surgery, which affects the doctor's judgment. In order to solve the above problems, a technical solution is now provided. Summary of the invention

[0003] In order to overcome the above-mentioned defects of the prior art, the present invention adopts an image analysis, recognition and segmentation method based on the attributes of colon polyps, and uses a support vector machine classifier to classify candidate areas in colonoscopy images, thereby improving the detection accuracy and efficiency of colon polyps to solve the problems raised in the above-mentioned background technology.

[0004] To achieve the above object, the present invention provides the following technical solutions:

[0005] The first aspect of the present application provides a method for recognizing and segmenting colon polyps based on digestive endoscopy, comprising the following steps:

[0006] Step 1: Image preprocessing: preprocessing the collected colonoscopy images, including image grayscale, image enhancement, and median filtering;

[0007] Step 2, candidate region extraction: using a region growing-based image segmentation algorithm to segment each region in the colonoscopy image and extract candidate regions;

[0008] Step 3, feature extraction: extracting shape, texture and color attribute features from the candidate area by performing feature extraction on the candidate area;

[0009] Step 4, candidate region classification: the region of the colon polyp is determined by inputting the features of the candidate region into a support vector machine classifier for classification;

[0010] Step 5: Colon polyp segmentation: Binarize the area identified as colon polyp to obtain the contour, area, and perimeter of the colon polyp. Use an ellipse fitting algorithm to segment the colon polyp, and adjust the ellipse parameters to accurately match the contour of the colon polyp.

[0011] As a further solution of the present invention, image preprocessing includes image graying, image enhancement and median filtering operations, and the specific process is as follows:

[0012] Step S1, image grayscale: convert the color image into a grayscale image by using the maximum value method, wherein the specific formula for grayscale is:

[0013] I g (x,y)=0.299I R (x,y)+0.587I C (x,y)+0.114I B (x,y);

[0014] Where: I(x,y) is the original input image, I g (x, y) is the grayscale image, I R (x,y),I C (x,y) and I B (x, y) are the red, green and blue channels of the input image respectively;

[0015] Step S2, median filtering operation: De-noising the grayscale image by median filtering. The median filtering formula is:

[0016] I d (x,y)=median{I g (x+i,y+j)},i,j∈[-n,n];

[0017] Where: I d (x, y) is the image after median filtering, I g (x+i, y+j) is the grayscale input image, and n is the radius of the median filter;

[0018] Step S3, image enhancement: the denoised grayscale image is enhanced by histogram equalization. The calculation formula of histogram equalization is:

[0019]

[0020] Where: I e (x, y) is the enhanced image, T(I d (x, y)) is the grayscale transformation function, L is the number of grayscale levels, M is the width of the image, N is the height of the image, h(I d(i,j)) is the grayscale value after equalization.

[0021] As a further solution of the present invention, by performing feature extraction on the candidate region, the specific steps of extracting shape, texture and color attribute features from the candidate region are:

[0022] Step Q1, color feature extraction: Color features include the mean and standard deviation of the three channels of red, green, and blue space. The specific formula is:

[0023]

[0024] Where: μ R , μ G , μ B are the mean values ​​of the red, green, and blue spaces of the i-th pixel, σ R , σ G , σ B are the standard deviations of the red, green, and blue spaces of the i-th pixel, R i , G i , B i are the red, green, and blue channel values ​​of the i-th pixel, respectively, and N is the total number of pixels;

[0025] Step Q2, shape feature extraction: Use the area and perimeter of the candidate region as shape features, expressed by the following formula:

[0026]

[0027] Where: S is the area of ​​the candidate region, C is the perimeter of the candidate region, d i is the distance from the i-th pixel to its surrounding pixels;

[0028] Step Q3, texture feature extraction: Calculate the texture features through the gray level co-occurrence matrix, including energy value, entropy and contrast, where the energy calculation formula is:

[0029]

[0030] Where: E n is the energy value, E t is entropy, C is contrast, N g is the gray level of the image p i,j is the probability that the pixel gray value is i and j.

[0031] As a further solution of the present invention, the features of the candidate regions are input into a support vector machine classifier for classification, wherein the support vector machine classifier uses a polynomial kernel function, and the calculation formula is as follows:

[0032]

[0033] Where: f(x) is the output result of the support vector machine classifier, α i is the Lagrange multiplier, y i is the category of the sample, K(x i ,x) is the kernel function and b is the bias term.

[0034] As a further solution of the present invention, the specific steps of colon polyp segmentation are:

[0035] Step W1, preliminarily screening the candidate colon polyp regions after the candidate regions are classified, and eliminating regions with irregular shapes;

[0036] Step W2, accurately segment the remaining candidate colon polyp regions and perform binarization on the pixel values ​​in the regions. The binarization formula is:

[0037]

[0038] Where: x and y are the horizontal and vertical positions of the pixel in the image, respectively; B(x, y) is the pixel value after binarization; I(x, y) is the pixel value in the original image; and T is the threshold value.

[0039] Step W3, performing morphological processing on the binarized image, including dilation, erosion, opening operation and closing operation;

[0040] Step W4, edge detection is performed on the binary image after morphological processing to obtain the outline of the colon polyp. The edge detection formula is:

[0041]

[0042] Where: G x and G y Respectively represent the gradient of the image in the x and y directions, G(x,y) represents the gradient strength of the image at (x,y);

[0043] Step W5, using contour information and contour compactness to perform region segmentation to obtain an accurate colon polyp region.

[0044] As a further solution of the present invention, the binarized image is subjected to morphological processing, including dilation, erosion, opening operation and closing operation, wherein the specific definitions of dilation and erosion are:

[0045]

[0046] Where: X is the result after dilation, Y is the result after corrosion, A is the image to be processed, B is the structural element, ⊙ is the dilation operation, For corrosion operation.

[0047] As a further solution of the present invention, the contour compactness of the colon polyp obtained after edge detection is calculated. The calculation formula of the colon polyp contour compactness is:

[0048]

[0049] Where: D is the compactness of the colon polyp contour, A is the pixel area of ​​the colon polyp, and P is the perimeter of the colon polyp contour.

[0050] As a further solution of the present invention, an ellipse fitting algorithm is used to segment colon polyps, wherein the ellipse parameters in the ellipse fitting algorithm include the center point coordinates, the major axis length, the minor axis length and the rotation angle, and the calculation formula of the ellipse parameters is:

[0051]

[0052]

[0053] Where: N is the total number of pixels, (x0, y0) is the coordinate of the center point, (x i ,y i ) is the coordinate of the ith pixel, a is the length of the major axis, b is the length of the minor axis, and θ is the rotation angle.

[0054] The second aspect of the present application provides a colon polyp recognition and segmentation system based on digestive endoscopy, which comprises:

[0055] An image preprocessing module is used to preprocess the collected colonoscopy images, including image grayscale, image enhancement and median filtering;

[0056] A candidate region extraction module is used to segment each region in the colonoscopy image using a region growing-based image segmentation algorithm to extract candidate regions;

[0057] A feature extraction module is used to extract shape, texture and color features from the candidate area by performing feature extraction on the candidate area;

[0058] A candidate region classification module, used for determining the region of colon polyps by inputting the features of the candidate region into a support vector machine classifier for classification;

[0059] The colon polyp segmentation module is used to perform binarization processing on the area determined to be a colon polyp to obtain the contour, area, and perimeter of the colon polyp. The colon polyp segmentation is performed using an ellipse fitting algorithm, and the contour of the colon polyp is accurately matched by adjusting the ellipse parameters. The colon polyp segmentation module is specifically used for:

[0060] Step W1, preliminarily screening the candidate colon polyp regions after the candidate regions are classified, and eliminating regions with irregular shapes;

[0061] Step W2, accurately segment the remaining candidate colon polyp regions and perform binarization on the pixel values ​​in the regions. The binarization formula is:

[0062]

[0063] Where: x and y are the horizontal and vertical positions of the pixel in the image, respectively; B(x, y) is the pixel value after binarization; I(x, y) is the pixel value in the original image; and T is the threshold value.

[0064] Step W3, performing morphological processing on the binarized image, including dilation, erosion, opening operation and closing operation;

[0065] Step W4, edge detection is performed on the binary image after morphological processing to obtain the outline of the colon polyp. The edge detection formula is:

[0066]

[0067] Where: G x and G y Respectively represent the gradient of the image in the x and y directions, G(x,y) represents the gradient strength of the image at (x,y);

[0068] Step W5, using contour information and contour compactness to perform region segmentation to obtain a colon polyp region; wherein, for the contour of the colon polyp obtained after edge detection, its contour compactness is calculated, and the calculation formula for the colon polyp contour compactness is:

[0069]

[0070] Where: D is the compactness of the colon polyp contour, A is the pixel area of ​​the colon polyp, and P is the perimeter of the colon polyp contour.

[0071] As a further solution of the present invention, the image preprocessing module includes an image grayscale module, an image enhancement module and a median filtering operation module;

[0072] The image grayscale module is used to convert the color image into a grayscale image by using the maximum value method. The specific formula for grayscale conversion is:

[0073] I g (x,y)=0.299I R (x,y)+0.587I C (x,y)+0.114I B (x,y);

[0074] Where: I(x,y) is the original input image, I g(x, y) is the grayscale image, I R (x,y),I C (x,y) and I B (x, y) are the red, green and blue channels of the input image respectively;

[0075] The median filter operation module is used to perform denoising on the grayscale image through median filtering. The median filter formula is:

[0076] I d (x,y)=median{I g (x+i,y+j)},i,j∈[-n,n];

[0077] Where: I d (x, y) is the image after median filtering, I g (x+i, y+j) is the grayscale input image, and n is the radius of the median filter;

[0078] The image enhancement module is used to enhance the denoised grayscale image through histogram equalization. The calculation formula of histogram equalization is:

[0079]

[0080] Where: I e (x, y) is the enhanced image, T(I d (x, y)) is the grayscale transformation function, L is the number of grayscale levels, M is the width of the image, N is the height of the image, h(I d (i,j)) is the grayscale value after equalization.

[0081] As a further solution of the present invention, the candidate region extraction module extracts features of the candidate region, and the specific steps of extracting shape, texture and color attribute features from the candidate region are as follows:

[0082] Step Q1, color feature extraction: Color features include the mean and standard deviation of the three channels of red, green, and blue space. The specific formula is:

[0083]

[0084] Where: μ R , μ G , μ B are the mean values ​​of the red, green, and blue spaces of the i-th pixel, σ R , σ G , σ B are the standard deviations of the red, green, and blue spaces of the i-th pixel, R i , G i , B iare the red, green, and blue channel values ​​of the i-th pixel, respectively, and N is the total number of pixels;

[0085] Step Q2, shape feature extraction: Use the area and perimeter of the candidate region as shape features, expressed by the following formula:

[0086]

[0087]

[0088] Where: S is the area of ​​the candidate region, C is the perimeter of the candidate region, d i is the distance from the i-th pixel to its surrounding pixels;

[0089] Step Q3, texture feature extraction: Calculate the texture features through the gray level co-occurrence matrix, including energy value, entropy and contrast, where the energy calculation formula is:

[0090]

[0091] Where: E n is the energy value, E t is entropy, C is contrast, N g is the gray level of the image, p i,j is the probability that the pixel gray value is i and j.

[0092] As a further solution of the present invention, the candidate region classification module inputs the features of the candidate region into a support vector machine classifier for classification, wherein the support vector machine classifier adopts a polynomial kernel function, and its calculation formula is:

[0093]

[0094] Where: f(x) is the output result of the support vector machine classifier, α i is the Lagrange multiplier, y i is the category of the sample, K(x i ,x) is the kernel function and b is the bias term.

[0095] As a further solution of the present invention, the colon polyp segmentation module performs morphological processing on the binarized image, including dilation, erosion, opening operation and closing operation, wherein the specific definitions of dilation and erosion are:

[0096]

[0097] Where: X is the result after dilation, Y is the result after corrosion, A is the image to be processed, B is the structural element, ⊙ is the dilation operation, For corrosion operations;

[0098] The colon polyp segmentation module uses an ellipse fitting algorithm to perform colon polyp segmentation. The ellipse parameters in the ellipse fitting algorithm include the center point coordinates, major axis length, minor axis length and rotation angle. The calculation formula of the ellipse parameters is:

[0099]

[0100] Where: N is the total number of pixels, (x0, y0) is the coordinate of the center point, (x i ,y i ) is the coordinate of the ith pixel, a is the length of the major axis, b is the length of the minor axis, and θ is the rotation angle.

[0101] The technical effects and advantages of the colon polyp recognition and segmentation method based on digestive endoscopy of the present invention are as follows:

[0102] 1. The present invention combines multiple features such as color, shape and texture to more accurately identify and locate colon polyps.

[0103] 2. The present invention adopts an ellipse fitting algorithm for segmentation, which can separate colon polyps more accurately and avoid misjudgment.

[0104] 3. The present invention can adaptively rotate and scale images and is suitable for colon polyps of different sizes and angles.

[0105] 4. The present invention adopts a morphological analysis method to obtain more detailed information about colon polyps, including precise contours, areas, circumferences, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0106] Figure 1 It is a module structure diagram of the colon polyp recognition and segmentation system based on digestive endoscopy of the present invention;

[0107] Figure 2 The present invention is a flow chart of the method for recognizing and segmenting colon polyps based on digestive endoscopy. DETAILED DESCRIPTION

[0108] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0109] This embodiment provides a colon polyp recognition and segmentation system and method based on digestive endoscopy. Figure 1As shown, the colon polyp recognition and segmentation system based on digestive endoscopy includes: an image preprocessing module, a candidate region extraction module, a feature extraction module, a candidate region classification module and a colon polyp segmentation module.

[0110] The image preprocessing module is used to preprocess the collected colonoscopy images, including image grayscale, image enhancement and median filtering.

[0111] The candidate region extraction module is used to segment each region in the colonoscopy image using an image segmentation algorithm based on region growing to extract candidate regions.

[0112] The feature extraction module is used to extract shape, texture and color features from the candidate area by performing feature extraction on the candidate area.

[0113] The candidate region classification module is used to determine the region of colon polyps by inputting the features of the candidate region into a support vector machine classifier for classification.

[0114] The colon polyp segmentation module is used to perform binarization processing on the area determined to be a colon polyp to obtain the contour, area, and perimeter of the colon polyp. The colon polyp segmentation is performed using an ellipse fitting algorithm, and the contour of the colon polyp is accurately matched by adjusting the ellipse parameters.

[0115] This embodiment adopts an image analysis, recognition, and segmentation method based on the attributes of colon polyps, and uses a support vector machine classifier to classify candidate areas in colonoscopy images, thereby improving the detection accuracy and efficiency of colon polyps. At the same time, the present invention also adopts a morphological analysis method to obtain more detailed colon polyp information, including precise contours, areas, perimeters, etc. Figure 2 As shown, the method for recognizing and segmenting colon polyps based on digestive endoscopy using the above-mentioned colon polyp recognition and segmentation system based on digestive endoscopy includes the following steps 1 to 5:

[0116] Step 1: Image preprocessing: The collected colonoscopy images are preprocessed, including image grayscale, image enhancement and median filtering.

[0117] Image preprocessing includes image grayscale, image enhancement and median filtering operations. The specific process is as follows:

[0118] Step S1, image grayscale: convert the color image into a grayscale image by using the maximum value method, wherein the specific formula for grayscale is:

[0119] I g (x,y)=0.299I R (x,y)+0.587I C (x,y)+0.114I B(x,y);

[0120] Where: I(x,y) is the original input image, I g (x, y) is the grayscale image, I R (x,y),I C (x,y) and I B (x, y) are the red, green and blue channels of the input image respectively;

[0121] Step S2, median filtering operation: De-noising the grayscale image by median filtering. The median filtering formula is:

[0122] I d (x,y)=median{I g (x+i,y+j)},i,j∈[-n,n];

[0123] Where: I d (x, y) is the image after median filtering, I g (x+i, y+j) is the grayscale input image, and n is the radius of the median filter;

[0124] Step S3, image enhancement: the denoised grayscale image is enhanced by histogram equalization. The calculation formula of histogram equalization is:

[0125]

[0126] Where: I e (x, y) is the enhanced image, T(I d (x, y)) is the grayscale transformation function, L is the number of grayscale levels, M is the width of the image, N is the height of the image, h(I d (i,j)) is the grayscale value after equalization.

[0127] In this embodiment, the input colon polyp image is preprocessed, including graying, denoising, and enhancing the image, so as to facilitate subsequent feature extraction and classification.

[0128] Step 2: Extract candidate regions: Use an image segmentation algorithm based on region growing to segment each region in the colonoscopy image and extract candidate regions.

[0129] The specific image segmentation algorithm based on region growing is as follows: one or more seed points are selected from the image as the starting region for growth; the similarity condition for a pixel to be added to the current region is defined, usually measured by gray value, color, texture or gradient features, and the growth is stopped when the region growth stop condition is met (such as the pixel similarity in the region is lower than a certain threshold). For example, if region R is the current growing region and pixel p is a pixel point adjacent to region R, the condition for merging pixel p into region R is expressed as:

[0130] if|I(p)-I(R)| <T,then p∈R;

[0131] Where: I(p) is the eigenvalue of pixel p, I(R) is the average eigenvalue of region R, T is the similarity threshold, if is if, then is then.

[0132] Step 3: Feature extraction: By performing feature extraction on the candidate area, shape, texture and color attribute features are extracted from the candidate area.

[0133] By performing feature extraction on the candidate region, the specific steps of extracting shape, texture and color attribute features from the candidate region are as follows:

[0134] Step Q1, color feature extraction: Color features include the mean and standard deviation of the three channels of red, green, and blue space. The specific formula is:

[0135]

[0136] Where: μ R , μ G , μ B are the mean values ​​of the red, green, and blue spaces of the i-th pixel, σ R , σ G , σ B are the standard deviations of the red, green, and blue spaces of the i-th pixel, R i , G i , B i are the red, green, and blue channel values ​​of the i-th pixel, respectively, and N is the total number of pixels;

[0137] This embodiment combines multiple features such as color, shape and texture to more accurately identify and locate colon breath.

[0138] Step Q2, shape feature extraction: Use the area and perimeter of the candidate region as shape features, expressed by the following formula:

[0139]

[0140] Where: S is the area of ​​the candidate region, C is the perimeter of the candidate region, d iis the distance from the i-th pixel to its surrounding pixels;

[0141] Step Q3, texture feature extraction: Calculate the texture features through the gray level co-occurrence matrix, including energy value, entropy and contrast, where the energy calculation formula is:

[0142]

[0143] Where: E n is the energy value, E t is entropy, C is contrast, N g is the gray level of the image, p i,j is the probability that the pixel gray value is i and j.

[0144] Step 4: Classification of candidate regions: Determine the region of colon polyps by inputting the features of the candidate regions into a support vector machine classifier for classification.

[0145] The features of the candidate regions are input into the support vector machine classifier for classification, where the support vector machine classifier uses a polynomial kernel function, and the calculation formula is as follows:

[0146]

[0147] Where: f(x) is the output result of the support vector machine classifier, α i is the Lagrange multiplier, y i is the category of the sample, K(x i ,x) is the kernel function and b is the bias term.

[0148] Step 5: Colon polyp segmentation: Binarize the area identified as colon polyp to obtain the contour, area, and perimeter of the colon polyp. Use an ellipse fitting algorithm to segment the colon polyp, and adjust the ellipse parameters to accurately match the contour of the colon polyp.

[0149] The specific steps of colon polyp segmentation in this embodiment are:

[0150] Step W1, preliminarily screening the candidate colon polyp regions after the candidate regions are classified, and eliminating regions with irregular shapes;

[0151] Step W2, accurately segment the remaining candidate colon polyp regions and perform binarization on the pixel values ​​in the regions. The binarization formula is:

[0152]

[0153] Where: x and y are the horizontal and vertical positions of the pixel in the image, respectively; B(x, y) is the pixel value after binarization; I(x, y) is the pixel value in the original image; and T is the threshold value.

[0154] This embodiment divides the pixels in the image into two categories according to the relationship between their grayscale values ​​and the threshold: pixels greater than or equal to the threshold are set to 1, and pixels less than the threshold are set to 0. Through the binarization process, different areas in the image can be segmented.

[0155] Step W3, performing morphological processing on the binarized image, including dilation, erosion, opening operation and closing operation;

[0156] Step W4, edge detection is performed on the binary image after morphological processing to obtain the outline of the colon polyp. The edge detection formula is:

[0157]

[0158] Where: G x and G y Respectively represent the gradient of the image in the x and y directions, G(x,y) represents the gradient strength of the image at (x,y);

[0159] Step W5, using contour information and contour compactness to perform region segmentation to obtain an accurate colon polyp region.

[0160] The binarized image is subjected to morphological processing, including dilation, erosion, opening and closing operations, where the specific definitions of dilation and erosion are:

[0161]

[0162] Where: X is the result after dilation, Y is the result after corrosion, A is the image to be processed, B is the structural element, ⊙ is the dilation operation, is a corrosion operation, φ is an empty set;

[0163] The specific definition of the opening operation is:

[0164]

[0165] The specific definition of the closing operation is:

[0166]

[0167] The contour compactness of the colon polyp obtained after edge detection is calculated. The calculation formula for the contour compactness of the colon polyp is:

[0168]

[0169] Where: D is the compactness of the colon polyp contour, A is the pixel area of ​​the colon polyp, and P is the perimeter of the colon polyp contour.

[0170] When implemented specifically, the compactness of the colon polyp contour is set, and the area with a compactness less than the threshold is classified as an abnormal area, while the area with a compactness greater than or equal to the threshold is classified as a normal area.

[0171] For the area classified as an abnormal area, a method based on morphology and region growing is used to segment possible polyp areas. In specific implementation, the following steps can be used:

[0172] Step B1, for each abnormal region, according to its morphological characteristics, morphological processing is performed using structural elements of different sizes and shapes to remove noise and smooth edges;

[0173] Step B2, for the processed abnormal area, select a seed point and use the region growing method to segment it to obtain a possible polyp area;

[0174] Step B3: For the possible polyp region obtained, the area and perimeter are calculated, and the non-polyp region is further eliminated by using shape features, etc. to obtain the final polyp region.

[0175] The ellipse fitting algorithm is used for colon polyp segmentation. The ellipse parameters in the ellipse fitting algorithm include the center point coordinates, major axis length, minor axis length and rotation angle. The calculation formula of the ellipse parameters is:

[0176]

[0177]

[0178] Where: N is the total number of pixels, (x0, y0) is the coordinate of the center point, (x i ,y i ) is the coordinate of the ith pixel, a is the length of the major axis, b is the length of the minor axis, and θ is the rotation angle.

[0179] The present invention proposes a method for image analysis, recognition and segmentation based on the attributes of colon polyps. The method utilizes preprocessing, candidate region extraction, feature extraction, candidate region classification and colon polyp segmentation steps, combined with multiple features such as color, shape and texture, to more accurately identify and locate colon polyps. The method adopts an ellipse fitting algorithm for segmentation, to more accurately separate colon polyps, and is suitable for colon polyps of different sizes and angles. The present invention combines multiple features such as color, shape and texture, to more accurately identify and locate colon polyps. The method adopts an ellipse fitting algorithm for segmentation, to more accurately separate colon polyps, and avoids misjudgment.

[0180] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for recognizing and segmenting colon polyps based on digestive endoscopy, characterized in that: The steps include: Step 1: Image preprocessing: preprocessing the collected colonoscopy images, including image grayscale, image enhancement, and median filtering; Step 2, candidate region extraction: using a region growing-based image segmentation algorithm to segment each region in the colonoscopy image and extract candidate regions; Step 3, feature extraction: extract shape, texture and color features from the candidate area by performing feature extraction on the candidate area; Step 4, candidate region classification: the region of the colon polyp is determined by inputting the features of the candidate region into a support vector machine classifier for classification; Step 5: Colon polyp segmentation: Binarize the area identified as colon polyp to obtain the contour, area, and perimeter of the colon polyp. Use the ellipse fitting algorithm to segment the colon polyp, and adjust the ellipse parameters to accurately match the contour of the colon polyp. The specific steps of colon polyp segmentation are as follows: Step W1, preliminarily screening the candidate colon polyp regions after the candidate regions are classified, and eliminating regions with irregular shapes; Step W2, accurately segment the remaining candidate colon polyp regions and perform binarization on the pixel values ​​in the regions. The binarization formula is: Where: x and y are the horizontal and vertical positions of the pixel in the image, respectively; B(x, y) is the pixel value after binarization; I(x, y) is the pixel value in the original image; and T is the threshold value. Step W3, performing morphological processing on the binarized image, including dilation, erosion, opening operation and closing operation; Step W4, edge detection is performed on the binary image after morphological processing to obtain the outline of the colon polyp. The edge detection formula is: Where: G x and G y Respectively represent the gradient of the image in the x and y directions, G(x,y) represents the gradient strength of the image at (x,y); Step W5, using contour information and contour compactness to perform region segmentation to obtain a colon polyp region; wherein, for the contour of the colon polyp obtained after edge detection, its contour compactness is calculated, and the calculation formula for the colon polyp contour compactness is: Where: D is the compactness of the colon polyp contour, A is the pixel area of ​​the colon polyp, and P is the perimeter of the colon polyp contour.

2. The method for recognizing and segmenting colon polyps based on digestive endoscopy according to claim 1, characterized in that: Image preprocessing includes image grayscale, image enhancement and median filtering operations. The specific process is as follows: Step S1, image grayscale: convert the color image into a grayscale image by using the maximum value method, wherein the specific formula for grayscale is: I g (x,y)=0.299I R (x,y)+0.587I C (x,y)+0.114I B (x,y); Where: I(x,y) is the original input image, I g (x, y) is the grayscale image, I R (x,y),I C (x,y) and I B (x, y) are the red, green and blue channels of the input image respectively; Step S2, median filtering operation: De-noising the grayscale image by median filtering. The median filtering formula is: I d (x,y)=median{I g (x+i,y+j)},i,j∈[-n,n]; Where: I d (x, y) is the image after median filtering, I g (x+i, y+j) is the grayscale input image, and n is the radius of the median filter; Step S3, image enhancement: the denoised grayscale image is enhanced by histogram equalization. The calculation formula of histogram equalization is: Where: I e (x, y) is the enhanced image, T(I d (x, y)) is the grayscale transformation function, L is the number of grayscale levels, M is the width of the image, N is the height of the image, h(I d (i,j)) is the grayscale value after equalization.

3. The method for recognizing and segmenting colon polyps based on digestive endoscopy according to claim 1, characterized in that: By performing feature extraction on the candidate region, the specific steps of extracting shape, texture and color attribute features from the candidate region are as follows: Step Q1, color feature extraction: Color features include the mean and standard deviation of the three channels of red, green, and blue space. The specific formula is: Where: μ R , μ G , μ B are the mean values ​​of the red, green, and blue spaces of the i-th pixel, σ R , σ G , σ B are the standard deviations of the red, green, and blue spaces of the i-th pixel, R i , G i , B i are the red, green, and blue channel values ​​of the i-th pixel, respectively, and N is the total number of pixels; Step Q2, shape feature extraction: Use the area and perimeter of the candidate region as shape features, expressed by the following formula: Where: S is the area of ​​the candidate region, C is the perimeter of the candidate region, d i is the distance from the i-th pixel to its surrounding pixels; Step Q3, texture feature extraction: Calculate the texture features through the gray level co-occurrence matrix, including energy value, entropy and contrast, where the energy calculation formula is: Where: E n is the energy value, E t is entropy, C is contrast, N g is the gray level of the image, p i,j is the probability that the pixel gray value is i and j.

4. The method for recognizing and segmenting colon polyps based on digestive endoscopy according to claim 1, characterized in that: The features of the candidate regions are input into the support vector machine classifier for classification, where the support vector machine classifier uses a polynomial kernel function, and its calculation formula is: Where: f(x) is the output result of the support vector machine classifier, α i is the Lagrange multiplier, y i is the category of the sample, K(x i ,x) is the kernel function and b is the bias term.

5. The method for recognizing and segmenting colon polyps based on digestive endoscopy according to claim 1, characterized in that: The binarized image is subjected to morphological processing, including dilation, erosion, opening and closing operations, where the specific definitions of dilation and erosion are: Where: X is the result after dilation, Y is the result after corrosion, A is the image to be processed, B is the structural element, ⊙ is the dilation operation, For corrosion operations; The ellipse fitting algorithm is used for colon polyp segmentation. The ellipse parameters in the ellipse fitting algorithm include the center point coordinates, major axis length, minor axis length and rotation angle. The calculation formula of the ellipse parameters is: Where: N is the total number of pixels, (x0, y0) is the coordinate of the center point, (x i ,y i ) is the coordinate of the ith pixel, a is the length of the major axis, b is the length of the minor axis, and θ is the rotation angle.

6. A colon polyp recognition and segmentation system based on digestive endoscopy, characterized in that: include: An image preprocessing module is used to preprocess the collected colonoscopy images, including image grayscale, image enhancement and median filtering; A candidate region extraction module is used to segment each region in the colonoscopy image using a region growing-based image segmentation algorithm to extract candidate regions; A feature extraction module is used to extract shape, texture and color features from the candidate area by performing feature extraction on the candidate area; A candidate region classification module, used for determining the region of colon polyps by inputting the features of the candidate region into a support vector machine classifier for classification; The colon polyp segmentation module is used to perform binarization processing on the area determined to be a colon polyp to obtain the contour, area, and perimeter of the colon polyp. The colon polyp segmentation is performed using an ellipse fitting algorithm, and the contour of the colon polyp is accurately matched by adjusting the ellipse parameters. The colon polyp segmentation module is specifically used for: Step W1, preliminarily screening the candidate colon polyp regions after the candidate regions are classified, and eliminating regions with irregular shapes; Step W2, accurately segment the remaining candidate colon polyp regions and perform binarization on the pixel values ​​in the regions. The binarization formula is: Where: x and y are the horizontal and vertical positions of the pixel in the image, respectively; B(x, y) is the pixel value after binarization; I(x, y) is the pixel value in the original image; and T is the threshold value. Step W3, performing morphological processing on the binarized image, including dilation, erosion, opening operation and closing operation; Step W4, edge detection is performed on the binary image after morphological processing to obtain the outline of the colon polyp. The edge detection formula is: Where: G x and G y Respectively represent the gradient of the image in the x and y directions, G(x,y) represents the gradient strength of the image at (x,y); Step W5, using contour information and contour compactness to perform region segmentation to obtain a colon polyp region; wherein, for the contour of the colon polyp obtained after edge detection, its contour compactness is calculated, and the calculation formula for the colon polyp contour compactness is: Where: D is the compactness of the colon polyp contour, A is the pixel area of ​​the colon polyp, and P is the perimeter of the colon polyp contour.

7. The colon polyp recognition and segmentation system based on digestive endoscopy according to claim 6, characterized in that: The image preprocessing module includes an image grayscale module, an image enhancement module and a median filter operation module; The image grayscale module is used to convert the color image into a grayscale image by using the maximum value method. The specific formula for grayscale conversion is: I g (x,y)=0.299I R (x,y)+0.587I C (x,y)+0.114I B (x,y); Where: I(x,y) is the original input image, I g (x, y) is the grayscale image, I R (x,y),I C (x,y) and I B (x, y) are the red, green and blue channels of the input image respectively; The median filter operation module is used to perform denoising on the grayscale image through median filtering. The median filter formula is: I d (x,y)=median{I g (x+i,y+j)},i,j∈[-n,n]; Where: I d (x, y) is the image after median filtering, I g (x+i, y+j) is the grayscale input image, and n is the radius of the median filter; The image enhancement module is used to enhance the denoised grayscale image through histogram equalization. The calculation formula of histogram equalization is: Where: I e (x, y) is the enhanced image, T(I d (x, y)) is the grayscale transformation function, L is the number of grayscale levels, M is the width of the image, N is the height of the image, h(I d (i,j)) is the grayscale value after equalization.

8. The colon polyp recognition and segmentation system based on digestive endoscopy according to claim 6, characterized in that: The specific steps of the candidate region extraction module to extract shape, texture and color attribute features from the candidate region are as follows: Step Q1, color feature extraction: Color features include the mean and standard deviation of the three channels of red, green, and blue space. The specific formula is: Where: μ R , μ G , μ B are the mean values ​​of the red, green, and blue spaces of the i-th pixel, σ R , σ G , σ B are the standard deviations of the red, green, and blue spaces of the i-th pixel, R i , G i , B i are the red, green, and blue channel values ​​of the i-th pixel, respectively, and N is the total number of pixels; Step Q2, shape feature extraction: Use the area and perimeter of the candidate region as shape features, expressed by the following formula: Where: S is the area of ​​the candidate region, C is the perimeter of the candidate region, d i is the distance from the i-th pixel to its surrounding pixels; Step Q3, texture feature extraction: Calculate the texture features through the gray level co-occurrence matrix, including energy value, entropy and contrast, where the energy calculation formula is: Where: E n is the energy value, E t is entropy, C is contrast, N g is the gray level of the image, p i,j is the probability that the pixel gray value is i and j.

9. The colon polyp recognition and segmentation system based on digestive endoscopy according to claim 6, characterized in that: The candidate region classification module inputs the features of the candidate region into the support vector machine classifier for classification. The support vector machine classifier uses a polynomial kernel function, and its calculation formula is: Where: f(x) is the output result of the support vector machine classifier, α i is the Lagrange multiplier, y i is the category of the sample, K(x i ,x) is the kernel function and b is the bias term.

10. The colon polyp recognition and segmentation system based on digestive endoscopy according to claim 6, characterized in that: The colon polyp segmentation module performs morphological processing on the binary image, including dilation, erosion, opening and closing operations, where the specific definitions of dilation and erosion are: Where: X is the result after dilation, Y is the result after corrosion, A is the image to be processed, B is the structural element, ⊙ is the dilation operation, For corrosion operations; The colon polyp segmentation module uses an ellipse fitting algorithm to perform colon polyp segmentation. The ellipse parameters in the ellipse fitting algorithm include the center point coordinates, major axis length, minor axis length and rotation angle. The calculation formula of the ellipse parameters is: Where: N is the total number of pixels, (x0, y0) is the coordinate of the center point, (x i ,y i ) is the coordinate of the ith pixel, a is the length of the major axis, b is the length of the minor axis, and θ is the rotation angle.