Method, system and device for performing intestinal polyp contour segmentation on basis of adaptive threshold

By removing highlight spots, removing additional information, enhancing contrast and adaptive threshold segmentation of the endoscopic images, combined with noise removal and local detail processing, the accurate segmentation of intestinal polyps contours is achieved, and the problem of inaccurate segmentation in traditional methods is solved.

WO2025059979A1PCT designated stage expired Publication Date: 2025-03-27CENT SOUTH UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/120341
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-09-21
Publication Date
2025-03-27

AI Technical Summary

Technical Problem

Under traditional methods, the identification of colorectal polyps in endoscopic images depends on the doctor's experience and status, especially when the polyps do not have obvious recognition and blurred caused by noise during imaging. Under subjective circumstances, some misjudgments and misjudgments will inevitably occur, resulting in inaccurate segmentation of intestinal polyps.

Method used

A method of segmentation of intestinal polyp contour based on adaptive threshold is proposed. By removing highlight points, removing additional information and increasing image contrast to the intestinal polyp images to be segmented, the adaptive threshold algorithm is used to segment, and the image is removed from noise stains, local details are processed, and the intestinal polyp contour is curved to obtain a complete intestinal polyp contour.

Benefits of technology

The recognition and segmentation accuracy of intestinal polyps contours are improved, the segmentation quality of intestinal polyps contours is improved, and a relatively accurate judgment is made on the contour areas of intestinal polyps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023120341_27032025_PF_FP_ABST
    Figure CN2023120341_27032025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention are a method, system and device for performing intestinal polyp contour segmentation on the basis of an adaptive threshold. The present method comprises: acquiring an intestinal polyp image to be segmented, and removing highlight points and additional information from said intestinal polyp image, so as to obtain a first intestinal polyp image; increasing the image contrast of the first intestinal polyp image, so as to obtain a second intestinal polyp image; performing segmentation on the second intestinal polyp image by means of using an adaptive threshold algorithm, so as to obtain a main contour image; removing noise spots from the main contour image, so as to obtain a denoised image; performing local detail processing on the denoised image, so as to obtain a processed denoised image; extracting an intestinal polyp contour from the processed denoised image, and performing curve fitting on the intestinal polyp contour, so as to obtain a complete intestinal polyp contour; and performing intestinal polyp contour segmentation on the basis of the complete intestinal polyp contour. The present invention can improve the accuracy of intestinal polyp contour segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

A method, system and device for intestinal polyp contour segmentation based on adaptive threshold Technical Field

[0001] The present invention relates to the technical field of contour segmentation, and in particular to a method, system and device for intestinal polyp contour segmentation based on adaptive threshold. Background Art

[0002] Colorectal cancer (CRC) ranks third in incidence and second in mortality among malignant tumors worldwide. In my country, it is the second most common and most prevalent malignant tumor of the digestive system. Popularizing colorectal cancer screening and improving the quality of colonoscopy examinations to reduce CRC morbidity and mortality in my country and reduce additional treatment costs is a significant medical research topic.

[0003] Colorectal polyps are localized, raised lesions that rise above the intestinal mucosa. Approximately 90% of colorectal cancers (CRCs) develop from polyps. Based on their pathological characteristics, intestinal polyps can be broadly categorized into non-adenomatous polyps, adenomatous polyps, and other types. Non-adenomatous polyps include hyperplastic polyps and inflammatory polyps. Hyperplastic polyps are the most common, typically located in the distal part of the large intestine. They appear as droplet-shaped projections on the mucosal surface, often less than one centimeter in diameter, and are unlikely to undergo malignant transformation. Inflammatory polyps are generally smaller, multiple, and appear as wide, long, irregular bridges. Adenomatous polyps are categorized based on their morphology into tubular adenomas, villous adenomas, and mixed adenomas. Adenomatous polyps can potentially become cancerous, with villous adenomas having a higher cancer risk and mixed adenomas having a cancer risk intermediate between tubular and villous adenomas.

[0004] To improve the role of colonoscopy in detecting the early risk of colorectal cancer, the polyp detection rate (ADR) is a very important indicator related to it. According to practical tests, every 1% increase in ADR can reduce the incidence of colorectal cancer by approximately 3%-6%. However, under traditional methods, the identification of colorectal polyps in endoscopic images depends on the doctor's experience and condition. In particular, when the polyp morphology is not clearly recognizable and the imaging process is blurred by noise, subjective situations inevitably lead to some misjudgments and missed judgments, resulting in inaccurate intestinal polyp segmentation.

