Endoscope Color Tone Correction Method, Device, and Endoscope

By calculating and correcting the tone information deviation of the image in the endoscope, the tone fluctuation problem caused by light source ratio adjustment is solved, and the image tone stability and user experience are improved.

CN119893006BActive Publication Date: 2025-06-13ZHEJIANG UE MEDICAL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510369004.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-06-13
Estimated Expiration
2045-03-27

AI Technical Summary

Technical Problem

In an endoscope, when adjusting the light source ratio in real time in order to improve the distinction of a specific tissue, it is easy to cause tone fluctuations in the front and back frame images, affecting the user's use.

Method used

By acquiring the tone information of the target acquisition image and the adjacent frame image, the tone information deviation of the two is calculated. When the deviation is greater than the preset value, the target acquired image is tone correction based on the image scene difference until the deviation meets the preset conditions.

Benefits of technology

It realizes the stability of image tone in real-time imaging, avoids tone fluctuations caused by light source ratio adjustment, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119893006B_ABST
    Figure CN119893006B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of medical endoscope imaging technology, and specifically relates to an endoscope color tone correction method, device, and endoscope. The method includes: the color tone correction method includes: after the light source ratio in the illumination unit changes, acquiring a first image collected by the endoscope as a target collected image; acquiring a second image before the light source ratio in the illumination unit of the endoscope changes as an adjacent frame image; calculating first color tone information of the target collected image and second color tone information of the adjacent frame image; when the color tone information deviation between the first color tone information and the second color tone information is greater than a preset color tone deviation, performing color tone correction on the target collected image based on the image scene difference between the target collected image and the adjacent frame image until the adjusted color tone information deviation meets the preset deviation, and outputting the adjusted target collected image as a color tone corrected image; systematically adjusting the color tone difference through the scene difference, so as to maintain the stable expression of the image color tone in real-time imaging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical endoscope imaging, and particularly to an endoscope color tone correction method, device and endoscope. Background Art

[0002] With the booming development of endoscope applications, doctors' demand for high-quality endoscope imaging is also continuously increasing. In the endoscope application scenario, especially during the examination, diagnosis and treatment of digestive endoscopes (gastrointestinal endoscopes), doctors usually use the white light imaging mode that conforms to the human eye vision for routine operations. When further exploring lesions is needed, the narrow band light imaging mode will be switched.

[0003] Whether it is white light imaging or narrow band light imaging, the illumination light source providing the corresponding imaging mode is composed of two or more LED light sources in combination. For example, in the white light imaging mode, its illumination light source can specifically be composed of 5 LEDs such as a blue-violet light source, a blue light source, a green light source, an amber light source, and a red light source. For example, in the common NBI imaging mode, its illumination light source can be composed of a narrow band blue-violet light source and a narrow band green light source.

[0004] Since the absorption and reflection characteristics of different spectral bands in different parts of the human body cavity are different, it is often necessary to adjust the proportion of the light source combination according to the actual tissue part. By increasing or decreasing the light power proportion of one or several light sources, the purpose of highlighting the specific tissue detail information characteristics can be achieved. For example, the oral mucosa epithelium mainly composed of stratified squamous epithelium, the gastric mucosa surface epithelium mainly composed of columnar epithelial cells, and the duodenum where a large amount of bilirubin is excreted by the bile duct after the action of the liver all have obvious differences in their absorption and reflection characteristics of blue light and blue-violet light. Appropriately increasing or decreasing the proportion of blue light and blue-violet light will significantly improve the contrast and detail information of the corresponding parts; for example, at different stages of gastrointestinal endoscope exploration, diagnosis and treatment, according to the amount of bleeding, it is necessary to appropriately change the proportion of red light to improve the distinguishability of the bleeding point.

[0005] However, whenever the established proportion of the illumination light source changes, if no treatment is done, it is easy to know that the color tone of the image will also change accordingly; in a real-time imaging system, this will affect the user's use. Therefore, how to adjust the light source ratio in real time, while improving the distinguishability of mucous membranes, blood vessels and tissues, etc., and also being able to maintain the stable expression of the color tone in real-time imaging is an urgent problem to be solved. Summary of the Invention

[0006] In view of this, the present invention provides an endoscope color tone correction method to solve the problem of color tone fluctuation of the front and rear frame images caused by adjusting the light source ratio in real time to improve the distinguishability of specific tissues.

[0007] In a first aspect, the present invention provides an endoscope color tone correction method. The endoscope has an illumination unit, and the illumination unit includes a plurality of light sources. The light sources synthesize illumination light according to a light source ratio. The color tone correction method includes: after the light source ratio in the illumination unit changes, acquiring a first image collected by the endoscope as a target collected image; acquiring a second image before the change of the light source ratio in the illumination unit of the endoscope as an adjacent frame image; calculating first color tone information of the target collected image and second color tone information of the adjacent frame image; when the color tone information deviation between the first color tone information and the second color tone information is greater than a preset color tone deviation, performing color tone correction on the target collected image based on the image scene difference between the target collected image and the adjacent frame image until the adjusted color tone information deviation meets the preset deviation, and outputting the adjusted target collected image as a color tone corrected image.

[0008] As an exemplary embodiment, the performing color tone correction on the target collected image based on the scene difference between the target collected image and the adjacent frame image includes: calculating the image scene difference between the target collected image and the adjacent frame image based on a moving target detection algorithm; determining a global correction weight and / or a local correction weight for each pixel in the target collected image based on the image scene difference; wherein, the global correction weight is positively correlated with the image scene difference, and the local correction weight is negatively correlated with the image scene difference; performing color tone correction on each pixel in the target collected image based on the global correction weight and / or the local correction weight.

[0009] As an exemplary embodiment, the determining the global correction weight and the local correction weight based on the image scene difference includes: determining a scene difference measurement degree parameter for each pixel in the target collected image based on the image scene difference; determining the global correction weight and the local correction weight for each pixel in the target collected image based on the scene difference measurement degree parameter; wherein, the global correction weight is positively correlated with the scene difference measurement degree parameter, and the local correction weight is negatively correlated with the scene difference measurement degree parameter.

[0010] As an exemplary embodiment, the performing color tone correction on each pixel in the target collected image based on the global correction weight and the local correction weight includes: performing global color tone adjustment on the target collected image to obtain a first adjusted image; performing global color tone adjustment on the first adjusted image based on the global correction weight of each pixel in the first adjusted image to obtain a second adjusted image; performing local color tone adjustment on the second adjusted image to obtain a third adjusted image; performing local color tone adjustment on the third adjusted image based on the local correction weight of each pixel in the third adjusted image to obtain the color tone corrected image.

