Gastrointestinal endoscopic image preprocessing method including information screening and fusion repair

The image preprocessing method that combines information screening and fusion repair solves the problems of invalid image information, uneven brightness and spot interference in gastrointestinal polyp detection, improves the accuracy and efficiency of polyp identification, and reduces the risk of missed diagnosis and misdiagnosis. , provides more natural visual effects and more training samples.

CN113139929BActive Publication Date: 2024-09-27ZHEJIANG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110283777.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-17
Publication Date
2024-09-27
Estimated Expiration
2041-03-17

AI Technical Summary

Technical Problem

In existing gastroenteroscopy polyp detection, the invalid information, uneven brightness and spot interference of endoscopic images affect the accuracy of computer-aided system identification of polyps, leading to a high risk of missed diagnosis and misdiagnosis.

Method used

An image preprocessing method that combines information screening and fusion repair is adopted, effective information is automatically screened through a key information extractor, an improved adaptive contrast enhancement method is used to balance the brightness, and a two-image matching fusion repair method is designed to repair the spot area.

Benefits of technology

It improves the accuracy and efficiency of computer-assisted system identification of polyps, reduces the risk of missed diagnosis and misdiagnosis, and provides more natural visual effects and a larger training sample data set.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113139929B
    Figure CN113139929B
Patent Text Reader

Abstract

A gastrointestinal endoscopic image preprocessing method including information screening and fusion repair, firstly uses a key information extractor to extract the effective information area in the data set image twice, the results of the two extractions complement each other and are saved as a new image data set; the new image data set is subjected to brightness equalization and enhancement using an improved EACE method, improving the brightness unevenness defect while improving the overall brightness, and obtaining more information that is conducive to identifying polyps; the enhanced result is subjected to spot detection and spot area repair using a two-image matching fusion repair method. The present invention reduces the interference of the spot in the endoscopic image on the polyp detection result, and reduces the misdiagnosis rate when doctors or computers detect polyps.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of gastrointestinal endoscopic polyp detection, and in particular to a gastrointestinal endoscopic image preprocessing method combining information screening with fusion repair. Background Art

[0002] Digestive tract diseases and the cancer caused by their further deterioration are one of the killers of human health. According to relevant reports, three and four of the top five cancers in my country with the highest incidence and mortality rates are digestive tract cancers, respectively. Polyps are growths on the surface of the small intestine in the digestive tract. Most polyps are benign, but if they are larger than 1 cm, the possibility of cancer will greatly increase. Therefore, early detection and timely treatment of polyps can reduce the possibility of cancer in patients.

[0003] At present, most polyps are detected by digestive tract endoscopy. In one test, the endoscope will collect a large number of gastrointestinal images in the digestive tract, and the amount of image data may be as high as thousands or even tens of thousands. It is not an easy task for doctors to read and screen such a huge amount of images one by one, and there may be a high risk of missed diagnosis and misdiagnosis. With the continuous updating and maturity of computer-aided diagnosis technology, using computer-aided systems (CAS) to help doctors detect polyps in endoscopic images has become a feasible method.

[0004] CAS is a "good helper" to help doctors detect gastrointestinal polyps. On the one hand, it saves doctors time in film reading and screening, and on the other hand, it speeds up the efficiency of detection and wins valuable treatment time for some critically ill patients. However, the accuracy of CAS in identifying polyps is related to the quality of the gastrointestinal images input into the system. The reason is that when the endoscope takes pictures inside the digestive tract, it is limited by the harsh imaging environment, and most of the pictures taken have problems such as low brightness, blur or light spot interference. These problems will affect the accuracy of subsequent computer-aided system identification of polyps. Summary of the invention

[0005] In order to solve the problem that invalid information, uneven brightness and light spot interference in endoscopic images affect the speed and accuracy of CAS identification of polyps, the present invention proposes a gastrointestinal endoscopic image preprocessing method that combines information screening with fusion repair. In order to achieve information screening, the present invention designs a key information extractor to screen the effective information in the endoscopic image twice, and the screening results complement each other; secondly, in order to improve the brightness of the screened image, the present invention proposes an improved adaptive contrast enhancement method (Enhanced Adaptive Contrast Enhancement, EACE) to balance and enhance the overall brightness of the image, and enhance CAS detection of low-brightness areas; finally, the present invention designs a two-image matching fusion repair method to repair the light spot area, eliminate the influence of the light spot on the CAS recognition results, and improve the accuracy of the results.