[0005] Summary of the Invention

[0006] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a method, system and device for intestinal polyp contour segmentation based on an adaptive threshold, which can improve the accuracy of intestinal polyp contour segmentation.

[0007] In a first aspect, an embodiment of the present invention provides a method for segmenting intestinal polyp contours based on an adaptive threshold, the method comprising:

[0008] Acquire an intestinal polyp image to be segmented, and remove highlights and additional information from the intestinal polyp image to be segmented to obtain a first intestinal polyp image;

[0009] increasing the image contrast of the first intestinal polyp image to obtain a second intestinal polyp image;

[0010] Adaptive threshold algorithm was used to segment the second intestinal polyp image to obtain the main contour image;

[0011] Remove the noise stains of the main contour image to obtain a denoised image;

[0012] Performing local detail processing on the denoised image to obtain a processed denoised image;

[0013] Extract the intestinal polyp contour from the processed denoised image, and perform curve fitting on the intestinal polyp contour to obtain the complete intestinal polyp contour;

[0014] Intestinal polyp contour segmentation is performed according to the complete intestinal polyp contour.

[0015] Compared with the prior art, the first aspect of the present invention has the following beneficial effects:

[0016] This method can improve the recognition of intestinal polyp contours in the image by removing highlights, removing additional information and increasing image contrast in the segmented intestinal polyp image; by adopting an adaptive threshold algorithm to segment the second intestinal polyp image, the accuracy of intestinal polyp contour segmentation can be improved; by removing noise stains from the main contour image, performing local detail processing on the denoised image, extracting the intestinal polyp contour in the processed denoised image, and performing curve fitting on the intestinal polyp contour, the complete intestinal polyp contour is obtained, thereby improving the segmentation quality of the intestinal polyp contour and making a more accurate judgment on the intestinal polyp contour area.

[0017] According to some embodiments of the present invention, removing highlights and additional information from the intestinal polyp image to be segmented to obtain a first intestinal polyp image includes:

[0018] Using a mirror reflection removal method to remove highlights from the intestinal polyp image to be segmented, to obtain an intestinal polyp image after removing highlights;

[0019] Separating the intestinal polyp image after removing highlights into three channels: R, G, and B, and binarizing the R channel to obtain a binary image;

[0020] After finding the boundary of the binary image, the largest area is filled to remove additional information, thereby obtaining a first intestinal polyp image.

[0021] According to some embodiments of the present invention, increasing the image contrast of the first intestinal polyp image to obtain the second intestinal polyp image includes:

[0022] The first intestinal polyp image is processed using local adaptive histogram equalization to increase image contrast, thereby obtaining a second intestinal polyp image.

[0023] According to some embodiments of the present invention, removing noise stains from the main contour image to obtain a denoised image includes:

[0024] performing erosion on the main contour image to obtain a first main contour image;

[0025] performing multiple dilations on the first main contour image to obtain a second main contour image;

[0026] The second main contour image is subjected to noise and stain removal by using Canny edge detection to obtain a denoised image.

[0027] According to some embodiments of the present invention, performing local detail processing on the denoised image to obtain a processed denoised image includes:

[0028] Marking the connected areas of pixels with zero grayscale value in the denoised image;

[0029] If the number of pixels in the connected area is less than a first preset value, the grayscale values ​​of the pixels less than the first preset value are set to 255 to obtain a first denoised image;

[0030] Smoothing the contour lines in the first denoised image to obtain a processed denoised image.

[0031] According to some embodiments of the present invention, extracting the contour of the intestinal polyp in the processed denoised image includes:

[0032] Calculating the area of ​​the connected region in the processed denoised image and removing regions whose areas are smaller than a second preset value to obtain a first image;

[0033] The grayscale values ​​of the connected areas of pixels in the first image that are smaller than a third preset value are set to zero to obtain the outline of the intestinal polyp.

[0034] According to some embodiments of the present invention, performing curve fitting on the intestinal polyp contour to obtain a complete intestinal polyp contour includes:

[0035] The intestinal polyp contour is defined as a floating-point matrix, and the intestinal polyp contour is symmetrically folded according to the floating-point matrix to obtain a complete intestinal polyp contour by fitting a curve.

[0036] In a second aspect, an embodiment of the present invention further provides an intestinal polyp contour segmentation system based on an adaptive threshold, the intestinal polyp contour segmentation system based on an adaptive threshold comprising:

