Search

EP-4742693-A1 - METHOD FOR SWITCHING BETWEEN HIGH DYNAMIC RANGE MODES AND ELECTRONIC DEVICE STORAGE MEDIUM

EP4742693A1EP 4742693 A1EP4742693 A1EP 4742693A1EP-4742693-A1

Abstract

A method for switching a high dynamic range mode, an electronic device, and a storage medium are provided, and relate to the field of terminal technologies. The method is applied to an electronic device supporting a lateral overflow integration capacitor LOFIC high dynamic range HDR mode and a dual analog gain DAG HDR mode, and includes: starting a camera running program; obtaining an illumination intensity of an environment in which the electronic device is located; and enabling the LOFIC HDR mode. According to this solution, when the illumination intensity decreases, instead of remaining the LOFIC HDR mode, the HDR mode is switched to the DAG HDR mode. A feature that both a long frame and a short frame in the DAG HDR mode use a same conversion gain is used. This can relieve a signal-to-noise ratio dip in a transition region of a bright part and a dark part, and improve photographing experience of a user.

Inventors

  • WANG, NING
  • LIU, HU
  • ZHANG, WENHONG
  • YE, LING

Assignees

  • Honor Device Co., Ltd.

Dates

Publication Date
20260513
Application Date
20231124

Claims (13)

  1. A method for switching a high dynamic range mode, applied to an electronic device supporting a lateral overflow integration capacitor LOFIC high dynamic range HDR mode and a dual analog gain DAG HDR mode, wherein the method comprises: starting a camera running program; obtaining an illumination intensity of an environment in which the electronic device is located; enabling the LOFIC HDR mode; and switching the HDR mode to the DAG HDR mode when the illumination intensity decreases to be less than a first illumination intensity.
  2. The method according to claim 1, wherein when the illumination intensity is greater than or equal to the first illumination intensity, the method further comprises: when the illumination intensity decreases, controlling an exposure gain in the LOFIC HDR mode to increase as the illumination intensity decreases, and controlling an exposure ratio in the LOFIC HDR mode to decrease as the illumination intensity decreases.
  3. The method according to claim 2, wherein the exposure gain comprises an analog gain and a digital gain, and the controlling an exposure gain in the LOFIC HDR mode to increase as the illumination intensity decreases, and controlling an exposure ratio in the LOFIC HDR mode to decrease as the illumination intensity decreases specifically comprises: controlling a digital gain in the LOFIC HDR mode to remain unchanged; and controlling an increase rate at which an analog gain of a short frame in the LOFIC HDR mode increases as the illumination intensity decreases to be greater than an increase rate at which an analog gain of a long frame in the LOFIC HDR mode increases as the illumination intensity decreases.
  4. The method according to claim 3, wherein the switching the HDR mode to the DAG HDR mode when the illumination intensity is less than a first illumination intensity specifically comprises: determining, based on the illumination intensity, the analog gain of the short frame in the LOFIC HDR mode and the analog gain of the long frame in the LOFIC HDR mode; switching the HDR mode to the DAG HDR mode when the analog gain of the long frame is greater than a first preset gain, wherein the first preset gain is an analog gain of the short frame in the LOFIC HDR mode when the illumination intensity is the first illumination intensity; and controlling an exposure ratio to remain unchanged before and after switching of the HDR mode.
  5. The method according to claim 2, wherein the exposure gain comprises an analog gain and a digital gain, and the controlling an exposure gain in the LOFIC HDR mode to increase as the illumination intensity decreases, and controlling an exposure ratio in the LOFIC HDR mode to decrease as the illumination intensity decreases specifically comprises: controlling an analog gain of a long frame in the LOFIC HDR mode to remain unchanged; controlling an analog gain of a short frame in the LOFIC HDR mode to increase as the illumination intensity decreases; and controlling a digital gain in the LOFIC HDR mode to increase as the illumination intensity decreases.
  6. The method according to claim 5, wherein the switching the HDR mode to the DAG HDR mode when the illumination intensity is less than a first illumination intensity specifically comprises: determining, based on the illumination intensity, the analog gain of the short frame in the LOFIC HDR mode and the digital gain in the LOFIC HDR mode; switching the HDR mode to the DAG HDR mode when the digital gain in the LOFIC HDR mode is greater than a second preset gain, wherein the second preset gain is a digital gain in the LOFIC HDR mode when the illumination intensity is the first illumination intensity; and controlling an exposure ratio to remain unchanged before and after switching of the HDR mode.
  7. The method according to claim 2, wherein the exposure gain comprises an analog gain and a digital gain, and the controlling an exposure gain in the LOFIC HDR mode to increase as the illumination intensity decreases, and controlling an exposure ratio in the LOFIC HDR mode to decrease as the illumination intensity decreases specifically comprises: controlling a digital gain in the LOFIC HDR mode to remain unchanged, and controlling an increase rate at which an analog gain of a short frame in the LOFIC HDR mode increases as the illumination intensity decreases to be greater than an increase rate at which an analog gain of a long frame in the LOFIC HDR mode increases as the illumination intensity decreases; and when the analog gain of the long frame in the LOFIC HDR mode is greater than a third preset gain, controlling the analog gain of the long frame in the LOFIC HDR mode to remain unchanged, the analog gain of the short frame in the LOFIC HDR mode to increase as the illumination intensity decreases, and the digital gain in the LOFIC HDR mode to increase as the illumination intensity decreases.
  8. The method according to claim 7, wherein the switching the HDR mode to the DAG HDR mode when the illumination intensity is less than a first illumination intensity specifically comprises: determining, based on the illumination intensity, the analog gain of the short frame in the LOFIC HDR mode and the digital gain in the LOFIC HDR mode; switching the HDR mode to the DAG HDR mode when the digital gain in the LOFIC HDR mode is greater than a fourth preset gain, wherein the fourth preset gain is a digital gain in the LOFIC HDR mode when the illumination intensity is the first illumination intensity; and controlling an exposure ratio to remain unchanged before and after switching of the HDR mode.
  9. The method according to claim 4 or 6 or 8, wherein the controlling an exposure ratio to remain unchanged before and after switching of the HDR mode specifically comprises: when a maximum exposure ratio corresponding to current exposure time is less than the exposure ratio before the switching of the HDR mode, reducing the exposure time, and increasing an analog gain of a long frame in the DAG HDR mode, to control the exposure ratio to remain unchanged before and after the switching of the HDR mode, wherein the exposure time is negatively correlated with the maximum exposure ratio corresponding to the exposure time.
  10. The method according to any one of claims 1 to 9, wherein the method further comprises: controlling picture brightness to be consistent before and after the switching of the HDR mode.
  11. The method according to claim 10, wherein the controlling picture brightness to be consistent before and after the switching of the HDR mode specifically comprises: controlling a product of exposure time before the switching of the HDR mode and an exposure gain of the long frame in the LOFIC HDR mode to be equal to a product of exposure time after the switching of the HDR mode and an exposure gain of the long frame in the DAG HDR mode.
  12. An electronic device, wherein the electronic device comprises a processor and a memory, the memory is configured to store a program, and when the program is executed by the processor, the method for switching a high dynamic range mode according to any one of claims 1 to 11 is performed.
  13. A storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by an electronic device, the method for switching a high dynamic range mode according to any one of claims 1 to 11 is performed.

