A blood vessel enhancement method, device and equipment of an endoscope white light image and a storage medium

By processing endoscopic white light images using the gamma index algorithm, vascular features are enhanced, solving the problem of unclear vascular features in white light mode and improving the diagnostic accuracy of early cancerous sites.

CN119624795BActive Publication Date: 2025-11-11JIANGXI YUANSAI MEDICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411668503.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-11-11
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

Existing endoscopic white light image processing technology has difficulty clearly displaying vascular features in white light mode, resulting in a low accuracy rate in detecting early cancerous sites.

Method used

The gamma exponent algorithm is used to gain the pixel values ​​of the G and B channels in the white light image, and the pixel values ​​of the B channel are fused into the R channel. At the same time, the pixel values ​​of the R and G channels are adjusted to enhance the vascular features.

Benefits of technology

It improves the clarity of blood vessel details in white light images, thereby increasing the accuracy of detecting early cancerous sites.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119624795B_ABST
    Figure CN119624795B_ABST
Patent Text Reader

Abstract

This invention relates to a method, apparatus, device, and storage medium for enhancing blood vessels in endoscopic white light images. The method includes acquiring a white light image to be processed; adjusting the pixel values ​​of all pixels in the white light image to be processed in the R, G, and B channels respectively to obtain a first white light image; adjusting the pixel values ​​of all pixels in the first white light image in the R, G, and B channels respectively to obtain a second white light image; fusing the first and second white light images to obtain a third white light image; and adjusting the pixel values ​​of all pixels in the third white light image in the R, G, and B channels respectively to obtain a target white light image. This invention enhances vascular features in white light images and improves the clarity of vascular details by increasing the pixel values ​​in the G and B channels while eliminating the influence of pixel values ​​in the B channel.
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 technology, and in particular to a method, apparatus, device, and storage medium for enhancing blood vessels in endoscopic white light images. Background Technology

[0002] In recent years, the rapid development of endoscopic image processing technology has brought significant changes to the medical imaging field. At its core lies the rapid updating of image processing algorithms. These algorithms focus on in-depth analysis and processing of images acquired through endoscopy, thereby improving diagnostic accuracy and efficiency. Advances in image processing algorithms have significantly improved the clarity, contrast, and brightness of endoscopic images. In low-light or dimly lit environments, or under conditions of limited field of view, these algorithms can automatically optimize image quality, helping doctors better observe and analyze lesions. In short, the continuous advancement of endoscopic image processing algorithms not only improves the quality of medical services but also promotes the progress of intelligent healthcare, laying the foundation for future precision medicine.

[0003] Currently, endoscopic image processing technology is widely used in diagnosing tumors or cancerous lesions in the body's natural cavities. With the increasing incidence and mortality rates of digestive tract diseases (gastric cancer, rectal cancer, esophageal cancer, and colon cancer) in China, the demands on endoscopic image processing technology are also rising. Although current endoscopic image processing technology has significantly improved the accuracy of diagnosing digestive tract diseases, its accuracy in detecting and confirming early symptoms of these diseases is not very high. During the formation of these tumors, blood vessel proliferation occurs. Early cancerous sites exhibit changes in color and texture, but under conventional white light or in narrow cavities, it is difficult to directly observe and detect the color and texture characteristics of early cancerous sites using an endoscope, increasing the difficulty of detecting vascular lesions in early cancerous areas.

[0004] Furthermore, blood vessels are mainly distributed in the mucosal and submucosal layers. Since white light is composed of three primary colors—red, green, and blue—with wavelengths of 605nm, 540nm, and 415nm respectively, and hemoglobin within blood vessels has varying absorption capacities for different wavelengths of primary color light, in white light mode, hemoglobin exhibits a characteristic absorption peak in the green light band but not in the red and blue light bands. Hemoglobin absorbs less red light but more blue light, resulting in significantly higher clarity of vascular features in the G channel compared to the R and B channels in white light mode. Additionally, the higher brightness in the R channel and lower brightness in the B channel lead to poorer representation of vascular features in images acquired in white light mode. Summary of the Invention

[0005] (1) Technical problems to be solved

[0006] This invention provides a method, apparatus, device, and storage medium for enhancing blood vessels in endoscopic white light images. The aim is to perform gain processing on the pixel values ​​of all pixels in the G and B channels of the white light image using a gamma exponent algorithm, while simultaneously removing the pixel values ​​of all pixels in the R channel of the white light image after gain processing. Then, the pixel values ​​of all pixels in the B channel of the white light image before gain processing are fused into the R channel of the white light image after gain processing. Finally, the gamma exponent algorithm is used to perform gain processing on the pixel values ​​of the fused image, thereby enhancing the vascular features in the white light image, improving the clarity of vascular details, and thus increasing the accuracy of detecting early cancerous sites.

[0007] (2) Technical solution

[0008] In a first aspect, embodiments of the present invention provide a method for enhancing blood vessels in endoscopic white light images, including...

[0009] Obtain the white light image to be processed;

[0010] Based on the white light image to be processed, the pixel values ​​of all pixels in the white light image to be processed in the R channel, G channel and B channel are adjusted respectively to obtain the first white light image;

[0011] Based on the first white light image, the pixel values ​​of all pixels in the first white light image are adjusted in the R channel, G channel and B channel respectively to obtain the second white light image;

[0012] The first white light image and the second white light image are fused to obtain a third white light image;

[0013] Based on the third white light image, adjust the pixel values ​​of all pixels in the third white light image in the R channel, G channel and B channel respectively to obtain the target white light image;

[0014] The step of fusing the first white light image and the second white light image to obtain the third white light image includes:

[0015] Remove the pixel values ​​of all pixels in the R and G channels or the pixel values ​​of the R and B channels from the first white light image to obtain the first channel image;

[0016] Remove the pixel values ​​of all pixels in the R channel from the second white light image to obtain the second channel image;

[0017] The pixel values ​​in the B or G channel of the first channel image are fused into the R channel of the second channel image to obtain the third white light image;

[0018] or

[0019] Obtain a blank image, the blank image having the same size as the first white light image and the second white light image;

[0020] The pixel values ​​of the B channel or G channel on the first white light image are fused to the corresponding R channel on the blank image;

[0021] The pixel values ​​of the G channel on the second white light image are fused to the corresponding G channel on the blank image;

[0022] The pixel values ​​of the B channel on the second white light image are then fused to the corresponding B channel on the blank image to obtain the third white light image.

[0023] In one possible implementation, the step of adjusting the pixel values ​​of all pixels in the white light image to be processed in the R, G, and B channels, respectively, to obtain a first white light image, includes...

[0024] Obtain the white balance gain coefficient, which includes a first gain coefficient, a second gain coefficient, and a third gain coefficient;

