Image enhancement method, vehicle, computer device, program product and storage medium
By converting RGB domain images to YUV domain, extracting illumination and brightness information, performing weighted processing, and adjusting the brightness and chromaticity maps, the problem of poor image quality in low-light environments is solved, resulting in a significant improvement in image quality.
Patent Information
- Application Number
- CN202510716280.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-10-17
AI Technical Summary
Current technology produces images of poor quality in low-light environments and needs improvement.
By converting the original RGB domain image to the YUV domain, extracting the luminance and chrominance maps, and using the illumination and luminance sensing modules to obtain illumination and relative luminance information, the luminance and chrominance maps are adjusted after weighted processing, and finally converted back to the RGB domain to improve image quality.
It significantly improves the peak signal-to-noise ratio and structural similarity index of the image, achieving better image enhancement results.
Smart Images

Figure CN120807373A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to an image enhancement method, a vehicle, a computer device, a program product and a storage medium. BACKGROUND
[0002] The purpose of low-illumination image enhancement is to improve or restore the perceptual quality (brightness, chrominance, texture details, etc.) of images collected in low-illumination environments. In related technologies, the image quality obtained in solving low-illumination image problems is poor, and needs to be improved. SUMMARY
[0003] Embodiments of the present application provide an image enhancement method, a vehicle, a computer device, a program product and a storage medium to at least partially solve the above technical problems.
[0004] To achieve the above object, according to a first aspect of the present application, an image enhancement method is provided, the method comprising:
[0005] obtaining an image in YUV domain according to an original image in RGB domain, the image in YUV domain comprising an original brightness map and an original chrominance map;
[0006] obtaining illumination information and relative brightness information of the original brightness map according to the original brightness map;
[0007] obtaining an adjusted brightness map according to the illumination information, the relative brightness information and the original brightness map;
[0008] obtaining an adjusted chrominance map according to the illumination information, the relative brightness information and the original chrominance map;
[0009] obtaining an adjusted image in RGB domain according to the adjusted brightness map and the adjusted chrominance map.
[0010] Optionally, after the obtaining illumination information and relative brightness information of the original brightness map according to the original brightness map, the method comprises:
[0011] obtaining a corrected chrominance map according to the original chrominance map and the adjusted brightness map;
[0012] The obtaining an adjusted chrominance map according to the illumination information, the relative brightness information and the original chrominance map comprises:
[0013] obtaining the adjusted chrominance map according to the illumination information, the relative brightness information, the original chrominance map and the corrected chrominance map.
[0014] Optionally, after the obtaining illumination information and relative brightness information of the original brightness map according to the original brightness map, the method comprises:
[0015] obtaining an enhanced luminance map after luminance enhancement according to the relative luminance information and the original luminance map;
[0016] obtaining the adjusted luminance map according to the illumination information, the relative luminance information and the original luminance map, comprises:
[0017] obtaining the adjusted luminance map according to the illumination information, the relative luminance information, the original luminance map and the enhanced luminance map.
[0018] Optionally, after obtaining the enhanced luminance map after luminance enhancement according to the relative luminance information and the original luminance map, comprises:
[0019] obtaining a non-noise point luminance map after noise reduction of the enhanced luminance map according to the enhanced luminance map, the relative luminance information and a noise reduction algorithm model;
[0020] obtaining the adjusted luminance map according to the illumination information, the relative luminance information, the original luminance map and the enhanced luminance map, comprises:
[0021] obtaining the adjusted luminance map according to the illumination information, the relative luminance information, the original luminance map and the non-noise point luminance map.
[0022] Optionally, before obtaining the image in YUV domain according to the original image in RGB domain, comprises:
[0023] when the scene illumination of the original image in RGB domain is lower than a preset threshold, enhancing the image luminance of the original image in RGB domain.
[0024] Optionally, when the scene illumination of the original image in RGB domain is lower than a preset threshold, enhancing the image luminance of the original image in RGB domain, comprises:
[0025] when the scene illumination of the original image in RGB domain is lower than a preset threshold, enhancing the image luminance of the original image in RGB domain by using a Gamma function.
[0026] Optionally, obtaining the illumination information and the relative luminance information of the original luminance map according to the original luminance map, comprises:
[0027] processing the original luminance map by using an illumination perception model to obtain the illumination information; and / or,
[0028] processing the original luminance map by using a luminance perception model to obtain the relative luminance information.
[0029] Optionally, the illumination perception model is a first deep learning model.
[0030] Optionally, the brightness perception model is a second deep learning model.
[0031] Optionally, the obtaining the adjusted brightness map according to the illumination information, the relative brightness information, and the original brightness map comprises:
[0032] performing first weighting processing on the original brightness map according to the illumination information and the relative brightness information to obtain the adjusted brightness map.
[0033] Optionally, the obtaining the adjusted colorimetric map according to the illumination information, the relative brightness information, and the original colorimetric map comprises:
[0034] performing second weighting processing on the original colorimetric map and the corrected colorimetric map according to the illumination information and the relative brightness information to obtain the adjusted colorimetric map.
[0035] Optionally, the obtaining the adjusted RGB domain image according to the adjusted brightness map and the adjusted colorimetric map comprises:
[0036] merging and converting the adjusted brightness map and the adjusted colorimetric map to obtain the adjusted RGB domain image.
[0037] Optionally, the obtaining the adjusted colorimetric map according to the illumination information, the relative brightness information, the original colorimetric map, and the corrected colorimetric map comprises:
[0038] performing second weighting processing on the original colorimetric map and the corrected colorimetric map according to the illumination information and the relative brightness information to obtain the adjusted colorimetric map.
[0039] Optionally, the obtaining the adjusted brightness map according to the illumination information, the relative brightness information, the original brightness map, and the enhanced brightness map comprises:
[0040] performing first weighting processing on the original brightness map and the enhanced brightness map according to the illumination information and the relative brightness information to obtain the adjusted brightness map.
[0041] Optionally, the obtaining the adjusted brightness map according to the illumination information, the relative brightness information, the original brightness map, and the non-noise point brightness map comprises:
[0042] performing first weighting processing on the original brightness map and the non-noise point brightness map according to the illumination information and the relative brightness information to obtain the adjusted brightness map.
[0043] Optionally, the denoised intensity map after enhancement of the enhanced intensity map is obtained according to the enhanced intensity map, the relative intensity information and a denoising algorithm model, and the method comprises the following steps of:
[0044] The enhanced intensity map and the relative intensity information are input into the denoising algorithm model to obtain noise distribution and noise intensity characteristics of the enhanced intensity map.
[0045] The enhanced intensity map is denoised according to the noise distribution and the noise intensity characteristics to obtain the denoised intensity map after enhancement of the enhanced intensity map.
[0046] Optionally, the step of inputting the enhanced intensity map and the relative intensity information into the denoising algorithm model to obtain noise distribution and noise intensity characteristics of the enhanced intensity map comprises the following steps of:
[0047] Noise point distribution information of the enhanced intensity map is established according to the relative intensity information and the enhanced intensity map.
[0048] Noise distribution and noise intensity characteristics of the enhanced intensity map are determined according to the noise point distribution information of the enhanced intensity map by using the denoising algorithm model.
[0049] Optionally, the step of establishing noise point distribution information of the enhanced intensity map according to the relative intensity information and the enhanced intensity map comprises the following steps of:
[0050] Noise point normal distribution information of the enhanced intensity map is established according to the relative intensity information and the enhanced intensity map.
[0051] The step of determining noise distribution and noise intensity characteristics of the enhanced intensity map according to the noise point distribution information of the enhanced intensity map by using the denoising algorithm model comprises the following steps of:
[0052] Noise distribution and noise intensity characteristics of the enhanced intensity map are determined according to the noise point normal distribution information of the enhanced intensity map by using the denoising algorithm model.
[0053] The application further provides a vehicle comprising the image enhancement device, wherein the device is used to execute the image enhancement method according to any one of the above.
[0054] The application further provides a computer device, characterized in that comprising:
[0055] at least one memory for storing a program;
[0056] at least one processor for executing the program stored in the memory, and when the program stored in the memory is executed, the processor is used to execute the image enhancement method according to any one of the above.
[0057] The application further provides a computer storage medium, wherein instructions are stored in the computer storage medium, and when the instructions are executed on a computer, the computer executes the image enhancement method according to any one of the above.
[0058] The application further provides a computer program product, comprising computer programs / instructions, wherein the computer programs / instructions are executed by a processor to implement the image enhancement method according to any one of the above.
[0059] In the application, the image enhancement method is reconstructed, the luminance graph of the YUV domain image is analyzed to extract the illumination information and the relative luminance information of the luminance graph of the image, then the luminance graph and the chrominance graph are adjusted according to the illumination information and the relative luminance information, the adjusted luminance graph and the chrominance graph are obtained, and finally the adjusted RGB domain image is obtained. Through the method, the peak signal-to-noise ratio and the structural similarity index of the image can be improved well, the image quality can be improved to a great extent, and better image enhancement effect can be achieved.
[0060] Other features and advantages of the application will be described in detail in the following specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can also be obtained according to these drawings without creative labor for those skilled in the art.
[0062] In order to more completely understand the application and its beneficial effects, the following will be described in conjunction with the drawings, wherein the same reference numerals in the following description represent the same parts.
[0063] Figure 1 is a flow chart of an image enhancement method provided in an exemplary embodiment of the present disclosure;
[0064] Figure 2 is a flow chart of another image enhancement method provided in an exemplary embodiment of the present disclosure (I);
[0065] Figure 3 is a flow chart of another image enhancement method provided in an exemplary embodiment of the present disclosure (II);
[0066] Figure 4 is a block diagram of an image enhancement method provided in an exemplary embodiment of the present disclosure (I);
[0067] Figure 5is another image enhancement method framework diagram (II) provided in the exemplary embodiments of the present disclosure. DETAILED DESCRIPTION
[0068] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0069] According to a first aspect of the present application, a low-illumination image enhancement method is provided, referring to Figures 1 to 5 , the method can include the following steps:
[0070] S1: obtaining a YUV domain image from an original image in RGB domain, the YUV domain image including an original luminance map and an original chrominance map;
[0071] Specifically, the RGB domain image can be converted to a YUV domain image based on the basic principle of color space conversion and the ITU.BT-601 conversion standard, and then separated by channel dimension to obtain the luminance map Y and the chrominance map U, V, specifically:
[0072]
[0073] In the formula, R, G, and B represent the two-dimensional matrix values of the three channels of the RGB domain image, Y is the converted original luminance map, and U and V are the converted original chrominance maps.
[0074] S2: obtaining illumination information and relative luminance information of the original luminance map from the original luminance map;
[0075] Specifically, the obtained luminance map Y can be input into an illumination perception module LM and a luminance perception module IAN composed of a down-sampling convolution layer, an up-sampling convolution layer, and a sigmoid activation function layer, to extract the illumination information and the relative luminance information, wherein the illumination information can be two illumination information weights, and the specific formula can be represented as:
[0076] W l ,W s =LM(Y)
[0077] L=IAN(Y)
[0078] In the formula, LM represents the illumination perception module, W l and W srespectively, and L represents the extracted relative brightness information. The illumination perception module and the brightness perception module can each be a convolutional neural network model algorithm model composed of a down-sampling convolutional layer, an up-sampling convolutional layer, and a sigmoid activation function layer. In addition, the two modules can also be other types of algorithms, which are not specifically limited herein and should be included in the protection scope of the present application.
[0079] S3: obtaining an adjusted brightness map according to the illumination information, the relative brightness information, and the original brightness map;
[0080] Specifically, the original brightness map Y can be subjected to first weighting processing according to the illumination information W (which can include two illumination information weights as described above) and the relative brightness information L to obtain an adjusted brightness map. Alternatively, other calculations and processing can be performed according to the above three information, which are not specifically limited herein. The following formula can be used for weighting calculation:
[0081] Y''' = (W s + L) x Y + [W l + (1-L)] x Y
[0082] In the formula, Y''' represents the adjusted brightness map obtained after weighting processing, W l and W s respectively represent the two extracted illumination information weights, and L represents the extracted relative brightness information.
[0083] S4: obtaining an adjusted color map according to the illumination information, the relative brightness information, and the original color map;
[0084] Specifically, the original color map can be subjected to second weighting processing according to the illumination information W and the relative brightness information L to obtain an adjusted color map. The following formula can be used for weighting calculation:
[0085] U'', V' = (W s + L) x (U, V) + [W l + (1-L)] x (U, V)
[0086] In the formula, U'' and V'' represent the adjusted color map, W l and W s respectively represent the two illumination information weights, and L represents the relative brightness information. U and V represent the original color map. Alternatively, other types of algorithms can be used for weighting or calculation methods other than weighting, which are not specifically limited herein.
[0087] S5: obtaining an adjusted RGB domain image according to the adjusted luminance map and the adjusted chrominance map.
[0088] After obtaining the adjusted luminance map Y"'and the adjusted chrominance map U" and V", then the YUV domain image can be converted into an RGB domain image based on the color space conversion principle and the ITU.BT-601 conversion standard, and the enhanced RGB image is obtained, specifically:
[0089]
[0090] In the formula, R', G', and B' represent the two-dimensional matrix values of the three channels of the converted RGB domain image, respectively.
[0091] In the present application, the image enhancement method is reconstructed, the luminance map of the YUV domain image is analyzed to extract the illumination information and the relative luminance information of the luminance map, and then the luminance map and the chrominance map are adjusted according to the illumination information and the relative luminance information, so as to obtain the adjusted luminance map and the adjusted chrominance map, and finally obtain the adjusted RGB domain image. Through this method, the peak signal-to-noise ratio and the structural similarity index of the image can be improved, and the image quality can be greatly improved to achieve better image enhancement effect.
[0092] As an optional implementation, referring to Figure 2 , after obtaining the illumination information and the relative luminance information of the original luminance map, S23: obtaining a corrected chrominance map according to the original chrominance map and the adjusted luminance map; S41: obtaining the adjusted chrominance map according to the illumination information W, the relative luminance information L, the original chrominance map, and the corrected chrominance map.
[0093] Specifically, the original chrominance map and the adjusted luminance map can be input into a color restoration module, the color information of the reconstructed chrominance map is guided to restore by the adjusted luminance map, and then a chrominance map with normal color is obtained to overcome the color degradation problem of low-illumination images, and the finally obtained chrominance map with normal color is used as the corrected chrominance map. Specifically, the following expression can be used to correct the chrominance map:
[0094] U', V' = CAN(Y" ', U, V)
[0095] In the formula, CAN represents a color restoration module, U' and V' represent the chrominance diagram obtained through the color restoration module, and U and V represent the original chrominance diagram. In a specific implementation, the color restoration module can be a convolutional neural network model algorithm model, which can be composed of a down-sampling convolutional layer, an up-sampling convolutional layer, and a sigmoid activation function layer. In addition, the color restoration module can be one or a combination of multiple algorithms such as a gray world algorithm, a perfect reflection algorithm, a generative adversarial network, and a color transfer algorithm, and the like, without specific limitation. Alternatively, the color difference restoration module can be a deep learning model, and the loss function of the model can adopt a smooth L2 loss. The color restoration loss can be represented as L CAN After obtaining the corrected gray-scale diagram, an adjusted chrominance diagram can be obtained according to the illumination information W, the relative brightness information L, the original chrominance diagram, and the corrected chrominance diagram. Specifically, the original chrominance diagram and the corrected chrominance diagram can be subjected to a second weighted calculation according to the illumination information W and the relative brightness information L. The related calculation can be referred to the following calculation formula:
[0096] U", V" = (W s + L) x (U, V) + [W l +(1-L)] x (U', V')
[0097] In the formula, U" and V" represent the adjusted chrominance diagram, W l and W s respectively represent two illumination information weights, L represents the relative brightness information, U and V represent the original chrominance diagram, and U' and V' represent the chrominance diagram obtained through the color restoration module. Specifically, other weighting algorithms can be used to perform a weighted calculation on the original chrominance diagram and the corrected chrominance diagram according to the illumination information W and the relative brightness information L, or other algorithms can be used to obtain an adjusted chrominance diagram, without specific limitation, which should be considered within the protection scope of the present application.
[0098] As an optional implementation, referring to Figure 2 , after obtaining the illumination information and the relative brightness information of the original brightness diagram, the method further includes S22: obtaining an enhanced brightness diagram after brightness enhancement according to the relative brightness information and the original brightness diagram.
[0099] Specifically, after obtaining the relative brightness information, the original brightness diagram can be subjected to brightness enhancement processing according to the relative brightness information. Specifically, the brightness diagram after brightness enhancement can be obtained by performing brightness enhancement on the brightness diagram according to the relative brightness information. The following formula can be referred to:
[0100]
[0101] L represents the relative brightness information, Y' represents the enhanced brightness graph after brightness enhancement, and Y represents the original brightness graph.
[0102] After obtaining the enhanced brightness graph after brightness enhancement, the obtaining of the adjusted brightness graph according to the illumination information W, the relative brightness information L and the original brightness graph Y can include S31: obtaining the adjusted brightness graph according to the illumination information W, the relative brightness information L, the original brightness graph Y and the enhanced brightness graph. Specifically, the original brightness graph Y and the enhanced brightness graph can be calculated by first weighting according to the illumination information W and the relative brightness information L, to obtain the adjusted brightness graph. The specific calculation formula can be referred to the following formula,
[0103] Y''' = (W s + L) x Y + [W l + (1-L)] x Y'
[0104] In the formula, Y''' represents the adjusted brightness graph after weighting processing, W l and W s respectively represent two illumination information weights extracted, L represents the relative brightness information extracted, and Y' represents the enhanced brightness graph. Specifically, other weighting algorithms can also be used to calculate the original brightness graph Y and the enhanced brightness graph according to the illumination information W and the relative brightness information L, or other adjustment algorithms can be used to obtain the adjusted brightness graph, which is not limited herein and should be considered within the protection scope of the present application.
[0105] As an optional implementation, referring to Figure 3 , after obtaining the enhanced brightness graph after brightness enhancement according to the relative brightness information and the original brightness graph, S222 is included: obtaining the noise-free brightness graph after denoising according to the enhanced brightness graph, the relative brightness information and the denoising algorithm model; and S311 is included: obtaining the adjusted brightness graph according to the illumination information W, the relative brightness information L, the original brightness graph Y and the noise-free brightness graph Y''.
[0106] Specifically, the denoising algorithm model can be a traditional spatial domain filtering algorithm such as median filtering and bilateral filtering, or a transform domain denoising algorithm such as wavelet threshold denoising and frequency domain low-pass filtering, or a statistical and optimization algorithm model such as non-local mean and BM3D (block matching 3D), or a deep learning model such as a deep residual network and a physics-guided network, or a hybrid method such as wavelet-deep learning fusion, which are not specifically limited herein and should all be considered within the protection scope of the present application. After obtaining the enhanced brightness map, the denoised non-noise point brightness map can be obtained according to the enhanced brightness map and the denoising algorithm model. Specifically, the enhanced brightness map and the relative brightness information can be input into the denoising algorithm model for calculation to obtain the denoised non-noise point brightness map. Optionally, the denoising algorithm model can be a deep learning model, and the model loss function can use a smooth L2 loss, which can be expressed as noise loss L NS .
[0107] After obtaining the non-noise point brightness map, the original brightness map Y and the non-noise point brightness map Y" can be first weighted calculated according to the illumination information W and the relative brightness information L to obtain an adjusted brightness map. The specific calculation formula can be seen in the following formula,
[0108] Y'" = (W s + L) x Y + [W l + (1-L)] x Y"
[0109] In the formula, Y'" represents the adjusted brightness map obtained after the weighting processing, W l and W s respectively represent the two extracted illumination information weights, L represents the extracted relative brightness information, and Y" is the non-noise point brightness map. Specifically, other weighting algorithms can also be used to perform weighted calculation on the original brightness map Y and the non-noise point brightness map according to the illumination information W and the relative brightness information L, or other adjustment algorithms can be used to obtain an adjusted brightness map, which are not specifically limited herein and should all be considered within the protection scope of the present application.
[0110] As an optional implementation, referring to Figure 3 、 Figure 5 , before obtaining the low-illumination image in the YUV domain according to the low-illumination image in the RGB domain, the method comprises S110: when the scene illumination of the low-illumination image in the RGB domain is lower than a preset threshold, the image brightness of the low-illumination image in the RGB domain is improved.
[0111] Specifically, the brightness fitting curve formula can be used to determine whether the scene illumination corresponding to the RGB domain image is lower than 10 Lux, and if so, the adaptive Gamma function is used to preliminarily improve the image brightness, specifically as follows:
[0112] Lux = 1.747e -10 x 5 -3.963e -7 x 4 +0.0003503x 3 -0.1501x 2 +31.17x-2509
[0113] In the formula, x represents the image gray mean value, and Lux represents the corresponding scene illumination.
[0114] As an optional implementation, the method for improving the image brightness of the low-illumination image in the RGB domain comprises: using an adaptive Gamma function to improve the image brightness of the low-illumination image in the RGB domain.
[0115] Specifically, when it is determined that the RGB image belongs to a low-illumination image, an adaptive Gamma function can be used to improve the image brightness of the low-illumination image in the RGB domain, and specifically comprises:
[0116] determining a Gamma value for adaptive Gamma correction, specifically comprising:
[0117]
[0118] In the formula, Ga represents the Gamma value, and img’ represents the image obtained after adaptive Gamma correction.
[0119] As an optional implementation, referring to Figure 3 、 Figure 5 According to the original brightness image, the illumination information and the relative brightness information of the original brightness image are obtained, comprising S211: using an illumination perception model to process the original brightness image to obtain the illumination information; using a brightness perception model to process the original brightness image to obtain the relative brightness information. As an optional implementation, the illumination perception model can be a first deep learning model, which can be one or more of an improved Retinex illumination estimation algorithm, a double Gaussian difference filtering model, a light source screening algorithm based on light path projection, a deep learning illumination perception model, a sensitivity model based on an S-shaped function, a non-local mean illumination correction, etc., which are not specifically limited here. Specifically, the illumination perception model can be a deep learning model composed of a down-sampling convolution layer, an up-sampling convolution layer and a sigmoid activation function layer. The model loss function can use smooth L2 loss, which can be represented as illumination loss L l_m .
[0120] As an optional implementation, the brightness perception model is a second deep learning model, which can be one or more of a deep learning adaptive model, a color space conversion model, an inverse ray tracing physical model, a human brightness perception gradient model, a multi-dimensional index fusion model based on an HDR image, etc., which is not specifically limited herein. Specifically, the brightness perception model can be a deep learning model, the model loss uses a smooth L2 loss, and the model loss function can be represented as a relative brightness loss L IAN .
[0121] As an optional implementation, referring to Figure 3 、 Figure 5 , the adjusted brightness graph is obtained according to the illumination information W, the relative brightness information L, and the original brightness graph Y, which includes: performing first weighting processing on the original brightness graph Y according to the illumination information W and the relative brightness information L to obtain the adjusted brightness graph. As an optional implementation, the adjusted brightness graph is obtained by performing weighting processing on the original brightness graph Y according to the illumination information W and the relative brightness information L, which can be calculated by the following formula:
[0122] Y''' = (W s + L) x Y + [W l + (1-L)] x Y
[0123] In the formula, Y''' represents the adjusted brightness graph obtained by weighting processing, W l and W s respectively represent the two illumination information weights extracted, L represents the relative brightness information extracted, and Y is the original brightness graph.
[0124] As an optional implementation, referring to Figure 3 、 Figure 5 , the adjusted color graph is obtained according to the illumination information W, the relative brightness information L, and the original color graph, which includes: performing second weighting processing on the original color graph according to the illumination information W and the relative brightness information L to obtain the adjusted color graph. As an optional implementation, the adjusted color graph is obtained by performing weighting processing on the original color graph according to the illumination information W and the relative brightness information L, which is calculated by the following formula:
[0125] U'', V'' = (W s + L) x (U, V) + [W l + (1-L)] x (U, V)
[0126] In the formula, U'' and V'' represent the adjusted color graph, W l and W srespectively represent two illumination information weights, L represents relative luminance information, and U and V represent original chrominance maps. Specifically, other types of algorithms can also be used for weighting or calculation methods other than weighting, which are not specifically limited herein.
[0127] As an optional implementation, referring to Figure 3 、 Figure 5 , the adjusted RGB domain image is obtained according to the adjusted luminance map and the adjusted chrominance map, including: merging and converting the adjusted luminance map and the adjusted chrominance map to obtain the adjusted RGB domain image.
[0128] After obtaining the adjusted luminance map Y''' and the adjusted chrominance map U'' and V'', then the YUV domain image is converted into the RGB domain image based on the color space conversion principle and the ITU.BT-601 conversion standard, and the enhanced RGB image is obtained by merging in the channel dimension, specifically:
[0129]
[0130] In the formula, R', G', and B' respectively represent the two-dimensional matrix values of the three channels of the converted RGB domain image.
[0131] As an optional implementation, referring to Figure 3 、 Figure 5 , the adjusted chrominance map is obtained according to the illumination information W, the relative luminance information L, the original chrominance map, and the corrected chrominance map, including: performing second weighting processing on the original chrominance map and the corrected chrominance map according to the illumination information W and the relative luminance information L to obtain the adjusted chrominance map. Specifically, the original chrominance map and the adjusted luminance map can be input into a color restoration module, the color information of the reconstructed chrominance map is guided to restore by the adjusted luminance map, and then a color normal chrominance map is obtained to overcome the color degradation problem of the low-illumination image. The finally obtained color normal chrominance map is the finally corrected chrominance map. Specifically, the following expression can be used for the correction of the chrominance map:
[0132] U', V' = CAN(Y''', U, V)
[0133] In the formula, CAN represents a color restoration module, U' and V' represent the chrominance diagram obtained through the color restoration module, and U and V represent the original chrominance diagram. In a specific implementation, the color restoration module can be a convolutional neural network model algorithm model, which can be composed of a down-sampling convolutional layer, an up-sampling convolutional layer, and a sigmoid activation function layer. In addition, the color restoration module can be one or a combination of multiple algorithms such as a gray world algorithm, a perfect reflection algorithm, a generative adversarial network, and a color transfer algorithm, and the like, without specific limitation. As an optional implementation, the original chrominance diagram and the corrected chrominance diagram are subjected to second weighting processing according to the illumination information W and the relative brightness information L to obtain an adjusted chrominance diagram, which is calculated using the following formula:
[0134] U", V" = (W s + L) x (U, V) + [W l +(1-L)] x (U', V')
[0135] In the formula, U" and V" represent the adjusted chrominance diagram, W l and W s represent two illumination information weights, L represents the relative brightness information, U and V represent the original chrominance diagram, and U' and V' represent the chrominance diagram obtained through the color restoration module. Specifically, other weighting algorithms can also be used to calculate the original chrominance diagram and the corrected chrominance diagram according to the illumination information W and the relative brightness information L, or other algorithms can be used to obtain the adjusted chrominance diagram, without specific limitation, which should be considered within the protection scope of the present application.
[0136] As an optional implementation, referring to Figure 3 , Figure 5 , the adjusted brightness diagram is obtained according to the illumination information W, the relative brightness information L, the original brightness diagram Y, and the enhanced brightness diagram, which includes weighting processing of the original brightness diagram Y and the enhanced brightness diagram according to the illumination information W and the relative brightness information L to obtain the adjusted brightness diagram. As an optional implementation, the original brightness diagram Y and the enhanced brightness diagram are subjected to first weighting processing according to the illumination information W and the relative brightness information L to obtain the adjusted brightness diagram, which is calculated using the following formula:
[0137] Y"'= (W S + L) x Y + [W l +(1-L)] x Y'
[0138] Specifically, after obtaining the relative brightness information, the original brightness diagram can also be subjected to brightness enhancement processing according to the relative brightness information. Specifically, the brightness diagram is subjected to brightness enhancement according to the relative brightness information to obtain the brightness-enhanced brightness diagram, which can be seen from the following formula:
[0139]
[0140] L represents the extracted relative brightness information, Y' represents the enhanced brightness graph after brightness enhancement, and Y represents the original brightness graph.
[0141] After obtaining the enhanced brightness graph after brightness enhancement, the obtaining of the adjusted brightness graph according to the illumination information W, the relative brightness information L and the original brightness graph Y can include: obtaining the adjusted brightness graph according to the illumination information W, the relative brightness information L, the original brightness graph Y and the enhanced brightness graph. Specifically, the original brightness graph Y and the enhanced brightness graph can be calculated by first weighting according to the illumination information W and the relative brightness information L to obtain the adjusted brightness graph, and the specific calculation formula can be referred to the following formula,
[0142] Y''' = (W + L) x Y + [W + (1-L)] x Y' S +L) x Y + [W + (1-L)] x Y' l
[0143] In the formula, Y''' represents the adjusted brightness graph after weighting processing, W l and W s respectively represent the two extracted illumination information weights, L represents the extracted relative brightness information, and Y' represents the enhanced brightness graph. Specifically, other weighting algorithms can also be used to calculate the original brightness graph Y and the enhanced brightness graph according to the illumination information W and the relative brightness information L, or other adjustment algorithms can be used to obtain the adjusted brightness graph, which is not limited herein and should be considered within the protection scope of the present application.
[0144] As an optional implementation, the obtaining of the noise-free brightness graph after the enhanced brightness graph is denoised according to the enhanced brightness graph, the relative brightness information and a denoising algorithm model includes: inputting the enhanced brightness graph and the relative brightness information into the denoising algorithm model to obtain noise distribution and noise intensity characteristics of the enhanced brightness graph; and performing denoising processing on the enhanced brightness graph according to the noise distribution and the noise intensity characteristics to obtain the noise-free brightness graph after the enhanced brightness graph is denoised.
[0145] Optionally, inputting the enhanced brightness graph and the relative brightness information into the denoising algorithm model to obtain noise distribution and noise intensity characteristics of the enhanced brightness graph can be to select any one of the above denoising algorithm models to obtain noise distribution and noise intensity characteristics according to the relative brightness information.
[0146] As an optional implementation, the inputting the enhanced brightness graph and the relative brightness information into the denoising algorithm model to obtain the noise distribution and noise intensity feature of the enhanced brightness graph comprises: establishing noise point distribution information of the enhanced brightness graph according to the relative brightness information and the enhanced brightness graph; and determining the noise distribution and noise intensity feature of the enhanced brightness graph according to the noise point distribution information of the enhanced brightness graph by using the denoising algorithm model.
[0147] Optionally, the noise point distribution information can be normal distribution, skewness, dispersion state, multi-modal and other distribution forms, which are not limited here. In a specific implementation, the noise point normal distribution information of the enhanced brightness graph can be established according to the relative brightness information and the enhanced brightness graph, and then the noise distribution and noise intensity feature of the enhanced brightness graph can be obtained by using the denoising algorithm model.
[0148] As an optional implementation, referring to Figure 3 , Figure 5 Figure 3 Figure 5 According to the enhanced brightness graph and the denoising algorithm model, the noise-free brightness graph after denoising is obtained, which comprises: creating normal distribution noise points according to the relative brightness information; as an optional implementation, the creating normal distribution noise points according to the relative brightness information can be calculated by using the following formula:
[0149] {σ}=λe -L ,λ∈(0,0.5,1.0)
[0150] The noise distribution and intensity feature of the enhanced brightness graph are predicted according to the normal distribution noise points by using the denoising algorithm model; the noise distribution and intensity feature of the enhanced brightness graph are predicted according to the normal distribution noise points by using the denoising algorithm model, which can be calculated by using the following formula:
[0151] {σ'}=NS(Y',{σ})
[0152] The enhanced brightness graph is denoised according to the noise distribution and intensity feature to obtain the noise-free brightness graph after denoising; the enhanced brightness graph is denoised according to the noise distribution and intensity feature to obtain the noise-free brightness graph after denoising, which can be calculated by using the following formula:
[0153] {Y”}=Y'-{σ'}
[0154] In the formula, sigma is a normal distribution variance, lambda is a noise intensity threshold value, the noise intensity threshold value used in the embodiment of the application is (0, 0.5, 1.0), NS represents a denoising algorithm module, sigma' represents a noise distribution predicted by the denoising module, and Y'' represents a denoised point brightness graph after removing the noise component. The denoising algorithm model can be a traditional spatial domain filtering algorithm such as median filtering and bilateral filtering, or a transform domain denoising algorithm such as wavelet threshold denoising and frequency domain low-pass filtering, or a statistical and optimization algorithm model such as non-local mean and BM3D (block matching 3D), or a deep learning model such as a deep residual network and a physics-guided network, or a hybrid method such as wavelet-deep learning fusion, which are not specifically limited here and should all be considered within the protection scope of the application.
[0155] Finally, the loss function of the entire network is divided into four parts: illumination loss L l_m , relative brightness loss L IAN , noise distribution loss L NS , and color restoration loss L CAN , all of which use smooth L2 loss. The final objective function is:
[0156] L = L l_m + L INS + L NS + L CAN
[0157] By optimizing L to reach a convergence state, the trained model is finally used to enhance low-illumination images.
[0158] The application also provides a vehicle comprising an image enhancement device, wherein the device is configured to perform the image enhancement method according to any one of the preceding embodiments.
[0159] The application also provides a computer device, characterized in that it comprises:
[0160] at least one memory for storing a program;
[0161] at least one processor for executing the program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to perform the image enhancement method according to any one of the preceding embodiments.
[0162] The application also provides a computer storage medium, wherein instructions are stored in the computer storage medium, and when the instructions are run on a computer, the computer is caused to perform the image enhancement method according to any one of the preceding embodiments.
[0163] The application further provides a computer program product, comprising computer programs / instructions, wherein the computer programs / instructions are executed by a processor to implement the image enhancement method according to any one of the preceding embodiments.
[0164] The application further provides a vehicle, comprising a collision detection device, wherein the device is used to execute the collision detection method according to any one of the preceding embodiments.
[0165] The application further provides a computer device, comprising:
[0166] at least one memory for storing programs;
[0167] at least one processor for executing the programs stored in the memory, wherein the processor is used to execute the collision detection method according to any one of the preceding embodiments when the programs stored in the memory are executed.
[0168] The application further provides a computer storage medium, wherein instructions are stored in the computer storage medium, and the instructions are used to make a computer execute the collision detection method according to any one of the preceding embodiments when the instructions are executed on the computer.
[0169] The application further provides a computer program product, comprising computer programs / instructions, wherein the computer programs / instructions are executed by a processor to implement the collision detection method according to any one of the preceding embodiments.
[0170] In the description of the application, the terms “first”, “second” are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with “first”, “second” can be explicitly or implicitly included one or more features. In the description of the application, the meaning of “multiple” is two or more, unless otherwise specifically limited.
[0171] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0172] The embodiments, implementation manners and related technical features of the application can be combined or replaced with each other without conflict.
[0173] The above is only the preferred embodiments of the application, and does not limit the application in any form, but any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the application, without departing from the technical solution of the application, still belongs to the scope of the technical solution of the application.
Claims
1. An image enhancement method, characterized in that: The method comprises: Obtaining an image in a YUV domain according to an original image in the RGB domain, wherein the image in the YUV domain includes an original luminance image and an original chromaticity image; Obtaining illumination information and relative brightness information of the original brightness image according to the original brightness image; Obtaining an adjusted brightness map according to the illumination information, the relative brightness information, and the original brightness map; Obtaining an adjusted chromaticity diagram according to the illumination information, the relative brightness information, and the original chromaticity diagram; An adjusted RGB domain image is obtained according to the adjusted luminance image and the adjusted chromaticity image.
2. The image enhancement method according to claim 1, wherein: After obtaining the illumination information and relative brightness information of the original brightness map according to the original brightness map, the method further includes: Obtaining a corrected chromaticity diagram according to the original chromaticity diagram and the adjusted luminance diagram; The step of obtaining an adjusted chromaticity diagram according to the illumination information, the relative brightness information, and the original chromaticity diagram includes: The adjusted chromaticity diagram is obtained according to the illumination information, the relative brightness information, the original chromaticity diagram and the corrected chromaticity diagram.
3. The image enhancement method according to claim 1, wherein: After obtaining the illumination information and relative brightness information of the original brightness map according to the original brightness map, the method further includes: Obtaining an enhanced brightness map after brightness enhancement according to the relative brightness information and the original brightness map; The step of obtaining an adjusted brightness map according to the illumination information, the relative brightness information, and the original brightness map includes: The adjusted brightness map is obtained according to the illumination information, the relative brightness information, the original brightness map and the enhanced brightness map.
4. The image enhancement method according to claim 3, characterized in that After obtaining the enhanced brightness map after brightness enhancement according to the relative brightness information and the original brightness map, the method includes: Obtaining a noise-free brightness image after denoising the enhanced brightness image according to the enhanced brightness image, the relative brightness information, and a denoising algorithm model; The step of obtaining the adjusted brightness map according to the illumination information, the relative brightness information, the original brightness map, and the enhanced brightness map includes: An adjusted brightness map is obtained according to the illumination information, the relative brightness information, the original brightness map, and the noise-free brightness map.
5. The image enhancement method according to claim 1, wherein: Before obtaining the YUV domain image based on the original image in the RGB domain, the method includes: When the scene illumination of the original image in the RGB domain is lower than a preset threshold, the image brightness of the original image in the RGB domain is increased.
6. The image enhancement method according to claim 5, characterized in that: When the scene illumination of the original image in the RGB domain is lower than a preset threshold, increasing the image brightness of the original image in the RGB domain includes: When the scene illumination of the original image in the RGB domain is lower than a preset threshold, the image brightness of the original image in the RGB domain is increased using a Gamma function.
7. The image enhancement method according to claim 1, wherein: Obtaining illumination information and relative brightness information of the original brightness map according to the original brightness map, including: Processing the original brightness image using a light perception model to obtain the light information; and / or, The original brightness image is processed using a brightness perception model to obtain the relative brightness information.
8. The image enhancement method according to claim 7, characterized in that: The light perception model is the first deep learning model.
9. The image enhancement method according to claim 7, wherein: The brightness perception model is the second deep learning model.
10. The image enhancement method according to claim 1, wherein: The step of obtaining an adjusted brightness map according to the illumination information, the relative brightness information, and the original brightness map includes: A first weighted processing is performed on the original brightness map according to the illumination information and the relative brightness information to obtain the adjusted brightness map.
11. The image enhancement method according to claim 1, wherein: The step of obtaining an adjusted chromaticity diagram according to the illumination information, the relative brightness information, and the original chromaticity diagram includes: A second weighted processing is performed on the original chromaticity diagram according to the illumination information and the relative brightness information to obtain the adjusted chromaticity diagram.
12. The image enhancement method according to claim 1, wherein: The step of obtaining the adjusted RGB domain image according to the adjusted luminance map and the adjusted chromaticity map includes: The adjusted luminance image and the adjusted chromaticity image are merged and converted to obtain the adjusted RGB domain image.
13. The image enhancement method according to claim 2, wherein: The step of obtaining the adjusted chromaticity diagram according to the illumination information, the relative brightness information, the original chromaticity diagram, and the corrected chromaticity diagram includes: A second weighted processing is performed on the original chromaticity diagram and the corrected chromaticity diagram according to the illumination information and the relative brightness information to obtain the adjusted chromaticity diagram.
14. The image enhancement method according to claim 3, wherein: The step of obtaining the adjusted brightness map according to the illumination information, the relative brightness information, the original brightness map, and the enhanced brightness map includes: A first weighted processing is performed on the original brightness map and the enhanced brightness map according to the illumination information and the relative brightness information to obtain the adjusted brightness map.
15. The image enhancement method according to claim 4, characterized in that: Obtaining an adjusted brightness map according to the illumination information, the relative brightness information, the original brightness map, and the noise-free brightness map, including: A first weighted processing is performed on the original brightness map and the noise-free brightness map according to the illumination information and the relative brightness information to obtain the adjusted brightness map.
16. The image enhancement method according to claim 4, wherein: Obtaining a noise-free brightness image after denoising the enhanced brightness image according to the enhanced brightness image, the relative brightness information, and a denoising algorithm model, including: Inputting the enhanced brightness image and the relative brightness information into the denoising algorithm model to obtain noise distribution and noise intensity characteristics of the enhanced brightness image; The enhanced brightness image is denoised according to the noise distribution and the noise intensity characteristics to obtain a noise-free brightness image after the enhanced brightness image is denoised.
17. The image enhancement method according to claim 16, wherein: Inputting the enhanced brightness image and the relative brightness information into the denoising algorithm model to obtain noise distribution and noise intensity characteristics of the enhanced brightness image includes: Establishing noise distribution information of the enhanced brightness map according to the relative brightness information and the enhanced brightness map; The noise distribution and noise intensity characteristics of the enhanced brightness image are determined according to the noise distribution information of the enhanced brightness image using the denoising algorithm model.
18. The image enhancement method according to claim 17, wherein: The step of establishing noise distribution information of the enhanced brightness map according to the relative brightness information and the enhanced brightness map includes: Establishing normal distribution information of noise points of the enhanced brightness map according to the relative brightness information and the enhanced brightness map; The step of determining the noise distribution and noise intensity characteristics of the enhanced brightness image according to the noise distribution information of the enhanced brightness image using the denoising algorithm model includes: The noise distribution and noise intensity characteristics of the enhanced brightness image are determined according to the normal distribution information of the noise points of the enhanced brightness image using the denoising algorithm model.
19. A vehicle, characterized in that: The vehicle comprises an image enhancement device, wherein the device is configured to execute the image enhancement method according to any one of claims 1 to 18.
20. A computer device, characterized in that: include: at least one memory for storing a program; At least one processor is used to execute the program stored in the memory, and when the program stored in the memory is executed, the processor is used to execute the image enhancement method according to any one of claims 1 to 18.
21. A computer storage medium storing instructions, wherein when the instructions are executed on a computer, the computer executes the image enhancement method according to any one of claims 1 to 18.
22. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the image enhancement method according to any one of claims 1 to 18 is implemented.
Citation Information
Cited By
Image enhancement method, computer equipment and readable storage medium
CN122023221A