Image enhancement method and system based on brightness correction and fusion channel prior

By performing brightness correction and channel fusion methods on the endoscopic image, the problems of excessive brightness enhancement and detail loss in the prior art are solved, and contrast improvement and image naturalness are achieved.

CN114627009BActive Publication Date: 2025-04-15ANHUI UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202210204955.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-02
Publication Date
2025-04-15
Estimated Expiration
2042-03-02

AI Technical Summary

Technical Problem

The prior art has problems in endoscopic image enhancement with excessive brightness enhancement, loss of detail, halo artifacts, and poor handling of edge details of medium brightness and brightness images.

Method used

By converting the image to be enhanced from RGB space to HSV space, the V-channel image is brightly corrected, including quadrant division, light-dark classification, clipping stretching and gamma correction, and the brightness-corrected image is merged with the H and S channels and converted back to RGB space. Then, the G and B channels of the brightness correction image of the RGB space are channel fusion and enhanced, and merged with the R channel to obtain the final enhanced image.

Benefits of technology

Brightness correction and detail enhancement of the endoscopic image is achieved, avoiding excessive enhancement and detail loss, while improving the contrast of the image and maintaining the naturalness of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114627009B_ABST
    Figure CN114627009B_ABST
Patent Text Reader

Abstract

The invention discloses an image enhancement method and system based on brightness correction and fusion channel prior, which relates to the field of image enhancement technology. First, the image to be enhanced is converted from RGB space to HSV space; then the V channel image is brightness corrected by gamma correction; the brightness-corrected V channel image, H channel image and S channel image are merged, and converted back from HSV space to RGB space to obtain a brightness-corrected image in RGB space; for the brightness-corrected image in RGB space, its G channel image and B channel image are channel-fused and enhanced, and merged with the R channel image to obtain a final enhanced image. The invention can enhance the contrast of the image, retain the detailed information of the image, and enable the enhanced image to maintain the naturalness of the image.
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 enhancement, and more particularly to an image enhancement method and system based on brightness correction and fusion channel prior. Background Art

[0002] At present, the main algorithms for endoscopic image enhancement are: methods based on histogram equalization, methods based on Retinex theory, methods based on homomorphic filtering, and methods based on deep learning. The histogram-based method will cause uneven enhancement of the grayscale of the enhanced image, resulting in the loss of image detail information and excessive brightness enhancement. The method based on Retinex theory has limitations in illumination estimation, and will produce a "halo artifact" phenomenon around the enhanced image. The method based on homomorphic filtering cannot be applied to images of all brightness and cannot preserve the edge details of medium brightness and bright images. The method based on deep learning will limit the performance of network enhancement due to the need for a large data set.

[0003] 1 Histogram Equalization Based Method

[0004] Histogram equalization is a commonly used grayscale transformation method. Its idea is to transform the histogram distribution of an image into an approximately uniform distribution, thereby enhancing the contrast of the image. The grayscale histogram of an image represents the grayscale distribution of the image. Usually, the histogram is normalized before subsequent processing, which can achieve good processing results. However, since the histogram of a discrete image is also discrete, its grayscale cumulative distribution function is a non-decreasing step function. If the mapped grayscale level is less than 256, the transformed histogram will have some grayscale vacancies, that is, the probability of the grayscale after adjustment cannot basically obtain the same value, so the resulting histogram is completely uneven. Secondly, for some images, if the histogram has a peak, the contrast will be unnaturally over-enhanced and the details will disappear after processing.

[0005] 2 Methods based on Retinex theory

[0006] The idea of ​​Retinex image enhancement is to remove the influence of ambient brightness from the original image and solve the color characteristics of the object itself, so as to achieve the purpose of image enhancement. The basis of Retinex theory is that the color of an object is determined by the object's ability to reflect long-wave, medium-wave and short-wave light, rather than by the absolute value of the reflected light intensity. The color of the object is not affected by the non-uniformity of illumination and is consistent, that is, Retinex is based on color consistency. Retinex can achieve a good balance in three aspects: dynamic range compression, edge enhancement and color constancy. However, the Retinex algorithm will cause excessive enhancement of the image and large changes in brightness when processing endoscopic images, and halo phenomena will appear at the edges of the image.