[0025] Based on the first gain coefficient, the second gain coefficient, and the third gain coefficient, the pixel values ​​of all pixels in the white light image to be processed in the R channel, G channel, and B channel are adjusted respectively to obtain the first white light image.

[0026] In one possible implementation, the step of adjusting the pixel values ​​of all pixels in the white light image to be processed in the R, G, and B channels, respectively, to obtain a first white light image, includes...

[0027] The white light image to be processed is decomposed into RGB channels to obtain the corresponding R channel image, G channel image and B channel image;

[0028] White balance gain processing is performed on the R channel image, the G channel image, and the B channel image to obtain the R channel gain image, the G channel gain image, and the B channel gain image;

[0029] The first white light image is obtained by performing inverse RGB channel decomposition on the R channel gain image, the G channel gain image, and the B channel gain image.

[0030] In one possible implementation, obtaining the white balance gain coefficient includes...

[0031] Acquire white light test images;

[0032] Based on the white light test image, the first average pixel value of the white light test image in the R channel, the second average pixel value in the G channel, and the third average pixel value in the B channel are obtained respectively.

[0033] The first gain coefficient is obtained based on the ratio of the second average pixel value to the first average pixel value;

[0034] The second gain coefficient is obtained based on the ratio of the second average pixel value to the second average pixel value;

[0035] The third gain coefficient is obtained based on the ratio of the second average pixel value to the third average pixel value.

[0036] In one possible implementation, the step of adjusting the pixel values ​​of all pixels in the white light image to be processed in the R channel, G channel, and B channel, respectively, based on the first gain coefficient, the second gain coefficient, and the third gain coefficient, includes...

[0037] The first gain pixel value is obtained by multiplying the first gain coefficient by the pixel value of all pixels in the R channel of the white light image to be processed.

[0038] The second gain coefficient is multiplied by the pixel values ​​of all pixels in the G channel of the white light image to be processed to obtain the second gain pixel value;

[0039] The third gain coefficient is multiplied by the pixel values ​​of all pixels in the B channel of the white light image to be processed to obtain the third gain pixel value;

[0040] The first gain pixel value is compared with a preset pixel threshold. If the first gain pixel value is less than the preset pixel threshold, the first gain pixel value is assigned as the pixel value of the corresponding pixel in the R channel of the white light image to be processed. Otherwise, the preset pixel threshold is assigned as the pixel value of the corresponding pixel in the R channel of the white light image to be processed.

[0041] The second gain pixel value is compared with a preset pixel threshold. If the second gain pixel value is less than the preset pixel threshold, the second gain pixel value is assigned as the pixel value of the corresponding pixel in the G channel of the white light image to be processed. Otherwise, the preset pixel threshold is assigned as the pixel value of the corresponding pixel in the G channel of the white light image to be processed.

[0042] The third gain pixel value is compared with a preset pixel threshold. If the third gain pixel value is less than the preset pixel threshold, the third gain pixel value is assigned as the pixel value of the corresponding pixel in the B channel of the white light image to be processed. Otherwise, the preset pixel threshold is assigned as the pixel value of the corresponding pixel in the B channel of the white light image to be processed.

[0043] In one possible implementation, the step of adjusting the pixel values ​​of all pixels in the first white light image in the R, G, and B channels, respectively, to obtain the second white light image, includes:

[0044] Obtain the first gamma exponent coefficient, which includes the first R-channel gamma exponent coefficient, the first G-channel gamma exponent coefficient, and the first B-channel gamma exponent coefficient.

[0045] The pixel values ​​of all pixels in the first white light image are normalized in the R channel, G channel and B channel respectively to obtain the first normalized image. The first normalized image includes the first R channel normalized image, the second G channel normalized image and the third B channel normalized image.

[0046] Based on the first gamma exponent coefficient, the first normalized image is processed using the gamma exponent algorithm to obtain the first normalized gain image.

[0047] The first normalized gain image is denormalized to obtain the second white light image.

[0048] In one possible implementation, acquiring the white light image to be processed includes...

[0049] Obtain the original image;

[0050] Based on the original image, a white light image with RGB features is obtained to be processed.

[0051] In one possible implementation, the step of adjusting the pixel values ​​of all pixels in the third white light image in the R, G, and B channels, respectively, to obtain the target white light image, includes...

[0052] Obtain the second gamma exponent coefficient, which includes the second R-channel gamma exponent coefficient, the second G-channel gamma exponent coefficient, and the second B-channel gamma exponent coefficient;

[0053] The pixel values ​​of all pixels in the third white light image are normalized in the R channel, G channel and B channel respectively to obtain a second normalized image. The second normalized image includes a second R channel normalized image, a second G channel normalized image and a second B channel normalized image.

[0054] Based on the second gamma exponent coefficient, the second normalized image is processed using the gamma exponent algorithm to obtain the second normalized gain image.

[0055] The second normalized gain image is denormalized to obtain the target white light image.

[0056] Secondly, embodiments of the present invention provide a vascular enhancement device, including...

[0057] The image acquisition module is used to acquire the white light image to be processed;

[0058] The first image processing module is used to adjust the pixel values ​​of all pixels in the white light image to be processed in the R channel, G channel and B channel respectively to obtain a first white light image; and to adjust the pixel values ​​of all pixels in the first white light image in the R channel, G channel and B channel respectively to obtain a second white light image;

[0059] An image fusion module is used to remove pixel values ​​from the R and G channels or the R and B channels of all pixels in the first white light image to obtain a first channel image, and to remove pixel values ​​from the R channel of all pixels in the second white light image to obtain a second channel image; and to fuse the pixel values ​​from the B or G channels of the first channel image to the R channel of the second channel image to obtain the third white light image; or

[0060] The image is configured to: fuse the pixel values ​​of the B channel or G channel of the first white light image to the corresponding R channel of the blank image; fuse the pixel values ​​of the G channel of the second white light image to the corresponding G channel of the blank image; and fuse the pixel values ​​of the B channel of the second white light image to the corresponding B channel of the blank image, thereby obtaining the third white light image; wherein the blank image has the same size as the first white light image and the second white light image.

[0061] The second image processing module is used to adjust the pixel values ​​of all pixels in the third white light image in the R channel, G channel and B channel respectively, to obtain the target white light image.

[0062] Thirdly, embodiments of the present invention provide an electronic device including a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the method disclosed in the first aspect when executing the instructions stored in the memory.

[0063] Fourthly, embodiments of the present invention provide a non-volatile computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method disclosed in the first aspect.

[0064] Fifthly, embodiments of the present invention provide a computer program product including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the method disclosed in the first aspect.

[0065] (3) Beneficial effects

