Fluorescence image brightness smoothing control method and system based on endoscope system

By using HSV spatial conversion and frame sight gamma brightness optimization algorithm in the endoscopic system, the brightness smoothing processing of the endoscopic image is solved, and the problem of insufficient brightness adjustment in the prior art is improved, and image quality and usability are improved.

CN118229573BActive Publication Date: 2024-12-13SCIVITA MEDICAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410431524.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-11
Publication Date
2024-12-13
Estimated Expiration
2044-04-11

AI Technical Summary

Technical Problem

In the prior art, the brightness adjustment of the endoscope image is not accurate enough, resulting in a decrease in image quality and usability.

Method used

The endoscopic image brightness smoothing control method is adopted based on the endoscopic system, and the endoscopic image frame is smoothed through the HSV spatial conversion algorithm and the sight frame gamma brightness optimization algorithm, and the endoscopic image frame is adjusted based on the image brightness evaluation results to ensure brightness Comply with the multivariate image brightness constraint interval.

Benefits of technology

It improves the quality of the endoscope image, solves the problem of insufficient brightness adjustment, improves the brightness uniformity and contrast of the image, and enhances the usability of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118229573B_ABST
    Figure CN118229573B_ABST
Patent Text Reader

Abstract

The present invention discloses a fluorescence image brightness smoothing control method and system based on an endoscope system, and relates to the field of image processing technology. The method comprises: reading endoscope image data; extracting the mth endoscope image frame; image conversion, obtaining the mth converted endoscope image frame; image brightness smoothing processing, generating the mth brightness optimized endoscope image frame; image brightness evaluation, obtaining the mth image brightness evaluation result; judging whether the multivariate image brightness constraint interval is satisfied; if satisfied, adding the mth brightness optimized endoscope image frame to the optimized endoscope image data; if not satisfied, adjusting the brightness of the mth brightness optimized endoscope image frame, generating the mth brightness adjusted endoscope image frame, and adding the mth brightness adjusted endoscope image frame to the optimized endoscope image data. The technical problem that the brightness adjustment of the endoscope image is not accurate enough in the prior art, resulting in reduced image quality, is solved, and the technical effect of improving the quality of the endoscope image is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for smoothing brightness of a fluorescent image based on an endoscope system. Background Art

[0002] An endoscope is a medical device that plays an important role in medical diagnosis and treatment. It provides doctors with real-time visualization information of internal organs and tissue structures by introducing a flexible or rigid endoscope into the human body. However, due to the complexity and limitations of the human body's internal environment, endoscopic images are often affected by problems such as insufficient light, shadows, and blur, which reduce the quality and usability of the image, thereby affecting clinical diagnosis and treatment effects. In order to overcome these problems, endoscopic images are usually processed, including image enhancement, denoising, and brightness adjustment. In the prior art, the brightness adjustment of endoscopic images is often not accurate enough, resulting in reduced image quality and usability. Summary of the invention

[0003] The embodiments of the present application provide a method and system for smoothing the brightness of a fluorescent image based on an endoscope system, which solves the technical problem in the prior art that the brightness adjustment of an endoscope image is not precise enough, resulting in reduced image quality.

[0004] In view of the above problems, an embodiment of the present application provides a method and system for smoothing the brightness of a fluorescent image based on an endoscope system.

[0005] A first aspect of an embodiment of the present application provides a method for smoothing brightness of a fluorescent image based on an endoscope system, the method comprising:

[0006] connecting to an endoscope system and reading endoscope image data, wherein the endoscope image data includes a plurality of endoscope image frames;

[0007] Extracting an mth endoscopic image frame according to the plurality of endoscopic image frames, wherein m is a positive integer, m belongs to M, and M is the total number of the plurality of endoscopic image frames;

[0008] Performing image conversion on the mth endoscopic image frame according to an HSV space conversion algorithm to obtain an mth converted endoscopic image frame;

[0009] Performing image brightness smoothing processing on the mth converted endoscopic image frame according to an aiming frame gamma brightness optimization algorithm to generate an mth brightness optimized endoscopic image frame;

[0010] Performing image brightness evaluation based on the mth brightness optimized endoscopic image frame to obtain an mth image brightness evaluation result;

[0011] Determining whether the m-th image brightness evaluation result satisfies the multivariate image brightness constraint interval;

[0012] If the m-th image brightness evaluation result satisfies the multivariate image brightness constraint interval, adding the m-th brightness optimized endoscopic image frame to the optimized endoscopic image data;

[0013] If the m-th image brightness evaluation result does not satisfy the multivariate image brightness constraint interval, generate the m-th image brightness abnormality feature data, adjust the brightness of the m-th brightness optimized endoscopic image frame according to the m-th image brightness abnormality feature data, generate the m-th brightness adjusted endoscopic image frame, and add the m-th brightness adjusted endoscopic image frame to the optimized endoscopic image data.

[0014] A second aspect of an embodiment of the present application provides a fluorescence image brightness smoothing control system based on an endoscope system, the system comprising:

[0015] A data acquisition module, the data acquisition module is used to connect to the endoscope system and read the endoscope image data, wherein the endoscope image data includes a plurality of endoscope image frames;

[0016] An image frame extraction module, the image frame extraction module is used to extract an mth endoscopic image frame according to the plurality of endoscopic image frames, wherein m is a positive integer, m belongs to M, and M is the total number of the plurality of endoscopic image frames;