[0007] 3 Methods based on homomorphic filtering

[0008] The principle of homomorphic filtering is to decompose the image into incident and reflected components based on the illumination-reflection imaging principle of the image. The main purpose is to suppress the incident component and enhance the reflected component through the filter, thereby reducing the image quality degradation caused by uneven brightness and improving the image contrast. However, homomorphic filtering requires the selection of appropriate filter parameters and is not applicable to endoscopic images with complex scenes.

[0009] 4 Methods based on deep learning

[0010] Deep learning is a direction that researchers have attached great importance to in recent years. This method is very effective and has strong applicability. However, since the network framework of deep learning requires a large number of images to learn, in order to achieve a good enhancement effect for endoscopic images, a large number of images with vascular and tissue feature information are required, which is a great challenge for data collection and makes it difficult to implement.

[0011] Given that endoscopic images have low image quality due to limitations in hardware, current imaging technology, and the complex environment during surgery, the most obvious disadvantage is that the images are not clear enough and have low contrast, which results in the loss of some blood vessels and tissue features. Therefore, how to improve the image enhancement effect, especially the brightness correction and detail enhancement of endoscopic images, is an urgent problem to be solved by those skilled in the art. Summary of the invention

[0012] In view of this, the present invention provides an image enhancement method and system based on brightness correction and fusion channel prior.

[0013] In order to achieve the above object, the present invention provides the following technical solutions:

[0014] An image enhancement method based on brightness correction and fusion channel prior includes the following steps:

[0015] Convert the image to be enhanced from RGB space to HSV space;

[0016] Perform brightness correction on the V channel image;

[0017] The brightness-corrected V channel image is merged with the H channel image and the S channel image, and converted back from the HSV space to the RGB space to obtain a brightness-corrected image in the RGB space;

[0018] For the brightness correction image in RGB space, the G channel image and the B channel image are channel fused and enhanced, and then merged with the R channel image to obtain the final enhanced image.

[0019] Optionally, the specific steps of performing brightness correction on the V channel image are:

[0020] Step 2.1, divide the histogram of the V channel image into quadrants;

[0021] Step 2.2, based on the quadrant division result, classify the V channel image into bright and dark types to obtain the brightness type of the V channel image;

[0022] Step 2.3, based on the histogram quadrant division result and the brightness type of the V channel image, determine the interval to be corrected;

[0023] Step 2.4, trim and stretch the sub-histogram of the interval to be corrected;

[0024] Step 2.5, perform gamma correction on the sub-histogram of the interval to be corrected after trimming and stretching, and obtain a V channel image after brightness correction.

[0025] Optionally, in step 2.1, the method for dividing the histogram of the V channel image into quadrants is:

[0026] Step 2.1.1, obtain the quadrant division threshold:

[0027]

[0028]

[0029] Among them, i max and i min Represents the maximum and minimum grayscale values ​​of the input image, i d and i l are the two thresholds for quadrant segmentation, representing the dark threshold and the bright threshold respectively;

[0030] Step 2.1.2: Based on the quadrant division threshold, divide the histogram of the V channel image into three sub-histograms h representing the gray value distribution. d (l), h m (l), h l (l), where h d (l) represents the dark sub-histogram, h m (l) represents the medium brightness subhistogram, h d (l) represents the bright particle histogram.

[0031] Optionally, in step 2.2, the method for classifying the V channel image into light and dark is:

[0032] CDF max = max(CDF d ,max(CDF m ,CDF l )) (4)

[0033] Among them, CDF d is the dark subhistogram h d (l) The ratio of the number of pixels to the total number of pixels in the histogram of the V channel image, CDF m is the medium brightness subhistogram h m (l) The ratio of the number of pixels to the total number of pixels in the histogram of the V channel image, CDF l is the bright sub-histogram h d (l) The ratio of the number of pixels to the total number of pixels in the histogram of the V channel image, CDF max represents the maximum value of cumulative density;

[0034] If CDF max Equal to CDF d , then the V channel image is a dark image. If CDF max Equal to CDF m , then the V channel image is a medium brightness image. If CDF max Equal to CDF l , then the V channel image is a bright image.

[0035] Optionally, in step 2.3, the method for determining the interval to be corrected is:

[0036] Step 2.3.1: Determine the horizontal cutting threshold h based on the brightness type of the V channel image cut :

[0037] Step 2.3.2: Use the horizontal threshold h cut Cut the histogram of the V channel image to obtain the threshold i of the interval to be corrected 1 and i 2 , where i 1 Represents the lower threshold of the interval to be corrected, i 2 Represents the high threshold of the interval to be corrected.

[0038] Optionally, in step 2.4, the method for trimming and stretching the sub-histogram of the interval to be corrected is:

[0039] Determine the clipping threshold It is used to clip the subhistogram of the interval to be corrected to obtain a new subhistogram of the interval to be corrected after the clipping; the new subhistogram of the interval to be corrected is stretched by remapping.

[0040] Optionally, in step 2.5, the method for performing gamma correction is:

[0041] Gamma correction is performed by using the cumulative density of the sub-histogram of the interval to be corrected after clipping as the gamma value and the threshold of the sub-histogram of the interval to be corrected after stretching as the coefficient of gamma correction.

[0042] Optionally, the specific steps of channel fusion are:

[0043] The G channel image and the B channel image are decomposed, and then the low frequency and high frequency of the G channel image and the B channel image are fused respectively, and then the channel fused image F(i,j) is obtained by inverse wavelet transform.

[0044] Optionally, the image after channel fusion is enhanced. The formula for image enhancement is:

[0045]

[0046] Among them, J(i,j) is the enhanced image; F(i,j) is the image after channel fusion, that is, the image to be enhanced; t(i,j) is the transfer function; A is a constant value.

[0047] The present invention also provides an image enhancement system based on brightness correction and fusion channel prior, comprising:

[0048] A first space conversion module is used to convert the image to be enhanced from the RGB space to the HSV space;

[0049] A brightness correction module is used to perform brightness correction on the V channel image;

[0050] The second space conversion module is used to merge the brightness-corrected V channel image, the H channel image, and the S channel image, and convert the HSV space back to the RGB space to obtain a brightness-corrected image in the RGB space;

[0051] The image enhancement module is used to perform channel fusion and enhancement on the G channel image and the B channel image of the brightness correction image in the RGB space, and merge them with the R channel image to obtain the final enhanced image.

[0052] It can be seen from the above technical solutions that the present invention discloses an image enhancement method and system based on brightness correction and fusion channel prior, which has the following beneficial effects compared with the prior art:

[0053] The present invention classifies the image into light and dark, determines the interval to be corrected on this basis, and performs cropping, stretching and gamma correction, thereby achieving brightness correction while preventing detail loss. Based on the brightness corrected image, the green channel and blue channel images are fused for detail channels, and image enhancement is performed. The present invention can enhance the contrast of the image and enable the enhanced image to maintain the naturalness of the image. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0055] Figure 1 It is a schematic diagram of the method principle of the present invention;

[0056] Figure 2 is the ideal t(i,j) function image;

[0057] Figure 3 is t(i,j) and The functional relationship between them;

[0058] FIG. 4( a ) is an image C to be enhanced in the embodiment, and FIG. 4( b ) is an image C processed by the method of the present invention when the value of w is 1 in the embodiment;

