Method for automatically adjusting laser power of confocal endoscope

By automatically adjusting the laser power of the confocal endoscope, image quality problems caused by individual differences are solved, the operation process is simplified, and the image quality and diagnostic value are improved.

CN118717002APending Publication Date: 2024-10-01VIESTAR (HUBEI) MEDICAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410852114.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In clinical examinations of confocal endoscopy, due to individual differences in fluorescent dye concentrations, it is necessary to manually adjust the laser power to obtain high-quality images, but this increases the operational complexity and workload, and requires high training for physicians.

Method used

By determining the brightness signal value adjustment range and laser power adjustment range, using the maximum laser power as the initial value, obtain a valid image set, and calculate the average value of the larger brightness values ​​to automatically adjust the target laser power to ensure that the image brightness is within the ideal range, simplify Laser power adjustment process.

Benefits of technology

It realizes the automatic adjustment of the endoscopic laser power, improves the image quality, simplifies the operation process, reduces the doctor's operating burden, and ensures the best output of image brightness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118717002A_ABST
    Figure CN118717002A_ABST
Patent Text Reader

Abstract

The invention discloses a confocal endoscope laser power automatic adjustment method, and relates to the field of endoscope imaging, and the method comprises the steps: determining a brightness signal value adjustment range according to the maximum brightness value upper limit which can be reached by hardware, a first adjustment coefficient and a second adjustment coefficient, determining a laser power adjusting range according to the maximum laser power of the laser; taking the maximum laser power as the initial laser power, and obtaining an effective image set; obtaining a higher brightness value for each frame of image in the effective image set; and determining the adjusted target laser power based on the average value of the higher brightness values and the brightness signal value adjusting range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present specification relates to the field of endoscopic imaging, and more specifically, the present application relates to a method for automatically adjusting the laser power of a confocal endoscope. Background Art

[0002] Confocal endoscope is a medical device that can be inserted into the human body through channels such as gastroscopes and colonoscopes to obtain local histological images to achieve accurate diagnosis of tiny lesions, gastrointestinal lesions and early gastrointestinal cancer. The basic principle of confocal endoscope is to illuminate the tissue with laser and then detect the fluorescence reflected from the tissue. Under the condition of a certain concentration of fluorescent dye, different laser powers will produce images of different quality. Too high or too low laser power will cause the image to be too bright or too dark, making it impossible to distinguish details in the image and lacking sufficient contrast, which reduces the image quality. Therefore, appropriate laser power is crucial to imaging quality.

[0003] When confocal endoscopes are used for clinical examinations, the same dose of fluorescent dye is given to the examinee, but the concentration of fluorescent dye in the tissue will be different due to individual differences. In order to obtain good quality images, it is usually necessary to adjust the laser power to an appropriate level. If the physician is asked to manually adjust the laser power, it will increase the complexity of the operation and the workload, and the physician must be trained in advance so that he can reasonably adjust the laser power according to the image at the time, which is not an easy task in itself. Therefore, how to simplify the laser power adjustment of the confocal endoscope has become an urgent problem to be solved. Summary of the invention

[0004] A series of simplified concepts are introduced in the Summary of the Invention section, which will be further described in detail in the Detailed Description of the Invention section. The Summary of the Invention section of this application does not mean to attempt to define the key features and essential technical features of the claimed technical solution, nor does it mean to attempt to determine the scope of protection of the claimed technical solution.

[0005] In a first aspect, the present application proposes a method for automatically adjusting the laser power of a confocal endoscope, the method comprising:

[0006] Determine the brightness signal value adjustment range according to the maximum brightness value upper limit that can be achieved by the hardware, the first adjustment coefficient and the second adjustment coefficient, and determine the laser power adjustment range according to the maximum laser power and the maximum laser power of the laser;

[0007] Taking the maximum laser power as the initial laser power, a valid image set is acquired;

[0008] Obtaining a maximum brightness value for each frame of the image in the above valid image set;

[0009] Based on the average value of the above-mentioned larger brightness value and the above-mentioned brightness signal value adjustment range, the adjusted target laser power is determined.

[0010] In a feasible implementation manner, the above-mentioned determination of the adjusted target laser power based on the average value of the above-mentioned larger brightness value and the above-mentioned brightness signal value adjustment range includes:

[0011] When the average value of the larger brightness value is less than the minimum value of the brightness signal value adjustment range and the current laser power is less than the maximum laser power, the current concentration of the sodium fluorescein solution corresponding to the current laser power is calculated based on the average value of the larger brightness value;

[0012] The laser power determination model constructed according to the concentration of sodium fluorescein solution, the fiber core brightness signal value and the laser power and the current concentration of the sodium fluorescein solution are used to calculate the laser power when the maximum brightness value that the hardware can achieve is just reached;

[0013] The laser power when the brightness signal reaches the maximum value is determined as the target laser power after the adjustment.

[0014] In a feasible implementation, the current concentration of the sodium fluorescein solution corresponding to the current laser power is calculated based on the average value of the larger brightness value, including:

[0015] According to the average value of the above-mentioned larger brightness value, the first correspondence constructed by fitting the fiber core brightness signal set and the laser power set in the air, the second correspondence constructed by fitting the fiber core brightness signal set and the laser power set in the solution, and the reference concentration of sodium fluorescein used in the above-mentioned second correspondence, the current concentration of the sodium fluorescein solution corresponding to the above-mentioned current laser power is calculated.

[0016] In a feasible implementation manner, the first correspondence constructed by fitting the core brightness signal set and the laser power set in the air, and the second correspondence constructed by fitting the core brightness signal set and the laser power set in the solution are specifically:

[0017] Selecting K different laser powers to construct a laser power set;

[0018] Acquire N frames of image data of the endoscope probe in the air at each laser power to construct an air environment image data set;

[0019] Acquire N frames of image data of the endoscope probe immersed in a sodium fluorescein solution of a reference concentration at each laser power to construct a solution environment image data set;

[0020] Data fitting is performed based on the above-mentioned air environment image data set, the above-mentioned solution environment image data set, the laser power set and a preset curve fitting method to obtain the above-mentioned laser power determination model, wherein the above-mentioned laser power determination model includes a first corresponding relationship and a second corresponding relationship, the above-mentioned first corresponding relationship is the corresponding relationship between the air environment image data and the above-mentioned K different laser powers, and the above-mentioned second corresponding relationship is the corresponding relationship between the solution environment image data and the above-mentioned K different laser powers.

[0021] In a feasible implementation manner, the data fitting is performed based on the air environment image dataset, the solution environment image dataset, the laser power set and a preset curve fitting method to obtain the laser power determination model, including:

[0022] Based on the above air environment image data set, the average value of the brightness signal values ​​of all fiber core positions at each laser power is used to construct the average value set of fiber core brightness signals in the air.

[0023] Based on the average brightness signal values ​​of all core positions at each laser power in the above solution environment image dataset, a core brightness signal average value set in the solution is constructed.

[0024] Performing data fitting according to the above-mentioned average value set of the fiber core brightness signal in the air, the above-mentioned laser power set and the above-mentioned preset curve fitting method to construct the above-mentioned first corresponding relationship;

[0025] Performing data fitting according to the average value set of the core brightness signal in the solution, the laser power set and the preset curve fitting method to construct the second corresponding relationship;

[0026] The laser power determination model is created according to the first corresponding relationship and the second corresponding relationship.

[0027] In a feasible implementation manner, the method for obtaining the average value of the brightness signal value at the core position and the average value of the core brightness signal in the solution is specifically:

[0028] In the above-mentioned air environment image dataset and the above-mentioned solution environment image dataset, the N frames of image data collected at each laser power are averaged by pixel to obtain the mean image set in air. and the mean image set in the solution

[0029] Extracting the above-mentioned average value set of the fiber core brightness signal in the air at the positioned fiber core position on the above-mentioned average value image set in the air;

[0030] The average value set of the fiber core brightness signal in the solution is extracted at the located fiber core position on the mean image set in the above solution.

[0031] In a feasible implementation manner, the above reference concentration is the average value of the core brightness signal in the reference solution. The concentration corresponding to the preset range of brightness values, the average value of the fiber core brightness signal in the above-mentioned reference solution is the average value of the brightness signals of all fiber core positions extracted at the located fiber core position on the mean image set in the reference solution, and the mean image set in the above-mentioned reference solution is obtained by immersing the endoscopic probe in the sodium fluorescein solution of the above-mentioned reference concentration with maximum laser power and taking the average of multiple frames of image data by pixel.

[0032] In a feasible implementation manner, the brightness value in the above preset brightness value interval is the maximum brightness value that can be achieved by the hardware multiplied by a coefficient greater than or equal to 0.5 and less than or equal to 1.

[0033] In a feasible implementation manner, the above-mentioned determination of the adjusted target laser power based on the average value of the above-mentioned larger brightness value and the above-mentioned brightness signal value adjustment range includes:

[0034] When the average value of the above-mentioned larger brightness values ​​is greater than the maximum value of the above-mentioned brightness signal value adjustment range and the above-mentioned current laser power is greater than the above-mentioned minimum laser power, the above-mentioned adjusted target laser power is determined based on the above-mentioned current optical power, the adjustment coefficient and the adjustment power step.

[0035] In a feasible implementation manner, the method for obtaining a valid image set includes:

[0036] Get the cached image set;

[0037] Calculating the maximum brightness value and the maximum gradient value for each frame of the image in the cache image set;

[0038] The cached images in the cached image set are screened based on the larger brightness value and the larger gradient value to obtain the valid image set.

[0039] In summary, the confocal endoscope laser power automatic adjustment method of the embodiment of the present application includes: determining the brightness signal value adjustment range according to the maximum brightness value upper limit that the hardware can achieve, the first adjustment coefficient and the second adjustment coefficient, and determining the laser power adjustment range according to the maximum laser power of the laser and the maximum laser power; taking the maximum laser power as the initial laser power, obtaining a valid image set; obtaining a maximum brightness value for each frame of the above valid image set; determining the adjusted target laser power based on the average value of the above maximum brightness value and the above brightness signal value adjustment range. The method proposed in the embodiment of the present application realizes the automatic adjustment of the laser power, so that the endoscope can automatically adjust to the optimal laser output when performing tissue imaging, thereby improving image quality, simplifying the operation process, and reducing the burden on doctors in operation.

[0040] The confocal endoscope laser power automatic adjustment method proposed in this application and other advantages, objectives and features of this application will be reflected in part through the following description, and will also be understood by technicians in this field through research and practice of this application. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present specification. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0042] Figure 1 A schematic diagram of the process of automatically adjusting the laser power of a confocal endoscope provided in an embodiment of the present application;

[0043] Figure 2 A schematic diagram of an operator structure provided in an embodiment of the present application;

[0044] Figure 3 A schematic diagram of another operator structure provided in an embodiment of the present application;

[0045] Figure 4 A schematic diagram of another operator structure provided in an embodiment of the present application;

[0046] Figure 5 A schematic diagram of another operator structure provided in an embodiment of the present application;

[0047] Figure 6 A schematic diagram of another operator structure provided for an embodiment of the present application. DETAILED DESCRIPTION

[0048] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0049] See also Figure 1 , which is a schematic diagram of the process of a confocal endoscope laser power automatic adjustment method provided in an embodiment of the present application, which may specifically include:

[0050] S110, determining a brightness signal value adjustment range according to the maximum brightness value upper limit that can be achieved by the hardware, the first adjustment coefficient and the second adjustment coefficient, and determining a laser power adjustment range according to the maximum laser power of the laser and the maximum laser power;

[0051] Exemplarily, a brightness signal value adjustment range is determined according to the set brightness signal value upper limit and the first and second adjustment coefficients. This range is used as a reference for adjusting the laser power in subsequent steps to ensure that the image brightness signal intensity is within an ideal range, neither too bright nor too dark.

[0052] Specifically, let the upper limit of the signal value be S max , the ideal signal value is S ideal , the acceptable signal value range is [L min ,L max ], maximum laser power P max , minimum laser power P min , p is the current laser power.

[0053] S max It is the maximum value of the brightness value that can be reached, which is determined by hardware characteristics (such as the number of bits of the AD sampling chip). max and P min It is determined by the laser itself, and refers to the maximum and minimum laser power that the laser can provide.

[0054] S120, taking the maximum laser power as the initial laser power, acquiring a valid image set;

[0055] For example, the image is collected with the current maximum laser power of the endoscope to obtain a set of cached image sets, the number of image frames is M, and the cached image set is denoted as {D m |m=1,2,…,M}. These images will be used for subsequent analysis and processing, with the goal of evaluating the image quality at maximum power and providing preliminary data for power adjustment. The initially acquired cached image set is screened to eliminate images of low quality or that do not meet the analysis requirements. Filter valid images from the cached images. Due to the inherent characteristics of the confocal endoscope, such as small field of view, high magnification, and short working distance, some of the images it produces are invalid images, such as all-black images when there is no contact with the tissue, all-white images when the contact is too tight, motion artifacts, etc. When calculating the laser power to be adjusted, ignoring this part of the image will make the calculated value more accurate, that is, closer to the expected value. The filtered image set (filtered image set) contains more representative and analytically valuable images for further brightness analysis.

[0056] S130, obtaining a maximum brightness value for each frame of the image in the valid image set;

[0057] For example, further analysis is performed in the effective image set to extract the value with the largest brightness from each frame of the image. The key to this step is to evaluate the brightness level of the image at maximum power, providing a basis for adjusting the laser power to a more appropriate level.

[0058] S140, determining an adjusted target laser power based on the average value of the larger brightness value and the adjustment range of the brightness signal value.

[0059] Exemplarily, based on the maximum brightness value extracted from the screening image set and the previously set brightness signal value adjustment range, an adjusted target laser power is calculated. This new laser power keeps the brightness of the image within an ideal range, improving the usability and diagnostic value of the image.

[0060] Among them, the maximum value can be extracted from the image. All the core brightness signal values ​​are counted in the histogram, and the values ​​with a certain percentage from high to low in the histogram are taken as the maximum brightness value, recorded as L, and the certain percentage can be 5%. The average value of the maximum brightness value of each frame image in the filtered image set is obtained.

[0061] In summary, the method proposed in this application automatically adjusts the laser power to ensure that the brightness of each imaging is maintained within the most ideal range, avoiding the problem of too bright or too dark, thereby significantly improving the clarity and contrast of the image. The function of automatically adjusting the laser power reduces the manual settings that doctors or technicians need to make when using the endoscope, making the operation process simpler and faster. By standardizing the laser power setting, it is ensured that the imaging performed at different times and by different operators has better consistency in brightness and quality.

[0062] In some examples, determining the adjusted target laser power based on the average value of the maximum brightness value and the adjustment range of the brightness signal value includes:

[0063] When the average value of the larger brightness value is less than the minimum value of the brightness signal value adjustment range and the current laser power is less than the maximum laser power, the current concentration of the sodium fluorescein solution corresponding to the current laser power is calculated based on the average value of the larger brightness value;

[0064] The laser power determination model constructed according to the concentration of sodium fluorescein solution, the fiber core brightness signal value and the laser power and the current concentration of the sodium fluorescein solution are used to calculate the laser power when the maximum brightness value that the hardware can achieve is just reached;

[0065] The laser power when the brightness signal reaches the maximum value is determined as the target laser power after the adjustment.

[0066] For example, if And p<P max If the brightness is too low, the laser power needs to be increased. If the laser power has not reached the maximum value, it can be increased. First, the current concentration of the sodium fluorescein solution needs to be determined. On the one hand, the laser power when the brightness signal reaches the maximum value is calculated by any of the above laser power determination models and the current concentration of the sodium fluorescein solution; the laser power when the brightness signal reaches the maximum value is determined as the above adjusted target laser power.

[0067] In some examples, calculating the current concentration of the sodium fluorescein solution corresponding to the current laser power based on the average value of the larger brightness value includes:

[0068] According to the average value of the above-mentioned larger brightness value, the first correspondence constructed by fitting the fiber core brightness signal set and the laser power set in the air, the second correspondence constructed by fitting the fiber core brightness signal set and the laser power set in the solution, and the reference concentration of sodium fluorescein used in the above-mentioned second correspondence, the current concentration of the sodium fluorescein solution corresponding to the above-mentioned current laser power is calculated.

[0069] For example, calculation The corresponding fluorescein sodium concentration C * :

[0070] The fluorescein sodium concentration C was calculated by the established model * Just reached the maximum brightness signal S max The laser power p * :

[0071] Adjust the laser power to p * .

[0072] In some examples, the first correspondence constructed by fitting the fiber core brightness signal set and the laser power set in the air, and the second correspondence constructed by fitting the fiber core brightness signal set and the laser power set in the solution are specifically:

