A method for real-time vertical stripe removal of endoscopic images

By extracting the pixel coordinates of vertical stripes and calculating weighting coefficients, vertical stripes in endoscopic images can be removed in real time, solving the problem of vertical stripes affecting observation in endoscopic images and improving image clarity and operational efficiency.

CN117094901BActive Publication Date: 2026-05-29SHANGHAI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI UNIV
Filing Date
2023-06-14
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In endoscopic images, the photosensitive element has different sensitivities to different wavelengths of light, resulting in obvious and dense vertical stripes that affect the operator's observation.

Method used

A monochrome image is pre-captured, and the coordinates of the vertical stripe pixels are extracted as a processing template. Weighting coefficients are calculated, and the brightness values ​​of the pixels on both sides of the template coordinates are used to smooth the image in the online image to remove the vertical stripes in real time.

Benefits of technology

It enables real-time and efficient removal of vertical stripes in endoscopic images, improving the operator's observation efficiency and image clarity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117094901B_ABST
    Figure CN117094901B_ABST
Patent Text Reader

Abstract

A method for real-time removal of vertical stripes in endoscope images, comprising: (1) before use of the endoscope, pre-use of the endoscope to take a monochrome image, and offline obtain a clear vertical stripe image; (2) extract the coordinates of the vertical stripe pixel points from the image as a vertical stripe processing template; (3) obtain the stripe width information and position information at each pixel point in the vertical stripe processing template, and store them in the vertical stripe processing template; (4) during use of the endoscope, in the image taken online by the endoscope, calculate the brightness information of each pixel in the image corresponding to the coordinates of the vertical stripe processing template, and fill the brightness information into the pixels of the image. Compared with the conventional method of filtering out stripes by processing the entire image, this method only processes the pixel information on the image corresponding to the stripe template coordinates, greatly reducing the number of pixel points that need to be calculated, and achieving real-time removal of vertical stripes in the endoscope image display process, facilitating real-time observation by the operator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of endoscopic image denoising, specifically a method for real-time removal of vertical stripes from endoscopic images. Background Technology

[0002] With the development of science and technology, endoscopes have become a widely used medical instrument. Using endoscopes allows operators to directly observe the internal environment of a patient's gastrointestinal tract, greatly improving the efficiency and accuracy of treatment. However, endoscopes are limited by their application environment; the photosensitive elements they use have different sensitivities to different wavelengths of light. This causes grayscale differences between adjacent pixel columns in the image after analog-to-digital conversion, manifesting as obvious and dense vertical stripes, which affect the operator's observation. Therefore, a method for real-time removal of vertical stripes from endoscopic images is needed to quickly eliminate image noise and facilitate operator observation. Summary of the Invention

[0003] The purpose of this invention is to overcome the drawback of vertical stripes in endoscopic images and to provide a method for real-time removal of vertical stripes from endoscopic images. This method can remove vertical stripes from images in real time and efficiently, making it convenient for operators to observe the internal condition of patients.

[0004] To achieve the above objectives, the present invention provides a method for real-time removal of vertical stripes from endoscopic images as follows:

[0005] The method for real-time removal of vertical stripes from endoscopic images is characterized by comprising the following steps:

[0006] (1) Before using the endoscope, take a monochrome image with the endoscope to obtain a clear vertical stripe image offline;

[0007] (2) Extract the coordinates of the vertical stripe pixels from the image and use them as a template for vertical stripe processing;

[0008] (3) Obtain the width information of the vertical stripes and the position information of the pixels in the vertical stripes relative to the vertical stripes according to the template to calculate the weight coefficients and store them in the template;

[0009] (4) When using the endoscope, the brightness value of the pixels on both sides of the template coordinates and the information recorded in the template are used to obtain the smoothed brightness value and fill it into the corresponding position of the template in the online captured image.

[0010] Preferably, step (1), which involves pre-capturing a monochrome image using an endoscope to obtain a clear vertical stripe image offline, specifically includes the following processing steps:

[0011] (1-1) To avoid the problem of unclear vertical stripe contrast in concentrated light areas and high difficulty in obtaining templates caused by uneven lighting, the background color of the obtained case image should be as dark as possible.

[0012] (1-2) When acquiring monochrome images, avoid oversaturation in areas of concentrated light. The object being photographed should be kept as far away from the endoscope as possible, and the light intensity of the endoscope should be reduced.

