Combination method, system and device for low-light enhancement and color temperature correction of RGB image
By using a deep learning network based on RGB images for low-light enhancement and color temperature correction, the problems of noise amplification and color distortion in low-light enhancement methods are solved, improving processing efficiency and accuracy and simplifying the calculation process.
Patent Information
- Application Number
- CN202510448801.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-04-10
AI Technical Summary
In existing technologies, low-light enhancement methods for images are prone to noise amplification, loss of detail and color distortion. Furthermore, deep learning models have low processing efficiency and high computational complexity when multiple tasks are combined.
A deep learning network based on RGB images is used to separate dark and bright images through grayscale histogram statistics. Low light enhancement is performed using a deep neural network of transformer and CNN, and color temperature correction is performed by combining a multi-level CNN decoding network. This simplifies the process to RGB image processing and reduces the amount of computation.
It improves the accuracy and efficiency of image processing, reduces computational complexity, enhances system stability and adaptability, simplifies the data acquisition process, and solves the problems of noise amplification and color distortion in traditional methods.
Smart Images

Figure CN120298286B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a combination method, system and device for RGB image low-light enhancement and color temperature correction. BACKGROUND
[0002] The main difficulty of low-light image enhancement is how to effectively improve the image brightness while avoiding noise amplification, detail loss and color distortion. The traditional histogram equalization method is simple and widely used, but it can easily lead to image detail blur and color shift. The Retinex model is limited by assumptions and has poor effect in actual application and slow calculation. Therefore, the method based on deep learning network can achieve better accuracy, robustness and speed, and further combining it with color temperature correction can make the system function more abundant, and at the same time, strengthen the system's correction ability for low-light images and improve the accuracy.
[0003] Color constancy is the ability of the human visual system to perceive the color of an object under different lighting conditions, so that the color of the object remains relatively stable under different light sources. The method based on statistics relies on the assumptions and statistical information of the image, and the implementation is simple, but it is unstable under complex lighting conditions and the performance is limited. The method based on deep learning technology can provide better robustness and accuracy and has stronger adaptability. Most methods process problems in the RAW domain (i.e. the original image data obtained by the camera sensor), but for RAW images, the data volume is very large, which increases the operation pressure. In comparison, the operation pressure of RGB images is much smaller, and the data acquisition is also simpler and more common.
[0004] The method of deep learning can automatically process low-light enhancement and color temperature adjustment, which is based on deep learning and has excellent performance. This technology usually learns the mapping relationship from the input image to the target image, but the existing technology model is too large and the generalization ability needs to be improved. Therefore, in practical application, how to improve the processing efficiency when combining multiple tasks is another problem to be solved. SUMMARY
[0005] In order to overcome the above technical defects in the existing image low-light enhancement and color temperature adjustment process, the present application provides a combination method, system and device for RGB image low-light enhancement and color temperature correction, which aims to solve the problems of large technical model size, low processing accuracy in some scenes and low calculation efficiency in the prior art, and to improve the processing accuracy while enhancing the system operation efficiency and adaptability. In order to achieve the above purpose, the present application realizes the following technical scheme:
[0006] A combination method for RGB image low-light enhancement and color temperature correction, comprising the steps of:
[0007] Step S1, acquiring RGB images of a scene by using an RGB image device, pre-processing the RGB images to obtain an input data set I0 of the RGB images;
[0008] Step S2, performing luminance discrimination on each image in the input data set I0 by using a gray histogram statistical method, obtaining a dark image data set I dark that needs to be enhanced in low light and a bright image data set I light that does not need to be enhanced in low light;
[0009] Step S3, performing light enhancement on the dark image data set I dark based on a deep neural network enhancement model, obtaining a light-enhanced image data set I enLight ;
[0010] Step S4, merging the light-enhanced image data set I enLight and the bright image data set I light in a union set manner to obtain a merged image data set I1;
[0011] Step S5, correcting the color temperature of the images in the merged image data set I1 based on a deep network-driven color temperature adjustment method, and outputting a color temperature-corrected image data set I WB ;
[0012] Step S6, processing the color temperature-corrected image data set I WB by using a bilinear interpolation method to restore the original resolution of the images in the color temperature-corrected image data set I WB .
[0013] Preferably, the implementation of the input data set I0 of the RGB images in step S1 specifically includes:
[0014] adjusting the number of horizontal pixels or the number of vertical pixels of the RGB images singly, keeping the scaling ratio of the RGB images unchanged, and limiting the number of horizontal pixels and the number of vertical pixels of the RGB images to be between [R min , R max ]; and further obtaining the input data set I0 of the RGB images:
[0015] I0={I1,I2,I3,…,I i} Formula 1
[0016] wherein, R min represents the minimum number of pixels, R max represents the maximum number of pixels, R min is set to 512 pixels, and R max is set to 2048 pixels; I iLet i represent the i-th image in the input dataset I0, where i is a non-zero natural number.
[0017] Preferably, in step S2, the dark image dataset I that needs to be enhanced for low-light conditions is obtained. dark The specific implementation methods include:
[0018] Step S21: Extract each image I from the input dataset I0. i Convert to the corresponding grayscale image I gray ;
[0019] Step S22: Process the grayscale image I gray The pixel grayscale values are statistically analyzed to obtain a statistical histogram;
[0020] Step S23: Set the threshold k for pixel grayscale values. d A value of 50 sets the pixel grayscale value to the threshold k. d The following pixels are classified as dark pixels;
[0021] Step S24: Based on the statistical results of dark pixels, determine the proportion of pixels that need low-light enhancement in each image within the input dataset I0;
[0022] If more than 70% of the pixels in an image require low-light enhancement, the image is defined as a dark image.
[0023] Step S25: Select the dark images from the input dataset I0 to form a dark image dataset I that needs low-light enhancement. dark :
[0024] I dark ={I i |i=1,2,...,N dark} Formula 2
[0025] In the formula, I i Represents the dark image dataset I dark Any dark image within N dark Represents a non-zero natural number.
[0026] Preferably, step S24 further includes the step of: if the proportion of pixels requiring low-light enhancement in an image does not exceed 70%, then the image is defined as a bright image;
[0027] Step S25 further includes the step of: assembling a bright image dataset I from the unselected bright images within the input dataset I0, which does not require low-light enhancement. light .
[0028] Preferably, in step S3, the light-enhanced image dataset I is obtained. enLight The specific implementation methods include:
[0029] Step S31, the transformer and CNN-based deep neural network enhancement model is used to process the dark image dataset I dark Step S32, for each dark image, the adjustment parameter map A is obtained by aggregating the adjustment parameters a of each pixel position.
[0030] Step S32, for each dark image, the adjustment parameter map A is obtained by aggregating the adjustment parameters a of each pixel position. n (x);
[0031] Step S33, low-light enhancement is performed on the dark image dataset I n (x) according to the obtained adjustment parameter map A dark (x) is iterated according to formula 3:
[0032] E n (x) = E n-1 (x) + A n (x) * E n-1 (x) * [1-E n-1 (x)] formula 3
[0033] wherein n is the number of iterations and is set to n = 8, x represents the position of each pixel, E n (x) is the image after n times of iteration enhancement, E n-1 (x) is the image after n-1 times of iteration enhancement.
[0034] Step S34, the light-enhanced image dataset I enLight is obtained.
[0035] I enLight = {E(m i ; A i ) | i = 1, 2,..., N} formula 4
[0036] wherein m i represents the image before enhancement, A i represents the corresponding pixel-level adjustment parameter map, E(m i ; A i ) represents a single element in the light-enhanced image dataset I enLight .
[0037] Preferably, the implementation of the step S5 of outputting the color temperature image dataset I WB after color temperature correction specifically includes:
[0038] Step S51, input each image in the merged image dataset I1 into an encoder for image encoding processing, map the image after image encoding processing to a high-dimensional feature space, and generate the corresponding feature map.
[0039] Step S52, the image encoding is decoded by using a multi-level CNN decoding network, and the decoded image is mapped to a color temperature value of 5500K, and a color temperature image data set I after color temperature correction is output. WB .
[0040] Preferably, the implementation of the image encoding process in step S51 specifically includes:
[0041] Step S511, each image in the merged image data set I1 is respectively subjected to convolution processing by a parallel convolutional network, and a convolution feature map set G at different scales is obtained:
[0042] G={G i |i=1,2,3,4} Formula 5
[0043] In the formula, Gi represents four groups of feature maps of different sizes;
[0044] Step S512, each image in the merged image data set I1 is encoded by an encoder, the encoder adopts a transformer and CNN double-branch structure, and is encoded into a convolution feature map, the size becomes [W / 16, H / 16], the number of channels is 192, and the convolution feature map is represented by a latent value V' i :
[0045] V′ i =f(k i ) Formula 6
[0046] In the formula, k i represents an image in I1, and f represents feature encoding.
[0047] Step S513, for the output result (ti, ci) of the encoder, a convolution layer is used for feature fusion to obtain V':
[0048] V′=Conv(ti,ci;θ) Formula 7
[0049] In the formula, V' represents the fused encoding features, i.e., the encoding result; ti represents the feature output by the transformer branch, ci represents the feature output by the CNN branch, and θ represents the network parameters.
[0050] Preferably, the implementation of the image decoding in step S52 specifically includes:
[0051] Step S521, the encoding result V' is sequentially decoded by a multi-level CNN decoding network, and the convolution feature map set G is respectively used as the supervision feature map of each decoding network.
[0052] Step S522, in each decoding process, the image resolution is recovered by deconvolution operation step by step, and the corrected color temperature image dataset I is obtained WB :
[0053]
[0054] In the formula, g represents the deconvolution operation, V' represents the fused encoded features, G represents the feature map for supervising the decoding output, I represents a single color temperature image in the color temperature image dataset I WB .
[0055] An RGB image low-light enhancement and color temperature correction combined system for processing an RGB image low-light enhancement and color temperature correction combined method, the system comprising:
[0056] An RGB image terminal device for capturing the RGB image of the scene through the RGB image acquisition device and uploading the image to the cloud platform for processing;
[0057] A cloud platform equipped with an image preprocessing module for receiving and processing the transmitted image data;
[0058] A communication module for transmitting and communicating the image data;
[0059] A low-light module for statistically analyzing the input image data and intelligently adjusting the image brightness and contrast, selectively enhancing the image details and visibility by using the computing power of the cloud platform;
[0060] A color temperature correction module for adjusting the image color temperature, correcting the color cast, and dynamically adjusting the color temperature;
[0061] A post-processing module for restoring the original resolution of the corrected image.
[0062] An RGB image low-light enhancement and color temperature correction combined device for running the RGB image low-light enhancement and color temperature correction combined system, the device comprising:
[0063] A terminal device and a cloud device;
[0064] The terminal device comprises a memory, a communication device, and an image acquisition device, the memory is used to save image data, the communication device is used to communicate with the cloud device, and the image acquisition device is used to acquire image data;
[0065] The cloud device comprises a cloud storage, a cloud processor and a cloud communicator; the cloud storage is used for storing a cloud computer program and image data; the cloud processor comprises a central processing unit (CPU) and a graphics processing unit (GPU); and the cloud communicator is used for communication connection with the communicator in the terminal device.
[0066] The present application has the following advantages and beneficial effects compared with the prior art:
[0067] The present application introduces a low-light module, so that the system not only has the ability of low-light enhancement processing, but also can highlight color information while enhancing the image, thereby providing a more favorable basis for subsequent color temperature adjustment, further improving the system stability and overall performance; and a dual-branch network structure based on Transformer and CNN is used as an encoder to realize efficient extraction of image features, reduce the number of network layers, and significantly reduce the model parameter quantity and resource occupation. In addition, the present application can directly correct the color temperature of the RGB image, saving the processing step of RAW image data, simplifying the data acquisition process, and greatly reducing the calculation amount; compared with the traditional color temperature correction method, the present application effectively solves the problems of complex operation and insufficient precision, and is more convenient and efficient in the processing process. BRIEF DESCRIPTION OF DRAWINGS
[0068] Figure 1 The present application is a method for executing a flowchart. DETAILED DESCRIPTION
[0069] In the following, the present application will be further described in conjunction with the drawings and specific embodiments:
[0070] In order to make the purpose, technical scheme and advantages of the present application more clear and explicit, the following embodiments will be further described with reference to the drawings.
[0071] Embodiment 1: A combination method of RGB image low-light enhancement and color temperature correction, comprising the following steps:
[0072] Step S1: acquiring the RGB image of the scene by using the RGB image device, and pre-processing the RGB image to obtain the input data set I0 of the RGB image;
[0073] In step S1, the implementation of the input data set I0 of the RGB image obtained by pre-processing specifically comprises:
[0074] The horizontal pixel number or the vertical pixel number of the RGB image is adjusted singly, the scaling ratio of the RGB image is kept unchanged, the horizontal pixel number and the vertical pixel number of the RGB image are limited to [R min ,R max ] respectively; and then the input data set I0 of the RGB image is obtained.
[0075] I0= {I1, I2, I3,..., In} (1) i Equation 1
[0076] wherein R min represents the minimum number of pixels, R max represents the maximum number of pixels, R min is set to 512 pixels, and R max is set to 2048 pixels; I i represents the i-th image in the input data set I0, and i is a natural number other than 0.
[0077] Step S2, the luminance of each image in the input data set I0 is determined by using the gray histogram statistical method, and a dark image data set I dark that needs to be enhanced in low light and a bright image data set I light that does not need to be enhanced in low light are obtained; the implementation of the dark image data set I dark that needs to be enhanced in low light in this step specifically includes:
[0078] Step S21, each image I i in the input data set I0 is converted into the corresponding gray image I gray ;
[0079] Step S22, the pixel gray value of the gray image I gray is counted to obtain a statistical histogram; the gray value is an integer between 0 and 255, wherein 0 represents black and 255 represents white; during the counting process, an array with a size of 256 is created to record the number of times each gray value appears, and the counting result is used as an abstract representation of the image luminance.
[0080] Step S23, the threshold k d of the pixel gray value is set to 50, and the pixels with a pixel gray value below the threshold k d are determined as dark pixels;
[0081] Step S24, according to the statistical result of the dark pixels, the proportion of the pixels that need to be enhanced in low light in each image in the input data set I0 is determined;
[0082] If the proportion of the pixels that need to be enhanced in low light in a certain image exceeds 70%, the image is defined as a dark image; if the proportion of the pixels that need to be enhanced in low light in a certain image does not exceed 70%, the image is defined as a bright image;
[0083] Step S25, the dark images selected from the input data set I0 are combined to form the dark image data set I dark that needs to be enhanced in low light.
[0084] Idark = {I i | i = 1, 2, …, N dark} Formula 2
[0085] In the formula, I i represents any dark image in the dark image data set I dark , N dark represents a natural number not equal to 0.
[0086] The unselected bright images in the input data set I0are composed into a bright image data set I light that does not require low-light enhancement.
[0087] Step S3, based on the deep neural network enhancement model, the dark image data set I dark is subjected to light enhancement to obtain a light-enhanced image data set I enLight ; in this step S3, the implementation of the light-enhanced image data set I enLight specifically includes:
[0088] Step S31, based on the transformer and CNN deep neural network enhancement model, each dark image in the dark image data set I dark is subjected to parameter adjustment to obtain an adjustment parameter a corresponding to each pixel position of each dark image; and here a is a three-dimensional vector corresponding to the adjustment parameters of the three channels of the RGB image.
[0089] Step S32, for each dark image, the adjustment parameter a of each pixel position obtained is used to aggregate information to obtain a corresponding adjustment parameter map A n (x). The A n (x) is a matrix corresponding to the image shape, each element position of the matrix corresponds to the pixel position of the image, and the specific information is the adjustment parameter a of the pixel position; the fitting is an adjustment parameter curve map A n (x), and the curve of the map can map the corresponding pixel value to the enhanced pixel value; in this way, the adjustment parameter of each pixel position of the image can be obtained, so that the image can be flexibly adjusted.
[0090] Step S33, according to the obtained adjustment parameter map A n (x), low-light enhancement is performed on the dark image data set I dark by Formula 3:
[0091] E n (x) = E n-1 (x) + A n (x) * E n-1 (x) * [1-E n-1 (x)] Formula 3
[0092] wherein n is the iteration number and n = 8 is set, x represents the position of each pixel, E n (x) is the image after the n-th iteration of enhancement, E n-1 (x) is the image after the n-1-th iteration of enhancement;
[0093] According to the above formula, different adjustment parameters correspond to different adjustment curves, which can flexibly map the input pixel value to the target output value, thereby realizing fine enhancement of the image.
[0094] Step S34, obtaining the light enhancement image dataset I enLight :
[0095] I enLight = {E(m i ; A i ) | i = 1, 2,..., N} Formula 4
[0096] wherein m i represents the image before enhancement, A i represents the corresponding pixel-level adjustment parameter map, E(m i ; A i ) represents a single element in the light enhancement image dataset I enLight , which is the result of enhancing m i according to A i and the adjustment curve.
[0097] Step S4, merging the light enhancement image dataset I enLight and the bright image dataset I light in a union set manner to obtain the merged image dataset I1;
[0098] Step S5, correcting the color temperature of the image in the merged image dataset I1 based on the deep network driven color temperature adjustment method, and outputting the color temperature image dataset I WB corrected after color temperature correction.
[0099] The implementation of the color temperature image dataset I WB corrected after color temperature correction output in the step S5 specifically includes:
[0100] Step S51, inputting each image in the merged image dataset I1 to an encoder for image encoding processing, mapping the image after the image encoding processing to a high-dimensional feature space, and generating the corresponding feature map;
[0101] Step S52, decoding the image encoding using a multi-level CNN decoding network, mapping the decoded image to a color temperature value of 5500K, and outputting the color temperature image dataset I WB corrected after color temperature correction:
[0102] The implementation of the image encoding process in step S51 specifically includes:
[0103] Step S511, each image in the merged image dataset I1 is respectively convolved by the parallel convolutional network to obtain a set of convolutional feature maps G of different scales:
[0104] G={G i |i=1,2,3,4} Equation 5
[0105] Gi represents four groups of feature maps of different sizes, with channel numbers of 24, 48, 96, and 192 respectively; used to supervise the decoding output in the decoding process;
[0106] Step S512, each image in the merged image dataset I1 is encoded by the encoder to be a convolutional feature map, with a size of [W / 16, H / 16], a channel number of 192, and the convolutional feature map passing through a latent value V' i is represented as:
[0107] V′ i = f(k i ) Equation 6
[0108] where k i represents an image in I1, and f represents feature encoding; the encoder used adopts a double-branch structure, using transformer and CNN structures respectively;
[0109] Step S513, for the output results (ti, ci) of the encoder, a convolutional layer is used for feature fusion to obtain V':
[0110] V′=Conv(ti,ci;θ) Equation 7
[0111] where V' represents the fused encoding features, i.e., the encoding result, ti represents the feature output by the transformer branch, ci represents the feature output by the CNN branch, and θ represents the network parameters.
[0112] The implementation of the image decoding in the above steps specifically includes:
[0113] Step S521, the encoding result V' is decoded by a multi-level CNN decoding network, and the set of convolutional feature maps G is used as the supervision feature map for each level of the decoding network;
[0114] Step S522, in each decoding process, the image resolution is recovered by deconvolution operation, and the corrected color temperature image dataset I WB is obtained:
[0115]
[0116]
[0117] In the formula, g represents the deconvolution operation, V′ represents the fused encoded features, and G represents the feature map used to supervise the decoding output. Represents color temperature image dataset I WB A single color temperature image within.
[0118] Step S6: Use bilinear interpolation to process the color temperature image dataset I. WB Process and recover the color temperature image dataset I WB The original resolution of the image. For each pixel, the process first needs to find its corresponding coordinates in the original image, then take the four integer coordinate pixels around it, interpolate the top and bottom pixels in the horizontal direction to obtain two intermediate values, and then interpolate these two intermediate values in the vertical direction to finally calculate the value of the target pixel in the new image.
[0119] Example 2:
[0120] A system combining RGB image low-light enhancement and color temperature correction is provided for processing methods that combine RGB image low-light enhancement and color temperature correction. The system includes:
[0121] RGB image terminal equipment is responsible for capturing RGB images of a scene through RGB image acquisition devices and uploading the images to a cloud platform for processing;
[0122] The cloud platform is equipped with an image preprocessing module for receiving and processing transmitted image data.
[0123] The communication module is responsible for the transmission and communication of image data, ensuring efficient transmission of image data between RGB image terminal devices and the cloud platform.
[0124] The low-light module utilizes the computing power of the cloud platform to perform statistical analysis on the input image data, especially the pixel information in low-light areas. By analyzing the brightness distribution in the image, it can identify areas with insufficient lighting and, based on these analysis results, intelligently adjust the brightness and contrast of the image, selectively enhancing the details and visibility of the image, thereby improving the quality of low-light images.
[0125] The color temperature correction module uses a neural network model to precisely adjust the color temperature of the image, restore the natural colors of the image, and correct color cast problems caused by uneven color temperature of the light source; it can also dynamically adjust the color temperature to ensure more realistic and accurate color reproduction of the image.
[0126] A post-processing module is configured to process the corrected image to restore its original resolution.
[0127] Embodiment three:
[0128] An RGB image low-light enhancement and color temperature correction combination device is used to run the RGB image low-light enhancement and color temperature correction combination system, and the device comprises:
[0129] A terminal device and a cloud device;
[0130] The terminal device comprises a memory, a communicator and an image collector, the memory is used to save image data, the communicator is used to communicate data with the cloud device, and the image collector is used to collect image data.
[0131] The cloud device comprises a cloud memory, a cloud processor and a cloud communicator, and is used to perform low-light enhancement and color temperature adjustment on the image according to the image data; the cloud memory is used to store a cloud computer program and image data, the cloud processor comprises a central processing unit (CPU) and a graphics processing unit (GPU), and is used to call the cloud computer program and image data in the cloud memory to realize image adjustment; and the cloud communicator is used to be in communication connection with the communicator in the terminal device.
[0132] The method disclosed by the application comprises four key steps of data acquisition, image quality evaluation, light enhancement and color temperature adjustment, data is acquired through an RGB acquisition device first, and then image information is analyzed and counted through construction of a gray histogram; based on the counting result, image quality is evaluated, and low-light enhancement processing is selectively performed; for low-light input, automatic light enhancement and color temperature adjustment are performed through a deep network; due to the use of a feature extraction structure combined with attention mechanism and convolution, the feature extraction capability of the network is enhanced, network stacking and parameter quantity are greatly reduced, and operation efficiency is improved. When quality enhancement is performed, adjustment parameters of each pixel are evaluated through the network first, and then the image is finely adjusted at a pixel level according to an adjustment curve; thereafter, color temperature adjustment is performed through a network with an encoder-decoder structure, and image color information is restored. In addition, the application further provides a processing system and device, which can realize automatic processing and are particularly suitable for image acquisition and post-processing in a low-light environment, and have a wide application prospect.
Claims
1. A method for RGB image low light enhancement and color temperature correction combination, characterized in that, The method comprises the steps of: Step S1, acquiring an RGB image of a scene by using an RGB image device, pre-processing the RGB image, and obtaining an input data set I0 of the RGB image; Step S2, using gray scale histogram statistics method to distinguish the brightness of each image in the input data set I0, and obtain the dark image data set I which needs to be enhanced in low light dark and the bright image data set I which does not need to be enhanced in low light light ; Step S3, enhancing the dark image dataset I based on a deep neural network enhancement model dark performing illumination enhancement to obtain an illumination enhanced image dataset I enLight ; Step S4, merging the light enhanced image dataset I enLight with the bright image dataset I light to obtain a merged image dataset I1; Step S5, the color temperature of the image of the merged image dataset I1 is corrected based on the deep network driven color temperature adjustment method, and a color temperature corrected image dataset I WB is output. Step S6, bilinear interpolation of the color temperature image dataset I WB is performed, restoring the image original resolution of the color temperature image dataset I WB ; The light-enhanced image data set I obtained in step S3 enLight Embodiments of the application specifically include: Step S31, the dark image dataset I is input into the transformer and CNN-based deep neural network enhancement model to obtain a dark image dataset I' enhanced by the transformer and CNN-based deep neural network enhancement model. dark Step S32, each dark image in the dark image dataset I' is parameter-adjusted to obtain an adjustment parameter a corresponding to each pixel position of each dark image. Step S32, for each dark image, aggregate the information obtained to obtain a corresponding adjustment parameter map A using the adjustment parameter a obtained for each pixel position n (x); Step S33, adjusting the parameter map A according to the obtained adjustment parameters n (x) performing low light enhancement on the dark image data set I dark performing iterations: E n (x) = E n-1 (x) + A n (x) * E n-1 (x) * [1 - E n-1 (x)] Equation 3 where n is the number of iterations and is set to n = 8, x represents the position of each pixel, E n (x) is the image after the n-th iteration of enhancement, E n-1 (x) is the image after the n-1-th iteration of enhancement. Step S34, obtaining light enhanced image data set I enLight : I enLight = { E(m i ; A i ) | i = 1, 2,..., N} Equation 4 where m i denotes the image before enhancement, A i denotes the corresponding pixel-wise adjustment parameter map, E(m i ; A i ) denotes a single element in the light-enhanced image data set I enLight .
2. The combined method of RGB image low-light enhancement and color temperature correction according to claim 1, characterized in that, The implementation of the input data set I0 of the RGB image obtained in the step S1 specifically comprises: The single adjustment is made to the horizontal pixel number or the vertical pixel number of the RGB image, the scaling ratio of the RGB image is kept unchanged, the horizontal pixel number and the vertical pixel number of the RGB image are limited between [R min ,R max ]; and then the input data set I0 of the RGB image is obtained. I0 = {I1, I2, I3,..., In} Formula 1 i} Formula 1 wherein R min represents the minimum number of pixels, R max represents the maximum number of pixels, R min is set to 512 pixels, R max is set to 2048 pixels; I i represents the i-th image in the input data set I0, i being a natural number other than 0.
3. The method of claim 1, wherein the method further comprises: the dark image data set I acquired in step S2 needs to be low-light enhanced dark The embodiments of the application specifically include: Step S21, converting each image I in the input data set I0 into a corresponding gray scale image I i Step S21, converting each image I in the input data set I0 into a corresponding gray scale image I gray ; Step S22, statistics is performed on the pixel grayscale values of the grayscale image I gray to obtain a statistical histogram. Step S23, setting a threshold value k of pixel gray scale value d For 50, the pixel gray scale value is at the threshold value k d The following pixel is determined as a dark pixel; Step S24, determining the proportion of pixels in each image in the input data set I0 that need low-light enhancement according to the statistical result of the dark pixels; If the proportion of pixels in a certain image that need low-light enhancement exceeds 70%, the image is defined as a dark image; Step S25, the dark image data set I to be subjected to low light enhancement is constituted by the dark images selected from the input data set I0 dark : I dark = {I i | i = 1, 2,..., N dark} Equation 2 where I i represents a dark image data set I dark represents any dark image within the set N dark represents a natural number not equal to 0.
4. The method of claim 3, wherein the method further comprises: The step S24 further comprises the step that if the proportion of pixels in a certain image that need low-light enhancement does not exceed 70%, the image is defined as a bright image; The step S25 also comprises the step of forming a set of bright images I1 not selected in the input data set I0 into a set of bright images I1 not requiring low light enhancement light .
5. The method of claim 1, wherein the method further comprises: The step S5 outputs the color temperature image data set I after the color temperature correction WB The embodiments specifically include: Step S51, inputting each image in the merged image data set I1 into an encoder for image encoding processing, mapping the image after the image encoding processing to a high-dimensional feature space, and generating a corresponding feature map; Step S52, the multi-level CNN decoding network is used to decode the image coding, and the decoded image is mapped to the color temperature value 5500K, and the color temperature image data set I after color temperature correction is output WB .
6. The method of claim 5, wherein the method further comprises: The implementation of the image encoding processing in the step S51 specifically comprises: Step S511, performing convolution processing on each image in the merged image data set I1 by using a parallel convolutional network respectively, and obtaining a convolution feature map set G under different scales: G = {G i i = 1, 2, 3, 4} Equation 5 In the formula, Gi represents four groups of feature maps with different sizes; Step S512, encode each image in the merged image dataset I1 by an encoder, the encoder adopts a transformer and CNN double-branch structure, and encodes into a convolution feature map, the size of which is changed to [W / 16, H / 16], the number of channels is 192, and the convolution feature map passes through a latent value V' i is represented as: V' i = f(k i ) Formula 6 where k i denotes the image in I1, and f denotes the feature code; Step S513, performing feature fusion on the output result (ti, ci) of the encoder by using a convolution layer to obtain V': V' = Conv (ti, ci; θ) Formula 7 In the formula, V' represents the fused encoding feature, that is, the encoding result; ti represents the feature output by the transformer branch, ci represents the feature output by the CNN branch, and θ represents the network parameter.
7. The method of claim 5, wherein the method further comprises: The implementation of the image decoding in the step S52 specifically comprises: Step S521, decoding the encoding result V' by using a multi-level CNN decoding network level by level, and taking the convolution feature map set G as the supervision feature map of each level of the decoding network respectively; Step S522, in each level of the decoding process, the image resolution is recovered by deconvolution operation, and the corrected color temperature image dataset I is obtained WB : In the formula, g represents a deconvolution operation, V' represents the fused encoded features, G represents a feature map used to supervise the decoding output, represents a single color temperature image within the color temperature image dataset I WB represents a single color temperature image within the color temperature image dataset I 8. A system for RGB image low-light enhancement and color temperature correction combination, the system is used for processing the method of RGB image low-light enhancement and color temperature correction combination as claimed in any one of claims 1-7, characterized in that, The system comprises: An RGB image terminal device is configured to capture an RGB image of a scene by using an RGB image acquisition device, and upload the image to a cloud platform for processing; A cloud platform is provided with an image preprocessing module, configured to receive and process the transmitted image data; A communication module is configured to be responsible for the transmission and communication of image data; A low-light module is configured to statistically analyze the input image data by using the computing power of the cloud platform, and intelligently adjust the image brightness and contrast, selectively enhance the image details and visibility; A color temperature correction module is configured to adjust the image color temperature, correct the color cast, and dynamically adjust the color temperature; A post-processing module is configured to restore the original resolution of the corrected image.
9. An RGB image low-light enhancement and color temperature correction combination device, the device is used to run the RGB image low-light enhancement and color temperature correction combination system as claimed in claim 8, characterized in that, The device comprises: A terminal device and a cloud device; The terminal device comprises a memory, a communication device, and an image acquisition device, the memory is configured to save image data, the communication device is configured to communicate with the cloud device, and the image acquisition device is configured to acquire image data; The device comprises: A terminal device and a cloud device; The terminal device comprises a memory, a communication device, and an image acquisition device, the memory is configured to save image data, the communication device is configured to communicate with the cloud device, and the image acquisition device is configured to acquire image data; The cloud device comprises a cloud storage, a cloud processor and a cloud communicator; the cloud storage is used for storing a cloud computer program and image data; the cloud processor comprises a central processing unit (CPU) and a graphics processing unit (GPU); and the cloud communicator is used for communicating with the communicator in the terminal device.
Citation Information
Patent Citations
Dark image restoration iterative neural network method combining image enhancement and image fusion
CN114677450A
Image processing methods and systems for generating a training dataset for low-light image enhancement using machine learning models
US20230186612A1