Endoscope hue correction method and device and endoscope

By acquiring and comparing the tone information of the image in the endoscope and performing tone correction based on the scene difference, the tone fluctuation problem caused by the change in the light source ratio is solved, and the stability of the image tone and high discrimination of specific tissues are achieved.

CN119893006AActive Publication Date: 2025-04-25ZHEJIANG UE MEDICAL

Patent Information

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

AI Technical Summary

Technical Problem

In endoscopic imaging, when adjusting the light source ratio in real time in order to improve the distinction of specific tissues, it is easy to cause tone fluctuations in the front and back frame images, affecting users' use.

Method used

By acquiring the tone information of the target acquisition image and the adjacent frame image in the illumination unit of the endoscope, 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 changes in light source ratio, and improves the distinction between mucosa, blood vessels, and tissues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119893006A_ABST
    Figure CN119893006A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical endoscope imaging, in particular to an endoscope hue correction method and device and an endoscope, and the method comprises the steps: obtaining a first image collected by the endoscope as a target collection image after the proportion of a light source in a lighting unit changes; acquiring a second image before the proportion of a light source in a lighting unit of the endoscope is changed as an adjacent frame image; calculating first hue information of the target acquisition image and second hue information of the adjacent frame image; and when the hue information deviation between the first hue information and the second hue information is greater than a preset hue deviation, performing hue correction on the target acquisition image based on the image scene difference between the target acquisition image and the adjacent frame image until the adjusted hue information deviation meets the preset deviation, outputting the adjusted target acquisition image as a hue correction image; the hue difference is systematically adjusted through the scene difference, so that the stable expression of the image hue in real-time imaging is kept.
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 endoscopic imaging, and in particular to an endoscope color tone correction method, device and endoscope. Background Art

[0002] With the vigorous development of endoscopy applications, doctors' demand for high-quality endoscopy imaging is also increasing. In endoscopy application scenarios, especially during the inspection, diagnosis and treatment of digestive endoscopy (gastroenteroscopy), doctors usually use the white light imaging mode that is consistent with human vision for routine operations. When further exploration of lesions is required, they will switch to narrow-band light imaging mode.

[0003] Whether it is white light imaging or narrow-band light imaging, the lighting source providing the corresponding imaging mode is composed of two or more LED light sources. For example, in the white light imaging mode, the lighting light source can be specifically composed of 5 LEDs, namely, 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, the lighting light source can be composed of a narrow-band blue-violet light source and a narrow-band green light source.

[0004] Since different parts of the human body cavity have different absorption and reflection characteristics for different spectral bands, it is often necessary to adjust the proportion of the light source combination according to the actual tissue location, and to highlight the detailed information characteristics of specific tissues by increasing or decreasing the light power ratio of one or several light sources. For example, the oral mucosal epithelium, which is mainly composed of stratified squamous epithelium, the gastric mucosal surface epithelium, which is mainly composed of columnar epithelial cells, and the duodenum, which is excreted by the liver and the bile duct to a large amount of bilirubin, have obvious differences in the absorption and reflection characteristics of blue light and blue-violet light. Appropriate increase or decrease in the proportion of blue light and blue-violet light will significantly improve the contrast and detail information of the corresponding parts; for example, in different stages of gastrointestinal endoscopic exploration, diagnosis and treatment, according to the different amount of bleeding, it is necessary to appropriately change the proportion of red light to improve the discernibility of bleeding points.

[0005] However, whenever the predetermined ratio of the illumination light source changes, if no processing 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. Therefore, how to adjust the light source ratio in real time to improve the distinction between mucosa, blood vessels and tissues, etc., while maintaining the stable expression of hue 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 color tone fluctuation problem of previous and next frame images caused by adjusting the light source ratio in real time in order to improve the distinction of specific tissues.

[0007] In a first aspect, the present invention provides an endoscope color tone correction method, the endoscope having a lighting unit, the lighting unit including a plurality of light sources, the light sources synthesizing illumination light according to the light source ratio, the color tone correction method comprising: after the light source ratio in the lighting unit changes, acquiring a first image acquired by the endoscope as a target acquisition image; acquiring a second image before the light source ratio in the lighting unit of the endoscope changes as an adjacent frame image; calculating first color tone information of the target acquisition 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, color tone correction is performed on the target acquisition image based on the image scene difference between the target acquisition image and the adjacent frame image until the adjusted color tone information deviation meets the preset deviation, and the adjusted target acquisition image is output as a color tone corrected image.