[0073] Selecting K different laser powers to construct a laser power set;

[0074] Acquire N frames of image data of the endoscope probe in the air at each laser power to construct an air environment image data set;

[0075] Acquire N frames of image data of the endoscope probe immersed in a sodium fluorescein solution of a reference concentration at each laser power to construct a solution environment image data set;

[0076] Data fitting is performed based on the above-mentioned air environment image data set, the above-mentioned solution environment image data set, the laser power set and a preset curve fitting method to obtain the above-mentioned laser power determination model, wherein the above-mentioned laser power determination model includes a first corresponding relationship and a second corresponding relationship, the above-mentioned first corresponding relationship is the corresponding relationship between the air environment image data and the above-mentioned K different laser powers, and the above-mentioned second corresponding relationship is the corresponding relationship between the solution environment image data and the above-mentioned K different laser powers.

[0077] Exemplarily, K (K ≥ 2) different laser powers are selected to construct a laser power set {P k |k=1,2,…,K}. The endoscope probe captures N frames of image data in the air environment under K (K≥2) different laser power settings to form an air environment image dataset The probe was immersed in a reference concentration of sodium fluorescein solution and the laser was operated at K different laser powers P. k Set up to capture N frames of images and build a solution environment image dataset Based on the first two data sets (air environment and solution environment image data sets) and different laser powers, a preset curve fitting method is used for data analysis and fitting. Through this method, a laser power determination model is established, which includes two corresponding relationships:

[0078] The first corresponding relationship f1: the relationship between the air environment image data and different laser powers.

[0079] The second corresponding relationship f2: the relationship between the solution environment image data and different laser powers.

[0080] In some examples, the reference concentration is the average value of the core brightness signal in the reference solution. The concentration corresponding to the preset range of brightness values, the average value of the fiber core brightness signal in the above-mentioned reference solution is the average value of the brightness signals of all fiber core positions extracted at the located fiber core position on the mean image set in the reference solution, and the mean image set in the above-mentioned reference solution is obtained by immersing the endoscopic probe in the sodium fluorescein solution of the above-mentioned reference concentration with maximum laser power and taking the average of multiple frames of image data by pixel.

[0081] Exemplarily, a certain concentration of sodium fluorescein solution is prepared and the concentration is recorded as C0. Sodium fluorescein is a commonly used fluorescent dye that can emit fluorescence under specific laser irradiation. In this step, the endoscope probe is immersed in this solution and adjusted to the maximum laser power to ensure that the brightness signal value obtained under this condition is within a preset range. This preset range is set according to experimental or clinical needs to ensure the quality and safety of the image. The preset range can be [0.95*S max ,S max ).

[0082] In some examples, the data fitting is performed based on the air environment image dataset, the solution environment image dataset, the laser power set and a preset curve fitting method to obtain the laser power determination model, including:

[0083] Based on the above air environment image data set, the average value of the brightness signal values ​​of all fiber core positions at each laser power is used to construct the average value set of fiber core brightness signals in the air.

[0084] Based on the average brightness signal values ​​of all core positions at each laser power in the above solution environment image dataset, a core brightness signal average value set in the solution is constructed.

[0085] Performing data fitting according to the above-mentioned average value set of the fiber core brightness signal in the air, the above-mentioned laser power set and the above-mentioned preset curve fitting method to construct the above-mentioned first corresponding relationship;

[0086] Performing data fitting according to the average value set of the core brightness signal in the solution, the laser power set and the preset curve fitting method to construct the second corresponding relationship;

[0087] The laser power determination model is created according to the first corresponding relationship and the second corresponding relationship.

[0088] For example, the above-mentioned air environment image data set is averaged according to the pixel area to obtain the mean image set in the air under all laser powers. and in The average value of the brightness signal at all the cores is extracted and recorded as the average value set of the brightness signal of the core in the air. in

[0089] The solution environment image dataset is averaged to obtain the mean image set of fluorescein sodium solution at all laser powers. Depend on Extract the average value of the brightness signal at all cores to form the average value set of the core brightness signal in the solution in

[0090] Use the laser power set {P k |k=1,2,…,K} and the average value of the core brightness signal in air Perform fitting and obtain f1 is the first corresponding relationship.