[0013] Preferably, step (2), which involves extracting the coordinates of the vertical stripe pixels from the image as a template for processing vertical stripes, specifically includes the following processing steps:

[0014] (2-1) Binarize the image case obtained in step (1) to increase the vertical stripe contrast;

[0015] (2-2) Convert the captured monochrome image into a binary image containing only vertical stripe information, and record the pixel coordinates (x,y) representing the vertical stripe distribution;

[0016] Preferably, the specific steps of step (3) of obtaining the width information of the vertical stripes and the position information of the pixels in the vertical stripes relative to the vertical stripes based on the template to calculate the weight coefficients and storing them in the template include the following processing procedures:

[0017] (3-1) Based on the vertical stripe distribution coordinates recorded in step (2-2), record the width w of each vertical stripe in each row of the image. ij , where w ij This represents the width of the pixel region of the i-th vertical stripe in the j-th row;

[0018] (3-2) Record the wth digit above. ij The position of each vertical stripe pixel in a pixel region is S. ij For example, the second pixel in the vertical stripe region of the i-th vertical stripe in the j-th row, its S ij =2;

[0019] (3-3) According to w ij With S ij Calculate the weight coefficients α and β required for each vertical stripe pixel during subsequent smoothing processing.

[0020] (3-4) Bind the coordinates of each vertical stripe pixel to the corresponding weight coefficients α and β and store them in the data structure to complete the template creation.

[0021] Preferably, step (4) of calculating the brightness information of each pixel in the image corresponding to the coordinates of the vertical stripe processing template specifically includes the following processing steps:

[0022] (4-1) Traverse each vertical stripe pixel in the template. For each vertical stripe pixel, obtain the brightness value of the first colored pixel on both sides of it.

[0023] (4-2) Calculate the brightness value of this point using the following formula:

[0024] G = α * B ij +* ij

[0025] Where G is the modified brightness value of the pixel at that point, α and β are the weight coefficients stored in the template, and A ij Let B be the brightness value of the first colored pixel A to the left of this point. ij This is the brightness value of the first colored pixel B to the right of this point.

[0026] Compared with the prior art, the beneficial effects of the present invention are:

[0027] Compared to conventional methods that process and filter stripes from the entire image, this method only processes the pixel information on the image corresponding to the stripe template coordinates, which greatly reduces the number of pixels that need to be calculated. This enables real-time removal of vertical stripes during the display of endoscopic images, facilitating real-time observation by operators. Attached Figure Description

[0028] Figure 1 This is a flowchart of the method for removing vertical stripes in endoscopic images according to the present invention.

[0029] Figure 2 This is a schematic diagram of the vertical stripe distribution in the method for removing vertical stripes in endoscopic images according to the present invention.

[0030] Figure 3 This is a schematic diagram of the parameters and some formulas of the method for removing vertical stripes in endoscopic images according to the present invention. Detailed Implementation

[0031] To more clearly describe the technical content of the present invention, further description is provided below in conjunction with embodiments and accompanying drawings.

[0032] Please see Figure 1 , Figure 1 The flowchart of the method for removing vertical stripes in endoscopic images according to the present invention is shown in the figure, and includes the following steps:

[0033] S1. Before using the endoscope, take monochrome images using the endoscope to obtain clear vertical striped monochrome images of the endoscope offline. Specifically:

[0034] To avoid the problems of unclear vertical stripe contrast in concentrated areas of light and high difficulty in obtaining templates caused by uneven lighting, the background color of the endoscopic monochrome image sample should be as dark as possible.

[0035] When acquiring endoscopic monochrome image samples, avoid oversaturation of the image in areas of concentrated light, keep the object as far away from the endoscope as possible, and reduce the light intensity of the endoscope.

[0036] S2. Extract the coordinates of the vertical stripe pixels from the endoscopic monochrome image sample and use them as a template for vertical stripe processing. Specifically:

[0037] (2-1) Binarize the endoscopic monochrome image sample obtained in step (1) to increase the vertical stripe contrast;

[0038] (2-2) Convert the captured monochrome image into a binary image containing only vertical stripe information, and record the pixel coordinates (x,y) representing the vertical stripe distribution;

[0039] S3. Obtain the width information of the vertical stripes and the position information of the pixels in the vertical stripes relative to the vertical stripes based on the vertical stripe processing template, calculate the weight coefficients, and store them in the vertical stripe processing template. Specifically:

[0040] (3-1) Based on the vertical stripe distribution coordinates recorded in step (2-2), record the width w of each vertical stripe in each row of the image. ij , where w ij This represents the width of the pixel region of the i-th vertical stripe in the j-th row;

[0041] (3-2) Record the wth digit above. ij The position of each vertical stripe pixel in a pixel region is S. ij For example, the second pixel in the vertical stripe region of the i-th vertical stripe in the j-th row, its S ij =2;

[0042] (3-3) According to w ij With S ij Calculate the weight coefficients α and β required for each vertical stripe pixel during subsequent smoothing processing.

[0043] (3-4) Bind the coordinates of each vertical stripe pixel to the corresponding weight coefficients α and β and store them in the data structure to complete the template creation.

[0044] S4. When using the endoscope, the smoothed brightness value is obtained from the online captured image using the brightness values ​​of the pixels on both sides of the template coordinates and the information recorded in the template, and then filled into the corresponding position of the template.

[0045] (4-1) Traverse each vertical stripe pixel in the template. For each vertical stripe pixel, obtain the brightness value of the first colored pixel on both sides of it.

[0046] (4-2) Calculate the brightness value of this point using the following formula:

[0047] G = α * B ij +* ij

[0048] Where G is the modified brightness value of the pixel at that point, α and β are the weight coefficients stored in the template, and A ij Let B be the brightness value of the first colored pixel A to the left of this point. ij This is the brightness value of the first colored pixel B to the right of this point.

[0049] In one specific embodiment of the present invention, the technical solution is implemented in the following manner:

[0050] (S1) Pre-capture monochrome images using an endoscope to obtain clear vertical stripe images offline;

[0051] (S2) Extract the coordinates of the vertical stripe pixels from the image and use them as a template for vertical stripe processing;

[0052] (S2-1) Binarize the image sample obtained in step (S1) to increase the vertical stripe contrast, converting the captured monochrome image into a binarized image containing only vertical stripe information.

[0053] (S2-2) Establish a coordinate system with the top left corner of the original image as the origin, with the coordinates of the origin being (0, 0). The positive x-axis runs from left to right, and the positive y-axis runs from top to bottom. Record the coordinates (x, y) of all pixels with a brightness value of 255 to represent the distribution of the vertical stripes.

[0054] (S3) Obtain the width information of the vertical stripes and the position information of the pixels in the vertical stripes relative to the vertical stripes according to the template to calculate the weight coefficients and store them in the template;

[0055] (S3-1) Based on the vertical stripe distribution coordinates recorded in step (S2-2), record the width w of each vertical stripe in each row of the image. ij , where w ij This represents the width of the pixel region of the i-th vertical stripe in the j-th row;

[0056] (S3-2) Record the wth bit above. ij The position of each vertical stripe pixel in a pixel region is S. ij For example, the second pixel in the vertical stripe region of the i-th vertical stripe in the j-th row, its S ij =2;

[0057] (S3-3) According to w ij With S ijCalculate the weight coefficients α and β required for each vertical stripe pixel in subsequent smoothing processing. α represents the weight of the first colored pixel from the right for that pixel, and β represents the weight of the first colored pixel from the left for that pixel. When smoothing pixels in the vertical stripe region, the weight of colored pixels closer to the vertical stripe is lower, and vice versa. In the calculation method, the weight parameters are calculated using the distance from the vertical stripe pixel to the colored pixels on both sides. This distance can be represented by w. ij With S ij Perform representation

[0058] Furthermore, the weighting coefficients for the smoothing process are calculated as follows:

[0059] D left =S ij ;

[0060] D right =w ij +1-S ij ;

[0061] D sum =D left +D right ;

[0062]

[0063]

[0064] Where D left D is the distance between the vertical stripe pixel and the first colored pixel on the left. right D is the distance between the vertical stripe pixel and the first colored pixel on the right. sum This is the distance between the first colored pixel on either side of the vertical stripe pixel.

[0065] (S3-4) Bind the coordinates (x, y) of each vertical stripe pixel to the corresponding weight coefficients α and β and store them in an array to complete the template creation.

[0066] (S4) Traverse each vertical stripe pixel in the template. For each vertical stripe pixel, obtain the coordinates of the first colored pixel on both sides of it, and continue to step (S5) according to its brightness value.

[0067] Furthermore, the method for obtaining the coordinates of the first colored pixel on both sides is as follows:

[0068] P A =(xS) ij ,y);

