CN109688322B - Method and device for generating high dynamic range image and mobile terminal - Google Patents

Method and device for generating high dynamic range image and mobile terminal Download PDF

Info

Publication number
CN109688322B
CN109688322B CN201811420557.5A CN201811420557A CN109688322B CN 109688322 B CN109688322 B CN 109688322B CN 201811420557 A CN201811420557 A CN 201811420557A CN 109688322 B CN109688322 B CN 109688322B
Authority
CN
China
Prior art keywords
preview image
image
parameter
target
preview
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
CN201811420557.5A
Other languages
Chinese (zh)
Other versions
CN109688322A (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 Hangzhou Co Ltd
Original Assignee
Vivo Mobile Communication Hangzhou 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 Hangzhou Co Ltd filed Critical Vivo Mobile Communication Hangzhou Co Ltd
Priority to CN201811420557.5A priority Critical patent/CN109688322B/en
Publication of CN109688322A publication Critical patent/CN109688322A/en
Application granted granted Critical
Publication of CN109688322B publication Critical patent/CN109688322B/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/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • 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/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • 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 invention provides a method and a device for generating a high dynamic range image. The method comprises the following steps: acquiring a preview image sequence, and determining a motion area of each preview image in the preview image sequence; acquiring brightness values of all motion areas and environment parameters of a shooting environment; determining a target exposure parameter corresponding to the target preview image according to the environment parameter and the brightness value; according to the target exposure parameters, carrying out exposure processing on the target preview image to generate a reference image; acquiring exposure parameters corresponding to other preview images except the target preview image in the preview image sequence according to the environment parameters; respectively carrying out exposure processing on other preview images except the target preview image in the preview image sequence according to the exposure parameters to generate an image sequence; and carrying out motion compensation and fusion operation on the image sequence according to the reference image to generate a high dynamic range image. The invention can improve the quality of the reference image and can improve the imaging quality of the HDR image.

Description

Method and device for generating high dynamic range image and mobile terminal
Technical Field
The present invention relates to the field of mobile communication technologies, and in particular, to a method and an apparatus for generating a high dynamic range image, and a mobile terminal.
Background
With the popularization and increasingly widespread application of mobile terminals, more and more users choose to use mobile devices for taking pictures.
Due to the limitation of the Dynamic Range of the camera sensor, most of the photographing devices adopt the HDR (High-Dynamic Range) technology when photographing in a High Dynamic Range scene, and the HDR technology needs to photograph image sequences with different exposure parameters and finally fuse an image with a High Dynamic Range. However, in the fusion process, if a moving object exists in the range of the individual photographing field of view, a motion ghost will appear in the fusion result, so that the ghost-removing alignment operation is required before the fusion of different exposure image sequences.
In the process of de-ghosting alignment, a certain frame in the image sequence is selected as a reference image, moving objects in other frame images are aligned to the reference image, and the aligned images are fused without motion ghosting. However, when a moving object appears in an overexposed or excessively dark region of the reference image, de-ghosting alignment cannot be achieved, so that the quality of the obtained HDR image is reduced, and the user experience is reduced.
Disclosure of Invention
The embodiment of the invention provides a method and a device for generating a high dynamic range image and a mobile terminal, and aims to solve the problem that in the prior art, when a moving object appears in an overexposed or dark area of a reference image, ghost alignment cannot be removed, and the HDR image quality is reduced.
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 generating a high dynamic range image, including: acquiring a preview image sequence, and determining a motion area of each preview image in the preview image sequence; acquiring the brightness value of each motion area and the environmental parameters of the shooting environment; determining a target exposure parameter corresponding to a target preview image according to the environment parameter and the brightness value; according to the target exposure parameter, carrying out exposure processing on the target preview image to generate a reference image; according to the environment parameters, acquiring exposure parameters corresponding to other preview images in the preview image sequence except the target preview image; respectively exposing other preview images except the target preview image in the preview image sequence according to the exposure parameters to generate an image sequence; and carrying out motion compensation and fusion operation on the image sequence according to the reference image to generate a high dynamic range image.
In a second aspect, an embodiment of the present invention provides an apparatus for generating a high dynamic range image, including: the motion region determining module is used for acquiring a preview image sequence and determining the motion region of each preview image in the preview image sequence; the environment parameter and brightness value acquisition module is used for acquiring the brightness value of each motion area and the environment parameter of the shooting environment; the target exposure parameter determining module is used for determining a target exposure parameter corresponding to the target preview image according to the environment parameter and the brightness value; the reference image generation module is used for carrying out exposure processing on the target preview image according to the target exposure parameter to generate a reference image; the exposure parameter acquisition module is used for acquiring exposure parameters corresponding to other preview images in the preview image sequence except the target preview image according to the environment parameters; the image sequence generation module is used for respectively carrying out exposure processing on other preview images except the target preview image in the preview image sequence according to the exposure parameters to generate an image sequence; and the dynamic image generation module is used for performing motion compensation and fusion operation on the image sequence according to the reference image to generate a high dynamic range image.
In a third aspect, an embodiment of the present invention provides a mobile terminal, including a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of any one of the above methods for generating a high dynamic range image.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of any one of the above methods for generating a high dynamic range image.
In the embodiment of the invention, a preview image sequence is obtained, a motion area of each preview image in the preview image sequence is determined, a brightness value of each motion area and an environment parameter of a shooting environment are obtained, a target exposure parameter corresponding to a target preview image is determined according to the environment parameter and the brightness value, the target preview image is exposed according to the target exposure parameter to generate a reference image, exposure parameters of other preview images except the target preview image in the preview image sequence are obtained according to the environment parameter, exposure processing is respectively carried out on other preview images except the target preview image in the preview image sequence according to the exposure parameters to generate an image sequence, and then motion compensation and fusion operation are carried out on the image sequence according to the reference image to generate a high dynamic range image, the embodiment of the invention adjusts the exposure parameters of the target preview image, the generated reference image can avoid the phenomenon of over exposure or over dark area, the quality of the reference image is improved, the imaging quality of the HDR image can be improved in the subsequent de-ghost alignment process, and the use experience of a user is further improved.
Drawings
FIG. 1 is a flow chart of the steps of a method of generating a high dynamic range image according to an embodiment of the present invention;
FIG. 1a is a schematic diagram of detecting a motion region according to an embodiment of the present invention;
FIG. 1b is a schematic view of a motion field provided by an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus for generating a high dynamic range image according to an embodiment of the present invention;
fig. 3 is a block diagram of a mobile terminal 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.
Example one
Referring to fig. 1, a method for generating a high dynamic range image according to an embodiment of the present invention is shown, where the method for generating a high dynamic range image may be applied to a mobile terminal, and specifically may include the following steps:
step 101: acquiring a preview image sequence, and determining the motion area of each preview image in the preview image sequence.
In the embodiment of the present invention, the mobile terminal may be a mobile electronic device with a camera, such as a mobile phone, a PDA (Personal Digital Assistant), a tablet computer, and the like.
In the process of generating an HDR image, a camera of the mobile terminal may acquire an image sequence corresponding to the target region, and as can be understood, the preview image sequence here is an original image data sequence. The sequence of preview images can be displayed on the display screen of the mobile terminal, and the motion area of each preview image can be determined by comparing the brightness and the color difference of two adjacent frames of preview images, and the detailed description is specifically given in the following preferred embodiments.
In a preferred embodiment of the present invention, the step 101 may include:
substep S1: and acquiring the brightness parameter and the color parameter of each preview image.
In the embodiment of the present invention, the brightness parameter and the color parameter of each preview image refer to the brightness value and the color of each pixel in each preview image.
A detection program may be preset on the mobile terminal side, and the brightness parameter and the color parameter in each preview image may be acquired by the detection program.
In the present invention, each preview image may be divided into a plurality of sub-regions in advance, and then the luminance parameter and the color parameter in each sub-region in each preview image are obtained, for example, each preview image may be divided into 9 sub-regions, or 8 sub-regions, and the like, which is not limited in this embodiment of the present invention.
Of course, in practical applications, the brightness parameter and the color parameter of each preview image may be obtained in other manners, which is not limited in this embodiment of the present invention.
After the luminance parameter and the color parameter of each preview image are acquired, the sub-step S2 is performed.
Substep S2: and determining the motion area of each preview image according to the brightness parameter and the color parameter of the preview images of two adjacent frames.
After acquiring the brightness parameter and the color parameter of each preview image, the brightness parameter and the color parameter of two adjacent frames of preview images in the preview image sequence may be compared to determine a motion region in each preview image, for example, referring to fig. 1a, a schematic diagram of detecting a motion region provided in an embodiment of the present invention is shown.
Specifically, the luminance parameter and the color parameter of the sub-area corresponding to the two adjacent frames of preview images may be compared to obtain a mask of the motion area, that is, an edge of the motion area, for example, referring to fig. 1b, a schematic diagram of the motion area provided in the embodiment of the present invention is shown, as shown in fig. 1b, the edge of the motion area may be determined according to a difference between the luminance parameter and the color parameter of the two adjacent frames of preview images, and the edge is marked, so as to determine the motion area.
It should be understood that the above examples are only examples for better understanding of the technical solutions of the embodiments of the present invention, and are not to be taken as the only limitation of the embodiments of the present invention.
After the motion areas of the preview images are determined, step 102 is performed.
Step 102: and acquiring the brightness value of each motion area and the environmental parameters of the shooting environment.
In the embodiment of the present invention, the environment parameter refers to a parameter of a shooting environment, such as a brightness value of the shooting environment, when a camera of the mobile terminal is used to collect each preview image.
It is to be understood that the environmental parameters of the shooting environment may be gradually changed during the acquisition of the sequence of images. When the mobile terminal uses the camera to collect the preview image sequence, the environmental parameters of the shooting environment can be sensed through the camera, and the environmental parameters of the shooting environment can be shot.
After the motion area of each preview image is determined, the brightness value of the motion area of each preview image can be acquired, and the motion areas of different preview images can correspond to different brightness values or the same brightness value.
A motion area monitoring program may be preset in the mobile terminal system, and the brightness value corresponding to the motion area of each preview image may be obtained through the monitoring program, and certainly, in practical application, the brightness value corresponding to the motion area of each preview image may also be obtained in other manners, which is not limited in this embodiment of the present invention.
After acquiring the brightness value of each motion region and the environment parameter of the shooting environment, step 103 is executed.
Step 103: and determining a target exposure parameter corresponding to the target preview image according to the environment parameter and the brightness value.
In the mobile terminal system, there are stored in advance environment parameters and mapping relationships between the brightness values and the target exposure parameters, for example, the environment parameters A, B, the brightness values a, B, where a + a corresponds to the target exposure parameter S1, a + B corresponds to the target exposure parameter S2, B + a corresponds to the target exposure parameter S3, and B + B corresponds to the target exposure parameter S4.
It should be understood that the above examples are only examples for better understanding of the technical solutions of the embodiments of the present invention, and are not to be construed as the only limitations of the present invention.
In the system, the mapping relationship may be stored in a list form, as shown in table 1 below:
table 1:
preview image Environmental parameter + luminance value Target exposure parameters
1 A+a S1
2 A+b S2
3 B+a S3
4 B+b S4
Of course, a corresponding mapping relationship database may also be created for the mapping relationship, and the mapping relationship may be stored in the database.
In practical applications, a person skilled in the art may select a storage manner of the mapping relationship between the environmental parameter and the brightness value and the target exposure parameter according to actual needs, which is not limited in the embodiment of the present invention.
After the brightness value corresponding to the motion region of each preview image and the environment parameter of the environment where the image region corresponding to the target preview image is located are obtained, the target exposure parameter corresponding to the target preview image can be obtained according to the pre-stored mapping relationship according to the brightness value and the environment parameter corresponding to each preview image.
In a preferred embodiment of the present invention, the step 103 may include:
sub-step M1: and acquiring the average brightness value of the motion area according to the brightness value.
In the embodiment of the present invention, the environment parameter may be an environment brightness value, that is, brightness of an image region captured by the mobile terminal, and corresponding values may be given to various environment brightnesses in the system in advance, so that the environment brightness value corresponding to each preview image may be obtained when a preview image sequence corresponding to the image region is acquired according to a camera of the mobile terminal.
After the luminance values of the preview images are obtained, an average luminance value corresponding to each luminance value may be calculated, for example, if the luminance values corresponding to the preview image A, B, C are N1, N2, and N3, respectively, the average luminance value is (N1+ N2+ N3)/3.
It should be understood that the above examples are only examples for better understanding of the technical solutions of the embodiments of the present invention, and are not to be construed as the only limitations of the present invention.
After obtaining the average luminance value, sub-step M2 is performed.
Sub-step M2: and acquiring corresponding target exposure parameters according to the environment brightness value and the average brightness value.
In the mobile terminal system, there are stored in advance a mapping relationship between the environment luminance value and the average luminance value and the target exposure parameter, for example, the environment luminance value A, B, the average luminance values a, B, where a + a corresponds to the target exposure parameter S1, a + B corresponds to the target exposure parameter S2, B + a corresponds to the target exposure parameter S3, and B + B corresponds to the target exposure parameter S4.
It should be understood that the above examples are only examples for better understanding of the technical solutions of the embodiments of the present invention, and are not to be construed as the only limitations of the present invention.
In the system, the mapping relationship may be stored in a list form, as shown in table 2 below:
table 2:
Figure BDA0001880469970000071
of course, a corresponding mapping relationship database may also be created for the mapping relationship, and the mapping relationship may be stored in the database.
In practical applications, a person skilled in the art may select a storage manner of the mapping relationship between the environmental brightness value and the average brightness value and the target exposure parameter according to actual needs, which is not limited in the embodiment of the present invention.
After obtaining the average brightness value corresponding to the moving area and the environment brightness value of the environment where the image area corresponding to the target preview image is located, the target exposure parameter corresponding to the target preview image can be obtained according to the pre-stored mapping relationship.
After determining the target exposure parameters corresponding to the target preview image, step 104 is performed.
Step 104: and according to the target exposure parameters, carrying out exposure processing on the target preview image to generate a reference image.
After the target exposure parameters corresponding to the target preview image are acquired, the target preview image may be subjected to exposure processing in accordance with the target exposure parameters, so that a reference image may be generated.
The reference image provided by the embodiment of the invention can be applied to a reference image in the subsequent ghost removing process, and the exposure parameter of the target preview image is adjusted, so that the generated reference image is prevented from having an overexposure or an excessively dark area, and the imaging quality of an HDR image is improved.
Step 105: and acquiring exposure parameters corresponding to other preview images except the target preview image in the preview image sequence according to the environment parameters.
In the embodiment of the present invention, since the HDR image needs to be generated, as shown in fig. 1a, in the process of walking by a person in the image, environment parameters (such as environment brightness, environment color, and the like) of image areas corresponding to the preview images may be different.
Mapping relationships between the environmental parameters and the exposure parameters are stored in the mobile terminal system in advance, for example, the environmental parameters A, B, C correspond to the exposure parameters a, b, c, and the like, respectively.
After the environment parameters corresponding to each preview image are acquired, the exposure parameters corresponding to each preview image may be determined according to the environment parameters of each preview image, in the present invention, in the preview image sequence, when the exposure parameters of each preview image are acquired, the target preview image needs to be excluded, and the exposure parameters of the target preview image need to be acquired by combining the environment parameters with the brightness values of the motion regions, as shown in the above steps 101 to 104, and the embodiment of the present invention will not be described in detail herein.
After acquiring the exposure parameters corresponding to the preview images of the sequence of preview images other than the target preview image, step 106 is performed.
Step 106: and respectively carrying out exposure processing on other preview images except the target preview image in the preview image sequence according to the exposure parameters to generate an image sequence.
After the exposure parameters corresponding to the other preview images in the preview image sequence except the target preview image are obtained, the corresponding preview images can be respectively exposed according to the exposure parameters, so that the image sequence except the reference image can be generated.
The scheme of performing exposure processing on the corresponding preview image according to each exposure parameter is a well-established technique in the art, and how to perform exposure is not the point of the embodiment of the present invention, and the embodiment of the present invention is not described in detail herein.
After the image sequence is generated, step 107 is performed.
Step 107: and carrying out motion compensation and fusion operation on the image sequence according to the reference image to generate a high dynamic range image.
In the embodiment of the present invention, a reference image may be used as a reference image, the reference image is used as a reference, motion detection and motion compensation are performed with each generated frame of image respectively to implement a function of removing ghost alignment, and the images subjected to the ghost alignment are fused to obtain an HDR image, which is displayed in a display unit.
The reference image generation method provided by the embodiment of the invention has the beneficial effects of the reference image generation method shown in the first embodiment, and can also perform the de-ghost alignment operation according to the reference image, and fuse the images subjected to de-ghost alignment to obtain the HDR image.
The method for generating high dynamic range images provided by the embodiment of the invention comprises the steps of determining the motion area of each preview image in a preview image sequence by acquiring the preview image sequence, acquiring the brightness value of each motion area and the environmental parameter of a shooting environment, determining the target exposure parameter corresponding to the target preview image according to the environmental parameter and the brightness value, carrying out exposure processing on the target preview image according to the target exposure parameter to generate a reference image, acquiring the exposure parameters of other preview images except the target preview image in the preview image sequence according to the environmental parameter, respectively carrying out exposure processing on other preview images except the target preview image in the preview image sequence according to the exposure parameters to generate an image sequence, further carrying out motion compensation and fusion operation on the image sequence according to the reference image to generate the high dynamic range image, according to the embodiment of the invention, the exposure parameters of the target preview image are adjusted, so that the generated reference image can avoid the phenomenon of over exposure or over dark area, the quality of the reference image is improved, the imaging quality of the HDR image can be improved in the subsequent ghost-removing alignment process, and the use experience of a user is further improved.
Example two
Referring to fig. 2, a schematic structural diagram of an s-device for generating a high dynamic range image according to an embodiment of the present invention is shown, which may specifically include:
a motion region determining module 210, configured to obtain a preview image sequence, and determine a motion region of each preview image in the preview image sequence; an environment parameter and brightness value obtaining module 220, configured to obtain a brightness value of each motion area and an environment parameter of a shooting environment; a target exposure parameter determining module 230, configured to determine a target exposure parameter corresponding to the target preview image according to the environment parameter and the brightness value; a reference image generating module 240, configured to perform exposure processing on the target preview image according to the target exposure parameter, and generate a reference image; an exposure parameter obtaining module 250, configured to obtain, according to the environment parameter, exposure parameters corresponding to other preview images in the preview image sequence except the target preview image; an image sequence generating module 260, configured to expose, according to the exposure parameters, other preview images in the preview image sequence except for the target preview image, respectively, so as to generate an image sequence; and a dynamic image generation module 270, configured to perform motion compensation and fusion operation on the image sequence according to the reference image, and generate a high dynamic range image.
Preferably, the motion region determining module 210 includes: the brightness and color parameter acquisition submodule is used for acquiring the brightness parameter and the color parameter of each preview image; and the motion area determining submodule is used for determining the motion area of each preview image according to the brightness parameter and the color parameter of the preview images of two adjacent frames.
Preferably, the environment parameter includes an environment brightness value, and the target exposure parameter determining module 230 includes: the average brightness value obtaining submodule is used for obtaining the average brightness value of the motion area according to the brightness value; and the target exposure parameter obtaining submodule is used for obtaining corresponding target exposure parameters according to the environment brightness value and the average brightness value.
The device for generating high dynamic range images, provided by the embodiment of the invention, determines the motion area of each preview image in the preview image sequence by acquiring the preview image sequence, acquires the brightness value of each motion area and the environmental parameter of the shooting environment, determines the target exposure parameter corresponding to the target preview image according to the environmental parameter and the brightness value, performs exposure processing on the target preview image according to the target exposure parameter to generate a reference image, acquires the exposure parameters of other preview images except the target preview image in the preview image sequence according to the environmental parameter, performs exposure processing on other preview images except the target preview image in the preview image sequence according to the exposure parameters to generate an image sequence, further performs motion compensation and fusion operation on the image sequence according to the reference image to generate high dynamic range images, according to the embodiment of the invention, the exposure parameters of the target preview image are adjusted, so that the generated reference image can avoid the phenomenon of over exposure or over dark area, the quality of the reference image is improved, the imaging quality of the HDR image can be improved in the subsequent ghost-removing alignment process, and the use experience of a user is further improved.
EXAMPLE III
Referring to fig. 3, a hardware structure diagram of a mobile terminal for implementing various embodiments of the present invention is shown.
The mobile terminal 500 includes, but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and a power supply 511. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 3 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal 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.
A processor 510, configured to obtain a preview image sequence, and determine a motion region of each preview image in the preview image sequence; acquiring the brightness value of each motion area and the environmental parameters of the shooting environment; determining a target exposure parameter corresponding to a target preview image according to the environment parameter and the brightness value; according to the target exposure parameter, carrying out exposure processing on the target preview image to generate a reference image; according to the environment parameters, acquiring exposure parameters corresponding to other preview images in the preview image sequence except the target preview image; respectively exposing other preview images except the target preview image in the preview image sequence according to the exposure parameters to generate an image sequence; and carrying out motion compensation and fusion operation on the image sequence according to the reference image to generate a high dynamic range image.
In the embodiment of the invention, a preview image sequence is obtained, a motion area of each preview image in the preview image sequence is determined, a brightness value of each motion area and an environment parameter of a shooting environment are obtained, a target exposure parameter corresponding to a target preview image is determined according to the environment parameter and the brightness value, the target preview image is exposed according to the target exposure parameter to generate a reference image, exposure parameters of other preview images except the target preview image in the preview image sequence are obtained according to the environment parameter, exposure processing is respectively carried out on other preview images except the target preview image in the preview image sequence according to the exposure parameters to generate an image sequence, and then motion compensation and fusion operation are carried out on the image sequence according to the reference image to generate a high dynamic range image, the embodiment of the invention adjusts the exposure parameters of the target preview image, the generated reference image can avoid the phenomenon of over exposure or over dark area, the quality of the reference image is improved, the imaging quality of the HDR image can be improved in the subsequent de-ghost alignment process, and the use experience of a user is further improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 501 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 510; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 501 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 501 can also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through the network module 502, such as helping the user send and receive e-mails, browse webpages, access streaming media, and the like.
The audio output unit 503 may convert audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output as sound. Also, the audio output unit 503 may also provide audio output related to a specific function performed by the mobile terminal 500 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, and the like.
The input unit 504 is used to receive an audio or video signal. The input Unit 504 may include a Graphics Processing Unit (GPU) 5041 and a microphone 5042, and the Graphics processor 5041 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 506. The image frames processed by the graphic processor 5041 may be stored in the memory 509 (or other storage medium) or transmitted via the radio frequency unit 501 or the network module 502. The microphone 5042 may receive sounds and may be capable of processing such sounds 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 501 in case of the phone call mode.
The mobile terminal 500 also includes at least one sensor 505, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 5061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 5061 and/or a backlight when the mobile terminal 500 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 posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 505 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 506 is used to display information input by the user or information provided to the user. The Display unit 506 may include a Display panel 5061, and the Display panel 5061 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 507 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. Touch panel 5071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 5071 using a finger, stylus, or any suitable object or attachment). The touch panel 5071 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 510, and receives and executes commands sent by the processor 510. In addition, the touch panel 5071 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 5071, the user input unit 507 may include other input devices 5072. In particular, other input devices 5072 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 5071 may be overlaid on the display panel 5061, and when the touch panel 5071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 510 to determine the type of the touch event, and then the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Although in fig. 3, the touch panel 5071 and the display panel 5061 are two independent components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 5071 and the display panel 5061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 508 is an interface through which an external device is connected to the mobile terminal 500. 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 508 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 500 or may be used to transmit data between the mobile terminal 500 and external devices.
The memory 509 may be used to store software programs as well as various data. The memory 509 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 509 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 510 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 509 and calling data stored in the memory 509, thereby performing overall monitoring of the mobile terminal. Processor 510 may include one or more processing units; preferably, the processor 510 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 processor 510.
The mobile terminal 500 may further include a power supply 511 (e.g., a battery) for supplying power to various components, and preferably, the power supply 511 may be logically connected to the processor 510 via a power management system, so that functions of managing charging, discharging, and power consumption are performed via the power management system.
In addition, the mobile terminal 500 includes some functional modules that are not shown, and thus, are not described in detail herein.
Preferably, an embodiment of the present invention further provides a mobile terminal, which includes a processor 510, a memory 509, and a computer program stored in the memory 509 and capable of running on the processor 510, where the computer program, when executed by the processor 510, implements each process of the above method for generating a high dynamic range image, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiment of the present invention further provides 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 each process of the above method for generating a high dynamic range image, and can achieve the same technical effect, and in order to avoid repetition, the detailed description is omitted 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 generating a high dynamic range image, which is applied to a mobile terminal, is characterized by comprising the following steps:
acquiring a preview image sequence, and determining a motion area of each preview image in the preview image sequence;
acquiring the brightness value of each motion area and the environmental parameters of the shooting environment;
determining a target exposure parameter corresponding to a target preview image according to the environment parameter and the brightness value;
according to the target exposure parameter, carrying out exposure processing on the target preview image to generate a reference image;
according to the environment parameters, acquiring exposure parameters corresponding to other preview images in the preview image sequence except the target preview image;
respectively exposing other preview images except the target preview image in the preview image sequence according to the exposure parameters to generate an image sequence;
according to the reference image, performing motion compensation and fusion operation on the image sequence to generate a high dynamic range image;
wherein the environment parameter includes an environment brightness value, and the step of determining a target exposure parameter corresponding to a target preview image according to the environment parameter and the brightness value includes:
acquiring an average brightness value of the motion area according to the brightness value;
acquiring corresponding target exposure parameters according to the environment brightness value and the average brightness value; and the mobile terminal is stored with the mapping relation between the environment brightness value, the average brightness value and the target exposure parameter in advance.
2. The method of claim 1, wherein the step of obtaining a sequence of preview images and determining the motion region for each preview image in the sequence of preview images comprises:
acquiring a brightness parameter and a color parameter of each preview image;
and determining the motion area of each preview image according to the brightness parameter and the color parameter of the preview images of two adjacent frames.
3. An apparatus for generating a high dynamic range image, comprising:
the motion region determining module is used for acquiring a preview image sequence and determining the motion region of each preview image in the preview image sequence;
the environment parameter and brightness value acquisition module is used for acquiring the brightness value of each motion area and the environment parameter of the shooting environment;
the target exposure parameter determining module is used for determining a target exposure parameter corresponding to the target preview image according to the environment parameter and the brightness value;
the reference image generation module is used for carrying out exposure processing on the target preview image according to the target exposure parameter to generate a reference image;
the exposure parameter acquisition module is used for acquiring exposure parameters corresponding to other preview images in the preview image sequence except the target preview image according to the environment parameters;
the image sequence generation module is used for respectively carrying out exposure processing on other preview images except the target preview image in the preview image sequence according to the exposure parameters to generate an image sequence;
the dynamic image generation module is used for performing motion compensation and fusion operation on the image sequence according to the reference image to generate a high dynamic range image;
wherein the environment parameter includes an environment brightness value, and the target exposure parameter determining module includes:
the average brightness value obtaining submodule is used for obtaining the average brightness value of the motion area according to the brightness value;
the target exposure parameter obtaining submodule is used for obtaining corresponding target exposure parameters according to the environment brightness value and the average brightness value; and the mobile terminal is stored with the mapping relation between the environment brightness value, the average brightness value and the target exposure parameter in advance.
4. The apparatus of claim 3, wherein the motion region determination module comprises:
the brightness and color parameter acquisition submodule is used for acquiring the brightness parameter and the color parameter of each preview image;
and the motion area determining submodule is used for determining the motion area of each preview image according to the brightness parameter and the color parameter of the preview images of two adjacent frames.
5. A mobile terminal 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 method of generating a high dynamic range image as claimed in any one of claims 1 to 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 method of generating a high dynamic range image according to any one of claims 1 to 2.
CN201811420557.5A 2018-11-26 2018-11-26 Method and device for generating high dynamic range image and mobile terminal Active CN109688322B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811420557.5A CN109688322B (en) 2018-11-26 2018-11-26 Method and device for generating high dynamic range image and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811420557.5A CN109688322B (en) 2018-11-26 2018-11-26 Method and device for generating high dynamic range image and mobile terminal

