Method and device for improving imaging quality of endoscope

By adjusting the lighting parameters at the front end of the endoscopic light source, the problem of degradation of endoscopic imaging quality is solved, and the effect of improving the endoscopic image quality is achieved.

CN119205596APending Publication Date: 2024-12-27RENMIN HOSPITAL OF WUHAN UNIVERSITY (HUBEI GENERAL HOSPITAL)
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411176511.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

As the endoscopic usage time increases, the lamp and probe age, resulting in poor imaging quality and problems such as spots and blurred areas. The quality of the endoscopic images collected by the existing technology is relatively low.

Method used

By adding a light regulator at the front end of the light source output, adjust the lighting parameters, such as brightness, angle and color temperature, control the lighting environment of the image taken by the endoscope, determine the image brightness and clarity parameters, and adjust the lighting to Meet preset indicators to reduce or eliminate spots and blur areas.

Benefits of technology

Improves the acquisition quality of endoscopic images, reduces or eliminates spots and blurred areas, and improves the imaging effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205596A_ABST
    Figure CN119205596A_ABST
Patent Text Reader

Abstract

The invention discloses an endoscope imaging quality improvement method and device, and the method comprises the steps: obtaining a target image shot by a target endoscope; determining an image brightness parameter of the target image; determining an image quality parameter based on the image brightness parameter; and when the image quality parameter is not greater than the preset quality parameter value, controlling an illumination regulator to regulate the illumination of the target endoscope until the target image meets a preset illumination index condition. A layer of illumination regulator is additionally arranged at the output front end of the light source, and the purpose of reducing and even eliminating a light spot area and a fuzzy area can be achieved by controlling the local illumination brightness, the illumination angle, the color temperature and the like without changing the original structure of the endoscope; therefore, the quality of the acquired endoscopic image can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method and device for improving endoscopic imaging quality. Background Art

[0002] As the endoscope is used for a longer time, the bulb and probe will gradually age, resulting in poor image quality. For example, there are often light spots and blurred areas, which leads to low quality of endoscopic images collected by existing technologies.

[0003] That is, the quality of endoscopic images collected by the prior art is low. Summary of the invention

[0004] The embodiments of the present application provide a method and device for improving endoscopic imaging quality, which can improve the quality of collected endoscopic images.

[0005] In a first aspect, the present application provides an endoscopic imaging quality improvement method, which is applied to an endoscopic imaging quality improvement system, wherein the endoscopic adjustment system includes a target endoscope and a light adjuster, wherein the light adjuster includes a plurality of rotatable adjustment grids, wherein the adjustment grids are used to adjust the illumination parameters of light passing through the adjustment grids to change the illumination environment when the target endoscope captures an image, wherein the illumination parameters include brightness, angle, and color temperature, and the endoscopic imaging quality improvement method includes:

[0006] Acquire a target image captured by the target endoscope;

[0007] Determining an image brightness parameter of the target image;

[0008] determining an image quality parameter based on the image brightness parameter;

[0009] When the image quality parameter is not greater than a preset quality parameter value, the illumination regulator is controlled to adjust the illumination of the target endoscope until the target image meets a preset illumination index condition.

[0010] Optionally, determining an image brightness parameter of the target image includes:

[0011] Inputting the target image into a spot region segmentation model to perform spot segmentation to obtain various target spot regions and non-spot regions;

[0012] Obtaining the spot area and the spot centroid of each target spot area;

[0013] Determine the equivalent centroid of the light spot on the target image based on the light spot area and the light spot area centroid of each target light spot area;

[0014] Converting the target head portrait into a grayscale image to obtain pixel values ​​of each pixel point in the non-spot area on the target head portrait;

[0015] Determine the pixel points in the non-spot area whose pixel values ​​are not higher than the preset pixel value as dark pixel points to obtain each dark pixel area, and determine the pixel points in the non-spot area whose pixel values ​​are higher than the preset pixel value as normal pixel points to obtain each normal pixel area;

[0016] Determine the equivalent centroid of the normal area on the target image based on the area and the centroid of each normal pixel area;

[0017] Determine the dark area equivalent centroid on the target image based on the area and the centroid of each of the dark pixel areas;

[0018] Determine the brightness distribution uniformity parameter based on the coordinates of the light spot equivalent centroid, the normal area equivalent centroid, and the dark area equivalent centroid;

[0019] The image brightness parameter is determined based on the brightness distribution uniformity parameter.

[0020] Optionally, determining the image brightness parameter based on the brightness distribution uniformity parameter includes:

[0021] Calculate a first pixel average value of the non-spot area on the R channel of the target image and a second pixel average value of the target spot area;

[0022] determining a brightness coefficient based on the first pixel average and the second pixel average;

[0023] Acquire the total number of grids of the adjustment grid passed by the edge of the target light spot area on the target image, the total number of grids of the adjustment grid occupied by the target light spot area on the target image, the total image area of ​​the target image, and the total light spot area of ​​the target light spot area;

[0024] Determine a spot area parameter based on the total number of passed grids, the total number of occupied grids, the total image area, and the total spot area;

[0025] The image brightness parameter is determined based on the brightness distribution uniformity parameter, the brightness coefficient, and the light spot area parameter.

[0026] Optionally, determining the image quality parameter based on the image brightness parameter includes:

[0027] Inputting the target image into a clear area segmentation model for segmentation to obtain a clear area and a fuzzy area;

[0028] Obtaining the area and centroid of each fuzzy area;

[0029] Determine the fuzzy area positioning parameters based on the area and the centroid of each fuzzy area, and the height and width of the target image;

[0030] Determine a sharpness quantization parameter based on the blur area positioning parameter;

[0031] An image quality parameter is determined based on the image brightness parameter and the sharpness quantization parameter.

[0032] Optionally, determining the clarity quantization parameter based on the blur area positioning parameter includes:

[0033] Calculate the image entropy of the blurred area of ​​each blurred area and the image entropy of the clear area of ​​the clear area;

[0034] Calculate the fuzzy area texture quantization value of each fuzzy area and the clear area texture quantization value of the clear area;

[0035] Inputting the target image into a landmark recognition model to obtain a landmark region on the target image;

[0036] Determining a fuzzy region amplification coefficient based on an overlapping region parameter between the marker region and the fuzzy region;

[0037] Determine the fuzzy area coefficient of each fuzzy area based on the fuzzy area image entropy of each fuzzy area, the clear area image entropy of the clear area, the fuzzy area texture quantization value of each fuzzy area, the clear area texture quantization value of the clear area and the fuzzy area amplification coefficient;

[0038] The sharpness quantization parameter is determined based on the maximum value of blur area coefficients of each blur area and the blur area positioning parameter.

[0039] Optionally, the preset illumination index condition includes that the sum of the spot area ratio of the target spot area, the brightness distribution uniformity parameter and the blur area ratio of the blur area is not greater than a preset parameter, and the controlling the illumination regulator to adjust the illumination of the target endoscope until the target image meets the preset illumination index condition includes:

[0040] Acquire the brightness level of the target light spot area; when the brightness level of the light spot area is not higher than a preset brightness level, control the adjustment grid through which the edge of the target light spot area passes to rotate; when the brightness level of the light spot area is higher than the preset brightness level, control the outer expansion grid to rotate, wherein the outer expansion grid surrounds the target light spot area and is adjacent to the adjustment grid through which the edge of the target light spot area passes;

[0041] The current color temperature parameter and the current brightness parameter of the adjustment grid are adjusted.

[0042] Optionally, the method for improving endoscopic imaging quality comprises:

[0043] Acquire a first target image before controlling the illumination regulator to adjust the illumination of the target endoscope and a second target image after controlling the illumination regulator to adjust the illumination of the target endoscope;

[0044] Inputting the first target image and the second target image into the marker recognition model to obtain a first marker detection frame and a second marker detection frame;

[0045] Correcting the first target image based on the second marker detection frame to obtain the first target image and the corresponding second marker detection frame;

[0046] The landmark recognition model is trained based on the first target image and the corresponding second landmark detection frame.

[0047] In a second aspect, the endoscopic imaging quality improvement device provided by the present application is applied to an endoscopic imaging quality improvement system, wherein the endoscopic adjustment system includes a target endoscope and a light adjuster, wherein the light adjuster includes a plurality of rotatable adjustment grids, wherein the adjustment grids are used to adjust the illumination parameters of the light passing through the adjustment grids to change the illumination environment when the target endoscope takes an image, wherein the illumination parameters include brightness, angle, and color temperature, and the endoscopic imaging quality improvement device includes:

[0048] An acquisition unit, used for acquiring a target image taken by the target endoscope;

[0049] A brightness evaluation unit, used to determine image brightness parameters of the target image;

[0050] a clarity evaluation unit, configured to determine an image quality parameter based on the image brightness parameter;

[0051] The adjustment unit is used to control the illumination adjuster to adjust the illumination of the target endoscope until the target image meets the preset illumination index condition when the image quality parameter is not greater than the preset quality parameter value.

[0052] Optionally, determining an image brightness parameter of the target image includes:

[0053] Inputting the target image into a spot region segmentation model to perform spot segmentation to obtain various target spot regions and non-spot regions;

[0054] Obtaining the spot area and the spot centroid of each target spot area;

[0055] Determine the equivalent centroid of the light spot on the target image based on the light spot area and the light spot area centroid of each target light spot area;

[0056] Converting the target head portrait into a grayscale image to obtain pixel values ​​of each pixel point in the non-spot area on the target head portrait;

[0057] Determine the pixel points in the non-spot area whose pixel values ​​are not higher than the preset pixel value as dark pixel points to obtain each dark pixel area, and determine the pixel points in the non-spot area whose pixel values ​​are higher than the preset pixel value as normal pixel points to obtain each normal pixel area;

[0058] Determine the equivalent centroid of the normal area on the target image based on the area and the centroid of each normal pixel area;

[0059] Determine the dark area equivalent centroid on the target image based on the area and the centroid of each of the dark pixel areas;

[0060] Determine the brightness distribution uniformity parameter based on the coordinates of the light spot equivalent centroid, the normal area equivalent centroid, and the dark area equivalent centroid;

[0061] The image brightness parameter is determined based on the brightness distribution uniformity parameter.

[0062] Optionally, determining the image brightness parameter based on the brightness distribution uniformity parameter includes:

[0063] Calculate a first pixel average value of the non-spot area on the R channel of the target image and a second pixel average value of the target spot area;

[0064] determining a brightness coefficient based on the first pixel average and the second pixel average;

[0065] Acquire the total number of grids of the adjustment grid passed by the edge of the target light spot area on the target image, the total number of grids of the adjustment grid occupied by the target light spot area on the target image, the total image area of ​​the target image, and the total light spot area of ​​the target light spot area;

[0066] Determine a spot area parameter based on the total number of passed grids, the total number of occupied grids, the total image area, and the total spot area;

[0067] The image brightness parameter is determined based on the brightness distribution uniformity parameter, the brightness coefficient, and the light spot area parameter.

[0068] Optionally, determining the image quality parameter based on the image brightness parameter includes:

[0069] Inputting the target image into a clear area segmentation model for segmentation to obtain a clear area and a fuzzy area;

[0070] Obtaining the area and centroid of each fuzzy area;

[0071] Determine the fuzzy area positioning parameters based on the area and the centroid of each fuzzy area, and the height and width of the target image;

[0072] Determine a sharpness quantization parameter based on the blur area positioning parameter;

[0073] An image quality parameter is determined based on the image brightness parameter and the sharpness quantization parameter.

[0074] Optionally, determining the clarity quantization parameter based on the blur area positioning parameter includes:

[0075] Calculate the image entropy of the blurred area of ​​each blurred area and the image entropy of the clear area of ​​the clear area;

[0076] Calculate the fuzzy area texture quantization value of each fuzzy area and the clear area texture quantization value of the clear area;

[0077] Inputting the target image into a landmark recognition model to obtain a landmark region on the target image;

[0078] Determining a fuzzy region amplification coefficient based on an overlapping region parameter between the marker region and the fuzzy region;

[0079] Determine the fuzzy area coefficient of each fuzzy area based on the fuzzy area image entropy of each fuzzy area, the clear area image entropy of the clear area, the fuzzy area texture quantization value of each fuzzy area, the clear area texture quantization value of the clear area and the fuzzy area amplification coefficient;

