Bronchoscope image quality improvement method, system, device and medium
By performing noise reduction processing and threshold segmentation on bronchoscopic images, targeted contrast corrections are performed on the dark, middle and bright images, which solves the problem of ineffective improvement of image quality in the prior art and achieves high-quality image correction.
Patent Information
- Application Number
- CN202411394546.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2044-10-08
AI Technical Summary
Existing bronchoscopic image correction technology cannot be targeted for different areas, resulting in some areas being too bright or too dark, and high-quality images cannot be obtained.
By acquiring the original image of the bronchoscopy, performing noise reduction processing, the dark, middle and bright images were extracted by threshold segmentation method, and the contrast correction was corrected by gamma correction, CLAHE and logarithmic transformation methods respectively, and the target correction image was finally synthesized.
Targeted corrections for different areas have been achieved, avoiding the phenomenon of excessive brightness or darkness in local areas, significantly improving the quality of the entire image, and helping doctors to more accurately judge the examination site during bronchoscopy.
Smart Images

Figure CN118898609B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical treatment and image processing technology, and in particular to a method, system, device and medium for improving the quality of bronchoscope images. Background Art
[0002] With the development of medical technology, endoscopy has become a common means of inspection and treatment. Through endoscopy, doctors can examine human cavities, such as the human respiratory tract, without surgery to determine whether the patient has a tumor, infection or other diseases. For example, bronchoscopy or gastroenteroscopy can be performed to check whether the patient has respiratory or digestive diseases, respectively. An endoscope usually includes an image sensor, such as a CCD or CMOS, located at the distal end of the insertion portion of the endoscope and connected to a display device to provide the doctor with an image of the inspected area; the endoscope usually also includes an illumination device, such as an LED, to provide an illumination light source for the image sensor to acquire an image.
[0003] Bronchoscopes are used to examine and treat the respiratory system, such as checking for airway abnormalities, obtaining lung tissue samples, and evaluating lung bleeding. The airways examined by bronchoscopy are usually narrow and have many bends. The light from the lighting device cannot provide uniform illumination for all examination sites, with some areas being too bright or too dark, affecting image quality and the doctor's judgment.
[0004] Currently, the solution to this problem is to correct the image brightness and contrast, but most of them use the same method to correct the entire image. Some local areas, such as dark areas, are still relatively too dark, and high-quality images cannot be obtained. Summary of the invention
[0005] In view of this, the present invention provides a method, system, device and medium for improving the quality of bronchoscopic images to solve the problem that the existing bronchoscopic image correction technology does not perform targeted corrections for different areas, resulting in the inability to obtain high-quality images.
[0006] The present invention provides a method for improving the quality of bronchoscopic images, the method comprising:
[0007] Acquire an original bronchoscope image, and perform noise reduction processing on the original bronchoscope image to obtain a bronchoscope noise-reduced image;
[0008] A threshold segmentation method is used to extract a dark image, a middle image and a bright image from the bronchoscope noise reduction image; wherein the brightness of the dark image, the middle image and the bright image increases in sequence;
[0009] The dark image, the middle image and the bright image are respectively subjected to contrast correction using corresponding preset correction methods to obtain a first corrected image, a second corrected image and a third corrected image, respectively; wherein the preset correction methods used for contrast correction of the dark image, the middle image and the bright image are different from each other;
[0010] A target corrected image is obtained according to the first corrected image, the second corrected image and the third corrected image.
[0011] Optionally, the adopting a threshold segmentation method to extract a dark image, a middle image and a bright image from the bronchoscope noise reduction image respectively includes:
[0012] Performing color space conversion on the bronchoscope denoised image from the RGB color space to the LAB color space to obtain a LAB image;
[0013] Extracting an L channel image of the LAB image, and performing statistics on the brightness value of each pixel in the L channel image to obtain a brightness histogram corresponding to the L channel image;
[0014] Obtaining the cumulative frequency of each element in the brightness histogram, and normalizing all the cumulative frequencies to calculate the cumulative distribution function of the brightness histogram;
[0015] Determining a low threshold and a high threshold for threshold segmentation according to a preset percentage and the cumulative distribution function;
[0016] The L channel image is segmented using the low threshold and the high threshold to obtain the dark image, the middle image and the bright image respectively.
[0017] Optionally, obtaining a target corrected image according to the first corrected image, the second corrected image and the third corrected image includes:
[0018] Merging the first corrected image, the second corrected image and the third corrected image to obtain a brightness corrected image;
[0019] Merging the brightness-corrected image with the A channel image and the B channel image in the LAB image to obtain a corrected LAB image;
[0020] The corrected LAB image is subjected to color conversion from the LAB color space to the RGB color space to obtain the target corrected image.
[0021] Optionally, the contrast correction of the dark image, the middle image and the bright image is performed using corresponding preset correction methods to obtain a first corrected image, a second corrected image and a third corrected image, respectively, including:
[0022] A gamma correction method is used to perform contrast correction on the dark image to obtain a first corrected image; a CLAHE contrast correction method is used to perform contrast correction on the middle image to obtain a second corrected image; and a logarithmic transformation method is used to perform contrast correction on the bright image to obtain a third corrected image.
[0023] Optionally, the adopting a gamma correction method to perform contrast correction on the dark image to obtain a first corrected image includes:
[0024] Preset gamma value;
[0025] According to the set gamma value and gamma correction formula, contrast correction is performed on the dark image to obtain the first corrected image;
[0026] The specific expression of the gamma correction formula is:
[0027] ;
[0028] Among them, input i is the original contrast of the i-th pixel in the dark image, output i is the corrected contrast of the ith pixel in the dark image after correction, is the compensation coefficient, is the gamma value.
[0029] Optionally, the adopting the CLAHE contrast correction method to perform contrast correction on the middle image to obtain a second corrected image includes:
[0030] Pre-set contrast amplification limit threshold and histogram equalization size parameters;
[0031] Creating a CLAHE correction function according to the contrast amplification limit threshold and the histogram equalization size parameter;
[0032] The specific expression of the CLAHE correction function is:
[0033] ;
[0034] Wherein, clahe is the output value of the CLAHE correction function, is the CLAHE correction function, clipLimit and tileGridSize are the contrast amplification limit threshold and the histogram equalization size parameter respectively;
[0035] The CLAHE correction function is applied to the middle image to obtain the second corrected image.
[0036] Optionally, the adopting a logarithmic transformation method to perform contrast correction on the bright image to obtain a third corrected image includes:
[0037] Preset contrast gain;
[0038] According to the contrast gain and logarithmic transformation formula, contrast correction is performed on the bright image to obtain the third corrected image;
[0039] The specific expression of the logarithmic transformation formula is:
[0040] ;
[0041] Wherein, f(x, y) is the original pixel value at (x, y) in the bright image, g(x, y) is the corrected pixel value at (x, y) in the bright image after correction, and c is the contrast gain.
[0042] In addition, the present invention also provides a bronchoscopic image quality improvement system, which is applied to the above-mentioned bronchoscopic image quality improvement method, and the system comprises:
[0043] An image acquisition module is used to acquire an original bronchoscope image and perform noise reduction processing on the original bronchoscope image to obtain a bronchoscope noise reduction image;
[0044] An image segmentation module, used to extract a dark image, a middle image and a bright image from the bronchoscope noise reduction image by using a threshold segmentation method; wherein the brightness of the dark image, the middle image and the bright image increases in sequence;
[0045] A partition correction module, used to perform contrast correction on the dark image, the middle image and the bright image using corresponding preset correction methods, respectively, to obtain a first corrected image, a second corrected image and a third corrected image, respectively; wherein the preset correction methods used for contrast correction on the dark image, the middle image and the bright image are different from each other;
[0046] An image synthesis module is used to obtain a target corrected image according to the first corrected image, the second corrected image and the third corrected image.
[0047] In addition, the present invention also provides a bronchoscopic image quality improvement device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method steps in the aforementioned bronchoscopic image quality improvement method when executed.
[0048] In addition, the present invention also provides a computer storage medium, which includes: at least one instruction, which implements the method steps in the aforementioned bronchoscopic image quality improvement method when the instruction is executed by a computer.
[0049] The beneficial effects of the present invention are as follows: first, by performing noise reduction processing on the acquired bronchoscope original image, the quality of the original image can be effectively improved, which is helpful for subsequent image segmentation and targeted image correction; then, a threshold segmentation method is used to extract dark images, middle images and bright images with increasing brightness in sequence from the bronchoscope noise reduction image obtained after the noise reduction processing, so as to facilitate subsequent targeted and independent contrast correction for each image with different brightness; when the dark image, the middle image and the bright image are extracted, different preset correction methods are used to perform contrast correction on the images of the three brightnesses, and corrected images corresponding to the images of the three brightnesses (i.e., the first corrected image, the second corrected image and the third corrected image) are obtained respectively, and a regional contrast correction method is adopted instead of an overall contrast correction method, which can effectively ensure that each area is optimally corrected, avoid excessive brightness or darkness in some areas, and thus effectively improve the quality of the entire image; finally, the three images obtained after the regional correction are synthesized to obtain a target corrected image with excellent quality;
[0050] The bronchoscopic image quality improvement method, system, device and medium of the present invention can perform targeted corrections on different areas, effectively avoid the phenomenon of local areas being too bright or too dark, can truly and effectively improve the quality of the entire image, and help ensure the accuracy of doctors' judgment of the examination site using a bronchoscope. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present invention in any way. In the accompanying drawings:
[0052] Figure 1 A flow chart of a method for improving bronchoscopic image quality in Embodiment 1 of the present invention is shown;
[0053] Figure 2 It shows a flow chart of extracting a dark image, a middle image and a bright image in Embodiment 1 of the present invention;
[0054] Figure 3A flow chart showing contrast correction of a dark image in Embodiment 1 of the present invention is shown;
[0055] Figure 4 A flow chart showing contrast correction of a central image in Embodiment 1 of the present invention is shown;
[0056] Figure 5 A flow chart showing contrast correction of a bright image in Embodiment 1 of the present invention is shown;
[0057] Figure 6 A flow chart of obtaining a target corrected image in Embodiment 1 of the present invention is shown;
[0058] Figure 7 The structure diagram of a bronchoscopic image quality improvement system in the second embodiment of the present invention is shown. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0060] Embodiment 1
[0061] This embodiment provides a method for improving the quality of bronchoscopic images. Figure 1 As shown, the method includes:
[0062] S1: acquiring an original bronchoscope image, and performing noise reduction processing on the original bronchoscope image to obtain a bronchoscope noise reduction image;
[0063] S2: using a threshold segmentation method to extract a dark image, a middle image and a bright image from the bronchoscope noise reduction image, respectively; wherein the brightness of the dark image, the middle image and the bright image increases in sequence;
[0064] S3: performing contrast correction on the dark image, the middle image and the bright image respectively by using corresponding preset correction methods, and obtaining a first corrected image, a second corrected image and a third corrected image respectively; wherein the preset correction methods corresponding to the contrast correction of the dark image, the middle image and the bright image are different from each other;
[0065] S4: Obtain a target corrected image according to the first corrected image, the second corrected image and the third corrected image.
[0066] In this embodiment, firstly, by performing noise reduction processing on the acquired bronchoscope original image, the quality of the original image can be effectively improved, which is helpful for subsequent image segmentation and targeted image correction; then, a threshold segmentation method is used to extract dark images, middle images and bright images with increasing brightness in sequence from the bronchoscope noise reduction image obtained after the noise reduction processing, so as to facilitate the subsequent targeted and independent contrast correction of each image with different brightness; when the dark image, the middle image and the bright image are extracted, three different preset correction methods are used to perform contrast correction on the image of each brightness, and corrected images corresponding to the images of the three brightnesses (i.e., the first corrected image, the second corrected image and the third corrected image) are obtained respectively. The regional contrast correction method is adopted instead of the overall contrast correction method, which can effectively ensure that each area is optimally corrected, avoid excessive brightness or darkness in some areas, and thus effectively improve the quality of the entire image; finally, the three images obtained after the regional correction are synthesized to obtain a target corrected image with excellent quality.
[0067] The bronchoscopic image quality improvement method of this embodiment can perform targeted corrections on different areas, can effectively avoid the phenomenon of local areas being too bright or too dark, can truly and effectively improve the quality of the entire image, and help ensure the accuracy of doctors' judgment of the examination site using a bronchoscope.
[0068] Each step of the bronchoscopic image quality improvement method of this embodiment is described in detail below.
[0069] Specifically, in the present embodiment S1, an image sensor (such as a CCD sensor or a CMOS sensor) is provided at the insertion source end of the bronchoscope, and the image sensor is communicatively connected to a display device (such as a computer display screen) to transmit the collected original image of the bronchoscope to the display device, and the doctor can directly observe the image through the display device.
[0070] Specifically, in this embodiment S1, a bilateral filtering method is specifically used to perform noise reduction processing on the original bronchoscope image. The use of this method for noise reduction has the advantages of strong edge preservation ability and significant noise reduction effect, which can ensure that a high-quality bronchoscope noise reduction image is obtained, which is convenient for subsequent image segmentation and contrast correction.
[0071] Preferably, if Figure 2 As shown, this embodiment S2 includes:
[0072] S21: performing color space conversion on the bronchoscope denoised image from the RGB color space to the LAB color space to obtain a LAB image;
[0073] S22: extracting an L channel image of the LAB image, and performing statistics on the brightness value of each pixel in the L channel image to obtain a brightness histogram corresponding to the L channel image;
[0074] S23: Obtaining the cumulative frequency of each element in the brightness histogram, and normalizing all the cumulative frequencies to calculate the cumulative distribution function of the brightness histogram;
[0075] S24: Determine a low threshold and a high threshold for threshold segmentation according to a preset percentage and the cumulative distribution function;
[0076] S25: Segmenting the L channel image using the low threshold and the high threshold to obtain the dark image, the middle image and the bright image respectively.
[0077] Since the L component (i.e., brightness component) in the LAB color space closely matches human brightness perception and can more accurately reflect the actual perception of brightness by the human eye, before segmenting the bronchoscope denoised image into dark, middle, and bright images, converting the image from the RGB color space to the LAB color space has better perceptual uniformity and can ensure more accurate segmentation. In addition, the LAB color space is a device-independent color space that can maintain color consistency between different devices, thereby reducing color distortion. Therefore, converting the image from the RGB color space to the LAB color space has higher device compatibility and can ensure a more uniform brightness distribution for images of different devices.
[0078] Since the subsequent targeted image correction is for the image contrast, the L channel image of the LAB image is directly extracted, and the brightness of the pixels in the L channel image is counted. The pixel frequency of each brightness value in the L channel image can be counted, that is, the brightness histogram is obtained. Based on the brightness histogram, the brightness distribution can be better analyzed and the cumulative distribution function can be calculated, which is convenient for subsequent threshold segmentation.
[0079] The cumulative distribution function (CDF) is the cumulative form of the histogram, which represents the proportion of pixels less than or equal to a certain brightness value to the total number of pixels. In this embodiment, the cumulative distribution function (i.e., the CDF value is between 0 and 1) is calculated by obtaining the cumulative frequency of each element (i.e., each brightness) in the brightness histogram (specifically, traversing each element of the brightness histogram and adding up the values of the current element and all previous elements) and normalizing all the cumulative frequencies (i.e., the cumulative frequency of each element is in the total number of pixels of the image).
[0080] After calculating the cumulative distribution function CDF, the low percentile and high percentile of CDF can be selected as the thresholds for image segmentation (i.e., low threshold and high threshold). Based on these two thresholds, the threshold segmentation of three different brightness areas can be directly implemented, which is simple and efficient, and then images of three different brightness areas (i.e., dark image, middle image and bright image) can be obtained.
[0081] Specifically, in S24 of this embodiment, the preset percentages are 20% and 80%, that is, 20% of the CDF value is the low threshold, and 80% of the CDF value is the high threshold. For the brightness interval of the dark image, it refers to the interval from 0 to the low threshold of the CDF in the brightness histogram; for the brightness interval of the middle image, it refers to the interval from the low threshold to the high threshold of the CDF in the brightness histogram; for the brightness interval of the bright image, it refers to the interval from the high threshold to 1 of the CDF in the brightness histogram.
[0082] Specifically, in S25 of this embodiment, a mask may be created for each brightness interval, and then the L channel image may be segmented using the created mask to obtain a dark image, a middle image, and a bright image.
[0083] For the mask of the dark image (referred to as the dark mask): for each pixel in the L channel image, if its brightness value is less than or equal to the low threshold (i.e., less than or equal to the 20% percentile), the pixel is marked as True (or 1) in the dark mask, otherwise it is marked as False (or 0);
[0084] For the mask of the middle image (referred to as the middle mask): For each pixel in the image, if its brightness value is greater than the low threshold and less than or equal to the high threshold (that is, greater than the 20% percentile and less than or equal to the 80% percentile), then the pixel is marked as True in the middle mask, otherwise it is False.
[0085] For the mask of the bright image (referred to as the bright mask): for each pixel in the image, if its brightness value is greater than the high threshold (that is, greater than the 80% percentile), the pixel is marked as True in the bright mask, otherwise it is marked as False.
[0086] When using each mask for image segmentation, a new image of the same size as the original image (i.e., the L channel image) is created, and each mask is used to decide which pixels should be retained (maintaining the original value) or set to zero.
[0087] Preferably, this embodiment S3 includes:
[0088] A gamma correction method is used to perform contrast correction on the dark image to obtain a first corrected image; a CLAHE contrast correction method is used to perform contrast correction on the middle image to obtain a second corrected image; and a logarithmic transformation method is used to perform contrast correction on the bright image to obtain a third corrected image.
[0089] The gamma correction method is used to correct the dark image, which can make the dark area in the dark image brighter, thereby enhancing the visibility of the dark details. At the same time, when correcting the dark image, the gamma correction method can directly adjust the gamma value to accurately control the degree of brightness improvement, which can effectively avoid noise amplification caused by over-enhancement and truly ensure the visual effect of the dark image; CLAHE contrast correction method (Contrast Limited Adaptive HistogramEqualization, i.e., a contrast-limited adaptive histogram equalization method, is a method of avoiding over-enhancement and noise amplification by limiting the contrast amplification degree of local areas. This method is used to correct the central image, which can not only enhance the contrast while maintaining the natural appearance of these details, avoid overexposure or distortion, but also reduce the amplification of noise during the enhancement process, thereby obtaining a central image with high clarity and moderate contrast; the logarithmic transformation method is a method of compressing the pixel values of brighter areas in an image through nonlinear mapping. This method is used to correct the bright image, which can compress the overbright areas in the brightness image, making the bright details clearer and more recognizable, and can also help improve the dynamic range of the bright image, making the overall brightness distribution of the bright image more uniform, and improving the visual effect of the bright image. This embodiment adopts different and targeted correction methods for different areas, which can significantly improve the visual effect and detail expression of the entire L channel image, and truly improve the quality of the entire image.
[0090] It should be understood that the contrast correction of the above three images may be performed sequentially (the order of execution is not limited) or simultaneously, which is not limited in this embodiment.
[0091] Specifically, Figure 3 As shown, the gamma correction method is used to correct the contrast of the dark image to obtain a first corrected image, including:
[0092] S31: pre-set gamma value;
[0093] S32: performing contrast correction on the dark image according to the set gamma value and gamma correction formula to obtain the first corrected image;
[0094] The specific expression of the gamma correction formula is:
[0095] ;
[0096] Among them, input i is the original contrast of the i-th pixel in the dark image, output i is the corrected contrast of the ith pixel in the dark image after correction, is the compensation coefficient, is the gamma value.
[0097] In the process of correcting the dark image, the gamma value is first set in advance, and then the original contrast of each pixel in the dark image is input into the above gamma correction formula, and the corrected contrast of each pixel can be directly obtained. All pixels are corrected according to the above method to obtain the first corrected image; the contrast correction of the dark image is achieved through the above steps, which is simple to operate and precise to control, and can ensure the visual effect of the dark image.
[0098] Specifically, the compensation coefficient Usually 0, gamma value Controls the contrast and brightness of an image. Typically, < 1 will brighten the image and enhance dark tones; > 1 will darken the image and increase the contrast of bright tones. In this embodiment, 0.5 is taken to enhance dark tones and make the dark details of the dark image more obvious.
[0099] Specifically, Figure 4 As shown, the CLAHE contrast correction method is used to perform contrast correction on the middle image to obtain a second corrected image, including:
[0100] S33: presetting a contrast amplification limit threshold and a histogram equalization size parameter;
[0101] S34: creating a CLAHE correction function according to the contrast amplification limit threshold and the histogram equalization size parameter;
[0102] The specific expression of the CLAHE correction function is:
[0103] ;
[0104] Wherein, clahe is the output value of the CLAHE correction function, is the CLAHE correction function, clipLimit and tileGridSize are the contrast amplification limit threshold and the histogram equalization size parameter respectively;
[0105] S35: Apply the CLAHE correction function to the middle image to obtain the second corrected image.
[0106] The contrast amplification limit threshold clipLimit specifies the limit threshold of contrast amplification. By setting this threshold in advance, any pixel value distribution change that causes the local contrast to exceed this threshold will be clipped below this threshold during the histogram equalization process (i.e., the correction process of the central image), which helps prevent excessive amplification of noise. The histogram equalization size parameter tileGridSize defines the size of the small blocks into which the central image is divided during the histogram equalization process of the central image; when the central image is divided into small blocks according to this parameter, each small block will be histogram equalized independently, and then the bilinear interpolation method will be used to merge the results back to the original image size, thereby retaining the overall visual effect of the image and improving the contrast of the central image. The CLAHE correction function created by the above two parameters can ensure that in the correction process applied to the central image, the contrast can be truly enhanced while maintaining the natural appearance of these details, avoiding overexposure or distortion, and reducing the amplification of noise during the enhancement process, thereby obtaining a second corrected image with high clarity and moderate contrast.
[0107] In this embodiment, the contrast amplification limit threshold clipLimit is set to 2.0, and the histogram equalization size parameter tileGridSize is set to (8, 8) pixels.
[0108] Specifically, Figure 5 As shown, the logarithmic transformation method is used to perform contrast correction on the bright image to obtain a third corrected image, including:
[0109] S36: presetting contrast gain;
[0110] S37: performing contrast correction on the bright image according to the contrast gain and logarithmic transformation formula to obtain the third corrected image;
[0111] The specific expression of the logarithmic transformation formula is:
[0112] ;
[0113] Wherein, f(x, y) is the original pixel value at (x, y) in the bright image, g(x, y) is the corrected pixel value at (x, y) in the bright image after correction, and c is the contrast gain.
[0114] In the correction process of the brightness image, the contrast gain is first pre-set, and then the original pixel value at each position in the bright image is input into the above logarithmic transformation formula, and the corrected pixel value corresponding to each position can be directly obtained. The pixels at each position are corrected according to the above method to obtain the third corrected image; the contrast correction of the bright image is achieved through the above steps, the operation is simple, the control is precise, and it can ensure that the third corrected image with clearer bright details and more uniform overall brightness distribution is obtained.
[0115] Preferably, if Figure 6 As shown, this embodiment S4 includes:
[0116] S41: merging the first corrected image, the second corrected image and the third corrected image to obtain a brightness corrected image;
[0117] S42: merging the brightness corrected image with the A channel image and the B channel image in the LAB image to obtain a corrected LAB image;
[0118] S43: Performing color conversion on the corrected LAB image from the LAB color space to the RGB color space to obtain the target corrected image.
[0119] After performing different contrast corrections on the dark, middle and bright areas respectively, the three corrected images (first corrected image, second corrected image, third corrected image) are merged to form a unified brightness corrected image. Then it is merged with the color information in the original image (i.e., LAB image) (i.e., the A channel image and the B channel image in the LAB image) to restore the complete color information of the entire image. Finally, the merged corrected LAB image is converted back to the commonly used RGB color space to obtain the final target corrected image. This embodiment can ensure that a bronchoscopic image with a comprehensive image improvement is obtained through the above-mentioned image merging process and space conversion process.
[0120] Embodiment 2
[0121] A bronchoscopic image quality improvement system is applied to the bronchoscopic image quality improvement method of embodiment 1, such as Figure 7 As shown, the system comprises:
[0122] An image acquisition module is used to acquire an original bronchoscope image and perform noise reduction processing on the original bronchoscope image to obtain a bronchoscope noise reduction image;
[0123] An image segmentation module, used to extract a dark image, a middle image and a bright image from the bronchoscope noise reduction image by using a threshold segmentation method; wherein the brightness of the dark image, the middle image and the bright image increases in sequence;
[0124] A partition correction module, used to perform contrast correction on the dark image, the middle image and the bright image using corresponding preset correction methods, respectively, to obtain a first corrected image, a second corrected image and a third corrected image, respectively; wherein the preset correction methods used for contrast correction on the dark image, the middle image and the bright image are different from each other;
[0125] An image synthesis module is used to obtain a target corrected image according to the first corrected image, the second corrected image and the third corrected image.
[0126] In this embodiment, first, the image acquisition module is used to perform noise reduction processing on the acquired bronchoscope original image, which can effectively improve the quality of the original image and facilitate subsequent image segmentation and targeted image correction; then, the image segmentation module is used to extract dark images, middle images and bright images with increasing brightness from the bronchoscope noise reduction image obtained after the noise reduction processing by using a threshold segmentation method, which can facilitate the subsequent targeted and independent contrast correction of each image with different brightness; when the dark image, the middle image and the bright image are extracted, the partition correction module is used to use different preset correction methods to perform contrast correction on the images of the three brightnesses, and corrected images corresponding to the images of the three brightnesses (i.e., the first corrected image, the second corrected image and the third corrected image) are obtained respectively. The use of the regional contrast correction method instead of the overall contrast correction method can effectively ensure that each area is optimally corrected, avoid excessive brightness or darkness in some areas, and thus effectively improve the quality of the entire image; finally, the image synthesis module is used to synthesize the three images obtained after the regional correction, so as to obtain a target corrected image with excellent quality.
[0127] The bronchoscopic image quality improvement system of this embodiment can perform targeted corrections on different areas, can effectively avoid the phenomenon of local areas being too bright or too dark, can truly and effectively improve the quality of the entire image, and help ensure the accuracy of doctors' judgment of the examination site using a bronchoscope.
[0128] The functions of each module in the bronchoscopic image quality improvement system described in this embodiment are the same as the method steps of the bronchoscopic image quality improvement method described in Example 1. Therefore, for details not included in this embodiment, please refer to Example 1 and Example 2. Figure 1 and Figure 6 The detailed description will not be repeated here.
[0129] Embodiment 3
[0130] This embodiment also provides a bronchoscopic image quality improvement device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method steps in the bronchoscopic image quality improvement method of the first embodiment when executed.
[0131] Through computer programs stored in the memory and running on the processor, targeted corrections can be made to different areas, which can effectively avoid the phenomenon of local areas being too bright or too dark. It can truly and effectively improve the quality of the entire image and help ensure the accuracy of doctors' judgment of the examination site using bronchoscopes.
[0132] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of a computer device, and uses various interfaces and lines to connect various parts of the entire computer device.
[0133] The memory can be used to store computer programs and / or models. The processor realizes various functions of the computer device by running or executing the computer programs and / or models stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, video data, etc.). In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0134] It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by a computer program. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0135] These computer programs may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0136] These computer programs can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0137] This embodiment further provides a computer storage medium, which includes: at least one instruction, which implements the method steps in the bronchoscopic image quality improvement method of embodiment 1 when the instruction is executed by a computer.
[0138] By executing a computer storage medium containing at least one instruction, targeted corrections can be made to different areas, effectively avoiding the phenomenon of local areas being too bright or too dark, and truly and effectively improving the quality of the entire image, helping to ensure the accuracy of doctors' judgment of the examination site using a bronchoscope.
[0139] Similarly, for details not yet provided in this embodiment, please refer to Embodiment 1, Embodiment 2 and Figures 1 to 7 The detailed description will not be repeated here.
[0140] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for improving bronchoscopic image quality, characterized in that: The method comprises: Acquire an original bronchoscope image, and perform noise reduction processing on the original bronchoscope image to obtain a bronchoscope noise-reduced image; A threshold segmentation method is used to extract a dark image, a middle image and a bright image from the bronchoscope noise reduction image; wherein the brightness of the dark image, the middle image and the bright image increases in sequence; The dark image, the middle image and the bright image are respectively subjected to contrast correction using corresponding preset correction methods to obtain a first corrected image, a second corrected image and a third corrected image, respectively; wherein the preset correction methods used for contrast correction of the dark image, the middle image and the bright image are different from each other; Obtaining a target corrected image according to the first corrected image, the second corrected image and the third corrected image; The step of performing contrast correction on the dark image, the middle image and the bright image using corresponding preset correction methods to obtain a first corrected image, a second corrected image and a third corrected image respectively includes: A gamma correction method is used to perform contrast correction on the dark image to obtain a first corrected image; a CLAHE contrast correction method is used to perform contrast correction on the middle image to obtain a second corrected image; and a logarithmic transformation method is used to perform contrast correction on the bright image to obtain a third corrected image.
2. The method for improving bronchoscopic image quality according to claim 1, characterized in that: The method of adopting the threshold segmentation method to extract the dark image, the middle image and the bright image from the bronchoscope noise reduction image respectively includes: Performing color space conversion on the bronchoscope denoised image from the RGB color space to the LAB color space to obtain a LAB image; Extracting an L channel image of the LAB image, and performing statistics on the brightness value of each pixel in the L channel image to obtain a brightness histogram corresponding to the L channel image; Obtaining the cumulative frequency of each element in the brightness histogram, and normalizing all the cumulative frequencies to calculate the cumulative distribution function of the brightness histogram; Determining a low threshold and a high threshold for threshold segmentation according to a preset percentage and the cumulative distribution function; The L channel image is segmented using the low threshold and the high threshold to obtain the dark image, the middle image and the bright image respectively.
3. The bronchoscopic image quality improvement method according to claim 2, characterized in that: The step of obtaining a target corrected image according to the first corrected image, the second corrected image and the third corrected image comprises: Merging the first corrected image, the second corrected image and the third corrected image to obtain a brightness corrected image; Merging the brightness-corrected image with the A channel image and the B channel image in the LAB image to obtain a corrected LAB image; The corrected LAB image is subjected to color conversion from the LAB color space to the RGB color space to obtain the target corrected image.
4. The method for improving bronchoscopic image quality according to claim 1, characterized in that: The method of using a gamma correction method to perform contrast correction on the dark image to obtain a first corrected image includes: Preset gamma value; According to the set gamma value and gamma correction formula, contrast correction is performed on the dark image to obtain the first corrected image; The specific expression of the gamma correction formula is: ; Among them, input i is the original contrast of the i-th pixel in the dark image, output i is the corrected contrast of the ith pixel in the dark image after correction, is the compensation coefficient, is the gamma value.
5. The method for improving bronchoscopic image quality according to claim 1, characterized in that: The method of using the CLAHE contrast correction method to perform contrast correction on the middle image to obtain a second corrected image includes: Pre-set contrast amplification limit threshold and histogram equalization size parameters; Creating a CLAHE correction function according to the contrast amplification limit threshold and the histogram equalization size parameter; The specific expression of the CLAHE correction function is: ; Wherein, clahe is the output value of the CLAHE correction function, is the CLAHE correction function, clipLimit and tileGridSize are the contrast amplification limit threshold and the histogram equalization size parameter respectively; The CLAHE correction function is applied to the middle image to obtain the second corrected image.
6. The method for improving bronchoscopic image quality according to claim 1, characterized in that: The method of using a logarithmic transformation method to perform contrast correction on the bright image to obtain a third corrected image includes: Preset contrast gain; According to the contrast gain and logarithmic transformation formula, contrast correction is performed on the bright image to obtain the third corrected image; The specific expression of the logarithmic transformation formula is: ; Wherein, f(x, y) is the original pixel value at (x, y) in the bright image, g(x, y) is the corrected pixel value at (x, y) in the bright image after correction, and c is the contrast gain.
7. A bronchoscopic image quality improvement system, characterized in that: Applied to the method for improving bronchoscopic image quality as claimed in any one of claims 1 to 6, the system comprises: An image acquisition module is used to acquire an original bronchoscope image and perform noise reduction processing on the original bronchoscope image to obtain a bronchoscope noise reduction image; An image segmentation module, used to extract a dark image, a middle image and a bright image from the bronchoscope noise reduction image by using a threshold segmentation method; wherein the brightness of the dark image, the middle image and the bright image increases in sequence; A partition correction module, used to perform contrast correction on the dark image, the middle image and the bright image using corresponding preset correction methods, respectively, to obtain a first corrected image, a second corrected image and a third corrected image, respectively; wherein the preset correction methods used for contrast correction on the dark image, the middle image and the bright image are different from each other; An image synthesis module, used for obtaining a target corrected image according to the first corrected image, the second corrected image and the third corrected image; The partition correction module uses corresponding preset correction methods to perform contrast correction on the dark image, the middle image and the bright image, respectively, to obtain a first corrected image, a second corrected image and a third corrected image, specifically including: A gamma correction method is used to perform contrast correction on the dark image to obtain a first corrected image; a CLAHE contrast correction method is used to perform contrast correction on the middle image to obtain a second corrected image; and a logarithmic transformation method is used to perform contrast correction on the bright image to obtain a third corrected image.
8. A bronchoscopic image quality improvement device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method steps in the bronchoscopic image quality improvement method as described in any one of claims 1 to 6 when executed.
9. A computer storage medium, characterized in that The computer storage medium comprises: at least one instruction, which, when executed by a computer, implements the method steps in the bronchoscopic image quality improvement method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Singular value equalization image enhancement algorithm based on weighted histogram distribution gamma correction
CN112785532A