CN-115587956-B - Image processing method and device, computer readable storage medium and terminal
Abstract
The image processing method comprises the steps of obtaining an F frame first image, inputting the F frame first image into a neural network model obtained through pre-training to obtain fusion parameters output by the neural network model, wherein the fusion parameters comprise enhancement parameters and weight parameters, the enhancement parameters comprise mapping vectors corresponding to pixel points of each frame first image, the weight parameters comprise weight values corresponding to pixel points of each frame first image, enhancement processing is carried out on the F frame first image at least according to the enhancement parameters to obtain an F frame second image, and fusion processing is carried out on the F frame second image according to the weight parameters to obtain a target image. By the scheme provided by the application, multi-frame images can be fused efficiently, and high-quality images can be obtained.
Inventors
- WU QIAN
- SHAO NA
- ZHAO LEI
Assignees
- 北京紫光展锐通信技术有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20221028
Claims (9)
- 1. An image processing method, the method comprising: f, acquiring a first image of an F frame, wherein F is an integer greater than 1; Inputting the F frame first image into a neural network model obtained by training in advance to obtain fusion parameters, wherein the fusion parameters comprise enhancement parameters and weight parameters, the enhancement parameters comprise mapping vectors corresponding to all pixels of each frame of first image, and the weight parameters comprise weight values corresponding to all pixels of each frame of first image; Performing enhancement processing on the first image of the F frame at least according to the enhancement parameters to obtain a second image of the F frame; performing fusion processing on the F frame second image according to the weight parameters to obtain a target image; The fusion parameters further comprise guiding parameters, wherein the guiding parameters comprise scene vectors corresponding to each pixel point, the scene vectors comprise association weights of the pixel points and each scene, the association degrees are higher, the association weights are larger, and the enhancement processing of the F frame first image at least according to the enhancement parameters comprises: And carrying out enhancement processing on the F frame first image according to the guide parameter and the enhancement parameter to obtain the F frame second image.
- 2. The image processing method according to claim 1, wherein the processing step of the F-frame first image by the neural network model includes: downsampling the first image of the F frame to obtain downsampled data; Performing first convolution processing on the downsampled data to obtain intermediate enhancement data; and carrying out up-sampling operation on the intermediate enhancement data to obtain the enhancement parameters.
- 3. The image processing method according to claim 1, wherein the processing step of the F-frame first image by the neural network model includes: And performing second convolution processing on the F frame first image to obtain the guide parameters.
- 4. The image processing method according to claim 1, wherein the processing step of the F-frame first image by the neural network model includes: and performing third convolution processing on the F frame first image to obtain the weight parameter.
- 5. The image processing method according to claim 1, wherein the acquiring of the neural network model includes: Acquiring training data, wherein the training data comprises an F-frame sample input image and a single-frame sample target image; And training the neural network model by adopting the training data until the neural network model converges.
- 6. The image processing method according to claim 1, wherein acquiring the F-frame first image includes: Acquiring an F frame original image; And if the F frame original image is acquired by the HDR camera, taking the F frame original image as the F frame first image, otherwise, carrying out alignment processing on the F frame first image to obtain the F frame first image.
- 7. An image processing apparatus, characterized in that the apparatus comprises: the acquisition module is used for acquiring a first image of an F frame, wherein F is an integer greater than 1; the parameter calculation module is used for inputting the F frame first image into a neural network model obtained through training in advance to obtain fusion parameters, wherein the fusion parameters comprise enhancement parameters and weight parameters, the enhancement parameters comprise mapping vectors corresponding to all pixel points of each frame of first image, and the weight parameters comprise weight values corresponding to all pixel points of each frame of first image; the enhancement module is used for enhancing the first image of the F frame at least according to the enhancement parameters to obtain a second image of the F frame; The fusion module is used for carrying out fusion processing on the F frame second image according to the weight parameters to obtain a target image; the fusion parameters further comprise guide parameters, wherein the guide parameters comprise scene vectors corresponding to each pixel point, the scene vectors comprise association weights of the pixel points and each scene, the association degree is higher, the association weights are larger, and the enhancement module is used for enhancing the first image of the F frame according to the guide parameters and the enhancement parameters to obtain the second image of the F frame.
- 8. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, performs the steps of the image processing method of any one of claims 1 to 6.
- 9. A terminal comprising a memory and a processor, the memory having stored thereon a computer program executable on the processor, characterized in that the processor executes the steps of the image processing method according to any of claims 1 to 6 when the computer program is executed.
Description
Image processing method and device, computer readable storage medium and terminal Technical Field The present application relates to the field of image processing technologies, and in particular, to an image processing method and apparatus, a computer readable storage medium, and a terminal. Background The dynamic range fusion by using multiple frames of images is the main current method for obtaining the high dynamic range (HIGH DYNAMIC RANGE, abbreviated as HDR) images in the industry, however, the image quality and the processing efficiency are difficult to be considered in the process of multiple frames of image fusion. In the existing scheme, in order to improve the quality of the fused image, the adopted algorithm is complex, the calculated amount is large, and the processing efficiency is low. Or to increase the processing efficiency, a simple fusion method is used, in which case a better image quality is generally not obtained. Disclosure of Invention One of the technical objects of the present application is to provide an image processing method capable of efficiently fusing a plurality of frame images and obtaining a high-quality image. In order to solve the technical problems, the embodiment of the application provides an image processing method, which comprises the steps of obtaining an F frame first image, inputting the F frame first image into a neural network model obtained through pre-training to obtain fusion parameters, wherein the fusion parameters comprise enhancement parameters and weight parameters, the enhancement parameters comprise mapping vectors corresponding to each pixel point of each frame first image, the weight parameters comprise weight values corresponding to each pixel point of each frame first image, enhancing the F frame first image at least according to the enhancement parameters to obtain an F frame second image, and fusing the F frame second image according to the weight parameters to obtain a target image. Optionally, the step of processing the F-frame first image by the neural network model includes downsampling the F-frame first image to obtain downsampled data, performing a first convolution process on the downsampled data to obtain intermediate enhancement data, and performing an upsampling operation on the intermediate enhancement data to obtain the enhancement parameters. Optionally, the fusion parameters further include a guiding parameter, the guiding parameter includes a scene vector corresponding to each pixel, the scene vector includes an association weight of the pixel and each scene, and the enhancing the F-frame first image at least according to the enhancing parameter includes enhancing the F-frame first image according to the guiding parameter and the enhancing parameter to obtain the F-frame second image. Optionally, the step of processing the F-frame first image by the neural network model includes performing a second convolution process on the F-frame first image to obtain the guiding parameter. Optionally, the step of processing the F-frame first image by the neural network model includes performing a third convolution processing on the F-frame first image to obtain the weight parameter. Optionally, the step of acquiring the neural network model comprises the steps of acquiring training data, wherein the training data comprises an F-frame sample input image and a single-frame sample target image, and training the neural network model by adopting the training data until the neural network model converges. Optionally, acquiring the first image of the F frame includes acquiring an original image of the F frame, and if the original image of the F frame is acquired by an HDR camera, taking the original image of the F frame as the first image of the F frame, otherwise, performing alignment processing on the first image of the F frame to obtain the first image of the F frame. In order to solve the technical problems, the embodiment of the application further provides an image processing device, which comprises an acquisition module, a parameter calculation module and a fusion module, wherein the acquisition module is used for acquiring an F-frame first image, F is an integer larger than 1, the parameter calculation module is used for inputting the F-frame first image into a neural network model obtained through training in advance to obtain fusion parameters, the fusion parameters comprise enhancement parameters and weight parameters, the enhancement parameters comprise mapping vectors corresponding to all pixel points of each frame of first image, the weight parameters comprise weight values corresponding to all pixel points of each frame of first image, the enhancement module is used for carrying out enhancement processing on the F-frame first image at least according to the enhancement parameters to obtain an F-frame second image, and the fusion module is used for carrying out fusion processing on the F-frame second image according to the weight param