[0080] The sharpness quantization parameter is determined based on the maximum value of blur area coefficients of each blur area and the blur area positioning parameter.

[0081] Optionally, the preset illumination index condition includes that the sum of the spot area ratio of the target spot area, the brightness distribution uniformity parameter and the blur area ratio of the blur area is not greater than a preset parameter, and the controlling the illumination regulator to adjust the illumination of the target endoscope until the target image meets the preset illumination index condition includes:

[0082] Acquire the brightness level of the target light spot area; when the brightness level of the light spot area is not higher than a preset brightness level, control the adjustment grid through which the edge of the target light spot area passes to rotate; when the brightness level of the light spot area is higher than the preset brightness level, control the outer expansion grid to rotate, wherein the outer expansion grid surrounds the target light spot area and is adjacent to the adjustment grid through which the edge of the target light spot area passes;

[0083] The current color temperature parameter and the current brightness parameter of the adjustment grid are adjusted.

[0084] Optionally, the method for improving endoscopic imaging quality comprises:

[0085] Acquire a first target image before controlling the illumination regulator to adjust the illumination of the target endoscope and a second target image after controlling the illumination regulator to adjust the illumination of the target endoscope;

[0086] Inputting the first target image and the second target image into the marker recognition model to obtain a first marker detection frame and a second marker detection frame;

[0087] Correcting the first target image based on the second marker detection frame to obtain the first target image and the corresponding second marker detection frame;

[0088] The landmark recognition model is trained based on the first target image and the corresponding second landmark detection frame.

[0089] In a third aspect, the electronic device provided in the present application includes a memory and a processor, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the steps in the method for improving endoscopic imaging quality provided in the present application.

[0090] In a fourth aspect, the computer-readable storage medium provided in the present application stores a plurality of instructions, which are suitable for loading by a processor to implement the steps in the method for improving endoscopic imaging quality provided in the present application.

[0091] In a fifth aspect, the computer program product provided in the present application includes a computer program or instructions, which, when executed by a processor, implement the steps in the method for improving endoscopic imaging quality provided in the present application.

[0092] In this application, compared with the related art, the target image captured by the target endoscope is obtained; the image brightness parameter of the target image is determined; the image quality parameter is determined based on the image brightness parameter; when the image quality parameter is not greater than the preset quality parameter value, the light regulator is controlled to adjust the light of the target endoscope until the target image meets the preset light index condition. This application can achieve the purpose of reducing or even eliminating the spot area and the blurred area without changing the original structure of the endoscope by adding a layer of light regulator at the front end of the light source output and controlling the local light brightness, light angle, color temperature, etc.; thereby improving the quality of the collected endoscopic image. BRIEF DESCRIPTION OF THE DRAWINGS

[0093] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0094] Figure 1 is a schematic diagram of a scenario of an endoscopic imaging quality improvement system provided in an embodiment of the present application;

[0095] Figure 2 It is a flow chart of an embodiment of the method for improving endoscopic imaging quality provided in the embodiment of the present application;

[0096] Figure 3 is a schematic diagram of a light regulator and an adjustment grid in one embodiment of a method for improving endoscopic imaging quality provided in an embodiment of the present application;

[0097] Figure 4 is a schematic diagram of a light spot area and a non-light spot area on a target image in an embodiment of a method for improving endoscopic imaging quality provided by an embodiment of the present application;

[0098] Figure 5 is a schematic diagram of occupied grids and passed grids on a target image in one embodiment of the method for improving endoscopic imaging quality provided by an embodiment of the present application;

[0099] Figure 6 is a schematic diagram of a blurred area and a clear area on a target image in one embodiment of a method for improving endoscopic imaging quality provided by an embodiment of the present application;

[0100] Figure 7 is a schematic diagram of a target image in one embodiment of the method for improving endoscopic imaging quality provided by an embodiment of the present application;

[0101] Figure 8 is a schematic diagram of an outward expansion grid on a target image in one embodiment of the method for improving endoscopic imaging quality provided by an embodiment of the present application;

[0102] Fig. 9 is a schematic diagram of a first target image on a target image in one embodiment of the method for improving endoscopic imaging quality provided by an embodiment of the present application;

[0103] Fig.10 is a schematic diagram of a second target image on a target image in one embodiment of the method for improving endoscopic imaging quality provided by an embodiment of the present application;

[0104] Fig.11 is a schematic structural diagram of an endoscopic imaging quality improvement device provided in an embodiment of the present application;

[0105] Fig.12 It is a structural schematic diagram of a brightness evaluation unit in an endoscopic imaging quality improvement device provided in an embodiment of the present application;

[0106] Fig.13 It is a structural schematic diagram of a clarity evaluation unit in an endoscopic imaging quality improvement device provided in an embodiment of the present application;

[0107] Fig.14 is a structural schematic diagram of a brightness optimization unit in an endoscopic imaging quality improvement device provided in an embodiment of the present application;

[0108] Fig.15 is a structural schematic diagram of a blur optimization unit in an endoscopic imaging quality improvement device provided in an embodiment of the present application;

[0109] Fig.16 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0110] It should be noted that the principles of the present application are illustrated by implementing them in an appropriate computing environment. The following description is based on the illustrated specific embodiments of the present application and should not be considered as limiting other specific embodiments of the present application that are not described in detail herein.

[0111] In the following description of the present application, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0112] In the following description of the present application, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0113] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0114] In order to improve the effect of improving endoscopic imaging quality, the embodiments of the present application provide an endoscopic imaging quality improvement method, an endoscopic imaging quality improvement device, an electronic device, a computer-readable storage medium, and a computer program product. The endoscopic imaging quality improvement method can be executed by the endoscopic imaging quality improvement device, or by an electronic device integrated with the endoscopic imaging quality improvement device.

[0115] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0116] Please refer to Figure 1 , the present application also provides an endoscopic imaging quality improvement system, such as Figure 1 As shown, the electronic device 100 of the endoscopic imaging quality improvement system integrates the endoscopic imaging quality improvement device provided by the present application.