[0037] an image acquisition unit, configured to acquire an intestinal polyp image to be segmented, and remove highlights and additional information from the intestinal polyp image to be segmented to obtain a first intestinal polyp image;

[0038] an image enhancement unit, configured to increase the image contrast of the first intestinal polyp image to obtain a second intestinal polyp image;

[0039] an image segmentation unit, configured to segment the second intestinal polyp image using an adaptive threshold algorithm to obtain a main contour image;

[0040] a noise removal unit, configured to remove noise stains from the main outline image to obtain a denoised image;

[0041] a detail processing unit, configured to perform local detail processing on the denoised image to obtain a processed denoised image;

[0042] a contour acquisition unit, configured to extract the contour of the intestinal polyp from the processed denoised image, and perform curve fitting on the contour of the intestinal polyp to obtain a complete contour of the intestinal polyp;

[0043] The contour segmentation unit is used for performing intestinal polyp contour segmentation according to the complete intestinal polyp contour.

[0044] In a third aspect, an embodiment of the present invention also provides an intestinal polyp contour segmentation device based on an adaptive threshold, comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the above-mentioned intestinal polyp contour segmentation method based on an adaptive threshold.

[0045] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned intestinal polyp contour segmentation method based on adaptive threshold.

[0046] It can be understood that the beneficial effects of the above-mentioned second to fourth aspects compared with the relevant technologies are the same as the beneficial effects of the above-mentioned first aspect compared with the relevant technologies. Please refer to the relevant description in the above-mentioned first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments with reference to the following drawings, in which:

[0048] FIG1 is a flow chart of a method for segmenting intestinal polyp contours based on an adaptive threshold according to an embodiment of the present invention;

[0049] FIG2 is a flow chart of a method for segmenting intestinal polyp contours according to another embodiment of the present invention;

[0050] FIG3 is a schematic diagram of removing specular reflection points according to an embodiment of the present invention;

[0051] FIG4 is a schematic diagram of removing background additional information such as text according to an embodiment of the present invention;

[0052] FIG5 is a schematic diagram of adaptive threshold processing according to an embodiment of the present invention;

[0053] FIG6 is a schematic diagram of removing noise stains according to an embodiment of the present invention;

[0054] FIG7 is a schematic diagram of a process for obtaining a complete outline of an intestinal polyp according to an embodiment of the present invention;

[0055] FIG8 is a structural diagram of an intestinal polyp contour segmentation system based on adaptive threshold according to an embodiment of the present invention;

[0056] FIG9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0057] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention and are not to be construed as limiting the present invention.

[0058] In the description of the present invention, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0059] In the description of the present invention, it should be understood that descriptions involving orientation, such as the orientation or positional relationship indicated by up, down, etc., are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0060] In the description of the present invention, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, and connecting should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0061] Under traditional methods, the identification of colorectal polyps in endoscopic images depends on the doctor's experience and condition. In particular, when the polyp morphology is not clearly recognizable and there is blurring caused by noise during the imaging process, some misjudgments and missed judgments are inevitable under subjective circumstances, resulting in inaccurate intestinal polyp segmentation.

[0062] To solve the above problems, the present invention can improve the recognition of intestinal polyp contours in the image by removing highlights, removing additional information and increasing image contrast from the intestinal polyp image to be segmented; by adopting an adaptive threshold algorithm to segment the second intestinal polyp image, the accuracy of intestinal polyp contour segmentation can be improved; by removing noise stains from the main contour image, performing local detail processing on the denoised image, extracting the intestinal polyp contour in the processed denoised image, and performing curve fitting on the intestinal polyp contour, a complete intestinal polyp contour is obtained, thereby improving the segmentation quality of the intestinal polyp contour and making a more accurate judgment on the intestinal polyp contour area.

[0063] 1 , an embodiment of the present invention provides a method for segmenting intestinal polyp contours based on an adaptive threshold. The method for segmenting intestinal polyp contours based on an adaptive threshold includes but is not limited to steps S100 to S700 , wherein:

[0064] Step S100: obtaining an intestinal polyp image to be segmented, and removing highlights and additional information from the intestinal polyp image to be segmented to obtain a first intestinal polyp image;

[0065] Step S200: increasing the image contrast of the first intestinal polyp image to obtain a second intestinal polyp image;

[0066] Step S300: segmenting the second intestinal polyp image using an adaptive threshold algorithm to obtain a main contour image;

[0067] Step S400: removing noise stains from the main contour image to obtain a denoised image;

[0068] Step S500: performing local detail processing on the denoised image to obtain a processed denoised image;

[0069] Step S600: extracting the intestinal polyp contour from the processed denoised image, and performing curve fitting on the intestinal polyp contour to obtain a complete intestinal polyp contour;

[0070] Step S700: Segment the intestinal polyp contour according to the complete intestinal polyp contour.

[0071] In this embodiment, in order to improve the recognition of intestinal polyp contours in an image, this embodiment obtains an intestinal polyp image to be segmented, removes highlights and additional information from the intestinal polyp image to be segmented, obtains a first intestinal polyp image, and increases the image contrast of the first intestinal polyp image to obtain a second intestinal polyp image; in order to improve the segmentation quality of the intestinal polyp contour and the accuracy of intestinal polyp segmentation, this embodiment segments the second intestinal polyp image by adopting an adaptive threshold algorithm to obtain a main contour image, then removes noise stains from the main contour image to obtain a denoised image, and performs local detail processing on the denoised image to obtain a processed denoised image, finally extracts the intestinal polyp contour in the processed denoised image, and performs curve fitting on the intestinal polyp contour to obtain a complete intestinal polyp contour, and performs intestinal polyp contour segmentation based on the complete intestinal polyp contour.

[0072] In some embodiments, removing highlights and additional information from the intestinal polyp image to be segmented to obtain a first intestinal polyp image includes:

[0073] The specular reflection removal method is used to remove the highlights from the segmented intestinal polyp image, and the intestinal polyp image after the highlights are removed is obtained;

[0074] The intestinal polyp image after removing the highlights is separated into three channels: R, G, and B, and the R channel is binarized to obtain a binary image;

[0075] After finding the boundary of the binary image, the largest area is filled to remove additional information, and the first intestinal polyp image is obtained.

[0076] In this embodiment, since the surface of abdominal organs and the inner wall of the intestinal cavity is usually smooth and watery with a sparse texture, it is easy to produce large-area mirror reflections under endoscopic / laparoscopic lighting conditions. The mirror reflections on the surface of the intestinal cavity greatly interfere with the observation and judgment of clinicians, and it may cause target drift and inaccurate identification. Therefore, this embodiment uses a mirror reflection removal method to remove highlights from the segmented intestinal polyp image to improve the recognition of the intestinal polyp contour; in order to prevent additional information from interfering with the recognition of the intestinal polyp contour, removing the additional information can further improve the recognition of the intestinal polyp contour.

[0077] In some embodiments, increasing the image contrast of the first intestinal polyp image to obtain the second intestinal polyp image includes:

[0078] The first intestinal polyp image is processed using local adaptive histogram equalization to increase image contrast, thereby obtaining a second intestinal polyp image.

[0079] In this embodiment, local adaptive histogram equalization is used to increase image contrast, thereby further improving the recognition of intestinal polyp contours.

[0080] In some embodiments, removing noise stains from the main contour image to obtain a denoised image includes:

[0081] Eroding the main contour image to obtain a first main contour image;

[0082] Perform multiple expansions on the first main contour image to obtain a second main contour image;

[0083] The Canny edge detection is used to remove noise and stains from the second main contour image to obtain a denoised image.

[0084] In this embodiment, Canny edge detection is used to remove noise stains, which can effectively reduce random noise generated during the processing process, thereby improving the accuracy of identifying the intestinal polyp contour in the main contour image.

[0085] In some embodiments, performing local detail processing on the denoised image to obtain a processed denoised image includes:

[0086] Mark the connected areas of pixels with zero grayscale value in the denoised image;

[0087] If the number of pixels in the connected area is less than a first preset value, the grayscale values ​​of the pixels less than the first preset value are set to 255 to obtain a first denoised image;

[0088] The contour lines in the first denoised image are smoothed to obtain a processed denoised image.

[0089] In this embodiment, the grayscale value of pixels smaller than the first preset value is set to 255 (white) to remove small areas in the background and improve segmentation efficiency; the contour lines are smoothed to avoid the phenomenon of intermediate color blocks being broken.

[0090] In some embodiments, extracting the outline of the intestinal polyp from the processed denoised image includes:

[0091] Calculating the areas of connected regions in the processed denoised image and removing regions whose areas are smaller than a second preset value to obtain a first image;

