An Endoscopic Image Enhancement Method Based on Quadratic Weighted Fast Guided Filtering

The endoscopic image enhancement method based on quadratic weighted fast guided filtering solves the problems of low contrast and blurred details in endoscopic images, improves image contrast and detail texture, and reduces algorithm complexity and increases computation speed.

CN116468627BActive Publication Date: 2025-12-02QINGDAO NOVELBEAM TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310337174.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2025-12-02
Estimated Expiration
2043-03-31

AI Technical Summary

Technical Problem

Endoscopic images are affected by uneven illumination sources, circuit interference, and thermal noise, resulting in low image contrast and blurred details, which increases the difficulty of diagnosis.

Method used

An endoscopic image enhancement method based on quadratic weighted fast guided filtering is adopted, which includes three-channel component extraction, color space conversion, contrast enhancement, and quadratic weighted fast guided filtering algorithm for detail and texture enhancement. Power function stretching of contrast and wavelet denoising are used to improve image contrast and preserve edge details.

Benefits of technology

It improves the contrast and detail texture information of endoscopic images, filters out noise, has low algorithm complexity and fast operation speed, and preserves the edge features of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116468627B_ABST
    Figure CN116468627B_ABST
Patent Text Reader

Abstract

This invention designs an endoscopic image enhancement method based on double-weighted fast guided filtering, belonging to the field of image processing. This method processes endoscopic images by first extracting the R, G, and B three-channel components from the original Bayer format endoscopic image; then converting the image from RGB three-channel components to the YUV color space; the luminance component Y is first contrast-stretched, then enhanced by double-weighted fast guided filtering, and its detail layer is subjected to wavelet transform to filter out noise; finally, the enhanced luminance component Y is merged with the chrominance components U and V for output. The image processed by this algorithm shows enhanced detail and texture information and filters out noise generated during the enhancement process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of endoscopic image processing, and specifically to an endoscopic image enhancement method based on secondary weighted fast guided filtering. Background Technology

[0002] In the context of the continuous and in-depth development and innovation of science and technology, medical technology is no longer limited to the methods of doctors' experience and analysis. It is increasingly linked to computer technology and electronic technology, with different fields developing in an interdisciplinary manner. As a result, endoscopic application technology has matured and become a widely used medical device in surgical applications. However, the images captured by the endoscope are affected by uneven lighting, circuit interference, thermal noise, and other factors, resulting in low image contrast and blurred details. This seriously affects the display quality of subsequent images and increases the difficulty of diagnosis for doctors during surgery. Therefore, the repair and enhancement of endoscopic images are crucial. Endoscopic image enhancement effectively improves the recognition of endoscopic images, filters out image noise, and enhances the details of blood vessel edges.

[0003] Currently, traditional image enhancement methods can be divided into three categories: spatial domain processing, frequency domain enhancement, and human perception model-based methods. Histogram processing algorithms are commonly used in the spatial domain, which are global processing methods that do not distinguish between background and information, potentially reducing the contrast of useful information in the image. Homomorphic filtering algorithms are frequently used in the frequency domain, which are effective for processing images with uneven lighting, enhancing detail while compressing the dynamic range of the image; however, the algorithm has high computational complexity. Human perception model-based algorithms, such as the Retinex algorithm, are prone to producing halo effects that affect image quality. Guided filtering (GIF) is currently a fast and promising edge-preserving filter. Its basic principle is to perform different linear transformations on the guide image and the input image to obtain the final output image. The output image retains the texture details and edge features of the guide image while maintaining a similar overall pixel structure to the input image. Guided filtering algorithms have advantages such as fast processing speed, low computational cost, and avoidance of gradient inversion. Several research groups both domestically and internationally have conducted applied research on it in image processing. Combining fast guided filters with matched filters, the joint filtering model has shown good enhancement effects on abnormal retinal images with low original vascular contrast. To address the edge coarsening problem of guided filters, the brightness of the base layer image is compressed, and multi-scale filtering operations are performed on the detail layer, improving the HDR image mapping effect. The weights in the fast guided filtering algorithm have been improved, resulting in better robustness to regularization parameters. Therefore, fast weighted guided filtering has great research potential and application value in image processing. However, research on endoscopic image processing and detail texture enhancement is insufficient, urgently requiring an endoscopic image enhancement algorithm that can be applied to endoscopic images to improve detail contrast and enhance image detail texture information. Summary of the Invention