[0008] As an exemplary embodiment, the tone correction of the target acquisition image based on the scene difference between the target acquisition image and the adjacent frame images includes: calculating the image scene difference between the target acquisition image and the adjacent frame images based on a motion target detection algorithm; determining 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; and performing tone correction on a pixel-by-pixel basis in the target acquisition image based on the global correction weight and / or the local correction weight.

[0009] As an exemplary embodiment, 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 acquisition image based on the image scene difference; determining the global correction weight and the local correction weight for each pixel in the target acquisition 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 tone correction of each pixel in the target acquisition image based on the global correction weight and the local correction weight includes: performing global tone adjustment on the target acquisition image to obtain a first adjustment image; performing global tone adjustment on the first adjustment image based on the global correction weight of each pixel in the first adjustment image to obtain a second adjustment image; performing local tone adjustment on the second adjustment image to obtain a third adjustment image; and performing local tone adjustment on the third adjustment image based on the local correction weight of each pixel in the third adjustment image to obtain the tone-corrected image.

[0011] As an exemplary embodiment, the method performs global tone adjustment on the first adjustment image based on the global correction weight of each pixel in the first adjustment image to obtain a second adjustment image, including: calculating the 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 tone of each pixel in the first adjustment image pixel by pixel based on the global correction weight to obtain a first global adjustment image; adjusting the tone of each pixel in the target acquisition image pixel by pixel based on the first correction weight to obtain a second global adjustment image; and fusing the first global adjustment image and the second global adjustment image to obtain the second adjustment image.

[0012] As an exemplary embodiment, the method of performing local tone adjustment on the third adjustment image based on the local correction weight of each pixel in the third adjustment image to obtain the tone-corrected image includes: calculating the second correction weight corresponding to the second adjustment 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 adjustment image pixel by pixel based on the local correction weight to obtain a first local adjustment image; adjusting the tone of each pixel in the second adjustment image pixel by pixel based on the second correction weight to obtain a second local adjustment image; and fusing the first local adjustment image and the second local adjustment image to obtain the tone-corrected image.

[0013] As an exemplary embodiment, the hue information deviation includes a local hue deviation, and 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 also includes: in the target acquisition image, filtering the pixels in the target area as pixels to be processed; wherein the image scene difference of the target area is less than the preset image scene difference, and the target area has newly added local details generated by the adjustment of the light source ratio; 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; and increasing the global correction weight within a preset range and / or reducing the local correction weight within a preset range based on the local detail adjustment weight.

[0014] As an exemplary embodiment, the calculating of the image scene difference between the target acquisition image and the adjacent frame image includes: calculating the differential image between the target acquisition image and the adjacent frame image; the determining of 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, 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, mapping the differential image value 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.

[0015] In a second aspect, the present invention provides an endoscope color tone correction device, the endoscope having a lighting unit, the lighting unit including a plurality of light sources, the light sources synthesizing illumination light according to the light source ratio, the endoscope color tone correction device comprising: a first acquisition module, for acquiring 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, for acquiring a second image before the light source ratio in the lighting unit of the endoscope changes as an adjacent frame image; a color tone information calculation module, for calculating first color tone information of the target acquisition image and second color tone information of the adjacent frame image; a color tone correction module, for performing color 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 color tone information deviation between the first color tone information and the second color tone information is greater than a preset color tone deviation, until the adjusted color tone information deviation meets the preset deviation, and outputting the adjusted target acquisition image as a color tone corrected image.

[0016] In a third aspect, the present invention provides an endoscope, comprising 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 a ratio of the light sources; when the light sources synthesize illumination light according to the ratio of the light sources, the imaging unit can capture a target image as a target captured image, comprising a memory for a computer program; and a processor for implementing the endoscope color tone correction method of the first aspect or any corresponding embodiment thereof when executing the computer program stored in the memory.