Publications (2)

Publication Number Publication Date
CN109688322A CN109688322A (en) 2019-04-26
CN109688322B true CN109688322B (en) 2021-04-02

Family

ID=66184381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811420557.5A Active CN109688322B (en) 2018-11-26 2018-11-26 Method and device for generating high dynamic range image and mobile terminal

Country Status (1)

Country Link
CN (1) CN109688322B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110111241B (en) * 2019-04-30 2023-10-03 北京字节跳动网络技术有限公司 Method and apparatus for generating dynamic image
CN110213498B (en) * 2019-05-29 2021-04-23 Oppo广东移动通信有限公司 Image generation method and device, electronic equipment and computer readable storage medium
CN110166710A (en) * 2019-06-21 2019-08-23 上海闻泰电子科技有限公司 Image composition method, device, equipment and medium
CN110445989B (en) * 2019-08-05 2021-03-23 Oppo广东移动通信有限公司 Image processing method, image processing device, storage medium and electronic equipment
CN110460773B (en) * 2019-08-16 2021-05-11 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN111476747A (en) * 2020-03-31 2020-07-31 深圳奥比中光科技有限公司 System and method for eliminating ghost image in under-screen imaging
CN111726543B (en) * 2020-06-30 2022-12-09 杭州萤石软件有限公司 Method and camera for improving dynamic range of image
CN111770285B (en) * 2020-07-13 2022-02-18 浙江大华技术股份有限公司 Exposure brightness control method and device, electronic equipment and storage medium
CN112399091B (en) * 2020-10-26 2023-01-20 维沃移动通信有限公司 Image processing method and device and electronic equipment

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101304489A (en) * 2008-06-20 2008-11-12 北京中星微电子有限公司 Automatic exposure method and apparatus
CN102196185A (en) * 2010-03-09 2011-09-21 索尼公司 Image processing apparatus, image processing method, and program
CN102905058A (en) * 2011-07-28 2013-01-30 三星电子株式会社 Apparatus and method for generating high dynamic range image from which ghost blur is removed
EP2717012A1 (en) * 2011-05-27 2014-04-09 Panasonic Corporation Image processing apparatus and image processing method
CN103973958A (en) * 2013-01-30 2014-08-06 阿里巴巴集团控股有限公司 Image processing method and image processing equipment
CN104349066A (en) * 2013-07-31 2015-02-11 华为终端有限公司 Method and device for generating images with high dynamic ranges
CN105227856A (en) * 2015-09-28 2016-01-06 广东欧珀移动通信有限公司 A kind of method of image procossing and mobile terminal
CN105551061A (en) * 2015-12-09 2016-05-04 天津大学 Processing method for retaining ghosting-free moving object in high-dynamic range image fusion
CN106251365A (en) * 2016-07-22 2016-12-21 北京邮电大学 Many exposure video fusion method and device
CN108259774A (en) * 2018-01-31 2018-07-06 珠海市杰理科技股份有限公司 Image combining method, system and equipment
CN108876740A (en) * 2018-06-21 2018-11-23 重庆邮电大学 A kind of more exposure registration methods based on ghost removal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030103158A1 (en) * 2001-12-05 2003-06-05 Creo Il. Ltd. System and method for the formation of multiple exposure images
WO2010123923A1 (en) * 2009-04-23 2010-10-28 Zoran Corporation Multiple exposure high dynamic range image capture

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101304489A (en) * 2008-06-20 2008-11-12 北京中星微电子有限公司 Automatic exposure method and apparatus
CN102196185A (en) * 2010-03-09 2011-09-21 索尼公司 Image processing apparatus, image processing method, and program
EP2717012A1 (en) * 2011-05-27 2014-04-09 Panasonic Corporation Image processing apparatus and image processing method
CN102905058A (en) * 2011-07-28 2013-01-30 三星电子株式会社 Apparatus and method for generating high dynamic range image from which ghost blur is removed
CN103973958A (en) * 2013-01-30 2014-08-06 阿里巴巴集团控股有限公司 Image processing method and image processing equipment
CN104349066A (en) * 2013-07-31 2015-02-11 华为终端有限公司 Method and device for generating images with high dynamic ranges
CN105227856A (en) * 2015-09-28 2016-01-06 广东欧珀移动通信有限公司 A kind of method of image procossing and mobile terminal
CN105551061A (en) * 2015-12-09 2016-05-04 天津大学 Processing method for retaining ghosting-free moving object in high-dynamic range image fusion
CN106251365A (en) * 2016-07-22 2016-12-21 北京邮电大学 Many exposure video fusion method and device
CN108259774A (en) * 2018-01-31 2018-07-06 珠海市杰理科技股份有限公司 Image combining method, system and equipment
CN108876740A (en) * 2018-06-21 2018-11-23 重庆邮电大学 A kind of more exposure registration methods based on ghost removal