[0117] Among them, the electronic device 100 can be any device equipped with a processor and has processing capabilities, such as mobile electronic devices with processors such as smart phones, tablet computers, PDAs, laptops, smart speakers, or fixed electronic devices with processors such as desktop computers, televisions, servers, industrial equipment, etc.

[0118] In addition, if Figure 1 As shown, the endoscopic imaging quality improvement system may further include a memory 200 for storing raw data, intermediate data, and result data.

[0119] In the embodiment of the present application, the memory 200 can be a cloud storage. Cloud storage is a new concept extended and developed from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as the storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.

[0120] At present, the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, stores the data on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, ID entity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.

[0121] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.

[0122] It should be noted that Figure 1 The scenario diagram of the endoscopic imaging quality improvement system shown is merely an example. The endoscopic imaging quality improvement system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the endoscopic imaging quality improvement system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is equally applicable to similar technical problems.

[0123] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.

[0124] Please refer to Figure 2 , Figure 2 FIG. 1 is a flow chart of an embodiment of a method for improving endoscopic imaging quality provided in an embodiment of the present application. Figure 2 As shown, the process of the method for improving endoscopic imaging quality provided by this application is as follows:

[0125] 201. Obtain a target image captured by a target endoscope.

[0126] like Figure 3As shown, in the embodiment of the present application, the endoscope adjustment system includes a target endoscope and a light regulator, and the light regulator includes a plurality of rotatable adjustment grids, and the adjustment grids are used to adjust the illumination parameters of the light passing through the adjustment grids to change the illumination environment when the target endoscope takes an image, and the illumination parameters include brightness, angle, and color temperature. The light emitted by the light source of the target endoscope is irradiated through the adjustment grid, and irradiated on the position to be imaged through the adjustment grid. Among them, a plurality of rotatable adjustment grids are arranged in an array manner. Among them, the light regulator is circular, and of course it can also be other shapes such as an equilateral triangle, a square, a regular hexagon, etc. The adjustment grid is in a rectangular shape, and of course it can also be other shapes such as an equilateral triangle, a square, a regular hexagon, etc. The adjustment grids located in the center of the light regulator can be rotated at a certain angle around the A1A2 axis and the B1B2 axis, but the adjustment grids located at the edge of the light regulator are fixed. Each adjustment grid can adjust the brightness and color temperature.

[0127] 202. Determine image brightness parameters of the target image.

[0128] In the embodiment of the present application, determining the image brightness parameter of the target image includes:

[0129] (1) The target image is input into the spot region segmentation model for spot segmentation to obtain target spot regions and non-spot regions.

[0130] Among them, the spot area segmentation model is trained. The segmentation model can be selected such as Unet++, Mask-Rcnn, etc. The label is outlined by a professional endoscopist on the spot boundary in the endoscopic image to obtain the target spot area U i .like Figure 4 As shown, the target image is input into the spot area segmentation model for spot segmentation, and the spot area S of the i-th target spot area is obtained. i and the centroid of the spot area (X i ,Y i ).

[0131] (2) Obtain the spot area and spot centroid of each target spot area.

[0132] (3) Determine the equivalent centroid of the light spot on the target image based on the light spot area and the light spot area centroid of each target light spot area.

[0133] Specifically, the calculation formula of the spot equivalent center of mass (Gx, Gy) is as follows:

[0134]

[0135] Wherein, n is the number of target spot areas.

[0136] (4) Convert the target portrait into a grayscale image to obtain the pixel value of each pixel point in the non-light spot area of ​​the target portrait.

[0137] (5) Pixel points whose pixel values ​​in the non-light spot area are not higher than the preset pixel value are determined as dark pixel points, and pixel points whose pixel values ​​in the non-light spot area are higher than the preset pixel value are determined as normal pixel points, thereby obtaining respective normal pixel areas.

[0138] The preset pixel value may be set according to specific circumstances.

[0139] (6) Determine the equivalent centroid of the normal area on the target image based on the area and centroid of each normal pixel area.

[0140] Get the area S2 of the i-th normal pixel area i and the centroid of the spot area (X2 i ,Y2 i ). Determine the equivalent centroid (Zx, Zy) of the normal region on the target image.

[0141] For specific steps, reference may be made to determining the equivalent centroid of the light spot on the target image based on the light spot area and the light spot area centroid of each target light spot area.

[0142] (7) Determine the equivalent centroid of the dark area on the target image based on the area and centroid of each dark pixel area.

[0143] Get the area S1 of the i-th dark pixel area i and the centroid of the spot area (X1 i ,Y1 i ). Determine the dark area equivalent centroid (Ax, Ay) on the target image.

[0144] (8) Determine the brightness distribution uniformity parameter based on the coordinates of the equivalent center of mass of the light spot, the equivalent center of mass of the normal area, and the equivalent center of mass of the dark area.

[0145] Specifically, the brightness distribution uniformity parameter α satisfies the following formula:

[0146]

[0147] (9) Determine the image brightness parameter based on the brightness distribution uniformity parameter.

[0148] In a specific embodiment, the brightness distribution uniformity parameter is determined as the image brightness parameter.

[0149] In another specific embodiment, determining the image brightness parameter based on the brightness distribution uniformity parameter includes:

[0150] (1) Calculate the first pixel average value of the non-spot area on the R channel of the target image and the second pixel average value of the target spot area.

[0151] Specifically, a first pixel average value r1 of the non-spot area on the R channel of the target image and a second pixel average value r2 of the target spot area are calculated.

[0152] (2) Determine a brightness coefficient based on the first pixel average value and the second pixel average value.

[0153] In a specific embodiment, the calculation formula of the brightness coefficient β is as follows:

[0154]

[0155] (3) Obtain the total number of grids passed by the edge of the target light spot area on the target image, the total number of grids occupied by the target light spot area on the target image, the total image area of ​​the target image, and the total spot area of ​​the target light spot area.

[0156] like Figure 5 As shown, the total number of grids passed n1, the total number of grids occupied n2, the total image area A of the target image, and the total spot area sum(S i ).

[0157] (4) Determine the spot area parameters based on the total number of grids passed, the total number of grids occupied, the total image area, and the total spot area.

[0158] In the embodiment of the present application, the calculation formula of the spot area parameter δ is as follows.

[0159]