[0017] The present invention provides an endoscope color tone correction method, device and endoscope. 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 color tone correction method comprises: after the light source ratio in the illumination unit changes, obtaining a first image collected by the endoscope as a target collection 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 color tone information of the target collection 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, color tone correction is performed on the target collection image based on the image scene difference between the target collection image and the adjacent frame image until the adjusted color tone information deviation meets the preset deviation, and the adjusted target collection image is output as a color tone correction image; color tone correction is performed on the target collection image based on the image scene difference between the target collection image and the adjacent frame image, and the color tone difference can be systematically adjusted through the scene difference between the target collection image and the adjacent frame image, so as to maintain the stable expression of the image color tone in real-time imaging, so as to solve the color tone fluctuation problem of the previous and next frame images caused by adjusting the light source ratio in real time in order to improve the discrimination of specific tissues. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 is a flow chart of an endoscope color tone correction method according to an embodiment of the present invention; Figure 2 4 is a block diagram of a color tone correction device for an endoscope according to an embodiment of the present invention. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0021] 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 a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0022] In one embodiment, an endoscopic hue correction method is applied to an endoscope.

[0023] In one embodiment, the endoscope includes a lighting unit, an imaging unit and an image processing unit, and the imaging processing unit is used to execute the endoscope color correction method; wherein the lighting unit includes at least one first narrow-band light source of at least one first band corresponding to a blue channel in a target image captured by the imaging unit, at least one second narrow-band light source of at least one second band corresponding to a green channel, and at least one third narrow-band light source of at least one third band corresponding to a red channel; when the first narrow-band light source, the second narrow-band light source and the third narrow-band light source are under corresponding optical powers, the imaging unit can capture the target image as a target captured image.

[0024] In one embodiment, the lighting unit included in the endoscope is composed of a narrow-band blue-violet light source, a narrow-band blue light source, a narrow-band green light source, a narrow-band amber light source, and a narrow-band red light source; wherein the central wavelength of the narrow-band blue-violet light source may be 415±10nm, the central wavelength of the narrow-band blue light source may be 460±10nm, the central wavelength of the narrow-band green light source may be 540±15nm, the central wavelength of the narrow-band amber light source may be 600±15nm, and the central wavelength of the narrow-band red light source may be 630±10nm.

[0025] In this embodiment, a method for calibrating the color tone of an endoscope is provided, which can be used in the above-mentioned endoscope or image processing unit. Figure 1 is a flow chart of a method for calibrating color tone of an endoscope according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps: Step S101 : after the light source ratio in the lighting unit changes, a first image captured by the endoscope is acquired as a target captured image.

[0026] In this embodiment, the target acquisition image is obtained by acquiring the target image of the target object by the imaging unit under corresponding light powers of the first narrowband light source, the second narrowband light source and the third narrowband light source included in the lighting unit.

[0027] Since different parts of the human body cavity have different absorption and reflection characteristics for different spectral bands, it is often necessary to adjust the proportion of the light source combination according to the actual tissue location, and to increase or decrease the light power ratio of one or several light sources to achieve the purpose of highlighting the detailed information characteristics of specific tissues.

[0028] However, whenever the predetermined ratio of the illumination light source changes, if no processing 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.

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

[0030] In order to enhance the contrast and details of targets such as mucosa and blood vessels, one or several light sources will be adjusted individually. 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 the 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 captured image is different from the preset light power, the captured image may have undergone changes to adapt to enhance the contrast and details of targets such as mucosa and blood vessels.

[0031] Based on this, if the actual optical power of at least one light source of the target acquisition image is different from the preset optical power, it can be confirmed that the ratio 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.

[0032] In one embodiment, the target captured image may be the first image captured after the light source ratio changes.

[0033] In one embodiment, the target captured image may be the Nth first image captured after the light source ratio changes, where N is a positive integer greater than 1.

[0034] In one embodiment, the target captured image may be an image set consisting of M first images captured after the light source ratio changes; wherein M is a positive integer greater than 1.

[0035] Step S102 : acquiring a second image before the light source ratio in the lighting unit of the endoscope changes as an adjacent frame image.

[0036] Whenever the predetermined ratio of the light source of the illumination light source changes, it is easy to know that the hue of the image will also change if no processing is done. In a real-time imaging system, this will affect the user's use. The image before the light source ratio in the illumination unit of the endoscope changes can represent the hue information represented when the predetermined ratio of the light source in the current scene has not changed. Therefore, it is necessary to obtain the second image before the light source ratio changes 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.

[0037] In one embodiment, the adjacent frame image may be the last image captured before the light source ratio changes.

[0038] In one embodiment, the adjacent frame images may be an image set consisting of the last M images collected before the light source ratio changes; wherein M is a positive integer greater than 1.