[0066] In summary, the gamma exponent algorithm is used to gain the pixel values ​​of all pixels in the G and B channels of the white light image. At the same time, the pixel values ​​of all pixels in the R channel of the white light image after gain processing are removed. The pixel values ​​of all pixels in the B channel of the white light image before gain processing are then fused into the R channel of the white light image after gain processing. The gamma exponent algorithm is then used to gain the pixel values ​​of the fused image. This enhances the vascular features in the white light image, improves the clarity of vascular details, and thus improves the accuracy of detecting early cancerous sites. Attached Figure Description

[0067] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0068] Figure 1 This is a flowchart of an image processing method according to the present invention.

[0069] Figure 2 This is another flowchart of an image processing method according to the present invention.

[0070] Figure 3 This is another flowchart of an image processing method according to the present invention.

[0071] Figure 4 This is another flowchart of an image processing method according to the present invention.

[0072] Figure 5 This is another flowchart of an image processing method according to the present invention.

[0073] Figure 6 This is another flowchart of an image processing method according to the present invention.

[0074] Figure 7 This is another flowchart of an image processing method according to the present invention.

[0075] Figure 8 This is another flowchart of an image processing method according to the present invention.

[0076] Figure 9 This is another flowchart of an image processing method according to the present invention.

[0077] Figure 10 This is a schematic diagram of the structure of an image processing device invented.

[0078] Figure 11 This is a display effect diagram of the white light image to be processed according to the present invention.

[0079] Figure 12 This is a display effect diagram of the target white light image of the present invention.

[0080] In the picture:

[0081] 10 - Image acquisition module; 20 - First image processing module; 30 - Image fusion module; 40 - Second image processing module. Detailed Implementation

[0082] The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and examples. The following detailed description of the embodiments and the accompanying drawings are used to illustrate the principles of the present invention by way of example, but should not be used to limit the scope of the present invention. That is, the present invention is not limited to the described embodiments, and any modifications, substitutions and improvements to the parts, components and connection methods are covered without departing from the spirit of the present invention.

[0083] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0084] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0085] The image processing method of this disclosure can be executed by an electronic device such as a terminal device or a server. The terminal device can be any fixed or mobile terminal, such as a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, or wearable device. The server can be a single server or a server cluster of multiple servers. Any electronic device can implement the image processing method of this disclosure by having its processor call computer-readable instructions stored in its memory.

[0086] Figure 1 A flowchart of a method for enhancing blood vessels in endoscopic white light images according to the present invention is shown, as follows: Figure 1 As shown, the image processing method of the disclosed embodiments of the present invention may include the following steps S10-S50.

[0087] Step S10: Obtain the white light image to be processed.

[0088] In one possible implementation, the white light image to be processed can be a raw image directly acquired by the white light camera device of a medical endoscope controlled by an electronic device to capture images of the target object, or it can be a raw image that has been processed by an image processing device. For example, the white light image to be processed can originate from the real-time image data stream captured by the camera of the medical endoscope and then processed into a raw image. The target object can be the inner wall of the digestive tract (such as the stomach, rectum, esophagus, and colon) photographed in white light mode. Therefore, the white light image to be processed is an image of the inner wall of the digestive tract with RGB characteristics (such as...). Figure 11 As shown in the figure, of course, due to the different parameters of medical endoscope cameras, the data format of the raw images directly acquired will also be different. For example, some existing medical endoscope camera devices are based on CMOS image sensors to acquire images of target objects, resulting in the image data of the raw images acquired by the CMOS image sensors being BAYER array images, i.e., RAW images, which cannot be directly visualized on the terminal display. Therefore, it is necessary to process the RAW image format to obtain a white light image with RGB characteristics to meet the visualization requirements.

[0089] like Figure 2 As shown, the method for obtaining a white light image to be processed according to an embodiment of the present invention includes the following steps S110-S120.

[0090] S110, Obtain the original image.

[0091] In one possible implementation, the target object is captured by a CMOS image sensor in the camera of a medical endoscope to obtain a raw image. The image data of this raw image is a BAYER array image, i.e., a RAW image, as shown in the table below.

[0092]

[0093]

[0094] In this table, each letter in the box represents a pixel in the RAW image. B represents the pixel value of the blue channel, Gr represents the pixel value of the green channel in odd-numbered rows, Gb represents the pixel value of the green channel in even-numbered rows, and R represents the pixel value of the red channel. Therefore, each pixel in the RAW image only has a pixel value from one of the R, G, or B channels, meaning no pixel can simultaneously have pixel values ​​from all RGB channels, i.e., RGB characteristics.

[0095] S120. Based on the original image, obtain a white light image to be processed with RGB features.

[0096] In one possible implementation, because the original image's format is inherently unsuitable for direct display and fails to meet the needs of subsequent image processing, a color interpolation algorithm is required to process the pixel values ​​of all pixels in the R, G, and B channels of the original image. This results in a white light image with RGB characteristics, meaning that all pixels in the white light image to be processed simultaneously possess RGB channel pixel values. Specifically, this color interpolation algorithm includes bilinear interpolation or the nearest neighbor pixel mean method. For example, this embodiment uses the nearest neighbor pixel mean method to process the pixel values ​​of all pixels in the original image. Based on the pixel value distribution in the table above, the corresponding calculation formula is used to process the pixels with R characteristics. Pixels with Gr features, Gb features, and B features are processed to give them RGB characteristics. Specifically, except for the pixels in the 1st row and 1st column, and the (K+1)th row and (K+1)th column, pixels in other rows or columns have 8 neighboring pixels. The processing for pixels with R and B features is similar to the neighboring pixel averaging method. For example, a pixel in the 3rd row and 3rd column with R features is represented as R(3,3). The pixel value of the R channel at this position is the pixel value of R(3,3), and the pixel value of the G channel is the average of the values ​​of its four neighboring pixels with G channel features, i.e., G(3,3) = 1 / 4. *[Gr(3,2)+Gr(3,4)+Gb(2,3)+Gb(4,3)], similarly, the pixel value of the B channel of this pixel is the average of the values ​​of its four neighboring pixels with B channel characteristics, i.e., B(3,3)=1 / 4*[B(2,2)+B(2,4)+B(4,2)+B(4,4)]. Similarly, taking the pixel with B characteristics in the 4th row and 4th column as an example, it is represented as B(4,4), and the pixel value of the B channel of the pixel at this position is the pixel value of B(4,4), while the pixel value of the R channel of this pixel is the average of the values ​​of its four neighboring pixels with R channel characteristics, R(4,4)=1 / 4*[R(3,3)+R(3,5)+R(5,3)+R( The pixel value of the G channel of this pixel is the average of the values ​​of its four neighboring pixels with G channel features, i.e., G(4,4) = 1 / 4 * [Gb(4,3) + Gb(4,5) + Gr(3,4) + Gr(5,4)]. The processing of pixels with Gb and Gr features using the neighboring pixel averaging method is similar. For example, the pixel with Gr feature in the 3rd row and 4th column is represented as Gr(3,4), and the pixel value of the G channel of this pixel is the pixel value of Gr(3,4). The pixel value of the R channel of this pixel is the average of the values ​​of its two neighboring pixels with R channel features, i.e., R(3,4) = 1 / 2 * [R(3,3) + R(3,4)].5)], the pixel value of the B channel of this pixel is the average of the values ​​of its two neighboring pixels with B channel characteristics, i.e., B(3,4) = 1 / 2 * [B(2,4) + B(4,4)]. Taking the pixel with Gb characteristics in the 4th row and 3rd column as an example, it is represented as Gb(4,3). The pixel value of the G channel of this pixel is the pixel value of Gb(4,3). The pixel value of the R channel of this pixel is the average of the values ​​of its two neighboring pixels with R channel characteristics, i.e., R(4,3) = 1 / 2 * [R(3,3) + R(5,3)]. The pixel value of the B channel of this pixel is the average of the values ​​of its two neighboring pixels with B channel characteristics, i.e., B(4,3) = 1 / 2 * [B(4,2) + B(4,4)]. Thus, the pixel values ​​of all pixels in the white light image to be processed have the corresponding RGB characteristics.