[0059] FIG5(a) is an image A to be enhanced in the embodiment, and FIG5(b) is an image B to be enhanced in the embodiment;

[0060] FIG6( a ) is an image A processed by other algorithms in the embodiment, and FIG6( b ) is an image B processed by other algorithms in the embodiment;

[0061] FIG. 7( a ) is an image A processed by the method of the present invention in an embodiment, and FIG. 7( b ) is an image B processed by the method of the present invention in an embodiment;

[0062] Figure 8 It is a system schematic diagram of the present invention. DETAILED DESCRIPTION

[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0064] The embodiment of the present invention discloses an image enhancement method based on brightness correction and fusion channel prior, see Figure 1 , including the following steps:

[0065] Step 1: Convert the image to be enhanced from RGB space to HSV space.

[0066] Step 2: Perform brightness correction on the V channel image.

[0067] Step 2.1, divide the histogram of the V channel image into quadrants;

[0068] Directly dividing the maximum value L-1 of the grayscale value into three parts, this segmentation method will make the output image unnatural. The method proposed by the present invention is to use the mean of the difference between the maximum and minimum grayscale values ​​of the input image as the segmentation threshold. The sub-histograms segmented by this method represent the distribution of three grayscale values: dark, medium brightness and bright. This method can balance the grayscale values ​​of the three intervals according to the brightness and darkness characteristics, and output a beautiful and coordinated image. Specifically:

[0069] Step 2.1.1, obtain the quadrant division threshold:

[0070]

[0071]

[0072] Among them, i max and i min Represents the maximum and minimum grayscale values ​​of the input image, i d and i l are the two thresholds for quadrant segmentation, representing the dark threshold and the bright threshold respectively;

[0073] Step 2.1.2: Based on the quadrant division threshold, divide the histogram of the V channel image into three sub-histograms h representing the gray value distribution. d (l), h m (l), h l (l), where h d (l) represents the dark sub-histogram, h m (l) represents the medium brightness subhistogram, h d (l) represents the brightness sub-histogram.

[0074] Step 2.2, based on the quadrant division result, classify the V channel image into bright and dark types to obtain the brightness type of the V channel image;

[0075] CDF max = max(CDF d ,max(CDF m ,CDF l )) (4)

[0076] CDF d =CDF(i d ) (5)

[0077] CDF m =CDF(i l )-CDF(i d ) (6)

[0078] CDF l =CDF(i max )-CDF(i l ) (7)

[0079] Among them, CDF() represents the cumulative distribution function, CDF d is the dark subhistogram h d (l) The ratio of the number of pixels to the total number of pixels in the histogram of the V channel image, CDF m is the medium brightness subhistogram h m (l) The ratio of the number of pixels to the total number of pixels in the histogram of the V channel image, CDF l is the bright sub-histogram h d (l) The ratio of the number of pixels to the total number of pixels in the histogram of the V channel image, CDF max represents the maximum value of cumulative density;

[0080] If CDF max Equal to CDF d , then the V channel image is a dark image. If CDF max Equal to CDF m , then the V channel image is a medium brightness image. If CDF max Equal to CDF l , then the V channel image is a bright image.

[0081] Step 2.3, based on the histogram quadrant division result and the brightness type of the V channel image, determine the interval to be corrected;

[0082] In order to correct the highlight and low-brightness areas, the range to be corrected should be selected to avoid over-enhancement and noise amplification. Specifically:

[0083] Step 2.3.1: Determine the horizontal cutting threshold based on the brightness type of the V channel image:

[0084]

[0085]

[0086]

[0087] Among them, h cut.d represents the horizontal cutting threshold of the dark area in the V channel image, h cut.m Indicates the horizontal cutting threshold of the medium brightness area in the V channel image, h cut.l It represents the horizontal cutting threshold of the bright area in the V channel image, and N is the total number of pixels in the V channel image;

[0088] Step 2.3.2: Use the horizontal threshold h cutCut the histogram of the V channel image to get the threshold of the interval to be corrected:

[0089]

[0090]

[0091] Among them, i 1 Represents the lower threshold of the interval to be corrected, i 2 represents the high threshold of the interval to be corrected, h(l) is the V channel image histogram, l is the pixel value of the image, and h cut ={h cut.d ,h cut.m ,h cut.l}, indicating the horizontal cutting threshold of the V channel image.

[0092] Step 2.4, trim and stretch the sub-histogram of the interval to be corrected;

[0093] Step 2.4.1, cutting:

[0094] Determine the clipping threshold

[0095]

[0096]

[0097]

[0098] in, w 1 represents the clipping threshold of the sub-histogram of the dark area to be corrected in the V channel image, w 2 represents the clipping threshold of the sub-histogram to be corrected in the medium brightness area of ​​the V channel image, w 3 It represents the clipping threshold of the sub-histogram of the interval to be corrected in the bright area of ​​the V channel image, which is used to clip the sub-histogram of the interval to be corrected. The new sub-histogram of the interval to be corrected after clipping is:

[0099]

[0100]

[0101]

[0102] Among them, h n1 (l) is the new subhistogram of the interval to be corrected after the dark area of ​​the V channel image is clipped, h n2 (l) is the new sub-histogram of the interval to be corrected after the medium brightness area of ​​the V channel image is clipped, h n3(l) is the new sub-histogram of the interval to be corrected after the bright area of ​​the V channel image is clipped.

[0103] Step 2.4.2, stretching (remapping):

[0104] Solve the mapping range:

[0105]

[0106]

[0107]

[0108] Among them, i nd.1 Represents the low threshold i of the dark area in the V channel image 1 The new low threshold to be mapped, i nl.1 Represents the high threshold i of the dark area in the V channel image 2 The new high threshold to be mapped; i nd.2 The low threshold i represents the medium brightness area in the V channel image. 1 The new low threshold to be mapped, i nl.2 The high threshold i represents the medium brightness area in the V channel image. 2 The new high threshold to be mapped; i nd.3 Represents the low threshold i of the bright area in the V channel image 1 The new low threshold to be mapped, i nl.3 Represents the high threshold i of the bright area in the V channel image 2 The new high threshold to be mapped; since the image is divided into three areas: dark, medium brightness and bright, α is introduced as a control factor for brightness growth to prevent excessive enhancement during brightness correction and cause loss of details. According to the experimental results, α is set to 15.

[0109] All parameters of gamma correction are obtained based on each sub-histogram, so the remapping of each sub-histogram will be limited to a specified range according to the distribution of brightness, which can balance the brightness while maintaining details, achieving the effect of natural image enhancement.

[0110] Since bright images will lead to over-enhancement after being remapped by this method, the image is converted into a negative image when processing the bright image and then restored to a positive image after being processed by this method. Through this method, the bright image can also obtain reasonable brightness correction.

[0111] The negative image is defined as:

[0112]

[0113] Step 2.5, perform gamma correction on the sub-histogram of the interval to be corrected after trimming and stretching, and obtain a V channel image after brightness correction.

[0114] The power law formula for gamma correction is defined as:

[0115] V out =A*V in λ (twenty two)

[0116] Among them, V in is the input brightness value, A is a constant, λ is the gamma value, V out This paper is based on the gamma correction of quadrant dynamic clipping histogram. According to the clipped histogram and the remapped gamma correction result, the brightness is finally corrected to 0-L-1. The formula is:

[0117]

[0118] Where L-1 represents the highest gray value, l out Represents the corrected output brightness value, CDF 1 (l) represents the cumulative density and CDF of the gamma-corrected subhistogram in the dark area of ​​the V channel image. 2 (l) represents the cumulative density and CDF of the gamma-corrected subhistogram in the medium brightness area of ​​the V channel image. 3 (l) represents the cumulative density of the gamma-corrected subhistogram in the bright area of ​​the V channel image, which is obtained by the following formula:

[0119]

[0120]

[0121]

[0122] In the above formula, PDF 1 (l) represents the probability density of the gamma-corrected subhistogram in the dark area of ​​the V channel image, PDF 2 (l) represents the probability density of the gamma-corrected subhistogram in the medium brightness area of ​​the V channel image, PDF 3 (l) represents the probability density of the gamma-corrected subhistogram in the bright area of ​​the V channel image, which is obtained by the following formula:

[0123]

[0124]

[0125]

[0126] Among them, N 1 is the number of pixels in the dark area subhistogram of the V channel image, N 2is the number of pixels in the sub-histogram of the medium brightness area of ​​the V channel image, N 3 The number of pixels in the bright area subhistogram of the V channel image.

[0127] Step 3: Merge the brightness-corrected V channel image with the H channel image and the S channel image, and convert them from the HSV space back to the RGB space to obtain a brightness-corrected image in the RGB space.

[0128] Step 4: For the brightness correction image in the RGB space, perform channel fusion and enhancement on its G channel image and B channel image, and merge them with the R channel image to obtain the final enhanced image.

[0129] In medical endoscope images, the green channel contains arterial information and the blue channel contains part of the blood vessels and tissue information. By fusing the green channel and the blue channel, an image with the richest details of the medical endoscope image can be obtained. Using this image as an enhanced transmission map can achieve a good effect of medical endoscope image enhancement. The function model is defined as:

[0130] I(i,j)=J(i,j)*t(i,j)+A(1-t(i,j)) (30)

[0131] Among them, i and j represent the pixel positions of the image, I(i,j) is the input image to be enhanced, J(i,j) is the enhanced image, A is the global atmospheric light component, and t(i,j) is the transfer function.

[0132] Step 4.1, detail channel fusion:

[0133] The fusion method based on discrete wavelet transform is selected to decompose the G channel image and the B channel image, and then the low frequency and high frequency of the G channel image and the B channel image are fused respectively. The fusion formula of the low frequency is:

[0134]

[0135] Among them, LL g (i, j) is the low-frequency component of the G channel image, LL b (i, j) is the low-frequency component of the B channel image, LL f (i, j) represents the fused low-frequency image;

[0136] Since the absolute value of the high-frequency coefficient of the corresponding pixel position of the two images is larger, the more details are contained, so the high-frequency fusion formula is:

[0137]

[0138] Among them, || represents the absolute value, HH g(i, j) represents the high frequency coefficient of the G channel image, HH b (i, j) represents the high frequency coefficient of the B channel image, HH f (i, j) represents the high-frequency coefficients after fusion;

[0139] Then, the channel fused image F(i,j) is obtained through inverse wavelet transform.

[0140] The image after channel fusion is enhanced. The specific method is as follows:

[0141] Step 4.2, image enhancement:

[0142] From formula (30), we can get the image enhancement model as:

[0143]

[0144] Among them, J(i,j) is the enhanced image; F(i,j) is the image after channel fusion, that is, the image to be enhanced; t(i,j) is the transfer function;

[0145] The transfer function t(i,j) is:

[0146]

[0147] Where w represents the enhancement coefficient; t(i,j) and See the functional relationship between Figure 3 .

[0148] The method for setting the A value is as follows: first, take the top 0.1% of pixels from the image F(i, j) in ascending order of pixel value, then find the pixel values ​​at the corresponding positions in the original image to be enhanced, and take the average of these pixel values ​​as A.

[0149] Assume that the original image C to be enhanced is shown in Figure 4(a), and when the value of w is 1, the enhanced image C is shown in Figure 4(b). As shown in the image, the contrast of the enhanced image is significantly improved, but the image generally appears red and is distorted, which is a phenomenon of over-enhancement.