[0011] As an exemplary embodiment, the global tone adjustment of the first adjusted image based on the global correction weights of the pixels in the first adjusted image to obtain a second adjusted image includes: calculating a first correction weight corresponding to the target acquisition image based on the global correction weights of the pixels; wherein the sum of the global correction weights and the first correction weights is 1; adjusting the tones of the pixels in the first adjusted image pixel by pixel based on the global correction weights to obtain a first globally adjusted image; adjusting the tones of the pixels in the target acquisition image pixel by pixel based on the first correction weights to obtain a second globally adjusted image; and fusing the first globally adjusted image and the second globally adjusted image to obtain the second adjusted image.

[0012] As an exemplary embodiment, the local tone adjustment of the third adjusted image based on the local correction weights of the pixels in the third adjusted image to obtain the tone-corrected image includes: calculating a second correction weight corresponding to the second adjusted image based on the local correction weights of the pixels; wherein the sum of the local correction weights and the second correction weights is 1; adjusting the tones of the pixels in the third adjusted image pixel by pixel based on the local correction weights to obtain a first locally adjusted image; adjusting the tones of the pixels in the second adjusted image pixel by pixel based on the second correction weights to obtain a second locally adjusted image; and fusing the first locally adjusted image and the second locally adjusted image to obtain the tone-corrected image.

[0013] As an exemplary embodiment, the tone information deviation includes local tone deviation. After determining the global correction weights and local correction weights of each pixel in the target acquisition image based on the image scene difference, the endoscopic tone correction method further includes: in the target acquisition image, screening the pixels in the target area as pixels to be processed; wherein the image scene difference in the target area is less than a preset image scene difference, and there are new local details generated due to the adjustment of the light source ratio in the target area; determining the local detail adjustment weights of the pixels to be processed based on the image scene differences of the pixels to be processed; wherein the local detail adjustment weights are positively correlated with the image scene differences; and increasing the global correction weights within a preset range and / or decreasing the local correction weights within a preset range based on the local detail adjustment weights.

[0014] As an exemplary embodiment, calculating the image scene difference between the target acquisition image and the adjacent frame image includes: calculating a differential image between the target acquisition image and the adjacent frame image; determining the scene difference measurement degree parameter of each pixel in the target acquisition image based on the image scene difference includes: obtaining a preset differential image threshold group, where the preset differential image threshold group includes multiple threshold levels and the differential image thresholds corresponding to the threshold levels; mapping the differential image value of each pixel point in the differential image to the level number corresponding to the threshold level as the scene difference measurement degree parameter based on the differential image value of each pixel point in the differential image and the preset differential image threshold group; where the scene difference measurement degree parameter is positively correlated with the level number.

[0015] In a second aspect, the present invention provides an endoscope tone correction device. The endoscope has an illumination unit, and the illumination unit includes a plurality of light sources. The light sources synthesize illumination light according to a light source ratio. The endoscope tone correction device includes: a first acquisition module, configured to acquire a first image acquired by the endoscope as a target acquisition image after the light source ratio in the illumination unit changes; a second acquisition module, configured to acquire a second image before the light source ratio in the illumination unit of the endoscope changes as an adjacent frame image; a tone information calculation module, configured to calculate a first tone information of the target acquisition image and a second tone information of the adjacent frame image; a tone correction module, configured to perform tone correction on the target acquisition image based on the image scene difference between the target acquisition image and the adjacent frame image when the tone information deviation between the first tone information and the second tone information is greater than a preset tone deviation, until the tone information deviation after adjustment meets the preset deviation, and output the adjusted target acquisition image as a tone correction image.

[0016] In a third aspect, the present invention provides an endoscope, including an illumination unit, an imaging unit, and an image processing unit. Among them, the illumination unit includes a plurality of light sources, and the light sources synthesize illumination light according to a light source ratio; when the light sources synthesize illumination light according to a light source ratio, the imaging unit can acquire a target image as a target acquisition image, including a memory for a computer program; a processor, configured to implement the endoscope tone correction method according to the first aspect or any corresponding implementation manner thereof when executing the computer program stored on the memory.

[0017] The present invention provides an endoscope color tone correction method, apparatus, and endoscope. The endoscope has an illumination unit, and the illumination unit includes a plurality of light sources. The light sources synthesize illumination light according to a light source ratio. The color tone correction method includes: after the light source ratio in the illumination unit changes, acquiring a first image collected by the endoscope as a target collected image; acquiring a second image before the change of the light source ratio in the illumination unit of the endoscope as an adjacent frame image; calculating first color tone information of the target collected image and second color tone information of the adjacent frame image; when the color tone information deviation between the first color tone information and the second color tone information is greater than a preset color tone deviation, performing color tone correction on the target collected image based on the image scene difference between the target collected image and the adjacent frame image until the color tone information deviation after adjustment meets the preset deviation, and outputting the adjusted target collected image as a color tone corrected image; performing color tone correction on the target collected image based on the image scene difference between the target collected image and the adjacent frame image can systematically adjust the color tone difference through the scene difference between the target collected image and the adjacent frame image, so as to maintain the stable expression of the image color tone in real-time imaging, and solve the problem of color tone fluctuation of the front and rear frame images caused by real-time adjustment of the light source ratio to improve the distinguishability of specific tissues. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0019] Figure 1 is a flowchart of an endoscope color tone correction method according to an embodiment of the present invention;

[0020] Figure 2 is a structural block diagram of an endoscope color tone correction apparatus according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0022] According to an embodiment of the present invention, an embodiment of an endoscope color tone correction method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0023] In one embodiment, the endoscope color tone correction method is applied to an endoscope.

[0024] In one embodiment, the endoscope includes an illumination unit, an imaging unit, and an image processing unit, and the imaging processing unit is used to execute the endoscope color tone correction method; wherein, the illumination unit includes at least one first narrowband light source in at least one first band corresponding to the blue channel in the target image collected by the imaging unit, at least one second narrowband light source in at least one second band corresponding to the green channel, and at least one third narrowband light source in at least one third band corresponding to the red channel; under the corresponding optical powers of the first narrowband light source, the second narrowband light source, and the third narrowband light source, the imaging unit can collect a target image as a target acquisition image.

[0025] In one embodiment, the illumination unit included in the endoscope is composed of a combination of a narrowband blue-violet light source, a narrowband blue light source, a narrowband green light source, a narrowband amber light source, and a narrowband red light source; wherein, the central wavelength of the narrowband blue-violet light source can be 415±10nm, the central wavelength of the narrowband blue light source can be 460±10nm, the central wavelength of the narrowband green light source can be 540±15nm, the central wavelength of the narrowband amber light source can be 600±15nm, and the central wavelength of the narrowband red light source can be 630±10nm.