[0097] S20. Based on the white light image to be processed, adjust the pixel values ​​of all pixels in the white light image to be processed in the R channel, G channel and B channel respectively to obtain the first white light image.

[0098] In one possible implementation, the white light image to be processed, which has RGB characteristics after being processed by the color interpolation algorithm, has a large amount of G channel data, which leads to white inaccuracy. That is, the overall display effect of the image to be processed is greenish, causing color imbalance. In order to meet the display effect of the target image and ensure that the color display on the target image is balanced, a white balance algorithm is needed to adjust the pixel values ​​of all pixels in the white light image to be processed in the R channel, the G channel and the B channel. That is, to perform gain processing on the pixel values ​​in the RGB channel to obtain the first white light image. Similarly, the first white light image also has RGB characteristics.

[0099] like Figure 3 As shown, the method disclosed in this invention for obtaining a first white light image by adjusting the pixel values ​​of all pixels in the white light image to be processed in the R channel, G channel and B channel respectively, based on the white light image to be processed, includes the following steps S210-S220.

[0100] S210. Obtain the white balance gain coefficient, which includes a first gain coefficient, a second gain coefficient, and a third gain coefficient.

[0101] In one possible implementation, in order to ensure the balance of pixel values ​​in the RGB channels of the white light image to be processed and to reproduce a near-realistic color effect, corresponding gain coefficients need to be matched for the pixel values ​​in the R, G, and B channels. This allows for different degrees of gain on the pixel values ​​in each color channel, thereby ensuring that the pixel values ​​in the R, G, and B channels after gain can maintain the color balance of the image.

[0102] like Figure 4 As shown, the method for obtaining the white balance gain coefficient according to the embodiment of the present invention includes steps S2101-S2103.

[0103] S2101. Obtain the white light test image.

[0104] In one possible implementation, in order to ensure the accuracy of the acquired white balance gain coefficient, a CMOS image sensor is used to take a picture of a standard white paper or other white background (such as white wallpaper or floor) in white light mode to obtain a white light test image required for subsequent white balance algorithm processing.

[0105] S2102. Based on the white light test image, obtain the first average pixel value of the white light test image in the R channel, the second average pixel value in the G channel, and the third average pixel value in the B channel.

[0106] In one possible implementation, the white balance gain coefficient is obtained primarily through either the peak value method or the mean value method. This embodiment uses the mean value method to obtain the white balance gain coefficient from the white light test image to reduce computational complexity. Specifically, the process of obtaining the first average pixel value, the second average pixel value, and the third average pixel value includes: summing the pixel values ​​of all pixels in the white light test image across the R, G, and B channels respectively; and obtaining the corresponding first average pixel value, second average pixel value, and third average pixel value based on the ratio of the sum of pixel values ​​to the total number of pixels. For example, summing the pixel values ​​of all pixels in the white light test image... The number of pixels (count), the total pixel value (Rsum) of all pixels in the white light test image (Gsum) in the R channel, and the total pixel value (Bsum) in the G channel are calculated using the average value formulas Ravg = Rsum / count, Gavg = Gsum / count, and Bavg = Bsum / count to obtain the corresponding first, second, and third average pixel values. Ravg, Gavg, and Bavg are used to represent the first average pixel value of the R channel, the second average pixel value of the G channel, and the third average pixel value of the B channel in the white light test image, respectively.

[0107] S2103. Based on the ratio of the second average pixel value to the first average pixel value, obtain the first gain coefficient; based on the ratio of the second average pixel value to the second average pixel value, obtain the second gain coefficient; based on the ratio of the second average pixel value to the third average pixel value, obtain the third gain coefficient.

[0108] In one possible implementation, since the white light test image is acquired through a CMOS image sensor, the pixel values ​​in the G channel of the white light test image are excessive. After performing interpolation processing on the pixel values ​​of the G channel in step S120, the pixel values ​​of the G channel in the white light test image will be larger than the pixel values ​​of the B and R channels. To ensure that the pixel values ​​in the RGB channels of the white light test image are amplified and their true colors are restored, the gain coefficient is determined to be greater than or equal to 1. Therefore, the second average pixel value in the G channel is selected as the dividend, while the first average pixel value in the R channel, the second average pixel value in the G channel, and the third average pixel value in the B channel are used as the dividend. The values ​​are used as divisors to calculate the corresponding quotients for the first gain coefficient of the R channel, the second gain coefficient of the G channel, and the third gain coefficient of the B channel. For example, the corresponding ratio formulas Rgain = Gavg / Ravg, Ggain = Gavg / Gavg, and Bgain = Gavg / Bavg are used to calculate the first gain coefficient of the R channel, the second gain coefficient of the G channel, and the third gain coefficient of the B channel, respectively. Rgain, Ggain, and Bgain represent the first gain coefficient of the R channel, the second gain coefficient of the G channel, and the third gain coefficient of the B channel, respectively, and the values ​​of Rgain, Ggain, and Bgain range from 1 to 10.

[0109] S220. Based on the first gain coefficient, the second gain coefficient and the third gain coefficient, adjust the pixel values ​​of all pixels in the white light image to be processed in the R channel, G channel and B channel respectively to obtain the first white light image.

