WO2020199141A1 - Overexposure recovery processing method, device and computer-readable storage medium - Google Patents

Overexposure recovery processing method, device and computer-readable storage medium Download PDF

Info

Publication number
WO2020199141A1
WO2020199141A1 PCT/CN2019/081093 CN2019081093W WO2020199141A1 WO 2020199141 A1 WO2020199141 A1 WO 2020199141A1 CN 2019081093 W CN2019081093 W CN 2019081093W WO 2020199141 A1 WO2020199141 A1 WO 2020199141A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
trained
overexposure
image
recovery
Prior art date
Application number
PCT/CN2019/081093
Other languages
French (fr)
Chinese (zh)
Inventor
薛立君
克拉夫琴科费奥多尔
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2019/081093 priority Critical patent/WO2020199141A1/en
Priority to CN201980005472.7A priority patent/CN111386697A/en
Publication of WO2020199141A1 publication Critical patent/WO2020199141A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals

Definitions

  • the embodiments of the present invention relate to the field of data processing, and in particular to an overexposure recovery processing method, device, and computer-readable storage medium.
  • Exposure refers to the amount of light allowed into the lens to shine on the photosensitive medium (the film of a film camera or the image sensor of a digital camera) during the photography process. Exposure can be controlled via a combination of aperture, shutter, and sensitivity of the photosensitive medium. Ideally, when the exposure is controlled within a reasonable range, the photo has strong contrast and moderate brightness. Overexposure refers to the fact that the picture is too bright and the photo is white due to too large aperture and too slow shutter. When the photo is exposed for too long or the area is too large, overexposure will occur, and overexposure will lead to the beauty of the photo Poor, it will also cause loss of photo details.
  • the prior art In order to restore the aesthetics of the overexposed photos, the prior art generally implements the recovery of the overexposed photos through a computer vision algorithm that relies on a highlight recovery (Hightlight Recovery) technology.
  • a highlight recovery Hightlight Recovery
  • Embodiments of the present invention provide an overexposure recovery processing method, equipment, and computer readable storage medium to solve the overexposure recovery effect caused by the overexposure recovery by computer vision algorithms relying on the exposure recovery (Highlight Recovery) technology in the prior art Poor technical problems with loss of photo details.
  • the first aspect of the embodiments of the present invention is to provide an overexposure recovery processing method, including:
  • Data processing is performed on the restoration matrix to obtain a restored target image.
  • the second aspect of the embodiments of the present invention is to provide an overexposure recovery processing device, including: a memory and a processor;
  • the memory is used to store program codes
  • the processor calls the program code, and when the program code is executed, is used to perform the following operations:
  • Data processing is performed on the restoration matrix to obtain a restored target image.
  • a third aspect of the embodiments of the present invention is to provide a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement the method described in the first aspect.
  • the overexposure recovery processing method, device, and computer readable storage medium provided in this embodiment perform overexposure recovery on the acquired image to be recovered through a preset overexposure recovery model, obtain a recovery matrix, and perform data processing on the recovery matrix , Can obtain the restored target image.
  • a preset overexposure recovery model for overexposure restoration, it is possible to avoid damage to the details of the image to be restored while performing overexposure restoration of the image to be restored, thereby achieving overexposure restoration of the image to be restored while improving the goal of restoration The quality of the image.
  • FIG. 1 is a schematic flowchart of an overexposure recovery processing method provided by Embodiment 1 of the present invention
  • Embodiment 2 is a schematic flowchart of an overexposure recovery processing method provided by Embodiment 2 of the present invention
  • FIG. 3 is a schematic structural diagram of a model capable of up-sampling and down-sampling according to an embodiment of the present invention
  • Embodiment 4 is a schematic flowchart of an overexposure recovery processing method provided by Embodiment 3 of the present invention.
  • Embodiment 4 of the present invention is a schematic flowchart of an overexposure recovery processing method provided by Embodiment 4 of the present invention.
  • FIG. 6 is a schematic structural diagram of an overexposure recovery processing device provided by Embodiment 5 of the present invention.
  • a component when a component is said to be “fixed to” another component, it can be directly on the other component or a central component may also exist. When a component is considered to be “connected” to another component, it can be directly connected to another component or there may be a centered component at the same time.
  • the present invention provides an overexposure recovery processing method , Equipment and computer-readable storage media.
  • the overexposure recovery processing method, device, and computer-readable storage medium provided by the present invention can be applied to any scene for recovering overexposed images.
  • FIG. 1 is a schematic flowchart of an overexposure recovery processing method provided by Embodiment 1 of the present invention. As shown in FIG. 1, the method includes:
  • Step 101 Obtain an image to be restored
  • Step 102 Perform an overexposure recovery operation on the image to be recovered through a preset overexposure recovery model to obtain a recovery matrix
  • Step 103 Perform data processing on the restoration matrix to obtain a restored target image.
  • the execution subject of this embodiment is an overexposure recovery processing device.
  • the image to be restored may be an overexposed image obtained by shooting with any overexposure parameter.
  • the image to be restored can be input into a preset overexposure restoration model for overexposure restoration.
  • the overexposure recovery model may be obtained by pre-training using a data set to be trained, and it may perform overexposure recovery on an overexposed image obtained by shooting with any kind of overexposure parameter.
  • the use of neural network model for overexposure restoration can avoid damage to the details of the image to be restored while performing overexposure restoration of the image to be restored, thereby achieving overexposure restoration of the image to be restored while improving The quality of the target image after restoration.
  • the restoration matrix output by the overexposure restoration model can be received, which is different from the Bayer matrix corresponding to the normal image. Therefore, in order to obtain the normal image, It is necessary to perform further data processing on the restoration model to obtain the restored target image.
  • step 103 specifically includes:
  • Matrix transformation is performed on the twelve-channel matrix to obtain a Bayer matrix corresponding to the twelve-channel matrix, and an image corresponding to the Bayer matrix corresponding to the twelve-channel matrix is used as the restored target image.
  • the overexposure recovery model after receiving the twelve-channel matrix output by the overexposure recovery model, since the data output by the overexposure recovery model is a twelve-channel recovery matrix, which is different from the Bayer matrix corresponding to the normal image, , It is necessary to perform matrix transformation on the restoration matrix, convert it into a Bayer matrix corresponding to twelve channels, and use the Bayer matrix corresponding to twelve channels as the restored target image. It should be noted that any matrix transformation method can be used to implement the matrix transformation of the twelve-channel matrix, and the present invention is not limited herein.
  • the overexposure recovery processing method provided in this embodiment performs overexposure recovery on the acquired image to be recovered through a preset overexposure recovery model to obtain a recovery matrix, and by performing data processing on the recovery matrix, the recovered target image can be obtained .
  • a preset overexposure recovery model to obtain a recovery matrix
  • the recovered target image can be obtained .
  • neural network model for overexposure restoration it is possible to avoid damage to the details of the image to be restored while performing overexposure restoration of the image to be restored, thereby achieving overexposure restoration of the image to be restored while improving the goal of restoration The quality of the image.
  • FIG. 2 is a schematic flow chart of an overexposure recovery processing method provided in Embodiment 2 of the present invention
  • FIG. 3 is a schematic structural diagram of a model capable of up-sampling and down-sampling provided in an embodiment of the present invention, based on any of the above embodiments
  • the method further includes:
  • Step 201 Obtain a data set to be trained, where the data set to be trained includes at least one image group to be trained;
  • Step 202 Train a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model.
  • the overexposure recovery model before performing overexposure recovery on the image to be recovered through the overexposure recovery model, the overexposure recovery model needs to be trained.
  • the data set to be trained can be obtained first, where the data set to be trained includes at least one set of images to be trained, and the image set to be trained includes a factual image shot with normal exposure parameters and shots with different overexposure parameters. A four-channel matrix corresponding to at least one overexposed image.
  • an overexposure recovery model can be obtained. Since the overexposure recovery model is obtained by training the fact image and the four-channel matrix corresponding to at least one overexposure image taken with different overexposure parameters, the overexposure recovery model can capture the waiting for any overexposure parameter. Restore the image for overexposure restoration.
  • the model to be trained is a convolutional neural network model.
  • the model to be trained is a model that can perform up-sampling and down-sampling.
  • the model to be trained may specifically be a multi-layer neural network model.
  • the input of the multi-layer neural network model is obtained by down-sampling and convolution of the input of the previous layer, and the output of each layer is spliced acquired.
  • the objects of splicing are: 1.
  • the output of the next layer is the result of upsampling convolution; 2.
  • the input of this layer is the result of convolution kernel convolution (Conv) and nonlinear activation (ReLU).
  • the multi-layer model to be trained may have a symmetric structure including up-sampling and down-sampling.
  • Down-sampling is realized by, for example, a maximum pooling layer (Max pool), and down-sampling is used to extract input feature images (eg, The process of up-sampling is to restore the feature information extracted by down-sampling to the image level, and then align and stitch with the up-sampled input information to restore the detailed information, and gradually restore the image accuracy.
  • Max pool a maximum pooling layer
  • the model can abstract the overexposed image through downsampling, extract the input deep information, and retain the shallow information of the image through a convolution and nonlinear activation and cropping, and then combine the deep information with Shallow information splicing, for the shallow information and deep information output by each layer in the downsampling structure, directly input them into the symmetrical upsampling layer of the downsampling layer, so that multiple input images from shallow to deep can be obtained Hierarchical information, so that the texture details in the overexposed area are extracted, and the image texture of the overexposed area can be restored.
  • the result of convolution on the lower layer image and the input of this layer are aligned at the pixel scale after the convolution kernel convolution (Conv) and nonlinear activation (ReLU).
  • connection layer when using multilayer neural network models, in order to enable the network structure to operate more efficiently, the above models that can perform upsampling and downsampling do not have all The connection layer, therefore, can greatly reduce the parameters that need to be trained. Since the redundant information may include the detailed information of the image to be restored, it can further ensure that the details of the image to be restored are not lost, and improve the accuracy of overexposure restoration To improve the quality of the restored target image.
  • the overexposure recovery processing method provided in this embodiment adopts the overexposure recovery model to perform overexposure recovery by preliminarily using the to-be-trained data set that includes at least one set of image groups to be trained to train the model to be trained, so as to provide for subsequent overexposure.
  • Exposure recovery provides the basis.
  • using a model capable of up-sampling and down-sampling as the model to be trained can ensure that the details of the image to be restored are not lost on the basis of realizing the restoration of the model to be restored.
  • the acquiring a data set to be trained includes:
  • the Bayer matrix corresponding to the first image information is converted into a four-channel matrix to obtain the data set to be trained.
  • the image collection device may be any device capable of realizing image collection, and the present invention is not limited herein.
  • the first image information is in a Raw format.
  • the RAW format is an unprocessed and uncompressed format. Therefore, it can retain all the texture information of the image, so that during the training process, the model to be trained can obtain all the texture information of the first image information in the RAW format and restore it .
  • images in PNG and JPG formats are 8bit data, and the color of the image is often inaccurate and only contains part of the texture information of the image, while the image in Raw format is 16bit data, which contains all of the image. Texture information.
  • training the model to be trained through the first image information in the Raw format can effectively improve the recovery accuracy of the model to be trained.
  • the Bayer matrix corresponding to the first image information needs to be converted into a four-channel matrix, and the four-channel matrix is used as the data set to be trained. It should be noted that converting the first image information into a four-channel matrix can reduce the size of the input matrix and improve the training efficiency of the model to be trained.
  • the overexposure recovery processing method provided in this embodiment acquires first image information collected by an image acquisition device, where the first image information is in Raw format; and converts the Bayer matrix corresponding to the first image information into a four-channel matrix, The data set to be trained is obtained, thereby providing a basis for subsequent overexposure recovery.
  • using the first image information in Raw format to train the model to be trained can effectively improve the recovery accuracy of the model to be trained; converting the first image information into a four-channel matrix can reduce the size of the input matrix and improve the model to be trained Training efficiency.
  • the training a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model includes:
  • the preset model to be trained before training the model to be trained, first, for each overexposure image in the data set to be trained, since it is obtained by shooting with different overexposure parameters, it needs to be calculated according to the overexposure parameters.
  • the overexposure multiple corresponding to the overexposed image. Therefore, the preset model to be trained can be trained subsequently according to the overexposure multiple and the overexposed image to obtain an overexposure recovery model.
  • the overexposure recovery processing method provided in this embodiment calculates the overexposure multiple corresponding to the overexposed image according to the overexposure parameter of the overexposed image for each overexposed image in the data set to be trained;
  • the overexposure image and the overexposure multiple train a preset model to be trained to obtain the overexposure recovery model, so that the accuracy of the overexposure recovery of the model can be improved on the basis of improving model training efficiency.
  • the overexposure parameter includes an aperture value and an exposure time
  • the calculating the overexposure multiple corresponding to the overexposed image according to the overexposure parameter of the overexposed image includes:
  • the overexposure multiple corresponding to the overexposed image is calculated according to the aperture value and the exposure time.
  • the overexposure parameter may specifically include the aperture value and the exposure time. Accordingly, the overexposure multiple corresponding to the overexposed image may also be calculated according to the aperture value and the exposure time. Specifically, the overexposure multiple corresponding to the overexposed image can be calculated according to the aperture value, the exposure time and the preset formula 1, and the overexposure multiple can describe the degree of overexposure of the overexposed image.
  • EV is the overexposure multiple corresponding to the overexposed image
  • N is the aperture value corresponding to the overexposed image
  • t is the exposure time corresponding to the overexposed image.
  • the overexposure recovery processing method provided by this embodiment calculates the overexposure multiple corresponding to the overexposed image according to the aperture value and the exposure time, so that the overexposure multiple corresponding to the overexposed image can be accurately determined.
  • the training a preset model to be trained according to the overexposure image and the overexposure multiple to obtain the overexposure recovery model includes:
  • the overexposure factor can be used as a priori knowledge, and the parameters of the model to be trained can be adjusted according to the overexposure factor to obtain the adjusted to-be-trained model.
  • the training process is to configure the parameters of the model to be trained through gradient descent until the parameters of the model to be trained converge. If the overexposed image is directly input into the model to be trained for recovery during the training process, the amount of calculation in the training process is relatively large and the training efficiency is low.
  • the parameters of the model to be trained are adjusted by the overexposure multiple obtained through calculation in advance, the overexposed image is input into the adjusted model to be trained.
  • the adjusted model to be trained can be trained according to the overexposed image to obtain the overexposed recovery model.
  • the overexposure recovery processing method provided in this embodiment adjusts the parameters of the model to be trained according to the overexposure parameters, and trains the adjusted model to be trained, thereby improving the training efficiency of the model to be trained.
  • Figure 4 is a schematic flow chart of the overexposure recovery processing method provided in the third embodiment of the present invention.
  • the preset model to be trained is trained according to the to-be-trained data set to obtain all Describe the overexposure recovery model, including:
  • Step 301 Input the four-channel matrix corresponding to the overexposed image into the model to be trained, and obtain the output result of the model to be trained;
  • Step 302 Calculate the difference between the output result and the fact image corresponding to the overexposed image
  • Step 303 Train the model to be trained according to the difference to obtain the overexposure recovery model.
  • the four-channel matrix corresponding to the overexposed image in the data set to be trained can be input into the model to be trained, and the model to be trained can process the overexposed image and output an output result.
  • the output result can be received, and the output result can be compared with the fact image corresponding to the overexposed image in the data set to be trained, and the difference between the two can be calculated. If the difference between the two is large, it means that the overexposure recovery performance of the model to be trained is poor, and training needs to be continued. Accordingly, if the difference between the two is small, it means that the output result is sufficiently similar to the fact image. That is, the overexposure recovery performance of the model to be trained is better.
  • the overexposure recovery processing method provided in this embodiment calculates the difference between the output result and the fact image corresponding to the overexposed image, and trains the model to be trained based on the difference, thereby improving the performance of the model to be trained. Overexposure recovery performance.
  • the training the model to be trained according to the difference to obtain the overexposure recovery model includes:
  • the training model in order to improve the overexposure recovery performance of the model to be trained, after calculating the difference between the output result and the fact image corresponding to the overexposed image, the training model can be continued to be trained based on the difference . Specifically, it can be judged whether the difference is greater than a preset threshold. If it is greater, it means that the overexposure recovery performance of the model to be trained is poor, and training needs to be continued. At this time, the difference can be based on the difference The parameters are adjusted until the difference between the output result of the model to be trained and the fact image is less than the preset threshold, that is, it is determined that the model to be trained converges, and the overexposure recovery model is obtained.
  • the difference is less than a preset threshold, it indicates that the output result is sufficiently similar to the fact image, that is, the overexposure recovery performance of the model to be trained is good, and at this time, it is determined that the model to be trained has converged.
  • Overexposure recovery model if the difference is less than a preset threshold, it indicates that the output result is sufficiently similar to the fact image, that is, the overexposure recovery performance of the model to be trained is good, and at this time, it is determined that the model to be trained has converged.
  • the overexposure recovery processing method provided in this embodiment trains the model to be trained according to the difference between the output result and the fact image corresponding to the overexposed image, thereby improving the overexposure recovery performance of the model to be trained.
  • Figure 5 is a schematic flow chart of the overexposure recovery processing method provided by the fourth embodiment of the present invention.
  • the preset model to be trained is trained according to the data set to be trained to obtain all Describe the overexposure recovery model, including:
  • Step 401 Randomly divide the data set to be trained into a training set and a verification set according to a preset ratio
  • Step 402 Train the model to be trained through the training set
  • Step 403 Verify the recovery accuracy of the to-be-trained model through the verification set, and obtain a verification result.
  • Step 404 Continue to train the model to be trained through the training set according to the verification result until the model to be trained converges to obtain the overexposure recovery model.
  • the data in the data set to be trained can be randomly divided into a training set and a verification set according to a preset ratio.
  • the preset ratio may be 8:2, or other ratios, and those skilled in the art can adjust it according to actual application requirements, and the present invention is not limited here.
  • the training model is trained through the data in the training set, the recovery accuracy of the training model is verified through the data in the verification set, and the verification result is obtained, and the training model is continued to be trained based on the verification result until the model converges.
  • the verification result indicates that the recovery accuracy of the model to be trained is high, it indicates that the model to be trained has converged and an overexposure recovery model is obtained; if the verification result indicates that the recovery accuracy of the model to be trained is low, then the model to be trained is characterized Training still needs to be continued. At this time, the data to be trained in the training set can be used to train the model to be trained until the model to be trained converges and an overexposure recovery model is obtained.
  • the overexposure recovery processing method provided in this embodiment randomly divides the data set to be trained into a training set and a verification set, and trains the training model through the data in the training set, and the recovery accuracy of the training model through the data in the verification set Perform verification and further process the model to be trained based on the verification result, thereby improving the accuracy of the model's recovery.
  • the training a preset model to be trained according to the data set to be trained, and after obtaining the overexposure recovery model, the method further includes:
  • the applicability of the model to be trained is tested through the test set.
  • the overexposure recovery model needs to perform overexposure recovery on various types of overexposed images, the need to change the overexposure recovery model has better applicability. Therefore, the second image information collected by the image acquisition device can be obtained. In order to verify the applicability of the model to be trained, the second image information and the first image information do not overlap at least partially. A test set is generated according to the second image information, and the applicability of the model to be trained is tested according to the test set. If it is verified that the applicability of the model to be trained is poor, it is necessary to use a wider set of data to be trained to continue training. If the applicability of the model to be trained is verified to be better, an overexposure recovery model can be obtained, and then The overexposure recovery can be performed according to the overexposure recovery model.
  • the overexposure recovery processing method provided in this embodiment generates a test set according to the second image information, and tests the applicability of the model to be trained according to the test set, so that the overexposure recovery accuracy of the model to be trained can be ensured. , Improve the applicability of the model to be trained.
  • the overexposure recovery processing device includes a memory 51 and a processor 52;
  • the memory 51 is used to store program codes
  • the processor 52 calls the program code, and when the program code is executed, is used to perform the following operations:
  • Data processing is performed on the restoration matrix to obtain a restored target image.
  • the processor before performing an overexposure recovery operation on the image to be recovered through a preset overexposure recovery model, the processor is further configured to:
  • the processor is configured to: when acquiring the data set to be trained:
  • the Bayer matrix corresponding to the image information is converted into a four-channel matrix to obtain the data set to be trained.
  • the image group to be trained includes a fact image captured by a normal exposure parameter and a four-channel matrix corresponding to an overexposure image captured by at least one overexposure parameter.
  • the processor is configured to: when training a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model:
  • the overexposure parameter includes an aperture value and an exposure time
  • the processor calculates the overexposure multiple corresponding to the overexposed image according to the overexposure parameter of the overexposed image, it is configured to:
  • the overexposure multiple corresponding to the overexposed image is calculated according to the aperture value and the exposure time.
  • the processor trains a preset model to be trained according to the overexposure image and the overexposure multiple to obtain the overexposure recovery model, using in:
  • the processor is configured to: when training a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model:
  • the processor trains the model to be trained according to the difference to obtain the overexposure recovery model, it is configured to:
  • the processor is configured to: when training a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model:
  • the processor trains a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model, it is further configured to:
  • the applicability of the model to be trained is tested through the test set.
  • the restoration matrix is a twelve-channel matrix
  • the processor when the processor performs data processing on the restoration matrix to obtain a restored target image, it is used to:
  • Matrix transformation is performed on the twelve-channel matrix to obtain a Bayer matrix corresponding to the twelve-channel matrix, and an image corresponding to the Bayer matrix corresponding to the twelve-channel matrix is used as the restored target image.
  • the model to be trained is a convolutional neural network model.
  • the model to be trained is a model that can perform up-sampling and down-sampling.
  • this embodiment also provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement the overexposure recovery processing method described in the foregoing embodiment.
  • the disclosed device and method may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional units.
  • the above-mentioned integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium.
  • the above-mentioned software functional unit is stored in a storage medium and includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor execute the method described in the various embodiments of the present invention. Part of the steps.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

The embodiment of the present invention provides an overexposure recovery processing method, device, and a computer-readable storage medium, the method includes: obtaining an image to be recovered; performing the overexposure recovery operation on the image to be recovered through a preset overexposure recovery model to obtain a recovery matrix; performing data processing on the recovery matrix to obtain a recovered target image. The embodiment of the present invention uses a neural network model to perform overexposure recovery, can avoid damage to the details of the image to be recovered while performing overexposure recovery on the image to be recovered, further improve the quality of the recovered target image while realizing the overexposure recovery of the image to be recovered.

Description

过曝恢复处理方法、设备及计算机可读存储介质Overexposure recovery processing method, equipment and computer readable storage medium 技术领域Technical field
本发明实施例涉及数据处理领域,尤其涉及一种过曝恢复处理方法、设备及计算机可读存储介质。The embodiments of the present invention relate to the field of data processing, and in particular to an overexposure recovery processing method, device, and computer-readable storage medium.
背景技术Background technique
在摄影上,曝光(Exposure)是指摄影的过程中允许进入镜头照在感光媒体(胶片相机的底片或是数码照相机的图像传感器)上的光量。曝光可以经由光圈,快门和感光媒体的感光度的组合来控制。理想情况下曝光度控制在合理的范围时照片对比度强,亮度适中。过曝就是指由于光圈过大快门过慢等原因造成的画面中亮度过高照片泛白,当照片曝光时间过长或面积过大就会产生过曝,而过曝则会导致照片的美观性较差,还会造成照片的细节丢失。In photography, exposure (Exposure) refers to the amount of light allowed into the lens to shine on the photosensitive medium (the film of a film camera or the image sensor of a digital camera) during the photography process. Exposure can be controlled via a combination of aperture, shutter, and sensitivity of the photosensitive medium. Ideally, when the exposure is controlled within a reasonable range, the photo has strong contrast and moderate brightness. Overexposure refers to the fact that the picture is too bright and the photo is white due to too large aperture and too slow shutter. When the photo is exposed for too long or the area is too large, overexposure will occur, and overexposure will lead to the beauty of the photo Poor, it will also cause loss of photo details.
为了使过曝的照片恢复美观度,现有技术中一般通过依赖曝光恢复(Hightlight Recovery)技术的计算机视觉算法实现对过曝照片的恢复。In order to restore the aesthetics of the overexposed photos, the prior art generally implements the recovery of the overexposed photos through a computer vision algorithm that relies on a highlight recovery (Hightlight Recovery) technology.
但是,采用上述方式对过曝照片进行恢复时,其仅能够在一定程度上恢复高光细节,而过曝中心附近区域以及极端条件下的过曝恢复效果较差,进而会造成照片的细节丢失。However, when the above-mentioned method is used to restore the overexposed photo, it can only restore the highlight details to a certain extent, while the area near the center of the overexposure and the overexposure recovery effect under extreme conditions are poor, which will cause the detail of the photo to be lost.
发明内容Summary of the invention
本发明实施例提供一种过曝恢复处理方法、设备及计算机可读存储介质,以解决现有技术中通过依赖曝光恢复(Hightlight Recovery)技术的计算机视觉算法进行过曝恢复造成的过曝恢复效果较差、照片细节丢失的技术问题。Embodiments of the present invention provide an overexposure recovery processing method, equipment, and computer readable storage medium to solve the overexposure recovery effect caused by the overexposure recovery by computer vision algorithms relying on the exposure recovery (Highlight Recovery) technology in the prior art Poor technical problems with loss of photo details.
本发明实施例的第一方面是提供一种过曝恢复处理方法,包括:The first aspect of the embodiments of the present invention is to provide an overexposure recovery processing method, including:
获取待恢复图像;Obtain the image to be restored;
通过预设的过曝恢复模型对所述待恢复图像进行过曝恢复操作,获得恢复矩阵;Performing an overexposure recovery operation on the image to be recovered through a preset overexposure recovery model to obtain a recovery matrix;
对所述恢复矩阵进行数据处理,获得恢复后的目标图像。Data processing is performed on the restoration matrix to obtain a restored target image.
本发明实施例的第二方面是提供一种过曝恢复处理设备,包括:存储器和处理器;The second aspect of the embodiments of the present invention is to provide an overexposure recovery processing device, including: a memory and a processor;
所述存储器用于存储程序代码;The memory is used to store program codes;
所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:The processor calls the program code, and when the program code is executed, is used to perform the following operations:
获取待恢复图像;Obtain the image to be restored;
通过预设的过曝恢复模型对所述待恢复图像进行过曝恢复操作,获得恢复矩阵;Performing an overexposure recovery operation on the image to be recovered through a preset overexposure recovery model to obtain a recovery matrix;
对所述恢复矩阵进行数据处理,获得恢复后的目标图像。Data processing is performed on the restoration matrix to obtain a restored target image.
本发明实施例的第三方面是提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行以实现第一方面所述的方法。A third aspect of the embodiments of the present invention is to provide a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement the method described in the first aspect.
本实施例提供的过曝恢复处理方法、设备及计算机可读存储介质,通过预设的过曝恢复模型对获取到的待恢复图像进行过曝恢复,获得恢复矩阵,通过对恢复矩阵进行数据处理,能够获得恢复后的目标图像。通过采用神经网络模型进行过曝恢复,能够在对待恢复图像进行过曝恢复的同时,避免待恢复图像的细节受损,进而能够在实现对待恢复图像进行过曝恢复的同时,提高恢复后的目标图像的质量。The overexposure recovery processing method, device, and computer readable storage medium provided in this embodiment perform overexposure recovery on the acquired image to be recovered through a preset overexposure recovery model, obtain a recovery matrix, and perform data processing on the recovery matrix , Can obtain the restored target image. Through the use of neural network model for overexposure restoration, it is possible to avoid damage to the details of the image to be restored while performing overexposure restoration of the image to be restored, thereby achieving overexposure restoration of the image to be restored while improving the goal of restoration The quality of the image.
附图说明Description of the drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present invention more clearly, the following will briefly introduce the drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
图1为本发明实施例一提供的过曝恢复处理方法的流程示意图;FIG. 1 is a schematic flowchart of an overexposure recovery processing method provided by Embodiment 1 of the present invention;
图2为本发明实施例二提供的过曝恢复处理方法的流程示意图;2 is a schematic flowchart of an overexposure recovery processing method provided by Embodiment 2 of the present invention;
图3为本发明实施例提供的能够进行上采样以及下采样的模型的结构示意图;3 is a schematic structural diagram of a model capable of up-sampling and down-sampling according to an embodiment of the present invention;
图4为本发明实施例三提供的过曝恢复处理方法的流程示意图;4 is a schematic flowchart of an overexposure recovery processing method provided by Embodiment 3 of the present invention;
图5为本发明实施例四提供的过曝恢复处理方法的流程示意图;5 is a schematic flowchart of an overexposure recovery processing method provided by Embodiment 4 of the present invention;
图6为本发明实施例五提供的过曝恢复处理设备的结构示意图。FIG. 6 is a schematic structural diagram of an overexposure recovery processing device provided by Embodiment 5 of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
需要说明的是,当组件被称为“固定于”另一个组件,它可以直接在另一个组件上或者也可以存在居中的组件。当一个组件被认为是“连接”另一个组件,它可以是直接连接到另一个组件或者可能同时存在居中组件。It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or a central component may also exist. When a component is considered to be "connected" to another component, it can be directly connected to another component or there may be a centered component at the same time.
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。本文所使用的术语“及/或”包括一个或多个相关的所列项目的任意的和所有的组合。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of the present invention. The terms used in the description of the present invention herein are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The term "and/or" as used herein includes any and all combinations of one or more related listed items.
为了解决现有技术中通过依赖曝光恢复(Hightlight Recovery)技术的计算机视觉算法进行过曝恢复造成的过曝恢复效果较差、照片细节丢失的技术问题,本发明提供了一种过曝恢复处理方法、设备及计算机可读存储介质。本发明提供的过曝恢复处理方法、设备及计算机可读存储介质能够应用在任意一种对过曝图像进行恢复的场景中。In order to solve the technical problems of poor overexposure recovery effect and loss of photo details caused by overexposure recovery by computer vision algorithms relying on the exposure recovery (Hightlight Recovery) technology in the prior art, the present invention provides an overexposure recovery processing method , Equipment and computer-readable storage media. The overexposure recovery processing method, device, and computer-readable storage medium provided by the present invention can be applied to any scene for recovering overexposed images.
下面结合附图,对本发明的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Hereinafter, some embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
图1为本发明实施例一提供的过曝恢复处理方法的流程示意图,如图1所示,所述方法包括:FIG. 1 is a schematic flowchart of an overexposure recovery processing method provided by Embodiment 1 of the present invention. As shown in FIG. 1, the method includes:
步骤101、获取待恢复图像;Step 101: Obtain an image to be restored;
步骤102、通过预设的过曝恢复模型对所述待恢复图像进行过曝恢复操作,获得恢复矩阵;Step 102: Perform an overexposure recovery operation on the image to be recovered through a preset overexposure recovery model to obtain a recovery matrix;
步骤103、对所述恢复矩阵进行数据处理,获得恢复后的目标图像。Step 103: Perform data processing on the restoration matrix to obtain a restored target image.
本实施例的执行主体为过曝恢复处理装置。首先,需要获取待恢复图像,其中,待恢复图像可以为采用任意一种过曝参数拍摄获得的过曝图像。 为了实现对待恢复图像的过曝恢复,可以将该待恢复图像输入至预设的过曝恢复模型中进行过曝恢复。其中,该过曝恢复模型可以为预先采用待训练数据集训练获得的,其可以对采用任意一种过曝参数拍摄获得的过曝图像进行过曝恢复。需要说明的是,采用神经网络模型进行过曝恢复,能够在对待恢复图像进行过曝恢复的同时,避免待恢复图像的细节受损,进而能够在实现对待恢复图像进行过曝恢复的同时,提高恢复后的目标图像的质量。进一步地,将待恢复图像输入至预设的过曝恢复模型中之后,可以接收过曝恢复模型输出的恢复矩阵,其与正常图像对应的拜耳矩阵有所不同,因此,为了能够获得正常图像,需要对该恢复模型进行进一步地数据处理,获得恢复后的目标图像。The execution subject of this embodiment is an overexposure recovery processing device. First, it is necessary to obtain an image to be restored, where the image to be restored may be an overexposed image obtained by shooting with any overexposure parameter. In order to realize the overexposure restoration of the image to be restored, the image to be restored can be input into a preset overexposure restoration model for overexposure restoration. Wherein, the overexposure recovery model may be obtained by pre-training using a data set to be trained, and it may perform overexposure recovery on an overexposed image obtained by shooting with any kind of overexposure parameter. It should be noted that the use of neural network model for overexposure restoration can avoid damage to the details of the image to be restored while performing overexposure restoration of the image to be restored, thereby achieving overexposure restoration of the image to be restored while improving The quality of the target image after restoration. Further, after inputting the image to be restored into the preset overexposure restoration model, the restoration matrix output by the overexposure restoration model can be received, which is different from the Bayer matrix corresponding to the normal image. Therefore, in order to obtain the normal image, It is necessary to perform further data processing on the restoration model to obtain the restored target image.
具体地,所述恢复矩阵为十二通道矩阵;在上述实施例的基础上,步骤103具体包括:Specifically, the restoration matrix is a twelve-channel matrix; on the basis of the foregoing embodiment, step 103 specifically includes:
对所述十二通道矩阵进行矩阵变换,获得与所述十二通道矩阵对应的拜耳矩阵,将与所述十二通道矩阵对应的拜耳矩阵对应的图像作为所述恢复后的目标图像。Matrix transformation is performed on the twelve-channel matrix to obtain a Bayer matrix corresponding to the twelve-channel matrix, and an image corresponding to the Bayer matrix corresponding to the twelve-channel matrix is used as the restored target image.
在本实施方式中,接收到过曝恢复模型输出的十二通道矩阵之后,由于该过曝恢复模型输出的数据为十二通道的恢复矩阵,其与正常图像对应的拜耳矩阵有所不同,因此,需要对恢复矩阵进行矩阵变换,将其转换为与十二通道对应的拜耳矩阵,并将该与十二通道对应的拜耳矩阵作为恢复后的目标图像。需要说明的是,可以采用任意一种矩阵变换方法实现对十二通道矩阵的矩阵变换,本发明在此不做限制。In this embodiment, after receiving the twelve-channel matrix output by the overexposure recovery model, since the data output by the overexposure recovery model is a twelve-channel recovery matrix, which is different from the Bayer matrix corresponding to the normal image, , It is necessary to perform matrix transformation on the restoration matrix, convert it into a Bayer matrix corresponding to twelve channels, and use the Bayer matrix corresponding to twelve channels as the restored target image. It should be noted that any matrix transformation method can be used to implement the matrix transformation of the twelve-channel matrix, and the present invention is not limited herein.
本实施例提供的过曝恢复处理方法,通过预设的过曝恢复模型对获取到的待恢复图像进行过曝恢复,获得恢复矩阵,通过对恢复矩阵进行数据处理,能够获得恢复后的目标图像。通过采用神经网络模型进行过曝恢复,能够在对待恢复图像进行过曝恢复的同时,避免待恢复图像的细节受损,进而能够在实现对待恢复图像进行过曝恢复的同时,提高恢复后的目标图像的质量。The overexposure recovery processing method provided in this embodiment performs overexposure recovery on the acquired image to be recovered through a preset overexposure recovery model to obtain a recovery matrix, and by performing data processing on the recovery matrix, the recovered target image can be obtained . Through the use of neural network model for overexposure restoration, it is possible to avoid damage to the details of the image to be restored while performing overexposure restoration of the image to be restored, thereby achieving overexposure restoration of the image to be restored while improving the goal of restoration The quality of the image.
图2为本发明实施例二提供的过曝恢复处理方法的流程示意图;图3为本发明实施例提供的能够进行上采样以及下采样的模型的结构示意图,在上述任一实施例的基础上,在通过预设的过曝恢复模型对所述待恢复图 像进行过曝恢复操作之前,所述方法还包括:2 is a schematic flow chart of an overexposure recovery processing method provided in Embodiment 2 of the present invention; FIG. 3 is a schematic structural diagram of a model capable of up-sampling and down-sampling provided in an embodiment of the present invention, based on any of the above embodiments Before performing an overexposure recovery operation on the image to be recovered through a preset overexposure recovery model, the method further includes:
步骤201、获取待训练数据集,所述待训练数据集中包括至少一组待训练图像组;Step 201: Obtain a data set to be trained, where the data set to be trained includes at least one image group to be trained;
步骤202、根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型。Step 202: Train a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model.
在本实施例中,在通过过曝恢复模型对待恢复图像进行过曝恢复之前,需要通过训练过得该过曝恢复模型。具体地,首先可以获取待训练数据集,其中,待训练数据集中包括至少一组待训练图像组,该待训练图像组中包括一张采用正常曝光参数拍摄的事实图像以及通过不同过曝参数拍摄的至少一张过曝图像对应的四通道矩阵。通过该待训练数据集对预设的待训练模型进行训练,能够获得过曝恢复模型。由于该过曝恢复模型是通过事实图像以及通过不同过曝参数拍摄的至少一张过曝图像对应的四通道矩阵训练获得,从而该过曝恢复模型能够对任意一种过曝参数拍摄获得的待恢复图像进行过曝恢复。In this embodiment, before performing overexposure recovery on the image to be recovered through the overexposure recovery model, the overexposure recovery model needs to be trained. Specifically, the data set to be trained can be obtained first, where the data set to be trained includes at least one set of images to be trained, and the image set to be trained includes a factual image shot with normal exposure parameters and shots with different overexposure parameters. A four-channel matrix corresponding to at least one overexposed image. By training the preset model to be trained through the data set to be trained, an overexposure recovery model can be obtained. Since the overexposure recovery model is obtained by training the fact image and the four-channel matrix corresponding to at least one overexposure image taken with different overexposure parameters, the overexposure recovery model can capture the waiting for any overexposure parameter. Restore the image for overexposure restoration.
需要说明的是,在上述任一实施例的基础上,所述待训练模型为卷积神经网络模型。It should be noted that, on the basis of any of the foregoing embodiments, the model to be trained is a convolutional neural network model.
进一步地,在上述任一实施例的基础上,所述待训练模型为能够进行上采样以及下采样的模型。Further, on the basis of any of the foregoing embodiments, the model to be trained is a model that can perform up-sampling and down-sampling.
在本实施例中,该待训练模型具体可以为一个多层神经网络模型,该多层神经网络模型的输入为上一层的输入经过下采样卷积得到,而每一层的输出是通过拼接获得的。拼接的对象是:1、下一层输出经过上采样卷积获得的结果;2、本层的输入经过卷积核卷积(Conv)和非线性激活(ReLU)之后获得的结果。如图3所示,该待训练的多层模型可以为包括上采样以及下采样对称结构,下采样是例如最大池化层(Max pool)来实现,下采样用来提取输入特征图像(例如,过曝图像)的特征信息,而上采样的过程是将下采样提取出的特征信息恢复到图像层级,然后和上采样的输入信息对齐、拼接来还原细节信息,并且逐步还原图像精度。从特征图信息的角度来考虑,该模型能够通过下采样对过曝图像进行抽象,提取输入深层信息,同时通过一次卷积和非线性激活以及裁剪保留图像的浅层信息,然后将深层信息和浅层信息拼接,针对下采样结构中每一层输出的浅层信息 与深层信息,直接将其输入至于该下采样层对称的上采样层中,从而能够获取到输入图像由浅入深的多个层次信息,如此提取出过曝区域的中的纹理细节,进而能够恢复出过曝区域的图像纹理。在裁剪和拼接图像过程中,下层图像上卷积的结果和本层的输入经过卷积核卷积(Conv)和非线性激活(ReLU)之后获得的结果在像素尺度对齐。In this embodiment, the model to be trained may specifically be a multi-layer neural network model. The input of the multi-layer neural network model is obtained by down-sampling and convolution of the input of the previous layer, and the output of each layer is spliced acquired. The objects of splicing are: 1. The output of the next layer is the result of upsampling convolution; 2. The input of this layer is the result of convolution kernel convolution (Conv) and nonlinear activation (ReLU). As shown in FIG. 3, the multi-layer model to be trained may have a symmetric structure including up-sampling and down-sampling. Down-sampling is realized by, for example, a maximum pooling layer (Max pool), and down-sampling is used to extract input feature images (eg, The process of up-sampling is to restore the feature information extracted by down-sampling to the image level, and then align and stitch with the up-sampled input information to restore the detailed information, and gradually restore the image accuracy. From the perspective of feature map information, the model can abstract the overexposed image through downsampling, extract the input deep information, and retain the shallow information of the image through a convolution and nonlinear activation and cropping, and then combine the deep information with Shallow information splicing, for the shallow information and deep information output by each layer in the downsampling structure, directly input them into the symmetrical upsampling layer of the downsampling layer, so that multiple input images from shallow to deep can be obtained Hierarchical information, so that the texture details in the overexposed area are extracted, and the image texture of the overexposed area can be restored. In the process of cropping and stitching images, the result of convolution on the lower layer image and the input of this layer are aligned at the pixel scale after the convolution kernel convolution (Conv) and nonlinear activation (ReLU).
需要说明的是,与其他卷积网络有所不同的是,在使用多层神经网络模型时,为了能使网络结构能更高效的运行,上述能够进行上采样以及下采样的模型中不具有全连接层,因此,可以很大程度上减少需要训练的参数,由于冗余信息中可能包括待恢复图像的细节信息,因此,能够进一步地保证待恢复图像的细节不丢失,提高过曝恢复的精准度,提高恢复后的目标图像的质量。It should be noted that, unlike other convolutional networks, when using multilayer neural network models, in order to enable the network structure to operate more efficiently, the above models that can perform upsampling and downsampling do not have all The connection layer, therefore, can greatly reduce the parameters that need to be trained. Since the redundant information may include the detailed information of the image to be restored, it can further ensure that the details of the image to be restored are not lost, and improve the accuracy of overexposure restoration To improve the quality of the restored target image.
本实施例提供的过曝恢复处理方法,通过在采用过曝恢复模型进行过曝恢复之前,预先采用包括至少一组待训练图像组的待训练数据集对待训练模型进行训练,从而为后续的过曝恢复提供了基础。此外,采用能够进行上采样以及下采样的模型作为待训练模型,能够在实现待恢复模型恢复的基础上,保证待恢复图像的细节不丢失。The overexposure recovery processing method provided in this embodiment adopts the overexposure recovery model to perform overexposure recovery by preliminarily using the to-be-trained data set that includes at least one set of image groups to be trained to train the model to be trained, so as to provide for subsequent overexposure. Exposure recovery provides the basis. In addition, using a model capable of up-sampling and down-sampling as the model to be trained can ensure that the details of the image to be restored are not lost on the basis of realizing the restoration of the model to be restored.
进一步地,在上述任一实施例的基础上,所述获取待训练数据集,包括:Further, on the basis of any of the foregoing embodiments, the acquiring a data set to be trained includes:
获取图像采集装置采集的第一图像信息,所述第一图像信息为Raw格式;Acquiring first image information collected by an image collecting device, where the first image information is in a Raw format;
将所述第一图像信息对应的拜耳矩阵转换为四通道矩阵,获得所述待训练数据集。The Bayer matrix corresponding to the first image information is converted into a four-channel matrix to obtain the data set to be trained.
在本实施例中,为了实现对待训练模型的训练,首先需要获取待训练数据集。具体地,首先需要获取图像采集装置采集的第一图像信息,该图像采集装置可以是任意一种能够实现图像采集的设备,本发明在此不做限制。需要说明的是,该第一图像信息为Raw格式。RAW格式是未经处理、也未经压缩的格式,因此,能够保留图像的全部纹理信息,从而在训练过程中,待训练模型能够获取到RAW格式的第一图像信息的全部纹理信息并进行恢复。以实际应用举例来说,PNG以及JPG等格式的图像为8bit的数据,图像颜色往往不精准,且其中仅包含图像的部分纹理信息,而Raw格 式的图像为16bit的数据,其中包含图像的全部纹理信息。相应地,通过Raw格式的第一图像信息对待训练模型进行训练,能够有效地提高待训练模型的恢复精准度。进一步地,获得第一图像信息之后,需要将第一图像信息对应的拜耳矩阵转换为四通道矩阵,将该四通道矩阵作为待训练数据集。需要说明的是,将第一图像信息转换为四通道矩阵能够减小输入矩阵的大小,提高待训练模型的训练效率。In this embodiment, in order to realize the training of the model to be trained, it is first necessary to obtain the data set to be trained. Specifically, it is first necessary to obtain the first image information collected by the image collection device. The image collection device may be any device capable of realizing image collection, and the present invention is not limited herein. It should be noted that the first image information is in a Raw format. The RAW format is an unprocessed and uncompressed format. Therefore, it can retain all the texture information of the image, so that during the training process, the model to be trained can obtain all the texture information of the first image information in the RAW format and restore it . Taking practical applications for example, images in PNG and JPG formats are 8bit data, and the color of the image is often inaccurate and only contains part of the texture information of the image, while the image in Raw format is 16bit data, which contains all of the image. Texture information. Correspondingly, training the model to be trained through the first image information in the Raw format can effectively improve the recovery accuracy of the model to be trained. Further, after the first image information is obtained, the Bayer matrix corresponding to the first image information needs to be converted into a four-channel matrix, and the four-channel matrix is used as the data set to be trained. It should be noted that converting the first image information into a four-channel matrix can reduce the size of the input matrix and improve the training efficiency of the model to be trained.
本实施例提供的过曝恢复处理方法,通过获取图像采集装置采集的第一图像信息,所述第一图像信息为Raw格式;将所述第一图像信息对应的拜耳矩阵转换为四通道矩阵,获得所述待训练数据集,从而为后续的过曝恢复提供了基础。此外,采用Raw格式的第一图像信息对待训练模型进行训练,能够有效地提高待训练模型的恢复精准度;将第一图像信息转换为四通道矩阵能够减小输入矩阵的大小,提高待训练模型的训练效率。The overexposure recovery processing method provided in this embodiment acquires first image information collected by an image acquisition device, where the first image information is in Raw format; and converts the Bayer matrix corresponding to the first image information into a four-channel matrix, The data set to be trained is obtained, thereby providing a basis for subsequent overexposure recovery. In addition, using the first image information in Raw format to train the model to be trained can effectively improve the recovery accuracy of the model to be trained; converting the first image information into a four-channel matrix can reduce the size of the input matrix and improve the model to be trained Training efficiency.
进一步地,在上述任一实施例的基础上,所述根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型,包括:Further, on the basis of any of the foregoing embodiments, the training a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model includes:
针对所述待训练数据集中每一过曝图像,根据所述过曝图像的过曝参数计算所述过曝图像对应的过曝倍数;For each overexposed image in the to-be-trained data set, calculating the overexposure multiple corresponding to the overexposed image according to the overexposure parameter of the overexposed image;
根据所述过曝图像以及所述过曝倍数对预设的待训练模型进行训练,获得所述过曝恢复模型。Training a preset model to be trained according to the overexposure image and the overexposure multiple to obtain the overexposure recovery model.
在本实施例中,在对待训练模型进行训练之前,首先,针对待训练数据集中的每一过曝图像,由于其分别是采用不同的过曝参数拍摄获得的,因此,需要根据过曝参数计算该过曝图像对应的过曝倍数。从而后续可以根据该过曝倍数以及过曝图像对预设的待训练模型进行训练,获得过曝恢复模型。通过根据该过曝倍数以及过曝图像对预设的待训练模型进行训练,从而能够在提高模型训练效率的基础上,提高模型过曝恢复的精准度。In this embodiment, before training the model to be trained, first, for each overexposure image in the data set to be trained, since it is obtained by shooting with different overexposure parameters, it needs to be calculated according to the overexposure parameters. The overexposure multiple corresponding to the overexposed image. Therefore, the preset model to be trained can be trained subsequently according to the overexposure multiple and the overexposed image to obtain an overexposure recovery model. By training the preset model to be trained according to the overexposure multiple and the overexposed image, it is possible to improve the accuracy of model overexposure recovery on the basis of improving the efficiency of model training.
本实施例提供的过曝恢复处理方法,通过针对所述待训练数据集中每一过曝图像,根据所述过曝图像的过曝参数计算所述过曝图像对应的过曝倍数;根据所述过曝图像以及所述过曝倍数对预设的待训练模型进行训练,获得所述过曝恢复模型,从而能够在提高模型训练效率的基础上,提高模型过曝恢复的精准度。The overexposure recovery processing method provided in this embodiment calculates the overexposure multiple corresponding to the overexposed image according to the overexposure parameter of the overexposed image for each overexposed image in the data set to be trained; The overexposure image and the overexposure multiple train a preset model to be trained to obtain the overexposure recovery model, so that the accuracy of the overexposure recovery of the model can be improved on the basis of improving model training efficiency.
进一步地,在上述任一实施例的基础上,所述过曝参数包括光圈值以 及曝光时间;Further, on the basis of any of the foregoing embodiments, the overexposure parameter includes an aperture value and an exposure time;
相应地,所述根据所述过曝图像的过曝参数计算所述过曝图像对应的过曝倍数,包括:Correspondingly, the calculating the overexposure multiple corresponding to the overexposed image according to the overexposure parameter of the overexposed image includes:
根据光圈值以及曝光时间计算所述过曝图像对应的过曝倍数。The overexposure multiple corresponding to the overexposed image is calculated according to the aperture value and the exposure time.
在本实施例中,过曝参数具体可以包括光圈值以及曝光时间,相应地,也可以根据该光圈值以及曝光时间对过曝图像对应的过曝倍数进行计算。具体地,可以通过根据该光圈值以及曝光时间以及预设的公式1对过曝图像对应的过曝倍数进行计算,该过曝倍数可以对描述该过曝图像的过曝程度。In this embodiment, the overexposure parameter may specifically include the aperture value and the exposure time. Accordingly, the overexposure multiple corresponding to the overexposed image may also be calculated according to the aperture value and the exposure time. Specifically, the overexposure multiple corresponding to the overexposed image can be calculated according to the aperture value, the exposure time and the preset formula 1, and the overexposure multiple can describe the degree of overexposure of the overexposed image.
Figure PCTCN2019081093-appb-000001
Figure PCTCN2019081093-appb-000001
其中,EV为过曝图像对应的过曝倍数,N为过曝图像对应的光圈值,t为过曝图像对应的曝光时间。Among them, EV is the overexposure multiple corresponding to the overexposed image, N is the aperture value corresponding to the overexposed image, and t is the exposure time corresponding to the overexposed image.
本实施例提供的过曝恢复处理方法,通过根据光圈值以及曝光时间计算所述过曝图像对应的过曝倍数,从而能够精准地确定过曝图像对应的过曝倍数。The overexposure recovery processing method provided by this embodiment calculates the overexposure multiple corresponding to the overexposed image according to the aperture value and the exposure time, so that the overexposure multiple corresponding to the overexposed image can be accurately determined.
进一步地,在上述任一实施例的基础上,所述根据所述过曝图像以及所述过曝倍数对预设的待训练模型进行训练,获得所述过曝恢复模型,包括:Further, on the basis of any of the foregoing embodiments, the training a preset model to be trained according to the overexposure image and the overexposure multiple to obtain the overexposure recovery model includes:
根据所述过曝倍数对所述待训练模型的参数进行调节,获得调节后的待训练模型;Adjusting the parameters of the model to be trained according to the overexposure multiple to obtain an adjusted model to be trained;
根据所述过曝图像对所述调节后的待训练模型进行训练,获得所述过曝恢复模型。Training the adjusted model to be trained according to the overexposed image to obtain the overexposed recovery model.
在本实施例中,计算获得过曝图像对应的过曝倍数之后,可以将该过曝倍数作为一个先验知识,并根据该过曝倍数对待训练模型的参数进行调节,获得调节后的待训练模型。具体地,训练过程是通过梯度下降的方式对待训练模型的参数进行配置,直至该待训练模型的参数收敛。若训练过程中直接将过曝图像输入进待训练模型进行恢复,则训练过程的计算量较大,训练效率较低。相应地,若是预先通过计算获得的过曝倍数对待训练模型的参数进行调节,将过曝图像输入至调节后的待训练模型中,由于待训练模型的参数已经经过一次调节,后续训练过程中的计算量远远小于直 接将过曝图像输入进待训练模型的计算量,进而能够有效地提高待训练模型的训练效率,其能够节约资源。相应地,可以根据过曝图像对调节后的待训练模型进行训练,获得过曝恢复模型。In this embodiment, after the overexposure factor corresponding to the overexposed image is calculated, the overexposure factor can be used as a priori knowledge, and the parameters of the model to be trained can be adjusted according to the overexposure factor to obtain the adjusted to-be-trained model. Specifically, the training process is to configure the parameters of the model to be trained through gradient descent until the parameters of the model to be trained converge. If the overexposed image is directly input into the model to be trained for recovery during the training process, the amount of calculation in the training process is relatively large and the training efficiency is low. Correspondingly, if the parameters of the model to be trained are adjusted by the overexposure multiple obtained through calculation in advance, the overexposed image is input into the adjusted model to be trained. Since the parameters of the model to be trained have been adjusted once, the subsequent training process The amount of calculation is much smaller than that of directly inputting the overexposed image into the model to be trained, which can effectively improve the training efficiency of the model to be trained, which can save resources. Correspondingly, the adjusted model to be trained can be trained according to the overexposed image to obtain the overexposed recovery model.
本实施例提供的过曝恢复处理方法,通过根据过曝参数对待训练模型的参数进行调节,并对调节后的待训练模型进行训练,从而能够提高待训练模型的训练效率。The overexposure recovery processing method provided in this embodiment adjusts the parameters of the model to be trained according to the overexposure parameters, and trains the adjusted model to be trained, thereby improving the training efficiency of the model to be trained.
图4为本发明实施例三提供的过曝恢复处理方法的流程示意图,在上述任一实施例的基础上,所述根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型,包括:Figure 4 is a schematic flow chart of the overexposure recovery processing method provided in the third embodiment of the present invention. On the basis of any of the above embodiments, the preset model to be trained is trained according to the to-be-trained data set to obtain all Describe the overexposure recovery model, including:
步骤301、将所述过曝图像对应的四通道矩阵输入至所述待训练模型中,获取所述待训练模型的输出结果;Step 301: Input the four-channel matrix corresponding to the overexposed image into the model to be trained, and obtain the output result of the model to be trained;
步骤302、计算所述输出结果与所述过曝图像对应的事实图像之间的差值;Step 302: Calculate the difference between the output result and the fact image corresponding to the overexposed image;
步骤303、根据所述差值对所述待训练模型进行训练,获得所述过曝恢复模型。Step 303: Train the model to be trained according to the difference to obtain the overexposure recovery model.
在本实施例中,在训练过程中,可以将待训练数据组中的过曝图像对应的四通道矩阵输入至待训练模型中,该待训练模型可以对该过曝图像进行处理,输出一个输出结果。相应地,可以接收该输出结果,并将该输出结果与待训练数据组中与该过曝图像对应的事实图像进行比对,计算二者之间的差值。若二者差值较大,则表征该待训练模型的过曝恢复性能较差,还需要继续训练,相应地,若二者差值较小,则表征该输出结果与事实图像足够相似,也即该待训练模型的过曝恢复性能较好。因此,为了提高待训练模型的过曝恢复性能,在计算获得输出结果与过曝图像对应的事实图像之间的差值之后,可以根据该差值继续对该待训练模型进行训练,直至待训练模型收敛,获得过曝恢复模型。In this embodiment, during the training process, the four-channel matrix corresponding to the overexposed image in the data set to be trained can be input into the model to be trained, and the model to be trained can process the overexposed image and output an output result. Correspondingly, the output result can be received, and the output result can be compared with the fact image corresponding to the overexposed image in the data set to be trained, and the difference between the two can be calculated. If the difference between the two is large, it means that the overexposure recovery performance of the model to be trained is poor, and training needs to be continued. Accordingly, if the difference between the two is small, it means that the output result is sufficiently similar to the fact image. That is, the overexposure recovery performance of the model to be trained is better. Therefore, in order to improve the overexposure recovery performance of the model to be trained, after calculating the difference between the output result and the fact image corresponding to the overexposed image, you can continue to train the model to be trained according to the difference until it is to be trained The model converges, and the overexposure recovery model is obtained.
本实施例提供的过曝恢复处理方法,通过计算输出结果与过曝图像对应的事实图像之间的差值,并根据该差值对对该待训练模型进行训练,从而能够提高待训练模型的过曝恢复性能。The overexposure recovery processing method provided in this embodiment calculates the difference between the output result and the fact image corresponding to the overexposed image, and trains the model to be trained based on the difference, thereby improving the performance of the model to be trained. Overexposure recovery performance.
进一步地,在上述任一实施例的基础上,所述根据所述差值对所述待训练模型进行训练,获得所述过曝恢复模型,包括:Further, on the basis of any of the foregoing embodiments, the training the model to be trained according to the difference to obtain the overexposure recovery model includes:
判断所述差值是否大于预设的差值阈值;Judging whether the difference value is greater than a preset difference value threshold;
若是,则根据所述差值对所述待训练模型的参数进行调节,直至调整后的所述待训练模型的输出结果与事实图像之间的差值小于预设的差值阈值;If yes, adjust the parameters of the model to be trained according to the difference, until the adjusted difference between the output result of the model to be trained and the fact image is less than a preset difference threshold;
若否,则判定所述待训练模型收敛,获得所述过曝恢复模型。If not, it is determined that the model to be trained converges, and the overexposure recovery model is obtained.
在本实施例中,为了提高待训练模型的过曝恢复性能,在计算获得输出结果与过曝图像对应的事实图像之间的差值之后,可以根据该差值继续对该待训练模型进行训练。具体地,可以判断该差值是否大于预设的阈值,若大于,则表征该待训练模型的过曝恢复性能较差,还需要继续训练,此时可以根据该差值对该待训练模型的参数进行调节,直至该待训练模型输出的输出结果与事实图像之间的差值小于预设的阈值,即判定该待训练模型收敛,获得过曝恢复模型。可选地,若该差值小于预设的阈值,则表征该输出结果与事实图像足够相似,也即该待训练模型的过曝恢复性能较好,此时判定该待训练模型已收敛,获得过曝恢复模型。In this embodiment, in order to improve the overexposure recovery performance of the model to be trained, after calculating the difference between the output result and the fact image corresponding to the overexposed image, the training model can be continued to be trained based on the difference . Specifically, it can be judged whether the difference is greater than a preset threshold. If it is greater, it means that the overexposure recovery performance of the model to be trained is poor, and training needs to be continued. At this time, the difference can be based on the difference The parameters are adjusted until the difference between the output result of the model to be trained and the fact image is less than the preset threshold, that is, it is determined that the model to be trained converges, and the overexposure recovery model is obtained. Optionally, if the difference is less than a preset threshold, it indicates that the output result is sufficiently similar to the fact image, that is, the overexposure recovery performance of the model to be trained is good, and at this time, it is determined that the model to be trained has converged. Overexposure recovery model.
本实施例提供的过曝恢复处理方法,通过根据输出结果与过曝图像对应的事实图像之间的差值对对该待训练模型进行训练,从而能够提高待训练模型的过曝恢复性能。The overexposure recovery processing method provided in this embodiment trains the model to be trained according to the difference between the output result and the fact image corresponding to the overexposed image, thereby improving the overexposure recovery performance of the model to be trained.
图5为本发明实施例四提供的过曝恢复处理方法的流程示意图,在上述任一实施例的基础上,所述根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型,包括:Figure 5 is a schematic flow chart of the overexposure recovery processing method provided by the fourth embodiment of the present invention. On the basis of any of the above embodiments, the preset model to be trained is trained according to the data set to be trained to obtain all Describe the overexposure recovery model, including:
步骤401、按照预设的比例将所述待训练数据集随机分为训练集以及验证集;Step 401: Randomly divide the data set to be trained into a training set and a verification set according to a preset ratio;
步骤402、通过所述训练集对所述待训练模型进行训练;Step 402: Train the model to be trained through the training set;
步骤403、通过所述验证集对所述待训练模型的恢复精准度进行验证,获得验证结果;Step 403: Verify the recovery accuracy of the to-be-trained model through the verification set, and obtain a verification result.
步骤404、根据所述验证结果继续通过所述训练集对所述待训练模型进行训练,直至所述待训练模型收敛,获得所述过曝恢复模型。Step 404: Continue to train the model to be trained through the training set according to the verification result until the model to be trained converges to obtain the overexposure recovery model.
在本实施例中,为了提高待训练模型的过曝恢复精度,可以按照预设的比例将待训练数据集中的数据随机分为训练集以及验证集。该预设的比例具体可以为8:2,也可以为其他的比例,本领域技术人员可以根据实际 应用中的需求进行调节,本发明在此不做限制。通过训练集中的数据对待训练模型进行训练,通过验证集中的数据对待训练模型的恢复精准度进行验证,获得验证结果,并根据该验证结果对待训练模型继续训练,直至模型收敛。具体地,若验证结果表征该待训练模型恢复精度较高,则表征该待训练模型已收敛,获得过曝恢复模型,若验证结果表征该待训练模型恢复精度较低,则表征该待训练模型还需要继续训练,此时,可以继续采用训练集中的数据对待训练模型进行训练,直至待训练模型收敛,获得过曝恢复模型。In this embodiment, in order to improve the overexposure recovery accuracy of the model to be trained, the data in the data set to be trained can be randomly divided into a training set and a verification set according to a preset ratio. The preset ratio may be 8:2, or other ratios, and those skilled in the art can adjust it according to actual application requirements, and the present invention is not limited here. The training model is trained through the data in the training set, the recovery accuracy of the training model is verified through the data in the verification set, and the verification result is obtained, and the training model is continued to be trained based on the verification result until the model converges. Specifically, if the verification result indicates that the recovery accuracy of the model to be trained is high, it indicates that the model to be trained has converged and an overexposure recovery model is obtained; if the verification result indicates that the recovery accuracy of the model to be trained is low, then the model to be trained is characterized Training still needs to be continued. At this time, the data to be trained in the training set can be used to train the model to be trained until the model to be trained converges and an overexposure recovery model is obtained.
本实施例提供的过曝恢复处理方法,通过将待训练数据集随机分为训练集以及验证集,并通过训练集中的数据对待训练模型进行训练,通过验证集中的数据对待训练模型的恢复精准度进行验证,根据验证结果对待训练模型进行进一步地处理,从而能够提高模型的恢复精准度。The overexposure recovery processing method provided in this embodiment randomly divides the data set to be trained into a training set and a verification set, and trains the training model through the data in the training set, and the recovery accuracy of the training model through the data in the verification set Perform verification and further process the model to be trained based on the verification result, thereby improving the accuracy of the model's recovery.
进一步地,在上述任一实施例的基础上,所述根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型之后,还包括:Further, on the basis of any of the foregoing embodiments, the training a preset model to be trained according to the data set to be trained, and after obtaining the overexposure recovery model, the method further includes:
获取图像采集装置采集的第二图像信息,所述图像信息为Raw格式,所述第一图像信息与所述第二图像信息至少部分不重叠;Acquiring second image information collected by an image collecting device, where the image information is in a Raw format, and the first image information and the second image information are at least partially non-overlapping;
根据所述第二图像信息生成测试集;Generating a test set according to the second image information;
通过所述测试集对所述待训练模型的适用性进行测试。The applicability of the model to be trained is tested through the test set.
在本实施例中,由于过曝恢复模型需要对各种类型的过曝图像进行过曝恢复,因此,需要改过曝恢复模型的适用性较好。因此,可以获取图像采集装置采集到的第二图像信息,为了实现对待训练模型适用性的验证,第二图像信息与第一图像信息至少部分不重叠。根据第二图像信息生成测试集,并根据测试集对该待训练模型的适用性进行测试。若验证该待训练模型的适用性较差,则还需采用更广泛的待训练数据集对其进行继续训练,若验证该待训练模型的适用性较好,则可以获得过曝恢复模型,进而可以根据该过曝恢复模型进行过曝恢复。In this embodiment, since the overexposure recovery model needs to perform overexposure recovery on various types of overexposed images, the need to change the overexposure recovery model has better applicability. Therefore, the second image information collected by the image acquisition device can be obtained. In order to verify the applicability of the model to be trained, the second image information and the first image information do not overlap at least partially. A test set is generated according to the second image information, and the applicability of the model to be trained is tested according to the test set. If it is verified that the applicability of the model to be trained is poor, it is necessary to use a wider set of data to be trained to continue training. If the applicability of the model to be trained is verified to be better, an overexposure recovery model can be obtained, and then The overexposure recovery can be performed according to the overexposure recovery model.
本实施例提供的过曝恢复处理方法,通过根据第二图像信息生成测试集,并根据测试集对该待训练模型的适用性进行测试,从而能够在保证待训练模型过曝恢复精度的基础上,提高待训练模型的适用性。The overexposure recovery processing method provided in this embodiment generates a test set according to the second image information, and tests the applicability of the model to be trained according to the test set, so that the overexposure recovery accuracy of the model to be trained can be ensured. , Improve the applicability of the model to be trained.
图6为本发明实施例五提供的过曝恢复处理设备的结构示意图,如图 5所示,所述过曝恢复处理设备,包括:存储器51和处理器52;6 is a schematic structural diagram of an overexposure recovery processing device according to Embodiment 5 of the present invention. As shown in FIG. 5, the overexposure recovery processing device includes a memory 51 and a processor 52;
所述存储器51用于存储程序代码;The memory 51 is used to store program codes;
所述处理器52,调用所述程序代码,当程序代码被执行时,用于执行以下操作:The processor 52 calls the program code, and when the program code is executed, is used to perform the following operations:
获取待恢复图像;Obtain the image to be restored;
通过预设的过曝恢复模型对所述待恢复图像进行过曝恢复操作,获得恢复矩阵;Performing an overexposure recovery operation on the image to be recovered through a preset overexposure recovery model to obtain a recovery matrix;
对所述恢复矩阵进行数据处理,获得恢复后的目标图像。Data processing is performed on the restoration matrix to obtain a restored target image.
进一步地,在上述任一实施例的基础上,所述处理器在通过预设的过曝恢复模型对所述待恢复图像进行过曝恢复操作之前,还用于:Further, on the basis of any of the foregoing embodiments, before performing an overexposure recovery operation on the image to be recovered through a preset overexposure recovery model, the processor is further configured to:
获取待训练数据集,所述待训练数据集中包括至少一组待训练图像组;Acquiring a data set to be trained, where the data set to be trained includes at least one group of images to be trained;
根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型。Training a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model.
进一步地,在上述任一实施例的基础上,所述处理器在获取待训练数据集时,用于:Further, on the basis of any of the foregoing embodiments, the processor is configured to: when acquiring the data set to be trained:
获取图像采集装置采集的图像信息,所述第一图像信息为Raw格式;Acquiring image information collected by an image collecting device, where the first image information is in a Raw format;
将所述图像信息对应的拜耳矩阵转换为四通道矩阵,获得所述待训练数据集。The Bayer matrix corresponding to the image information is converted into a four-channel matrix to obtain the data set to be trained.
进一步地,在上述任一实施例的基础上,所述待训练图像组中包括正常曝光参数拍摄的事实图像以及至少一个过曝参数拍摄的过曝图像对应的四通道矩阵。Further, on the basis of any of the foregoing embodiments, the image group to be trained includes a fact image captured by a normal exposure parameter and a four-channel matrix corresponding to an overexposure image captured by at least one overexposure parameter.
进一步地,在上述任一实施例的基础上,所述处理器在根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型时,用于:Further, on the basis of any of the foregoing embodiments, the processor is configured to: when training a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model:
针对所述待训练数据集中每一过曝图像,根据所述过曝图像的过曝参数计算所述过曝图像对应的过曝倍数;For each overexposed image in the to-be-trained data set, calculating the overexposure multiple corresponding to the overexposed image according to the overexposure parameter of the overexposed image;
根据所述过曝图像以及所述过曝倍数对预设的待训练模型进行训练,获得所述过曝恢复模型。Training a preset model to be trained according to the overexposure image and the overexposure multiple to obtain the overexposure recovery model.
进一步地,在上述任一实施例的基础上,所述过曝参数包括光圈值以及曝光时间;Further, on the basis of any of the foregoing embodiments, the overexposure parameter includes an aperture value and an exposure time;
相应地,所述处理器在根据所述过曝图像的过曝参数计算所述过曝图 像对应的过曝倍数时,用于:Correspondingly, when the processor calculates the overexposure multiple corresponding to the overexposed image according to the overexposure parameter of the overexposed image, it is configured to:
根据光圈值以及曝光时间计算所述过曝图像对应的过曝倍数。The overexposure multiple corresponding to the overexposed image is calculated according to the aperture value and the exposure time.
进一步地,在上述任一实施例的基础上,所述处理器在根据所述过曝图像以及所述过曝倍数对预设的待训练模型进行训练,获得所述过曝恢复模型时,用于:Further, on the basis of any of the foregoing embodiments, the processor trains a preset model to be trained according to the overexposure image and the overexposure multiple to obtain the overexposure recovery model, using in:
根据所述过曝倍数对所述待训练模型的参数进行调节,获得调节后的待训练模型;Adjusting the parameters of the model to be trained according to the overexposure multiple to obtain an adjusted model to be trained;
根据所述过曝图像对所述调节后的待训练模型进行训练,获得所述过曝恢复模型。Training the adjusted model to be trained according to the overexposed image to obtain the overexposed recovery model.
进一步地,在上述任一实施例的基础上,所述处理器在根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型时,用于:Further, on the basis of any of the foregoing embodiments, the processor is configured to: when training a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model:
将所述过曝图像对应的四通道矩阵输入至所述待训练模型中,获取所述待训练模型的输出结果;Input the four-channel matrix corresponding to the overexposed image to the model to be trained, and obtain the output result of the model to be trained;
计算所述输出结果与所述过曝图像对应的事实图像之间的差值;Calculating the difference between the output result and the fact image corresponding to the overexposed image;
根据所述差值对所述待训练模型进行训练,获得所述过曝恢复模型。Training the model to be trained according to the difference to obtain the overexposure recovery model.
进一步地,在上述任一实施例的基础上,所述处理器在根据所述差值对所述待训练模型进行训练,获得所述过曝恢复模型时,用于:Further, on the basis of any of the foregoing embodiments, when the processor trains the model to be trained according to the difference to obtain the overexposure recovery model, it is configured to:
判断所述差值是否大于预设的差值阈值;Judging whether the difference value is greater than a preset difference value threshold;
若是,则根据所述差值对所述待训练模型的参数进行调节,直至调整后的所述待训练模型的输出结果与事实图像之间的差值小于预设的差值阈值;If yes, adjust the parameters of the model to be trained according to the difference, until the adjusted difference between the output result of the model to be trained and the fact image is less than a preset difference threshold;
若否,则判定所述待训练模型收敛,获得所述过曝恢复模型。If not, it is determined that the model to be trained converges, and the overexposure recovery model is obtained.
进一步地,在上述任一实施例的基础上,所述处理器在根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型时,用于:Further, on the basis of any of the foregoing embodiments, the processor is configured to: when training a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model:
按照预设的比例将所述待训练数据集随机分为训练集以及验证集;Randomly dividing the to-be-trained data set into a training set and a verification set according to a preset ratio;
通过所述训练集对所述待训练模型进行训练;Training the model to be trained through the training set;
通过所述验证集对所述待训练模型的恢复精准度进行验证,获得验证结果;Verifying the restoration accuracy of the model to be trained through the verification set to obtain a verification result;
根据所述验证结果继续通过所述训练集对所述待训练模型进行训练,直至所述待训练模型收敛,获得所述过曝恢复模型。Continue to train the model to be trained through the training set according to the verification result until the model to be trained converges to obtain the overexposure recovery model.
进一步地,在上述任一实施例的基础上,所述处理器在根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型之后,还用于:Further, on the basis of any of the foregoing embodiments, after the processor trains a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model, it is further configured to:
获取图像采集装置采集的第二图像信息,所述图像信息为Raw格式,所述第一图像信息与所述第二图像信息至少部分不重叠;Acquiring second image information collected by an image collecting device, where the image information is in a Raw format, and the first image information and the second image information are at least partially non-overlapping;
根据所述第二图像信息生成测试集;Generating a test set according to the second image information;
通过所述测试集对所述待训练模型的适用性进行测试。The applicability of the model to be trained is tested through the test set.
进一步地,在上述任一实施例的基础上,所述恢复矩阵为十二通道矩阵;Further, on the basis of any of the foregoing embodiments, the restoration matrix is a twelve-channel matrix;
相应地,所述处理器在对所述恢复矩阵进行数据处理,获得恢复后的目标图像时,用于:Correspondingly, when the processor performs data processing on the restoration matrix to obtain a restored target image, it is used to:
对所述十二通道矩阵进行矩阵变换,获得与所述十二通道矩阵对应的拜耳矩阵,将与所述十二通道矩阵对应的拜耳矩阵对应的图像作为所述恢复后的目标图像。Matrix transformation is performed on the twelve-channel matrix to obtain a Bayer matrix corresponding to the twelve-channel matrix, and an image corresponding to the Bayer matrix corresponding to the twelve-channel matrix is used as the restored target image.
进一步地,在上述任一实施例的基础上,所述待训练模型为卷积神经网络模型。Further, on the basis of any of the foregoing embodiments, the model to be trained is a convolutional neural network model.
进一步地,在上述任一实施例的基础上,所述待训练模型为能够进行上采样以及下采样的模型。Further, on the basis of any of the foregoing embodiments, the model to be trained is a model that can perform up-sampling and down-sampling.
另外,本实施例还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行以实现上述实施例所述的过曝恢复处理方法。In addition, this embodiment also provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement the overexposure recovery processing method described in the foregoing embodiment.
在本发明所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed device and method may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地 方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor execute the method described in the various embodiments of the present invention. Part of the steps. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .
本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, only the division of the above-mentioned functional modules is used as an example. In practical applications, the above-mentioned functions can be allocated by different functional modules as required, namely, the device The internal structure is divided into different functional modules to complete all or part of the functions described above. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not repeated here.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: It is still possible to modify the technical solutions described in the foregoing embodiments, or equivalently replace some or all of the technical features; these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present invention range.

Claims (29)

  1. 一种过曝恢复处理方法,其特征在于,包括:An overexposure recovery treatment method, characterized in that it comprises:
    获取待恢复图像;Obtain the image to be restored;
    通过预设的过曝恢复模型对所述待恢复图像进行过曝恢复操作,获得恢复矩阵;Performing an overexposure recovery operation on the image to be recovered through a preset overexposure recovery model to obtain a recovery matrix;
    对所述恢复矩阵进行数据处理,获得恢复后的目标图像。Data processing is performed on the restoration matrix to obtain a restored target image.
  2. 根据权利要求1所述的方法,其特征在于,所述通过预设的过曝恢复模型对所述待恢复图像进行过曝恢复操作之前,还包括:The method according to claim 1, wherein before the performing an overexposure recovery operation on the image to be recovered through a preset overexposure recovery model, the method further comprises:
    获取待训练数据集,所述待训练数据集中包括至少一组待训练图像组;Acquiring a data set to be trained, where the data set to be trained includes at least one group of images to be trained;
    根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型。Training a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model.
  3. 根据权利要求2所述的方法,其特征在于,所述获取待训练数据集,包括:The method according to claim 2, wherein said acquiring a data set to be trained comprises:
    获取图像采集装置采集的第一图像信息,所述第一图像信息为Raw格式;Acquiring first image information collected by an image collecting device, where the first image information is in a Raw format;
    将所述第一图像信息对应的拜耳矩阵转换为四通道矩阵,获得所述待训练数据集。The Bayer matrix corresponding to the first image information is converted into a four-channel matrix to obtain the data set to be trained.
  4. 根据权利要求3所述的方法,其特征在于,所述待训练图像组中包括正常曝光参数拍摄的事实图像以及至少一个过曝参数拍摄的过曝图像对应的四通道矩阵。The method according to claim 3, wherein the image group to be trained includes a fact image taken with a normal exposure parameter and a four-channel matrix corresponding to an overexposure image taken with at least one overexposure parameter.
  5. 根据权利要求2-4任一项所述的方法,其特征在于,所述根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型,包括:The method according to any one of claims 2-4, wherein the training a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model comprises:
    针对所述待训练数据集中每一过曝图像,根据所述过曝图像的过曝参数计算所述过曝图像对应的过曝倍数;For each overexposed image in the to-be-trained data set, calculating the overexposure multiple corresponding to the overexposed image according to the overexposure parameter of the overexposed image;
    根据所述过曝图像以及所述过曝倍数对预设的待训练模型进行训练,获得所述过曝恢复模型。Training a preset model to be trained according to the overexposure image and the overexposure multiple to obtain the overexposure recovery model.
  6. 根据权利要求5所述的方法,其特征在于,所述过曝参数包括光圈值以及曝光时间;The method according to claim 5, wherein the overexposure parameter includes an aperture value and an exposure time;
    相应地,所述根据所述过曝图像的过曝参数计算所述过曝图像对应的 过曝倍数,包括:Correspondingly, the calculating the overexposure multiple corresponding to the overexposed image according to the overexposure parameter of the overexposed image includes:
    根据光圈值以及曝光时间计算所述过曝图像对应的过曝倍数。The overexposure multiple corresponding to the overexposed image is calculated according to the aperture value and the exposure time.
  7. 根据权利要求5或6所述的方法,其特征在于,所述根据所述过曝图像以及所述过曝倍数对预设的待训练模型进行训练,获得所述过曝恢复模型,包括:The method according to claim 5 or 6, wherein the training a preset model to be trained according to the overexposed image and the overexposure multiple to obtain the overexposed recovery model comprises:
    根据所述过曝倍数对所述待训练模型的参数进行调节,获得调节后的待训练模型;Adjusting the parameters of the model to be trained according to the overexposure multiple to obtain an adjusted model to be trained;
    根据所述过曝图像对所述调节后的待训练模型进行训练,获得所述过曝恢复模型。Training the adjusted model to be trained according to the overexposed image to obtain the overexposed recovery model.
  8. 根据权利要求2-6任一项所述的方法,其特征在于,所述根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型,包括:The method according to any one of claims 2-6, wherein the training a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model comprises:
    将所述过曝图像对应的四通道矩阵输入至所述待训练模型中,获取所述待训练模型的输出结果;Input the four-channel matrix corresponding to the overexposed image to the model to be trained, and obtain the output result of the model to be trained;
    计算所述输出结果与所述过曝图像对应的事实图像之间的差值;Calculating the difference between the output result and the fact image corresponding to the overexposed image;
    根据所述差值对所述待训练模型进行训练,获得所述过曝恢复模型。Training the model to be trained according to the difference to obtain the overexposure recovery model.
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述差值对所述待训练模型进行训练,获得所述过曝恢复模型,包括:The method according to claim 8, wherein the training the model to be trained according to the difference to obtain the overexposure recovery model comprises:
    判断所述差值是否大于预设的差值阈值;Judging whether the difference value is greater than a preset difference value threshold;
    若是,则根据所述差值对所述待训练模型的参数进行调节,直至调整后的所述待训练模型的输出结果与事实图像之间的差值小于预设的差值阈值;If yes, adjust the parameters of the model to be trained according to the difference, until the adjusted difference between the output result of the model to be trained and the fact image is less than a preset difference threshold;
    若否,则判定所述待训练模型收敛,获得所述过曝恢复模型。If not, it is determined that the model to be trained converges, and the overexposure recovery model is obtained.
  10. 根据权利要求2-9任一项所述的方法,其特征在于,所述根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型,包括:The method according to any one of claims 2-9, wherein the training a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model comprises:
    按照预设的比例将所述待训练数据集随机分为训练集以及验证集;Randomly dividing the to-be-trained data set into a training set and a verification set according to a preset ratio;
    通过所述训练集对所述待训练模型进行训练;Training the model to be trained through the training set;
    通过所述验证集对所述待训练模型的恢复精准度进行验证,获得验证结果;Verifying the restoration accuracy of the model to be trained through the verification set to obtain a verification result;
    根据所述验证结果继续通过所述训练集对所述待训练模型进行训练,直至所述待训练模型收敛,获得所述过曝恢复模型。Continue to train the model to be trained through the training set according to the verification result until the model to be trained converges to obtain the overexposure recovery model.
  11. 根据权利要求2-9任一项所述的方法,其特征在于,所述根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型之后,还包括:The method according to any one of claims 2-9, wherein the training a preset model to be trained according to the data set to be trained, and after obtaining the overexposure recovery model, further comprising:
    获取图像采集装置采集的第二图像信息,所述图像信息为Raw格式,第一图像信息与所述第二图像信息至少部分不重叠;Acquiring second image information collected by an image collecting device, where the image information is in a Raw format, and the first image information and the second image information do not overlap at least partially;
    根据所述第二图像信息生成测试集;Generating a test set according to the second image information;
    通过所述测试集对所述待训练模型的适用性进行测试。The applicability of the model to be trained is tested through the test set.
  12. 根据权利要求1-11任一项所述的方法,其特征在于,所述恢复矩阵为十二通道矩阵;The method according to any one of claims 1-11, wherein the restoration matrix is a twelve-channel matrix;
    相应地,所述对所述恢复矩阵进行数据处理,获得恢复后的目标图像,包括:Correspondingly, the performing data processing on the restoration matrix to obtain the restored target image includes:
    对所述十二通道矩阵进行矩阵变换,获得与所述十二通道矩阵对应的拜耳矩阵,将与所述十二通道矩阵对应的拜耳矩阵对应的图像作为所述恢复后的目标图像。Matrix transformation is performed on the twelve-channel matrix to obtain a Bayer matrix corresponding to the twelve-channel matrix, and an image corresponding to the Bayer matrix corresponding to the twelve-channel matrix is used as the restored target image.
  13. 根据权利要求2-12任一项所述的方法,其特征在于,待训练模型为卷积神经网络模型。The method according to any one of claims 2-12, wherein the model to be trained is a convolutional neural network model.
  14. 根据权利要求2-13任一项所述的方法,其特征在于,待训练模型为能够进行上采样以及下采样的模型。The method according to any one of claims 2-13, wherein the model to be trained is a model capable of up-sampling and down-sampling.
  15. 一种过曝恢复处理设备,其特征在于,包括:存储器和处理器;An overexposure recovery processing device, which is characterized by comprising: a memory and a processor;
    所述存储器用于存储程序代码;The memory is used to store program codes;
    所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:The processor calls the program code, and when the program code is executed, is used to perform the following operations:
    获取待恢复图像;Obtain the image to be restored;
    通过预设的过曝恢复模型对所述待恢复图像进行过曝恢复操作,获得恢复矩阵;Performing an overexposure recovery operation on the image to be recovered through a preset overexposure recovery model to obtain a recovery matrix;
    对所述恢复矩阵进行数据处理,获得恢复后的目标图像。Data processing is performed on the restoration matrix to obtain a restored target image.
  16. 根据权利要求15所述的设备,其特征在于,所述处理器在通过预设的过曝恢复模型对所述待恢复图像进行过曝恢复操作之前,还用于:15. The device according to claim 15, wherein the processor is further configured to: before performing an overexposure recovery operation on the image to be recovered through a preset overexposure recovery model:
    获取待训练数据集,所述待训练数据集中包括至少一组待训练图像组;Acquiring a data set to be trained, where the data set to be trained includes at least one group of images to be trained;
    根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型。Training a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model.
  17. 根据权利要求16所述的设备,其特征在于,所述处理器在获取待训练数据集时,用于:The device according to claim 16, wherein the processor is configured to:
    获取图像采集装置采集的图像信息,第一图像信息为Raw格式;Acquiring image information collected by the image collecting device, where the first image information is in a Raw format;
    将所述图像信息对应的拜耳矩阵转换为四通道矩阵,获得所述待训练数据集。The Bayer matrix corresponding to the image information is converted into a four-channel matrix to obtain the data set to be trained.
  18. 根据权利要求17所述的设备,其特征在于,所述待训练图像组中包括正常曝光参数拍摄的事实图像以及至少一个过曝参数拍摄的过曝图像对应的四通道矩阵。The device according to claim 17, wherein the group of images to be trained includes a fact image taken with normal exposure parameters and a four-channel matrix corresponding to an overexposure image taken with at least one overexposure parameter.
  19. 根据权利要求16-18任一项所述的设备,其特征在于,所述处理器在根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型时,用于:The device according to any one of claims 16-18, wherein the processor trains a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model. in:
    针对所述待训练数据集中每一过曝图像,根据所述过曝图像的过曝参数计算所述过曝图像对应的过曝倍数;For each overexposed image in the to-be-trained data set, calculating the overexposure multiple corresponding to the overexposed image according to the overexposure parameter of the overexposed image;
    根据所述过曝图像以及所述过曝倍数对预设的待训练模型进行训练,获得所述过曝恢复模型。Training a preset model to be trained according to the overexposure image and the overexposure multiple to obtain the overexposure recovery model.
  20. 根据权利要求19所述的设备,其特征在于,所述过曝参数包括光圈值以及曝光时间;The device according to claim 19, wherein the overexposure parameter comprises an aperture value and an exposure time;
    相应地,所述处理器在根据所述过曝图像的过曝参数计算所述过曝图像对应的过曝倍数时,用于:Correspondingly, when the processor calculates the overexposure multiple corresponding to the overexposed image according to the overexposure parameter of the overexposed image, it is configured to:
    根据光圈值以及曝光时间计算所述过曝图像对应的过曝倍数。The overexposure multiple corresponding to the overexposed image is calculated according to the aperture value and the exposure time.
  21. 根据权利要求19或20所述的设备,其特征在于,所述处理器在根据所述过曝图像以及所述过曝倍数对预设的待训练模型进行训练,获得所述过曝恢复模型时,用于:The device according to claim 19 or 20, wherein the processor trains a preset model to be trained according to the overexposed image and the overexposure multiple to obtain the overexposed recovery model For:
    根据所述过曝倍数对所述待训练模型的参数进行调节,获得调节后的待训练模型;Adjusting the parameters of the model to be trained according to the overexposure multiple to obtain an adjusted model to be trained;
    根据所述过曝图像对所述调节后的待训练模型进行训练,获得所述过曝恢复模型。Training the adjusted model to be trained according to the overexposed image to obtain the overexposed recovery model.
  22. 根据权利要求16-20任一项所述的设备,其特征在于,所述处理器在根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型时,用于:The device according to any one of claims 16-20, wherein the processor trains a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model. in:
    将所述过曝图像对应的四通道矩阵输入至所述待训练模型中,获取所述待训练模型的输出结果;Input the four-channel matrix corresponding to the overexposed image to the model to be trained, and obtain the output result of the model to be trained;
    计算所述输出结果与所述过曝图像对应的事实图像之间的差值;Calculating the difference between the output result and the fact image corresponding to the overexposed image;
    根据所述差值对所述待训练模型进行训练,获得所述过曝恢复模型。Training the model to be trained according to the difference to obtain the overexposure recovery model.
  23. 根据权利要求22所述的设备,其特征在于,所述处理器在根据所述差值对所述待训练模型进行训练,获得所述过曝恢复模型时,用于:The device according to claim 22, wherein the processor is configured to: when training the model to be trained according to the difference to obtain the overexposure recovery model:
    判断所述差值是否大于预设的差值阈值;Judging whether the difference value is greater than a preset difference value threshold;
    若是,则根据所述差值对所述待训练模型的参数进行调节,直至调整后的所述待训练模型的输出结果与事实图像之间的差值小于预设的差值阈值;If yes, adjust the parameters of the model to be trained according to the difference, until the adjusted difference between the output result of the model to be trained and the fact image is less than a preset difference threshold;
    若否,则判定所述待训练模型收敛,获得所述过曝恢复模型。If not, it is determined that the model to be trained converges, and the overexposure recovery model is obtained.
  24. 根据权利要求16-23任一项所述的设备,其特征在于,所述处理器在根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型时,用于:The device according to any one of claims 16-23, wherein when the processor trains a preset model to be trained according to the data set to be trained to obtain the overexposure recovery model, it uses in:
    按照预设的比例将所述待训练数据集随机分为训练集以及验证集;Randomly dividing the to-be-trained data set into a training set and a verification set according to a preset ratio;
    通过所述训练集对所述待训练模型进行训练;Training the model to be trained through the training set;
    通过所述验证集对所述待训练模型的恢复精准度进行验证,获得验证结果;Verifying the restoration accuracy of the model to be trained through the verification set to obtain a verification result;
    根据所述验证结果继续通过所述训练集对所述待训练模型进行训练,直至所述待训练模型收敛,获得所述过曝恢复模型。Continue to train the model to be trained through the training set according to the verification result until the model to be trained converges to obtain the overexposure recovery model.
  25. 根据权利要求16-23任一项所述的设备,其特征在于,所述处理器在根据所述待训练数据集对预设的待训练模型进行训练,获得所述过曝恢复模型之后,还用于:The device according to any one of claims 16-23, wherein the processor trains a preset to-be-trained model according to the to-be-trained data set, and obtains the overexposure recovery model, further Used for:
    获取图像采集装置采集的第二图像信息,所述图像信息为Raw格式,第一图像信息与所述第二图像信息至少部分不重叠;Acquiring second image information collected by an image collecting device, where the image information is in a Raw format, and the first image information and the second image information do not overlap at least partially;
    根据所述第二图像信息生成测试集;Generating a test set according to the second image information;
    通过所述测试集对所述待训练模型的适用性进行测试。The applicability of the model to be trained is tested through the test set.
  26. 根据权利要求15-25任一项所述的设备,其特征在于,所述恢复矩阵为十二通道矩阵;The device according to any one of claims 15-25, wherein the restoration matrix is a twelve-channel matrix;
    相应地,所述处理器在对所述恢复矩阵进行数据处理,获得恢复后的目标图像时,用于:Correspondingly, when the processor performs data processing on the restoration matrix to obtain a restored target image, it is used to:
    对所述十二通道矩阵进行矩阵变换,获得与所述十二通道矩阵对应的拜耳矩阵,将与所述十二通道矩阵对应的拜耳矩阵对应的图像作为所述恢复后的目标图像。Matrix transformation is performed on the twelve-channel matrix to obtain a Bayer matrix corresponding to the twelve-channel matrix, and an image corresponding to the Bayer matrix corresponding to the twelve-channel matrix is used as the restored target image.
  27. 根据权利要求16-26任一项所述的设备,其特征在于,待训练模型为卷积神经网络模型。The device according to any one of claims 16-26, wherein the model to be trained is a convolutional neural network model.
  28. 根据权利要求16-27任一项所述的设备,其特征在于,待训练模型为能够进行上采样以及下采样的模型。The device according to any one of claims 16-27, wherein the model to be trained is a model capable of up-sampling and down-sampling.
  29. 一种计算机可读存储介质,其特征在于,其上存储有计算机程序,所述计算机程序被处理器执行以实现如权利要求1-14任一项所述的方法。A computer-readable storage medium, characterized in that a computer program is stored thereon, and the computer program is executed by a processor to implement the method according to any one of claims 1-14.
PCT/CN2019/081093 2019-04-02 2019-04-02 Overexposure recovery processing method, device and computer-readable storage medium WO2020199141A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/081093 WO2020199141A1 (en) 2019-04-02 2019-04-02 Overexposure recovery processing method, device and computer-readable storage medium
CN201980005472.7A CN111386697A (en) 2019-04-02 2019-04-02 Overexposure recovery processing method, overexposure recovery processing device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/081093 WO2020199141A1 (en) 2019-04-02 2019-04-02 Overexposure recovery processing method, device and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2020199141A1 true WO2020199141A1 (en) 2020-10-08

Family

ID=71219148

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/081093 WO2020199141A1 (en) 2019-04-02 2019-04-02 Overexposure recovery processing method, device and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN111386697A (en)
WO (1) WO2020199141A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105991937A (en) * 2015-03-04 2016-10-05 深圳市朗驰欣创科技有限公司 Virtual exposure method and device based on Bayer format image
US20180350048A1 (en) * 2017-05-31 2018-12-06 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and program
CN109284719A (en) * 2018-09-28 2019-01-29 成都臻识科技发展有限公司 A kind of primary data processing method and system based on machine learning

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8867830B2 (en) * 2011-12-06 2014-10-21 Michael Donvig Joensson Image processing method for recovering details in overexposed digital video footage or digital still images
CN107492075B (en) * 2017-07-28 2019-12-10 浙江大学 method for single LDR image exposure correction based on detail enhancement
CN109409504A (en) * 2018-10-10 2019-03-01 深圳乐信软件技术有限公司 A kind of data processing method, device, computer and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105991937A (en) * 2015-03-04 2016-10-05 深圳市朗驰欣创科技有限公司 Virtual exposure method and device based on Bayer format image
US20180350048A1 (en) * 2017-05-31 2018-12-06 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and program
CN109284719A (en) * 2018-09-28 2019-01-29 成都臻识科技发展有限公司 A kind of primary data processing method and system based on machine learning

Also Published As

Publication number Publication date
CN111386697A (en) 2020-07-07

Similar Documents

Publication Publication Date Title
CN110428366B (en) Image processing method and device, electronic equipment and computer readable storage medium
US11132771B2 (en) Bright spot removal using a neural network
CN109671106B (en) Image processing method, device and equipment
US11076103B2 (en) Photographic underexposure correction using a neural network
CN110619593B (en) Double-exposure video imaging system based on dynamic scene
US10269130B2 (en) Methods and apparatus for control of light field capture object distance adjustment range via adjusting bending degree of sensor imaging zone
WO2018201809A1 (en) Double cameras-based image processing device and method
JP5319415B2 (en) Image processing apparatus and image processing method
CN103780840B (en) Two camera shooting image forming apparatus of a kind of high-quality imaging and method thereof
CN110198417A (en) Image processing method, device, storage medium and electronic equipment
CN106797437A (en) High dynamic range images using multiple images synthesize
WO2020103604A1 (en) Method and device for photographing, terminal, and computer-readable storage medium
CN104333708A (en) Photographing method, photographing device and terminal
EP2890115B1 (en) Electronic photographing apparatus and method of control
JP5459523B2 (en) System and method for depth estimation using defocused pillbox images
WO2022227752A1 (en) Photographing method and device
CN112651911A (en) High dynamic range imaging generation method based on polarization image
CN114298942A (en) Image deblurring method and device, computer readable medium and electronic equipment
JP2014103643A (en) Imaging device and subject recognition method
US20230222639A1 (en) Data processing method, system, and apparatus
WO2020199141A1 (en) Overexposure recovery processing method, device and computer-readable storage medium
CN111105369A (en) Image processing method, image processing apparatus, electronic device, and readable storage medium
US20210400192A1 (en) Image processing apparatus, image processing method, and storage medium
US20210337098A1 (en) Neural Network Supported Camera Image Or Video Processing Pipelines
TWI590192B (en) Adaptive high dynamic range image fusion algorithm

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19923590

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19923590

Country of ref document: EP

Kind code of ref document: A1