[0069] P B =(x+w) ij +1-Sij ,y);

[0070] Where P A Let P be the coordinates of the first colored pixel A to the left of the vertical stripe pixel, where P B The coordinates are those of the first colored pixel B to the right of the vertical stripe pixel.

[0071] (S5) Calculate the brightness value of this point according to the following formula:

[0072] G = α * B ij +* ij

[0073] Where G is the modified brightness value of the pixel at that point, α and β are the weight coefficients stored in the template, and A ij Let B be the brightness value of the first colored pixel A to the left of this point. ij This is the brightness value of the first colored pixel B to the right of this point.

[0074] Please see Figure 2 As shown, the method for removing vertical stripes from endoscopic images, wherein extracting the coordinates of the vertical stripe pixels from the image as a vertical stripe processing template specifically includes the following steps:

[0075] (S2) Extract the coordinates of the vertical stripe pixels from the image and use them as a template for vertical stripe processing;

[0076] (S2-1) Binarize the image sample obtained in step (S1) to increase the vertical stripe contrast, converting the captured monochrome image into a binarized image containing only vertical stripe information.

[0077] (S2-2) Establish a coordinate system with the top left corner of the original image as the origin, with the coordinates of the origin being (0, 0). The positive x-axis runs from left to right, and the positive y-axis runs from top to bottom. Record the coordinates (x, y) of all pixels with a brightness value of 255 to represent the distribution of the vertical stripes.

[0078] (S3) Obtain the width information of the vertical stripes and the position information of the pixels in the vertical stripes relative to the vertical stripes according to the template to calculate the weight coefficients and store them in the template;

[0079] (S3-1) Based on the vertical stripe distribution coordinates recorded in step (S2-2), record the width w of each vertical stripe in each row of the image. ij , where w ij This represents the width of the pixel region of the i-th vertical stripe in the j-th row;

[0080] (S3-2) Record the wth bit above. ij The position of each vertical stripe pixel in a pixel region is S.ij For example, the second pixel in the vertical stripe region of the i-th vertical stripe in the j-th row, its S ij =2;

[0081] (S3-3) According to w ij With S ij Calculate the weight coefficients α and β required for each vertical stripe pixel in subsequent smoothing processing. α represents the weight of the first colored pixel from the right for that pixel, and β represents the weight of the first colored pixel from the left for that pixel. When smoothing pixels in the vertical stripe region, the weight of colored pixels closer to the vertical stripe is lower, and vice versa. In the calculation method, the weight parameters are calculated using the distance from the vertical stripe pixel to the colored pixels on both sides. This distance can be represented by w. ij With S ij Perform representation

[0082] Furthermore, the weighting coefficients for the smoothing process are calculated as follows:

[0083] D left = ij ;

[0084] D right =w ij +1-S ij ;

[0085] D sum =D left +D right ;

[0086]

[0087]

[0088] Where D left D is the distance between the vertical stripe pixel and the first colored pixel on the left. right D is the distance between the vertical stripe pixel and the first colored pixel on the right. sum This is the distance between the first colored pixel on either side of the vertical stripe pixel.

[0089] (S3-4) Bind the coordinates (x, y) of each vertical stripe pixel to the corresponding weight coefficients α and β and store them in an array to complete the template creation.

[0090] Please see Figure 3As shown, the method for removing vertical stripes in endoscopic images includes the following steps: obtaining the width information of the vertical stripes and the position information of the pixels in the vertical stripes relative to the vertical stripes based on a template to calculate weight coefficients; and obtaining smoothed brightness values ​​from the brightness values ​​of pixels on both sides of the template coordinates and the information recorded in the template in the online captured image and filling them into the corresponding positions of the template.

[0091] (S3-1) Based on the vertical stripe distribution coordinates recorded in step (S2-2), record the width w of each vertical stripe in each row of the image. ij , where w ij This represents the width of the pixel region of the i-th vertical stripe in the j-th row;

[0092] (S3-2) Record the wth bit above. ij The position of each vertical stripe pixel in a pixel region is S. ij For example, the second pixel in the vertical stripe region of the i-th vertical stripe in the j-th row, its S ij =2;

[0093] (S3-3) According to w ij With S ij Calculate the weight coefficients α and β required for each vertical stripe pixel in subsequent smoothing processing. α represents the weight of the first colored pixel from the right for that pixel, and β represents the weight of the first colored pixel from the left for that pixel. When smoothing pixels in the vertical stripe region, the weight of colored pixels closer to the vertical stripe is lower, and vice versa. In the calculation method, the weight parameters are calculated using the distance from the vertical stripe pixel to the colored pixels on both sides. This distance can be represented by w. ij With S ij Perform representation