[0026] In this embodiment, an endoscope color tone correction method is provided, which can be used for the above endoscope or image processing unit. Figure 1 It is a flowchart of the endoscope color tone correction method according to an embodiment of the present invention, as Figure 1 shown, and this process includes the following steps:

[0027] Step S101, after the light source ratio in the illumination unit changes, obtain the first image collected by the endoscope as a target acquisition image.

[0028] In this embodiment, the target acquisition image is obtained from the target image obtained by the imaging unit collecting the target object under the corresponding optical powers of the first narrowband light source, the second narrowband light source, and the third narrowband light source included in the illumination unit.

[0029] Since the absorption and reflection characteristics of different parts in the human body cavity vary for different spectral bands, it is often necessary to adjust the proportion of the light source combination according to the actual tissue part. By increasing or decreasing the light power proportion of one or several light sources, the purpose of highlighting the characteristic information of specific tissue details can be achieved.

[0030] However, whenever the established proportion of the illumination light source changes, if no treatment is done, it is easy to know that the tone of the image will also change accordingly; in a real-time imaging system, this will affect the user's use.

[0031] In order to synthesize white light, the lighting unit usually modulates the best ratio for white light to obtain the best color rendering index CRI and other key light source indicators; therefore, the light power parameters corresponding to each light source at a certain white light brightness level of the lighting unit are determined, that is, a multi-LED light power coefficient table at each of its light brightness levels can be obtained; the automatic dimming module in the image processing unit will then adjust the light source to the appropriate level in real time according to the actual brightness of the current scene.

[0032] When enhancing the contrast and details of targets such as mucous membranes and blood vessels, one or several light sources will be adjusted separately. This process is carried out simultaneously with the automatic dimming process. At this time, only the light power of the adjusted light source changes relative to the light power value of this light source corresponding to the target brightness level of its automatic dimming unit. Therefore, if the actual light power of at least one light source of the target acquisition image is different from the preset light power, the acquired image may have changed to adapt to enhancing the contrast and details of targets such as mucous membranes and blood vessels.

[0033] Based on this, if the actual light power of at least one light source of the target acquisition image is different from the preset light power, it can be confirmed that the proportion of the light sources in the lighting unit has changed. At this time, the first image acquired by the endoscope is obtained as the target acquisition image.

[0034] In one embodiment, the target acquisition image can be the first first image acquired after the proportion of the light sources changes.

[0035] In one embodiment, the target acquisition image can be the Nth first image acquired after the proportion of the light sources changes, where N is a positive integer greater than 1.

[0036] In one embodiment, the target acquisition image can be an image set composed of M first images acquired after the proportion of the light sources changes; where M is a positive integer greater than 1.

[0037] Step S102, obtain the second image before the proportion of the light sources in the lighting unit of the endoscope changes as the adjacent frame image.

[0038] When a predetermined proportion of the light source of the illumination light source changes, if no treatment is done, it is easy to know that the hue of the image will also change accordingly; in a real-time imaging system, this will affect the user's use; and the image before the change of the light source proportion in the illumination unit of the endoscope can represent the hue information characterized when the predetermined proportion of the light source in the current scene has not changed; therefore, it is necessary to obtain a second image before the change of the light source proportion as an adjacent frame image, and further confirm whether the hue of the image has changed based on the difference between the adjacent frame image and the target acquisition image.

[0039] In one embodiment, the adjacent frame image can be the last image acquired before the change of the light source proportion.

[0040] In one embodiment, the adjacent frame image can be an image set composed of the last M images acquired before the change of the light source proportion; where M is a positive integer greater than 1.

[0041] After obtaining the target acquisition image and the adjacent frame image, it is necessary to confirm whether the hue of the target acquisition image has changed according to the hue information of the target acquisition image with the changed light power proportion and the hue information of the adjacent frame image with the unchanged light power. Based on this, after obtaining the target acquisition image and the adjacent frame image, step S103 is entered.

[0042] Step S103, calculate the first hue information of the target acquisition image and the second hue information of the adjacent frame image.

[0043] In one embodiment, the first hue information and the second hue information can include global hue information and local hue information.

[0044] In one embodiment, the global hue information included in the first hue information can be the main hue of the target acquisition image or a set of hue sequences.

[0045] In one embodiment, the global hue information included in the second hue information can be the main hue of the adjacent frame image or a set of hue sequences.

[0046] As an exemplary embodiment, an implementation manner of extracting the global hue is: using a color quantization algorithm to compress the number of colors of the target acquisition image and the adjacent frame image to obtain a set of candidate hue sequences; where the color quantization algorithm includes but is not limited to the K-Means color clustering method based on the RGB space, the K-Means color clustering method based on the Lab space, the uniform color quantization method, the popular color algorithm, the median cut method, the minimum variance quantization method, the octree color quantization algorithm, the color quantization method based on deep learning, etc.; further, directly using the above candidate hue sequences as the main hue sequences.

[0047] As another exemplary embodiment, after obtaining the candidate color tone sequence, further, the frequency of each candidate color tone appearing in the image is statistically counted, and several color tones with the highest frequencies are selected to represent the main color tones.

[0048] Among them, exemplarily, the main color tone sequence can be denoted as , and the values of the main color tones can be represented in various color spaces such as RGB, Lab, and HSV.

[0049] In one embodiment, the local color tone information of the first color tone information can be the color tone of the pixel points themselves that make up the target acquisition image, or the weighted color tone of the pixel blocks within the preset area of the pixel points and their neighborhoods; wherein, the preset area can be a circular area or a rectangular area centered on the pixel point with a radius or side length of N pixel points, and N is a positive integer greater than 1.

[0050] As an exemplary embodiment, an implementation manner of extracting the local color tone is: using the color of the pixel point itself as the local color tone, and the ways of extracting the color tone information include but are not limited to converting from the RGB space to the HSV space and using the H channel value to represent the color tone; converting from the RGB space to the Lab space and using the a and b channel values to represent the color tone; converting from the RGB space to the Yuv space and using the u and v channel values to represent the color tone.

[0051] In one embodiment, the local color tone information of the second color tone information can be the color tone of the pixel points themselves that make up the adjacent frame image, or the weighted color tone of the pixel blocks within the preset area of the pixel points and their neighborhoods; wherein, the preset area can be a circular area or a rectangular area centered on the pixel point with a radius or side length of M pixel points, and M is a positive integer greater than 1.

[0052] As an exemplary embodiment, an implementation manner of extracting the local color tone information is: using the weighted color tone of the pixel blocks within a certain area of the pixel point and its neighborhood as the local color tone. Let the neighborhood range with a radius of centered on the current pixel point be the pixel blocks to be statistically counted, extract the color tone information of each pixel in the pixel blocks, and denote it as the matrix , set the Gaussian distribution weight matrix , then the weighted local color tone .