[0160] (5) Determine the image brightness parameter based on the brightness distribution uniformity parameter, brightness coefficient and spot area parameter.

[0161] In the embodiment of the present application, the brightness distribution uniformity parameter α, the brightness coefficient β and the spot area parameter δ are weighted and summed based on the preset weight coefficient to obtain the image brightness parameter

[0162] Specifically, the preset weight coefficients are determined by decision trees, random forests, etc. The weight coefficients corresponding to the brightness distribution uniformity parameter α, the brightness coefficient β, and the spot area parameter δ are λ1, λ2, and λ3 respectively. At this time, the image brightness parameter

[0163] 203. Determine an image quality parameter based on the image brightness parameter.

[0164] In a specific embodiment, the image brightness parameter Determined as image quality parameter.

[0165] In another specific embodiment, determining the image quality parameter based on the image brightness parameter includes:

[0166] (1) The target image is input into the clear area segmentation model for segmentation to obtain clear areas and blurred areas.

[0167] Among them, the clear area segmentation model can be trained, and segmentation models such as Unet++ and Mask-Rcnn can be selected. The labels are outlined by professional endoscopists on the boundaries of the clear areas in the endoscopic images to obtain the boundary lines of the fuzzy areas, and the fuzzy area P is obtained according to the boundary lines of the fuzzy areas. i 、The area Aare corresponding to each fuzzy area i and its regional centroid (XM i ,YM i ).

[0168] like Figure 6 As shown in FIG. 1 , the target image is input into the clear region segmentation model for segmentation to obtain a clear region and a fuzzy region. The clear region and the fuzzy region are separated by the fuzzy region boundary.

[0169] (2) Obtain the area and centroid of each fuzzy region.

[0170] (3) Determine the fuzzy region positioning parameters based on the area and centroid of each fuzzy region and the height and width of the target image.

[0171] Since blur generally starts from the edge of the image, the distance from the center of the image can reflect the degree of blur. The calculation formula of the blur region positioning parameter ε is as follows:

[0172]

[0173] Among them, W and H are the width and height of the target image respectively, and Aare i is the area corresponding to the fuzzy region, (XM i ,YM i ) is the centroid of the fuzzy area.

[0174] (4) Determine the clarity quantification parameters based on the blur area positioning parameters.

[0175] In a specific embodiment, determining the sharpness quantization parameter based on the blur region positioning parameter includes: determining the blur region positioning parameter as the sharpness quantization parameter.

[0176] In another specific embodiment, determining the clarity quantization parameter based on the blur area positioning parameter includes:

[0177] (1) Calculate the image entropy of the blurred area and the image entropy of the clear area of ​​each blurred area.

[0178] In the embodiment of the present application, the fuzzy area image entropy φ of the kth fuzzy area sk Satisfies the following formula,

[0179]

[0180] P ij =f(i,j) / N 2 .

[0181] Among them, P i It represents the probability of grayscale i appearing. The one-dimensional entropy of an image can represent the clustering characteristics of the grayscale distribution of an image, but it cannot reflect the spatial characteristics of the grayscale distribution of an image. In order to characterize this spatial characteristic, a feature quantity that can reflect the spatial characteristics of grayscale distribution is introduced on the basis of the one-dimensional entropy to form the two-dimensional entropy of the image. The neighborhood grayscale mean of the image is selected as the spatial feature quantity of the grayscale distribution, and it is combined with the pixel grayscale of the image to form a feature binary, recorded as (i, j), where i represents the grayscale value of the pixel and j represents the neighborhood grayscale mean. At this time, P ij =f(i,j) / N 2 . Where f(i,j) is the frequency of occurrence of feature binary (i,j), and N is the size of the fuzzy region k.

[0182] Image entropy of the clear area φ q Satisfies the following formula,

[0183]

[0184] (2) Calculate the fuzzy area texture quantization value of each fuzzy area and the clear area texture quantization value of the clear area.

[0185] In the embodiment of the present application, LBP in the skimage toolkit in phthon is called to perform grayscale image texture quantization to obtain the fuzzy area texture quantization value mean (φ Lk ) and the clear area texture quantization value mean(φ q ).

[0186] (3) Input the target image into the landmark recognition model to obtain the landmark area on the target image.

[0187] (4) Determine the fuzzy region amplification coefficient based on the overlapping region parameters between the marker region and the fuzzy region.

[0188] In the embodiment of the present application, the fuzzy region expansion coefficient σ∈[0,0.1].

[0189] When the marker region and the fuzzy region do not overlap, the fuzzy region amplification coefficient σ=0. When the marker region and the fuzzy region overlap, the fuzzy region amplification coefficient σ=ρ / 10, where

[0190]

[0191] Where Γ1 represents the area of ​​the landmark region, and Γ2 represents the area of ​​the fuzzy region.

[0192] (5) Determine the fuzzy area coefficient of each fuzzy area based on the fuzzy area image entropy of each fuzzy area, the clear area image entropy of the clear area, the fuzzy area texture quantization value of each fuzzy area, the clear area texture quantization value of the clear area and the fuzzy area amplification coefficient.

[0193] In the embodiment of the present application, the fuzzy area coefficient φ of the kth fuzzy area k The calculation formula is as follows:

[0194]

[0195] Among them, W and H are the width and height of the image respectively, σ is the fuzzy area expansion coefficient, mean(φ Lk ) is the fuzzy area texture quantization value of the kth fuzzy area, mean(φ q ) is the texture quantization value of the clear area, φ q is the image entropy of the clear area, φ sk is the image entropy of the blurred area of ​​the kth blurred area, Aare k is the area of ​​the kth fuzzy region.

[0196] (6) Determine the sharpness quantization parameter based on the maximum value of the blur area coefficient of each blur area and the blur area positioning parameter.

[0197] In a specific embodiment, the sharpness quantification parameter The calculation formula is as follows,

[0198]

[0199] Among them, φ k is the fuzzy area coefficient of the kth fuzzy area, and ε is the fuzzy area positioning parameter.

[0200] (7) Determine image quality parameters based on image brightness parameters and sharpness quantization parameters.

[0201] In a specific embodiment, the image quality parameter The calculation formula is as follows,

[0202]

