CN108307109B - High dynamic range image preview method and terminal equipment - Google Patents

High dynamic range image preview method and terminal equipment Download PDF

Info

Publication number
CN108307109B
CN108307109B CN201810040716.2A CN201810040716A CN108307109B CN 108307109 B CN108307109 B CN 108307109B CN 201810040716 A CN201810040716 A CN 201810040716A CN 108307109 B CN108307109 B CN 108307109B
Authority
CN
China
Prior art keywords
image
target exposure
preview
values
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810040716.2A
Other languages
Chinese (zh)
Other versions
CN108307109A (en
Inventor
肖旭
刘小东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201810040716.2A priority Critical patent/CN108307109B/en
Publication of CN108307109A publication Critical patent/CN108307109A/en
Application granted granted Critical
Publication of CN108307109B publication Critical patent/CN108307109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors

Abstract

The embodiment of the invention discloses a high dynamic range image preview method and terminal equipment, relates to the technical field of communication, and can solve the problem that in the prior art, only after photographing is finished and a final photographed image is displayed, the HDR synthesis effect can be seen. The specific scheme is as follows: in the shooting preview process, acquiring an initial preview image output by an image sensor; acquiring N target exposure gains; controlling each image processor in the N image processors to adjust the exposure gain of the initial preview image according to one target exposure gain in the N target exposure gains respectively to generate N frames of intermediate preview images; carrying out image processing on the N frames of intermediate preview images to generate high dynamic range images, and outputting the high dynamic range images to a shooting preview interface; the initial preview image output from the image sensor is respectively transmitted to each image processor, N target exposure gains are used for adjusting the exposure gain of the initial preview image, and N is an integer larger than 2.

Description

High dynamic range image preview method and terminal equipment
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a high dynamic range image preview method and terminal equipment.
Background
Currently, a user can take a picture using a High-Dynamic Range (HDR) mode of a camera of a terminal device. Specifically, after the user opens the HDR mode of the camera of the terminal device and clicks the photographing key, the terminal device may be triggered to acquire images corresponding to three different exposure gains by using three preset exposure gains (e.g., 0, +2, and-2), and the acquired three images are synthesized, compressed, and the like to obtain a photo with an HDR effect, and then the photo with the HDR effect is displayed on the interface of the terminal device.
As can be seen, in the prior art, the user can only see the HDR composition effect when the final captured image is displayed after clicking the capture button and completing the capture.
Disclosure of Invention
The embodiment of the invention provides a high dynamic range image preview method and terminal equipment, and aims to solve the problem that in the prior art, only after photographing is finished and a final photographed image is displayed, the HDR synthesis effect can be seen.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a method for previewing an image with a high dynamic range, where the method for previewing an image with a high dynamic range includes: in the shooting preview process, acquiring an initial preview image output by an image sensor; acquiring N target exposure gains; controlling each image processor in the N image processors to adjust the exposure gain of the initial preview image according to one target exposure gain in the N target exposure gains respectively to generate N frames of intermediate preview images; carrying out image processing on the N frames of intermediate preview images to generate high dynamic range images, and outputting the high dynamic range images to a shooting preview interface; the initial preview image output from the image sensor is respectively transmitted to each image processor, N target exposure gains are used for adjusting the exposure gain of the initial preview image, and N is an integer greater than 2; in the case where N is 3, acquiring N target exposure gains includes: acquiring three brightness values of three areas in an initial preview image, wherein the three brightness values comprise a first brightness value of a first type area and two second brightness values of a second type area; for each second brightness value in the two second brightness values, determining a target exposure gain according to the first brightness value and the second brightness value to obtain two target exposure gains; determining the exposure gain corresponding to the first brightness value and the two target exposure gains as N target exposure gains; wherein, the three areas correspond to the three brightness values one by one; the first-class area is an area of which the brightness values in the three areas are within a first preset range, the second-class area comprises a bright area and a dark area, the bright area is an area of which the brightness values in the three areas are within a second preset range, and the dark area is an area of which the brightness values in the three areas are within a third preset range; the values in the first preset range are all larger than the values in the third preset range, and the values in the first preset range are all smaller than the values in the second preset range.
In a second aspect, an embodiment of the present invention provides a terminal device, where the terminal device includes: the device comprises an acquisition unit, a control unit and a processing unit. The acquisition unit is used for acquiring an initial preview image output by the image sensor in the shooting preview process. And the acquisition unit is also used for acquiring N target exposure gains. And the control unit is used for controlling each image processor in the N image processors to adjust the exposure gain of the initial preview image according to one target exposure gain in the N target exposure gains acquired by the acquisition unit respectively, and generating an N-frame intermediate preview image. And the processing unit is used for carrying out image processing on the N frames of intermediate preview images obtained by the control unit, generating high dynamic range images and outputting the high dynamic range images to a shooting preview interface. The initial preview image output from the image sensor is respectively transmitted to each image processor, N target exposure gains are used for adjusting the exposure gain of the initial preview image, and N is an integer greater than 2; in the case where N is 3, the obtaining unit is specifically configured to: acquiring three brightness values of three areas in an initial preview image, wherein the three brightness values comprise a first brightness value of a first type area and two second brightness values of a second type area; for each second brightness value in the two second brightness values, determining a target exposure gain according to the first brightness value and the second brightness value to obtain two target exposure gains; determining the exposure gain corresponding to the first brightness value and the two target exposure gains as N target exposure gains; wherein, the three areas correspond to the three brightness values one by one; the first-class area is an area of which the brightness values in the three areas are within a first preset range, the second-class area comprises a bright area and a dark area, the bright area is an area of which the brightness values in the three areas are within a second preset range, and the dark area is an area of which the brightness values in the three areas are within a third preset range; the values in the first preset range are all larger than the values in the third preset range, and the values in the first preset range are all smaller than the values in the second preset range.
In a third aspect, an embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored on the memory and operable on the processor, and when executed by the processor, the terminal device implements the steps of the high dynamic range image preview method according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the high dynamic range image preview method according to the first aspect.
In the embodiment of the invention, in the process of shooting and previewing by the terminal equipment, each image processor in the N image processors can be controlled to adjust the exposure gain of the initial preview image according to one target exposure gain in the N target exposure gains respectively, and finally a high-dynamic-range image is generated and output to the shooting and previewing interface, so that the effect that each frame of image output to the previewing interface has the effect after HDR processing is realized, and real-time HDR is realized.
Drawings
Fig. 1 is a schematic structural diagram of an android operating system according to an embodiment of the present invention;
FIG. 2 is a flowchart of a high dynamic range image preview method according to an embodiment of the present invention;
FIG. 3 is a second flowchart of a high dynamic range image preview method according to an embodiment of the present invention;
FIG. 4 is a third flowchart of a high dynamic range image previewing method according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a high dynamic range image preview method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a hardware structure of a terminal device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first" and "second," and the like, in the description and in the claims of embodiments of the present invention are used for distinguishing between different objects and not for describing a particular order of the objects. For example, the first luminance value and the second luminance value, etc. are for distinguishing different luminance values, not for describing a specific order of luminance values. In the description of the embodiments of the present invention, the meaning of "a plurality" means two or more unless otherwise specified.
The term "and/or" herein is an association relationship describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. The symbol "/" herein denotes a relationship in which the associated object is or, for example, a/B denotes a or B.
In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
The embodiment of the invention provides a high dynamic range image preview method and terminal equipment, which can be applied to the process of displaying an initial preview image on a preview interface by the terminal equipment.
The terminal device in the embodiment of the present invention may be a terminal device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present invention are not limited in particular.
The following describes a software environment applied to the high dynamic range image preview method provided by the embodiment of the present invention, taking an android operating system as an example.
Fig. 1 is a schematic diagram of an architecture of a possible android operating system according to an embodiment of the present invention. In fig. 1, the architecture of the android operating system includes 4 layers, which are respectively: an application layer, an application framework layer, a system runtime layer, and a kernel layer (specifically, a Linux kernel layer).
The application program layer comprises various application programs (including system application programs and third-party application programs) in an android operating system.
The application framework layer is a framework of the application, and a developer can develop some applications based on the application framework layer under the condition of complying with the development principle of the framework of the application.
The system runtime layer includes libraries (also called system libraries) and android operating system runtime environments. The library mainly provides various resources required by the android operating system. The android operating system running environment is used for providing a software environment for the android operating system.
The kernel layer is an operating system layer of an android operating system and belongs to the bottommost layer of an android operating system software layer. The kernel layer provides kernel system services and hardware-related drivers for the android operating system based on the Linux kernel.
Taking an android operating system as an example, in the embodiment of the present invention, a developer may develop a software program for implementing the high dynamic range image preview method provided in the embodiment of the present invention based on the system architecture of the android operating system shown in fig. 1, so that the high dynamic range image preview method may operate based on the android operating system shown in fig. 1. Namely, the processor or the terminal device can implement the high dynamic range image preview method provided by the embodiment of the invention by running the software program in the android operating system.
In a first embodiment of the present invention, fig. 2 illustrates a high dynamic range image preview method provided in an embodiment of the present invention, which may be applied to a terminal device having an android operating system as illustrated in fig. 1. As shown in fig. 2, the high dynamic range image preview method includes steps 201 to 204:
step 201, in the process of shooting and previewing, the terminal device acquires an initial preview image output by the image sensor.
For example, in the embodiment of the present invention, a user may open a "camera" by performing a click/press operation on a "camera" application of a terminal device to trigger the terminal device to display a shooting preview interface, and acquire an initial preview image through an image sensor of the terminal device, so that the terminal device displays the acquired initial preview image on the shooting preview interface.
Optionally, in the embodiment of the present invention, the shooting preview interface of the terminal device may be a shooting preview interface in an HDR shooting mode.
In the embodiment of the invention, after a user opens a camera of the terminal device, the user can perform a first input on a shooting interface of the terminal device to trigger the terminal device to display a shooting preview interface in the HDR shooting mode.
Illustratively, the user can trigger the terminal device to display the shooting preview interface in the HDR shooting mode by making a first input to an "HDR" icon on the shooting interface of the terminal device.
Optionally, in the embodiment of the present invention, the first input may be a click/press operation of a user on the terminal device, where the click operation may be a single click operation or a double click operation, and the like.
In the embodiment of the invention, the terminal equipment displays the shooting preview interface in the HDR shooting mode, and acquires the initial preview image through the camera of the terminal equipment, so that the terminal equipment displays the initial preview image on the shooting preview interface in the HDR shooting mode.
Step 202, the terminal device obtains N target exposure gains.
And N target exposure gains are used for adjusting the exposure gain of the initial preview image, and N is an integer larger than 2.
In the embodiment of the invention, when the terminal equipment detects that the initial preview image is displayed on the shooting preview interface, the terminal equipment can acquire the N target exposure gains so as to change the exposure gain of the initial preview image.
Optionally, in the embodiment of the present invention, the terminal device may obtain the N target exposure gains through three ways.
It should be noted that, in the embodiment of the present invention, the above-mentioned "acquiring N target exposure gains" may be implemented in different manners. The following specifically describes the process of acquiring N target exposure gains provided by the embodiment of the present invention by taking three possible manners (for example, the first possible implementation manner, the second possible implementation manner, and the third possible implementation manner described below) as examples.
Optionally, in a first possible implementation manner of the embodiment of the present invention, with reference to fig. 2, as shown in fig. 3, the step 202 may specifically be implemented by a step 202 a:
step 202a, the terminal device obtains N target exposure gains pre-stored in the terminal device.
Wherein, the value of each target exposure gain in the N target exposure gains is different.
For example, after acquiring the initial preview image output by the image sensor, the terminal device may determine N pre-stored target exposure gains as the N adopted target exposure gains when adjusting the exposure gain of the initial preview image.
For example, the terminal device stores in advance N (N ═ 3) target exposure gains of 0, +2, and-2, respectively, and determines the exposure gains of 0, +2, and-2 as the N target exposure gains to be employed when adjusting the exposure gain of the initial preview image.
Optionally, in this embodiment of the present invention, in a second possible implementation manner, the integer N may be an odd number greater than 2, and in a case that N is 3, as shown in fig. 4, with reference to fig. 2, the step 202 may specifically be implemented by steps 202b to 202 d:
step 202b, the terminal device acquires three brightness values of three areas in the initial preview image.
The three brightness values comprise a first brightness value of the first type area and two second brightness values of the second type area, and the three areas correspond to the three brightness values one to one. The first-class area is an area of which the brightness values in the three areas are within a first preset range, the second-class area comprises a bright area and a dark area, the bright area is an area of which the brightness values in the three areas are within a second preset range, and the dark area is an area of which the brightness values in the three areas are within a third preset range; the values in the first preset range are all larger than the values in the third preset range, and the values in the first preset range are all smaller than the values in the second preset range.
In the embodiment of the present invention, the terminal device may obtain the brightness value of each of the three regions in the initial preview image to obtain three brightness values.
Illustratively, the brightness value is represented by m, the first preset range may be j1 ≦ m ≦ k1, the second preset range k2< m ≦ p, and the third preset range i ≦ m < j2, where j2 ≦ j1, and k2 ≧ k 1.
Optionally, in this embodiment of the present invention, the first-type region may be a normal region (i.e., a region of the three regions whose luminance values are within a first preset range).
Illustratively, the terminal device detects that the brightness value m of the first region in the initial preview image is x, and j1 is ≦ x ≦ k1, and then the terminal device determines that the first region is a normal region, that is, the brightness value of the normal region in the initial preview image is x; the terminal device detects that the luminance value m of the second region in the initial preview image is y, and i is not less than y and is less than j2, and the terminal device determines that the region is a dark region, that is, the luminance value of the dark region in the initial preview image is y; the terminal device detects that the brightness value m of a third area in the initial preview image is equal to z, and k2< z is equal to or less than p, and the terminal device determines that the area is a bright area, that is, the brightness value of the bright area in the initial preview image is z; the terminal device can obtain three luminance values (i.e., x, y, and z).
In the embodiment of the present invention, the first luminance value is a luminance value x of a normal area among the three luminance values. The two second luminance values are a luminance value y of a dark area and a luminance value z of a bright area, respectively.
It is understood that, in the embodiment of the present invention, the first brightness value is a reference brightness value, and the exposure gain corresponding to the reference brightness value is 0, that is, the exposure gain corresponding to the first brightness value is 0.
Step 202c, for each second brightness value of the two second brightness values, the terminal device determines a target exposure gain according to the first brightness value and the second brightness value, so as to obtain two target exposure gains.
For example, the terminal device may determine a target exposure gain a according to the luminance value x (i.e., a first luminance value) of the normal region and the luminance value y (i.e., a second luminance value) of the dark region; the terminal device may determine a target exposure gain b based on the luminance value x of the normal area and the luminance value z of the bright area (i.e., a second luminance value) to obtain two target exposure gains (i.e., a and b).
For example, as shown in table 1, an example of a correspondence table between the luminance value and the target exposure gain of each of the three regions (i.e., the normal region, the dark region, and the bright region) provided by the embodiment of the present invention is given in a table manner.
TABLE 1
Figure GDA0002383719450000051
Optionally, in the embodiment of the present invention, the step 202c may be specifically implemented by the step 202 c':
step 202 c', for each of the two second luminance values, the terminal device determines an exposure gain corresponding to a difference between the first luminance value and the second luminance value as a target exposure gain to obtain two target exposure gains.
In this embodiment of the present invention, the terminal device may determine, as a target exposure gain, an exposure gain used when one second luminance value is adjusted to the first luminance value.
For example, the terminal device may determine the exposure gain used when the brightness value y of the dark area is adjusted to the brightness value x of the normal area as a target exposure gain a; the terminal device may determine the exposure gain used when the luminance value z of the bright area is adjusted to the luminance value x of the normal area as a target exposure gain b.
For example, as shown in table 1, the terminal device may determine an exposure gain corresponding to a difference x-y between a luminance value x of the normal area and a luminance value y of the dark area as a target exposure gain a; the terminal device may determine an exposure gain corresponding to a difference x-z between the luminance value x of the normal area and the luminance value z of the bright area as one target exposure gain b to obtain two target exposure gains (i.e., a and b).
For example, assume that the luminance value x of the normal area is 6, the luminance value y of the dark area is 4, and the luminance value z of the bright area is 8. The terminal device may determine an exposure gain +2 corresponding to x-y-6-4-2 as a target exposure gain a (i.e., a-2); the terminal device may determine an exposure gain-2 corresponding to x-z-6-8-2 as one target exposure gain b (i.e., b-2).
Step 202d, the terminal device determines the exposure gain corresponding to the first brightness value and the two target exposure gains as N target exposure gains.
For example, the terminal device may determine exposure gain 0, one target exposure gain a (e.g., a ═ 2), and one target exposure gain b (e.g., b ═ 2) corresponding to the first luminance value as three target exposure gains.
Optionally, in an embodiment of the present invention, in a third possible implementation manner, with reference to fig. 2, as shown in fig. 5, the step 202 may specifically be implemented by a step 202e and a step 202 f:
step 202e, the terminal device receives N-1 target exposure gains input by the user based on the preset exposure gain.
For example, after the user triggers the terminal device to display the shooting preview interface in the HDR shooting mode, the user may input N-1 target exposure gains on the shooting preview interface based on the preset exposure gains.
Optionally, in the embodiment of the present invention, the preset exposure gain may be 0.
For example, the user inputs two target exposure gains as an example. The user inputs a target exposure gain (e.g., +2) greater than the preset exposure gain 0 on the photographing preview interface, and then inputs a target exposure gain (e.g., -2) less than the preset exposure gain 0 on the photographing preview interface.
Step 202f, the terminal device determines the preset exposure gain and the N-1 target exposure gains as N target exposure gains.
For example, after the user inputs two target exposure gains (e.g., +2 and-2) based on the preset exposure gain, the terminal device may determine 0, +2, and-2 as three target exposure gains according to the input of the user.
And step 203, the terminal equipment controls each image processor in the N image processors to adjust the exposure gain of the initial preview image according to one target exposure gain in the N target exposure gains respectively, and generates an N-frame intermediate preview image.
In the embodiment of the invention, the terminal equipment can adjust the exposure gain of the initial preview image through one image processor corresponding to each target exposure gain in the N target exposure gains to obtain the N frames of intermediate preview images.
Illustratively, N target exposure gains are illustrated as three target exposure gains (e.g., 0, +2, -2). As shown in table 2, an example of a table of correspondence between the target exposure gain, the image processor, and the intermediate preview image provided by the embodiment of the present invention is given in a table manner.
TABLE 2
Figure GDA0002383719450000061
As can be seen from table 2, the terminal device adjusts the exposure gain of the initial preview image through the first image processor corresponding to the target exposure gain 0, and obtains a frame of initial preview image after the exposure gain is adjusted, that is, the intermediate preview image 1; the terminal equipment adjusts the exposure gain of the initial preview image through a second image processor corresponding to the target exposure gain +2 to obtain a frame of initial preview image after the exposure gain is adjusted, namely an intermediate preview image 2; and the terminal equipment adjusts the exposure gain of the initial preview image through a third image processor corresponding to the target exposure gain-2 to obtain a frame of initial preview image after the exposure gain is adjusted, namely the intermediate preview image 3.
It can be understood that, in the embodiment of the present invention, the terminal device may first perform processing such as auto-focus, auto-exposure, auto-white balance, etc. on the initial preview image through N image processors of the terminal device, and then control each image processor of the N image processors to adjust the exposure gain of the processed initial preview image according to one target exposure gain of the N target exposure gains, respectively.
And step 204, the terminal equipment performs image processing on the N frames of intermediate preview images to generate high dynamic range images, and outputs the high dynamic range images to a shooting preview interface.
In the embodiment of the invention, the terminal equipment can perform mosaic, sharpening, noise reduction, color conversion, synthesis and compression on the N frames of intermediate preview images to obtain the high dynamic range image.
For example, the terminal device may perform mosaic processing, sharpening processing, noise reduction processing, color conversion processing, synthesis processing, compression processing, and the like on the intermediate preview image 1, the intermediate preview image 2, and the intermediate preview image 3 to obtain a frame of high dynamic range image.
For example, the terminal device may perform mosaic, sharpening, noise reduction, color conversion, and the like on the N frames of intermediate preview images to obtain N frames of intermediate preview images in the YUV format, then the terminal device synthesizes the N frames of intermediate preview images in the YUV format into one frame of intermediate preview image in the YUV format by using a preset algorithm (e.g., an HDR algorithm), and converts the one frame of intermediate preview image in the YUV format into one frame of intermediate preview image in a Joint Photographic Experts Group (JPEG) format by using a preset format conversion and encoding algorithm.
In the embodiment of the invention, after the terminal equipment outputs the high dynamic range image to the shooting preview interface, the terminal equipment updates and displays the initial preview image displayed on the shooting preview interface as the high dynamic range image.
In the embodiment of the invention, the high dynamic range image obtained by the terminal equipment is an image with HDR effect, and the terminal equipment updates and displays the initial preview image displayed on the shooting preview interface as the image with HDR effect.
The embodiment of the invention provides a high dynamic range image preview method, which can control each image processor in N image processors to adjust the exposure gain of an initial preview image according to one target exposure gain in N target exposure gains respectively in the process of shooting and previewing by a terminal device, finally generate a high dynamic range image and output the high dynamic range image to a shooting and previewing interface, so that each frame image output to the previewing interface has the effect after HDR processing, and real-time HDR is realized.
Furthermore, as the image displayed on the shooting preview interface of the terminal device is an image with HDR effect, the user experience is improved for the user.
In a second embodiment of the present invention, fig. 6 shows a schematic diagram of a possible structure of a terminal device involved in the embodiment of the present invention, and as shown in fig. 6, the terminal device 60 may include: an acquisition unit 61, a control unit 62 and a processing unit 63.
Wherein, the acquiring unit 61 is used for acquiring an initial preview image output by the image sensor in the shooting preview process. The acquiring unit 61 is further configured to acquire N target exposure gains. And a control unit 62 for controlling each of the N image processors to adjust the exposure gain of the initial preview image according to one of the N target exposure gains acquired by the acquisition unit 61, respectively, and generate an N-frame intermediate preview image. And a processing unit 63, configured to perform image processing on the N-frame intermediate preview image obtained by the control unit 62, generate a high dynamic range image, and output the high dynamic range image to a shooting preview interface. The initial preview image output from the image sensor is respectively transmitted to each image processor, N target exposure gains are used for adjusting the exposure gain of the initial preview image, and N is an integer larger than 2.
In a possible implementation manner, the obtaining unit 61 is specifically configured to: n target exposure gains pre-stored in the terminal equipment are obtained, wherein the value of each target exposure gain in the N target exposure gains is different.
In one possible implementation, in the case where N is 3, the obtaining unit 61 is specifically configured to: acquiring three brightness values of three areas in an initial preview image, wherein the three brightness values comprise a first brightness value of a first type area and two second brightness values of a second type area; for each second brightness value in the two second brightness values, determining a target exposure gain according to the first brightness value and the second brightness value to obtain two target exposure gains; and determining the exposure gain corresponding to the first brightness value and the two target exposure gains as N target exposure gains. Wherein, the three areas correspond to the three brightness values one by one; the first-class area is an area of which the brightness values in the three areas are within a first preset range, the second-class area comprises a bright area and a dark area, the bright area is an area of which the brightness values in the N areas are within a second preset range, and the dark area is an area of which the brightness values in the N areas are within a third preset range; the values in the first preset range are all larger than the values in the third preset range, and the values in the first preset range are all smaller than the values in the second preset range.
In a possible implementation manner, the obtaining unit 61 is specifically configured to: an exposure gain corresponding to a difference between the first luminance value and a second luminance value is determined as a target exposure gain.
In a possible implementation manner, the obtaining unit 61 is specifically configured to: receiving N-1 target exposure gains input by a user based on a preset exposure gain; and determining the preset exposure gain and the N-1 target exposure gains as N target exposure gains.
The terminal device 60 provided in the embodiment of the present invention can implement each process implemented by the terminal device in the above method embodiments, and for avoiding repetition, detailed description and beneficial effects are not repeated here.
In a third embodiment of the present invention, fig. 7 is a schematic diagram of a hardware structure of a terminal device for implementing various embodiments of the present invention, where the terminal device 100 includes, but is not limited to: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111.
It should be noted that the terminal device structure shown in fig. 7 does not constitute a limitation of the terminal device, and the terminal device may include more or less components than those shown, or combine some components, or arrange different components, as will be understood by those skilled in the art. In the embodiment of the present invention, the terminal device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 110 is configured to, in a shooting preview process, acquire an initial preview image output by the image sensor; acquiring N target exposure gains; controlling each image processor in the N image processors to adjust the exposure gain of the initial preview image according to one target exposure gain in the N target exposure gains respectively to generate N frames of intermediate preview images; carrying out image processing on the N frames of intermediate preview images to generate high dynamic range images, and outputting the high dynamic range images to a shooting preview interface; the initial preview image output from the image sensor is respectively transmitted to each image processor, N target exposure gains are used for adjusting the exposure gain of the initial preview image, and N is an integer larger than 2.
The terminal device 100 provided in the embodiment of the present invention can implement each process implemented by the terminal device in the foregoing method embodiments, and for avoiding repetition, detailed description and beneficial effects are not repeated here.
It should be understood that, in the embodiment of the present application, the radio frequency unit 101 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through a wireless communication system.
The terminal device provides wireless broadband internet access to the user through the network module 102, such as helping the user send and receive e-mails, browse webpages, access streaming media, and the like.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the network module 102 or stored in the memory 109 into an audio signal and output as sound. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the terminal device 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 includes a speaker, a buzzer, a receiver, and the like.
The input unit 104 is used to receive an audio or video signal. The input unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, and the graphics processing unit 1041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the network module 102. The microphone 1042 may receive sound and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode.
The terminal device 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or the backlight when the terminal device 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the terminal device posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors 105 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal device. Specifically, the user input unit 107 includes a touch panel 1071 and other input devices 1072. Touch panel 1071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 1071 (e.g., operations by a user on or near touch panel 1071 using a finger, stylus, or any suitable object or attachment). The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and receives and executes commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 1071 may be overlaid on the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although in fig. 7, the touch panel 1071 and the display panel 1061 are two independent components to implement the input and output functions of the terminal device, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the terminal device, and is not limited herein.
The interface unit 108 is an interface for connecting an external device to the terminal apparatus 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal apparatus 100 or may be used to transmit data between the terminal apparatus 100 and the external device.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the terminal device, connects various parts of the entire terminal device by using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the terminal device. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The terminal device 100 may further include a power supply 111 (such as a battery) for supplying power to each component, and preferably, the power supply 111 may be logically connected to the processor 110 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the terminal device 100 includes some functional modules that are not shown, and are not described in detail here.
Preferably, an embodiment of the present application further provides a terminal device, which includes a processor 110, a memory 109, and a computer program stored in the memory 109 and capable of running on the processor 110, where the computer program is executed by the processor 110 to implement each process of the foregoing method embodiment, and can achieve the same technical effect, and for avoiding repetition, details are not repeated here.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the processes of the foregoing method embodiments, and can achieve the same technical effects, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (6)

1. A method for high dynamic range image preview, the method comprising:
in the shooting preview process, acquiring an initial preview image output by an image sensor;
acquiring N target exposure gains;
controlling each image processor in the N image processors to adjust the exposure gain of the initial preview image according to one target exposure gain in the N target exposure gains respectively, and generating N frames of intermediate preview images;
performing image processing on the N frames of intermediate preview images to generate high dynamic range images, and outputting the high dynamic range images to a shooting preview interface;
the initial preview image output from the image sensor is respectively transmitted to each image processor, the N target exposure gains are used for adjusting the exposure gain of the initial preview image, and N is an integer greater than 2;
in the case where N is 3, the acquiring N target exposure gains includes:
acquiring three brightness values of three regions in the initial preview image, wherein the three brightness values comprise a first brightness value of a first-class region and two second brightness values of a second-class region;
for each second brightness value in the two second brightness values, determining a target exposure gain according to the first brightness value and the second brightness value to obtain two target exposure gains;
determining the exposure gain corresponding to the first brightness value and the two target exposure gains as the N target exposure gains;
wherein the three regions correspond to the three brightness values one to one; the first-class area is an area of the three areas, the brightness values of which are within a first preset range, the second-class area comprises a bright area and a dark area, the bright area is an area of the three areas, the brightness values of which are within a second preset range, and the dark area is an area of the three areas, the brightness values of which are within a third preset range; the values in the first preset range are all larger than the values in the third preset range, and the values in the first preset range are all smaller than the values in the second preset range.
2. The method of claim 1, wherein determining a target exposure gain based on the first and second luminance values comprises:
determining an exposure gain corresponding to a difference between the first luminance value and the second luminance value as the target exposure gain.
3. A terminal device, characterized in that the terminal device comprises:
the device comprises an acquisition unit, a display unit and a control unit, wherein the acquisition unit is used for acquiring an initial preview image output by an image sensor in the shooting preview process;
the acquisition unit is further used for acquiring N target exposure gains;
the control unit is used for controlling each image processor in the N image processors to adjust the exposure gain of the initial preview image according to one target exposure gain in the N target exposure gains acquired by the acquisition unit respectively, and generating N frames of intermediate preview images;
the processing unit is used for carrying out image processing on the N frames of intermediate preview images obtained by the control unit, generating high dynamic range images and outputting the high dynamic range images to a shooting preview interface;
the initial preview image output from the image sensor is respectively transmitted to each image processor, the N target exposure gains are used for adjusting the exposure gain of the initial preview image, and N is an integer greater than 2;
in the case where N is 3, the obtaining unit is specifically configured to:
acquiring three brightness values of three regions in the initial preview image, wherein the three brightness values comprise a first brightness value of a first-class region and two second brightness values of a second-class region;
for each second brightness value in the two second brightness values, determining a target exposure gain according to the first brightness value and the second brightness value to obtain two target exposure gains;
determining the exposure gain corresponding to the first brightness value and the two target exposure gains as the N target exposure gains;
wherein the three regions correspond to the three brightness values one to one; the first-class area is an area of the three areas, the brightness values of which are within a first preset range, the second-class area comprises a bright area and a dark area, the bright area is an area of the three areas, the brightness values of which are within a second preset range, and the dark area is an area of the three areas, the brightness values of which are within a third preset range; the values in the first preset range are all larger than the values in the third preset range, and the values in the first preset range are all smaller than the values in the second preset range.
4. The terminal device according to claim 3, wherein the obtaining unit is specifically configured to:
determining an exposure gain corresponding to a difference between the first luminance value and the second luminance value as the target exposure gain.
5. A terminal device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program when executed by the processor implementing the steps of the high dynamic range image preview method as claimed in claim 1 or 2.
6. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the high dynamic range image preview method according to claim 1 or 2.
CN201810040716.2A 2018-01-16 2018-01-16 High dynamic range image preview method and terminal equipment Active CN108307109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810040716.2A CN108307109B (en) 2018-01-16 2018-01-16 High dynamic range image preview method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810040716.2A CN108307109B (en) 2018-01-16 2018-01-16 High dynamic range image preview method and terminal equipment

Publications (2)

Publication Number Publication Date
CN108307109A CN108307109A (en) 2018-07-20
CN108307109B true CN108307109B (en) 2020-04-17

Family

ID=62869150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810040716.2A Active CN108307109B (en) 2018-01-16 2018-01-16 High dynamic range image preview method and terminal equipment

Country Status (1)

Country Link
CN (1) CN108307109B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111050143B (en) * 2018-10-11 2021-09-21 华为技术有限公司 Image shooting method and terminal equipment
CN109218626B (en) * 2018-11-23 2020-09-25 维沃移动通信有限公司 Photographing method and terminal
CN109729269B (en) * 2018-12-28 2020-10-30 维沃移动通信有限公司 Image processing method, terminal equipment and computer readable storage medium
CN110248098B (en) * 2019-06-28 2021-08-24 Oppo广东移动通信有限公司 Image processing method, image processing device, storage medium and electronic equipment
CN110198417A (en) * 2019-06-28 2019-09-03 Oppo广东移动通信有限公司 Image processing method, device, storage medium and electronic equipment
CN112449120B (en) * 2019-08-30 2022-06-10 华为技术有限公司 High dynamic range video generation method and device
CN110708473B (en) * 2019-11-14 2022-04-15 深圳市道通智能航空技术股份有限公司 High dynamic range image exposure control method, aerial camera and unmanned aerial vehicle
CN113037987A (en) * 2019-12-09 2021-06-25 广州印芯半导体技术有限公司 Image reading method
CN112822413B (en) * 2020-12-30 2024-01-26 Oppo(重庆)智能科技有限公司 Shooting preview method, shooting preview device, terminal and computer readable storage medium
WO2023220957A1 (en) * 2022-05-18 2023-11-23 北京小米移动软件有限公司 Image processing method and apparatus, and mobile terminal and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104869297A (en) * 2015-06-15 2015-08-26 联想(北京)有限公司 Image processing method and electronic equipment
CN105578068A (en) * 2015-12-21 2016-05-11 广东欧珀移动通信有限公司 High-dynamic-range image generation method, device and mobile terminal
CN105827971A (en) * 2016-03-31 2016-08-03 维沃移动通信有限公司 Image processing method and mobile terminal
CN107566739A (en) * 2017-10-18 2018-01-09 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN107566748A (en) * 2017-09-22 2018-01-09 维沃移动通信有限公司 A kind of image processing method, mobile terminal and computer-readable recording medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010118177A1 (en) * 2009-04-08 2010-10-14 Zoran Corporation Exposure control for high dynamic range image capture

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104869297A (en) * 2015-06-15 2015-08-26 联想(北京)有限公司 Image processing method and electronic equipment
CN105578068A (en) * 2015-12-21 2016-05-11 广东欧珀移动通信有限公司 High-dynamic-range image generation method, device and mobile terminal
CN105827971A (en) * 2016-03-31 2016-08-03 维沃移动通信有限公司 Image processing method and mobile terminal
CN107566748A (en) * 2017-09-22 2018-01-09 维沃移动通信有限公司 A kind of image processing method, mobile terminal and computer-readable recording medium
CN107566739A (en) * 2017-10-18 2018-01-09 维沃移动通信有限公司 A kind of photographic method and mobile terminal

Also Published As

Publication number Publication date
CN108307109A (en) 2018-07-20

Similar Documents

Publication Publication Date Title
CN108307109B (en) High dynamic range image preview method and terminal equipment
CN108513070B (en) Image processing method, mobile terminal and computer readable storage medium
CN107566739B (en) photographing method and mobile terminal
CN108495029B (en) Photographing method and mobile terminal
CN109688322B (en) Method and device for generating high dynamic range image and mobile terminal
CN109218626B (en) Photographing method and terminal
CN108449541B (en) Panoramic image shooting method and mobile terminal
CN108234894B (en) Exposure adjusting method and terminal equipment
CN108924414B (en) Shooting method and terminal equipment
CN107730460B (en) Image processing method and mobile terminal
CN107623818B (en) Image exposure method and mobile terminal
CN110213484B (en) Photographing method, terminal equipment and computer readable storage medium
CN109104566B (en) Image display method and terminal equipment
CN111010511B (en) Panoramic body-separating image shooting method and electronic equipment
CN110798621A (en) Image processing method and electronic equipment
CN107807488B (en) Camera assembly, aperture adjusting method and mobile terminal
CN110933302B (en) Shooting method and electronic equipment
CN109167917B (en) Image processing method and terminal equipment
CN107734269B (en) Image processing method and mobile terminal
CN110913133B (en) Shooting method and electronic equipment
CN110493457B (en) Terminal device control method and terminal device
CN109462727B (en) Filter adjusting method and mobile terminal
CN109922256B (en) Shooting method and terminal equipment
CN109660750B (en) Video call method and terminal
CN109636720B (en) Image display method and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant