Multi-exposure high dynamic range image reconstruction method based on HSV color space
By decomposing image features in the HSV color space and using luminance and chroma branch networks for feature learning respectively, the problems of model complexity and high computational cost in the existing technology are solved, and high-quality high dynamic range image reconstruction and models are achieved. Lightweight.
Patent Information
- Application Number
- CN202410579341.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-10
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-05-10
AI Technical Summary
In the existing multi-exposure high dynamic range image reconstruction technology, the model structure is complex and the calculation cost is high, making it difficult to achieve lightweight models. At the same time, the learning of redundant information hinders the improvement of image reconstruction quality.
Using a multi-exposure high dynamic range image reconstruction method based on HSV color space, through gamma correction and color space conversion, the image is decomposed into brightness and chroma branch networks for feature learning respectively, and redundant information is eliminated to achieve lightweight and high-performance models. Quality reconstruction.
On the basis of ensuring the visual effect of high dynamic range images, the redundant information in the model learning process is removed to the greatest extent, the model is lightweight, and the quality of image reconstruction is improved.
Smart Images

Figure CN118674663A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a multi-exposure high dynamic range image reconstruction method based on HSV color space. Background Art
[0002] With the development of digital media and computer vision, people's requirements for image visual effects are increasing. However, low dynamic range images taken by traditional cameras are difficult to simulate the brightness range of human visual perception, and the price of professional equipment to shoot high dynamic range images is too expensive. Therefore, currently, high dynamic range images are reconstructed mainly based on the software level through single or multiple low dynamic range images with different exposures. Among them, multi-exposure reconstruction technology in significant motion scenes has a wide range of applications and high reconstructed image quality, becoming a hot topic in current research.
[0003] In the current multi-exposure high dynamic range imaging technology, the commonly used method is to input low dynamic range images of different exposures into the alignment module to eliminate ghost images caused by foreground or object motion, and then send the output features to the image reconstruction module to predict the high dynamic range image. However, different modules have different tasks, and the learning of features should have different emphases. Therefore, the non-key focus features of the modules at each stage are redundant information. The related technology indiscriminately learns all features of all exposure images at each step, resulting in a complex model structure and high computational cost, which hinders the model lightweight process. It can be seen that how to balance the image reconstruction quality and model lightweightness is still a major challenge facing this technical field. Summary of the invention
[0004] In order to solve the problems existing in the related technology, the present invention designs a multi-exposure high dynamic range image reconstruction method based on the HSV color space. Starting from the visual characteristics of the human eye, the redundant information in the feature learning process is eliminated from the source, and the model is lightweight while ensuring the visual effect of high dynamic range image reconstruction.
[0005] To achieve the above object, the technical solution of the present invention is as follows:
[0006] Step 1, gamma correction is performed on multiple low dynamic range images with different exposures;
[0007] Step 2: convert the gamma-corrected image obtained in step 1 from the RGB color space to the HSV color space and crop it into square image blocks;
[0008] Step 3, passing the brightness V channel of the gamma-corrected images with different exposures obtained in step 2 through the brightness branch network to obtain a predicted high dynamic range V channel image with ghosting removed;
[0009] Step 4, the hue H channel and saturation S channel of the reference frame obtained in step 2, i.e., the medium exposure gamma correction image, are passed through the chroma branch network to obtain predicted high dynamic range H channel and S channel images;
[0010] Step 5: perform channel splicing on the prediction results of step 3 and step 4 to obtain a predicted high dynamic range image in the HSV color space;
[0011] Step 6. Train the image reconstruction model: construct a multi-scene and multi-motion image dataset, input multiple original low dynamic range images to the multi-exposure high dynamic range image reconstruction model, and obtain the network output; convert the true value image from the RGB color space to the HSV color space, calculate the loss value with the network output; optimize the model parameters according to the loss value;
[0012] Step 7: Obtain the low dynamic range image group to be predicted, input it into the multi-exposure high dynamic range image reconstruction model, obtain the predicted image in the HSV color space, convert it to the RGB color space, and obtain the final high dynamic range reconstructed image.
[0013] Compared with the prior art, the present invention is characterized in that all images are converted to the HSV color space for learning, and the brightness information is decoupled from the chromaticity information, which is equivalent to separating the structural information and color information of the image, and performing image alignment and image reconstruction on two parallel branch networks respectively, thereby shortening the end-to-end length of the model. In the brightness branch network, only the brightness channel of the differently exposed images is deghosted, and the redundant chromaticity information at this stage is eliminated. In the chromaticity branch network, only the chromaticity channel of the reference image is reconstructed, and the redundant brightness information at this stage is eliminated. A cascade network is used to first learn the respective features of the hue channel and the saturation channel, and then learn the correlation features between the two, and finally realize the mapping of chromaticity information from low dynamic range to high dynamic range.
[0014] The above-mentioned multi-exposure high dynamic range image reconstruction method based on the HSV color space removes redundant information in the model learning process to the greatest extent, which not only ensures the excellent quality of the reconstructed image in visual effects, but also realizes the lightweight model. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic diagram of the overall framework of the multi-exposure high dynamic range image reconstruction method provided in this application;
[0016] Figure 2 A schematic diagram of a brightness branch network structure according to an embodiment of the present application;
[0017] Figure 3 This is a schematic diagram of the chromaticity branch network structure of an embodiment of the present application. DETAILED DESCRIPTION
[0018] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0020] This paper mainly aims at the multi-exposure high dynamic range imaging task in significant motion scenes, and proposes a multi-exposure high dynamic range image reconstruction method based on HSV color space. Figure 1 As shown, the present invention comprises the following steps:
[0021] Step 1, gamma correction is performed on multiple low dynamic range images with different exposures;
[0022] Step 2: convert the gamma-corrected image obtained in step 1 from the RGB color space to the HSV color space and crop it into square image blocks;
[0023] Step 3, passing the brightness V channel of the gamma-corrected images with different exposures obtained in step 2 through the brightness branch network to obtain a predicted high dynamic range V channel image with ghosting removed;
[0024] Step 4, the hue H channel and saturation S channel of the reference frame obtained in step 2, i.e., the medium exposure gamma correction image, are passed through the chroma branch network to obtain predicted high dynamic range H channel and S channel images;
[0025] Step 5: perform channel splicing on the prediction results of step 3 and step 4 to obtain a predicted high dynamic range image in the HSV color space;
[0026] Step 6, training image reconstruction model: construct a multi-scene and multi-motion image dataset, which includes 108 groups of training images, each of which contains 3 low dynamic range images and their exposure values and 1 high dynamic range true value image; input 3 original low dynamic range images to the reconstruction model of the multi-exposure high dynamic range image to obtain the network output; convert the true value image from RGB color space to HSV color space, calculate the loss value with the network output; optimize the model parameters according to the loss value;
[0027] Step 7: Obtain the low dynamic range image group to be predicted, input it into the multi-exposure high dynamic range image reconstruction model, obtain the predicted image in the HSV color space, convert it to the RGB color space, and obtain the final high dynamic range reconstructed image.
[0028] Furthermore, the gamma correction formula in step 1 is shown in 1.1:
[0029]
[0030] Where L represents the original low dynamic range image, γ represents the gamma coefficient, which is generally 2.2, Δt represents the exposure time of L, and H represents the pseudo high dynamic range image after gamma correction. Each low dynamic range image is gamma-corrected to obtain a pseudo high dynamic range image.
[0031] In this embodiment, three low dynamic range images with different exposures are used as input data, so after the gamma correction in step 1, three corresponding pseudo high dynamic range images with different exposures are obtained.
[0032] Furthermore, the conversion formula from RGB color space to HSV color space in step 2 is shown in 2.1-2.3:
[0033]
[0034]
[0035] V=C max (2.3)
[0036] Among them C max It represents the maximum value among the three RGB values, and Δ represents the difference between the maximum and minimum values in RGB. After each gamma-corrected image is converted into a color space, it obtains three channel images of hue, saturation, and brightness.
[0037] In this embodiment, the three pseudo high dynamic range images of different exposures obtained in step 1 are outputted into three images in HSV color space after step 2, for a total of nine single-channel images, for selection by the subsequent two branch networks.
[0038] In addition, if the size of the input image is too large, it will seriously affect the model training speed. Therefore, in the network input stage, all images are divided into 128×128 image blocks, and each image block is used as a set of data for training.
[0039] Further, the overall process of step 3 is as follows Figure 2 As shown, the brightness branch network for removing ghost images. The network input is the brightness channel of the gamma-corrected image with different exposures obtained in step 2, which is three V channel images with different exposures in this embodiment. The details are as follows:
[0040] Step 301, passing each image through a convolutional layer to extract shallow features of different exposures;
[0041] Step 302, concatenating the shallow features obtained in step 301, and fusing them through a multi-layer perceptron to obtain fused features;
[0042] Step 303: Send the fusion features obtained in step 302 to the global spatial attention block to learn the spatial correlation between images with different exposures and output a feature sequence. Repeat this step N times with the output as input;
[0043] Step 304: Send the feature sequence obtained in step 303 to the semantic consistency attention block, and input the three shallow features obtained in step 301 to learn the semantic consistency between images with different exposures, and output the feature sequence. Repeat this step G times with the output as input;
[0044] Step 305, taking N steps 303 and G steps 304 as a group, taking the output as input, repeating the combination L times to obtain an attention feature map;
[0045] Step 306, the shallow features of medium exposure obtained in step 301 are passed through the convolutional layer to output a reference feature map, which is aggregated with the attention feature map obtained in step 305;
[0046] Step 307, the features aggregated in step 306 are passed through a convolutional layer to obtain a V channel image of the reconstructed image.
[0047] In this embodiment, the number of each attention block can be adaptively adjusted. In this embodiment, when N=6, G=4, and L=4 are selected from various parameter combinations, the quality of the reconstructed V channel and the parameter quantity of the attention module can be guaranteed to achieve the best balance. When the input data set is different, the optimal parameter combination needs to be modified and tested accordingly, so the parameter selection of the attention block combination is not specified in this application.
[0048] Furthermore, the overall process of step 4 is as follows Figure 3 As shown, the chroma branch network for chroma reconstruction. The network input is the chroma component of the medium exposure image obtained in step 2, that is, the reference frame after gamma correction. In this embodiment, it is the medium exposure H channel image and S channel image. The specific details include the following:
[0049] Step 401, using a shallow U-Net network to learn the inherent features of the H channel image and output a hue feature map; at the same time, using another shallow U-Net network to learn the inherent features of the S channel image and output a saturation feature map;
[0050] Step 402, the two chromaticity feature maps obtained in step 401 are concatenated, and the chromaticity features, i.e., the correlation features between hue and saturation, are learned through a lightweight U-Lite network;
[0051] Step 403, the chrominance fusion feature obtained in step 402 is passed through a convolution layer to obtain H and S channel images of the predicted image.
[0052] Specifically, in step 401, the shallow U-Net network for learning single-channel features needs to determine the network depth based on the quality of the reference image of the input data set. The U-Net network adopts a U-shaped structure of encoding-connection bridge-decoding. The deeper the depth of its encoding and decoding, the larger the network parameters and the higher the computational cost, but the better the learning effect of the features. The reference image in the data set used in the present invention itself has abnormal areas of overexposure and underexposure, so the H and S channels of the image itself have abnormal conditions. Therefore, it is necessary to learn the H and S channels separately, but it does not require too strong autocorrelation to prevent the network from learning abnormal conditions and weakening the focus on global chromaticity information.
[0053] In this embodiment, the shallow U-Net uses a single-layer codec structure, combined with a connection bridge, and performs two downsampling and two upsampling. For different data sets and data quality, the number of layers here needs to be adaptively adjusted, so the present invention does not limit the shallow parameters.
[0054] Specifically, step 402 is necessary for learning the association between hue and saturation. According to the visual perception characteristics of the human eye, the human eye's perception of visual images is based on three dimensions: hue, saturation, and brightness, which is highly consistent with the HSV color space, where the perception of color is formed by combining hue and saturation. For example, for low-saturation areas, the human eye's sensitivity to hue changes decreases; conversely, for high-saturation areas, hue sensitivity increases. Therefore, the network needs to learn this color perception law of human vision, that is, to achieve higher attention to areas with higher saturation, and greater learning weights. Therefore, in the chromaticity branch network, the U-Lite network in step 402 is crucial to the quality of the final chromaticity reconstructed image.
[0055] In addition, during the training process of step 6, the present invention designs a new loss function based on the HSV color space, which specifically includes the following loss terms:
[0056] (1) For the brightness branch network, it is necessary to calculate the loss between the predicted V channel and the V channel of the true high dynamic range image. Since the high dynamic range is represented by high-precision floating point numbers, the pixel value range of the V channel is 0 to 1. Direct calculation of the loss is prone to serious deviations, which is not conducive to the efficient convergence of the model during training. Therefore, the μ-law tone mapping function is used to achieve compression of larger values and amplification of smaller values to improve the signal-to-noise ratio. The μ-law function is used on the V channel as shown in Formula 6.1:
[0057]
[0058] Among them, the reconstructed V channel is recorded as The mapped V channel is recorded as The mapping coefficient μ is generally set to 5000. This gives the L1 loss term L of the brightness branch. V As shown in formula 6.2:
[0059]
[0060] (2) For the chrominance branch network, the value range of H and S is not affected by the dynamic range of the image, so there is no need for tone mapping. Only the L1 loss function needs to be used to calculate the tone loss term L HS , as shown in Formula 6.3:
[0061]
[0062] (3) It should be noted that the hue value H is a cyclic parameter, that is, 0° and 360° represent the same hue, so it is defective to use only the traditional Euclidean distance or L1 and L2 losses. In order to deal with parameters with cyclic characteristics, the present invention calculates the angle loss term L of the H component angle , as shown in Formula 6.4:
[0063]
[0064] MOD(a,b) represents the remainder of a divided by b. Since the value of H read by the network ranges from 0 to 1, 1 / 2 is used as the angle separation threshold.
[0065] Therefore, the complete loss function L total As shown in formula 6.5:
[0066] L total =α HS L HS +α V L V +α angle L angle (6.5)
[0067] Wherein α represents the coefficient of each loss term, and in this embodiment, the value is 1.
[0068] In this embodiment, the traditional RGB loss is not used because the present invention decouples different branches and sends the information of different exposures only to the brightness branch for ghost elimination. Therefore, after the predicted image is converted from the HSV color space to the RGB color space, the ghost drifts from the V channel to all RGB channels, and then drifts to the chroma branch when the gradient is returned. At this time, this method cannot achieve the effect of dividing and conquering ghost removal and image reconstruction. Therefore, the present invention only calculates the loss for each component of the HSV color space separately and returns it.
[0069] In summary, the present invention starts from the HSV color space, splits the multi-exposure high dynamic range reconstruction task, aligns and fuses the V channel images of different exposures in the brightness branch, and is used to remove the ghost images generated by the image alignment process in dynamic scenes; at the same time, in the chroma branch, chroma reconstruction is performed only based on the H and S channel images of the medium exposure image, which is used to learn the color features of the high dynamic range from the low dynamic range image, ensuring that the visual effect of the reconstructed image is close to the true value effect. In addition, in the chroma branch, after using a shallow codec network to learn the respective characteristics of hue and saturation, a lightweight codec network is used to learn the correlation features between the two to simulate the visual perception characteristics of the human eye. The three channel images that are finally reconstructed are spliced and converted to the RGB color space to obtain a high-quality high dynamic range reconstructed image.
[0070] The present invention is tested on the public dataset Tel. The Tel dataset contains a variety of lighting conditions, such as bright, dim, and indoor and outdoor environments with a large range of brightness and darkness; it also contains a variety of motion types, such as foreground motion, scene movement, and overall and local mixed motion.
[0071] The image quality is objectively evaluated, and the results are shown in Table 1. The model complexity is objectively evaluated, and the results are shown in Table 2.
[0072] Table 1 Objective evaluation of image quality
[0073] algorithm PSNR μ-PSNR SSIM μ-SSIM NHDRRNet 39.61 36.68 0.9853 0.9590 DHDRNet 43.37 40.05 0.9924 0.9794 AHDRNet 45.30 42.08 0.9943 0.9837 HDR-Transformer 46.35 42.39 0.9948 0.9844 The present invention 46.71 40.26 0.9954 0.9801
[0074] Table 2 Objective evaluation of model complexity
[0075]
[0076]
[0077] It should be emphasized that the embodiments described in the present invention are illustrative rather than restrictive. Therefore, the present invention includes but is not limited to the embodiments described in the specific implementation modes. Any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A multi-exposure high dynamic range image reconstruction method based on HSV color space, characterized in that: The following steps are involved: S1, performing gamma correction on multiple low dynamic range images with different exposures; S2, converting the gamma-corrected image obtained in step 1 from the RGB color space to the HSV color space, and cropping it into a square image block; S3, passing the brightness V channel of the gamma-corrected images with different exposures obtained in step 2 through a brightness branch network to obtain a predicted high dynamic range V channel image with ghosting removed; S4, passing the hue H channel and saturation S channel of the reference frame obtained in step 2, i.e., the medium exposure gamma correction image, through the chroma branch network to obtain predicted high dynamic range H channel and S channel images; Step 5: perform channel splicing on the prediction results of step 3 and step 4 to obtain a predicted high dynamic range image in the HSV color space; S6. Training image reconstruction model: Construct a multi-scene and multi-motion image dataset, input multiple original low dynamic range images to the multi-exposure high dynamic range image reconstruction model, and obtain the network output; convert the true value image from RGB color space to HSV color space, calculate the loss value between the true value image and the predicted image; optimize the model parameters according to the loss value; S7. Obtain a low dynamic range image group to be predicted, input it into a multi-exposure high dynamic range image reconstruction model, obtain a predicted image in the HSV color space, convert it into the RGB color space, and obtain the final high dynamic range reconstructed image.
2. The multi-exposure high dynamic range image reconstruction method based on HSV color space according to claim 1, characterized in that: The step S3 uses the brightness branch network to remove ghost images and predict the V channel image, including: S31, pass each image through the convolution layer to extract shallow features of different exposures; S32, concatenating the shallow features obtained in step S31, and fusing them through a multi-layer perceptron to obtain fused features; S33, send the fusion features obtained in step S32 to the global spatial attention block, learn the spatial correlation between different exposure images, and output the feature sequence. Repeat this step N times with the output as input; S34: Send the feature sequence obtained in step S33 to the semantic consistency attention block, and input the three shallow features obtained in step S31 to learn the semantic consistency between the different exposure images, and output the feature sequence. Repeat this step G times with the output as input; S35, taking N steps S33 and G steps S34 as a group, taking the output as the input, repeating the combination L times to obtain an attention feature map; S36, the medium-exposed shallow features obtained in step S31 are passed through the convolutional layer to output a reference feature map, which is aggregated with the attention feature map obtained in step S35; S37, the features aggregated in step S36 are passed through a convolutional layer to obtain a V channel image of the reconstructed image.
3. The multi-exposure high dynamic range image reconstruction method based on HSV color space according to claim 1, characterized in that: The step S4 uses a chromaticity branch network to reconstruct the image visual color information, including: S41, using a shallow U-Net network, learn the inherent features of the H channel image and output a hue feature map; at the same time, using another shallow U-Net network, learn the inherent features of the S channel image and output a saturation feature map; S42, splicing the two chromaticity feature maps obtained in step S41, and learning chromaticity features, that is, correlation features between hue and saturation, through a lightweight U-Lite network; S43, passing the chrominance fusion feature obtained in step S42 through a convolution layer to obtain H and S channel images of the predicted image.
4. The multi-exposure high dynamic range image reconstruction method based on HSV color space according to claim 1, characterized in that: The step S6 calculates the loss value of the true image and the predicted image, including: S61. For the brightness branch network, firstly, the predicted V channel is tone mapped with the V channel of the true high dynamic range image using the μ-law compression function. The specific formula is: Among them, the reconstructed V channel is recorded as The mapped V channel is recorded as The mapping coefficient μ is generally set to 5000; the loss L between the two after tone mapping is calculated V , the specific formula is: S62. For the chrominance branch network, the value range of H and S is not affected by the dynamic range of the image, so tone mapping is not required. Only the L1 loss function needs to be used to calculate the tone loss term L HS , the specific formula is: S63. For the H component with cyclic characteristics, it is defective to use only the traditional Euclidean distance or L1 and L2 losses, so the angle loss term L of the H component is calculated. angle , the specific formula is: S64. Calculate the complete loss function L total , the specific formula is: L total =α HS L HS +α V L V +α angle L angle , where α represents the coefficient of each loss term.
Citation Information
Patent Citations
Low-illumination image enhancement method without normal illumination reference based on HSV color space and Retinex theory
CN112465727A
Unsupervised learning method and device for multi-exposure image fusion and electronic equipment
CN114283101A
Systems and Methods for Virtual Facial Makeup Removal and Simulation, Fast Facial Detection and Landmark Tracking, Reduction in Input Video Lag and Shaking, and a Method for Recommending Makeup
US20190014884A1
Cited By
Diffusion model-based multi-exposure-image high-dynamic-range image reconstruction method
CN119741243A
A multi-exposure image high dynamic range image reconstruction method based on a diffusion model
CN119741243B
Character and background fusion method and system based on adaptive skin color protection
CN121213428A