[0203] in, To clarify the quantitative parameters, is the image brightness parameter.

[0204] 204. When the image quality parameter is not greater than the preset quality parameter value, control the illumination regulator to adjust the illumination of the target endoscope until the target image meets the preset illumination index condition.

[0205] In the embodiment of the present application, the preset illumination index condition includes the sum of the spot area ratio of the target spot area, the brightness distribution uniformity parameter and the blur area ratio of the blur area is not greater than the preset parameter. The preset parameter can be 0.01 or other values, which can be set according to the specific situation.

[0206] Among them, the preset illumination index condition is the spot area ratio loss of the target spot area θ , brightness distribution uniformity parameter loss L And the blur area ratio loss of the blur area M The sum is no greater than the preset parameter ξ, that is, loss θ +loss L +loss M ≤ξ.

[0207] In the embodiment of the present application, the angles of the grid inside the spot and the edge of the spot passing through the grid need to be adjusted, and each grid adjustment angle is controlled by two parameters, namely (θ ijx ,θ ijy ), where θ ijx Indicates the rotation angle of the i-th row and j-th column in the image around the A1A2 axis, θ ijx Indicates the rotation angle of the i-th row and j-th column in the image around the B1B2 axis.

[0208] Specifically, Figure 7 As shown in the figure, the initial value of the grid angle control parameter in the non-spot area is (θ ijx =0,θ ijy =0); Point D is the coordinate of the equivalent centroid of the clear area (x D ,y D ), the coordinates are (x ij ,y ij ) spot grid, the initial value of its control parameter is

[0209]

[0210] Where W and H are the width and height of the image respectively.

[0211] In the embodiment of the present application, controlling the illumination regulator to adjust the illumination of the target endoscope until the target image meets the preset illumination index condition includes:

[0212] (1) Obtain the brightness level of the target light spot area.

[0213] In the embodiment of the present application, the brightness level of the spot area of ​​the i-th target spot area satisfies the following formula:

[0214] Brightness level of the i-th spot area

[0215] Where P 80 (c i ) represents the 80% percentile of the pixel value of the i-th channel. The brightness level of the i-th spot area is used as a trigger factor for the brightness of the light regulator. i can be any of the three RGB channels.

[0216] Furthermore, when the target light spot area overlaps with the marker area identified by the marker recognition model, the light spot area brightness level of the target light spot area is determined to be strong brightness.

[0217] In an embodiment of the present application, when the ratio of the 80% percentile value of the B channel pixel value to the 80% percentile value of the R channel pixel value is not less than the preset brightness value and the ratio of the 80% percentile value of the G channel pixel value to the 80% percentile value of the R channel pixel value is not less than the preset brightness value, or the target light spot area overlaps with the marker area identified by the marker recognition model, the spot area brightness level of the target light spot area is determined as strong brightness, otherwise the spot area brightness level of the target light spot area is determined as weak brightness.

[0218] (2) When the brightness level of the light spot area is not higher than the preset brightness level, the adjustment grid through which the edge of the target light spot area passes is controlled to rotate; when the brightness level of the light spot area is higher than the preset brightness level, the outer expansion grid is controlled to rotate.

[0219] like Figure 8 As shown, the outward expansion grid surrounds the target light spot area and is adjacent to the adjustment grid through which the edge of the target light spot area passes. The preset brightness level is weak brightness.

[0220] Furthermore, when case 1 or case 3 and the image quality parameter are satisfied If the value is not greater than the preset quality parameter value Δ, the grid brightness control module is started.

[0221] When the brightness level of the spot area is not higher than the preset brightness level, that is, the brightness level of the spot area is weak brightness, the adjustment grid through which the edge of the target spot area passes is controlled to rotate; when the brightness level of the spot area is higher than the preset brightness level, that is, the brightness level of the spot area is strong brightness, the outward expansion grid is controlled to rotate.

[0222] By rotating the adjustment grid, the light spot area ratio loss θ Approaching 0, that is

[0223]

[0224] Furthermore, the brightness distribution uniformity parameter loss L Adjust it down to near 0, that is, loss L =α→0.

[0225] (3) Adjust the current color temperature parameter and current brightness parameter of the adjustment grid.

[0226] Furthermore, if case 2 or case 3 and image quality parameters are met is not greater than the preset quality parameter value Δ, the grid brightness control module and the grid color temperature control module are started, the current brightness parameter is adjusted based on the brightness adjustment parameter, and the current color temperature parameter is adjusted based on the color temperature adjustment parameter. Specifically, the brightness adjustment parameter is multiplied by the current brightness parameter, and the color temperature adjustment parameter 1 is multiplied by the current color temperature parameter.

[0227] The brightness adjustment parameter is The color temperature adjustment parameters are: φ k is the fuzzy area coefficient of the kth fuzzy area. M , approaching 0.

[0228] Right now,

[0229] Among them, ε is the fuzzy area positioning parameter, Aare i is the area corresponding to the i-th blurred area, W and H are the width and height of the image respectively.

[0230] After a round of adjustment is completed, it is determined that the image quality parameter is not greater than the preset quality parameter value. If the image quality parameter is greater than the preset quality parameter value, that is, loss θ +loss L +loss M >ξ, repeatedly control the illumination regulator to adjust the illumination of the target endoscope until the target image meets the preset illumination index condition or completes the preset regulation round.

[0231] If the image quality parameter is always greater than the preset quality parameter value, that is, if loss θ +loss L +loss M It cannot be lower than ξ all the time. It is necessary to request the probe spatial posture to cooperate. At this time, the warning unit is activated, and a text or voice prompt is given saying "Please try to adjust the probe distance and angle". Repeat the adjustment until lossθ +loss L +loss M ≤ξ. Get the image quality parameter at this time

[0232] ①If Stop regulating;

[0233] ②If It is necessary to request the focal length of the camera to cooperate, activate the warning unit, and prompt "Please adjust the camera focal length" in text or voice form, and repeat the adjustment until So far, the spot area is optimized and the blurred area is optimized.