[0150] Combined with the function graph analysis of t(i,j) (see Figure 2 ), when the pixel value is low, I(i,j)-A is negative, and the corresponding t(i,j) value is also small, which will cause the value of J(i,j) to be negative. When the pixel value is high, the t(i,j) value should be increased. When the pixel value is medium, the enhanced pixel value should be maintained at medium intensity. At this time, the value of t(i,j) should be distributed between 0.4 and 0.6. Therefore, the enhancement coefficient w should be processed accordingly to obtain an ideal function model. According to Figure 2, substitute the equation into the function graph and solve w to generate the new t(i,j). The equation to solve for w listed in the graph is:

[0151]

[0152] Among them, a, h and p represent the horizontal coordinate or vertical coordinate value of the point in the image respectively. After solving, the result of w is:

[0153]

[0154] From the above results, a new transfer function t(i, j) can be obtained, with a value of 0.5 and h of 0.7, which enhances blood vessels and tissues without causing image distortion;

[0155] p=1-mean(F(i,j)) (37)

[0156] Among them, mean represents the pixel mean of image F(i,j).

[0157] The embodiment of the present invention also provides an image enhancement system based on brightness correction and fusion channel prior, see Figure 8 ,include:

[0158] A first space conversion module is used to convert the image to be enhanced from the RGB space to the HSV space;

[0159] A brightness correction module is used to perform brightness correction on the V channel image;

[0160] The second space conversion module is used to merge the brightness-corrected V channel image, the H channel image, and the S channel image, and convert the HSV space back to the RGB space to obtain a brightness-corrected image in the RGB space;

[0161] The image enhancement module is used to perform channel fusion and enhancement on the G channel image and the B channel image of the brightness correction image in the RGB space, and merge them with the R channel image to obtain the final enhanced image.

[0162] The method of the present invention was tested on endoscopic images with different brightness. The effect of the scheme of the present invention is illustrated by example: Figure 5(a)-Figure 5(b) For the images A and B to be enhanced, Figure 6(a)-Figure 6(b) are images A and B processed by other algorithms. Figure 7(a)-Figure 7(b) These are image A and image B processed by the method of the present invention.

[0163] It can be seen that traditional enhancement methods will cause excessive enhancement to produce artifacts and distortion. Using the method of the present invention to process endoscopic images can not only enhance the contrast of blood vessels and tissues, but also be applicable to endoscopic images of various brightness to maintain the naturalness of the image, thereby achieving better technical effects.

[0164] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0165] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An image enhancement method based on brightness correction and fusion channel prior, characterized in that: The following steps are involved: Convert the image to be enhanced from RGB space to HSV space; Perform brightness correction on the V channel image; The specific steps of performing brightness correction on the V channel image are: Step 2.1, divide the histogram of the V channel image into quadrants; Step 2.2, based on the quadrant division result, classify the V channel image into bright and dark types to obtain the brightness type of the V channel image; Step 2.3, based on the histogram quadrant division result and the brightness type of the V channel image, determine the interval to be corrected; Step 2.4, trim and stretch the sub-histogram of the interval to be corrected; Step 2.5, performing gamma correction on the sub-histogram of the interval to be corrected after trimming and stretching, to obtain a V channel image after brightness correction; In step 2.5, the method for performing gamma correction is: The cumulative density of the sub-histogram of the interval to be corrected after clipping is used as the gamma value, and the threshold of the sub-histogram of the interval to be corrected after stretching is used as the coefficient of gamma correction to perform gamma correction; The brightness-corrected V channel image is merged with the H channel image and the S channel image, and converted back from the HSV space to the RGB space to obtain a brightness-corrected image in the RGB space; For the brightness correction image in RGB space, the G channel image and the B channel image are channel fused and enhanced, and then merged with the R channel image to obtain the final enhanced image.