[0006] The technical solution of the present invention is as follows:

[0007] A gastrointestinal endoscopic image preprocessing method including information screening and fusion repair, the method comprising the following steps:

[0008] Step 1: Obtain the image to be processed. The experimental data set is a partial endoscopic image data set provided by cooperating doctors, which contains images of various types, shapes and colors, with or without polyps;

[0009] Step 2, the key information extractor screens the endoscope image information;

[0010] The key information extractor automatically detects the effective information area of ​​the image based on the input endoscope image information, calculates the vertex and side length information of the largest inscribed square inside it, and extracts all the information in this square based on this information as The key information extractor performs a second extraction using the rotation transformation matrix T:

[0011]

[0012] Where θ is the rotation angle;

[0013] The original image is rotated 45° around the central pixel point, and the invalid filling part caused by the rotation is removed to extract Method to extract new effective information area

[0014] Step 3: Use the improved EACE method to balance the overall brightness of the image

[0015] For the pixel point X in the figure, its pixel value is f x (i, j), calculate its local mean m x (i, j) and the local standard deviation σ x(i, j), and f is calculated using the following formula x (i, j) enhanced pixel value I x (i, j):

[0016] I x (i, j) = m x (i,j)+G(f x (i, j)-m x (i,j)) (2)

[0017]

[0018] Where M is the global average, α is the enhancement parameter, and σ in the high-frequency region x (i, j) is large, the gain is small, and it will not be too bright after enhancement. The σ of the low-frequency part x (i, j) is small, and the gain G is large, the brightness value of this area will be improved; the V channel of the image is gamma-converted and the channel generation result is finally merged to obtain an endoscope image with better brightness;

[0019] Step 4: Design a two-image matching fusion repair method to repair the light spot area in the image.

[0020] Furthermore, in step 4, the two-image matching fusion repair method repairs the spot area in the endoscope image, and the processing process is as follows:

[0021] 4.1 Use threshold detection to locate the position of the light spot in the image and correspond to the light spot mask Middle mark;

[0022] 4.2 Spot Mask Do a closing operation to get the dilated mask use and Get edge mask use Get the color parameters of the normal area around the light spot and fill it with the normal color parameters. The marked light spot pixels;

[0023] 4.3 Fill the initial restoration with normal color parameters Perform Gaussian filtering to balance the patched spot area with the overall area;

[0024] 4.4 Using a mask Extract the repaired spot part, and the repaired spot part is Perform matching and fusion;

[0025] 4.5 Repair the fusion marks at the edges and eliminate the unnatural repair marks. The preprocessing is completed.

[0026] The beneficial effects of the present invention are as follows:

[0027] (1) Compared with the traditional method of manually setting and extracting effective information from gastrointestinal endoscopy, the present invention designs a key information extractor for automatic batch processing in gastrointestinal endoscopy scenarios. It only extracts effective information from endoscopic images twice. The two extractions complement each other, which can not only reduce the diagnostic time of the computer-aided system, but also expand the original data set, allowing the computer-aided system to obtain more training samples;

[0028] (2) The improved ACE method eliminates the disadvantage of the traditional method of losing color information to achieve the purpose of enhancement. Color characteristics are an important basis for medical diagnosis. The present invention uses the improved ACE method to improve the content of low-brightness areas while ensuring that the color of normal areas is not affected, achieving an overall balanced effect.

[0029] (3) Compared with other light spot removal methods that are prone to mosaic phenomenon, the present invention designs a two-image matching fusion repair method to repair light spots. The normal pixel information of the image is used to repair the light spot area, and the repaired light spot area is extracted and matched and fused with the original image, so that the visual effect of the repaired image is more natural, and the risk of misdiagnosis of the computer-aided system identifying the light spot as a polyp is greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is the overall flow chart of the present invention;

[0031] Figure 2 (a) is the test image used in the present invention. The circular area in the image contains the valid information required for diagnosis, and the area outside the circle is filled with background color, which is invalid information. (b) is the image after rotating 40°, and (c) and (d) are the extracted and

[0032] Figure 3 (a) is (b) The result spot mask generated by spot detection of the test image (c) Yes The dilated mask obtained after the closing operation (d) Yes After inverting The result of a bitwise OR operation

[0033] Figure 4 for and The contrast of the image was improved using the automatic contrast enhancement method;

[0034] Figure 5The final result of the enhancement and repair of the present invention. DETAILED DESCRIPTION

[0035] The present invention will be further described below in conjunction with the accompanying drawings.