[0234] Furthermore, the method for improving endoscopic imaging quality includes: obtaining a first target image before controlling the light regulator to adjust the illumination of the target endoscope and a second target image after controlling the light regulator to adjust the illumination of the target endoscope; inputting the first target image and the second target image into a marker recognition model to obtain a first marker detection frame and a second marker detection frame; correcting the first target image based on the second marker detection frame to obtain the first target image and the corresponding second marker detection frame; and training the marker recognition model based on the first target image and the corresponding second marker detection frame.

[0235] Specifically, the training marker recognition model model can be a classification model, a target detection model, an image segmentation model, etc., without limiting the type of deep learning network model. The marker can be a blood vessel, a microstructure, an early cancer, a tumor, a polyp, etc.

[0236] like Fig. 9 As shown, before using spot optimization and blurred area optimization, the trained model model is loaded, the identified marker area is marked and retained, and the first marker detection frame on the first target image is obtained.

[0237] like Fig.10 As shown, after the light spot optimization and the blurred area optimization, the trained model model is loaded, the identified marker area is marked and retained, and the second marker detection frame on the second target image is obtained. The marker recognition model is trained based on the first target image and the corresponding second marker detection frame. Specifically, the first target image and the corresponding second marker detection frame are added to the training set of the marker recognition model to train the marker recognition model.

[0238] For the landmark recognition models with missed recognition, wrong recognition, and inaccurate position, add such images containing light spots or blurred areas to the training set and Fig. 9 The polyp coordinate frame in Fig.10 The coordinate frame in is corrected. Fig. 9The polyp images with light spots are used as training sets, and the recognition model is retrained to improve the model recognition accuracy.

[0239] In order to facilitate better implementation of the endoscopic imaging quality improvement method provided in the embodiment of the present application, the embodiment of the present application also provides an endoscopic imaging quality improvement device based on the above endoscopic imaging quality improvement method. The meanings of the terms are the same as those in the above endoscopic imaging quality improvement method. For specific implementation details, please refer to the description in the above method embodiment.

[0240] Please refer to Fig.11 , Fig.11 A schematic diagram of the structure of an endoscopic imaging quality improvement device provided in an embodiment of the present application, the endoscopic imaging quality improvement device may include:

[0241] An acquisition unit 701 is used to acquire a target image taken by a target endoscope;

[0242] A brightness evaluation unit 702, used to determine image brightness parameters of a target image;

[0243] A clarity evaluation unit 703, configured to determine an image quality parameter based on an image brightness parameter;

[0244] The adjustment unit 704 is used to control the illumination adjuster to adjust the illumination of the target endoscope until the target image meets the preset illumination index condition when the image quality parameter is not greater than the preset quality parameter value.

[0245] For further information, see Fig.12 The brightness evaluation unit 702 includes a light spot area positioning module, a brightness level calculation module, a light spot area calculation module, and a brightness quality quantification module.

[0246] For further information, see Fig.13 The clarity evaluation unit 703 includes a fuzzy area positioning module, a fuzzy coefficient calculation module, and a clarity quantification module.

[0247] For further information, see Fig.14 and Fig.15 The adjustment unit 704 includes a brightness optimization unit and a fuzzy optimization unit. The brightness optimization unit includes a grid angle control module and a grid brightness control module. The fuzzy optimization unit includes a grid angle control module and a grid color temperature control module.

[0248] The specific implementation of each of the above modules can be found in the previous embodiments and will not be described in detail here.

[0249] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the processor is used to execute the steps of the method for improving endoscopic imaging quality provided in this embodiment by calling a computer program stored in the memory.

[0250] Please refer to Fig.16 , Fig.16 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0251] The electronic device may include components such as a processor 101 with one or more processing cores, a memory 102 with one or more computer-readable storage media, a power supply 103, and an input unit 104. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0252] The processor 101 is the control center of the electronic device, which uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 102, and calling data stored in the memory 102. Optionally, the processor 101 may include one or more processing cores; optionally, the processor 101 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 101.

[0253] The memory 102 can be used to store software programs and modules. The processor 101 executes various functional applications and data processing by running the software programs and modules stored in the memory 102. The memory 102 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 102 may also include a memory controller to provide the processor 101 with access to the memory 102.

[0254] The electronic device also includes a power supply 103 for supplying power to each component. Optionally, the power supply 103 can be logically connected to the processor 101 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 103 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0255] The electronic device may further include an input unit 104, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0256] Although not shown, the electronic device may also include a display unit, an image acquisition component, etc., which will not be described in detail here. Specifically in this embodiment, the processor 101 in the electronic device will load the executable code corresponding to one or more computer programs into the memory 102 according to the following instructions, and the processor 101 will execute the steps in the method for improving endoscopic imaging quality provided by the present application, such as:

[0257] Acquire a target image captured by the target endoscope;

[0258] Determining an image brightness parameter of the target image;

[0259] determining an image quality parameter based on the image brightness parameter;

[0260] When the image quality parameter is not greater than a preset quality parameter value, the illumination regulator is controlled to adjust the illumination of the target endoscope until the target image meets a preset illumination index condition.

[0261] It should be noted that the electronic device provided in the embodiment of the present application and the method for improving the endoscopic imaging quality in the above embodiment belong to the same concept, and its specific implementation process is detailed in the above related embodiments and will not be repeated here.

[0262] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program stored therein is executed on a processor of an electronic device provided in an embodiment of the present application, the processor of the electronic device executes the steps in the method for improving endoscopic imaging quality provided in the present application. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0263] The present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes various optional implementations of the above-mentioned endoscopic imaging quality improvement method.

[0264] The above is a detailed introduction to an endoscopic imaging quality improvement method and device provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0265] It should be noted that when the above embodiments of the present application are applied to specific products or technologies, the relevant data of the user is involved, and the user's permission or consent is required, and the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

Claims

1. A method for improving endoscopic imaging quality, characterized in that: Applied to an endoscope imaging quality improvement system, the endoscope adjustment system includes a target endoscope and a light adjuster, the light adjuster includes a plurality of rotatable adjustment grids, the adjustment grids are used to adjust the illumination parameters of the light passing through the adjustment grids to change the illumination environment when the target endoscope takes an image, the illumination parameters include brightness, angle and color temperature, and the endoscope imaging quality improvement method includes: Acquire a target image captured by the target endoscope; Determining an image brightness parameter of the target image; determining an image quality parameter based on the image brightness parameter; When the image quality parameter is not greater than a preset quality parameter value, the illumination regulator is controlled to adjust the illumination of the target endoscope until the target image meets a preset illumination index condition.

