Image processing method and device, electronic equipment and storage medium
By receiving user input and target brightness information and adjusting the HDR gain image in Ultra HDR format images, the problem of not being able to edit Ultra HDR images in the prior art is solved, and the image brightness adjustment and image processing capabilities of electronic devices are improved.
Patent Information
- Application Number
- CN202411854483.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-11
AI Technical Summary
The prior art cannot edit images in ultra-high dynamic range (Ultra HDR) format, resulting in users being unable to adjust image brightness, affecting the image processing capabilities of electronic devices.
By receiving user input, obtaining target brightness information, and determining a new HDR gain image based on this information and the original HDR gain image, thereby synthesizing an adjusted Ultra HDR format image.
The editing of Ultra HDR format images is realized, allowing users to adjust the image brightness according to their needs, and improving the image processing capabilities of electronic devices.
Smart Images

Figure CN119810003A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image processing technology, and specifically relates to an image processing method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of electronic device technology and mobile Internet, high-quality images have begun to be favored by users, making more and more users shoot images in Ultra High Dynamic Range (UltraHDR) format through electronic devices. Among them, Ultra HDR format images refer to images in standard formats such as JPG or JPEG with HDR gain images (HDR Gain Map) added to them, so as to achieve higher quality image display.
[0003] In the related art, no method for editing Ultra HDR images is provided, so that users cannot edit images in the Ultra HDR format after taking them, such as adjusting the image brightness, so that users cannot obtain images in the Ultra HDR format that meet their needs, affecting the image processing capabilities of electronic devices. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide an image processing method, device, electronic device and storage medium, which can realize editing of images in Ultra HDR format and improve the image processing capability of electronic devices.
[0005] In a first aspect, an embodiment of the present application provides an image processing method, comprising:
[0006] Receive a first input from a user, where the first input is an input for editing a first image, where the image format of the first image is an ultra-high dynamic range Ultra HDR format, and where the first image is a composite image of a base image and a first HDR gain image;
[0007] In response to a first input, acquiring target brightness information corresponding to a first image;
[0008] Determine a second HDR gain image based on the target brightness information and the first HDR gain image;
[0009] A second image is displayed, where the image format of the second image is Ultra HDR format, and the second image is a composite image of the base image and the second HDR gain image.
[0010] In a second aspect, an embodiment of the present application provides an image processing device, including:
[0011] A receiving module, configured to receive a first input from a user, where the first input is an input for editing a first image, where the image format of the first image is an ultra-high dynamic range Ultra HDR format, and where the first image is a composite image of a base image and a first HDR gain image;
[0012] An acquisition module, configured to acquire target brightness information corresponding to the first image in response to a first input;
[0013] A determination module, configured to determine a second HDR gain image based on target brightness information and the first HDR gain image;
[0014] The display module is used to display a second image, where the image format of the second image is Ultra HDR format, and the second image is a composite image of the base image and the second HDR gain image.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, and when the program or instruction is executed by the processor, the steps of the image processing method shown in the first aspect are implemented.
[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the image processing method shown in the first aspect are implemented.
[0017] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a display interface, the display interface and the processor are coupled, and the processor is used to run programs or instructions to implement the steps of the image processing method shown in the first aspect.
[0018] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the image processing method shown in the first aspect.
[0019] In an embodiment of the present application, in response to a first input from a user, target brightness information corresponding to a first image can be obtained, the first input is an input for editing the first image, the image format of the first image is an ultra-high dynamic range Ultra HDR format, and the first image is a composite image of a base image and a first HDR gain image. Next, based on the target brightness information and the first HDR gain image, a second HDR gain image is determined. Then, the second image is displayed, the image format of the second image is an UltraHDR format, and the second image is a composite image of a base image and a second HDR gain image. In this way, the first HDR gain image in the first image can be adjusted according to the user input to obtain a second HDR gain image, and the second image synthesized by the base image and the second HDR gain image in the first image is used as an adjusted Ultra HDR format image, which can realize editing of an Ultra HDR format image, and display a second image in an Ultra HDR format that meets user needs, thereby improving the image processing capability of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A flowchart of an image processing method provided for some embodiments of the present application;
[0021] Figure 2 A schematic diagram of an image editing interface of an image processing method provided in some embodiments of the present application;
[0022] Figure 3 A schematic diagram of an image editing interface for obtaining target brightness information in an image processing method provided in some embodiments of the present application;
[0023] Figure 4 A schematic diagram of the structure of an image processing device provided in some embodiments of the present application;
[0024] Figure 5 A schematic diagram of the structure of an electronic device provided for some embodiments of the present application;
[0025] Figure 6 A schematic diagram of the hardware structure of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0027] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0028] The Ultra HDR format image adds a gray HDR gain image to the base image in standard format such as JPG or JPEG. When displayed, the layers of the two images are superimposed and mapped, making the image seen by the end user appear richer and more realistic on the HDR display.
[0029] Although Ultra HDR technology can significantly improve the HDR look and feel of images, there is still the problem that the brightness of the displayed Ultra HDR format images cannot be adjusted, which makes it impossible for users to obtain Ultra HDR format images that meet their needs, affecting the image processing capabilities of electronic devices.
[0030] In order to solve the problems in the related art, the embodiments of the present application provide an image processing method, device and electronic device.
[0031] The following is combined with Figures 1 to 6 , the image processing method provided in the embodiment of the present application is described in detail through specific embodiments and their application scenarios.
[0032] First, combine Figure 1 An image processing method provided in an embodiment of the present application is described in detail.
[0033] Figure 1 A flowchart of an image processing method provided for some embodiments of the present application.
[0034] like Figure 1 As shown, the image processing method provided in the embodiment of the present application can be applied to electronic devices. Based on this, the image processing method can include steps 110 and 140 as shown below.
[0035] Step 110, receiving a first input from a user, the first input is an input for editing a first image, the image format of the first image is an ultra-high dynamic range Ultra HDR format, and the first image is a composite image of a base image and a first HDR gain image; Step 120, in response to the first input, acquiring target brightness information corresponding to the first image; Step 130, determining a second HDR gain image based on the target brightness information and the first HDR gain image; Step 140, displaying a second image, the image format of the second image is an Ultra HDR format, and the second image is a composite image of the base image and the second HDR gain image.
[0036] Therefore, according to the user input, the first HDR gain image in the first image can be adjusted to obtain the second HDR gain image, and the second image synthesized by the base image in the first image and the second HDR gain image can be used as the adjusted Ultra HDR format image, so that the Ultra HDR format image can be edited and the second image in the Ultra HDR format that meets the user's needs can be displayed, thereby improving the image processing capability of the electronic device.
[0037] The above steps are described in detail below, as shown below.
[0038] Regarding step 110, in some embodiments of the present application, the first input may be an input to an interface including a first image, wherein the interface including the first image includes but is not limited to an album display interface, a chat interface of an instant messaging application, and an interface for publishing multimedia information.
[0039] In this way, when the aforementioned interface is displayed, the user is given greater freedom to adjust the brightness of images in the Ultra HDR format, thereby improving the convenience of editing images in the Ultra HDR format.
[0040] Regarding step 120 , in some embodiments of the present application, step 120 may specifically include step 1201 and step 1203 .
[0041] Step 1201: In response to a first input, display an image editing interface, where the image editing interface includes a first image and a brightness adjustment control.
[0042] Step 1202: Receive a second input from the user on the brightness adjustment control.
[0043] Step 1203: In response to the second input, determine the brightness information corresponding to the brightness adjustment control adjusted by the user as the target brightness information corresponding to the first image.
[0044] For example, Figure 2As shown, in response to the first input, an image editing interface may be displayed, the image editing interface including a first image 20 and a brightness adjustment control, the brightness adjustment control may be displayed in the image editing interface in the form of at least two options, here, three options, namely a bright brightness adjustment control 21, a balanced brightness adjustment control 22, and a deep brightness adjustment control 23 are used as examples for illustration. When the user clicks 22, the brightness information corresponding to the balanced brightness adjustment control 22 may be set to 0.5 candelas per square meter (cd / m 2 ) is determined as the target brightness information corresponding to the first image. Based on this, the target brightness information in the embodiment of the present application can be understood as the brightness information expected by the user or the brightness information of the brightness adjustment control.
[0045] In addition, the brightness adjustment control in the embodiment of the present application can be displayed in the form of at least two options outside the image editing interface, and can also be displayed in the image editing interface in the form of a brightness progress bar, and its display method is not limited here.
[0046] In some other embodiments of the present application, step 120 may specifically include step 1204, in response to the first input, determining the last target brightness information as the target brightness information corresponding to the first image. The last target brightness information may be the last determined target brightness information or may be preset.
[0047] For example, if the last target brightness information is 0.5, then at this time, 0.5 can be directly used as the target brightness information corresponding to the first image.
[0048] It should be noted that the target brightness information in this embodiment can be the initial target brightness information configured for it, that is, the last target brightness information is displayed as the target brightness information currently corresponding to the first image, and its brightness adjustment control is displayed at the same time, so that the user can manually adjust it to obtain the target brightness information required by the user.
[0049] Regarding step 130 , in some embodiments of the present application, step 130 may specifically include steps 1301 to 1303 .
[0050] Step 1301: determine target picture brightness information based on target brightness information and brightness information of a base image, where the target picture brightness information is used to indicate that pixel value adjustment amounts of pixels in a first HDR gain image are the same.
[0051] Step 1302: Based on the first HDR gain image and the target picture brightness information, determine the brightness dynamic range impact information of the first HDR gain image, where the brightness dynamic range impact information is used to characterize that the pixel value adjustment amounts of the pixel points in the first HDR gain image are different.
[0052] Step 1303: adjust the pixel values of the pixels in the first HDR gain image according to the brightness dynamic range impact information and the target picture brightness information to obtain a second HDR gain image.
[0053] Exemplarily, the method of determining the second HDR gain image in the embodiment of the present application can be determined based on an image enhancement algorithm (Retinex) of the characteristics of the human visual system. The principle of the image enhancement algorithm is specifically as follows.
[0054] First, the pixel value S(x, y) of the pixel point of the first image displayed is the product of the pixel value L(x, y) of the pixel point of the HDR gain image and the pixel value R(x, y) of the pixel point of the base image, that is, the normalized expression is the following formula (1):
[0055] S(x,y)=R(x,y)*L(x,y) (1)
[0056] Among them, S(x,y)∈[0,1], R(x,y)∈[0,1], L(x,y)∈[0,1], and the HDR gain image can be the first HDR gain image.
[0057] Since most image enhancement technologies use the method of removing or adjusting the illumination image component L when improving the dynamic range of an image, such as the multi-scale adaptive gain Retinex technology. Combining the Retinex principle with the image display technology in the Ultra HDR format, when the brightness of the display screen is constant, assuming that the pixel value of the pixel point of the first image viewed by the user is S(x,y), the pixel value of the pixel point can be used to reflect the brightness of the first image. Similarly, the pixel value L(x,y) of the pixel point of the HDR gain image can also reflect the brightness of the HDR gain image, and the pixel value R(x,y) of the pixel point of the base image can also reflect the brightness of the base image. By analogy with the Retinex technology principle, it can be known that by adjusting L(x,y), S(x,y) can be adjusted.
[0058] Based on the above principles, in order to meet the needs of users for autonomous adjustment, the embodiment of the present application proposes a new gainmap adjustment method according to the Retinex principle and the user's need to brighten the overall and details. That is, when displaying a first image in Ultra HDR format, the first HDR gain image in the first image is adaptively adjusted according to the target brightness information input by the user, so as to generate a new HDR gain image, namely, the second HDR gain image, so as to achieve the display effect required by the user.
[0059] From the above formula (1), it can be seen that there are three factors that affect the overall brightness S(x,y) of the image in Ultra HDR format viewed by the user. The first is the set brightness U(x,y) of the normal display screen; the second is the pixel value L(x,y) of the pixel point in the first HDR gain image; and the third is the pixel value R(x,y) of the pixel point in the base image. Since the first set brightness U(x,y) of the display screen and the pixel value R(x,y) of the pixel point in the third base image are fixed when taking pictures, if the screen brightness changes frequently, it will have a certain impact on the user's vision. Therefore, the embodiment of the present application adjusts S(x,y) from the perspective of adjusting L(x,y).
[0060] In order to ensure that when the screen brightness is set to a certain level, the user can manually adjust the overall brightness of the image in Ultra HDR format when viewing it on the display screen, new influencing factors are introduced in the embodiment of the present application, namely, the target picture brightness information U and the brightness dynamic range influence information H.
[0061] The target image brightness information U acts on the illumination component L of the entire image, so that each pixel value receives the same brightness information adjustment, that is, the target image brightness information is used to characterize the pixel value of each pixel point in the first HDR gain image to receive the same adjustment amount. Also, the brightness dynamic range impact information H also acts on the illumination component L, but is used to characterize the pixel value of each pixel point in the first HDR gain image to receive different adjustment amounts, for example, the pixel values of the pixel points in the boundary area with large brightness changes can receive different adjusted brightness.
[0062] Based on this, the embodiment of the present application proposes an improved display of target screen brightness information when the user views an image in Ultra HDR format, and its normalized expression can be transformed into the following formula (2).
[0063] S(x,y)=R(x,y)*(U*L(x,y) H ) (2)
[0064] Where L(x,y) is the pixel value of the pixel in the first HDR gain image. (U*L(x,y) H ) is a second HDR gain image obtained by adjusting the pixel values of the pixels in the first HDR gain image by using the brightness dynamic range influence information and the target picture brightness information, U is the target picture brightness information, and H is the brightness dynamic range influence information.
[0065] Based on the above formula (2), how to determine the target picture brightness information U and the brightness dynamic range impact information H becomes the next focus, as shown below.
[0066] In some embodiments, the target picture brightness information U may be determined by the following steps.
[0067] Among them, the brightness information of the basic image includes the ambient brightness information when the basic image is taken and the camera brightness information of the camera that takes the basic image. For example, the ambient brightness information can be information on ambient brightness during the day, at night, indoors, outdoors, etc., and the camera brightness information can be the light intensity received by the sensor of the camera when taking the image. Based on this, the above step 1301 can specifically include step 13011 and step 13012.
[0068] Step 13011, calculate the basic brightness information of the basic image according to the environment brightness information and the camera brightness information.
[0069] Step 13012: adjust the basic brightness information according to the target brightness information to obtain the target screen brightness information, wherein the brightness value of the target screen brightness information is positively correlated with the brightness value of the environment brightness information.
[0070] For example, considering that the adjustment of U affects the brightness of the entire image, in order to make the image display effect conform to the current actual ambient brightness, so that the user's image has a similar brightness style expectation under a brightness close to the actual ambient brightness, the value of U should be proportional to the current actual ambient brightness.
[0071] To this end, it is necessary to make supplementary adjustments through the ambient brightness information of the basic image. Specifically, when the user takes a photo, the image will record the ambient brightness information of the current environment. Here, the ambient brightness information can be represented by the ambient brightness value lux, that is, represented as La. Different cameras have preset camera brightness information. Here, the upper limit of the available light brightness value lux is represented as Ll. The value of U should meet the following conditions:
[0072]
[0073] Based on this, when the user views the image for the first time, the initial brightness information should be provided for the user to choose to meet the user's customized needs, which are: bright, balanced, and deep. They all have reference target brightness information, and the initial brightness information is bright: 0.75, balanced 0.5, and deep 0.25. However, at the same time, the embodiment of the present application can also select the target brightness information C through the first input. At this time, the value of U should meet the following conditions:
[0074]
[0075] In some embodiments, the brightness dynamic range impact information H may be determined by the following steps.
[0076] Among them, the above step 1302 may specifically include step 13021 and step 13022.
[0077] Step 13021: determine the pixel weight corresponding to the first HDR gain image based on the pixel value of the pixel point in the first HDR gain image, where the pixel weight is used to characterize the discrete degree of the pixel value of the pixel point in the first HDR gain image within a preset range.
[0078] Step 13022: Determine the brightness dynamic range impact information of the first HDR gain image based on the target picture brightness information and pixel weights through an alternating direction minimization algorithm.
[0079] For example, when other values are fixed, for the pixel value L(x,y) of the normalized HDR gain image, the larger the H value, the smaller the S value, which is reflected in the lower brightness of the second image. In order to meet the expansion of the dynamic range, the usual strategy of the camera is to suppress highlights and brighten dark areas. How to determine a suitable H becomes the key.
[0080] In order to achieve pixel-level tuning, the value of the influencing factor H cannot be fixed. In order not to disrupt the relative brightness tendency of each pixel and avoid over-suppression of the highlight area, which becomes darker instead, the initial H is set to 1 / U in the embodiment of the present application. According to the LIME low-light image enhancement algorithm, the solution of H can be transformed into the classic alternating direction minimization algorithm, as shown in the following formula (3):
[0081]
[0082] Where D represents the weight. The larger the value of D, the greater the difference between each value of the final impact factor matrix H(x,y). This is reflected in L(x,y) H The greater the dynamic range, the greater the dynamic range. In order to meet the requirements of dynamic range expansion, the value of D should be inversely proportional to the dynamic range of the current image gainmap. After determining the values of D and U, the value of H in formula (3) can be solved using the alternating direction minimization method.
[0083] Among them, the above process involving determining D can be carried out through the following steps, that is, step 13021 can include steps 130211 to 130214.
[0084] Step 130211, normalize the pixel values of the pixels in the first HDR gain image to obtain normalized pixel values of the first HDR gain image.
[0085] Step 130212, divide the normalized pixel value to obtain N preset pixel intervals, each of the N preset pixel intervals includes at least one normalized pixel value, and N is an integer greater than 1.
[0086] Step 130213, determine the first preset weight value as the weight value of the first preset pixel interval among N preset pixel intervals, and determine the second preset weight value as the weight value of the second preset pixel interval among N preset pixel intervals; wherein, the number of normalized pixel values in the first preset pixel interval is greater than or equal to the first threshold, and the number of normalized pixel values in the second preset pixel interval is less than the first threshold.
[0087] Step 130214: determine the average value of the weight values of N preset pixel intervals as the pixel weight corresponding to the first HDR gain image.
[0088] For example, the pixel weight D can be obtained by the following formula (4):
[0089]
[0090] The normalized pixel values of the normalized first HDR gain image are divided into preset pixel intervals, namely [0, 1 / 3], (1 / 3, 2 / 3], (2 / 3, 1], and each segment corresponds to W1, W2, and W3 respectively. All pixel values in the first HDR gain image are counted. When the proportion of each pixel value in segment i exceeds 1 / 3, W i The value of is 1, otherwise it is 0, that is, W1=1, W2=1, W3=0, then D≈0.6.
[0091] Therefore, according to the user input, the first HDR gain image in the first image can be adjusted to obtain the second HDR gain image, and the second image synthesized by the base image in the first image and the second HDR gain image can be used as the adjusted Ultra HDR format image, so that the Ultra HDR format image can be edited and the second image in the Ultra HDR format that meets the user's needs can be displayed, thereby improving the image processing capability of the electronic device.
[0092] In order to better illustrate the image processing method provided in the embodiment of the present application, the image processing method provided in the embodiment of the present application is illustrated by taking the editing of the first image in the Ultra HDR format in the album as an example.
[0093] Step 1: Set the screen display brightness to a preset brightness. After the user takes a photo for the first time, when opening the photo album application of the electronic device, the user will be prompted to select the desired target brightness information C.
[0094] Step 2, reference Figure 3, users can click the Ultra HDR edit button above the image, select Ultra HDR display adjustment, and a global brightness progress bar will appear, corresponding to the overall brightness of the image. When users adjust the progress bar, they are actually adjusting the value of C.
[0095] Step 3, determining the target picture brightness information U through the target brightness information C and the brightness information of the basic image. This step may be specifically referred to the contents involved in the above step 130, which will not be described again.
[0096] Step 4: determine the pixel weight D corresponding to the first HDR gain image based on the pixel value of the pixel point in the first HDR gain image. This step may refer to the content involved in the above step 1302, which will not be repeated here.
[0097] Step 5: Based on the target brightness information C, the pixel weight D, and the target picture brightness information U, the pixel values of the pixels in the first HDR gain image are adjusted to obtain a second HDR gain image. Here, the parameters for calculating the second HDR gain image can refer to the above formula (2).
[0098] In this way, the embodiments of the present application can, based on the principle of retinex technology, make the dynamic range of images in Ultra HDR format adjustable according to user preferences, and can be combined with adaptive image enhancement technology to adaptively optimize the effect to achieve better display effect, and provide users with the function of adjusting target brightness information when adjusting images in Ultra HDR format. Users can independently adjust the dynamic range of brightness when displaying Ultra HDR pictures according to their preferences. In this way, it is possible to edit images in Ultra HDR format and display a second image in Ultra HDR format that meets user needs, thereby improving the image processing capability of electronic devices.
[0099] It should be noted that the image processing method provided in the embodiments of the present application can be executed by electronic devices such as mobile phones, tablet computers, laptop computers, PDAs, wearable devices, etc. In some embodiments of the present application, the image processing method provided in the embodiments of the present application is described by taking the electronic device as the execution subject to execute the image processing method as an example.
[0100] The image processing method provided in the embodiment of the present application can be executed by an image processing device. In the embodiment of the present application, an image processing device executing the image processing method is taken as an example to illustrate the device of the image processing method provided in the embodiment of the present application.
[0101] The present application also provides an image processing device. Figure 4 Provide detailed explanation.
[0102] Figure 4A schematic diagram of the structure of an image processing device provided in some embodiments of the present application.
[0103] like Figure 4 As shown, the image processing device 40 can be applied to an electronic device, and the image processing device 40 can specifically include:
[0104] The receiving module 401 is used to receive a first input from a user, where the first input is an input for editing a first image, the image format of the first image is an ultra-high dynamic range Ultra HDR format, and the first image is a composite image of a base image and a first HDR gain image;
[0105] An acquisition module 402 is used to acquire target brightness information corresponding to the first image in response to a first input;
[0106] A determination module 403 is used to determine a second HDR gain image based on the target brightness information and the first HDR gain image;
[0107] The display module 404 is used to display a second image. The image format of the second image is Ultra HDR format. The second image is a composite image of the base image and the second HDR gain image.
[0108] The image processing device 30 in the embodiment of the present application is described in detail below, as shown below.
[0109] In some embodiments of the present application, the determination module 403 is specifically used to determine the target picture brightness information based on the target brightness information and the brightness information of the base image, where the target picture brightness information is used to characterize that the pixel value adjustment amount of each pixel point in the first HDR gain image is the same;
[0110] Based on the first HDR gain image and the target picture brightness information, determining brightness dynamic range impact information of the first HDR gain image, where the brightness dynamic range impact information is used to characterize that pixel value adjustment amounts of pixel points in the first HDR gain image are different;
[0111] The pixel values of the pixels in the first HDR gain image are adjusted according to the brightness dynamic range influence information and the target picture brightness information to obtain the second HDR gain image.
[0112] In some embodiments of the present application, the determination module 403 is specifically used to calculate the basic brightness information of the basic image according to the ambient brightness information and the camera brightness information when the brightness information of the basic image includes the ambient brightness information when the basic image is captured and the camera brightness information of the camera that captures the basic image;
[0113] The basic brightness information is adjusted according to the target brightness information to obtain the target picture brightness information.
[0114] In some embodiments of the present application, the determination module 403 is specifically used to determine the pixel weight corresponding to the first HDR gain image based on the pixel value of the pixel point in the first HDR gain image, and the pixel weight is used to characterize the discrete degree of the pixel value of the pixel point in the first HDR gain image within a preset range;
[0115] The brightness dynamic range impact information of the first HDR gain image is determined based on the target picture brightness information and pixel weights through an alternating direction minimization algorithm.
[0116] In some embodiments of the present application, the determination module 403 is specifically used to normalize the pixel values of the pixels in the first HDR gain image to obtain the normalized pixel values of the first HDR gain image;
[0117] Dividing the normalized pixel value to obtain N preset pixel intervals, each of the N preset pixel intervals includes at least one normalized pixel value, and N is an integer greater than 1;
[0118] Determine the first preset weight value as the weight value of the first preset pixel interval among the N preset pixel intervals, and determine the second preset weight value as the weight value of the second preset pixel interval among the N preset pixel intervals; wherein the number of normalized pixel values in the first preset pixel interval is greater than or equal to the first threshold, and the number of normalized pixel values in the second preset pixel interval is less than the first threshold;
[0119] An average value of the weight values of the N preset pixel intervals is determined as the pixel weight corresponding to the first HDR gain image.
[0120] In some embodiments of the present application, the display module 404 is further configured to, in response to the first input, display an image editing interface, the image editing interface including the first image and a brightness adjustment control;
[0121] The receiving module 401 is further used to receive a second input of the user to the brightness adjustment control;
[0122] The determination module 403 is further configured to, in response to the second input, determine the brightness information corresponding to the brightness adjustment control adjusted by the user as the target brightness information corresponding to the first image.
[0123] In some embodiments of the present application, the determination module 403 is further configured to, in response to the first input, determine the last target brightness information as the target brightness information corresponding to the first image.
[0124] The image processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0125] The image processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0126] The image processing device provided in the embodiment of the present application can achieve Figures 1 to 3 The various processes implemented in the illustrated embodiment of the image processing method achieve the same technical effect, and will not be described again here to avoid repetition.
[0127] Based on this, the image processing device provided in the embodiment of the present application can obtain the target brightness information corresponding to the first image in response to the first input of the user, the first input is the input for editing the first image, the image format of the first image is the ultra-high dynamic range Ultra HDR format, and the first image is a composite image of the base image and the first HDR gain image. Then, based on the target brightness information and the first HDR gain image, the second HDR gain image is determined. Then, the second image is displayed, the image format of the second image is the Ultra HDR format, and the second image is a composite image of the base image and the second HDR gain image. In this way, the first HDR gain image in the first image can be adjusted according to the user input to obtain the second HDR gain image, and the second image synthesized by the base image and the second HDR gain image in the first image is used as the adjusted Ultra HDR format image, so that the image in the Ultra HDR format can be edited, and the second image in the UltraHDR format that meets the user's needs can be displayed, thereby improving the image processing capability of the electronic device.
[0128] Optional, such as Figure 5 As shown, an embodiment of the present application further provides an electronic device 50, including a processor 501 and a memory 502, wherein the memory 502 stores programs or instructions that can be executed on the processor 501, and when the program or instructions are executed by the processor 501, the various steps of the above-mentioned image processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0129] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0130] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
[0131] The electronic device 600 includes but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610 and other components.
[0132] Those skilled in the art will appreciate that the electronic device 600 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 610 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system.
[0133] Figure 6The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0134] Among them, in the embodiment of the present application, the user input unit 607 is used to receive a first input from the user, the first input is an input for editing a first image, the image format of the first image is an ultra-high dynamic range Ultra HDR format, and the first image is a composite image of a base image and a first HDR gain image. The processor 610 is used to obtain target brightness information corresponding to the first image in response to the first input. The processor 610 can also be used to determine a second HDR gain image based on the target brightness information and the first HDR gain image. The display unit 606 is used to display a second image, the image format of the second image is an Ultra HDR format, and the second image is a composite image of the base image and the second HDR gain image.
[0135] The electronic device 600 is described in detail below, as shown below.
[0136] In some embodiments of the present application, the processor 610 is specifically used to determine target picture brightness information based on the target brightness information and the brightness information of the base image, where the target picture brightness information is used to represent that the pixel value adjustment amount of each pixel point in the first HDR gain image is the same;
[0137] Based on the first HDR gain image and the target picture brightness information, determining the brightness dynamic range influence information of the first HDR gain image, where the brightness dynamic range influence information is used to characterize that the pixel value adjustment amount of each pixel point in the first HDR gain image is different;
[0138] The pixel values of the pixels in the first HDR gain image are adjusted according to the brightness dynamic range influence information and the target picture brightness information to obtain the second HDR gain image.
[0139] In some embodiments of the present application, the processor 610 is specifically configured to, when the brightness information of the basic image includes the ambient brightness information when the basic image is captured and the camera brightness information of the camera that captures the basic image, calculate the basic brightness information of the basic image according to the ambient brightness information and the camera brightness information;
[0140] The basic brightness information is adjusted according to the target brightness information to obtain the target picture brightness information.
[0141] In some embodiments of the present application, the processor 610 is specifically used to determine a pixel weight corresponding to the first HDR gain image based on a pixel value of a pixel point in the first HDR gain image, where the pixel weight is used to characterize a discrete degree of a pixel value of a pixel point in the first HDR gain image within a preset range;
[0142] The brightness dynamic range impact information of the first HDR gain image is determined based on the target picture brightness information and pixel weights through an alternating direction minimization algorithm.
[0143] In some embodiments of the present application, the processor 610 is specifically configured to normalize the pixel values of the pixels in the first HDR gain image to obtain normalized pixel values of the first HDR gain image;
[0144] Dividing the normalized pixel value to obtain N preset pixel intervals, each of the N preset pixel intervals includes at least one normalized pixel value, and N is an integer greater than 1;
[0145] Determine the first preset weight value as the weight value of the first preset pixel interval among the N preset pixel intervals, and determine the second preset weight value as the weight value of the second preset pixel interval among the N preset pixel intervals; wherein the number of normalized pixel values in the first preset pixel interval is greater than or equal to the first threshold, and the number of normalized pixel values in the second preset pixel interval is less than the first threshold;
[0146] An average value of the weight values of the N preset pixel intervals is determined as the pixel weight corresponding to the first HDR gain image.
[0147] In some embodiments of the present application, the display unit 606 is further configured to, in response to the first input, display an image editing interface, the image editing interface including the first image and a brightness adjustment control;
[0148] The user input unit 607 is also used to receive a second input of the user to the brightness adjustment control;
[0149] The processor 610 is further configured to, in response to the second input, determine brightness information corresponding to the user adjusting the brightness adjustment control as target brightness information corresponding to the first image.
[0150] In some embodiments of the present application, the processor 610 is further configured to, in response to the first input, determine the last target brightness information as the target brightness information corresponding to the first image.
[0151] It should be understood that the input unit 604 may include a graphics processing unit (GPU) 6041 and a microphone 6042, and the graphics processor 6041 processes the image data of a static image or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 606 may include a display panel, and the display panel may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 607 includes a touch panel 6071 and at least one of other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts: a touch detection device and a touch display. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as a volume display button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0152] The memory 609 can be used to store software programs and various data. The memory 609 can mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area can store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 609 can include a volatile memory or a non-volatile memory, or the memory 609 can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 609 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0153] The processor 610 may include one or more processing units; optionally, the processor 610 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless display signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 610.
[0154] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned image processing method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0155] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0156] In addition, an embodiment of the present application further provides a chip, which includes a processor and a display interface, the display interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned image processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0157] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0158] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned image processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0159] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0160] In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
[0161] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0162] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An image processing method, characterized in that: include: Receive a first input from a user, where the first input is an input for editing a first image, where the image format of the first image is an ultra-high dynamic range Ultra HDR format, and where the first image is a composite image of a base image and a first HDR gain image; In response to the first input, acquiring target brightness information corresponding to the first image; Determine a second HDR gain image based on the target brightness information and the first HDR gain image; A second image is displayed, where the image format of the second image is the Ultra HDR format, and the second image is a composite image of the base image and the second HDR gain image.
2. The method according to claim 1, characterized in that The determining a second HDR gain image based on the target brightness information and the first HDR gain image includes: Determine target picture brightness information based on the target brightness information and the brightness information of the base image, wherein the target picture brightness information is used to indicate that pixel value adjustment amounts of pixel points in the first HDR gain image are the same; Based on the first HDR gain image and the target picture brightness information, determining brightness dynamic range impact information of the first HDR gain image, wherein the brightness dynamic range impact information is used to characterize that pixel value adjustment amounts of pixel points in the first HDR gain image are different; The pixel values of the pixels in the first HDR gain image are adjusted according to the brightness dynamic range impact information and the target picture brightness information to obtain the second HDR gain image.
3. The method according to claim 2, characterized in that The brightness information of the basic image includes the brightness information of the environment when the basic image is captured and the camera brightness information of the camera that captures the basic image; The step of determining target picture brightness information based on the target brightness information and the brightness information of the basic image includes: Calculating basic brightness information of the basic image according to the environment brightness information and the camera brightness information; The basic brightness information is adjusted according to the target brightness information to obtain the target picture brightness information.
4. The method according to claim 2, characterized in that: The determining, based on the first HDR gain image and the target picture brightness information, brightness dynamic range impact information of the first HDR gain image includes: Determine a pixel weight corresponding to the first HDR gain image based on the pixel value of the pixel point in the first HDR gain image, wherein the pixel weight is used to characterize the degree of discreteness of the pixel value of the pixel point in the first HDR gain image within a preset range; The brightness dynamic range impact information of the first HDR gain image is determined based on the target picture brightness information and the pixel weight through an alternating direction minimization algorithm.
5. The method according to claim 4, characterized in that The determining, based on the pixel values of the pixels in the first HDR gain image, the pixel weights corresponding to the first HDR gain image comprises: Normalizing pixel values of pixels in the first HDR gain image to obtain normalized pixel values of the first HDR gain image; Dividing the normalized pixel value to obtain N preset pixel intervals, each of the N preset pixel intervals includes at least one normalized pixel value, and N is an integer greater than 1; Determine a first preset weight value as a weight value of a first preset pixel interval among the N preset pixel intervals, and determine a second preset weight value as a weight value of a second preset pixel interval among the N preset pixel intervals; wherein the number of normalized pixel values in the first preset pixel interval is greater than or equal to a first threshold, and the number of normalized pixel values in the second preset pixel interval is less than the first threshold; An average value of the weight values of the N preset pixel intervals is determined as a pixel weight corresponding to the first HDR gain image.
6. The method according to claim 1, characterized in that The step of acquiring target brightness information corresponding to the first image in response to the first input includes: In response to the first input, displaying an image editing interface, the image editing interface including the first image and a brightness adjustment control; receiving a second input of the brightness adjustment control by a user; In response to the second input, brightness information corresponding to the user adjusting the brightness adjustment control is determined as target brightness information corresponding to the first image.
7. The method according to claim 1, characterized in that The step of acquiring target brightness information corresponding to the first image in response to the first input includes: In response to the first input, the last target brightness information is determined as the target brightness information corresponding to the first image.
8. An image processing device, characterized in that: include: A receiving module, configured to receive a first input from a user, where the first input is an input for editing a first image, where the image format of the first image is an ultra-high dynamic range Ultra HDR format, and where the first image is a composite image of a base image and a first HDR gain image; an acquisition module, configured to acquire target brightness information corresponding to the first image in response to the first input; A determination module, configured to determine a second HDR gain image based on the target brightness information and the first HDR gain image; The display module is used to display a second image, where the image format of the second image is the Ultra HDR format, and the second image is a composite image of the base image and the second HDR gain image.
9. The device according to claim 8, characterized in that The determination module is specifically used to determine target picture brightness information based on the target brightness information and the brightness information of the base image, wherein the target picture brightness information is used to indicate that the pixel value adjustment amounts of the pixel points in the first HDR gain image are the same; Based on the first HDR gain image and the target picture brightness information, determining brightness dynamic range impact information of the first HDR gain image, wherein the brightness dynamic range impact information is used to characterize that pixel value adjustment amounts of pixel points in the first HDR gain image are different; The pixel values of the pixels in the first HDR gain image are adjusted according to the brightness dynamic range impact information and the target picture brightness information to obtain the second HDR gain image.
10. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the image processing method according to any one of claims 1 to 7 are implemented.