[0053] Exemplarily, after obtaining the first color tone information of the target acquisition image and the second color tone information of the adjacent frame image, calculate the color tone information deviation between the first color tone information of the target acquisition image and the second color tone information of the adjacent frame image, so as to confirm whether the color tone of the target acquisition image has changed through the color tone information deviation.

[0054] As an exemplary embodiment, let the color tone information deviation be , and the global color tone deviation be , the local tone deviation is , that is, .

[0055] Exemplarily, the global tone deviation can be calculated by Equation (1) :

[0056] (1)

[0057] In Equation (1), is the global tone deviation, is the i-th global main tone of the target acquisition image, is the i-th global main tone of the adjacent frame image.

[0058] Among them, if the value of the main tone is represented in the Lab color space, the above formula can be further expressed as Equation (2):

[0059] (2)

[0060] In Equation (2), is the global tone deviation, is the i-th a-channel value of the target acquisition image, is the i-th b-channel value of the target acquisition image, is the i-th a-channel value of the adjacent frame image, is the i-th b-channel value of the adjacent frame image.

[0061] Exemplarily, the local tone deviation can be calculated by Equation (3):

[0062] (3)

[0063] In Equation (3), is the local tone deviation, is the local tone information of the target acquisition image, is the local tone information of the adjacent frame image.

[0064] Among them, if the value of the local tone P is represented in the Lab color space, the above formula can be further expressed as Equation (4):

[0065] (4)

[0066] In Equation (4), is the local tone deviation, is the a-channel value of the target acquisition image, is the b-channel value of the target acquisition image, is the a-channel value of the adjacent frame image, is the b-channel value of the adjacent frame image.

[0067] Exemplarily, when the hue information deviation is not greater than a preset hue deviation, it can be considered that the hue of the image does not change with the established ratio change of the illumination light source, and at this time, the target acquisition image is directly output.

[0068] Step S104, when the hue information deviation between the first hue information and the second hue information is greater than the preset hue deviation, perform hue correction on the target acquisition image based on the scene difference between the target acquisition image and the adjacent frame image until the adjusted hue information deviation meets the preset hue deviation, and output the adjusted target acquisition image as the hue-corrected image.

[0069] When the hue information deviation is greater than the preset hue deviation, it can be considered that the hue of the image changes with the established ratio change of the illumination light source, and the hue of the target acquisition image should be corrected.

[0070] The change of the established ratio of the illumination light source is carried out for the purpose of highlighting the feature information of specific tissue details. Therefore, when the hue information deviation is greater than the preset hue deviation, the scene difference between the target acquisition image and the adjacent frame image can reflect its reference-biased hue information; specifically, for the area with a small scene difference between the target acquisition image and the adjacent frame image, it can refer more to the local hue at the corresponding position of the adjacent frame image and less to the global hue of the adjacent frame image or the target acquisition image; while for the area with a large scene difference between the target acquisition image and the adjacent frame image, it is difficult to refer to the local hue at the corresponding position of the adjacent frame image and can refer more to the global hue of the adjacent frame image or the target acquisition image; therefore, when the hue information deviation is greater than the preset hue deviation, perform hue correction on the target acquisition image based on the scene difference between the target acquisition image and the adjacent frame image.

[0071] Exemplarily, when performing hue correction on the target acquisition image based on the scene difference between the target acquisition image and the adjacent frame image, corresponding correction weights can be set for each pixel in the target acquisition image according to the scene difference between the target acquisition image and the adjacent frame image, and further, the hue is adjusted according to the correction weights, so that the target pixel can separately refer to the local hue of the adjacent frame image, separately refer to the global hue of the adjacent frame image or the target acquisition image, or jointly refer to the local hue of the adjacent frame image and the global hue of the adjacent frame image or the target acquisition image according to the correction weights, avoiding the hue change caused by the change of the light source ratio, so as to systematically adjust the hue difference through the scene difference between the target acquisition image and the adjacent frame image, thereby maintaining the stable expression of the image hue in real-time imaging.

[0072] Exemplarily, when performing hue correction on the target acquisition image based on the scene difference between the target acquisition image and the adjacent frame image, corresponding correction weights can be set for similar regions in the target acquisition image according to the scene difference between the target acquisition image and the adjacent frame image; wherein, the actual similarity degree of the scenes represented by the pixels included in the similar region in the target acquisition image and the adjacent frame image is greater than a preset similarity degree; further, the hue is adjusted according to the correction weights, so that the target pixel can separately refer to the local hue of the adjacent frame image, separately refer to the global hue of the adjacent frame image or the target acquisition image, or jointly refer to the local hue of the adjacent frame image and the global hue of the adjacent frame image or the target acquisition image according to the correction weights, avoiding hue changes caused by changes in the light source ratio, so as to systematically adjust the hue difference through the scene difference between the target acquisition image and the adjacent frame image, thereby maintaining the stable expression of the image hue in real-time imaging.

[0073] Exemplarily, when performing hue correction on the target acquisition image based on the scene difference between the target acquisition image and the adjacent frame image, after obtaining the adjusted target acquisition image, further determine the hue information deviation between the adjusted target acquisition image and the adjacent frame image; if the hue information deviation between the adjusted target acquisition image and the adjacent frame image meets the preset hue deviation, output the adjusted target acquisition image as the hue correction image.

[0074] In one embodiment, a first preset hue deviation can be set separately for the hue information deviation. If the hue information deviation between the adjusted target acquisition image and the adjacent frame image meets the preset hue deviation and is less than the first preset hue information deviation, it can be confirmed that the adjusted hue information deviation meets the preset hue deviation.

[0075] In one embodiment, while setting the first preset hue deviation for the hue information deviation, a second preset hue deviation can be set for the global hue deviation or a third preset hue deviation can be set for the local hue deviation. If the adjusted hue information deviation is less than the first preset hue deviation, and the adjusted global hue deviation is less than the second preset hue deviation, or the adjusted hue information deviation is less than the first preset hue deviation, and the adjusted local hue deviation is less than the third preset hue deviation, it can be confirmed that the adjusted hue information deviation meets the preset hue deviation.

[0076] In one embodiment, while setting a first preset hue deviation for the hue information deviation, a second preset hue deviation for the global hue deviation, a third preset hue deviation for the local hue deviation can be set; if the adjusted hue information deviation is less than the first preset hue deviation, the adjusted global hue deviation is less than the second preset hue deviation, and the adjusted local hue deviation is less than the third preset hue deviation, it can be confirmed that the adjusted hue information deviation meets the preset hue deviation.