[0092] The grayscale values ​​of the connected areas of pixels in the first image that are smaller than a third preset value are set to zero to obtain the outline of the intestinal polyp.

[0093] In this embodiment, the grayscale value of the connected area of ​​pixels smaller than the third preset value is set to zero, thereby separating the background such as the inner wall of the intestine, which is similar in color to the outline of the intestinal polyp and has a larger area. The processed image generally only leaves the obvious outline area of ​​the intestinal polyp, which can further improve the recognition of the outline of the intestinal polyp.

[0094] In some embodiments, curve fitting is performed on the intestinal polyp contour to obtain a complete intestinal polyp contour, including:

[0095] The intestinal polyp contour is defined as a floating-point matrix, and the intestinal polyp contour is symmetrically folded according to the floating-point matrix to obtain a complete intestinal polyp contour by fitting the curve.

[0096] In this embodiment, intestinal polyp contour segmentation can be performed based on the complete intestinal polyp contour. Since the intestinal polyp contour recognition is relatively accurate, the intestinal polyp contour segmentation quality and accuracy can be improved.

[0097] To facilitate understanding by those skilled in the art, a set of best embodiments is provided below:

[0098] Referring to Figure 2, this embodiment uses an adaptive threshold algorithm to segment the main contour of the intestinal polyp image to be segmented after preprocessing; the image with noise and stains after segmentation is successively eroded, expanded (erosion and expansion are methods in morphological filtering) and edge detected to remove small areas in the background; then the contour lines are smoothed, and the segmented areas are marked. The main contour image is extracted using custom rules (i.e., areas with an area less than 1 / 3 of the maximum area are removed as noise, and the grayscale level of connected areas less than 1500 pixels is set to 0 to further separate the background area). Finally, the curve is fitted into a closed area, and the closed area is filled for comparison with the gold standard (including evaluation and judgment). The method of this embodiment mainly includes the following steps:

[0099] 1. Preprocessing.

[0100] (1) Remove mirror reflection points.

[0101] Specular reflection removal is an important research topic. The surfaces of abdominal organs and the inner wall of the intestinal cavity are typically smooth and watery, with a sparse texture. These surfaces are prone to large-scale specular reflections under endoscopic / laparoscopic lighting conditions. Specular reflections on the intestinal surface can significantly interfere with clinicians' observation and judgment, potentially causing target drift and inaccurate identification. Therefore, eliminating the effects of highlights becomes a fundamental preprocessing task in intestinal polyp image segmentation. Referring to Figure 3, an open-source model for specular reflection removal from endoscopic image sequences based on adaptive RPCA decomposition was used to preprocess the dataset, resulting in images with highlights removed.

[0102] It should be noted that the open source model for removing specular reflections from endoscopic image sequences based on adaptive RPCA decomposition in this embodiment is a prior art and will not be described in detail in this embodiment.

[0103] (2) Additional information removal.

[0104] Refer to Figure 4. The image on the left contains additional background information, such as text, while the image on the right shows it removed. First, an endoscopic image is separated into its three RGB channels. The red channel is then binarized to create a mask image. The boundaries of the binarized image are then found and the largest region is filled. This process removes text from the image, facilitating subsequent image processing.

[0105] (3) Increase image contrast.

[0106] The contrast of an image can be increased by using the contrast stretching operation, but its image enhancement effect is not as strong as that of histogram equalization. It uses a point transformation of a nonlinear mapping to redistribute the pixel intensity values ​​in the input image to achieve a uniform intensity distribution in the processed image, thereby increasing the contrast of the image.

[0107] The operation here is to first process the cumulative distribution function (CDF) of the image, and then perform histogram equalization by redistributing pixel values ​​with their corresponding CDF values. The scikit-image library function that performs global and local adaptive histogram equalization is also called to perform histogram equalization.

[0108] The focus of the image is primarily on the edge of the polyp. A careful analysis reveals that the image processed using local adaptive histogram equalization better meets the requirements of this embodiment. Of course, histogram equalization, which redistributes pixel values ​​to their corresponding CDF values, also performs quite well, though the image's tones are somewhat distorted.

[0109] 2. Main contour extraction.

[0110] (1) Main contour segmentation.

[0111] Referring to Figure 5, Figure 5(a) is a schematic diagram without highlights, and Figure 5(b) is a schematic diagram after adaptive threshold processing. The adaptive threshold algorithm is applied to the image after highlight removal to obtain the main contour of the image. The specific adaptive threshold processing is:

[0112] The basic approach to variable thresholding is to compute a threshold at each point (x,y) in the image based on one or more specified properties of a neighborhood of (x,y). Although this process may seem laborious, modern algorithms and hardware allow for fast neighborhood processing, especially for common functions such as logical and arithmetic operations.

[0113] The following uses the standard deviation and mean of the pixels in a neighborhood of each point in the preprocessed image to illustrate the method of this embodiment. The standard deviation and mean are very useful for finding the local threshold because they are descriptors of contrast and average grayscale. Let m xy and σ xy Represents the neighborhood S centered at coordinate (x, y) in the image xy The standard deviation and mean of the set of pixels included. The following is a general formula for a variable threshold based on local image properties: xy =aσ xy +bm xy (1)

[0114] Where a and b are non-negative constants, and T xy =aσ xy +bm G (2)

[0115] Among them, m G is the global image mean. The segmented image is calculated as:

[0116] Where f(x,y) is the input image. This formula is calculated for all pixel locations in the image and uses the neighborhood S at each location (x,y) xy Calculate different thresholds for the pixels in .

[0117] Using predicate logic with parameters calculated from the neighborhood of a point (x,y), you can assign greater weight to variable thresholding:

[0118] Among them, Q is a predicate logic, which is a neighborhood S xy For example, consider the following predicate logic Q(σ xy , m xy ):

[0119] Note that formula (3) is a special case of formula (4), which is obtained by setting Q to be true when f(x, y)>T and setting Q to be false in other cases.

[0120] (2) Remove noise stains.

[0121] Using a 3×3 structuring element with all values ​​set to 1, the main contour image is first eroded once, then dilated twice, using morphological filtering. Canny edge detection is then applied to the image. When the gradient value of a pixel is greater than 200, the pixel is considered an edge pixel; when the gradient value of a pixel is less than 100, the pixel is excluded; and when the gradient value of a pixel is between 100 and 200, only pixels connected to pixels with a gradient value greater than 200 are considered edge pixels. This eliminates any remaining random noise. The process is shown in Figure 6, where Figure 6(a) shows the erosion process, Figure 6(b) shows the dilation process, and Figure 6(c) shows the Canny edge detection process.

[0122] (3) Local detail processing.

[0123] Consider pixels with a grayscale value of 0 (black) and mark their connected areas. If the number of pixels in the connected area of ​​the current pixel is less than 30, set its grayscale value to 255 (white) to remove small areas in the background and improve the segmentation efficiency of this embodiment. The contour lines are then smoothed to avoid the phenomenon of broken intermediate color blocks. The effect is shown in Figure 7(a).

[0124] (4) True contour extraction based on custom rules.

[0125] After the four-neighborhood connected regions of the image are partitioned and marked, the area of ​​each connected region is calculated, and the area smaller than 1 / 3 of the largest region is removed as noise. This successfully removes most of the mis-segmented background. Then, the grayscale of the connected regions smaller than 1500 pixels is set to 0. This separates the intestinal wall and other background areas that are similar in color to the polyp outline and have a larger area. After processing, the image generally only leaves the obvious outline area of ​​the polyp. The effect is shown in Figure 7(b).

[0126] (5) Curve fitting.

[0127] Because the intestinal wall is smooth, the lower half of the polyp's outline is nearly invisible under uneven endoscopic lighting, necessitating additional processing. This embodiment defines a symmetric matrix M, a 2x3 floating-point matrix, for symmetrically flipping the image. Here, two pixels are taken from the original image at a point 1 / 4 the length of the terminal pixel curve, and the image is symmetrically flipped around the line connecting them. The resulting image is shown in Figure 7(c).

[0128] 3. Image segmentation.

[0129] The complete intestinal polyp contour is used for intestinal polyp contour segmentation.

[0130] For better explanation, the following experiments were conducted in this embodiment:

[0131] Using a supervised evaluation method based on the gold standard, computer calculations showed that the accuracy of the method in this embodiment reached 78.97% of the correctly segmented pixels as a percentage of all segmented pixels, the recall rate of the correctly segmented pixels as a percentage of all actual pixels reached 99.82%, the f1_score was 88.18%, and the ratio of correctly segmented pixels to the union of all segmented pixels and actual pixels (Iou) was 78.86%. Overall, the method in this embodiment optimizes and improves traditional segmentation algorithms, and its performance exceeds that of most existing traditional segmentation algorithms.