2. The method for improving endoscopic imaging quality according to claim 1, characterized in that: The step of determining the image brightness parameter of the target image comprises: Inputting the target image into a spot region segmentation model to perform spot segmentation to obtain various target spot regions and non-spot regions; Obtaining the spot area and the spot centroid of each target spot area; Determine the equivalent centroid of the light spot on the target image based on the light spot area and the light spot area centroid of each target light spot area; Converting the target head portrait into a grayscale image to obtain pixel values ​​of each pixel point in the non-spot area on the target head portrait; Determine the pixel points in the non-spot area whose pixel values ​​are not higher than the preset pixel value as dark pixel points to obtain each dark pixel area, and determine the pixel points in the non-spot area whose pixel values ​​are higher than the preset pixel value as normal pixel points to obtain each normal pixel area; Determine the equivalent centroid of the normal area on the target image based on the area and the centroid of each normal pixel area; Determine the dark area equivalent centroid on the target image based on the area and the centroid of each of the dark pixel areas; Determine the brightness distribution uniformity parameter based on the coordinates of the light spot equivalent centroid, the normal area equivalent centroid, and the dark area equivalent centroid; The image brightness parameter is determined based on the brightness distribution uniformity parameter.

3. The method for improving endoscopic imaging quality according to claim 2, characterized in that: The determining the image brightness parameter based on the brightness distribution uniformity parameter comprises: Calculate a first pixel average value of the non-spot area on the R channel of the target image and a second pixel average value of the target spot area; determining a brightness coefficient based on the first pixel average and the second pixel average; Acquire the total number of grids of the adjustment grid passed by the edge of the target light spot area on the target image, the total number of grids of the adjustment grid occupied by the target light spot area on the target image, the total image area of ​​the target image, and the total light spot area of ​​the target light spot area; Determine a spot area parameter based on the total number of passed grids, the total number of occupied grids, the total image area, and the total spot area; The image brightness parameter is determined based on the brightness distribution uniformity parameter, the brightness coefficient, and the light spot area parameter.

4. The method for improving endoscopic imaging quality according to claim 3, characterized in that: The determining of the image quality parameter based on the image brightness parameter comprises: Inputting the target image into a clear area segmentation model for segmentation to obtain a clear area and a fuzzy area; Obtaining the area and centroid of each fuzzy area; Determine the fuzzy area positioning parameters based on the area and the centroid of each fuzzy area, and the height and width of the target image; Determine a sharpness quantization parameter based on the blur area positioning parameter; An image quality parameter is determined based on the image brightness parameter and the sharpness quantization parameter.

5. The method for improving endoscopic imaging quality according to claim 4, characterized in that: The determining of the sharpness quantization parameter based on the blurry area positioning parameter comprises: Calculate the image entropy of the blurred area of ​​each blurred area and the image entropy of the clear area of ​​the clear area; Calculate the fuzzy area texture quantization value of each fuzzy area and the clear area texture quantization value of the clear area; Inputting the target image into a landmark recognition model to obtain a landmark region on the target image; Determining a fuzzy region amplification coefficient based on an overlapping region parameter between the marker region and the fuzzy region; Determine the fuzzy area coefficient of each fuzzy area based on the fuzzy area image entropy of each fuzzy area, the clear area image entropy of the clear area, the fuzzy area texture quantization value of each fuzzy area, the clear area texture quantization value of the clear area and the fuzzy area amplification coefficient; The sharpness quantization parameter is determined based on the maximum value of blur area coefficients of each blur area and the blur area positioning parameter.

6. The method for improving endoscopic imaging quality according to claim 5, characterized in that: The preset illumination index condition includes that the sum of the spot area ratio of the target spot area, the brightness distribution uniformity parameter and the blur area ratio of the blur area is not greater than the preset parameter, and the controlling of the illumination regulator to adjust the illumination of the target endoscope until the target image meets the preset illumination index condition includes: Acquire the brightness level of the target light spot area; when the brightness level of the light spot area is not higher than a preset brightness level, control the adjustment grid through which the edge of the target light spot area passes to rotate; when the brightness level of the light spot area is higher than the preset brightness level, control the outer expansion grid to rotate, wherein the outer expansion grid surrounds the target light spot area and is adjacent to the adjustment grid through which the edge of the target light spot area passes; The current color temperature parameter and the current brightness parameter of the adjustment grid are adjusted.

7. The method for improving endoscopic imaging quality according to claim 6, characterized in that: The method for improving endoscopic imaging quality comprises: Acquire a first target image before controlling the illumination regulator to adjust the illumination of the target endoscope and a second target image after controlling the illumination regulator to adjust the illumination of the target endoscope; Inputting the first target image and the second target image into the marker recognition model to obtain a first marker detection frame and a second marker detection frame; Correcting the first target image based on the second marker detection frame to obtain the first target image and the corresponding second marker detection frame; The landmark recognition model is trained based on the first target image and the corresponding second landmark detection frame.

8. An endoscope imaging quality improvement device, characterized in that: Applied to an endoscope imaging quality improvement system, the endoscope adjustment system includes a target endoscope and a light adjuster, the light adjuster includes a plurality of rotatable adjustment grids, the adjustment grids are used to adjust the illumination parameters of the light passing through the adjustment grids to change the illumination environment when the target endoscope takes an image, the illumination parameters include brightness, angle and color temperature, the endoscope imaging quality improvement device includes: An acquisition unit, used for acquiring a target image taken by the target endoscope; A brightness evaluation unit, used to determine image brightness parameters of the target image; a clarity evaluation unit, configured to determine an image quality parameter based on the image brightness parameter; The adjustment unit is used to control the illumination adjuster to adjust the illumination of the target endoscope until the target image meets the preset illumination index condition when the image quality parameter is not greater than the preset quality parameter value.

9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the steps in the method for improving endoscopic imaging quality according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the method for improving endoscopic imaging quality according to any one of claims 1 to 7.

Citation Information

Cited By

  • Endoscope image imaging method and endoscope

    CN120510211A