[0039] After obtaining the target acquisition image and the adjacent frame images, it is necessary to confirm whether the target acquisition image has undergone a hue change based on the hue information of the target acquisition image whose light power ratio has changed and the hue information of the adjacent frame images whose light power has not changed. Based on this, after obtaining the target acquisition image and the adjacent frame images, enter step S103.

[0040] Step S103, calculating the first hue information of the target captured image and the second hue information of the adjacent frame image.

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

[0042] In one embodiment, the global hue information included in the first hue information may be the main hue of the target captured image, or may be a group of hue sequences.

[0043] In one embodiment, the global hue information included in the second hue information may be the main hue of adjacent frame images, or may be a group of hue sequences.

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

[0045] As another exemplary embodiment, after obtaining the candidate hue sequence, further, the frequency of each candidate hue appearing in the image is counted, and several hues with the highest frequency are selected to represent the main hue.

[0046] Among them, for example, the main color sequence can be recorded as , the value of the main color can be expressed in various color spaces such as RGB, Lab, HSV, etc.

[0047] In one embodiment, the local hue information of the first hue information may be the hue of the pixel points themselves constituting the target captured image, or may be the weighted hue of the pixel points and the pixel blocks within a preset area of ​​their neighborhood; wherein the preset area may be a circular area or a rectangular area centered on the pixel point and with a radius or side length of N pixels, where N is a positive integer greater than 1.

[0048] As an exemplary embodiment, an implementation method for extracting local hue is: using the color of the pixel itself as the local hue, and the method of extracting hue information includes but is not limited to converting from RGB space to HSV space, using H channel value to represent hue; converting from RGB space to Lab space, using a and b channel values ​​to represent hue; converting from RGB space to Yuv space, using u and v channel values ​​to represent hue.

[0049] In one embodiment, the local hue information of the second hue information may be the hue of the pixel points themselves constituting the adjacent frame images, or may be the weighted hue of the pixel points and the pixel blocks within a preset area of ​​their neighborhood; wherein the preset area may be a circular area or a rectangular area centered on the pixel point and having a radius or side length of M pixels, where M is a positive integer greater than 1.

[0050] As an exemplary embodiment, an implementation method for extracting local hue information is: taking the weighted hue of a pixel point and a pixel block in a certain area of ​​its neighborhood as the local hue, assuming that the current pixel point is the center and the radius is The neighborhood range is taken as the pixel block to be counted, and the hue information of each pixel in the pixel block is extracted, which is recorded as a matrix , set the Gaussian distribution weight matrix , then the weighted local hue .

[0051] Exemplarily, after obtaining the first hue information of the target captured image and the second hue information of the adjacent frame image, the hue information deviation between the first hue information of the target captured image and the second hue information of the adjacent frame image is calculated to confirm whether the hue of the target captured image has changed through the hue information deviation.

[0052] As an exemplary embodiment, the hue information deviation is assumed to be , the global hue deviation is , the local hue deviation is ,Right now, .

[0053] For example, the global hue deviation can be calculated using formula (1): : (1) In formula (1), is the global hue deviation, The i-th global main color tone of the target acquisition image, is the i-th global main color tone of the adjacent frame image.

[0054] Among them, the main color If the value of is expressed in Lab color space, the above formula can be further expressed as formula (2): (2) In formula (2), is the global hue 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.

[0055] For example, the local hue deviation can be calculated using formula (3): (3) In formula (3), is the local hue deviation, Collect local hue information of the target image, It is the local tone information of adjacent frame images.

[0056] If the value of the local hue P is expressed in Lab color space, the above formula can be further expressed as formula (4): (4) In formula (4), is the local hue deviation, The a channel value of the target acquisition image, 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.

[0057] Exemplarily, when the color tone information deviation is not greater than the preset color tone deviation, it can be considered that the color tone of the image does not change with the change of the predetermined light source ratio of the illumination light source, and the target captured image is directly output at this time.

[0058] Step S104, 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 scene difference between the target captured image and the adjacent frame image until the adjusted hue information deviation meets the preset hue deviation, and the adjusted target captured image is output as a hue-corrected image.

[0059] 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 change of the predetermined ratio of the light source of the illumination light source, and the hue of the target captured image should be corrected.

[0060] The change in the predetermined ratio of the illumination light source is performed for the purpose of highlighting the characteristics of specific tissue detail information. 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 the hue information that it tends to refer to; specifically, for areas where the scene difference between the target acquisition image and the adjacent frame image is small, 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; and for areas where the scene difference between the target acquisition image and the adjacent frame image is large, it is more 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, the hue of the target acquisition image is corrected based on the scene difference between the target acquisition image and the adjacent frame image.

[0061] Exemplarily, when the target acquisition image is subjected to hue correction based on the scene difference between the target acquisition image and the adjacent frame images, a corresponding correction weight 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 images, and the hue is further adjusted according to the correction weight, so that the target pixel can refer to the local hue of the adjacent frame image alone, refer to the global hue of the adjacent frame image or the target acquisition image alone, or refer to the local hue of the adjacent frame image and the global hue of the adjacent frame image or the target acquisition image together according to the correction weight, so as to avoid the hue change caused by the change of the light source ratio, and to systematically adjust the hue difference through the scene difference between the target acquisition image and the adjacent frame image, so as to maintain the stable expression of the image hue in real-time imaging.

[0062] Exemplarily, when the target acquisition image is subjected to hue correction based on the scene difference between the target acquisition image and the adjacent frame images, a corresponding correction weight can be set for a similar area in the target acquisition image according to the scene difference between the target acquisition image and the adjacent frame images; 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 images is greater than a preset similarity; the hue is further adjusted according to the correction weight, so that the target pixel can refer to the local hue of the adjacent frame image alone, refer to the global hue of the adjacent frame image or the target acquisition image alone, or refer to the local hue of the adjacent frame image and the global hue of the adjacent frame image or the target acquisition image together according to the correction weight, so as to avoid 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.

[0063] Exemplarily, when tone correction is performed on the target acquisition image based on the scene difference between the target acquisition image and the adjacent frame images, after obtaining the adjusted target acquisition image, the tone information deviation between the adjusted target acquisition image and the adjacent frame images is further judged; if the tone information deviation between the adjusted target acquisition image and the adjacent frame image satisfies the preset tone deviation, the adjusted target acquisition image is output as a tone-corrected image.

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

[0065] In one embodiment, while setting a 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 smaller than the first preset hue deviation and the adjusted global hue deviation is smaller than the second preset hue deviation, or the adjusted hue information deviation is smaller than the first preset hue deviation and the adjusted local hue deviation is smaller than the third preset hue deviation, it can be confirmed that the adjusted hue information deviation meets the preset hue deviation.

[0066] In one embodiment, a first preset hue deviation can be set for the hue information deviation, a second preset hue deviation can be set for the global hue deviation, and a third preset hue deviation can be set for the local hue deviation; if the adjusted hue information deviation is smaller than the first preset hue deviation, the adjusted global hue deviation is smaller than the second preset hue deviation, and the adjusted local hue deviation is smaller than the third preset hue deviation, it can be confirmed that the adjusted hue information deviation satisfies the preset hue deviation.

[0067] The present embodiment provides an endoscope color tone correction method, wherein 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 color tone correction method comprises: 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 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, color tone correction is performed 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 the adjusted target collected image is output as a color tone corrected image; color tone 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 color tone difference can be systematically adjusted 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, so as to solve the color tone fluctuation problem of the previous and next frame images caused by adjusting the light source ratio in real time to improve the discrimination of specific tissues.

[0068] As an exemplary embodiment, each time the target acquisition image is subjected to tone correction based on the scene difference between the target acquisition image and the adjacent frame image, the obtained adjusted target acquisition image is recorded as an iterative process, and the actual number of iterations obtained in each iterative process is recorded; when the actual number of iterations reaches a preset number of iterations, the adjusted target acquisition image corresponding to the preset number of iterations is output as a tone-corrected image.

[0069] As an exemplary embodiment, the tone correction of the target acquisition image based on the scene difference between the target acquisition image and the adjacent frame images includes: calculating the image scene difference between the target acquisition image and the adjacent frame images based on a motion target detection algorithm; determining 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; and performing tone correction on a pixel-by-pixel basis in the target acquisition image based on the global correction weight and / or the local correction weight.

[0070] Exemplarily, the value range of the global correction weight and the local correction weight is [0, 1].

[0071] In this embodiment, the tone adjustment of the target acquisition image can be achieved by setting global correction weights and local correction weights for the pixels of the target acquisition image individually or collectively, and further performing tone correction on each pixel in the target acquisition image pixel by pixel based on the global correction weights and the local correction weights individually or collectively.