[0017] An image conversion module, the image conversion module is used to perform image conversion on the mth endoscopic image frame according to an HSV space conversion algorithm to obtain an mth converted endoscopic image frame;

[0018] An image processing module, the image processing module being used to perform image brightness smoothing processing on the mth converted endoscopic image frame according to an aiming frame gamma brightness optimization algorithm to generate an mth brightness optimized endoscopic image frame;

[0019] a brightness evaluation module, the brightness evaluation module being used to perform image brightness evaluation based on the mth brightness optimized endoscopic image frame to obtain an mth image brightness evaluation result;

[0020] A judgment module, the judgment module is used to judge whether the brightness evaluation result of the m-th image satisfies the multivariate image brightness constraint interval;

[0021] An image frame adding module, wherein the image frame adding module is used to add the mth brightness optimized endoscopic image frame to the optimized endoscopic image data if the mth image brightness evaluation result satisfies the multivariate image brightness constraint interval;

[0022] An adjustment module is used to generate an mth image brightness abnormality feature data if the mth image brightness evaluation result does not meet the multivariate image brightness constraint interval, adjust the brightness of the mth brightness optimized endoscopic image frame according to the mth image brightness abnormality feature data, generate an mth brightness adjusted endoscopic image frame, and add the mth brightness adjusted endoscopic image frame to the optimized endoscopic image data.

[0023] One or more technical solutions provided in this application have at least the following technical effects or advantages:

[0024] By connecting to an endoscope system, endoscopic image data can be read, including multiple endoscopic image frames. Then, the mth endoscopic image frame is extracted, where m is a positive integer, m belongs to M, and M is the total number of the multiple endoscopic image frames. The mth endoscopic image frame is subjected to HSV space conversion to obtain the mth converted endoscopic image frame. The mth converted endoscopic image frame is subjected to image brightness smoothing processing according to the aiming frame gamma brightness optimization algorithm to generate the mth brightness optimized endoscopic image frame. Image brightness evaluation is performed based on the mth brightness optimized endoscopic image frame to obtain the mth image brightness evaluation result. It is determined whether the m-th image brightness evaluation result satisfies the multivariate image brightness constraint interval. If the m-th image brightness evaluation result satisfies the multivariate image brightness constraint interval, the m-th brightness optimized endoscopic image frame is added to the optimized endoscopic image data; if the m-th image brightness evaluation result does not satisfy the multivariate image brightness constraint interval, the m-th image brightness abnormality feature data is generated, the brightness of the m-th brightness optimized endoscopic image frame is adjusted according to the m-th image brightness abnormality feature data, the m-th brightness adjusted endoscopic image frame is generated, and the m-th brightness adjusted endoscopic image frame is added to the optimized endoscopic image data. The technical problem of insufficiently accurate endoscopic image brightness adjustment in the prior art leading to reduced image quality is solved, and the technical effect of improving endoscopic image quality is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0026] Figure 1 A schematic diagram of a flow chart of a fluorescence image brightness smoothing control method based on an endoscope system provided in an embodiment of the present application;

[0027] Figure 2 A schematic diagram of the structure of a fluorescence image brightness smoothing control system based on an endoscope system provided in an embodiment of the present application.

[0028] Explanation of the reference numerals: data acquisition module 11 , image frame extraction module 12 , image conversion module 13 , image processing module 14 , brightness evaluation module 15 , judgment module 16 , image frame adding module 17 , adjustment module 18 . DETAILED DESCRIPTION

[0029] The embodiments of the present application solve the technical problem in the prior art that the brightness adjustment of endoscope images is not accurate enough, resulting in reduced image quality, by providing a method and system for smoothing the brightness of fluorescent images based on an endoscope system.

[0030] 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, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0031] It should be noted that the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or modules that are not explicitly listed or are inherent to these processes, methods, products or devices.

[0032] Embodiment 1

[0033] like Figure 1 As shown, the embodiment of the present application provides a method for smoothing brightness of a fluorescent image based on an endoscope system, wherein the method comprises:

[0034] connecting to an endoscope system and reading endoscope image data, wherein the endoscope image data includes a plurality of endoscope image frames;

[0035] The endoscope system includes an image acquisition device such as a high-definition camera, and the endoscope captures images within the field of view. By connecting to the endoscope system, the endoscope image data is read, and the endoscope image data includes multiple endoscope image frames.

[0036] Extracting an mth endoscopic image frame according to the plurality of endoscopic image frames, wherein m is a positive integer, m belongs to M, and M is the total number of the plurality of endoscopic image frames;

[0037] An m-th endoscopic image frame is extracted from a plurality of endoscopic image frames, where m is a positive integer, belongs to M, and M is the total number of the plurality of endoscopic image frames.

[0038] Performing image conversion on the mth endoscopic image frame according to an HSV space conversion algorithm to obtain an mth converted endoscopic image frame;

[0039] The HSV space conversion algorithm is a color space conversion method commonly used in image processing, and is particularly suitable for processing color-related tasks. In endoscopic image processing, HSV conversion can better separate and process the brightness, hue, and saturation information of the image, especially when the brightness needs to be optimized. The mth endoscopic image frame is converted using the HSV space conversion algorithm to obtain the mth converted endoscopic image frame. The mth converted endoscopic image frame may have been optimized in terms of brightness, hue, or saturation, and is more suitable for image analysis or display.

[0040] Furthermore, performing image conversion on the mth endoscopic image frame according to the HSV space conversion algorithm to obtain the mth converted endoscopic image frame includes:

[0041] Reading the RGB channel value of each pixel in the mth endoscopic image frame to generate a pixel RGB data set;

[0042] Performing RGB normalization processing on the pixel RGB data set to obtain a normalized pixel RGB set;

[0043] Performing RGB maximum value analysis on each pixel based on the normalized pixel RGB set to obtain a pixel RGB maximum value feature set;

[0044] Perform hue calculation based on the pixel RGB maximum value feature set to generate a pixel hue feature data set;

[0045] Perform saturation calculation based on the pixel RGB maximum value feature set to generate a pixel saturation feature data set;

[0046] Perform brightness calculation based on the pixel RGB maximum value feature set to generate a pixel brightness feature data set;

[0047] An HSV space model is constructed based on the pixel hue feature data set, the pixel saturation feature data set and the pixel brightness feature data set to generate the mth converted endoscopic image frame.

[0048] The RGB channel value of each pixel is read from the mth endoscopic image frame to generate a pixel RGB data set. The RGB channel value represents the intensity of the three colors of red, green, and blue for each pixel in the image and is the basic data for image processing. The channel values ​​in the pixel RGB data set are normalized to the range of [0,1]. Since the typical range of RGB values ​​is [0,255], the value of each channel is divided by 255 to obtain the normalized pixel RGB set. For the normalized pixel RGB set, the maximum value analysis is performed, that is, the maximum value (Max) and the minimum value (Min) of each pixel RGB value are found, so as to obtain the pixel RGB maximum value feature set.

[0049] Based on the pixel RGB maximum value feature set, the hue value of each pixel is calculated to generate a pixel hue feature data set. Hue is an important parameter in the HSV color space, which describes the type of color, such as red, green, blue, etc.

[0050] Specifically, if Max is equal to Min, the hue H is 0, indicating no color.

[0051] If Max is the red channel value (R), the calculation of hue depends on the values ​​of G and B. If G is greater than or equal to B, then H = 60*((GB) / (Max-Min)); if G is less than B, then H = 60*((GB) / (Max-Min))+360. If Max is the green channel value (G), then H = 60*((BR) / (Max-Min))+120. If Max is the blue channel value (B), then H = 60*((RG) / (Max-Min))+240. Finally, multiply the calculated hue value by 60 to ensure that it is within the range of 0 to 360 degrees. Also based on the pixel RGB maximum value feature set, calculate the saturation value of each pixel to generate a pixel saturation feature data set. Saturation indicates the purity or vividness of the color. The higher the value, the brighter the color; the lower the value, the closer the color is to gray. If Max is equal to 0 (that is, all channels are 0), the saturation S is 0, indicating that the color is gray. Otherwise, saturation S = (Max-Min) / Max. Brightness calculation is performed based on the pixel RGB maximum value feature set to generate a pixel brightness feature data set. Brightness is another key parameter in the HSV color space, which describes the brightness of the color. Brightness is equal to the normalized Max value. Through the above steps, the hue, saturation, and brightness values ​​of each RGB pixel can be calculated, thereby completing the conversion from RGB image to HSV space. Finally, based on the calculated pixel hue feature data set, pixel saturation feature data set, and pixel brightness feature data set, an HSV space model is constructed. The HSV space model converts the original RGB image into a representation of the HSV color space, that is, the mth converted endoscopic image frame.

[0052] Performing image brightness smoothing processing on the mth converted endoscopic image frame according to an aiming frame gamma brightness optimization algorithm to generate an mth brightness optimized endoscopic image frame;

[0053] The aiming frame gamma brightness optimization algorithm is an algorithm specifically used to adjust and optimize image brightness, and is particularly suitable for scenes such as endoscopic images that require fine brightness control. The aiming frame gamma brightness optimization algorithm is used to perform image brightness smoothing on the mth converted endoscopic image frame to generate the mth brightness optimized endoscopic image frame, which is an image frame with brightness adjusted.

[0054] Further, the image brightness smoothing process is performed on the mth converted endoscopic image frame according to the aiming frame gamma brightness optimization algorithm to generate the mth brightness optimized endoscopic image frame, including

[0055] Perform brightness maximum screening according to the mth converted endoscopic image frame to obtain a first brightness maximum;

[0056] Dividing the mth converted endoscopic image frame according to a preset aiming frame to obtain a plurality of aiming frame images;

[0057] Based on the first brightness maximum value, according to the gamma feature analysis model and the gamma brightness optimization feature function, respectively optimize the image brightness of the multiple aiming frame images to generate multiple optimized aiming frame images;

[0058] Fusion is performed according to the multiple optimized aiming frame images to generate a fused aiming frame image;

[0059] RGB restoration is performed according to the fused aiming frame image to generate the mth brightness optimized endoscopic image frame.