Also Published As

Publication number Publication date
CN109688322A (en) 2019-04-26

Similar Documents

Publication Publication Date Title
CN109688322B (en) Method and device for generating high dynamic range image and mobile terminal
CN108513070B (en) Image processing method, mobile terminal and computer readable storage medium
CN107038681B (en) Image blurring method and device, computer readable storage medium and computer device
CN107592466B (en) Photographing method and mobile terminal
CN108307109B (en) High dynamic range image preview method and terminal equipment
CN110365907B (en) Photographing method and device and electronic equipment
CN107566749B (en) Shooting method and mobile terminal
CN108989678B (en) Image processing method and mobile terminal
CN109218626B (en) Photographing method and terminal
CN110602401A (en) Photographing method and terminal
CN107730460B (en) Image processing method and mobile terminal
CN108449541B (en) Panoramic image shooting method and mobile terminal
CN107948505B (en) Panoramic shooting method and mobile terminal
CN107846583B (en) Image shadow compensation method and mobile terminal
CN108924414B (en) Shooting method and terminal equipment
CN108040209B (en) Shooting method and mobile terminal
CN107749046B (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
CN110213485B (en) Image processing method and terminal
CN109819166B (en) Image processing method and electronic equipment
CN109474784B (en) Preview image processing method and terminal equipment
CN111246102A (en) Shooting method, shooting device, electronic equipment and storage medium
CN109005355B (en) Shooting method and mobile terminal
CN108174110B (en) Photographing method and flexible screen terminal

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