[0072] In one embodiment, a corresponding global correction weight is set separately for each pixel in the target acquisition image; for areas with large image scene differences, the global correction weight is positively correlated with the image scene differences; the above-mentioned global correction weight is set in such a way that, for pixels in the target acquisition image with large image scene differences from the adjacent frame image, the larger the setting value of the corresponding global correction weight is when setting the pixel, the more likely it is that the pixel will be biased towards referring to the global hue of the adjacent frame image or the target acquisition image for hue correction; for pixels in the target acquisition image with small image scene differences from the adjacent frame image, the smaller the setting value of the corresponding global correction weight is when setting the pixel, the less likely it is that the pixel will be biased towards referring to the global hue of the adjacent frame image or the target acquisition image for hue correction.

[0073] 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 inversely correlated with the image scene difference; the above-mentioned local correction weight is set in such a way that, for pixels in the target acquisition image with large image scene differences from the adjacent frame images, the smaller the setting value of the corresponding local correction weight is when setting the local correction weight, the less reference is made to the local hue at the corresponding position of the adjacent frame image; for pixels in the target acquisition image with small image scene differences from the adjacent frame images, the larger the setting value of the corresponding local correction weight is when setting the local correction weight, so that the hue correction is biased towards referring to the local hue at the corresponding position of the adjacent frame image.

[0074] In one embodiment, corresponding global correction weights and local correction weights are set for each pixel in the target acquisition image at the same time, 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; in the above-mentioned setting method of jointly setting the global correction weight and the local correction weight, for pixels in the target acquisition image with a large image scene difference from the adjacent frame image, the larger the setting value of the corresponding global correction weight when setting, the smaller the setting value of the corresponding local correction weight when setting, so that it can better refer to the global tone information of the target acquisition image and the adjacent frame image during tone correction, and less reference to the local tone 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 smaller the setting value of the corresponding global correction weight when setting, the larger the setting value of the corresponding local correction weight when setting, so that it can better refer to the local tone information at the corresponding position of the adjacent frame image during tone correction, and less reference to the global tone information of the target acquisition image and the adjacent frame image.

[0075] In one embodiment, the global correction weight and the local correction weight are determined by a scene difference measurement degree parameter corresponding to the image scene difference; specifically, as an exemplary embodiment, the determining of the global correction weight and the local correction weight 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 weight and the local correction weight of each pixel in the target acquisition 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.

[0076] In this embodiment, the calculation of the image scene difference between the target captured image and the adjacent frame images can be achieved by using a motion target detection algorithm including but not limited to a frame difference method, an optical flow method, a background subtraction method, and the like.

[0077] Exemplarily, taking the use of a frame difference method to determine the image scene difference, thereby determining a scene difference measurement degree parameter according to the image scene difference, and further determining the global correction weight and the local correction weight as an example, the technical solution of this embodiment is described: As an exemplary embodiment, calculating the image scene difference between the target acquisition image and the adjacent frame image includes: calculating the 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, 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 point in the differential image and the preset differential image threshold group, mapping the differential image value 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.

[0078] In this embodiment, the frame difference method is used to calculate the difference image between the previous and next two frames. , and obtain the preset differential image threshold group , and use formula (5) to map to obtain the scene difference measurement degree parameter: (5) In formula (5), d represents the parameter for measuring the degree of scene difference, represents the pixel coordinates of the pixel within the difference image, to is the threshold in the preset differential image threshold group, 1 to M are the level numbers, and M is a positive integer greater than or equal to 2.

[0079] As an exemplary embodiment, the tone correction of the target acquisition image based on the scene difference between the target acquisition image and the adjacent frame images also includes: calculating the image scene difference between the target acquisition image and the adjacent frame images based on a motion 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; 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; and performing tone correction on each pixel in the target acquisition image based on the global correction weight and / or the local correction weight.

[0080] In this embodiment, the specific implementation method of calculating the image scene difference between the target acquisition image and the adjacent frame images based on the moving target detection algorithm can be referred to the content recorded in the above embodiment, which will not be repeated here.

[0081] After obtaining the image scene difference, illustratively, the image scene difference is graded for each pixel in the target acquisition image according to the degree of the image scene difference, so as to obtain multiple pixel sets with different image scene difference levels; further, based on the image scene difference corresponding to each pixel set, a global correction weight and / or a local correction weight of each pixel in the pixel set is determined, and further based on the global correction weight and / or the local correction weight, a hue correction is performed on each pixel in the target acquisition image.

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