[0110] In one possible implementation, different gain coefficients are applied based on the pixel values ​​in different channels to obtain a first white light image with balanced colors that closely approximates real colors. Specifically, the first gain coefficient is multiplied by the pixel values ​​of all pixels in the R channel of the white light image to be processed to obtain a first gain pixel value; the second gain coefficient is multiplied by the pixel values ​​of all pixels in the G channel of the white light image to be processed to obtain a second gain pixel value; and the third gain coefficient is multiplied by the pixel values ​​of all pixels in the B channel of the white light image to be processed to obtain a third gain pixel value. For example, the corresponding pixel gain formulas R1 = R * Rgain, G1 = G * Ggain, and B1 = B * Bgain are used to perform gain processing on the pixel values ​​in the R channel, G channel, and B channel, respectively. Here, R, G, and B are the pixel values ​​of all pixels in the white light image to be processed in the R channel, G channel, and B channel, respectively, and R1, G1, and B1 are the pixel values ​​of all pixels in the first white light image in the R channel, G channel, and B channel, respectively.

[0111] In one possible implementation, since the pixel values ​​of a white light image are typically integers ranging from 0 to 255, and since the first, second, and third gain coefficients are all greater than or equal to 1, the pixel values ​​of all pixels in the first white light image after gain adjustment, corresponding to the R-channel, G-channel, and B-channel values, may exceed a preset pixel threshold, i.e., the maximum pixel value of 255. To avoid the situation where pixel values ​​in the first white light image cannot be displayed due to exceeding the maximum pixel threshold, i.e., data loss, the pixel values ​​of all pixels in the first white light image after gain adjustment, corresponding to the R-channel, G-channel, and B-channel values, are compared with the preset pixel threshold. Based on the comparison results, the pixel values ​​of the corresponding pixels in the R-channel, G-channel, and B-channel are assigned values ​​to ensure that the pixel values ​​of all pixels in the first white light image after gain adjustment do not exceed the maximum pixel value. Specifically, the first gain pixel value is compared with the preset threshold. The system calculates a pixel threshold and assigns the first gain pixel value (which is less than a preset pixel threshold) to the corresponding pixel value in the R channel of the white light image to be processed. Conversely, if the first gain pixel value is less than the preset pixel threshold, the preset pixel threshold is assigned to the corresponding pixel value in the R channel of the white light image to be processed. Simultaneously, the system compares a second gain pixel value with the preset pixel threshold, and assigns the second gain pixel value (which is less than the preset pixel threshold) to the corresponding pixel value in the G channel of the white light image to be processed. Conversely, if the second gain pixel value is less than the preset pixel threshold, the preset pixel threshold is assigned to the corresponding pixel value in the G channel of the white light image to be processed. Simultaneously, the system compares a third gain pixel value with the preset pixel threshold, and assigns the third gain pixel value (which is less than the preset pixel threshold) to the corresponding pixel value in the B channel of the white light image to be processed. Conversely, if the third gain pixel value is less than the preset pixel threshold, the preset pixel threshold is assigned to the corresponding pixel value in the B channel of the white light image to be processed.

[0112] like Figure 5 As shown, the method disclosed in this invention for obtaining a first white light image by adjusting the pixel values ​​of all pixels in the white light image to be processed in the R channel, G channel, and B channel, respectively, based on the white light image to be processed, includes the following steps S2100-S2300.

[0113] S2100. Perform RGB channel decomposition on the white light image to be processed to obtain the corresponding R channel image, G channel image and B channel image.

[0114] In one possible implementation, because the pixel values ​​of the R channel in the white light image to be processed are relatively large while the pixel values ​​of the G and B channels are generally small, it is difficult to clearly display vascular features or details in the white light image. Therefore, the white light image to be processed is decomposed into channel images corresponding to the R, G, and B channel components to perform gain adjustment suitable for the corresponding channel images.

[0115] S2200: Perform white balance gain processing on the R channel image, the G channel image, and the B channel image to obtain the R channel gain image, the G channel gain image, and the B channel gain image.

[0116] In one possible implementation, the pixel values ​​of all pixels on different channels are processed by using white balance gain coefficients corresponding to different channels in the same way as in step S220, and the method for obtaining the white balance gain coefficients is the same as in steps S2101-S2103, which will not be repeated here.

[0117] S2300, Perform RGB channel inverse decomposition on the R channel gain image, the G channel gain image and the B channel gain image to obtain the first white light image.

[0118] S30. Based on the first white light image, adjust the pixel values ​​of all pixels in the first white light image in the R channel, G channel and B channel respectively to obtain the second white light image.

[0119] In one possible implementation, after acquiring a first white light image with balanced colors that are close to the true colors, the image displayed in the first white light image acquired in white light mode is reddish. Furthermore, due to the narrowness of the digestive tract cavity, the entire image is dark overall or locally due to insufficient light or insufficient depth of field, making it difficult to clearly highlight the vascular features. Therefore, it is necessary to perform secondary adjustments on the pixel values ​​of all pixels in the first white light image in the R, G, and B channels respectively to solve the problem of unclear image caused by the overall or local darkness of the first white light image.

[0120] like Figure 6 As shown, the method for obtaining a second white light image based on the first white light image, by adjusting the pixel values ​​of all pixels in the first white light image in the R channel, G channel, and B channel respectively, includes the following steps S310-S340.

[0121] S310. Obtain the first gamma index coefficient, which includes the first R-channel gamma index coefficient, the first G-channel gamma index coefficient, and the first B-channel gamma index coefficient.

[0122] In one possible implementation, since the second white light image is generally or locally dark, in the process of adjusting the pixel values ​​of all pixels in the first white light image on the R, G, and B channels respectively, in order to achieve a larger adjustment for the pixel values ​​of the darker areas with smaller pixel values ​​and a smaller adjustment for the pixel values ​​of the brighter areas with larger pixel values, a gamma exponent algorithm is used to adjust the pixel values ​​of all pixels in the first white light image on the R, G, and B channels respectively. Since there are significant differences in the pixel values ​​on the R, G, and B channels, the gain of the first gamma exponent coefficient on the pixel values ​​of the R, G, and B channels also varies. Therefore, the values ​​of the first R channel gamma exponent coefficient, the first G channel gamma exponent coefficient, and the first B channel gamma exponent coefficient also differ.

[0123] In one possible implementation, the first gamma exponent coefficient is an empirical value. For example, the gamma exponent coefficient can be assigned by selecting multiple parameter values ​​within a finite number of times within the range of 0.5-2, and then the pixel values ​​on the R, G, and B channels of the image to be processed are subjected to gain processing by the gamma exponent algorithm. The relevant parameter values ​​that meet the requirements of the target image are recorded until the optimal values ​​of the first R channel gamma exponent coefficient Rgamma, the first G channel gamma exponent coefficient Ggamma, and the first B channel gamma exponent coefficient Bgamma are obtained on the R, G, and B channels. In this embodiment, Rgamma is 0.8, and both Ggamma and Bgamma are 0.9.

[0124] S320. Normalize the pixel values ​​of all pixels in the first white light image in the R channel, G channel and B channel respectively to obtain a first normalized image. The first normalized image includes a first R channel normalized image, a first G channel normalized image and a first B channel normalized image.