2. The image enhancement method based on brightness correction and fusion channel prior according to claim 1, characterized in that: In step 2.1, the method for dividing the histogram of the V channel image into quadrants is: Step 2.1.1, obtain the quadrant division threshold: Among them, i max and i min Represents the maximum and minimum grayscale values ​​of the input image, i d and i l are the two thresholds for quadrant segmentation, representing the dark threshold and the bright threshold respectively; Step 2.1.2: Based on the quadrant division threshold, divide the histogram of the V channel image into three sub-histograms h representing the gray value distribution. d (l), h m (l), h l′ (l), where h d (l) represents the dark sub-histogram, h m (l) represents the medium brightness subhistogram, h l′ (l) represents the bright particle histogram.

3. The image enhancement method based on brightness correction and fusion channel prior according to claim 2, characterized in that: In step 2.2, the method for classifying the V channel image into light and dark is: CDF max =max(CDF d ,max(CDF m ,CDF l )) Among them, CDF d is the dark subhistogram h d (l) The ratio of the number of pixels to the total number of pixels in the histogram of the V channel image, CDF m is the medium brightness subhistogram h m (l) The ratio of the number of pixels to the total number of pixels in the histogram of the V channel image, CDF l′ is the bright sub-histogram h l′ (l) The ratio of the number of pixels to the total number of pixels in the histogram of the V channel image, CDF max represents the maximum value of cumulative density; If CDF max Equal to CDF d , then the V channel image is a dark image. If CDF max Equal to CDF m , then the V channel image is a medium brightness image. If CDF max Equal to CDF l′ , then the V channel image is a bright image.

4. The image enhancement method based on brightness correction and fusion channel prior according to claim 3, characterized in that: In step 2.3, the method for determining the interval to be corrected is: Step 2.3.1: Determine the horizontal cutting threshold h based on the brightness type of the V channel image cut : Step 2.3.2: Use the horizontal threshold h cut The histogram of the V channel image is cut to obtain the thresholds i1 and i2 of the interval to be corrected, where i1 represents the low threshold of the interval to be corrected and i2 represents the high threshold of the interval to be corrected.

5. The image enhancement method based on brightness correction and fusion channel prior according to claim 4, characterized in that: In step 2.4, the method for trimming and stretching the sub-histogram of the interval to be corrected is: Determine the clipping threshold It is used to clip the subhistogram of the interval to be corrected to obtain a new subhistogram of the interval to be corrected after the clipping; the new subhistogram of the interval to be corrected is stretched by remapping.

6. The image enhancement method based on brightness correction and fusion channel prior according to claim 1, characterized in that: The specific steps of channel fusion are: The G channel image and the B channel image are decomposed, and then the low frequency and high frequency of the G channel image and the B channel image are fused respectively, and then the channel fused image F(i, j) is obtained by inverse wavelet transform.

7. The image enhancement method based on brightness correction and fusion channel prior according to claim 6, characterized in that: The image after channel fusion is enhanced, and the formula for image enhancement is: Among them, J(i, j) is the enhanced image; F(i, j) is the image after channel fusion, that is, the image to be enhanced; t(i, j) is the transfer function; A is a constant value.

8. An image enhancement system based on brightness correction and fusion channel prior, applied to an image enhancement method based on brightness correction and fusion channel prior as claimed in any one of claims 1 to 7, characterized in that: include: A first space conversion module is used to convert the image to be enhanced from the RGB space to the HSV space; A brightness correction module is used to perform brightness correction on the V channel image; The second space conversion module is used to merge the brightness-corrected V channel image, the H channel image, and the S channel image, and convert the HSV space back to the RGB space to obtain a brightness-corrected image in the RGB space; The image enhancement module is used to perform channel fusion and enhancement on the G channel image and the B channel image of the brightness correction image in the RGB space, and merge them with the R channel image to obtain the final enhanced image.

Citation Information

Cited By

  • Image video super-resolution enhancement method based on degradation generative adversarial network

    CN120746830A

  • Image and video super-resolution enhancement method based on degenerate generative adversarial network

    CN120746830B