[0083] For example, in order to maintain the brightness consistency of the image, the brightness difference between the target acquisition image and the adjacent frame images caused by the difference in exposure parameters is corrected by brightness normalization, so as to obtain a target acquisition image with brightness consistency with the target acquisition image. .

[0084] In this embodiment, when the tone correction is performed on each pixel in the target acquisition image based on the global correction weight and the local correction weight, the target acquisition image is first corrected. Perform global tone adjustment to obtain a first adjusted image with a uniform and relatively rough global tone adjustment. , and based on the first adjustment image The global correction weight of each pixel in the image is adjusted pixel by pixel to obtain a second adjusted image with a finer global tone adjustment based on the global correction weight at the pixel level. ; Based on the second adjusted image after global adjustment Perform local tone adjustment to obtain a third adjusted image with relatively rough local tone adjustment , further adjusting the third image Perform local weight adjustment to obtain a tone-corrected image with finer local tone adjustment based on local correction weights at the pixel level .

[0085] Among them, global tone adjustment refers to uniformly adjusting the tone of the entire image so that the main tone sequence of the image to be adjusted is close to the output image of the previous frame; as a possible implementation method, the target acquisition image can be Perform 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 color in the image, that is, the basic attributes of the color, such as red, yellow, green, etc.; saturation adjustment: used to change the saturation of the color in the image, that is, the brightness of the color; white balance adjustment: used to correct the color temperature problem in the image to make the white in the image look more natural; exposure adjustment: used to control the brightness of the image.

[0086] In this embodiment, a global weight adjustment is performed pixel by pixel based on the global correction weight of each pixel in the first adjustment image to obtain a second adjustment image. When the second adjustment image By first adjusting the image And target acquisition image Fusion is obtained; based on this, as an exemplary embodiment, the first adjustment image is globally adjusted in tone based on the global correction weight of each pixel in the first adjustment image to obtain a second adjustment image, including: calculating the 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 tone of each pixel in the first adjustment image pixel by pixel based on the global correction weight to obtain a first global adjustment image; adjusting the tone of each pixel in the target acquisition image pixel by pixel based on the first correction weight to obtain a second global adjustment image; fusing the first global adjustment image and the second global adjustment image to obtain the second adjustment image.

[0087] In this embodiment, the second adjusted image can be obtained by equation (6): (6) In formula (6), represents the global tone adjustment parameter when the pixels of the second adjustment image correspond to the global tone adjustment, represents the global correction weight, Indicates the global tone adjustment parameter when the pixels of the target captured image correspond to the global tone adjustment.

[0088] Among them, local tone adjustment refers to fine adjustment of the local area of ​​the image at the pixel level, so that the local tone of the image to be adjusted is closer to the local tone of the corresponding feature area of ​​the adjacent frame image; in this embodiment, by and adjacent frame images The pixels in are mapped to the HSV space and further local tone adjustment is performed.

[0089] As a possible implementation method, for The RGB value of the corresponding pixel is converted to the value of the corresponding H hue channel in the HSV space. for The RGB value is converted to the value of the corresponding H hue channel in the HSV space, and the H channel is normalized to [0,1).

[0090] Furthermore, if ,but ; Right now , and if ,

[0091] like ,but

[0092] Right now

[0093] like ,but

[0094] Right now , and if ,

[0095] like but

[0096] Right now

[0097] in, is the step size parameter, the range is [0,1], one of the iterations The method is , j is the jth iteration, that is, the parameter value this time is the square of the previous parameter value.

[0098] As an exemplary embodiment, 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, including: calculating the 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 tone of each pixel in the second adjusted image pixel by pixel based on the second correction weight to obtain a second local adjusted image; and fusing the first local adjusted image and the second local adjusted image to obtain the tone-corrected image.

[0099] (7) In formula (7), represents the local tone adjustment parameter when the pixels of the third adjustment image correspond to the local tone adjustment, represents the local correction weight, Indicates the local tone adjustment parameters when the pixels of the tone-corrected image correspond to the local tone adjustment.

[0100] Among them, illustratively, in obtaining After that, calculate With adjacent frame images When the hue information deviation is greater than the preset hue deviation, further based on and The target captured image is subjected to tone correction according to the scene difference until the adjusted tone information deviation meets the preset deviation, and the adjusted target captured image is output as a tone-corrected image.