[0036] Reference Figure 1 to Figure 5 , a gastrointestinal endoscopic image preprocessing method including information screening and fusion repair, the method comprising the following steps:

[0037] Step 1, obtain the image to be processed: the experimental data set is a partial endoscopic image data set provided by the cooperating doctors, which contains images of various types, shapes and colors, with or without polyps;

[0038] Step 2: Design a key information extractor to screen and extract valid information areas.

[0039] Endoscopic images are different from images in common formats. The effective information area in endoscopy images is in the circular area in the middle of the image. Outside the effective information area is the invalid information area filled with black pixels. There is no information needed for diagnosis in the invalid information area. During computer-aided diagnosis, detecting the invalid information area will waste the computer's computing resources and extend the running time of the computer-aided diagnosis system; discarding the invalid information area and only detecting the effective area can improve the efficiency of computer diagnosis.

[0040] The key information extractor designed by the present invention can automatically extract and save the content of the largest inscribed square area in the circular valid information area. The width, height and number of channels of the image collected in step 1 are 534×534×3, and the image is stored in Bitmap (BMP) format. Taking the coordinates of the central pixel point (267,267) in the original image as the center point, according to mathematical knowledge, it is concluded that the pixel point with coordinates at (78,78) can be used as the upper left vertex of the inscribed square, and the side length of this square is 377. The key information extractor extracts the content of this square area as The method of extracting the largest inscribed square in a circle will inevitably lose some effective information. In order to retain more effective information and reduce the risk of missed diagnosis, a second extraction of effective information is performed in the next step. The center pixel point (267,267) of the original image (534×534×3) is used as the origin and rotated 45° clockwise. The image whose length and width have changed due to rotation and filling is cropped to the original image size, and a square area with a side length of 377 is intercepted again with (78,78) as the upper left vertex. Before rotating the image, it is necessary to determine the rotation transformation matrix T. The rotation transformation matrix used in the present invention is as follows:

[0041]

[0042] Where θ is the rotation angle;

[0043] Pictures are stored in the computer in the form of a matrix. During the rotation of the picture, the original coordinate points and color information are mapped to the coordinate points (pixel points) of the new picture through the rotation matrix. The new coordinate points will be stored in a minimum (size) matrix that can include all coordinates according to the transformation rules. The pixels in this minimum matrix that have no mapping relationship with the pixels of the original picture will be automatically filled with black. In the application scenario of gastroenteroscopic polyp detection, the effective information area to be extracted is the circular area in the picture. The range and position of the effective information area have not changed much after rotation. What has changed is that the surrounding black background area has become "thicker", and the black background is invalid information. In order to simplify the complexity of the processing operation, the format information of the original picture is used to remove the filling area caused by the rotation, and a picture with the same size as the original picture is obtained, except that the middle circular effective information area is rotated 45°. After the effective information area is rotated 45°, the key information extractor extracts the original information with the original parameter information. This time extracted Content and There is a difference. There will be Some information not collected in and They can complement each other and reduce the loss of effective information in the original image.

[0044] Step 3: Equalize the image using the improved EACE method and brightness.

[0045] Due to the limitations of endoscopic imaging conditions, some or most areas of a considerable portion of the image have low contrast. The areas with low contrast in the image may hide polyps but are not easily detected by CAS. The traditional adaptive contrast enhancement algorithm (ACE) can only equalize the image brightness. In order to improve the brightness of the equalized image and improve the accuracy of polyp detection, the present invention proposes an improved EACE method to evenly improve the overall brightness of the original image. The principle of the EACE method is to divide the endoscopic image into two parts: one is the low-frequency part, which can be obtained by low-pass filtering (smoothing and blurring) of the image; the other is the high-frequency part, which can be obtained by cutting the low-frequency part of the original image. In order to enhance the high-frequency part representing the details, the high-frequency part is multiplied by a certain gain value, and the enhanced image is obtained after reorganization. Assume that the pixel value of a pixel point x in the endoscopic image is f x (i, j), then in the area centered at (i, j) with a window size of (2n+1)*(2n+1), its local mean m x (i, j) and variance It can be expressed as:

[0046]

[0047]

[0048] Mean m x It can be approximately considered as the background part. At this time, f x (k, l)-m x (i, j) is the high-frequency detail part. Multiplying the high frequency by gain gives:

[0049] I x (i, j) = m x (i, j)+G(i, j)[f x (i, j)-m x (i, j)] (6)