[0060] The mth converted endoscopic image frame is screened for the maximum brightness value, the brightest and darkest areas in the image are found, and the distribution range of the overall brightness is determined. By calculating or counting the brightness values ​​of all pixels in the image, the maximum and minimum brightness values ​​can be obtained, where the maximum value is the first maximum brightness value. Next, the mth converted endoscopic image frame is divided according to the preset aiming frame. The preset aiming frame is usually determined based on the image size, the position of the target area or other prior knowledge. The aiming frame divides the image into multiple small areas, each of which represents a local part of the image, which is convenient for local brightness optimization processing. For each aiming frame image, the brightness is optimized according to the first brightness maximum value, the gamma feature analysis model and the gamma brightness optimization feature function. The gamma feature analysis model is used to analyze the relationship between brightness and gamma value in the image, and the gamma brightness optimization feature function determines the appropriate gamma value adjustment strategy based on this relationship. By applying different gamma value adjustments to each aiming frame image, fine control of local brightness can be achieved, and multiple optimized aiming frame images can be obtained. After the brightness optimization of all aiming frame images is completed, these optimized aiming frame images are fused to generate a fused aiming frame image. Specifically, multiple optimized aiming frame images are aligned, and a weight value is assigned to each aiming frame image. The weight value can be determined based on factors such as image quality, clarity, and brightness. For example, if a certain aiming frame image has a high contrast and rich details, a higher weight can be assigned to it. The weight is usually normalized between 0 and 1 to ensure that the sum of all weights is 1. For each pixel position in the fused image, the weighted average of the corresponding pixel values ​​of all aiming frame images is calculated, the pixel value of each aiming frame image is multiplied by its corresponding weight, and then all weighted pixel values ​​are added and divided by the sum of the weights. Through the fusion method based on pixel weighted average, multiple optimized aiming frame images can be fused into a fused aiming frame image. Finally, RGB restoration is performed based on the fused aiming frame image, that is, the optimized image is converted back to the original RGB color space to generate the mth brightness optimized endoscopic image frame.

[0061] Furthermore, based on the first brightness maximum value, according to the gamma feature analysis model and the gamma brightness optimization feature function, the plurality of aiming frame images are respectively optimized for image brightness to generate a plurality of optimized aiming frame images, including:

[0062] Load the pixel hue parameter and pixel saturation parameter corresponding to the first maximum brightness value, and construct a highlight HSV vector in combination with the first maximum brightness value;

[0063] Traversing the multiple aiming frame images and extracting a first aiming frame image;

[0064] Extracting a first pixel and a first pixel brightness parameter corresponding to the first pixel according to the first aiming frame image;

[0065] Loading the pixel hue parameter and the pixel saturation parameter corresponding to the first pixel, and combining them with the first pixel brightness parameter, constructing a first pixel HSV vector;

[0066] Input the highlight HSV vector and the first pixel HSV vector into the gamma feature analysis model to obtain a first gamma feature parameter;

[0067] Based on the first brightness maximum value, the first pixel brightness parameter and the first gamma characteristic parameter, performing brightness optimization according to the gamma brightness optimization characteristic function to generate a first optimized pixel;

[0068] Based on the first optimized pixels, continue to optimize the brightness of each pixel in the first aiming frame image to obtain a first optimized aiming frame image, and add the first optimized aiming frame image to the multiple optimized aiming frame images.

[0069] Load the pixel hue parameter and pixel saturation parameter corresponding to the first brightness maximum value, and construct a highlight HSV vector in combination with the first brightness maximum value. Traverse multiple aiming frame images, extract an aiming frame image, i.e., the first aiming frame image, as the current processing object, extract a pixel in the first aiming frame image as the first pixel, and obtain its corresponding brightness parameter. Load the hue parameter and saturation parameter corresponding to the first pixel, and construct the first pixel HSV vector in combination with the brightness parameter of the first pixel. Input the constructed highlight HSV vector and the first pixel HSV vector into the gamma feature parsing model, and obtain the first gamma feature parameter of the first pixel through the parsing of the model. The first gamma feature parameter describes the gamma relationship or feature between the first pixel and the high brightness reference. Calculate according to the gamma brightness optimization feature function using the first brightness maximum value, the first pixel brightness parameter, and the first gamma feature parameter, and adjust the brightness of the first pixel through this function to generate a first optimized pixel after brightness optimization. Based on the processing method of the first optimized pixel, continue to optimize the brightness of each pixel in the first aiming frame image, and obtain the first optimized aiming frame image after all pixels are brightness optimized. The first optimized aiming frame image is added to a set of multiple optimized aiming frame images for fusion processing.

[0070] Furthermore, the gamma brightness optimization characteristic function is:

[0071]

[0072] Among them, V'(X,Y) represents the optimized pixel brightness parameter, v max represents the maximum brightness value, V(X,Y) represents the pixel brightness parameter, and γ represents the gamma characteristic parameter.

[0073] The optimized pixel brightness parameters are calculated according to the gamma brightness optimization characteristic function and used to adjust the pixel brightness.

[0074] Further, including:

[0075] Loading a gamma feature analysis record set, wherein the gamma feature analysis record set includes a highlight HSV vector record set, a pixel HSV vector record set, and a gamma feature parameter record set;

[0076] Using the highlight HSV vector record set and the pixel HSV vector record set as input data and the gamma feature parameter record set as output supervision data, the machine learning operator is trained, and a gamma feature parsing error coefficient is obtained after each preset number of trainings;

[0077] If the gamma feature analysis error coefficient is less than the gamma feature analysis error threshold, the gamma feature analysis model is generated.