[0091] Use the laser power set {P k |k=1,2,…,K} and the average value of the core brightness signal in the solution Perform fitting and obtain f2 is the second corresponding relationship.

[0092] The laser power determination model is a model including a first correspondence relationship and a second correspondence relationship.

[0093] In some examples, the method for obtaining the average value of the brightness signal value at the core position and the average value of the core brightness signal in the solution is specifically:

[0094] In the above-mentioned air environment image dataset and the above-mentioned solution environment image dataset, the N frames of image data collected at each laser power are averaged by pixel to obtain the mean image set in air. and the mean image set in the solution

[0095] Extracting the above-mentioned average value set of the fiber core brightness signal in the air at the positioned fiber core position on the above-mentioned average value image set in the air;

[0096] The average value set of the fiber core brightness signal in the solution is extracted at the located fiber core position on the mean image set in the above solution.

[0097] For example, the N frames of data collected at each laser power are averaged by pixel. The average image set in air at all laser powers is obtained: and mean image set in sodium fluorescein solution

[0098] use Use the core locating method to locate all cores.

[0099] exist The above results of locating the core are used to extract the average value of the signal value at all cores, which is recorded as The average value of the signal at the fiber core in air at all laser powers Depend on Extract the average value of the signal at all fiber cores The average value of the signal at the fiber core in air at all laser powers

[0100] In some examples, the brightness value in the above preset brightness value interval is the maximum brightness value that the hardware can achieve multiplied by a coefficient greater than or equal to 0.5 and less than or equal to 1.

[0101] For example, the upper limit of the signal value is S max , the ideal signal value is S ideal , the acceptable signal value range is [L min ,L max ], maximum laser power P max , minimum laser power P min , p is the current laser power.

[0102] S max It is the maximum value of the brightness value that can be reached, which is determined by hardware characteristics (such as the number of bits of the AD sampling chip). max and P min It is determined by the laser itself, and it is the maximum and minimum laser power that the laser can provide. ideal =θ*S max , L min =ρ1·S max , L max =ρ2·S max , 0.5≤ρ1≤θ≤ρ2≤1. Typical values ​​are 0.9 for θ, 0.85 for ρ1, and 0.95 for ρ2.

[0103] In some examples, determining the adjusted target laser power based on the average value of the maximum brightness value and the adjustment range of the brightness signal value includes:

[0104] When the average value of the above-mentioned larger brightness values ​​is greater than the maximum value of the above-mentioned brightness signal value adjustment range and the above-mentioned current laser power is greater than the above-mentioned minimum laser power, the above-mentioned adjusted target laser power is determined based on the above-mentioned current optical power, the adjustment coefficient and the adjustment power step.

[0105] For example, if And p>P min At this time, the brightness is too high and the laser power needs to be reduced. The laser power has not reached the minimum value and can be reduced.

[0106] Laser power adjustment value ΔP=-α·p (reduce laser power).

[0107] Adjust the laser power to p+ΔP=(1-α)p, continue to cache the image and then automatically adjust the laser power to optimize the imaging effect.

[0108] α is the adjustment coefficient, which takes a value in the range of [0.25, 0.75], and a typical value of 0.5.

[0109] It should be noted that, when the average value of the larger brightness value is within the brightness signal value adjustment range, the current laser power is kept unchanged; and / or,

[0110] When the average value of the larger brightness value is less than the minimum value of the brightness signal value adjustment range and the current laser power is equal to the maximum laser power, the current laser power is kept unchanged; and / or,

[0111] When the average value of the larger brightness value is greater than the maximum value of the brightness signal value adjustment range and the current laser power is equal to the minimum laser power, the current laser power is kept unchanged.

[0112] For example, when one of the following three conditions is met, the laser power is kept unchanged.

[0113] ① When the average value of the larger brightness In the brightness signal value adjustment range [L min ,L max ] range, the brightness is appropriate and there is no need to adjust the laser power;

[0114] ② And p==P max , the brightness is too low and the laser power needs to be increased, but the laser power has reached the maximum value and cannot be increased any further);

[0115] ③ And p==P min (The brightness is too high and the laser power needs to be reduced, but the laser power has reached the minimum value and cannot be reduced any further);

[0116] In some examples, the method for obtaining a valid image set includes:

[0117] Get the cached image set;

[0118] Calculating the maximum brightness value and the maximum gradient value for each frame of the image in the cache image set;

[0119] The cached images in the cached image set are screened based on the larger brightness value and the larger gradient value to obtain the valid image set.

[0120] Exemplarily, specifically, when performing effective image screening, it can be performed based on the following methods:

[0121] Filtering operations can include:

[0122] (1) For each cached image frame, calculate the maximum brightness value and the maximum gradient value.

[0123] The method for calculating the maximum brightness value is: extract all core brightness signal values ​​from the image, calculate the histogram, and take the value of the histogram that accounts for 5% from high to low as the maximum brightness value, recorded as L.

[0124] For example, if the statistical histogram results are shown in Table 1:

[0125]

[0126]

[0127] Table 1

[0128] The total number is 3+5+6+…+2=100. The proportions from high to low are:

[0129] 9:2 / 100=0.02

[0130] 9~8:(2+2) / 100=0.04

[0131] 9-7: (2+2+8) / 100=0.12

[0132] The proportion of 9 to 8 is less than 5%, while the proportion of 9 to 7 is greater than 5%, so the maximum brightness signal value that accounts for 5% from high to low is 7.

[0133] The method to calculate the maximum value of the gradient is: convolve the image using the following four 3x3 operators to obtain T 1 , T 2 , T 3 , T 4 .make

[0134] T(i,j)=round(max([abs(T1 (i,j))abs(T 2 (i,j))abs(T 3 (i,j))abs(T 4 (i,j))])), i and j are the row and column coordinates of the pixel respectively. The round function is used to round to the nearest integer, the max function is used to take the maximum value, and the abs function is used to take the absolute value. The histogram of T is calculated, and the value that accounts for 5% of the total value from high to low in the histogram is taken as the maximum gradient value.

[0135] The operators used can be Figures 2 to 6 The operator used can also be flipped symmetrically along the row, column, or diagonal where 0 is located.

[0136] (2) Filter cached images according to the largest brightness values ​​and the largest gradient values.

[0137] Set the maximum brightness value of all cached images to m |m=1,2,…,M} are sorted in descending order, and the first half of the cached images are taken, denoted as D 1 . Set the maximum gradient value of all cached images {T m |m=1,2,…,M} are sorted in descending order, and the first half of the cached images are taken, denoted as D 2 The image selected is D 1 With D 2 The union of 1 ∪D 2 .

[0138] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0139] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0140] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0141] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0142] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0143] 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 of this embodiment.

[0144] 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.

[0145] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0146] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for automatically adjusting the laser power of a confocal endoscope. It is characterized in that include: Determine the brightness signal value adjustment range according to the maximum brightness value upper limit that can be achieved by the hardware, the first adjustment coefficient and the second adjustment coefficient, and determine the laser power adjustment range according to the maximum laser power and the maximum laser power of the laser; Taking the maximum laser power as the initial laser power, a valid image set is acquired; Obtaining a maximum brightness value for each frame of the image in the valid image set; Based on the average value of the larger brightness value and the brightness signal value adjustment range, the adjusted target laser power is determined.

2. The method for automatically adjusting the laser power of a confocal endoscope according to claim 1, It is characterized in that The step of determining the adjusted target laser power based on the average value of the larger brightness value and the adjustment range of the brightness signal value comprises: When the average value of the larger brightness value is less than the minimum value of the brightness signal value adjustment range and the current laser power is less than the maximum laser power, the current concentration of the sodium fluorescein solution corresponding to the current laser power is calculated based on the average value of the larger brightness value; The laser power determination model constructed according to the concentration of sodium fluorescein solution, the core brightness signal value and the laser power and the current concentration of the sodium fluorescein solution are used to calculate the laser power when the maximum brightness value that can be achieved by the hardware is just reached; The laser power when the brightness signal reaches the maximum value is determined as the adjusted target laser power.

3. The method for automatically adjusting the laser power of a confocal endoscope according to claim 2, It is characterized in that Calculating the current concentration of the sodium fluorescein solution corresponding to the current laser power based on the average value of the larger brightness value includes: The current concentration of the sodium fluorescein solution corresponding to the current laser power is calculated based on the average value of the larger brightness value, the first correspondence constructed by fitting the fiber core brightness signal set and the laser power set in the air, the second correspondence constructed by fitting the fiber core brightness signal set and the laser power set in the solution, and the reference concentration of sodium fluorescein used in the second correspondence.