[0050] There are two options for gain G. Option 1 is to use a constant greater than 1:

[0051] I x (i, j) = m x (i,j)+C[f x (i, j)-m x (i, j)] (2)

[0052] The second solution is to express G as a change value inversely proportional to the change of the global mean:

[0053]

[0054] In order to enhance the low brightness area of ​​the image, the value of G in scheme 2 is adopted, then the pixel point f x The enhanced pixel value of (i, j) is:

[0055]

[0056] In the high-frequency area of ​​the image, the local standard deviation is large, and the gain value is relatively small, so the result will not be too bright. However, in the smooth area of ​​the image, the local variance is small, and the gain value is relatively large. In order to avoid the problem of false color caused by enhancement in the RGB color space, Convert to HSV color space (the space conversion method is the same as the conversion method in step 4) and use the automatic contrast enhancement method to equalize the brightness parameters of the whole image for the separated V channel. After the V channel is adjusted, use the gamma conversion method to convert the channel parameters. The gamma conversion formula is as follows:

[0057]

[0058] and γ are constants. According to experience, The values ​​of and γ are set to 1.13 and 0.89 respectively. After the conversion is completed, the channels are merged to generate the result. The EACE algorithm achieves the conversion without color distortion. and Balance and improve the brightness overall.

[0059] Step 4: Use the two-image matching fusion repair method instead of the traditional method to repair the light spot area in the image.

[0060] In addition to the contrast problem, during imaging, the endoscope's own light source may cause mirror reflection when shining on the smooth gastrointestinal wall that adheres to body fluids, and then form a light spot in the endoscopic image. When CAS detects the image, the light spot area may be misjudged as a polyp part, affecting the accuracy of the computer's identification of polyps, leading to the risk of misdiagnosis. Most traditional light spot removal methods will cause a mosaic phenomenon in the light spot area, which will also affect the CAS detection results. In order to improve this unsatisfactory repair effect, the present invention designs a two-image matching fusion repair method to repair the light spot area in the image. The processing flow of the two-image matching fusion repair method is as follows:

[0061] 4.1 Spot detection. It is difficult to distinguish spot pixels from normal pixels in the original RGB color space, but it is easier to distinguish the two in HSV format. Convert the original RGB color space to HSV color space. The conversion formula of pixel value when converting RGB space to HSV space is as follows:

[0062] R′=R / 255 (11)

[0063] G′=G / 255 (12)

[0064] B′=B / 255 (13)

[0065] C max=max(R′,G′,B′) (14)

[0066] C min=min(R′, G′, B′) (15)

[0067] Δ=C max-C min (16)

[0068] tone:

[0069]

[0070] Saturation:

[0071]

[0072] Brightness:

[0073] V=Cmax (19)

[0074] After completing the color space conversion, we can refer to relevant materials and experience to know that when the saturation of a pixel in the image is lower than 55 and the intensity is higher than 176, the pixel is likely to be identified as a light spot. After setting the threshold, pixel-by-pixel detection can locate the light spots in the image. In order to repair, a light spot mask equal to the original image size is generated after pixel-by-pixel detection. In the spot mask The pixels in the normal area are recorded as 0, and the pixels in the light spot are recorded as 255.

[0075] 4.2 Mean restoration. The present invention uses the mean of the pixels around the light spot as a reference to fill in the color information at the light spot. There is a transition area between the light spot and the surrounding normal area. The parameter information of the pixels in the transition area may also be affected by the mirror reflection and not consistent with the normal parameters. Including the transition area in the range of the light spot area to be repaired can minimize the impact of mirror reflection on the image. Using the 3x3 structural element SE 3×3 , for the spot mask obtained in 4.1 Perform morphological closing operations to obtain the expanded mask at the spot. The closing operation is defined as follows:

[0076]

[0077] Among them is Pop operation operator, is the corrosion operator.

[0078] Will Do a color inversion (swap black and white), and then Do an "AND" operation to get the edge mask Edge Mask The pixels marked in white are the normal pixels in the adjacent light spot area. The mean() function of OpenCV can be used to obtain the edge mask. The color average around the lower light spot, compared with Use the obtained color mean information to fill The corresponding spot area.