[0132] 100 images were selected as a test set to test the above method. The data in the following table shows the performance results of the method of this embodiment on images with and without overlapping polyps. It can be seen that the experimental algorithm performs better when there are no overlapping polyps.

[0133] Table 1

[0134] 8 , an embodiment of the present invention further provides an intestinal polyp contour segmentation system based on an adaptive threshold. The intestinal polyp contour segmentation system based on an adaptive threshold includes an image acquisition unit 100, an image enhancement unit 200, an image segmentation unit 300, a noise removal unit 400, a detail processing unit 500, a contour acquisition unit 600, and a contour segmentation unit 700, wherein:

[0135] The image acquisition unit 100 is used to acquire an intestinal polyp image to be segmented, and remove highlights and additional information from the intestinal polyp image to be segmented to obtain a first intestinal polyp image;

[0136] An image enhancement unit 200 is configured to increase the image contrast of the first intestinal polyp image to obtain a second intestinal polyp image;

[0137] An image segmentation unit 300 is configured to segment the second intestinal polyp image using an adaptive threshold algorithm to obtain a main contour image;

[0138] The noise removal unit 400 is used to remove noise stains from the main contour image to obtain a denoised image;

[0139] A detail processing unit 500 is used to perform local detail processing on the denoised image to obtain a processed denoised image;

[0140] The contour acquisition unit 600 is used to extract the intestinal polyp contour from the processed denoised image and perform curve fitting on the intestinal polyp contour to obtain a complete intestinal polyp contour;

[0141] The contour segmentation unit 700 is used to segment the intestinal polyp contour according to the complete intestinal polyp contour.

[0142] It should be noted that, since the intelligent automatic course scheduling system in this embodiment and the above-mentioned intelligent automatic course scheduling method are based on the same inventive concept, the corresponding contents in the method embodiment are also applicable to the system embodiment and will not be described in detail here.

[0143] 9 , an embodiment of the present application further provides an intelligent automatic course scheduling device, which includes:

[0144] at least one memory;

[0145] at least one processor;

[0146] at least one program;

[0147] The program is stored in the memory, and the processor executes at least one program to implement the intelligent automatic class scheduling method described above in the present disclosure.

[0148] The electronic device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a car computer, etc.

[0149] The electronic device according to the embodiment of the present application is described in detail below.

[0150] The processor 1600 may be implemented as a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present disclosure.

[0151] The memory 1700 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1700 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1700 and is called by the processor 1600 to execute the intelligent automatic course scheduling method of the embodiments of this disclosure.

[0152] Input / output interface 1800, used for information input and output;

[0153] Communication interface 1900, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);

[0154] bus 2000 , which transmits information between various components of the device (e.g., processor 1600 , memory 1700 , input / output interface 1800 , and communication interface 1900 );

[0155] The processor 1600 , the memory 1700 , the input / output interface 1800 , and the communication interface 1900 are connected to each other in communication within the device via the bus 2000 .

[0156] An embodiment of the present disclosure also provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned intelligent automatic class scheduling method.

[0157] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0158] The embodiments described in the embodiments of the present disclosure are intended to more clearly illustrate the technical solutions of the embodiments of the present disclosure and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.

[0159] Those skilled in the art will understand that the technical solutions shown in the drawings do not constitute a limitation on the embodiments of the present disclosure, and may include more or fewer steps than shown in the drawings, or a combination of certain steps, or different steps.

[0160] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0161] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0162] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0163] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0164] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0165] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0166] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0167] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk. The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Various changes can be made within the scope of knowledge possessed by ordinary technicians in the relevant technical field without departing from the purpose of the present application.

Claims

1. A method for segmenting intestinal polyp contours based on adaptive threshold, characterized in that: The intestinal polyp contour segmentation method based on adaptive threshold comprises: Acquire an intestinal polyp image to be segmented, and remove highlights and additional information from the intestinal polyp image to be segmented to obtain a first intestinal polyp image; increasing the image contrast of the first intestinal polyp image to obtain a second intestinal polyp image; Using an adaptive threshold algorithm to segment the second intestinal polyp image to obtain a main contour image; Removing noise stains from the main contour image to obtain a denoised image; Performing local detail processing on the denoised image to obtain a processed denoised image; Extracting the intestinal polyp contour in the processed denoised image, and performing curve fitting on the intestinal polyp contour to obtain a complete intestinal polyp contour; Intestinal polyp contour segmentation is performed according to the complete intestinal polyp contour.