[0004] In view of the above, the purpose of this invention is to improve the image quality acquired by endoscopy, so as to solve the problems of low contrast and unclear distinction of texture details such as blood vessels in the captured images.

[0005] To achieve the above research results, this invention provides an endoscopic image enhancement method based on quadratic weighted fast guided filtering, the specific algorithm steps of which are as follows:

[0006] S1. Three-channel component extraction: The original Bayer format endoscope image is subjected to R, G, and B three-channel component extraction. The pixel information of a single color channel under the Bayer format is extracted, and the pixel values ​​of the other two color channels of the pixel at this position are set to zero.

[0007] S2. Color space conversion: The RGB color format data is converted to the YUV color space to obtain the three components of the image: the luminance component Y and the chrominance components U and V. Subsequent steps will process the luminance component of the image.

[0008] S3. Contrast Enhancement: The luminance component Y is enhanced using a power function contrast stretching formula to improve the overall image contrast. The contrast stretching formula is as follows:

[0009] Y en (x,y)=α*Y(x,y) θ

[0010] Among them, Y en (x,y) represents the pixel value of the output image luminance component after contrast stretching at point (x,y), Y(x,y) represents the pixel value of the input image luminance component at point (x,y), θ represents the image power function enhancement factor, α is the fine-tuning factor, α takes values ​​in the range of [0,1], and θ takes values ​​in the range of [0.3,0.8].

[0011] S4. Detail and Texture Enhancement: The luminance component after contrast stretching is enhanced with a double-weighted fast guided filter algorithm. The luminance component is separated into base layer data and detail layer data by weighted fast guided filtering. Then, wavelet denoising and sharpening are performed on the separated detail layer data. The sharpened and enhanced detail layer data is combined with the base layer data to form the enhanced luminance component. The enhanced luminance component is used as a guide map for double-weighted fast guided filtering, followed by wavelet transform to remove noise, completing the luminance enhancement process. The specific algorithm implementation steps are as follows:

[0012] S41. The luminance component Y after contrast stretching en Using the original luminance component Y as the input image, a guide map is generated and weighted fast guided filtering is applied to separate the base layer data Y. bas and detail layer data Y det The expression for the weighting factor introduced in fast guided filtering is:

[0013]

[0014] in is the variance of pixel values ​​of the image luminance component, and N is the total amount of luminance component data;

[0015] S42. For the separated detail layer data Y det Wavelet thresholding denoising is performed to filter out high-frequency noise components carried in the detail layer, resulting in the denoised detail layer data Y. det_dn ;

[0016] S43. Move the detail layer Y det_dnAfter sharpening, the Y component of the base layer is compared with the base layer component. bas The combined components yield the enhanced luminance component Y. en1 Its expression is:

[0017] Y en1 =β*Y det_dn +Y bas

[0018] Where β is the detail layer sharpening factor, and the value of β ranges from [1, 5];

[0019] S44. Enhance the luminance component Y en1 The input image is the luminance component Y after contrast stretching. en Create a guide diagram and repeat steps S41, S42, and S43 to obtain the enhancement component Y. en2 ;

[0020] S5. Component merging, for the enhanced Y en2 The original U and V components are combined to obtain newly synthesized enhanced YUV color space data, i.e., enhanced endoscope image, thus ending the image processing flow.

[0021] This invention provides an endoscopic image enhancement algorithm suitable for enhancing details and textures in dark areas, which solves the problems of low contrast and blurred details and textures in captured images. The beneficial effects of this invention are: (1) When processed in Bayer format, the noise filtering and detail and texture enhancement effects are better; (2) Compared with the single-guided filtering algorithm, a secondary guided process is added, which can better preserve the edge details of the image; (3) Compared with Retinex image algorithm, the algorithm of this invention has lower complexity and faster operation speed. Attached Figure Description

[0022] Figure 1 This is a flowchart illustrating a specific method for enhancing endoscopic images based on a second-weighted fast guided filter, according to the present invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0024] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0025] To keep the following description of the embodiments of the present invention clear and concise, detailed descriptions of some known functions and components have been omitted.