[0077] For the endoscopic hue correction method provided in this embodiment, the endoscope has an illumination unit, the illumination unit includes a plurality of light sources, and the light sources synthesize illumination light according to the light source ratio. The hue correction method includes: after the light source ratio in the illumination unit changes, obtaining a first image collected by the endoscope as a target collected image; obtaining a second image before the light source ratio in the illumination unit of the endoscope changes as an adjacent frame image; calculating first hue information of the target collected image and second hue information of the adjacent frame image; when the hue information deviation between the first hue information and the second hue information is greater than the preset hue deviation, performing hue correction on the target collected image based on the image scene difference between the target collected image and the adjacent frame image until the adjusted hue information deviation meets the preset deviation, and outputting the adjusted target collected image as a hue-corrected image; performing hue correction on the target collected image based on the image scene difference between the target collected image and the adjacent frame image can systematically adjust the hue difference through the scene difference between the target collected image and the adjacent frame image, so as to maintain the stable expression of the image hue in real-time imaging, and solve the problem of hue fluctuation of the front and rear frame images when the light source ratio is adjusted in real-time to improve the distinguishability of specific tissues.

[0078] As an exemplary embodiment, each time hue correction is performed on the target collected image based on the image scene difference between the target collected image and the adjacent frame image, and the adjusted target collected image obtained can be recorded as an iterative process, and the actual iteration times obtained in each iterative process are recorded; when the actual iteration times reach the preset iteration times, the adjusted target collected image corresponding to the preset iteration times is output as a hue-corrected image.

[0079] As an exemplary embodiment, performing hue correction on the target acquisition image based on the scene difference between the target acquisition image and the adjacent frame image includes: calculating the image scene difference between the target acquisition image and the adjacent frame image based on a moving object detection algorithm; determining the global correction weight and / or local correction weight of each pixel in the target acquisition image based on the image scene difference; wherein, the global correction weight is positively correlated with the image scene difference, and the local correction weight is negatively correlated with the image scene difference; performing pixel-by-pixel hue correction on the target acquisition image based on the global correction weight and / or the local correction weight.

[0080] Exemplarily, the value ranges of the global correction weight and the local correction weight are [0, 1].

[0081] In this embodiment, the global correction weight and the local correction weight can be set separately or jointly for the pixels of the target acquisition image, and further, hue adjustment of the target acquisition image can be achieved by performing pixel-by-pixel hue correction on each pixel in the target acquisition image based on the global correction weight and the local correction weight separately or jointly.

[0082] In one embodiment, a corresponding global correction weight is set separately for each pixel in the target acquisition image; for regions with a large image scene difference, its global correction weight is positively correlated with the image scene difference; for the above setting method of the global correction weight, for pixels in the target acquisition image with a large image scene difference from the adjacent frame image, the larger the set value when setting its corresponding global correction weight, so that it tends to perform hue correction with reference to the global hue of the reference adjacent frame image or the target acquisition image; for pixels in the target acquisition image with a small image scene difference from the adjacent frame image, the smaller the set value when setting its corresponding global correction weight, weakening its participation in performing hue correction with reference to the global hue of the reference adjacent frame image or the target acquisition image.

[0083] In one embodiment, a corresponding local correction weight is set separately for each pixel in the target acquisition image, and the local correction weight is negatively correlated with the image scene difference; for the above setting method of the local correction weight, for pixels in the target acquisition image with a large image scene difference from the adjacent frame image, the smaller the set value when setting its corresponding local correction weight, so that it refers less to the local hue at the corresponding position of the adjacent frame image; for pixels in the target acquisition image with a small image scene difference from the adjacent frame image, the larger the set value when setting its corresponding local correction weight, so that it tends to perform hue correction with reference to the local hue at the corresponding position of the adjacent frame image.

[0084] In one embodiment, corresponding global correction weights and local correction weights are set for each pixel in the target acquisition image. The global correction weights are positively correlated with the image scene difference, and the local correction weights are negatively correlated with the image scene difference. For the pixels in the target acquisition image with a large image scene difference from the adjacent frame image, when setting the global correction weights corresponding to them, the set value is larger, and when setting the local correction weights corresponding to them, the set value is smaller. This enables them to refer more to the global tone information of the target acquisition image and the adjacent frame image during tone correction, while referring less to the local tone at the corresponding position in the adjacent frame image. For the pixels in the target acquisition image with a small image scene difference from the adjacent frame image, when setting the global correction weights corresponding to them, the set value is smaller, and when setting the local correction weights corresponding to them, the set value is larger. This enables them to refer more to the local tone information at the corresponding position in the adjacent frame image during tone correction, while referring less to the global tone information of the target acquisition image and the adjacent frame image.

[0085] In one embodiment, the global correction weights and the local correction weights are determined by the scene difference measurement degree parameter corresponding to the image scene difference. Specifically, as an exemplary embodiment, determining the global correction weights and the local correction weights based on the image scene difference includes: determining the scene difference measurement degree parameter of each pixel in the target acquisition image based on the image scene difference; determining the global correction weights and the local correction weights of each pixel in the target acquisition image based on the scene difference measurement degree parameter. Among them, the global correction weights are positively correlated with the scene difference measurement degree parameter, and the local correction weights are negatively correlated with the scene difference measurement degree parameter.

[0086] Among them, in this embodiment, the calculation of the image scene difference between the target acquisition image and the adjacent frame image can be implemented by a moving target detection algorithm including, but not limited to, frame difference method, optical flow method, background subtraction method, etc.

[0087] Exemplarily, taking the use of the frame difference method to determine the image scene difference, thereby determining the scene difference measurement degree parameter according to the image scene difference, and further determining the global correction weights and the local correction weights as an example, the technical solution of this embodiment is described:

[0088] As an exemplary embodiment, calculating the image scene difference between the target acquisition image and the adjacent frame image includes: calculating the difference image between the target acquisition image and the adjacent frame image; determining the scene difference measurement degree parameter of each pixel in the target acquisition image based on the image scene difference, including: obtaining a preset difference image threshold group, where the preset difference image threshold group includes multiple threshold levels and the difference image thresholds corresponding to the threshold levels; mapping the difference image values of each pixel point in the difference image to the level numbers corresponding to the threshold levels based on the preset difference image threshold group as the scene difference measurement degree parameter; where the scene difference measurement degree parameter is positively correlated with the level number.

[0089] In this embodiment, the frame difference method is used to calculate the difference image between two consecutive frames. and obtain a preset difference image threshold group and use Equation (5) for mapping to obtain the scene difference measurement degree parameter:

[0090] (5)