4. The method for automatically adjusting the laser power of a confocal endoscope according to claim 3, It is characterized in that The first corresponding relationship constructed by fitting the core brightness signal set and the laser power set in the air, and the second corresponding relationship constructed by fitting the core brightness signal set and the laser power set in the solution are specifically: Selecting K different laser powers to construct a laser power set; Acquire N frames of image data of the endoscope probe in the air at each laser power to construct an air environment image data set; Acquire N frames of image data of the endoscope probe immersed in a sodium fluorescein solution of a reference concentration at each laser power to construct a solution environment image data set; Data fitting is performed based on the air environment image data set, the solution environment image data set, the laser power set and a preset curve fitting method to obtain the laser power determination model, wherein the laser power determination model includes a first corresponding relationship and a second corresponding relationship, the first corresponding relationship is the corresponding relationship between the air environment image data and the K different laser powers, and the second corresponding relationship is the corresponding relationship between the solution environment image data and the K different laser powers.

5. The method for automatically adjusting the laser power of a confocal endoscope according to claim 4, It is characterized in that The performing data fitting based on the air environment image data set, the solution environment image data set, the laser power set and a preset curve fitting method to obtain the laser power determination model includes: Based on the average value of the brightness signal values ​​of all fiber core positions at each laser power in the air environment image data set, a fiber core brightness signal average value set in the air is constructed. Based on the average value of the brightness signal values ​​of all core positions at each laser power in the solution environment image data set, a core brightness signal average value set in the solution is constructed. Performing data fitting according to the average value set of the fiber core brightness signal in air, the laser power set and the preset curve fitting method to construct the first corresponding relationship; Performing data fitting according to the average value set of the core brightness signal in the solution, the laser power set and the preset curve fitting method to construct the second corresponding relationship; The laser power determination model is created according to the first corresponding relationship and the second corresponding relationship.

6. The method for automatically adjusting the laser power of a confocal endoscope according to claim 5, It is characterized in that The method for obtaining the average value of the brightness signal value at the core position and the average value of the core brightness signal in the solution is specifically: In the air environment image dataset and the solution environment image dataset, the N frames of image data collected at each laser power are averaged by pixel to obtain the mean image set in the air. and the mean image set in the solution Extracting the average value set of the fiber core brightness signal in the air at the positioned fiber core position on the average value image set in the air; A mean value set of fiber core brightness signals in the solution is extracted at the located fiber core positions on the mean value image set in the solution.

7. The method for automatically adjusting the laser power of a confocal endoscope according to claim 6, It is characterized in that The reference concentration is the average value of the core brightness signal in the reference solution The concentration corresponding to the preset range of brightness values, the average value of the fiber core brightness signal in the reference solution is the average value of the brightness signals of all fiber core positions extracted at the located fiber core position on the mean image set in the reference solution, and the mean image set in the reference solution is obtained by immersing the endoscopic probe in the sodium fluorescein solution of the reference concentration at maximum laser power and taking multiple frames of image data and averaging them by pixel.

8. The method for automatically adjusting the laser power of a confocal endoscope according to claim 7, It is characterized in that The brightness value in the preset brightness value interval is the maximum brightness value that the hardware can achieve multiplied by a coefficient greater than or equal to 0.5 and less than or equal to 1.

9. The method for automatically adjusting the laser power of a confocal endoscope according to claim 4, It is characterized in that The step of determining the adjusted target laser power based on the average value of the larger brightness value and the adjustment range of the brightness signal value comprises: When the average value of the larger brightness values ​​is greater than the maximum value of the brightness signal value adjustment range and the current laser power is greater than the minimum laser power, the adjusted target laser power is determined based on the current optical power, the adjustment coefficient and the adjustment power step.

10. The method for automatically adjusting the laser power of a confocal endoscope according to claim 4, It is characterized in that The method for obtaining a valid image set comprises: Get the cached image set; Calculating a maximum brightness value and a maximum gradient value for each frame of the image in the cache image set; The cached images in the cached image set are screened based on the larger brightness value and the larger gradient value to obtain the valid image set.