[0026] Reference Figure 1 This example designs an endoscopic image enhancement method based on quadratic weighted fast guided filtering, implemented on 1080P Bayer images. The algorithm specifically includes the following steps:

[0027] S1. Three-channel component extraction: The original Bayer format endoscope image is subjected to R, G, and B three-channel component extraction. The pixel information of a single color channel in Bayer format is extracted. The pixel values ​​of the other two color channels at this position are set to zero. Taking the RGGB format Bayer image as an example, when extracting the R channel pixel value, the B and G color channel values ​​at this point are set to zero.

[0028] S2. Color Space Conversion: The extracted R, G, and B channel components are converted to the YUV color space. The specific conversion formula is as follows:

[0029]

[0030] The converted luminance component Y has a value range of [0, 1].

[0031] S3. Contrast Enhancement: The luminance component Y is enhanced using a power function contrast stretching formula to improve the overall image contrast. The contrast stretching formula is as follows:

[0032] Y en (x,y)=α*Y(x,y) θ

[0033] Among them, Y en(x,y) represents the pixel value of the output image luminance component after contrast stretching at point (x,y), Y(x,y) represents the pixel value of the input image luminance component at point (x,y), θ represents the image power function enhancement factor, and α is the fine-tuning factor. The value range of θ is [0.3,0.8], and the value range of α is [0,1].

[0034] S4. Detail and texture enhancement: The luminance component after contrast stretching is enhanced with a double-weighted fast guided filter algorithm, including the following steps:

[0035] Step S41. Luminance component Y en Using the original luminance component Y as the input image, a weighted fast guided filter is applied to create a guide map to separate the base layer data and detail layer data. Specifically:

[0036] S411. Downsample the input image and guide image, with a sampling step size of [value missing]. s represents the subsampling rate, with values ​​ranging from 2, 4, 8, to 16;

[0037] S412. Calculate the weighted fast guided filter coefficients a k For coefficient a k Calculate the coefficient b after upsampling k The specific expression is as follows:

[0038]

[0039] b k =(1-a k )*μ k

[0040] Where w k Represents the neighborhood window size, μ k This represents the mean of the guide graph within its neighborhood. This represents the mean of the input image within its neighborhood. This represents the mean of the product of corresponding pixels in the input image and the guide image within their neighborhood. γ represents the variance of the guide diagram. Y Indicates the introduced weighting variable factors: N is the total amount of input image data, and the upsampling process uses the bilinear interpolation algorithm;

[0041] S413. According to a k b k The corresponding output base layer data and detail layer data are calculated using the following expressions:

[0042] Y bas =a k *Y en +b k

[0043] Y det =Y en -Y bas

[0044] Step S42. Perform wavelet denoising on the separated detail layer data; specifically: denoise the detail layer component Y... det Wavelet transform two-scale decomposition is performed to distinguish low-frequency and high-frequency information. The separated low-frequency components carry most of the information, while the high-frequency horizontal, vertical, and diagonal components contain weak edge information and noise. A soft thresholding method is used for the high-frequency components, and segmentation is performed according to the set threshold [0.24, 0.96]. Within this range, the peak signal-to-noise ratio is better and the visual noise filtering effect is optimal. The processed low-frequency and high-frequency components are then subjected to inverse wavelet transform to obtain the denoised detail layer component Y. det_dn The coif2 wavelet function is preferred for the denoising and inverse transform process.

[0045] Step S43. The sharpened detail layer data and the base layer data are fused to form the enhanced luminance component; specifically, the detail layer Y... det_dn After sharpening, the Y component of the base layer is compared with the base layer component. bas Image fusion yields the enhanced luminance component Y. en1 Its expression is:

[0046] Y e x1=β*Y det_dn +Y bas

[0047] β is the detail layer sharpening factor. When the value of β is in the range of [1, 5], the visual effect is better and the information entropy and peak signal-to-noise ratio are better.