2. The method for segmenting intestinal polyp contours based on adaptive threshold according to claim 1, characterized in that: The removing highlights and additional information from the intestinal polyp image to be segmented to obtain a first intestinal polyp image includes: Using a specular reflection removal method to remove highlights from the intestinal polyp image to be segmented, to obtain an intestinal polyp image after the highlights are removed; Separating the intestinal polyp image after removing the highlight points into three channels of R, G, and B, and binarizing the R channel to obtain a binary image; After finding the boundary of the binary image, the largest area is filled to remove additional information, thereby obtaining a first intestinal polyp image.

3. The method for segmenting intestinal polyp contours based on adaptive threshold according to claim 1, characterized in that: The step of increasing the image contrast of the first intestinal polyp image to obtain a second intestinal polyp image includes: The first intestinal polyp image is processed by local adaptive histogram equalization to increase image contrast, thereby obtaining a second intestinal polyp image.

4. The method for segmenting intestinal polyp contours based on adaptive threshold according to claim 1, characterized in that: The step of removing noise stains from the main contour image to obtain a denoised image comprises: Eroding the main contour image to obtain a first main contour image; dilating the first main contour image multiple times to obtain a second main contour image; The second main contour image is subjected to noise and stain removal by using Canny edge detection to obtain a denoised image.

5. The method for segmenting intestinal polyp contours based on adaptive threshold according to claim 1, characterized in that: The performing local detail processing on the denoised image to obtain a processed denoised image includes: Marking the connected areas of pixels with zero grayscale value in the denoised image; If the number of pixels in the connected area is less than a first preset value, the grayscale values ​​of the pixels less than the first preset value are set to 255 to obtain a first denoised image; The contour lines in the first denoised image are smoothed to obtain a processed denoised image.

6. The method for segmenting intestinal polyp contours based on adaptive threshold according to claim 5, characterized in that: The extracting the intestinal polyp contour in the processed denoised image comprises: Calculating the area of ​​the connected region in the processed denoised image, and removing the region whose area is smaller than a second preset value, to obtain a first image; The grayscale values ​​of the connected areas of pixels in the first image that are smaller than a third preset value are set to zero to obtain the outline of the intestinal polyp.

7. The method for segmenting intestinal polyp contours based on adaptive threshold according to claim 1, characterized in that: The curve fitting of the intestinal polyp contour to obtain a complete intestinal polyp contour includes: The intestinal polyp contour is defined as a floating-point matrix, and the intestinal polyp contour is symmetrically folded according to the floating-point matrix to obtain a complete intestinal polyp contour by fitting a curve.

8. An intestinal polyp contour segmentation system based on adaptive threshold, characterized in that: The intestinal polyp contour segmentation system based on adaptive threshold comprises: An image acquisition unit, used for acquiring an intestinal polyp image to be segmented, and removing highlights and additional information from the intestinal polyp image to be segmented to obtain a first intestinal polyp image; An image enhancement unit, configured to increase the image contrast of the first intestinal polyp image to obtain a second intestinal polyp image; An image segmentation unit, configured to segment the second intestinal polyp image using an adaptive threshold algorithm to obtain a main contour image; A noise removal unit, used to remove noise stains from the main contour image to obtain a denoised image; A detail processing unit, used for performing local detail processing on the denoised image to obtain a processed denoised image; A contour acquisition unit, used for extracting the intestinal polyp contour in the processed denoised image, and performing curve fitting on the intestinal polyp contour to obtain a complete intestinal polyp contour; A contour segmentation unit is used to perform intestinal polyp contour segmentation according to the complete intestinal polyp contour.

9. An intestinal polyp contour segmentation device based on adaptive threshold, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to execute the adaptive threshold-based intestinal polyp contour segmentation method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the intestinal polyp contour segmentation method based on adaptive threshold as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Colonic polyp image segmentation method based on cellular automaton model

    CN107146229A

  • Colorectal polyp segmentation method based on endoscopic image

    CN110675402A

  • Solar panel image processing method based on adaptive algorithm

    CN110930358A

  • Method for virtual endoscopic visualization of the colon by shape-scale signatures, centerlining, and computerized detection of masses

    US20050152588A1

  • System and method for detecting polyps from learned boundaries

    US20170046835A1