[0079] 4.3 Fusion repair. In a normal image, even the color values ​​of continuous pixels in a flat area will be different. After the initial repair of the light spot in 5.2, the color information of the light spot repair area has been consistent with the overall color, but there is still some inconsistency. Gaussian filtering has a significant effect on denoising and smoothing flat areas. In order to better integrate the light spot repair area into the whole, the image after the initial repair is first smoothed with a Gaussian filter to obtain a preliminary repair image. The smoothed repaired area is initially fused with the surrounding area. However, Gaussian filtering will also lose edge information in the image to a certain extent. Considering that in the endoscope scene, most of the light spots are in the flat area of ​​the image, Corresponding interception Repair the smoothed area Use OpenCV's addWeighted() function to and The corresponding positions are matched and fused, where the addWeighted function The fusion weight coefficient is set to 0.67. The fusion weight coefficient is set to 0.33. After the fusion is completed, the corresponding

[0080] 4.4 Final restoration. After the above steps, the restoration work is almost complete. Finally, in order to eliminate the traces of artificial repair and fusion and make the image more balanced and natural, OpenCV's inpainting() function is used to Perform the final repair operation, where the repair masks of the inpainting() function are Output The final result is saved in the new data set. The same operation can be performed.

[0081] The final effect of the present invention can be further illustrated by the following experiments.

[0082] 1) Experimental conditions:

[0083] The experimental part of the present invention is implemented by programming with vc10+opencv2.4.13 on Visual Studio 2012. The operating system of the PC used in the experiment is Windows 10 Professional Edition, the processor is Intel(R) Core(TM) i5-4210U CPU@1.70GHz 2.39GHz, and the installed memory is 4GB.

[0084] 2) Experimental results:

[0085] The experimental results are as follows Figure 5 As shown, compared with the test image, the image repaired by the method of the present invention has the black background part removed; the contrast of the area with lower brightness is improved, and the originally blurred vascular tissue becomes clear to a certain extent; the obvious light spot part in the original image is repaired in the result, and compared with the original image, the visual effect of the result image is better, which is also conducive to doctors to re-examine the diagnosis results of the computer-aided system, and has good practical engineering application value.

[0086] The contents described in this specification are merely an enumeration of the implementation forms of the inventive concept and are for illustrative purposes only. The protection scope of the present invention should not be considered to be limited to the specific forms described in this embodiment, and the protection scope of the present invention is also based on the equivalent technical means that can be thought of by ordinary technicians in this field based on the inventive concept.

Claims

1. A gastrointestinal endoscopic image preprocessing method including information screening and fusion repair, characterized in that: The method comprises the following steps: Step 1: Obtain the image to be processed. The experimental data set is a partial endoscopic image data set provided by cooperating doctors, which contains images of various types, shapes and colors, with or without polyps; Step 2, the key information extractor screens the endoscope image information; The key information extractor automatically detects the effective information area of ​​the image based on the input endoscope image information, calculates the vertex and side length information of the largest inscribed square inside it, and extracts all the information in this square based on this information as The key information extractor performs a second extraction using the rotation transformation matrix T: Where θ is the rotation angle; The original image is rotated 45° around the central pixel point, and the invalid filling part caused by the rotation is removed to extract Method to extract new effective information area Step 3: Equalize the image using the improved EACE method and Brightness; For the pixel point X in the figure, its pixel value is f x (i,j), calculate its local mean m x (i,j) and the local standard deviation σ x (i,j), and f is calculated using the following formula x (i,j) enhanced pixel value I x (i,j): I x (i,j)=m x (i,j)+G(f x (i,j)-m x (i,j)) (2) Where M is the global average, α is the enhancement parameter, and σ in the high-frequency region x (i, j) is large, the gain is small, and it will not be too bright after enhancement. The σ of the low-frequency part x (i, j) is small, and the gain G is large, the brightness value of this area will be improved; the V channel of the image is gamma-converted and the channel generation results are finally merged to obtain an endoscope image with better brightness; Step 4, design a two-image matching fusion repair method to repair the light spot area in the image; In step 4, the two-image matching fusion repair method repairs the spot area in the endoscope image, and the processing process is as follows: 4.1 Use threshold detection to locate the position of the light spot in the image and correspond to the light spot mask Middle mark; 4.2 Spot Mask Do a closing operation to get the dilated mask use and Get edge mask use Get the color parameters of the normal area around the light spot and fill it with the normal color parameters. The marked light spot pixels; 4.3 Fill the initial restoration with normal color parameters Perform Gaussian filtering to balance the patched spot area with the overall area; 4.4 Using a mask Extract the repaired spot part, and the repaired spot part is Perform matching and fusion; 4.5 Repair the fusion marks at the edges and eliminate the unnatural repair marks. The preprocessing is completed.