[0125] In one possible implementation, to reduce computational complexity and improve the speed of pixel value processing, the pixel values ​​of all pixels in the first white light image are normalized in the R, G, and B channels respectively, to obtain the corresponding first normalized image. The pixel values ​​of all pixels in the first normalized image are between 0 and 1. That is, the pixel values ​​of all pixels in the first R channel normalized image, the first G channel normalized image, and the first B channel normalized image are also between 0 and 1, which facilitates subsequent exponential calculation using the gamma exponent algorithm. For example, the normalization formula K = N / 255 is used for calculation, where K is the normalization coefficient, including normalization in the R, G, and B channels, and N is the pixel value of all pixels in the first white light image in the R, G, and B channels respectively.

[0126] S330. Based on the first gamma exponent coefficient, the first normalized image is processed using the gamma exponent algorithm to obtain the first normalized gain image.

[0127] In one possible implementation, using the gamma exponent algorithm in conjunction with normalized coefficients after normalization processing can further reduce computational complexity. For example, the gamma exponent mathematical formula M = (K) can be used. gamma The calculation is performed, where M is the normalized coefficient after gamma exponent processing, including the normalized coefficients after gamma exponent processing in the R channel, G channel, and B channel, and gamma is the first gamma exponent coefficient, including the first R channel gamma exponent coefficient Rgamma, the first G channel gamma exponent coefficient Ggamma, and the first B channel gamma exponent coefficient Bgamma.

[0128] S340. Perform inverse normalization processing on the first normalized gain image to obtain the second white light image.

[0129] In one possible implementation, the pixel values ​​on the normalized first white light image need to be denormalized to obtain the first white light image with pixel value gain, which is the second white light image with overall clear display. For example, the denormalization formula F = M * 255 is used for calculation, where F represents the pixel values ​​of all pixels on the second white light image in the R, G, and B channels, respectively.

[0130] S40. The first white light image and the second white light image are fused to obtain a third white light image.

[0131] In one possible implementation, since gain processing of the pixel values ​​of the entire or local area of ​​the second white light image will improve the clarity of the entire image, it can only show the surface features of blood vessels but cannot observe the details of blood vessels under the mucosa. Therefore, an image fusion method is used to superimpose or assign values ​​to the corresponding pixels on the first white light image and the second white light image to fuse them, which can improve the clarity of blood vessel features and enhance the detailed texture of blood vessels.

[0132] like Figure 7 As shown, the method for fusing the first white light image and the second white light image to obtain a third white light image according to an embodiment of the present invention includes the following steps S410-S430.

[0133] S410. Remove the pixel values ​​of all pixels in the R and G channels or the pixel values ​​of the R and B channels from the first white light image to obtain the first channel image.

[0134] In one possible implementation, in order to eliminate the reddish tint in the first white light image, which makes it difficult to clearly highlight vascular features, and based on the absorption characteristics of hemoglobin in blood vessels to blue and green wavelengths, and to detect vascular lesions in early cancerous sites by observing mid-level or deep vascular features, the pixel values ​​of all pixels in the first white light image on the R and G channels or on the R and B channels are removed, thereby retaining the corresponding pixel values ​​on the B or G channels, resulting in a first channel image with monochrome channel pixel values. It should be noted that the methods for removing monochrome channel pixel values ​​are all existing technologies and will not be elaborated here.

[0135] S420. Remove the pixel values ​​of all pixels in the R channel from the second white light image to obtain the second channel image.

[0136] In one possible implementation, in order to eliminate the influence of the pixel values ​​of the R channel on the clarity of the blood vessel features in the second white light image, the pixel values ​​of all pixels in the R channel of the second white light image are removed, and then the pixel values ​​of the corresponding B and G channels are retained, resulting in a second channel image with only two color channels.

[0137] S430. The pixel values ​​on the B or G channel of the first channel image are fused to the R channel of the second channel image to obtain the third white light image.

[0138] In one possible implementation, to observe mid-level or deep vascular features to detect vascular lesions in early-stage cancerous sites, pixels in the monochrome channel of the first image are fused with blank pixels in the second image that lack R-channel pixel values, resulting in a third white light image with RGB characteristics. Specifically, by replacing or assigning pixel values ​​from the B and G channels of the first image to blank pixels in the second image (i.e., the R channel), the pixel values ​​in the R channel of the third white light image are the pixel values ​​in the B or G channels of the first image. This reduces the impact of the red portion of the image on the clarity of vascular features, and the pixel values ​​in the B or G channels of the first image can be used to obtain mid-level or deep vascular features depending on the specific purpose.

[0139] like Figure 8 As shown, the method for fusing the first white light image and the second white light image to obtain a third white light image according to an embodiment of the present invention includes the following steps S440-S450.

[0140] S440. Obtain a blank image, wherein the blank image has the same size as the first white light image and the second white light image.

[0141] In one possible implementation, ...

[0142] S450, the pixel values ​​of the B channel on the first white light image are fused to the corresponding R channel on the blank image; the pixel values ​​of the G channel on the second white light image are fused to the corresponding G channel on the blank image; and the pixel values ​​of the B channel on the second white light image are fused to the corresponding B channel on the blank image to obtain the third white light image.

[0143] In one possible implementation, ...

[0144] S50. Based on the third white light image, adjust the pixel values ​​of all pixels in the third white light image in the R channel, G channel and B channel respectively to obtain the target white light image.

