Image processing method and device, computer equipment and computer readable storage medium
By decomposing, denoising and enhancing the illuminance map and reflectance map of the images captured by the smart terminal, the image quality problem caused by uneven lighting is solved and better image quality is achieved.
Patent Information
- Application Number
- CN202310657840.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-05
- Publication Date
- 2024-12-10
AI Technical Summary
The existing smart terminals have uneven lighting when shooting images, resulting in image quality problems, such as high noise, low contrast and lack of details.
By decomposing the image to be processed, an illuminance map and reflectance map are obtained, noise reduction and enhancement processing are performed, and the target image is determined by combining the two, noise reduction, contrast enhancement, and image details are restored.
Effectively reduce image noise, enhance contrast, restore image details, and improve image quality.
Smart Images

Figure CN119107267A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, apparatus, computer equipment and computer-readable storage medium. Background Art
[0002] As residents' living standards improve, consumers' demand for smart terminals with rich functions and powerful performance has risen sharply, and new application scenarios have emerged, such as gesture control, artificial intelligence (AI) home cameras, and AI somatosensory games. In these application scenarios, smart terminals are required to capture images in actual scenes. However, due to the uneven lighting in the shooting environment, the images captured by existing smart terminals have poor image quality. Summary of the invention
[0003] The embodiments of the present application provide an image processing method, apparatus, computer device, and computer-readable storage medium, which can reduce image noise, enhance image contrast, restore image details, and obtain a target image with better image quality.
[0004] The technical solution adopted by the present invention to solve the problem is as follows:
[0005] In one aspect, the present application provides an image processing method, comprising:
[0006] Decomposing the acquired image to be processed to obtain a first illumination map and a first reflectivity map of the image to be processed;
[0007] Performing denoising processing on the first reflectivity map based on the first illumination map to obtain a second reflectivity map of the image to be processed;
[0008] Performing enhancement processing on the first illumination map based on the second reflectivity map to obtain a second illumination map of the image to be processed;
[0009] Based on the second reflectivity map and the second illumination map, a target image of the image to be processed is determined.
[0010] In some embodiments of the present application, performing denoising on the first reflectivity map based on the first illumination map to obtain a second reflectivity map of the image to be processed includes:
[0011] Performing fusion processing on the first illumination map and the first reflectivity map to obtain a first spliced image of the image to be processed;
[0012] Performing dilated convolution processing on the first spliced image to obtain a first dilated feature map of the image to be processed;
[0013] Performing convolution processing on the first dilated feature map to obtain a first convolution feature map of the image to be processed;
[0014] Performing convolution and deconvolution processing on the first convolution feature map to obtain a first deconvolution feature map of the image to be processed;
[0015] Based on the first dilation feature map, the first convolution feature map and the first deconvolution feature map, a second reflectivity map of the image to be processed is determined.
[0016] In some embodiments of the present application, determining a second reflectivity map of the image to be processed based on the first dilated feature map, the first convolution feature map, and the first deconvolution feature map includes:
[0017] Fusing the first convolution feature map and the first deconvolution feature map to obtain a first fused feature map of the image to be processed;
[0018] Performing deconvolution processing on the first fused feature map to obtain a second deconvolution feature map of the image to be processed;
[0019] Fusing the first dilated feature map and the second deconvolution feature map to obtain a second fused feature map of the image to be processed;
[0020] The second fused feature map is convolved to obtain a second reflectivity map of the image to be processed.
[0021] In some embodiments of the present application, the first illumination map is enhanced based on the second reflectivity map to obtain a second illumination map of the image to be processed, including:
[0022] The second reflectivity map and the first illumination map are fused to obtain a second spliced image of the image to be processed;
[0023] Performing contrast enhancement on the second stitched image to obtain a first enhanced image of the image to be processed;
[0024] Performing detail enhancement on the second stitched image to obtain a second enhanced image of the image to be processed;
[0025] Performing fusion processing on the first enhanced image and the second enhanced image to obtain a third spliced image of the image to be processed;
[0026] The third stitched image is subjected to convolution processing to obtain a second illumination map of the image to be processed.
[0027] In some embodiments of the present application, contrast enhancement is performed on the second stitched image to obtain a first enhanced image of the image to be processed, including:
[0028] Performing dilated convolution processing on the second spliced image to obtain a second dilated feature map of the image to be processed;
[0029] Performing convolution processing on the second expanded feature map to obtain a second convolution feature map of the image to be processed;
[0030] Performing convolution and deconvolution processing on the second convolution feature map to obtain a third deconvolution feature map of the image to be processed;
[0031] Based on the second dilated feature map, the second convolution feature map and the third deconvolution feature map, a first enhanced image of the image to be processed is determined.
[0032] In some embodiments of the present application, determining a first enhanced image of the image to be processed based on the second dilated feature map, the second convolution feature map, and the third deconvolution feature map includes:
[0033] The second convolution feature map and the third deconvolution feature map are fused to obtain a third fused feature map of the image to be processed;
[0034] Performing deconvolution processing on the third fused feature map to obtain a fourth deconvolution feature map of the image to be processed;
[0035] Fusing the fourth deconvolution feature map and the second dilation feature map to obtain a fourth fused feature map of the image to be processed;
[0036] Fusing the fourth fused feature map, the fourth deconvolution feature map, and the third deconvolution feature map to obtain a fifth fused feature map of the image to be processed;
[0037] The fifth fused feature map is convolved to obtain a first enhanced image of the image to be processed.
[0038] In some embodiments of the present application, detail enhancement is performed on the second stitched image to obtain a second enhanced image of the image to be processed, including:
[0039] Performing convolution processing on the second stitched image to obtain a first spatial domain feature map of the image to be processed;
[0040] Performing spatial domain and frequency domain information exchange on the first spatial domain feature map to obtain a second spatial domain feature map of the image to be processed;
[0041] Reconstructing the details of the second spatial domain feature map to obtain a third spatial domain feature map of the image to be processed;
[0042] Performing spatial domain and frequency domain information exchange on the third spatial domain feature map to obtain a fourth spatial domain feature map of the image to be processed;
[0043] Fusing the fourth spatial domain feature map with the first spatial domain feature map to obtain a fused spatial domain feature map of the image to be processed;
[0044] The fused spatial domain feature map is convolved to obtain a second enhanced image of the image to be processed.
[0045] In a second aspect, an embodiment of the present invention further provides an image processing device, including:
[0046] An image decomposition unit, used for decomposing the acquired image to be processed to obtain a first illumination map and a first reflectivity map of the image to be processed;
[0047] An image denoising unit, configured to perform denoising processing on the first reflectivity map based on the first illumination map to obtain a second reflectivity map of the image to be processed;
[0048] An image enhancement unit, configured to enhance the first illumination map based on the second reflectivity map to obtain a second illumination map of the image to be processed;
[0049] The image processing unit is used to determine a target image of the image to be processed based on the second reflectivity map and the second illumination map.
[0050] In a third aspect, the present application further provides a computer device, the computer device comprising:
[0051] one or more processors;
[0052] Memory; and
[0053] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement any image processing method in the first aspect.
[0054] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program is loaded by a processor to execute the steps in any one of the image processing methods in the first aspect.
[0055] The beneficial effects of the present invention are as follows: based on the first illumination map, the first reflectivity map is denoised to obtain a second reflectivity map, based on the second reflectivity map, the first illumination map is enhanced to obtain a second illumination map, and based on the second reflectivity map and the second illumination map, a target image of the image to be processed is determined, which can reduce the noise of the image, enhance the contrast of the image, restore the details of the image, and obtain a target image with better image quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0057] Figure 1 is a flowchart of an image processing method provided by an embodiment of the present invention;
[0058] Figure 2 is a flowchart of a specific embodiment of the image processing method provided by an embodiment of the present invention;
[0059] Figure 3 is a schematic diagram of the structure of a decomposition module provided by an embodiment of the present invention;
[0060] Figure 4 is a schematic structural diagram of a residual block module provided by an embodiment of the present invention;
[0061] Figure 5 is a structural schematic diagram of a noise reduction module provided in an embodiment of the present invention;
[0062] Figure 6 is a schematic structural diagram of a first enhancement module provided in an embodiment of the present invention;
[0063] Figure 7 is a schematic diagram of the structure of a second enhancement module provided in an embodiment of the present invention;
[0064] Figure 8 is a structural schematic diagram of a first conversion module provided in an embodiment of the present invention;
[0065] Fig. 9 is a structural schematic diagram of a complex residual block unit provided by an embodiment of the present invention;
[0066] Fig.10 is a schematic diagram of the structure of a detail reconstruction module provided by an embodiment of the present invention;
[0067] Fig.11 is a schematic diagram of the structure of a second conversion module provided in an embodiment of the present invention;
[0068] Fig.12 is a principle block diagram of an image processing device provided by an embodiment of the present invention;
[0069] Fig.13 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0070] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0071] In the description of the present application, the terms "first", "second", "third", "fourth", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", "third", "fourth", etc. may explicitly or implicitly include one or more features. In the description of the present application, "multiple" means two or more, and "several" means one or more, unless otherwise clearly and specifically defined.
[0072] With the development of smart terminals (such as smart screens), new application scenarios such as gesture control, artificial intelligence (AI) home cameras, and AI somatosensory games have emerged. In these application scenarios, smart terminals are required to capture images in actual scenes. For example, in gesture control application scenarios, smart terminals are required to capture user gesture images and recognize the user's hand movements in gesture images to control smart terminals based on gestures; for example, in AI somatosensory game application scenarios, smart terminals are required to capture user motion images and recognize motion images to control games based on the user's motion recognition results. However, due to uneven lighting in the shooting environment, such as poor lighting conditions, backlight or backlighting of the object being photographed, the images captured by existing smart terminals have problems such as high noise, low contrast, and severe lack of details.
[0073] Based on this, in an embodiment of the present application, the acquired image to be processed is decomposed to obtain a first illumination map and a first reflectance map of the image to be processed; the first reflectance map is denoised based on the first illumination map to obtain a second reflectance map of the image to be processed; the first illumination map is enhanced based on the second reflectance map to obtain a second illumination map of the image to be processed; the first illumination map is enhanced based on the second reflectance map to obtain a second illumination map of the image to be processed, which can reduce the noise of the image, enhance the contrast of the image, restore the details of the image, and obtain a target image with better image quality.
[0074] The content of this application is further illustrated below through the description of embodiments in conjunction with the accompanying drawings.
[0075] This embodiment provides an image processing method, such as Figure 1 As shown in , the method includes:
[0076] Step S10: decompose the acquired image to be processed to obtain a first illumination map and a first reflectivity map of the image to be processed.
[0077] Specifically, the image to be processed can be an image acquired by an imaging module configured by a computer device (such as a smart TV) itself, or an image acquired by an imaging module of another computer device through the network, Bluetooth, infrared, etc. Due to poor lighting conditions (such as dim light or strong light), reflections or backlighting in the shooting environment, the image to be processed has problems such as high noise, low contrast, and serious lack of details.
[0078] Retinex theory believes that an image is composed of an illumination image and a reflection image. The illumination image is the information of the incident component of the object, and the reflection image is the reflected part of the object. After obtaining the image to be processed, this embodiment decomposes the image to be processed into a first illumination map and a first reflectivity map, and then performs image processing based on the first illumination map and the first reflectivity map.
[0079] In a specific implementation, Figure 2 As shown, the image to be processed is decomposed by the decomposition module 100. Accordingly, the step of decomposing the acquired image to be processed specifically includes: inputting the acquired image to be processed into the decomposition module 100, and outputting the first illumination map and the first reflectivity map of the image to be processed through the decomposition module 100.
[0080] Specifically, the decomposition module 100 can be obtained by training the preset first network model through the first training image set, and the first training image set includes multiple training image pairs, and each training image pair includes an uneven illumination image and a normal environment image. The training process of the first network model is: input each training image pair in the first training image set into the first network model, and output the third illumination map and the third reflectivity map of the uneven illumination image and the fourth illumination map and the fourth reflectivity map of the normal environment image through the first network model, and determine the first loss value based on the uneven illumination image, the third illumination map, the third reflectivity map, the normal environment image, the fourth illumination map, the fourth reflectivity map and the loss function of the first network model. When the first loss value does not meet the preset conditions, the model parameters of the first network model are corrected, and the step of inputting each training image pair in the first training image set into the first network model is continued until the first loss value meets the preset conditions. Among them, the calculation formula of the first loss value is: L IDM represents the first loss value, Indicates information loss, represents the perceptual loss, β1 and β2 represent and The weight coefficient of P represents the uneven illumination image, P′ represents the normal environment image, R represents the third reflectivity map, I represents the third illumination map, R′ represents the fourth reflectivity map, I′ represents the fourth illumination map, N represents the number of training image pairs, represents element-by-element multiplication, C j H j W j represents the size of the feature map of the jth layer of the loss network, Φ represents the loss network, Indicates that The result of inputting the loss network, Φ j (P) represents the result of inputting the uneven illumination image P into the loss network. Indicates that The result of inputting the loss network, Φ j (P′) represents the result of inputting the normal environment image P′ into the loss network.
[0081] In a specific implementation, Figure 3 As shown, the decomposition module 100 includes a second convolution module 110, a residual block module 120 and a third convolution module 130 which are cascaded in sequence, wherein the output item of the second convolution module 110 is the input item of the residual block module 120, and the output item of the residual block module 120 is the input item of the third convolution module 130. Accordingly, the step of decomposing the acquired image to be processed specifically includes: inputting the acquired image to be processed into the second convolution module 110 for convolution processing to obtain a third convolution feature map of the image to be processed, inputting the third convolution feature map into the residual block module 120 for convolution processing to obtain a fourth convolution feature map of the image to be processed, and fusing the fourth convolution feature map with the third convolution feature map to obtain a sixth fused feature map, and then determining a first illumination map and a first reflectivity map of the image to be processed based on the sixth fused feature map.
[0082] In a specific implementation example, the decomposition module 100 includes a second convolution module 110 and a residual block module 120. At this time, the step of determining the first illumination map and the first reflectivity map of the image to be processed based on the sixth fusion feature map specifically includes: inputting the first fusion feature map into the third convolution module 130, and outputting the first illumination map and the first reflectivity map of the image to be processed through the third convolution module 130.
[0083] In another specific implementation example, the decomposition module 100 includes multiple second convolution modules 110 and multiple residual block modules 120, and the multiple second convolution modules 110 and the multiple residual block modules 120 are alternately arranged. When determining the first illumination map and the first reflectivity map of the image to be processed based on the sixth fusion feature map, the sixth fusion feature map needs to be continuously input into the second convolution module 110 and the residual block module 120 for convolution processing and feature fusion, and then the fusion feature map is input into the third convolution module 130, and the first illumination map and the first reflectivity map of the image to be processed are output through the third convolution module 130. By setting the residual block module 120 between the multiple second convolution modules 110, it is possible to avoid the gradient disappearance or explosion of the decomposition module 100 during training.
[0084] Among them, the second convolution module 110 and the third convolution module 130 both include a convolution layer and an activation layer. The convolution layer in the second convolution module 110 and the third convolution module 130 can use a convolution kernel of size 3×3, and the activation layer can use a Leaky ReLU nonlinear activation function. Using this activation function can effectively prevent neuron "necrosis".
[0085] In a specific implementation, Figure 4 As shown, the residual block module 120 includes a first convolution unit 121, a second convolution unit 122, a third convolution unit 123 and a first fusion unit which are cascaded in sequence, and a fourth convolution unit 124 which is connected in parallel with the first convolution unit 121, the second convolution unit 122 and the third convolution unit 123. Among them, the output item of the first convolution unit 121 is the input item of the second convolution unit 122, the output item of the second convolution unit 122 is the input item of the third convolution unit 123, the input item of the first convolution unit 121 is the input item of the fourth convolution unit 124, and the output item of the third convolution unit 123 and the output item of the fourth convolution unit 124 are the input items of the first fusion unit.
[0086] Among them, the first convolution unit 121, the third convolution unit 123 and the fourth convolution unit 124 all include convolution layers and activation layers. The convolution layers in the first convolution unit 121, the third convolution unit 123 and the fourth convolution unit 124 can use a convolution kernel of size 1×1, and the activation layer can use a Leaky ReLU nonlinear activation function. The second convolution unit 122 also includes a convolution layer and an activation layer. The convolution layer in the second convolution unit 122 can use a convolution kernel of size 3×3, and the activation layer can use a Leaky ReLU nonlinear activation function.
[0087] Further, the second convolution unit 122 can be set to multiple, for example, continue to refer to Figure 4As shown, the number of the second convolution units 122 can be set to 3. At this time, the number of kernels of the convolution layers in the first convolution unit 121, the three second convolution units 122 and the third convolution unit 123 can be {64, 128, 256, 128, 64} respectively.
[0088] Step S20: enhance the first illumination map based on the second reflectivity map to obtain a second illumination map of the image to be processed.
[0089] The second reflectivity map is the first reflectivity map after denoising, the second reflectivity map has the same image content as the first reflectivity map, and the second reflectivity map has lower image noise than the first reflectivity map. After obtaining the first illumination map and the first reflectivity map of the image to be processed, this embodiment performs denoising on the first reflectivity map with the first illumination map as a constraint to obtain the second reflectivity map.
[0090] Continue to refer to Figure 2 As shown, in this embodiment, the first reflectivity map is denoised by the denoising module 200. Accordingly, the step of determining the second reflectivity map of the image to be processed based on the first illumination map and the first reflectivity map specifically includes: fusing the first illumination map and the first reflectivity map to obtain a first spliced image of the image to be processed, inputting the first spliced image into the denoising module 200, and outputting the second reflectivity map of the image to be processed through the denoising module 200.
[0091] In a specific implementation, the denoising module 200 obtains the preset second network model by training the third illumination map, the third reflectivity map and the fourth reflectivity map output by the decomposition module 100. The training process of the second network model is: input the third illumination map and the third reflectivity map into the second network model, output the denoised third reflectivity map through the second network model, and determine the second loss value based on the denoised third reflectivity map, the fourth reflectivity map and the loss function of the second network model. When the second loss value does not meet the preset conditions, the model parameters of the second network model are corrected, and the steps of inputting the third illumination map and the third reflectivity map into the second network model and outputting the denoised third reflectivity map through the second network model are continued until the second loss value meets the preset conditions. Among them, the calculation formula of the second loss value is: L NRM represents the second loss value, Indicates information loss, represents the perceptual loss, β3 and β4 represent and The weight coefficient of represents the third reflectivity map after denoising, R′ represents the fourth reflectivity map, N represents the number of training image pairs, C j Hj W j represents the size of the feature map of the jth layer of the loss network, Φ represents the loss network, Indicates that The result of inputting the loss network, Φ j (R′) represents the result of inputting R′ into the loss network.
[0092] In a specific implementation, step S20 includes:
[0093] Step S21, fusing the first illumination map and the first reflectivity map to obtain a first spliced image of the image to be processed;
[0094] Step S22, performing dilated convolution processing on the first spliced image to obtain a first dilated feature map of the image to be processed;
[0095] Step S23, performing convolution processing on the first dilated feature map to obtain a first convolution feature map of the image to be processed;
[0096] Step S24, performing convolution and deconvolution processing on the first convolution feature map to obtain a first deconvolution feature map of the image to be processed;
[0097] Step S25: determining a second reflectivity map of the image to be processed based on the first dilation feature map, the first convolution feature map and the first deconvolution feature map.
[0098] In a specific implementation, Figure 5 As shown, the denoising module 200 includes a first dilated convolution module 210, a first convolution residual module 220 and a second convolution residual module 230 which are cascaded in sequence. The output item of the first dilated convolution module 210 is the input item of the first convolution residual module 220, and the output item of the first convolution residual module 220 is the input item of the second convolution residual module 230. Correspondingly, the step of determining the second reflectivity map of the image to be processed based on the first illumination map and the first reflectivity map specifically includes: fusing the first illumination map and the first reflectivity map to obtain a first spliced image of the image to be processed, inputting the first spliced image into the first dilated convolution module 210 for dilated convolution processing to obtain a first dilated feature map of the image to be processed, inputting the first dilated feature map into the first convolution residual module 220 for convolution processing to obtain a first convolution feature map of the image to be processed, inputting the first convolution feature map into the second convolution residual module 230 for convolution and deconvolution processing to obtain a first deconvolution feature map of the image to be processed, and determining the second reflectivity map of the image to be processed based on the first dilated feature map, the first convolution feature map and the first deconvolution feature map. In this embodiment, the denoising module 200 uses the spatial information of the image to denoise the first reflectivity map, which can solve the problem that the existing method of eliminating noise by suppressing high-frequency information in the reflectivity map easily leads to the loss of image details.
[0099] Specifically, continue to refer to Figure 5 As shown, the first dilated convolution module 210 may include two first dilated convolution units 211 cascaded in sequence and a residual block unit 212, the first dilated convolution unit 211 includes a convolution layer and an activation layer, the convolution layer in the first dilated convolution unit 211 may use a convolution kernel with a size of 3×3 and a dilation rate of 2 (dilation rate=2), and the activation layer may use a Leaky ReLU nonlinear activation function. The first convolution residual module 220 includes a cascaded fifth convolution unit 221 and a residual block unit 222, the fifth convolution unit 221 includes a convolution layer and an activation layer, the convolution layer in the fifth convolution unit 221 may use a convolution kernel with a size of 2×2 and a step size of 2, and the activation layer may use a Leaky ReLU nonlinear activation function. The second convolution residual module 230 includes a fifth convolution unit 231, a residual block unit 232 and a first deconvolution unit 233 which are cascaded in sequence. The fifth convolution unit 231 has the same structure as the fifth convolution unit 221. The first deconvolution unit 233 includes a deconvolution layer and an activation layer. The deconvolution layer in the first deconvolution unit 233 can use a deconvolution kernel with a size of 2×2 and a step size of 2, and the activation layer can use a Leaky ReLU nonlinear activation function.
[0100] It should be noted that the structures of the residual block unit 212, the residual block unit 222 and the residual block unit 232 are the same as the structure of the aforementioned residual block module 120. For details, reference may be made to the structure of the aforementioned residual block module 120, and this application will not repeat them here.
[0101] Continue to refer to Figure 5 As shown, the denoising module 200 also includes a first fusion module 240, a first deconvolution module 250, a second fusion module 260 and a fourth convolution module 270 which are cascaded in sequence. Among them, the output item of the second convolution residual module 230 and the output item of the first convolution residual module 220 are input items of the first fusion module 240, the output item of the first fusion module 240 is the input item of the first deconvolution module 250, the output item of the first deconvolution module 250 and the output item of the first dilated convolution module 210 are the input items of the second fusion module 260, and the output item of the second fusion module 260 is the input item of the fourth convolution module 270.
[0102] Correspondingly, step S25 may specifically include: inputting the first convolution feature map and the first deconvolution feature map into the first fusion module 240 for fusion to obtain a first fused feature map of the image to be processed, inputting the first fused feature map into the first deconvolution module 250 for deconvolution processing to obtain a second deconvolution feature map of the image to be processed, inputting the first expansion feature map and the second deconvolution feature map into the second fusion module 260 for fusion to obtain a second fused feature map of the image to be processed, and inputting the second fused feature map into the fourth convolution module 270 for convolution processing to obtain a second reflectivity map of the image to be processed.
[0103] Among them, both the first fusion module 240 and the second fusion module 260 can adopt residual block units, and the structure of the residual block unit is the same as the structure of the aforementioned residual block module 120. For details, please refer to the structure of the aforementioned residual block module 120, and this application will not repeat them here. The first deconvolution module 250 includes a deconvolution layer and an activation layer. The deconvolution layer in the first deconvolution module 250 can use a deconvolution kernel of size 2×2 and a step size of 2, and the activation layer can use a Leaky ReLU nonlinear activation function. The fourth convolution module 270 includes a convolution layer and an activation layer. The convolution layer in the fourth convolution module 270 can use a convolution kernel of size 1×1, and the activation layer can use a Leaky ReLU nonlinear activation function.
[0104] Step S30: enhance the first illumination map based on the second reflectivity map to obtain a second illumination map of the image to be processed.
[0105] The second illumination map is the enhanced first illumination map. After determining the second reflectivity map of the image to be processed, this embodiment performs enhancement processing on the first illumination map based on the second reflectivity map to obtain the second illumination map of the image to be processed.
[0106] In a specific implementation, the first illumination map is enhanced by an image enhancement module, and the step of determining the second illumination map of the image to be processed based on the second reflectance map and the first illumination map specifically includes: fusing the second reflectance map and the first illumination map to obtain a second stitched image of the image to be processed, inputting the second stitched image into the image enhancement module, and outputting the second illumination map of the image to be processed through the image enhancement module.
[0107] In a specific implementation, the image enhancement module trains the preset third network model through the denoised third reflectivity map, the third illumination map and the normal environment image. The training process of the third network model is: input the denoised third reflectivity map and the third illumination map into the image enhancement module for enhancement, and determine the predicted image based on the enhanced third illumination map and the denoised third reflectivity map, determine the third loss value based on the predicted image, the normal environment image and the loss function of the third network model, when the third loss value does not meet the preset conditions, correct the model parameters of the third network model, and continue to execute the step of inputting the denoised third reflectivity map and the third illumination map into the image enhancement module for enhancement until the third loss value meets the preset conditions. Among them, the calculation formula of the third loss value is: L E-Block represents the third loss value, Indicates information loss, represents the perceived loss, Indicates frequency loss, β5, β6 and β7 indicate and The weight coefficient of represents the predicted image, P′ represents the normal environment image, N represents the number of training image pairs, C j H j W j represents the size of the feature map of the jth layer of the loss network, Φ represents the loss network, Indicates that The result of inputting the loss network, Φ j (P′) represents the result of inputting P′ into the loss network, express and P i ′ is the set of all possible joint distributions that can be combined, represents the i-th element of the predicted image after frequency domain transformation, P i ′ represents the i-th element of the normal environment image P′ after frequency domain transformation, x, y~γ represents a random sample x and y drawn from the γ joint distribution, E x,y~γ [‖xy‖] represents the expected distance of the sample.
[0108] In a specific implementation, step S30 includes:
[0109] Step S31, fusing the second reflectivity map and the first illumination map to obtain a second spliced image of the image to be processed;
[0110] Step S32, performing contrast enhancement on the second stitched image to obtain a first enhanced image of the image to be processed;
[0111] Step S33, performing detail enhancement on the second stitched image to obtain a second enhanced image of the image to be processed;
[0112] Step S34, fusing the first enhanced image and the second enhanced image to obtain a third spliced image of the image to be processed;
[0113] Step S35: performing convolution processing on the third stitched image to obtain a second illumination map of the image to be processed.
[0114] Continue to refer to Figure 2 As shown, the image enhancement module includes a first enhancement module 300 and a second enhancement module 400. The first enhancement module 300 is used to enhance the contrast of the first illumination map by using the spatial information of the image, and the second enhancement module 400 is used to enhance the details of the first illumination map by using the frequency information of the image. The image enhancement module of this embodiment can enhance the illumination map by using the spatial information and the frequency information of the image at the same time, and can restore more details of the image while enhancing the contrast of the image.
[0115] Continue to refer to Figure 2 As shown, after the first enhancement module 300 and the second enhancement module 400 output the first enhanced image and the second enhanced image respectively, the first enhanced image and the second enhanced image are fused to obtain a third spliced image of the image to be processed, and then the third spliced image is input into the first convolution module, and the third spliced image is convoluted by the first convolution module to obtain a second illumination map. The first convolution module includes a convolution layer and an activation layer, the convolution layer can use a convolution kernel of size 3×3, and the activation layer can use a PReLU activation function.
[0116] like Figure 6 As shown, the first enhancement module 300 includes a second dilated convolution module 310, a third convolution residual module 320 and a fourth convolution residual module 330 which are cascaded in sequence. Among them, the output item of the second dilated convolution module 310 is the input item of the third convolution residual module 320, and the output item of the third convolution residual module 320 is the input item of the fourth convolution residual module 330. Correspondingly, the step of contrast enhancement on the second spliced image in step S32 specifically includes: inputting the second spliced image into the second dilated convolution module 310 for dilated convolution processing to obtain a second dilated feature map of the image to be processed, inputting the second dilated feature map into the third convolution residual module 320 for convolution processing to obtain a second convolution feature map of the image to be processed, inputting the second convolution feature map into the fourth convolution residual module 330 for convolution and deconvolution processing to obtain a third deconvolution feature map of the image to be processed, and determining the first enhanced image of the image to be processed based on the second dilated feature map, the second convolution feature map and the third deconvolution feature map.
[0117] Continue to refer to Figure 6 As shown, the second dilated convolution module 310 includes two second dilated convolution units 311 cascaded in sequence and a residual block unit 312, the second dilated convolution unit 311 includes a convolution layer and an activation layer, the convolution layer in the second dilated convolution unit 311 can use a convolution kernel of 3×3 and a dilation rate of 2 (dilation rate=2), and the activation layer can use a PReLU activation function. The third convolution residual module 320 includes a cascaded sixth convolution unit 321 and a residual block unit 322, the sixth convolution unit 321 includes a convolution layer and an activation layer, the convolution layer in the sixth convolution unit 321 can use a convolution kernel of 3×3 and a step size of 2, and the activation layer can use a PReLU activation function. The fourth convolution residual module 330 includes a sixth convolution unit 331, a residual block unit 332 and a second deconvolution unit 333 which are cascaded in sequence. The sixth convolution unit 331 has the same structure as the sixth convolution unit 321. The second deconvolution unit 333 includes a deconvolution layer and an activation layer. The deconvolution layer in the second deconvolution unit 333 can use a deconvolution kernel with a size of 2×2 and a step size of 2, and the activation layer can use a PReLU activation function.
[0118] It should be noted that the structures of the residual block unit 312, the residual block unit 322 and the residual block unit 332 are the same as the structure of the aforementioned residual block module 120. For details, reference may be made to the structure of the aforementioned residual block module 120, and this application will not repeat them here.
[0119] Continue to refer to Figure 6 As shown, the first enhancement module 300 also includes a third fusion module 340, a second deconvolution module 350, a fourth fusion module 360, a fifth fusion module 370 and a fifth convolution module 380 which are cascaded in sequence. Among them, the output items of the fourth convolution residual module 330 and the third convolution residual module 320 are input items of the third fusion module 340, the output item of the third fusion module 340 is the input item of the second deconvolution module 350, the output item of the second deconvolution module 350 and the output item of the second dilated convolution module 310 are the input items of the fourth fusion module 360, the output item of the fourth fusion module 360, the output item of the second deconvolution module 350 and the output item of the fourth convolution residual module 330 are the input items of the fifth fusion module 370, and the output item of the fifth fusion module 370 is the input item of the fifth convolution module 380.
[0120] Correspondingly, based on the second expanded feature map, the second convolution feature map and the third deconvolution feature map, the step of determining the first enhanced image of the image to be processed specifically includes: inputting the second convolution feature map and the third deconvolution feature map into the third fusion module 340 for fusion to obtain the third fused feature map of the image to be processed, inputting the third fused feature map into the second deconvolution module 350 for deconvolution processing to obtain the fourth deconvolution feature map of the image to be processed, inputting the fourth deconvolution feature map and the second expanded feature map into the fourth fusion module 360 for fusion to obtain the fourth fused feature map of the image to be processed, inputting the fourth fused feature map, the fourth deconvolution feature map and the third deconvolution feature map into the fifth fusion module 370 for fusion to obtain the fifth fused feature map of the image to be processed, inputting the fifth fused feature map into the fifth convolution module 380 for convolution processing to obtain the first enhanced image of the image to be processed.
[0121] Among them, the third fusion module 340 and the fourth fusion module 360 can use residual block units, and the structure of the residual block unit is the same as the structure of the aforementioned residual block module 120. The second deconvolution module 350 includes a deconvolution layer and an activation layer. The deconvolution layer in the second deconvolution module 350 can use a deconvolution kernel of size 2×2 and a step size of 2, and the activation layer can use a PReLU activation function. The fifth fusion module 370 includes two cascaded seventh convolution units 371. The seventh convolution unit 371 and the fifth convolution module 380 both include convolution layers and activation layers. The convolution layer in the seventh convolution unit 371 can use a convolution kernel of size 3×3, and the convolution layer in the fifth convolution module 380 can use a convolution kernel of size 1×1. The activation layers in the seventh convolution unit 371 and the fifth convolution module 380 can use a PReLU activation function.
[0122] In a specific implementation, Figure 7 As shown, the second enhancement module 400 includes a sixth convolution module 410, a seventh convolution module 420, a first conversion module 430, a detail reconstruction module 440, a second conversion module 450, an eighth convolution module 460 and a ninth convolution module 470 which are cascaded in sequence. Among them, the output item of the sixth convolution module 410 is the input item of the seventh convolution module 420, the output item of the seventh convolution module 420 is the input item of the first conversion module 430, the output item of the first conversion module 430 is the input item of the detail reconstruction module 440, the output item of the detail reconstruction module 440 is the input item of the second conversion module 450, the output item of the second conversion module 450 and the output item of the seventh convolution module 420 are the input items of the eighth convolution module 460, and the output item of the eighth convolution module 460 is the input item of the ninth convolution module 470.
[0123] Correspondingly, step S33 specifically includes: inputting the second stitching module into the sixth convolution module 410 and the seventh convolution module 420 in sequence for convolution processing to obtain a first spatial domain feature map of the image to be processed, inputting the first spatial domain feature map into the first conversion module 430 for spatial domain and frequency domain information exchange to obtain a second spatial domain feature map of the image to be processed, inputting the second spatial domain feature map into the detail reconstruction module 440 for detail reconstruction to obtain a third spatial domain feature map of the image to be processed, inputting the third spatial domain feature map into the second conversion module 450 for spatial domain and frequency domain information exchange to obtain a fourth spatial domain feature map of the image to be processed, inputting the fourth spatial domain feature map and the first spatial domain feature map into the eighth convolution module 460 for fusion to obtain a fused spatial domain feature map of the image to be processed, and inputting the fused spatial domain feature map into the ninth convolution module 470 for convolution processing to obtain a second enhanced image of the image to be processed.
[0124] Among them, the sixth convolution module 410, the seventh convolution module 420 and the eighth convolution module 460 all include convolution layers and activation layers. The convolution layers in the sixth convolution module 410, the seventh convolution module 420 and the eighth convolution module 460 can use a convolution kernel with a size of 3×3 and a step size of 2, and the activation layer can use a PReLU activation function. The eighth convolution module 470 includes a convolution layer and an activation layer. The convolution layer in the eighth convolution module 470 can use a convolution kernel with a size of 1×1, and the activation layer can use a PReLU activation function.
[0125] In a specific implementation, Figure 8 As shown, the first conversion module 430 includes a first complex convolution unit 431, a Fourier transform unit 432, a complex residual block unit 433, an inverse Fourier transform unit 434, a second complex convolution unit 435 and an eighth convolution unit 436 which are cascaded in sequence. Among them, the output item of the first complex convolution unit 431 and the input item of the first complex convolution unit 431 are the input items of the Fourier transform unit 432, the output item of the Fourier transform unit 432 is the input item of the complex residual block unit 433, the output item of the complex residual block unit 433 is the input item of the inverse Fourier transform unit 434, the output item of the inverse Fourier transform unit 434 is the input item of the second complex convolution unit 435, the output item of the inverse Fourier transform unit 434 and the output item of the second complex convolution unit 435 are the input items of the eighth convolution unit 436.
[0126] Correspondingly, the step of exchanging spatial domain and frequency domain information on the first spatial domain feature map specifically includes: inputting the first spatial domain feature map into the first complex convolution unit 431 for complex convolution processing to obtain the processed first spatial domain feature map, inputting the processed first spatial domain feature map and the first spatial domain feature map into the Fourier transform unit 432 for Fourier transform, to obtain the first frequency domain feature map of the image to be processed, inputting the first frequency domain feature map into the complex residual block unit 433 and the inverse Fourier transform unit 434 in turn for complex convolution processing and inverse Fourier transform, to obtain the fifth spatial domain feature map of the image to be processed, inputting the fifth spatial domain feature map into the second complex convolution unit 435 for complex convolution processing to obtain the processed fifth spatial domain feature map, inputting the processed fifth spatial domain feature map and the fifth spatial domain feature map into the eighth convolution unit 436 for fusion, to obtain the second spatial domain feature map of the image to be processed.
[0127] Specifically, continue to refer to Figure 8 As shown, the first complex convolution unit 431 and the second complex convolution unit 435 each include a first complex convolution layer, a first activation layer and a second complex convolution layer cascaded in sequence. Among them, the first complex convolution layer and the second complex convolution layer can use a complex convolution kernel of size 3×3, and the first activation layer can use a Leaky ReLU nonlinear activation function. The eighth convolution unit 436 includes a convolution layer and an activation layer. The convolution layer in the eighth convolution unit 436 can use a convolution kernel of size 3×3 and a step size of 2, and the activation layer can use a PReLU activation function.
[0128] Furthermore, if Fig. 9 As shown, the complex residual block unit 433 includes a third complex convolution layer, a fourth complex convolution layer and a fusion layer cascaded in sequence. Among them, the output item of the third complex convolution layer is the input item of the fourth complex convolution layer, and the output item of the fourth complex convolution layer and the input item of the third complex convolution layer are the input items of the fusion layer. The third complex convolution layer includes a convolution layer and an activation layer. The convolution layer in the third complex convolution layer can use a complex convolution kernel of size 3×3, the activation layer can use a CReLU activation function, and the fourth complex convolution layer can use a complex convolution kernel of size 3×3.
[0129] like Fig.10As shown, the detail reconstruction module 440 includes a Fourier transform unit 441, a third complex convolution unit 442, a complex residual block unit 443, a fourth complex convolution unit 444 and an inverse Fourier transform unit 445 which are cascaded in sequence. Accordingly, the detail reconstruction of the second spatial domain feature map may specifically include: inputting the second spatial domain feature map into the Fourier transform unit 441 for Fourier transform to obtain a second frequency domain feature map of the image to be processed, inputting the second frequency domain feature map into the third complex convolution unit 442, the complex residual block unit 443 and the fourth complex convolution unit 444 in sequence for complex convolution processing to obtain a processed second frequency domain feature map, and inputting the second frequency domain feature map into the inverse Fourier transform unit 445 for inverse Fourier transform to obtain a third spatial domain feature map of the image to be processed.
[0130] Among them, the third complex convolution unit 442 and the fourth complex convolution unit 444 can use a complex convolution kernel of size 3×3. The complex residual block unit 443 can be set to multiple, for example, the detail reconstruction module 440 includes two cascaded complex residual block units 443, and the structure of the complex residual block unit 443 is the same as the structure of the aforementioned complex residual block unit 433. For details, reference can be made to the structure of the aforementioned complex residual block unit 433, and this application will not repeat them here.
[0131] like Fig.11 As shown, the second conversion module 450 includes a third deconvolution unit 451, a fifth complex convolution unit 452, a Fourier transform unit 453, a complex residual block unit 454, an inverse Fourier transform unit 455, a sixth complex convolution unit 456 and a second fusion unit which are cascaded in sequence. Among them, the output item of the third deconvolution unit 451 is the input item of the fifth complex convolution unit 452, the output item of the fifth complex convolution unit 452 and the output item of the third deconvolution unit 451 are the input items of the Fourier transform unit 453, the output item of the Fourier transform unit 453 is the input item of the complex residual block unit 454, the output item of the complex residual block unit 454 is the input item of the inverse Fourier transform unit 455, the output item of the inverse Fourier transform unit 455 is the input item of the sixth complex convolution unit 456, and the output item of the sixth complex convolution unit 456 and the output item of the inverse Fourier transform unit 455 are the input items of the second fusion unit.
[0132] Correspondingly, exchanging spatial domain and frequency domain information on the third spatial domain feature map may specifically include: inputting the third spatial domain feature map into the third deconvolution unit 451 for deconvolution processing to obtain a fifth deconvolution feature map, inputting the fifth deconvolution feature map into the fifth complex convolution unit 452 for complex convolution processing to obtain a processed fifth deconvolution feature map, inputting the processed fifth deconvolution feature map and the fifth deconvolution feature map into the Fourier transform unit 453 for Fourier transform to obtain a third frequency domain feature map, inputting the third frequency domain feature map into the complex residual block unit 454 and the inverse Fourier transform unit 455 in sequence for complex convolution processing and inverse Fourier transform to obtain a sixth spatial domain feature map of the image to be processed, inputting the sixth spatial domain feature map into the sixth complex convolution unit 456 for complex convolution processing to obtain a processed sixth spatial domain feature map, inputting the processed sixth spatial domain feature map and the sixth spatial domain feature map into the second fusion unit for fusion to obtain a fourth spatial domain feature map of the image to be processed.
[0133] Specifically, continue to refer to Fig.11 As shown, the fifth complex convolution unit 452 and the fifth complex convolution unit 456 both include a fourth complex convolution layer, a second activation layer and a fifth complex convolution layer cascaded in sequence. Among them, the fourth complex convolution layer and the fifth complex convolution layer can use a complex convolution kernel of size 3×3, and the second activation layer can use a Leaky ReLU nonlinear activation function. The third deconvolution unit 451 includes a deconvolution layer and an activation layer. The deconvolution layer in the third deconvolution unit 451 can use a deconvolution kernel of size 2×2, and the activation layer can use a PReLU activation function. The complex residual block unit 454 has the same structure as the aforementioned complex residual block unit 433, and this application will not repeat it here.
[0134] Step S40: Determine a target image of the image to be processed based on the second reflectivity map and the second illumination map.
[0135] After obtaining the second reflectivity map and the second illuminance map in this embodiment, the second reflectivity map and the second illuminance map are multiplied pixel by pixel to obtain the target image of the image to be processed. Since the second reflectivity map has lower noise than the first reflectivity map, the second illuminance map has enhanced contrast and details compared with the first illuminance map. Determining the target image based on the second reflectivity map and the second illuminance map can reduce the noise of the image, enhance the contrast of the image, restore the details of the image, and obtain a target image with better image quality.
[0136] In order to better implement the image processing method in the embodiment of the present application, based on the image processing method, an image processing device is also provided in the embodiment of the present application, such as Fig.12 As shown, the image processing device includes:
[0137] An image decomposition unit 610 is used to decompose the acquired image to be processed to obtain a first illumination map and a first reflectivity map of the image to be processed;
[0138] An image denoising unit 620, configured to perform denoising processing on the first reflectivity map based on the first illumination map to obtain a second reflectivity map of the image to be processed;
[0139] An image enhancement unit 630 is used to enhance the first illumination map based on the second reflectivity map to obtain a second illumination map of the image to be processed;
[0140] The image processing unit 640 is used to determine a target image of the image to be processed based on the second reflectivity map and the second illumination map.
[0141] In the embodiment of the present application, determining the target image of the image to be processed based on the second reflectivity map and the second illumination map can reduce the noise of the image, enhance the contrast of the image, restore the details of the image, and obtain a target image with better image quality.
[0142] In some embodiments of the present application, the image noise reduction unit 620 is specifically used to:
[0143] Performing fusion processing on the first illumination map and the first reflectivity map to obtain a first spliced image of the image to be processed;
[0144] Performing dilated convolution processing on the first spliced image to obtain a first dilated feature map of the image to be processed;
[0145] Performing convolution processing on the first dilated feature map to obtain a first convolution feature map of the image to be processed;
[0146] Performing convolution and deconvolution processing on the first convolution feature map to obtain a first deconvolution feature map of the image to be processed;
[0147] Based on the first dilation feature map, the first convolution feature map and the first deconvolution feature map, a second reflectivity map of the image to be processed is determined.
[0148] In some embodiments of the present application, the image enhancement unit 630 is specifically used to:
[0149] The second reflectivity map and the first illumination map are fused to obtain a second spliced image of the image to be processed;
[0150] Performing contrast enhancement on the second stitched image to obtain a first enhanced image of the image to be processed;
[0151] Performing detail enhancement on the second stitched image to obtain a second enhanced image of the image to be processed;
[0152] Performing fusion processing on the first enhanced image and the second enhanced image to obtain a third spliced image of the image to be processed;
[0153] The third stitched image is subjected to convolution processing to obtain a second illumination map of the image to be processed.
[0154] The embodiment of the present application further provides a computer device, which integrates any one of the image processing devices provided in the embodiment of the present application, and the computer device includes:
[0155] one or more processors;
[0156] Memory; and
[0157] One or more applications, wherein the one or more applications are stored in the memory and are configured to execute, by the processor, the steps of the image processing method in any of the above-mentioned image processing method embodiments.
[0158] The present application also provides a computer device that integrates any image processing device provided in the present application. Fig.13 As shown, it shows a schematic diagram of the structure of the computer device involved in the embodiment of the present application, specifically:
[0159] The computer device may include one or more processing core processors 801, one or more computer-readable storage media memories 802, a power supply 803, an input unit 804 and other components. Those skilled in the art will appreciate that Fig.13 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0160] The processor 801 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 802 and calling data stored in the memory 802, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 801 may include one or more processing cores; preferably, the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 801.
[0161] The memory 802 can be used to store software programs and modules. The processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 with access to the memory 802.
[0162] The computer device also includes a power supply 803 for supplying power to each component. Preferably, the power supply 803 can be logically connected to the processor 801 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions. The power supply 803 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
[0163] The computer device may further include an input unit 804, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0164] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 801 in the computer device will load the executable files corresponding to the processes of one or more application programs into the memory 802 according to the following instructions, and the processor 801 will run the application programs stored in the memory 802, thereby realizing various functions, as follows:
[0165] Decomposing the acquired image to be processed to obtain a first illumination map and a first reflectivity map of the image to be processed;
[0166] Performing denoising processing on the first reflectivity map based on the first illumination map to obtain a second reflectivity map of the image to be processed;
[0167] Performing enhancement processing on the first illumination map based on the second reflectivity map to obtain a second illumination map of the image to be processed;
[0168] Based on the second reflectivity map and the second illumination map, a target image of the image to be processed is determined.
[0169] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0170] To this end, the embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any image processing method provided in the embodiment of the present application. For example, the computer program can be loaded by a processor to execute the following steps:
[0171] Decomposing the acquired image to be processed to obtain a first illumination map and a first reflectivity map of the image to be processed;
[0172] Performing denoising processing on the first reflectivity map based on the first illumination map to obtain a second reflectivity map of the image to be processed;
[0173] Performing enhancement processing on the first illumination map based on the second reflectivity map to obtain a second illumination map of the image to be processed;
[0174] Based on the second reflectivity map and the second illumination map, a target image of the image to be processed is determined.
[0175] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.
[0176] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.
[0177] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0178] The above is a detailed introduction to an image processing method, device, computer equipment and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An image processing method, characterized in that: include: Decomposing the acquired image to be processed to obtain a first illumination map and a first reflectivity map of the image to be processed; Performing noise reduction processing on the first reflectivity map based on the first illumination map to obtain a second reflectivity map of the image to be processed; Performing enhancement processing on the first illumination map based on the second reflectivity map to obtain a second illumination map of the image to be processed; Based on the second reflectivity map and the second illumination map, a target image of the image to be processed is determined.
2. The method according to claim 1, characterized in that The performing denoising on the first reflectivity map based on the first illumination map to obtain a second reflectivity map of the image to be processed includes: Performing fusion processing on the first illumination map and the first reflectivity map to obtain a first spliced image of the image to be processed; Performing dilated convolution processing on the first spliced image to obtain a first dilated feature map of the image to be processed; Performing convolution processing on the first dilated feature map to obtain a first convolution feature map of the image to be processed; Performing convolution and deconvolution processing on the first convolution feature map to obtain a first deconvolution feature map of the image to be processed; Based on the first dilated feature map, the first convolution feature map and the first deconvolution feature map, a second reflectivity map of the image to be processed is determined.
3. The method according to claim 2, characterized in that The determining, based on the first dilated feature map, the first convolution feature map, and the first deconvolution feature map, a second reflectivity map of the image to be processed includes: Fusing the first convolution feature map and the first deconvolution feature map to obtain a first fused feature map of the image to be processed; Performing deconvolution processing on the first fused feature map to obtain a second deconvolution feature map of the image to be processed; Fusing the first dilated feature map and the second deconvolution feature map to obtain a second fused feature map of the image to be processed; The second fused feature map is convolved to obtain a second reflectivity map of the image to be processed.
4. The method according to claim 1, characterized in that: The step of performing enhancement processing on the first illumination map based on the second reflectivity map to obtain a second illumination map of the image to be processed includes: Performing fusion processing on the second reflectivity map and the first illumination map to obtain a second spliced image of the image to be processed; Performing contrast enhancement on the second stitched image to obtain a first enhanced image of the image to be processed; Performing detail enhancement on the second stitched image to obtain a second enhanced image of the image to be processed; Performing fusion processing on the first enhanced image and the second enhanced image to obtain a third spliced image of the image to be processed; The third stitched image is subjected to convolution processing to obtain a second illumination map of the image to be processed.
5. The method according to claim 4, characterized in that The step of performing contrast enhancement on the second stitched image to obtain a first enhanced image of the image to be processed includes: Performing dilated convolution processing on the second stitched image to obtain a second dilated feature map of the image to be processed; Performing convolution processing on the second dilated feature map to obtain a second convolution feature map of the image to be processed; Performing convolution and deconvolution processing on the second convolution feature map to obtain a third deconvolution feature map of the image to be processed; Based on the second dilated feature map, the second convolution feature map and the third deconvolution feature map, a first enhanced image of the image to be processed is determined.
6. The method according to claim 5, characterized in that The step of determining a first enhanced image of the image to be processed based on the second dilated feature map, the second convolution feature map, and the third deconvolution feature map comprises: Fusing the second convolution feature map and the third deconvolution feature map to obtain a third fused feature map of the image to be processed; Performing deconvolution processing on the third fused feature map to obtain a fourth deconvolution feature map of the image to be processed; Fusing the fourth deconvolution feature map and the second dilation feature map to obtain a fourth fused feature map of the image to be processed; fusing the fourth fused feature map, the fourth deconvolution feature map, and the third deconvolution feature map to obtain a fifth fused feature map of the image to be processed; Perform convolution processing on the fifth fused feature map to obtain a first enhanced image of the image to be processed.
7. The method according to claim 4, characterized in that The performing detail enhancement on the second stitched image to obtain a second enhanced image of the image to be processed includes: Performing convolution processing on the second stitched image to obtain a first spatial domain feature map of the image to be processed; Performing spatial domain and frequency domain information exchange on the first spatial domain feature map to obtain a second spatial domain feature map of the image to be processed; Reconstructing the second spatial domain feature map in detail to obtain a third spatial domain feature map of the image to be processed; Performing spatial domain and frequency domain information exchange on the third spatial domain feature map to obtain a fourth spatial domain feature map of the image to be processed; Fusing the fourth spatial domain feature map and the first spatial domain feature map to obtain a fused spatial domain feature map of the image to be processed; Convolution processing is performed on the fused spatial domain feature map to obtain a second enhanced image of the image to be processed.
8. An image processing device, characterized in that: include: An image decomposition unit, used for decomposing the acquired image to be processed to obtain a first illumination map and a first reflectivity map of the image to be processed; an image denoising unit, configured to perform denoising processing on the first reflectivity map based on the first illumination map to obtain a second reflectivity map of the image to be processed; an image enhancement unit, configured to perform enhancement processing on the first illumination map based on the second reflectivity map to obtain a second illumination map of the image to be processed; An image processing unit is used to determine a target image of the image to be processed based on the second reflectivity map and the second illumination map.
9. A computer device, characterized in that: The computer device comprises: one or more processors; Memory; and One or more application programs, wherein the one or more application programs are stored in the memory and are configured to be executed by the processor to implement the image processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the image processing method according to any one of claims 1 to 7.