Description

TECHNICAL FIELD This application relates to the field of terminal technologies, and in particular, to a method for switching a high dynamic range mode, an electronic device, and a storage medium. BACKGROUND With development of a terminal industry, many electronic devices support a high dynamic range (high dynamic range, HDR) photography technology. A huge dynamic range in the real world can be captured and displayed by using the HDR photography technology when a dynamic range available in a typical imaging sensor and display device is limited. A lateral overflow integration capacitor (lateral overflow integration capacitor, LOFIC) HDR mode is an HDR mode in which a dynamic range of a complementary metal oxide semiconductor (complementary metal oxide semiconductor, CMOS) is extended by increasing a lateral overflow capacitor. However, when an electronic device uses the LOFIC HDR mode, in a preview process or a video recording process, a signal-to-noise ratio (signal-to-noise Ratio, SNR) dips from high to low in a transition region of a bright part and a dark part of a picture, which is manifested as a layered signal-to-noise ratio, reducing photographing experience of a user. SUMMARY In view of this, this application provides a method for switching a high dynamic range mode, an electronic device, and a storage medium, to relieve a signal-to-noise ratio dip in a transition region of a bright part and a dark part, thereby improving photographing experience of a user. According to a first aspect, this application provides a method for switching a high dynamic range mode, applied to an electronic device supporting a LOFIC HDR mode and a dual analog gain (dual analog gain, DAG) HDR mode. The method includes: starting a camera running program, obtaining an illumination intensity of an environment in which the electronic device is located, enabling the LOFIC HDR mode, and switching the HDR mode to the DAG HDR mode when the illumination intensity decreases to be less than a first illumination intensity. When a camera photosensitive element (sensor) works in the LOFIC HDR mode, in an existing solution, when an illumination intensity decreases, the LOFIC HDR mode is continuously used. In this case, to ensure picture quality at low brightness, in the LOFIC HDR mode, an exposure gain of a long frame gradually increases, causing a signal-to-noise ratio dip in a transition region of a bright part and a dark part to be gradually apparent. In the solution of this application, instead of remaining the LOFIC HDR mode, the HDR mode is switched to the DAG HDR mode. According to this solution, a feature that both a long frame and a short frame in the DAG HDR mode use a same conversion gain is used. When the illumination intensity decreases to be less than the first illumination intensity, it indicates that the illumination intensity is low. In this case, a signal-to-noise ratio dip in the LOFIC HDR mode is apparent. However, after the DAG HDR mode is used, there is no apparent signal-to-noise ratio dip between the long frame and the short frame in the DAG HDR mode, so that a signal-to-noise ratio dip in a transition region of a bright part and a dark part of an image obtained after the long frame and the short frame are fused is fully relieved, thereby improving photographing experience of a user. In a possible implementation, when the illumination intensity is greater than or equal to the first illumination intensity, the method further includes: when the illumination intensity decreases, controlling an exposure gain in the LOFIC HDR mode to increase as the illumination intensity decreases, and controlling an exposure ratio in the LOFIC HDR mode to decrease as the illumination intensity decreases. In an existing solution, when the illumination intensity decreases, to ensure picture quality at low brightness, an exposure gain of a long frame in the LOFIC HDR mode gradually increases, causing an exposure ratio in the LOFIC HDR mode to increase. In the solution of this embodiment of this application, when the exposure gain in the LOFIC HDR mode increases to ensure the picture quality, the exposure ratio in the LOFIC HDR mode is controlled to decrease as the illumination intensity decreases, so that the exposure ratio in the LOFIC HDR mode is not excessively high before the DAG HDR mode is switched to. Benefits of this are as follows: Before the DAG HDR mode is switched to, an apparent signal-to-noise ratio dip has already occurred in a picture due to an excessively large exposure ratio. In addition, because a pixel circuit in the DAG HDR mode generally does not include a lateral overflow integration capacitor, this may cause a maximum exposure ratio in the DAG HDR mode to be less than a maximum exposure ratio in the LOFIC HDR mode. A sudden change in an exposure ratio during switching of the HDR mode can be reduced or eliminated by reducing the exposure ratio in the LOFIC HDR mode, so that the switching of the HDR mode is more nat