[0091] In Equation (5), d represents the scene difference measurement degree parameter, represents the pixel coordinates of the pixel in the difference image, to are the thresholds in the preset difference image threshold group, 1 to M are the level numbers, and M is a positive integer greater than or equal to 2.

[0092] As an exemplary embodiment, the hue correction of the target acquisition image based on the scene difference between the target acquisition image and the adjacent frame image further includes: calculating the image scene difference between the target acquisition image and the adjacent frame image based on a moving target detection algorithm; determining the global correction weight and / or local correction weight of each pixel in the target acquisition image based on the image scene difference; where the global correction weight is positively correlated with the image scene difference, and the local correction weight is inversely correlated with the image scene difference; performing hue correction on each pixel in the target acquisition image based on the global correction weight and / or the local correction weight.

[0093] In this embodiment, the specific implementation manner of calculating the image scene difference between the target acquisition image and the adjacent frame image based on a moving target detection algorithm can refer to the content recorded in the above embodiment and will not be elaborated here.

[0094] After obtaining the image scene difference, exemplarily, each pixel in the target acquisition image is classified according to the degree of the image scene difference to obtain multiple pixel sets with different image scene difference levels; further, based on the image scene difference corresponding to each pixel set, the global correction weight and / or local correction weight of each pixel in the pixel set is determined, and further, each pixel in the target acquisition image is subjected to hue correction based on the global correction weight and / or the local correction weight.

[0095] As an exemplary embodiment, the performing hue correction on each pixel in the target acquisition image based on the global correction weight and the local correction weight includes: performing global hue adjustment on the target acquisition image to obtain a first adjusted image; performing global hue adjustment on the first adjusted image based on the global correction weight of each pixel in the first adjusted image to obtain a second adjusted image; performing local hue adjustment on the second adjusted image to obtain a third adjusted image; and performing local hue adjustment on the third adjusted image based on the local correction weight of each pixel in the third adjusted image to obtain the hue-corrected image.

[0096] Exemplarily, in order to maintain the brightness consistency of the image, the brightness difference between the target acquisition image and the adjacent frame image caused by the exposure parameter difference is corrected by brightness normalization to obtain a target acquisition image with brightness consistency with the target acquisition image. 。

[0097] In this embodiment, when performing hue correction on each pixel in the target acquisition image based on the global correction weight and the local correction weight, first, the target acquisition image is subjected to global hue adjustment to obtain a first adjusted image with a unified and relatively rough global hue adjustment , and based on the global correction weight of each pixel in the first adjusted image , global weight adjustment is performed pixel by pixel to obtain a second adjusted image with a more refined global hue adjustment based on the global correction weight at the pixel level ; then, based on the second adjusted image after global adjustment , local hue adjustment is performed to obtain a third adjusted image with a relatively rough local hue adjustment , and further, local weight adjustment is performed on the third adjusted image to obtain a hue-corrected image with a more refined local hue adjustment based on the local correction weight at the pixel level 。

[0098] Among them, global tone adjustment refers to uniformly adjusting the tone of the entire image to make the main tone sequence of the image to be adjusted close to that of the output image of the previous frame. As a possible implementation method, the target acquisition image is subjected to hue adjustment, saturation adjustment, white balance adjustment, and exposure adjustment to obtain a first adjusted image ; among them, hue adjustment is used to change the phase of the colors in the image, that is, the basic attributes of the colors, such as red, yellow, green, etc.; saturation adjustment: used to change the saturation of the colors in the image, that is, the vividness of the colors; white balance adjustment: used to correct the color temperature problem in the image to make the white in the image look more natural, and exposure adjustment: used to control the brightness and darkness of the image.

[0099] In this embodiment, global weight adjustment is performed pixel by pixel based on the global correction weights of the pixels in the first adjusted image to obtain a second adjusted image When, the second adjusted image is obtained by fusing the first adjusted image and the target acquisition image ; based on this, as an exemplary embodiment, global tone adjustment is performed on the first adjusted image based on the global correction weights of the pixels in the first adjusted image to obtain a second adjusted image, including: calculating the first correction weight corresponding to the target acquisition image based on the global correction weights of the pixels; where the sum of the global correction weight and the first correction weight is 1; adjusting the tones of the pixels in the first adjusted image pixel by pixel based on the global correction weight to obtain a first globally adjusted image; adjusting the tones of the pixels in the target acquisition image pixel by pixel based on the first correction weight to obtain a second globally adjusted image; fusing the first globally adjusted image and the second globally adjusted image to obtain the second adjusted image.

[0100] In this embodiment, the second adjusted image can be obtained through formula (6):

[0101] (6)

[0102] In formula (6), represents the global tone adjustment parameter when the pixel of the second adjusted image corresponds to global tone adjustment, represents the global correction weight, represents the global tone adjustment parameter when the pixel of the target acquisition image corresponds to global tone adjustment.

[0103] Among them, local tone adjustment refers to performing pixel-level fine adjustment on a local area of the image to make the local tone of the image to be adjusted closer to the local tone of the corresponding feature area of the adjacent frame image; in this embodiment, by using the second adjusted image and the adjacent frame image The pixels in are mapped to the HSV space and further subjected to local hue adjustment to obtain

[0104] As a possible implementation method, let be Convert the RGB value of the corresponding pixel to the value of the H hue channel in the HSV space. be Convert the RGB value of to the value of the H hue channel in the HSV space, and normalize the H channel to [0, 1).

[0105] Furthermore, if , then ;

[0106] That is , and if ,

[0107] If , then

[0108] That is

[0109] If , then

[0110] That is , and if ,

[0111] If then

[0112] That is

[0113] Among them, is the step parameter, and its value range is [0, 1]. One way of iteration is , where j is the j-th iteration, that is, the current parameter value is the square of the previous parameter value.

[0114] As an exemplary embodiment, local tone adjustment is performed on the third adjusted image based on the local correction weights of the pixels in the third adjusted image to obtain the tone-corrected image, including: calculating a second correction weight corresponding to the second adjusted image based on the local correction weights of the pixels; wherein, the sum of the local correction weights and the second correction weight is 1; adjusting the tone of each pixel in the third adjusted image pixel by pixel based on the local correction weights to obtain a first locally adjusted image; adjusting the tone of each pixel in the second adjusted image pixel by pixel based on the second correction weight to obtain a second locally adjusted image; fusing the first locally adjusted image and the second locally adjusted image to obtain the tone-corrected image.

[0115] (7)

[0116] In formula (7), represents the local tone adjustment parameter when the pixel of the third adjusted image corresponds to local tone adjustment, represents the local correction weight, represents the local tone adjustment parameter when the pixel of the tone-corrected image corresponds to local tone adjustment.