[0078] The gamma feature resolution record set includes the highlight HSV vector record set, the pixel HSV vector record set and the gamma feature parameter record set. The highlight HSV vector record set records the features of the highlight pixels in the HSV color space, the pixel HSV vector record set represents the features of different pixels in the HSV color space, and the gamma feature parameter record set is the gamma feature value obtained by calculating the corresponding pixel HSV vector. The highlight HSV vector record set and the pixel HSV vector record set are used as input data, and the gamma feature parameter record set is used as the output supervision data. The BP neural network is selected as the machine learning operator for training. During the training process, the gamma feature resolution error coefficient is calculated after each preset number of training times. The gamma feature resolution error coefficient can be calculated by comparing the difference between the gamma feature parameters predicted by the operator and the actual gamma feature parameter record set. Check whether the calculated gamma feature resolution error coefficient is less than the preset gamma feature resolution error threshold. If the gamma feature resolution error coefficient is less than the error threshold, it means that the model training has achieved satisfactory accuracy, and the training can be stopped, and the current machine learning operator is saved as the gamma feature resolution model.

[0079] Performing image brightness evaluation based on the mth brightness optimized endoscopic image frame to obtain an mth image brightness evaluation result;

[0080] An image brightness evaluation is performed on the mth brightness optimized endoscopic image frame to obtain an mth image brightness evaluation result, and the mth image brightness evaluation result is used to evaluate whether the image brightness is optimized.

[0081] Further, performing image brightness evaluation based on the mth brightness optimized endoscopic image frame to obtain the mth image brightness evaluation result includes:

[0082] Performing brightness distribution evaluation according to the mth brightness optimized endoscopic image frame to generate an mth image brightness distribution evaluation coefficient;

[0083] Performing brightness uniformity evaluation according to the mth brightness optimized endoscopic image frame to generate an mth image brightness uniformity evaluation coefficient;

[0084] Performing brightness contrast evaluation based on the mth brightness optimized endoscopic image frame to generate an mth image brightness contrast evaluation coefficient;

[0085] The m-th image brightness distribution evaluation coefficient, the m-th image brightness uniformity evaluation coefficient, and the m-th image brightness contrast evaluation coefficient are added to the m-th image brightness evaluation result.

[0086] Reasonable brightness distribution is the basis of image brightness quality. The overall brightness of the image should be moderate, neither too bright nor too dark, to ensure the clear presentation of image information. The distribution of brightness values ​​is obtained from the mth brightness optimized endoscopic image frame, a brightness distribution evaluation function is defined, and the brightness distribution evaluation coefficient of the mth image is calculated. The mth brightness optimized endoscopic image frame is partitioned and the image is divided into multiple regions. For each region, its average brightness value is calculated, and the standard deviation of the brightness values ​​of all regions is calculated to quantify the brightness non-uniformity. A brightness uniformity evaluation function is defined, which calculates an evaluation coefficient based on the standard deviation, namely, the brightness uniformity evaluation coefficient of the mth image. The global contrast of the mth brightness optimized endoscopic image frame is obtained by calculating the average value of the brightness difference between all pixel pairs in the image. According to the results of global contrast and local contrast, a brightness contrast evaluation function is defined, which calculates an evaluation coefficient, namely, the brightness contrast evaluation coefficient of the mth image. The brightness distribution evaluation coefficient of the mth image, the brightness uniformity evaluation coefficient of the mth image, and the brightness contrast evaluation coefficient of the mth image are added to the brightness evaluation result of the mth image as an important part of the brightness evaluation of the image frame.

[0087] Determining whether the m-th image brightness evaluation result satisfies the multivariate image brightness constraint interval;

[0088] The multi-image brightness constraint interval includes brightness distribution, brightness uniformity, and brightness contrast. It is determined whether the brightness evaluation result of the m-th image satisfies the multi-image brightness constraint interval. If any one of them is not satisfied, it is considered that the brightness evaluation result of the m-th image does not satisfy the multi-image brightness constraint interval.

[0089] If the m-th image brightness evaluation result satisfies the multivariate image brightness constraint interval, adding the m-th brightness optimized endoscopic image frame to the optimized endoscopic image data;

[0090] If the mth image brightness evaluation result satisfies the multivariate image brightness constraint interval, it means that the image frame has reached the preset quality standards in terms of brightness distribution, brightness uniformity and brightness contrast. The image frame can be regarded as an optimized high-quality image and added to the optimized endoscopic image data.

[0091] If the m-th image brightness evaluation result does not satisfy the multivariate image brightness constraint interval, generate the m-th image brightness abnormality feature data, adjust the brightness of the m-th brightness optimized endoscopic image frame according to the m-th image brightness abnormality feature data, generate the m-th brightness adjusted endoscopic image frame, and add the m-th brightness adjusted endoscopic image frame to the optimized endoscopic image data.

[0092] If the m-th image brightness evaluation result does not meet the multivariate image brightness constraint interval, the m-th image brightness evaluation result is analyzed to determine the specific aspects that do not meet the constraint interval, such as uneven brightness distribution, too low or too high brightness, insufficient contrast, etc. Based on these analysis results, feature data related to brightness abnormality is extracted, and based on the m-th image brightness abnormality feature data, a brightness adjustment strategy is formulated including adjusting global brightness, enhancing or weakening local brightness, improving contrast, etc. The m-th brightness optimized endoscopic image frame is brightness adjusted to generate the m-th brightness adjusted endoscopic image frame, and the m-th brightness adjusted endoscopic image frame is added to the optimized endoscopic image data.

[0093] In summary, the embodiments of the present application have at least the following technical effects:

[0094] By connecting to an endoscope system, endoscopic image data can be read, including multiple endoscopic image frames. Then, the mth endoscopic image frame is extracted, where m is a positive integer, m belongs to M, and M is the total number of the multiple endoscopic image frames. The mth endoscopic image frame is subjected to HSV space conversion to obtain the mth converted endoscopic image frame. The mth converted endoscopic image frame is subjected to image brightness smoothing processing according to the aiming frame gamma brightness optimization algorithm to generate the mth brightness optimized endoscopic image frame. Image brightness evaluation is performed based on the mth brightness optimized endoscopic image frame to obtain the mth image brightness evaluation result. It is determined whether the m-th image brightness evaluation result satisfies the multivariate image brightness constraint interval. If the m-th image brightness evaluation result satisfies the multivariate image brightness constraint interval, the m-th brightness optimized endoscopic image frame is added to the optimized endoscopic image data; if the m-th image brightness evaluation result does not satisfy the multivariate image brightness constraint interval, the m-th image brightness abnormality feature data is generated, the brightness of the m-th brightness optimized endoscopic image frame is adjusted according to the m-th image brightness abnormality feature data, the m-th brightness adjusted endoscopic image frame is generated, and the m-th brightness adjusted endoscopic image frame is added to the optimized endoscopic image data. The technical problem of insufficiently accurate endoscopic image brightness adjustment in the prior art leading to reduced image quality is solved, and the technical effect of improving endoscopic image quality is achieved.

[0095] Embodiment 2

[0096] Based on the same inventive concept as the fluorescent image brightness smoothing control method based on the endoscope system in the aforementioned embodiment, Figure 2 As shown, the present application provides a fluorescence image brightness smoothing control system based on an endoscope system, and the system and method embodiments in the present application embodiments are based on the same inventive concept. The system includes:

[0097] A data acquisition module 11, the data acquisition module 11 is used to connect to the endoscope system and read the endoscope image data, wherein the endoscope image data includes a plurality of endoscope image frames;

[0098] An image frame extraction module 12, the image frame extraction module 12 is used to extract an mth endoscopic image frame according to the plurality of endoscopic image frames, wherein m is a positive integer, m belongs to M, and M is the total number of the plurality of endoscopic image frames;

[0099] An image conversion module 13, the image conversion module 13 is used to perform image conversion on the mth endoscopic image frame according to an HSV space conversion algorithm to obtain an mth converted endoscopic image frame;

[0100] An image processing module 14, the image processing module 14 is used to perform image brightness smoothing processing on the mth converted endoscopic image frame according to an aiming frame gamma brightness optimization algorithm to generate an mth brightness optimized endoscopic image frame;

[0101] A brightness evaluation module 15, wherein the brightness evaluation module 15 is used to perform image brightness evaluation based on the m-th brightness optimized endoscopic image frame to obtain an m-th image brightness evaluation result;

[0102] A judgment module 16, the judgment module 16 is used to judge whether the brightness evaluation result of the m-th image satisfies the multivariate image brightness constraint interval;

[0103] An image frame adding module 17, wherein the image frame adding module 17 is used to add the mth brightness optimized endoscopic image frame to the optimized endoscopic image data if the mth image brightness evaluation result satisfies the multivariate image brightness constraint interval;

[0104] An adjustment module 18 is used to generate an mth image brightness abnormality feature data if the mth image brightness evaluation result does not satisfy the multivariate image brightness constraint interval, perform brightness adjustment on the mth brightness optimized endoscopic image frame according to the mth image brightness abnormality feature data, generate an mth brightness adjusted endoscopic image frame, and add the mth brightness adjusted endoscopic image frame to the optimized endoscopic image data.

[0105] Furthermore, the image conversion module 13 is used to perform the following method:

[0106] Reading the RGB channel value of each pixel in the mth endoscopic image frame to generate a pixel RGB data set;

[0107] Performing RGB normalization processing on the pixel RGB data set to obtain a normalized pixel RGB set;

[0108] Performing RGB maximum value analysis on each pixel based on the normalized pixel RGB set to obtain a pixel RGB maximum value feature set;

[0109] Perform hue calculation based on the pixel RGB maximum value feature set to generate a pixel hue feature data set;

[0110] Perform saturation calculation based on the pixel RGB maximum value feature set to generate a pixel saturation feature data set;

[0111] Perform brightness calculation based on the pixel RGB maximum value feature set to generate a pixel brightness feature data set;

[0112] An HSV space model is constructed based on the pixel hue feature data set, the pixel saturation feature data set and the pixel brightness feature data set to generate the mth converted endoscopic image frame.

[0113] Furthermore, the image processing module 14 is used to perform the following method:

[0114] Perform brightness maximum screening according to the mth converted endoscopic image frame to obtain a first brightness maximum;

[0115] Dividing the mth converted endoscopic image frame according to a preset aiming frame to obtain a plurality of aiming frame images;

[0116] Based on the first brightness maximum value, according to the gamma feature analysis model and the gamma brightness optimization feature function, respectively optimize the image brightness of the multiple aiming frame images to generate multiple optimized aiming frame images;

[0117] Fusion is performed according to the multiple optimized aiming frame images to generate a fused aiming frame image;

[0118] RGB restoration is performed according to the fused aiming frame image to generate the mth brightness optimized endoscopic image frame.

[0119] Furthermore, the image processing module 14 is used to perform the following method:

[0120] Load the pixel hue parameter and pixel saturation parameter corresponding to the first maximum brightness value, and construct a highlight HSV vector in combination with the first maximum brightness value;

[0121] Traversing the multiple aiming frame images and extracting a first aiming frame image;