[0145] In one possible implementation, the third white light image can highlight intermediate or deep vascular features. However, since the white light image to be processed is acquired in white light mode, even if the pixel values ​​of the B or G channels in the first white light image are replaced with the pixel values ​​of the R channel in the second white light image, a significant amount of red component remains in the overall area of ​​the third white light image. Therefore, the pixel values ​​of the R, G, and B channels in the third white light image need to be adjusted again. By increasing the pixel values ​​of the G and B channels and decreasing the pixel values ​​of the R channel, the target white light image is obtained, thereby enhancing the vascular features (e.g., Figure 12 (As shown).

[0146] like Figure 9 As shown, the method for obtaining a target white light image by adjusting the pixel values ​​of all pixels in the third white light image in the R channel, G channel, and B channel respectively, according to the embodiment of the present invention, includes the following steps S510-S540.

[0147] S510. Obtain the second gamma exponent coefficient, which includes the second R-channel gamma exponent coefficient, the second G-channel gamma exponent coefficient, and the second B-channel gamma exponent coefficient.

[0148] In one possible implementation, since the red component is more prevalent in the overall area of ​​the third white light image, i.e., the pixel value in the R channel is higher, the pixel values ​​in the G and B channels are relatively lower. Therefore, the pixel values ​​in the G and B channels need to be increased while the pixel value in the R channel needs to be decreased. In order to achieve a larger adjustment for areas with low pixel values ​​and a smaller adjustment for areas with high pixel values ​​in the third white light image, the gamma exponent algorithm is still used to adjust the pixel values ​​of all pixels in the third white light image in the R, G, and B channels respectively. Since there are significant differences in the pixel values ​​in the R, G, and B channels, the gain of the second gamma exponent coefficient on the pixel values ​​in the R, G, and B channels also varies. Therefore, the values ​​of the second R channel gamma exponent coefficient, the second G channel gamma exponent coefficient, and the second B channel gamma exponent coefficient also differ. In one possible implementation, the second gamma exponent coefficient is an empirical value. For example, this gamma exponent coefficient can be assigned multiple parameter values ​​within a finite number of times within the coefficient parameter range of 0.5-2. Then, the pixel values ​​in the R, G, and B channels of the image to be processed are augmented using a gamma exponent algorithm, and relevant parameter values ​​that meet the requirements of the target image are recorded until the optimal values ​​of the second R-channel gamma exponent coefficient Rgamma', the second G-channel gamma exponent coefficient Ggamma', and the second B-channel gamma exponent coefficient Bgamma' are obtained. In this embodiment, Rgamma' is set to 1.1, and both Ggamma' and Bgamma' are set to 0.8. By making the second R-channel gamma exponent coefficient Rgamma' greater than the second G-channel gamma exponent coefficient Ggamma' and the second B-channel gamma exponent coefficient Bgamma' and greater than 1, it is possible to increase the pixel values ​​in the G and B channels of the third white light image while simultaneously decreasing the pixel values ​​in the R channel.

[0149] S520. Normalize the pixel values ​​of all pixels in the third white light image in the R channel, G channel and B channel respectively to obtain a second normalized image. The second normalized image includes a second R channel normalized image, a second G channel normalized image and a second B channel normalized image.

[0150] In one possible implementation, to reduce computational complexity and improve the speed of pixel value processing, the pixel values ​​of all pixels in the third white light image are normalized in the R, G, and B channels respectively, to obtain the corresponding second normalized image. The pixel values ​​of all pixels in the second normalized image are between 0 and 1. That is, the pixel values ​​of all pixels in the second R channel normalized image, the second G channel normalized image, and the second B channel normalized image are also between 0 and 1, which facilitates subsequent exponential calculation using the gamma exponent algorithm. For example, the normalization formula k = n / 255 is used for calculation, where k is the normalization coefficient, including normalization in the R, G, and B channels, and n is the pixel value of all pixels in the third white light image in the R, G, and B channels respectively.

[0151] S530. Based on the second gamma exponent coefficient, the second normalized image is processed using the gamma exponent algorithm to obtain the second normalized gain image.

[0152] In one possible implementation, using the gamma exponent algorithm in conjunction with normalized coefficients after normalization processing can further reduce computational complexity. For example, the gamma exponent mathematical formula m=(k) can be used. gamma’ The calculation is performed, where m is the normalized coefficient after gamma exponent processing, including the normalized coefficients after gamma exponent processing in the R channel, G channel, and B channel, and gamma' is the second gamma exponent coefficient, including the second R channel gamma exponent coefficient Rgamma', the second G channel gamma exponent coefficient Ggamma', and the second B channel gamma exponent coefficient Bgamma'.

[0153] S540. Perform inverse normalization processing on the second normalized gain image to obtain the target white light image.

[0154] In one possible implementation, the pixel values ​​on the normalized third white light image need to be denormalized to obtain a third white light image with adjusted pixel values, i.e., a target white light image with clearly displayed blood vessel features. For example, the denormalization formula f = m * 255 is used for calculation, where f represents the pixel values ​​of all pixels on the target white light image in the R, G, and B channels, respectively.

[0155] Figure 10 A schematic diagram of the structure of a vascular enhancement device according to the present invention is shown, as follows: Figure 10 As shown, a vascular enhancement device according to a disclosed embodiment of the present invention includes...

[0156] Image acquisition module 10 is used to acquire a white light image to be processed;

[0157] The first image processing module 20 is used to adjust the pixel values ​​of all pixels in the white light image to be processed in the R channel, G channel and B channel respectively to obtain a first white light image; and to adjust the pixel values ​​of all pixels in the first white light image in the R channel, G channel and B channel respectively to obtain a second white light image.

[0158] Image fusion module 30 is used to fuse the first white light image and the second white light image to obtain a third white light image;

[0159] The second image processing module 40 is used to adjust the pixel values ​​of all pixels in the third white light image in the R channel, G channel and B channel respectively to obtain the target white light image;

[0160] The image fusion module is further configured to: remove pixel values ​​from the R and G channels or the R and B channels of all pixels in the first white light image to obtain a first channel image; and remove pixel values ​​from the R channel of all pixels in the second white light image to obtain a second channel image; and fuse the pixel values ​​in the B or G channels of the first channel image to the R channel of the second channel image to obtain the target white light image; or

[0161] The image is configured to: fuse pixel values ​​from the B or G channel of the first white light image to the corresponding R channel of the blank image; fuse pixel values ​​from the G channel of the second white light image to the corresponding G channel of the blank image; and fuse pixel values ​​from the B channel of the second white light image to the corresponding B channel of the blank image, thereby obtaining the third white light image; wherein the blank image has the same size as the first white light image and the second white light image.

[0162] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0163] This disclosure also proposes a computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the above-described method. The computer-readable storage medium can be volatile or non-volatile.

[0164] This disclosure also proposes an electronic device, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above-described method when executing the instructions stored in the memory. The electronic device can be provided as a server or terminal device. For example, the electronic device includes a processing component, which further includes one or more processors, and memory resources represented by the memory for storing instructions executable by the processing component, such as applications. The applications stored in the memory may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component is configured to execute instructions to perform the above-described method, and the electronic device may also include a power supply component configured to perform power management of the electronic device, a wired or wireless network interface configured to connect the electronic device to a network, and an input / output interface (I / O interface). The electronic device can operate on an operating system stored in the memory, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.

[0165] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the above-described method.

[0166] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.

[0167] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0168] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0169] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0170] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0171] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0172] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0173] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0174] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. The present invention is not limited to the specific steps and structures described above and shown in the figures. Furthermore, for the sake of brevity, detailed descriptions of known methods and techniques are omitted here.

[0175] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art without departing from the scope of the invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.

Claims

1. A method for enhancing blood vessels in endoscopic white light images, characterized in that, include Obtain the white light image to be processed; Based on the white light image to be processed, the pixel values ​​of all pixels in the white light image to be processed in the R channel, G channel, and B channel are adjusted respectively to obtain a first white light image. This step includes obtaining white balance gain coefficients, which include a first gain coefficient, a second gain coefficient, and a third gain coefficient; based on the first gain coefficient, the second gain coefficient, and the third gain coefficient, the pixel values ​​of all pixels in the white light image to be processed in the R channel, G channel, and B channel are adjusted respectively to obtain the first white light image. Based on the first white light image, the pixel values ​​of all pixels in the first white light image in the R, G, and B channels are adjusted to obtain a second white light image. This step includes obtaining a first gamma exponent coefficient, which includes a first R channel gamma exponent coefficient, a first G channel gamma exponent coefficient, and a first B channel gamma exponent coefficient; normalizing the pixel values ​​of all pixels in the first white light image in the R, G, and B channels to obtain a first normalized image, which includes a first R channel normalized image, a second G channel normalized image, and a third B channel normalized image; and processing the first normalized image using a gamma exponent algorithm based on the first gamma exponent coefficient to obtain a first normalized gain image. The first normalized gain image is denormalized to obtain the second white light image; The first white light image and the second white light image are fused to obtain a third white light image; Based on the third white light image, adjust the pixel values ​​of all pixels in the third white light image in the R channel, G channel and B channel respectively to obtain the target white light image; The step of fusing the first white light image and the second white light image to obtain the third white light image includes: Remove the pixel values ​​of all pixels in the R and G channels or the pixel values ​​of the R and B channels from the first white light image to obtain the first channel image; Remove the pixel values ​​of all pixels in the R channel from the second white light image to obtain the second channel image; The pixel values ​​in the B or G channel of the first channel image are fused into the R channel of the second channel image to obtain the third white light image; or Obtain a blank image, the blank image having the same size as the first white light image and the second white light image; The pixel values ​​of the B channel or G channel on the first white light image are fused to the corresponding R channel on the blank image; The pixel values ​​of the G channel on the second white light image are fused to the corresponding G channel on the blank image; The pixel values ​​of the B channel on the second white light image are then fused to the corresponding B channel on the blank image to obtain the third white light image.

2. The method for enhancing blood vessels in endoscopic white light images according to claim 1, characterized in that, The acquisition of white balance gain coefficient includes Acquire white light test images; Based on the white light test image, the first average pixel value of the white light test image in the R channel, the second average pixel value in the G channel, and the third average pixel value in the B channel are obtained respectively. The first gain coefficient is obtained based on the ratio of the second average pixel value to the first average pixel value; The second gain coefficient is obtained based on the ratio of the second average pixel value to the second average pixel value; The third gain coefficient is obtained based on the ratio of the second average pixel value to the third average pixel value.

3. The method for enhancing blood vessels in endoscopic white light images according to claim 2, characterized in that, The step involves adjusting the pixel values ​​of all pixels in the white light image to be processed in the R, G, and B channels, respectively, based on the first, second, and third gain coefficients. The first gain pixel value is obtained by multiplying the first gain coefficient by the pixel value of all pixels in the R channel of the white light image to be processed. The second gain coefficient is multiplied by the pixel values ​​of all pixels in the G channel of the white light image to be processed to obtain the second gain pixel value; The third gain coefficient is multiplied by the pixel values ​​of all pixels in the B channel of the white light image to be processed to obtain the third gain pixel value; The first gain pixel value is compared with a preset pixel threshold. If the first gain pixel value is less than the preset pixel threshold, the first gain pixel value is assigned as the pixel value of the corresponding pixel in the R channel of the white light image to be processed. Otherwise, the preset pixel threshold is assigned as the pixel value of the corresponding pixel in the R channel of the white light image to be processed. Compare the second gain pixel value with the preset pixel threshold, and based on the fact that the second gain pixel value is less than the preset pixel threshold, assign the second gain pixel value as the pixel value of the corresponding pixel on the G channel of the white light image to be processed; Conversely, the preset pixel threshold is assigned the pixel value of the corresponding pixel on the G channel of the white light image to be processed; Compare the third gain pixel value with the preset pixel threshold, and based on the fact that the third gain pixel value is less than the preset pixel threshold, assign the third gain pixel value as the pixel value of the corresponding pixel point on the B channel of the white light image to be processed; Conversely, the preset pixel threshold is assigned the pixel value of the corresponding pixel on the B channel of the white light image to be processed.

4. The method for enhancing blood vessels in endoscopic white light images according to claim 1, characterized in that, Obtain the white light image to be processed, including Obtain the original image; Based on the original image, a white light image with RGB features is obtained to be processed.

5. The method for enhancing blood vessels in endoscopic white light images according to claim 1, characterized in that, The process involves adjusting the pixel values ​​of all pixels in the third white light image on the R, G, and B channels respectively, based on the third white light image, to obtain the target white light image. Obtain the second gamma exponent coefficient, which includes the second R-channel gamma exponent coefficient, the second G-channel gamma exponent coefficient, and the second B-channel gamma exponent coefficient; The pixel values ​​of all pixels in the third white light image are normalized in the R channel, G channel and B channel respectively to obtain a second normalized image. The second normalized image includes a second R channel normalized image, a second G channel normalized image and a second B channel normalized image. Based on the second gamma exponent coefficient, the second normalized image is processed using the gamma exponent algorithm to obtain the second normalized gain image. The second normalized gain image is denormalized to obtain the target white light image.

6. A vascular enhancement device, characterized in that, include The image acquisition module is used to acquire the white light image to be processed; The first image processing module is used to adjust the pixel values ​​of all pixels in the white light image to be processed in the R channel, G channel and B channel respectively, to obtain the first white light image; And to adjust the pixel values ​​of all pixels in the first white light image in the R channel, G channel and B channel respectively to obtain the second white light image; An image fusion module is used to fuse the first white light image and the second white light image to obtain a third white light image; The second image processing module is used to adjust the pixel values ​​of all pixels in the third white light image in the R channel, G channel and B channel respectively to obtain the target white light image; The image fusion module is also configured to: The first white light image is used to remove the pixel values ​​of all pixels in the R and G channels or the R and B channels to obtain the first channel image, and the second white light image is used to remove the pixel values ​​of all pixels in the R channel to obtain the second channel image. And for fusing the pixel values ​​on the B channel or G channel of the first channel image to the R channel of the second channel image to obtain the target white light image; or Used to fuse the pixel values ​​of the B channel or G channel on the first white light image to the corresponding R channel on a blank image; And used to fuse the pixel values ​​of the G channel on the second white light image to the corresponding G channel on the blank image; The method is used to fuse the pixel values ​​of the B channel on the second white light image to the corresponding B channel on the blank image to obtain the third white light image; wherein the blank image has the same size as the first white light image and the second white light image.

7. An electronic device, characterized in that, The method includes a processor; and a memory for storing processor-executable instructions, wherein the processor is configured to implement the method of any one of claims 1 to 5 when executing the instructions stored in the memory.

8. A non-volatile computer-readable storage medium storing computer program instructions thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Hemoglobin enhancement method and device based on white light LED illumination and electronic equipment

    CN117830114A

  • Enhancing the visibility of blood vessels in colour images

    EP3620098A1