[0117] Wherein, exemplarily, after obtaining , calculate and the adjacent frame image for the tone information deviation. When the tone information deviation is greater than the preset tone deviation, further perform tone correction on the target acquisition image based on the scene difference between and until the adjusted tone information deviation meets the preset deviation, and output the adjusted target acquisition image as the tone-corrected image.

[0118] The above embodiment can perform tone correction on the target acquisition image according to the scene difference between the target acquisition image and the adjacent frame image; however, for regions with small scene differences but increased local new details due to the adjustment of the light source ratio, when using the above method for correction, due to its relatively small scene difference, it corresponds to a relatively high local correction weight, which will instead cause the tone of the image in the region with increased local new details to change relative to the region where the light source ratio remains unchanged, and there is still a problem of tone fluctuation between the front and rear frame images when the light source ratio is adjusted in real time to improve the distinguishability of specific tissues.

[0119] To solve this problem, as an exemplary embodiment, the hue information deviation includes local hue deviation. After determining the global correction weight and local correction weight of each pixel in the target acquisition image based on the image scene difference, the endoscopic hue correction method further includes: screening the pixels in the target area as pixels to be processed in the target acquisition image; wherein, the image scene difference of the target area is less than a preset image scene difference, and there are new local details generated due to the adjustment of the light source ratio in the target area; determining the local detail adjustment weight of each pixel to be processed based on the image scene difference of each pixel to be processed; wherein, the local detail adjustment weight is positively correlated with the image scene difference; increasing the global correction weight within a preset range or decreasing the local correction weight within a preset range based on the local detail adjustment weight.

[0120] In this embodiment, the image scene difference of the target area is less than the preset image scene difference to screen out the area with small scene difference but increased local new details due to the adjustment of the light source ratio.

[0121] In one embodiment, after the parameter for measuring the scene difference of the target acquisition image can be determined based on the moving target detection algorithm, further, the preset parameter for measuring the scene difference corresponding to the preset image scene difference can be determined according to the extreme value of the parameter for measuring the scene difference of the target area; further, the area where the parameter for measuring the scene difference is less than the preset parameter for measuring the scene difference is screened as the target area.

[0122] In one embodiment, the preset parameter for measuring the scene difference can take any value within the interval; where A is a real number greater than zero and less than one; as a possible implementation, take 0.5.

[0123] Exemplarily, after obtaining the pixels to be processed in the target area, the image scene difference of each pixel to be processed is obtained, and further the local detail adjustment weight is determined based on the image scene difference; wherein, the local detail adjustment weight is positively correlated with the image difference.

[0124] Wherein, as a possible implementation, after obtaining the image scene difference of each pixel to be processed, the parameter for measuring the scene difference of each pixel to be processed is calculated according to formula (5); further, the local detail adjustment weight of each pixel to be processed can be obtained according to formula (8):

[0125] (8)

[0126] In formula (8), represents the local detail adjustment weight, the value range of which is [0,1]; represents a positive correlation mapping function, represents a parameter for measuring the degree of scene difference.

[0127] Furthermore, based on the local detail adjustment weight, increase the global correction weight within a preset range and / or decrease the local correction weight within a preset range; wherein, the preset range is [0, 1].

[0128] Exemplarily, the global correction weight of the pixel to be processed can be corrected according to Equation (9):

[0129] (9)

[0130] In Equation (9), represents the global correction weight, represents the local detail adjustment weight.

[0131] Exemplarily, the local correction weight of the pixel to be processed can be corrected according to Equation (10):

[0132] (10)

[0133] In Equation (10), represents the local correction weight, represents the local detail adjustment weight.

[0134] This embodiment provides an endoscope tone correction device, as Figure 2 shown, including:

[0135] The first acquisition module 201 is configured to, after the light source ratio in the lighting unit changes, acquire the first image collected by the endoscope as the target acquisition image;

[0136] The second acquisition module 202 is configured to acquire the second image before the light source ratio in the lighting unit of the endoscope changes as the adjacent frame image;

[0137] The tone information calculation module 203 is configured to calculate the first tone information of the target acquisition image and the second tone information of the adjacent frame image;

[0138] The tone correction module 204 is configured to, when the tone information deviation between the first tone information and the second tone information is greater than the preset tone deviation, perform tone correction on the target acquisition image based on the image scene difference between the target acquisition image and the adjacent frame image until the tone information deviation after adjustment meets the preset deviation, and output the adjusted target acquisition image as the tone correction image.

[0139] It should be noted here that the examples and application scenarios implemented by the above-mentioned modules and the corresponding steps are the same, but are not limited to the content disclosed in the above embodiments.

[0140] It should be noted that the above-mentioned module, as a part of the device, can be implemented by software or by hardware, where the hardware environment includes a network environment.

[0141] An embodiment of the present invention further provides an endoscope, including an illumination unit, an imaging unit, and an image processing unit. Among them, the illumination unit includes a plurality of light sources, and the light sources synthesize illumination light according to a light source ratio; when the light sources synthesize illumination light according to the light source ratio, the imaging unit can collect a target image as a target acquisition image; the image processing unit can obtain the target acquisition image collected by the imaging unit; it includes a memory for a computer program; a processor, which can implement the endoscope tone correction method in the above-mentioned first aspect or any corresponding implementation manner when executing the computer program stored in the memory.

[0142] The serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0143] If the integrated unit in the above-mentioned embodiments is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the above-mentioned computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in the storage medium and includes several instructions for causing one or more computer devices (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method in the above-mentioned embodiments.

[0144] In several embodiments provided by the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of units or modules can be in an electrical or other form.

[0145] The unit described as a separation component may or may not be physically separated. The component displayed as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.

[0146] In addition, in each embodiment of the present application, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0147] In the above embodiments of the present application, the descriptions of each embodiment have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0148] The above is only the preferred embodiment of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. A method for calibrating color tone of an endoscope, characterized in that: The endoscope has an illumination unit, the illumination unit includes a plurality of light sources, the light sources synthesize illumination light according to a light source ratio, and the color tone correction method includes: After the light source ratio in the lighting unit changes, acquiring a first image captured by the endoscope as a target captured image; Acquire a second image before the light source ratio in the lighting unit of the endoscope changes as an adjacent frame image; Calculating first hue information of the target captured image and second hue information of the adjacent frame image; When the hue information deviation between the first hue information and the second hue information is greater than a preset hue deviation, hue correction is performed on the target captured image based on the image scene difference between the target captured image and the adjacent frame images until the adjusted hue information deviation meets the preset deviation, and the adjusted target captured image is output as a hue-corrected image; Performing tone correction on the target captured image based on the image scene difference between the target captured image and the adjacent frame images includes: According to the scene difference between the target acquisition image and the adjacent frame images, corresponding correction weights are set for each pixel in the target acquisition image or for a similar area in the target acquisition image, and the color tone is adjusted according to the correction weights, wherein the actual similarity between the scenes represented by the pixels contained in the similar area in the target acquisition image and the adjacent frame images is greater than the preset similarity.