[0122] Extracting a first pixel and a first pixel brightness parameter corresponding to the first pixel according to the first aiming frame image;

[0123] Loading the pixel hue parameter and the pixel saturation parameter corresponding to the first pixel, and combining them with the first pixel brightness parameter, constructing a first pixel HSV vector;

[0124] Input the highlight HSV vector and the first pixel HSV vector into the gamma feature analysis model to obtain a first gamma feature parameter;

[0125] Based on the first brightness maximum value, the first pixel brightness parameter and the first gamma characteristic parameter, performing brightness optimization according to the gamma brightness optimization characteristic function to generate a first optimized pixel;

[0126] Based on the first optimized pixels, continue to optimize the brightness of each pixel in the first aiming frame image to obtain a first optimized aiming frame image, and add the first optimized aiming frame image to the multiple optimized aiming frame images.

[0127] Furthermore, the image processing module 14 is used to perform the following method:

[0128] The gamma brightness optimization characteristic function is:

[0129]

[0130] Among them, V'(X,Y) represents the optimized pixel brightness parameter, v max represents the maximum brightness value, V(X,Y) represents the pixel brightness parameter, and γ represents the gamma characteristic parameter.

[0131] Furthermore, the image processing module 14 is used to perform the following method:

[0132] Loading a gamma feature analysis record set, wherein the gamma feature analysis record set includes a highlight HSV vector record set, a pixel HSV vector record set, and a gamma feature parameter record set;

[0133] Using the highlight HSV vector record set and the pixel HSV vector record set as input data and the gamma feature parameter record set as output supervision data, the machine learning operator is trained, and a gamma feature parsing error coefficient is obtained after each preset number of trainings;

[0134] If the gamma feature analysis error coefficient is less than the gamma feature analysis error threshold, the gamma feature analysis model is generated.

[0135] Furthermore, the brightness evaluation module 15 is used to perform the following method:

[0136] Performing brightness distribution evaluation according to the mth brightness optimized endoscopic image frame to generate an mth image brightness distribution evaluation coefficient;

[0137] Performing brightness uniformity evaluation according to the mth brightness optimized endoscopic image frame to generate an mth image brightness uniformity evaluation coefficient;

[0138] Performing brightness contrast evaluation based on the mth brightness optimized endoscopic image frame to generate an mth image brightness contrast evaluation coefficient;

[0139] The m-th image brightness distribution evaluation coefficient, the m-th image brightness uniformity evaluation coefficient, and the m-th image brightness contrast evaluation coefficient are added to the m-th image brightness evaluation result.

[0140] It should be noted that the above-mentioned sequence of the embodiments of the present application is only for description and does not represent the advantages and disadvantages of the embodiments. And the above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0141] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

[0142] This specification and drawings are merely exemplary illustrations of the present application and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, a person skilled in the art may make various modifications and variations to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present application and its equivalents, the present application intends to include these modifications and variations.

Claims

1. Fluorescence image brightness smoothing control method based on endoscope system, It is characterized in that The method comprises: connecting to an endoscope system and reading endoscope image data, wherein the endoscope image data includes a plurality of endoscope image frames; Extracting an mth endoscopic image frame according to the plurality of endoscopic image frames, wherein m is a positive integer, m belongs to M, and M is the total number of the plurality of endoscopic image frames; Performing image conversion on the mth endoscopic image frame according to an HSV space conversion algorithm to obtain an mth converted endoscopic image frame; Performing image brightness smoothing processing on the mth converted endoscopic image frame according to an aiming frame gamma brightness optimization algorithm to generate an mth brightness optimized endoscopic image frame; Performing image brightness evaluation based on the mth brightness optimized endoscopic image frame to obtain an mth image brightness evaluation result; Determining whether the m-th image brightness evaluation result satisfies the multivariate image brightness constraint interval; If the m-th image brightness evaluation result satisfies the multivariate image brightness constraint interval, adding the m-th brightness optimized endoscopic image frame to the optimized endoscopic image data; If the m-th image brightness evaluation result does not satisfy the multivariate image brightness constraint interval, generating m-th image brightness abnormality feature data, performing brightness adjustment on the m-th brightness optimized endoscopic image frame according to the m-th image brightness abnormality feature data, generating an m-th brightness adjusted endoscopic image frame, and adding the m-th brightness adjusted endoscopic image frame to the optimized endoscopic image data; The mth converted endoscopic image frame is subjected to image brightness smoothing processing according to the aiming frame gamma brightness optimization algorithm to generate the mth brightness optimized endoscopic image frame, including Perform brightness maximum screening according to the mth converted endoscopic image frame to obtain a first brightness maximum; Dividing the mth converted endoscopic image frame according to a preset aiming frame to obtain a plurality of aiming frame images; Based on the first brightness maximum value, according to the gamma feature analysis model and the gamma brightness optimization feature function, respectively optimize the image brightness of the multiple aiming frame images to generate multiple optimized aiming frame images; Fusion is performed according to the multiple optimized aiming frame images to generate a fused aiming frame image; RGB restoration is performed according to the fused aiming frame image to generate the mth brightness optimized endoscopic image frame.