[0094] Furthermore, the weighting coefficients for the smoothing process are calculated as follows:

[0095] D left =S ij ;

[0096] D right =w ij +1-S ij ;

[0097] D sum =D left +D right ;

[0098]

[0099]

[0100] Where D left D is the distance between the vertical stripe pixel and the first colored pixel on the left. right D is the distance between the vertical stripe pixel and the first colored pixel on the right. sum This is the distance between the first colored pixel on either side of the vertical stripe pixel.

[0101] (S3-4) Bind the coordinates (x, y) of each vertical stripe pixel to the corresponding weight coefficients α and β and store them in an array to complete the template creation.

[0102] (S4) Traverse each vertical stripe pixel in the template. For each vertical stripe pixel, obtain the coordinates of the first colored pixel on both sides of it, and continue to step (S5) according to its brightness value.

[0103] Furthermore, the method for obtaining the coordinates of the first colored pixel on both sides is as follows:

[0104] P A =(xS) ij ,);

[0105] P B =(x+w) ij +1- ij ,);

[0106] Where P A Let P be the coordinates of the first colored pixel A to the left of the vertical stripe pixel, where P B The coordinates are those of the first colored pixel B to the right of the vertical stripe pixel.

[0107] The method for real-time removal of vertical stripes from endoscopic images using the present invention can remove vertical stripes from endoscopic images in real time while the endoscope is continuously transmitting images. It is highly efficient and stable, and can improve the clarity of images when using an endoscope, thereby greatly improving the efficiency of the operator's observation.

Claims

1. A method for real-time removal of vertical stripes from endoscopic images, characterized in that, Includes the following steps: S1. Use an endoscope to capture monochrome images to obtain endoscopic monochrome images with vertical stripes; S2. Offline template creation for vertical stripes: S2.1 Extract the pixel coordinates of the vertical stripes in the endoscopic monochrome image; S2.2 Obtain the width information of the vertical stripes in the endoscopic monochrome image and the position information of the pixels in the vertical stripes relative to the vertical stripes; S2.3 Based on the coordinates of each vertical stripe pixel and its corresponding weight coefficient and Construct a template for vertical stripe processing; S3. Using the vertical stripe processing template, process endoscopic monochrome images online in real time; Step S2.2 involves obtaining the width information of the vertical stripes in the endoscopic monochrome image and the position information of the pixels within the vertical stripes relative to the stripes. The specific steps are as follows: S2.2.1 Based on the distribution coordinates of the vertical stripes, record the width of each vertical stripe in each row of the image. ,in This represents the width of the pixel region of the i-th vertical stripe in the j-th row; S2.2.2 Record number The position of each vertical stripe pixel in a pixel region is: ; S2.2.3 Based on the width of each pixel region The position of each pixel in the width of the pixel region Calculate the weighting coefficients and The formula is as follows: ; Step S3 utilizes the vertical stripe processing template to process endoscopic monochrome images online in real time. The specific steps are as follows: S3-1 Iterates through each vertical stripe pixel in the vertical stripe processing template and obtains the brightness value of the first colored pixel on the left and right sides of each vertical stripe pixel. The expressions for the coordinates of the left colored pixel A and the right colored pixel B are as follows: S3-2 Calculate the brightness value of this point using the following formula: Where G is the modified brightness value of the pixel at that point. and The weight coefficients stored in the template. This is the brightness value of the first colored pixel A to the left of this point. This is the brightness value of the first colored pixel B to the right of this point.

2. The method for real-time removal of vertical stripes from endoscopic images according to claim 1, characterized in that, In step S1, when taking a monochrome image using an endoscope, the light intensity of the endoscope is reduced to obtain a monochrome endoscopic image with a dark background and clear vertical stripes.

3. The method for real-time removal of vertical stripes from endoscopic images according to claim 1, characterized in that, Step S2.1, extracting the pixel coordinates of the vertical stripes in the endoscopic monochrome image, specifically includes: S2.1.1 The endoscopic monochrome image obtained in step S1 is binarized to obtain a binarized image containing only vertical stripe information; S2.1.2 Record the coordinates of all pixels representing the vertical stripe distribution in the binarized image. .