2. The endoscope color correction method according to claim 1, characterized in that: The performing tone correction on the target captured image based on the scene difference between the target captured image and the adjacent frame images comprises: Calculating the image scene difference between the target acquisition image and the adjacent frame images based on a moving target detection algorithm; Determine a global correction weight and / or a local correction weight of each pixel in the target acquisition image based on the image scene difference; wherein the global correction weight is positively correlated with the image scene difference, and the local correction weight is inversely correlated with the image scene difference; Tone correction is performed pixel by pixel in the target acquired image based on the global correction weight and / or the local correction weight.

3. The endoscope color correction method according to claim 2, characterized in that: The determining of the global correction weight and the local correction weight based on the image scene difference comprises: Determining a scene difference measurement degree parameter of each pixel in the target captured image based on the image scene difference; The global correction weight and the local correction weight of each pixel in the target acquisition image are determined based on the scene difference measurement degree parameter; wherein the global correction weight is positively correlated with the scene difference measurement degree parameter, and the local correction weight is negatively correlated with the scene difference measurement degree parameter.

4. The endoscope color correction method according to claim 2, characterized in that: The step of performing tone correction on each pixel in the target captured image based on the global correction weight and the local correction weight includes: Performing global tone adjustment on the target captured image to obtain a first adjusted image; Performing global tone adjustment on the first adjusted image based on the global correction weight of each pixel in the first adjusted image to obtain a second adjusted image; Performing local tone adjustment on the second adjusted image to obtain a third adjusted image; The third adjusted image is locally adjusted in tone based on the local correction weight of each pixel in the third adjusted image to obtain the tone-corrected image.

5. The endoscope color tone correction method according to claim 4, characterized in that: The step of performing global tone adjustment on the first adjusted image based on the global correction weight of each pixel in the first adjusted image to obtain a second adjusted image includes: Calculating a first correction weight corresponding to the target acquisition image based on the global correction weight of each pixel; wherein the sum of the global correction weight and the first correction weight is 1; Adjusting the hue of each pixel in the first adjusted image pixel by pixel based on the global correction weight to obtain a first global adjusted image; Adjusting the hue of each pixel in the target captured image pixel by pixel based on the first correction weight to obtain a second globally adjusted image; The first global adjustment image and the second global adjustment image are fused to obtain the second adjustment image.

6. The endoscope color tone correction method according to claim 4, characterized in that: The performing local tone adjustment on the third adjusted image based on the local correction weight of each pixel in the third adjusted image to obtain the tone corrected image includes: Calculating a second correction weight corresponding to the second adjusted image based on the local correction weight of each pixel; wherein the sum of the local correction weight and the second correction weight is 1; adjusting the tone of each pixel in the third adjusted image pixel by pixel based on the local correction weight to obtain a first local adjusted image; adjusting the hue of each pixel in the second adjusted image pixel by pixel based on the second correction weight to obtain a second local adjusted image; The first local adjustment image and the second local adjustment image are fused to obtain the tone-corrected image.

7. The endoscope color tone correction method according to claim 2, characterized in that: The hue information deviation includes a local hue deviation. After determining the global correction weight and the local correction weight of each pixel in the target acquisition image based on the image scene difference, the endoscope hue correction method further includes: In the target acquisition image, pixels within a target area are screened as pixels to be processed; wherein the image scene difference of the target area is smaller than a preset image scene difference, and there are newly added local details in the target area due to the adjustment of the light source ratio; Determining a local detail adjustment weight of each of the pixels to be processed based on the image scene difference of each of the pixels to be processed; wherein the local detail adjustment weight is positively correlated with the image scene difference; Based on the local detail adjustment weight, the global correction weight is increased within a preset range and / or the local correction weight is decreased within a preset range.

8. The endoscope color tone correction method according to claim 3, characterized in that: The calculating the image scene difference between the target acquisition image and the adjacent frame image includes: Calculating a differential image between the target captured image and the adjacent frame images; The step of determining a scene difference measurement degree parameter of each pixel in the target captured image based on the image scene difference comprises: Acquire a preset differential image threshold group, wherein the preset differential image threshold group includes a plurality of threshold levels and differential image thresholds corresponding to the threshold levels; Based on the differential image value of each pixel in the differential image and the preset differential image threshold group, the differential image value is mapped to a level number corresponding to the threshold level as the scene difference measurement degree parameter; wherein the scene difference measurement degree parameter is positively correlated with the level number.

9. An endoscope color correction device, characterized in that: The endoscope has an illumination unit, the illumination unit includes a plurality of light sources, the light sources synthesize illumination light according to the light source ratio, and the endoscope color correction device includes: A first acquisition module, configured to acquire a first image acquired by the endoscope as a target acquisition image after the light source ratio in the lighting unit changes; A second acquisition module, used to acquire a second image before the light source ratio in the lighting unit of the endoscope changes as an adjacent frame image; A hue information calculation module, used to calculate the first hue information of the target captured image and the second hue information of the adjacent frame image; A tone correction module, configured to, when a tone information deviation between the first tone information and the second tone information is greater than a preset tone deviation, perform tone correction on the target captured image based on an image scene difference between the target captured image and the adjacent frame images, until the adjusted tone information deviation meets the preset deviation, and output the adjusted target captured image as a tone-corrected image; The tone correction module is also used to set corresponding correction weights for each pixel in the target acquisition image or for a similar area in the target acquisition image according to the scene difference between the target acquisition image and the adjacent frame image, and adjust the tone according to the correction weight, wherein the actual similarity of the scenes represented by the pixels contained in the similar area in the target acquisition image and the adjacent frame image is greater than the preset similarity.

10. An endoscope, characterized in that: The device comprises an illumination unit, an imaging unit and an image processing unit, wherein the illumination unit comprises a plurality of light sources, and the light sources synthesize illumination light according to the light source ratio; when the light sources synthesize illumination light according to the light source ratio, the imaging unit can capture a target image as a target capture image; The image processing unit is capable of acquiring the target acquisition image acquired by the imaging unit, and includes a memory for a computer program; a processor for implementing the steps of the endoscope color correction method as described in any one of claims 1 to 8 when executing the computer program stored in the memory.

Citation Information

Patent Citations

  • Endoscope image imaging method and endoscope

    CN119071615A

  • Endoscope image correction method and electronic equipment

    CN119273599A