EP-4328852-B1 - METHOD FOR EXPANDING DYNAMIC RANGE OF IMAGE AND ELECTRONIC DEVICE
Inventors
- LEI, Caihua
- WU, LIYOU
- HU, ZHICHENG
- DING, Yue
- SHAO, Tao
- ZHANG, Jiasen
Dates
- Publication Date
- 20260506
- Application Date
- 20230413
Claims (5)
- A method for extending a dynamic range of an image, comprising: obtaining (S101) original image information, wherein the original image information comprises an original image and brightness level information, and the brightness level information is used to indicate a brightness value of a pixel in the original image; obtaining (S102), based on the brightness level information and a brightness threshold, a thresholding segmentation result corresponding to the original image, wherein the thresholding segmentation result corresponding to the original image comprises area class labels corresponding to pixels in the original image, the area class labels are used to indicate classes of areas corresponding to the pixels in the original image, the areas comprise a standard dynamic range area and an extended dynamic range area, a brightness value of a pixel in the standard dynamic range area is less than the brightness threshold, and a brightness value of a pixel in the extended dynamic range area is greater than or equal to the brightness threshold; and associatively storing (S103) the original image and the thresholding segmentation result corresponding to the original image, for subsequently performing dynamic range extension on the extended dynamic range area in the original image based on the thresholding segmentation result corresponding to the original image, to generate an extended dynamic range image corresponding to the original image, wherein a dynamic range of the extended dynamic range image is greater than a dynamic range of the original image, and wherein before the associatively storing the original image and the thresholding segmentation result corresponding to the original image, the method further comprises: assuming that the thresholding segmentation result corresponding to the original image is I, performing downsampling processing on the thresholding segmentation result I corresponding to the original image to obtain a downsampled thresholding segmentation result I' corresponding to the original image; and the associatively storing the original image and the thresholding segmentation result corresponding to the original image comprises: associatively storing the original image and the downsampled thresholding segmentation result I' corresponding to the original image, characterized in that the brightness level information is an exposure image captured in a same scene as the original image, and a photographed object in the exposure image is the same as a photographed object in the original image; a brightness value of each pixel in the exposure image indicates a brightness value of a corresponding pixel in the original image; and the obtaining, based on the brightness level information and a brightness threshold, a thresholding segmentation result corresponding to the original image comprises: obtaining, based on the brightness value of each pixel in the exposure image and the brightness threshold, the thresholding segmentation result corresponding to the original image.
- The method according to claim 1, wherein the obtaining, based on the brightness value of each pixel in the exposure image and the brightness threshold, the thresholding segmentation result corresponding to the original image comprises: determining one brightness threshold based on the brightness value of each pixel in the exposure image, and performing single-level thresholding segmentation on the exposure image based on the one brightness threshold to obtain a thresholding segmentation result corresponding to the original image, wherein the thresholding segmentation result corresponding to the original image comprises area class labels corresponding to pixels in the original image, the area class labels are used to indicate classes of areas corresponding to the pixels in the original image, and the areas comprise one standard dynamic range area and one extended dynamic range area.
- The method according to claim 1, wherein the obtaining, based on the brightness value of each pixel in the exposure image and the brightness threshold, the thresholding segmentation result corresponding to the original image comprises: determining a plurality of brightness thresholds based on the brightness value of each pixel in the exposure image, and performing multi-level thresholding segmentation on the exposure image based on the plurality of brightness thresholds to obtain a thresholding segmentation result corresponding to the original image, wherein the thresholding segmentation result corresponding to the original image comprises area class labels corresponding to pixels in the original image, the area class labels are used to indicate classes of areas corresponding to the pixels in the original image, and the areas comprise one standard dynamic range area and a plurality of levels of extended dynamic range areas.
- The method according to any one of claims 1-3, further comprising: constructing a corresponding brightness histogram based on the brightness value of each pixel in the exposure image, wherein the brightness histogram is used to display quantities of pixels whose brightness values are 0, 1, ..., and 255 in the exposure image, the brightness histogram comprises an x-axis and a y-axis, values on the x axis represent brightness values, which are sequentially 0, 1, ..., and 255, and values on the y-axis represent quantities of pixels; obtaining, based on the brightness histogram, the quantities of pixels whose brightness values are 0, 1, ..., k, ..., and 255 in the exposure image, denoted as y 0 , y 1 , ..., y k , ..., and y 255 , wherein y 0 is a quantity of pixels whose brightness values x are 0 in the exposure image, y 1 is a quantity of pixels whose brightness values x are 1 in the exposure image, y k is a quantity of pixels whose brightness values x are k in the exposure image, and y 255 is a quantity of pixels whose brightness values x are 255 in the exposure image; and adding corresponding quantities of pixels one by one in descending order of brightness values x, and using a brightness value k as the brightness threshold when a total quantity of pixels obtained when the addition reaches the quantity y k of pixels corresponding to the brightness value k is greater than a preset quantity.
- The method according to any one of claims 1-3, further comprising: constructing a corresponding brightness histogram based on the brightness value of each pixel in the exposure image, wherein the brightness histogram is used to display quantities of pixels whose brightness values are 0, 1, ..., and 255 in the exposure image; and determining the brightness threshold based on the brightness histogram by using an OTSU algorithm.
Description
TECHNICAL FIELD This application relates to the image processing field, and in particular, to a method for extending a dynamic range of an image. BACKGROUND Dynamic ranges of an image obtained by a conventional imaging display device and an image that can be displayed by the conventional imaging display device are quite limited. Therefore, an image viewed by a user from the conventional imaging display device is relatively different from that in a real scene, leading to relatively poor user experience. In recent years, with continuous improvement of software and hardware technologies in the display field, use of high dynamic range (High Dynamic Range, HDR) displays is becoming more popularized. Therefore, a dynamic range of the image obtained by the conventional imaging display device needs to be extended to bring a visual effect closer to that in a real scene to a user, to improve user experience. US 2018/232867 A1 discloses an electronic device and an image conversion method of the electronic device. The electronic device comprises: a receiving unit for receiving a first image from a source device; a decoding unit for decoding brightness information of the first image; a converting unit for converting a dynamic range of the first image on the basis of the decoded brightness information, using a mapping function; and a display unit for displaying a second image having the converted dynamic range on a display, wherein the mapping function is a curve function including a plurality of points determined on the basis of the first image, a characteristic of a change in brightness of a display of the source device, and a characteristic of brightness of a scene of the first image. US 2010/085361 A1 discloses an apparatus for enhancing images in consideration of region characteristics. US 2019/347777 A1 discloses a method for generating a high dynamic range image from a low dynamic range image, including: performing grey-level adjustment on a low dynamic range image to be processed in accordance with a preset mapping relationship to obtain an image after the grey-level adjustment, the grey-level adjustment includes inverse-gamma correction and grey-level value increase; selecting a plurality of saturation areas in the image after the grey-level adjustment; performing grey-level enhancement of the saturation areas in the image after the grey-level adjustment, to obtain a target high dynamic range image; and outputting the target high dynamic range image. Document "Fuzzy fusion based high dynamic range imaging using adaptive histogram separation" by CELEBI AYSUN et al., IEEE TRANSACTIONS ON CONSUMER ELECTRONICS, IEEE SERVICE CENTER, NEW YORK, NY, US, vol. 61, no. 1, 1 February 2015 (2015-02-01), pages 119-127, XP011576371, discloses a high dynamic range (HDR) image generation method using a single input image. SUMMARY This application provides a method for extending a dynamic range of an image, as defined in the appended set of claims, to extend a dynamic range of an original image, thereby improving a visual experience effect of a user. To achieve the foregoing objective, the following technical solutions are used in this application: According to a first aspect, this application provides a method for extending a dynamic range of an image. The method includes: obtaining original image information, where the original image information includes an original image and brightness level information, and the brightness level information is used to indicate a brightness value of a pixel in the original image;obtaining, based on the brightness level information included in the original image information and a brightness threshold, a thresholding segmentation result corresponding to the original image, where the thresholding segmentation result includes area class labels corresponding to pixels in the original image, the area class labels are used to indicate classes of areas corresponding to the pixels in the original image, the areas include a standard dynamic range area and an extended dynamic range area, a brightness value corresponding to a pixel in the standard dynamic range area is less than the brightness threshold, and a brightness value corresponding to a pixel in the extended dynamic range area is greater than or equal to the brightness threshold; andassociatively storing the original image and the thresholding segmentation result corresponding to the original image, for subsequently performing dynamic range extension on the extended dynamic range area in the original image based on the thresholding segmentation result corresponding to the original image, to generate an extended dynamic range image corresponding to the original image, where a dynamic range of the extended dynamic range image is greater than a dynamic range of the original image. It should be understood that in the foregoing solution, the thresholding segmentation result corresponding to the original image is obtained based on the brightness level i