Search

CN-116645277-B - Image processing method, device, computer readable storage medium and apparatus

CN116645277BCN 116645277 BCN116645277 BCN 116645277BCN-116645277-B

Abstract

The application provides an image processing method, an image processing device, a computer readable storage medium and an electronic device, which relate to the technical field of image processing, wherein the method can cut a first image corresponding to a first color depth into a second image corresponding to a second color depth, and normalizing the second image into a sample image with the first color depth so as to simulate a low dynamic range image, wherein the sample image is applied to model training, so that the problem that the model learns the low dynamic range image can be solved, and the problem that the model generates an image with bright and dark edges and the problem of smear can be avoided.

Inventors

  • SONG XIAOFEI
  • ZHANG YUANLONG
  • CHEN JIAWEI
  • LI XIANG
  • ZHANG HAIYU

Assignees

  • OPPO广东移动通信有限公司
  • 清华大学

Dates

Publication Date
20260508
Application Date
20230223

Claims (8)

  1. 1. An image processing method, comprising: Acquiring a first image corresponding to a first color depth; clipping pixels belonging to a preset pixel value range in the first image to obtain a second image corresponding to a second color depth, wherein the preset pixel value range comprises a highest range and a lowest range, and the obtaining of the second image corresponding to the second color depth comprises clipping pixels belonging to the highest range and the lowest range in the first image to obtain the second image corresponding to the second color depth; Normalizing the second image to a sample image corresponding to the first color depth, comprising: carrying out normalization processing on each pixel in the second image through the maximum pixel value corresponding to the first color depth to obtain a sample image corresponding to the first color depth; The method further comprises the steps of determining a sample image and an original image corresponding to the first color depth as a sample pair, training an image processing model through the sample pair, wherein the trained image processing model is used for reducing dynamic range differences between an actual shot image of a low dynamic range camera and neural network simulation training data.
  2. 2. The method of claim 1, wherein acquiring a first image corresponding to a first color depth comprises: acquiring an original image corresponding to a first color depth; and carrying out convolution processing on the original image to obtain a first image corresponding to the first color depth.
  3. 3. The method of claim 2, wherein convolving the original image to obtain a first image corresponding to the first color depth, comprising: and convolving the point spread function with the original image to obtain a first image corresponding to the first color depth.
  4. 4. The method of claim 1, wherein training an image processing model through the sample pair comprises: triggering an image processing model to process the image quality of the sample image to obtain a reference image; Calculating a loss function between the reference image and the original image; And adjusting model parameters of the image processing model through the loss function.
  5. 5. The method of claim 1, wherein cropping pixels belonging to the highest range and the lowest range in the first image to obtain a second image corresponding to a second color depth comprises: Determining a minimum boundary value corresponding to the highest range and a maximum boundary value of the lowest range; And clipping the pixels belonging to the highest range in the first image to the minimum boundary value, and clipping the pixels belonging to the lowest range in the first image to the maximum boundary value to obtain a second image corresponding to a second color depth.
  6. 6. An image processing apparatus, comprising: an image acquisition unit configured to acquire a first image corresponding to a first color depth; The image clipping unit is used for clipping pixels belonging to a preset pixel value range in the first image to obtain a second image corresponding to a second color depth, wherein the preset pixel value range comprises a highest range and a lowest range, and the obtaining of the second image corresponding to the second color depth comprises clipping pixels belonging to the highest range and the lowest range in the first image to obtain the second image corresponding to the second color depth; The sample generation unit is used for normalizing the second image into a sample image corresponding to the first color depth, and comprises the steps of carrying out normalization processing on each pixel in the second image through the maximum pixel value corresponding to the first color depth to obtain the sample image corresponding to the first color depth; A sample pair determining unit configured to determine a sample image and an original image corresponding to a first color depth as a sample pair; The model training unit is used for training an image processing model through a sample pair, and the trained image processing model is used for reducing the dynamic range difference existing between the actual shot image of the low dynamic range camera and the neural network simulation training data.
  7. 7. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any of claims 1-5.
  8. 8. An electronic device, comprising: processor, and A memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of any of claims 1-5 via execution of the executable instructions.

Description

Image processing method, device, computer readable storage medium and apparatus Technical Field The present application relates to the field of image processing technologies, and in particular, to an image processing method, an image processing device, a computer readable storage medium, and a computer readable storage device. Background A Low dynamic range (Low DYNAMIC RANGE, LDR) image refers to an image that is limited in brightness and color range. A high dynamic range (HIGH DYNAMIC RANGE, HDR) image refers to an image that is capable of displaying a wider range of luminances and color, and an HDR image can capture higher luminance and color details than an LDR image, and thus can more realistically reflect the details in a real scene. In order to present better image quality to the user, an image processing model is typically set in the camera to improve the quality of the captured low dynamic range image. In general, a training sample of such an image processing model employs a high dynamic range image (as a label) and a blurred image of the high dynamic range image (as a sample). However, the low dynamic range image has a limitation of color depth, and there is a problem that the image is easily cut off due to too bright/too dark edges. For the image with the truncation problem, the image processing model trained based on the sample is used for processing, and the obtained high dynamic range image may have the problem of smear at the over-bright/over-dark edge. It should be noted that the information disclosed in the above background section is only for enhancing the understanding of the background of the application and thus may include information that does not form a related art that is already known to those of ordinary skill in the art. Disclosure of Invention The application aims to provide an image processing method, an image processing device, a computer readable storage medium and electronic equipment, which can cut a first image corresponding to a first color depth into a second image corresponding to a second color depth, normalize the second image into a sample image of the first color depth so as to simulate a low dynamic range image, and can be used for facilitating model learning to the low dynamic range image in model training, so that the problem of bright and dark edge smear of model generation is avoided. Other features and advantages of the application will be apparent from the following detailed description, or may be learned by the practice of the application. According to an aspect of the present application, there is provided an image processing method including: Acquiring a first image corresponding to a first color depth; Cutting pixels belonging to a preset pixel value range in the first image to obtain a second image corresponding to a second color depth; the second image is normalized to a sample image corresponding to the first color depth. According to an aspect of the present application, there is provided an image processing apparatus including: an image acquisition unit configured to acquire a first image corresponding to a first color depth; the image clipping unit is used for clipping pixels belonging to a preset pixel value range in the first image to obtain a second image corresponding to the second color depth; And a sample generation unit for normalizing the second image to a sample image corresponding to the first color depth. According to an aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from the computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the methods provided in the various alternative implementations described above. According to an aspect of the present application, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of any of the above. According to an aspect of the application, there is provided an electronic device comprising a processor and a memory for storing executable instructions of the processor, wherein the processor is configured to perform the method of any of the above via execution of the executable instructions. Exemplary embodiments of the present application may have some or all of the following advantages: In the image processing method provided by the example embodiment of the application, a first image corresponding to a first color depth can be cut into a second image corresponding to a second color depth, and the second image is normalized into a sample image of the first color depth so as to simulate a low dynamic range image, and the application of the sample image in model training can be beneficial to the problem that a model learns the low dynamic range image, so that the pro