[0048] Step S44. The enhanced luminance component is used as the input image, and then subjected to secondary weighted fast guided filtering followed by wavelet transform to remove noise, thus completing the luminance enhancement process; specifically, the enhanced luminance component Y is... en1 The input image is the luminance component Y after contrast stretching. en Create a guide diagram and repeat steps S41, S42, and S43 to obtain the enhancement component Y. en2 In the second improvement process, the wavelet transform threshold is [0.16, 0.96]. Within this range, the peak signal-to-noise ratio is the largest and the visual noise filtering effect can be the best.

[0049] S5. Component merging, for the enhanced Y en2 The original U and V components are combined to obtain newly synthesized enhanced YUV color space data, i.e., enhanced endoscope image, thus ending the image processing flow.

[0050] In summary, the endoscopic image enhancement method based on double-weighted fast guided filtering provided by this invention extracts the R, G, and B channel image data from a Bayer format image and converts it to the YUV color space to obtain the luminance component Y and chrominance components U and V. The luminance component Y is first subjected to contrast stretching, and the details in dark areas are stretched using a power function. Then, a double-weighted fast guided filtering algorithm is applied, and noise reduction processing is added to further highlight the details at the image edges. This algorithm achieves image contrast and texture enhancement while filtering out noise interference that may be caused during the enhancement process.

Claims

1. An endoscopic image enhancement method based on quadratic weighted fast guided filtering, characterized in that, Includes the following steps: S1. Three-channel component extraction: R, G, and B three-channel components are extracted from the original Bayer format endoscope image; S2. Color space conversion: The extracted R, G, and B channel components are converted to the YUV color space to obtain the three component information of the image: the luminance component Y and the chrominance components U and V. S3. Contrast Enhancement: The luminance component Y is enhanced with a power function contrast stretching formula to improve the overall image contrast. S4. Detail and Texture Enhancement: The luminance component after contrast stretching is enhanced using a double-weighted fast guided filtering algorithm to improve detail and texture while preserving image edges. Then, wavelet transform is applied to filter out noise, yielding the enhanced luminance component. ; S41. Brightness component after contrast stretching Using the original luminance component Y as the input image, a guide map is generated and weighted fast guided filtering is applied to separate the base layer data. and detail layer data Introducing weighting factors into fast guided filtering Its expression is: ,in is the variance of pixel values ​​of the image luminance component, and N is the total amount of luminance component data; S42. Separate detail layer data Wavelet thresholding denoising is performed to filter out high-frequency noise components carried in the detail layer, resulting in denoised detail layer data. ; S43. Detail layer After sharpening, the components of the base layer are compared. Image fusion is performed to obtain the enhanced luminance component. ; S44. Enhance the luminance component Input image, luminance component after contrast stretching Create a guide diagram and repeat steps S41, S42, and S43 to obtain the enhancement component. ; S5. Component merging, for the enhanced The original U and V components are combined to obtain newly synthesized enhanced YUV color space data, i.e., enhanced endoscope image.

2. The endoscopic image enhancement method based on quadratic weighted fast guided filtering according to claim 1, characterized in that, Step S1 extracts the R, G, and B three-channel components from the original Bayer format endoscope image, extracts the pixel data of the corresponding single color channel, and sets the pixel values ​​of the other two color channels to zero at the current pixel data position.

3. The endoscopic image enhancement method based on quadratic weighted fast guided filtering according to claim 1, characterized in that, Step S2 converts the R, G, and B channel components to the YUV color space. The specific conversion formula is as follows: The converted luminance component Y has a value range of [0,1].

4. The endoscopic image enhancement method based on quadratic weighted fast guided filtering according to claim 1, characterized in that, The contrast stretching formula in step S3 is: , The value range is [0,1]. The value range is [0.3, 0.8].

5. The endoscopic image enhancement method based on quadratic weighted fast guided filtering according to claim 1, characterized in that, Step S4 is: combining the second-weighted fast guided filtering with wavelet denoising to filter out noise in the endoscopic image. The first-improvement wavelet denoising threshold is [0.24, 0.96], and the wavelet transform threshold in the second-improvement process is [0.16, 0.96].

Citation Information

Patent Citations

  • Endoscope image enhancement method based on histogram equalization and improved unsharpened mask

    CN113989147A

  • Infrared image enhancement method based on weighted guide filtering

    CN114092353A