[0101] The above-mentioned embodiment can perform hue correction on the target acquisition image according to the scene difference between the target acquisition image and the adjacent frame images; however, for the area with small scene difference but with added local details due to the adjustment of the light source ratio, when the above-mentioned method is used for correction, due to its relatively small scene difference, it corresponds to a relatively high local correction weight, which will cause the hue of the image in the area with added local details to change relative to the area where the light source ratio has not changed. There is still the problem of hue fluctuation of the previous and next frame images caused by real-time adjustment of the light source ratio in order to improve the distinction of specific tissues.

[0102] To solve this problem, as an exemplary embodiment, the hue information deviation includes a local hue deviation, and 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 also includes: in the target acquisition image, filtering the pixels in the target area as pixels to be processed; wherein the image scene difference of the target area is less than the preset image scene difference, and the target area has newly added local details generated by the adjustment of the light source ratio; 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; and increasing the global correction weight within a preset range or reducing the local correction weight within a preset range based on the local detail adjustment weight.

[0103] In this embodiment, the image scene difference of the target area is smaller than the preset image scene difference, so as to screen out the area where the scene difference is small but local new details are added due to the adjustment of the light source ratio.

[0104] In one embodiment, after the scene difference measurement degree parameter of the target captured image can be determined based on the motion target detection algorithm, further, the preset scene difference measurement degree parameter corresponding to the preset image scene difference can be determined according to the extreme value of the scene difference measurement degree parameter of the target area; further, the area whose scene difference measurement degree parameter is less than the preset scene difference measurement degree parameter is screened as the target area.

[0105] In one embodiment, the preset scene difference measurement degree parameter may be Any value in the interval; where A is a real number greater than zero and less than one; as a possible implementation, Take 0.5.

[0106] 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 the local detail adjustment weight is further determined based on the image scene difference; wherein the local detail adjustment weight is positively correlated with the image difference.

[0107] As a possible implementation method, after obtaining the image scene difference of each pixel to be processed, the scene difference measurement degree parameter 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): (8) In formula (8), represents the local detail adjustment weight, The value range of is [0,1]; represents the positive correlation mapping function, Represents the parameter for measuring the degree of scene difference.

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

[0109] Exemplarily, the global correction weight of the pixel to be processed may be modified according to equation (9): (9) In formula (9), represents the global correction weight, Represents the local detail adjustment weight.

[0110] Exemplarily, the local correction weight of the pixel to be processed may be modified according to formula (10): (10) In formula (10), represents the local correction weight, Represents the local detail adjustment weight.

[0111] This embodiment provides an endoscope color correction device, such as Figure 2 As shown, including: A first acquisition module 201, 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 202, 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 203, used to calculate the first hue information of the target captured image and the second hue information of the adjacent frame image; The tone correction module 204 is used to perform tone correction on the target captured image based on the image scene difference between the target captured 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 adjusted tone information deviation meets the preset deviation, and output the adjusted target captured image as a tone-corrected image.

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

[0113] It should be noted that the above modules as part of the device can be implemented by software or hardware, wherein the hardware environment includes a network environment.

[0114] An embodiment of the present invention also provides an endoscope, comprising 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 a ratio of the light sources; when the light sources synthesize illumination light according to the ratio of the light sources, the imaging unit can capture a target image as a target captured image; the image processing unit can obtain the target captured image captured by the imaging unit; and the endoscope comprises a memory for a computer program; and a processor for implementing the endoscope color tone correction method of the first aspect or any corresponding embodiment thereof when executing the computer program stored in the memory.

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

[0116] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, 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, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers or network devices, etc.) to execute all or part of the steps of the method in the above embodiments.

[0117] In the several embodiments provided in 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 schematic, 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0118] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.

[0119] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0120] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0121] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection 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 image until the adjusted hue information deviation meets the preset deviation, and the adjusted target captured image is output as a hue-corrected image.

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 is used to perform tone correction on the target captured image based on the image scene difference between the target captured 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 adjusted tone information deviation meets the preset deviation, and output the adjusted target captured image as a tone corrected image.

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

  • Image color correction method and device suitable for endoscope and storage medium

    CN110505459A

  • Endoscope image imaging method and endoscope

    CN119071615A

  • Endoscope image correction method and electronic equipment

    CN119273599A

  • Endoscope apparatus

    JP2016054758A

  • Endoscope system, processor device, and method for operating endoscope system

    US20180289240A1

Cited By

  • Image acquisition processing parameter adaptive generation method and system

    CN120713442A