Search

CN-122023207-A - Image processing method, electronic device, storage medium, chip system, and program product

CN122023207ACN 122023207 ACN122023207 ACN 122023207ACN-122023207-A

Abstract

The embodiment of the application provides an image processing method, electronic equipment, a storage medium, a chip system and a program product, and relates to the technical field of terminals. The method comprises the steps of obtaining a first image and a second image, wherein the first image is a high dynamic range HDR image, the second image is a standard dynamic range SDR image, determining a first gain map according to the first image and the second image, adjusting the brightness of the second image to obtain a third image, obtaining a second gain map based on brightness adjustment gain and the first gain map, wherein the brightness adjustment gain is obtained by calculating based on the third image and the second image, the brightness adjustment gain is used for representing the brightness gain of the third image relative to the second image, and obtaining a fourth image based on the second gain map and the third image, and the fourth image is the HDR image. In this way, the quality of HDR images displayed by the electronic equipment can be improved, and the user experience is better.

Inventors

  • HU YI

Assignees

  • 荣耀终端股份有限公司

Dates

Publication Date
20260512
Application Date
20241112

Claims (12)

  1. 1. An image processing method, comprising: Acquiring a first image and a second image, wherein the first image is a high dynamic range HDR image, and the second image is a standard dynamic range SDR image; Determining a first gain map from the first image and the second image; Adjusting the brightness of the second image to obtain a third image; Obtaining a second gain map based on a brightness adjustment gain and the first gain map, wherein the brightness adjustment gain is calculated based on the third image and the second image, and the brightness adjustment gain is used for representing the brightness gain of the third image relative to the second image; and obtaining a fourth image based on the second gain map and the third image, wherein the fourth image is an HDR image.
  2. 2. The method of claim 1, wherein the brightness adjustment gain is calculated based on a gain quantization parameter, a brightness of each pixel in the third image, and a brightness of each pixel in the second image, wherein the gain quantization parameter is used to represent a quantization accuracy of brightness of a pixel (i, j) in the third image relative to a brightness gain of a pixel (i, j) in the second image, and i and j are positive integers.
  3. 3. The method according to claim 1 or 2, wherein said obtaining a second gain map comprises: Adjusting the brightness adjustment gain based on a preset optical-optical transfer function OOTF curve to obtain an optimized brightness adjustment gain, wherein the preset OOTF curve is used for describing a mapping relationship between an initial HDR image and a target display effect HDR image, the initial HDR image is an HDR image shot by electronic equipment, and the target display effect HDR image is an HDR image obtained after the display effect of the initial HDR image is optimized; And obtaining the second gain map based on the optimized brightness adjustment gain and the first gain map.
  4. 4. The method of claim 3, wherein the display effect optimization comprises global dynamic range adjustment or local dynamic range adjustment, and/or global contrast adjustment or local contrast adjustment.
  5. 5. The method according to claim 3 or 4, characterized in that the method further comprises: shooting the initial HDR images, wherein the number of the initial HDR images is N, and N is an integer greater than or equal to 1; optimizing the display effect of the initial HDR image to obtain target display effect HDR images, wherein the number of the target display effect HDR images is N; fitting the brightness of the initial HDR image and the brightness of the target display effect HDR image to obtain the preset OOTF curve.
  6. 6. The method according to any one of claims 1 to 5, wherein the obtaining a fourth image based on the second gain map and the third image comprises: obtaining an SDR image with adjusted brightness based on the third image and the second image; and obtaining the fourth image based on the SDR image with the adjusted brightness and the second gain map.
  7. 7. The method of any one of claims 1 to 6, wherein the third image is derived based on the second image and preset light source information including light source direction information and illumination intensity.
  8. 8. The method of claim 7, wherein the third image is derived based on a normal vector image of the second image and the preset light source information, the normal vector image including a pixel normal vector of a target area in the second image.
  9. 9. An electronic device is characterized by comprising a processor and a memory; The memory stores computer-executable instructions; The processor executing computer-executable instructions stored in the memory to cause the electronic device to perform the method of any one of claims 1-8.
  10. 10. A computer readable storage medium storing a computer program, which when executed by a processor implements the method according to any one of claims 1-8.
  11. 11. A system on a chip comprising at least one processor and a communication interface, the communication interface and the at least one processor being interconnected by a wire, the at least one processor being configured to execute a computer program or instructions to perform the method of any of claims 1-8.
  12. 12. A computer program product comprising a computer program which, when run, causes a computer to perform the method of any of claims 1-8.