2. The method according to claim 1, It is characterized in that Performing image conversion on the mth endoscopic image frame according to the HSV space conversion algorithm to obtain the mth converted endoscopic image frame includes: Reading the RGB channel value of each pixel in the mth endoscopic image frame to generate a pixel RGB data set; Performing RGB normalization processing on the pixel RGB data set to obtain a normalized pixel RGB set; Performing RGB maximum value analysis on each pixel based on the normalized pixel RGB set to obtain a pixel RGB maximum value feature set; Perform hue calculation based on the pixel RGB maximum value feature set to generate a pixel hue feature data set; Perform saturation calculation based on the pixel RGB maximum value feature set to generate a pixel saturation feature data set; Perform brightness calculation based on the pixel RGB maximum value feature set to generate a pixel brightness feature data set; An HSV space model is constructed based on the pixel hue feature data set, the pixel saturation feature data set and the pixel brightness feature data set to generate the mth converted endoscopic image frame.

3. The method according to claim 1, It is characterized in that Based on the first brightness maximum value, according to the gamma feature analysis model and the gamma brightness optimization feature function, the plurality of aiming frame images are respectively optimized for image brightness to generate a plurality of optimized aiming frame images, including: Load the pixel hue parameter and pixel saturation parameter corresponding to the first maximum brightness value, and construct a highlight HSV vector in combination with the first maximum brightness value; Traversing the multiple aiming frame images, and extracting a first aiming frame image; Extracting a first pixel and a first pixel brightness parameter corresponding to the first pixel according to the first aiming frame image; Loading the pixel hue parameter and the pixel saturation parameter corresponding to the first pixel, and combining them with the first pixel brightness parameter, constructing a first pixel HSV vector; Input the highlight HSV vector and the first pixel HSV vector into the gamma feature analysis model to obtain a first gamma feature parameter; Based on the first brightness maximum value, the first pixel brightness parameter and the first gamma characteristic parameter, performing brightness optimization according to the gamma brightness optimization characteristic function to generate a first optimized pixel; Based on the first optimized pixels, continue to optimize the brightness of each pixel in the first aiming frame image to obtain a first optimized aiming frame image, and add the first optimized aiming frame image to the multiple optimized aiming frame images.

4. The method according to claim 1, It is characterized in that The gamma brightness optimization characteristic function is: Among them, V ′ (X,Y) represents the optimized pixel brightness parameter, v max represents the maximum brightness value, V(X,Y) represents the pixel brightness parameter, and γ represents the gamma characteristic parameter.

5. The method according to claim 1, It is characterized in that The method comprises: Loading a gamma feature analysis record set, wherein the gamma feature analysis record set includes a highlight HSV vector record set, a pixel HSV vector record set, and a gamma feature parameter record set; Using the highlight HSV vector record set and the pixel HSV vector record set as input data and the gamma feature parameter record set as output supervision data, the machine learning operator is trained, and a gamma feature parsing error coefficient is obtained after each preset number of trainings; If the gamma feature analysis error coefficient is less than the gamma feature analysis error threshold, the gamma feature analysis model is generated.

6. The method according to claim 1, It is characterized in that Performing image brightness evaluation based on the mth brightness optimized endoscopic image frame to obtain the mth image brightness evaluation result includes: Performing brightness distribution evaluation according to the mth brightness optimized endoscopic image frame to generate an mth image brightness distribution evaluation coefficient; Performing brightness uniformity evaluation according to the mth brightness optimized endoscopic image frame to generate an mth image brightness uniformity evaluation coefficient; Performing brightness contrast evaluation based on the mth brightness optimized endoscopic image frame to generate an mth image brightness contrast evaluation coefficient; The m-th image brightness distribution evaluation coefficient, the m-th image brightness uniformity evaluation coefficient, and the m-th image brightness contrast evaluation coefficient are added to the m-th image brightness evaluation result.

7. Fluorescence image brightness smoothing control system based on endoscope system, It is characterized in that The method for smoothing the brightness of a fluorescent image based on an endoscope system according to any one of claims 1 to 6 is used to implement the method, the system comprising: A data acquisition module, the data acquisition module is used to connect to the endoscope system and read the endoscope image data, wherein the endoscope image data includes a plurality of endoscope image frames; An image frame extraction module, the image frame extraction module is used to extract an mth endoscopic image frame according to the plurality of endoscopic image frames, wherein m is a positive integer, m belongs to M, and M is the total number of the plurality of endoscopic image frames; An image conversion module, the image conversion module is used to perform image conversion on the mth endoscopic image frame according to an HSV space conversion algorithm to obtain an mth converted endoscopic image frame; An image processing module, the image processing module being used to perform image brightness smoothing processing on the mth converted endoscopic image frame according to an aiming frame gamma brightness optimization algorithm to generate an mth brightness optimized endoscopic image frame; a brightness evaluation module, the brightness evaluation module being used to perform image brightness evaluation based on the mth brightness optimized endoscopic image frame to obtain an mth image brightness evaluation result; A judgment module, the judgment module is used to judge whether the brightness evaluation result of the m-th image satisfies the multivariate image brightness constraint interval; An image frame adding module, wherein the image frame adding module is used to add the mth brightness optimized endoscopic image frame to the optimized endoscopic image data if the mth image brightness evaluation result satisfies the multivariate image brightness constraint interval; An adjustment module is used to generate an mth image brightness abnormality feature data if the mth image brightness evaluation result does not meet the multivariate image brightness constraint interval, adjust the brightness of the mth brightness optimized endoscopic image frame according to the mth image brightness abnormality feature data, generate an mth brightness adjusted endoscopic image frame, and add the mth brightness adjusted endoscopic image frame to the optimized endoscopic image data.