Description

Image processing method, electronic device, storage medium, chip system, and program product Technical Field The present application relates to the field of terminal technologies, and in particular, to an image processing method, an electronic device, a storage medium, a chip system, and a program product. Background With the development of the technical field of terminals, in order to provide a better shooting experience for users, part of electronic devices can support shooting in a high dynamic range (HIGH DYNAMIC RANGE, HDR) mode to obtain an HDR image with wider dynamic range and finer detail. However, for some electronic devices, such as electronic devices provided with standard dynamic range (STANDARD DYNAMIC RANGE, SDR) display screens, the HDR image may not be displayed, or there may be a loss of image quality for the displayed HDR image, etc. Therefore, after the camera of the electronic device shoots and obtains an initial HDR image, the electronic device can obtain an SDR image and a gain map (gain map) according to the initial HDR image, and then the electronic device can display the HDR image reconstructed by the SDR image and the gain map. In some scenarios, such as dark shooting environments, etc., it may be necessary to perform brightness adjustment on an image shot by an electronic device, which may perform brightness adjustment on an SDR image used to reconstruct an HDR image, and reconstruct the brightness-adjusted HDR image through the brightness-adjusted SDR image and a gain map. However, such a method may result in poor HDR image quality after brightness adjustment of the electronic device display, thereby affecting the image display effect, so that the user experience is poor. Disclosure of Invention The embodiment of the application provides an image processing method, electronic equipment, a storage medium, a chip system and a program product, which are applied to the technical field of terminals and are beneficial to improving the quality of an HDR image obtained by the electronic equipment and improving the experience of a user. In a first aspect, an embodiment of the present application provides an image processing method, applied to an electronic device, where the method includes acquiring a first image and a second image, the first image is a high dynamic range HDR image, the second image is a standard dynamic range SDR image, determining a first gain map according to the first image and the second image, adjusting brightness of the second image to obtain a third image, obtaining a second gain map based on a brightness adjustment gain and the first gain map, the brightness adjustment gain is calculated based on the third image and the second image, the brightness adjustment gain is used for representing brightness gain of the third image relative to the second image, and obtaining a fourth image based on the second gain map and the third image, the fourth image is the HDR image. Wherein the first image may be, for example, HDR image 1 hereinafter. The second image may be, for example, the AIDRC image below. Illustratively, similar to fig. 3 and 4, the acquisition of the first image and the second image may be, for example, S301 to S303 in fig. 3 or 4, and reference may be made to the following description. The first gain map may be, for example, gain map 1 below, and may be an image calculated based on the first image and the second image. Illustratively, similar to fig. 3 and 4, determining the first gain map may be, for example, S304 in fig. 3 or 4, and reference may be made to the following description. The third image may be, for example, a visible light-emitting image hereinafter. Illustratively, similar to fig. 3 and 4, the third image may be obtained as S305 to S306 in fig. 3 and 4, for example, and reference may be made to the following description. The brightness adjustment gain may be, for example, the newly added light source brightness gain below, and the second gain map may be, for example, the gain map 2 below. The electronic device may obtain a second gain map based on the first gain map and the brightness adjustment gain, and the second gain map obtained based on the first gain map and the brightness adjustment gain may be, for example, a gain map 2 calculated based on the brightness gain of the newly added light source and the gain map 1. Illustratively, the difference from S403 is that the gain coefficient of each pixel in the OOTF gain coefficients is replaced with the luminance gain of each pixel in the newly added light source luminance gain. The fourth image may be, for example, the HDR image 3 hereinafter. Illustratively, similar to fig. 3 and 4, the fourth image may be obtained, for example, as S404. According to the image processing method, the electronic equipment can obtain the fourth image based on the second gain map obtained after the gain adjustment of the brightness adjustment. Thus, in addition to the brightness adjustment of the second image,