WO2018103197A1 - Photograph-capture control method and terminal - Google Patents

Photograph-capture control method and terminal Download PDF

Info

Publication number
WO2018103197A1
WO2018103197A1 PCT/CN2017/073954 CN2017073954W WO2018103197A1 WO 2018103197 A1 WO2018103197 A1 WO 2018103197A1 CN 2017073954 W CN2017073954 W CN 2017073954W WO 2018103197 A1 WO2018103197 A1 WO 2018103197A1
Authority
WO
WIPO (PCT)
Prior art keywords
focus
camera
flash
exposure
time
Prior art date
Application number
PCT/CN2017/073954
Other languages
French (fr)
Chinese (zh)
Inventor
黄晓峰
Original Assignee
深圳市金立通信设备有限公司
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 深圳市金立通信设备有限公司 filed Critical 深圳市金立通信设备有限公司
Publication of WO2018103197A1 publication Critical patent/WO2018103197A1/en

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/67Focus control based on electronic image sensor signals
    • 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

Definitions

  • the present invention relates to the field of image processing, and in particular, to a photographing control method and a terminal.
  • the embodiment of the invention provides a camera control method and a terminal, which can improve the background blur effect of the image in a dark environment.
  • a first aspect of the embodiments of the present invention provides a photographing control method, including:
  • a second aspect of the embodiments of the present invention provides a terminal, including:
  • a first control unit configured to control the camera to be out of focus, and to continue exposure, wherein the defocusing continues for a first length of time
  • a second control unit configured to control the camera to focus, and illuminate the flash, wherein the focus continues for a second length of time
  • a processing unit for ending the exposure to obtain a target image A processing unit for ending the exposure to obtain a target image.
  • a third aspect of the embodiments of the present invention provides a terminal, including:
  • a processor coupled to the memory
  • the processor invokes the executable program code stored in the memory to perform some or all of the steps of the photographing control method as described in the first aspect.
  • the camera can be controlled to defocus and continuously expose, wherein the defocusing continues for a first time length, the camera is controlled to focus, and the flash is illuminated, wherein the focus is continued for a second time length, the flash is turned off, and the exposure is ended. , get the target image.
  • a background blur image with better effect can be obtained in a dark environment.
  • FIG. 1 is a schematic flow chart of a first embodiment of a photographing control method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart diagram of a second embodiment of a photographing control method according to an embodiment of the present invention
  • FIG. 2a is a timing diagram of a rear curtain synchronization mode according to an embodiment of the present invention.
  • FIG. 2b is a timing diagram of a front curtain synchronization mode according to an embodiment of the present invention.
  • 2c is a timing diagram of an intermediate synchronization mode according to an embodiment of the present invention.
  • 2d is a timing diagram of a stroboscopic mode provided by an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart diagram of a third embodiment of a photographing control method according to an embodiment of the present invention.
  • FIG. 4a is a schematic structural diagram of a first embodiment of a terminal according to an embodiment of the present invention.
  • FIG. 4b is still another schematic structural diagram of the terminal depicted in FIG. 4a according to an embodiment of the present invention.
  • FIG. 4c is still another schematic structural diagram of the terminal depicted in FIG. 4a according to an embodiment of the present disclosure
  • FIG. 4d is still another schematic structural diagram of the terminal depicted in FIG. 4a according to an embodiment of the present disclosure
  • FIG. 5 is a schematic structural diagram of a second embodiment of a terminal according to an embodiment of the present invention.
  • the terminal described in the embodiment of the present invention may include a smart phone (such as an Android mobile phone, an iOS mobile phone, a Windows Phone mobile phone, etc.), a tablet computer, a palmtop computer, a notebook computer, a mobile Internet device (MID, Mobile Internet Devices), or a wearable device.
  • a smart phone such as an Android mobile phone, an iOS mobile phone, a Windows Phone mobile phone, etc.
  • a tablet computer such as an Android mobile phone, an iOS mobile phone, a Windows Phone mobile phone, etc.
  • a palmtop computer such as a notebook computer
  • MID Mobile Internet Devices
  • the terminal may be provided with a camera, the camera may include at least a lens and an image sensor, and the lens may be used for focusing, defocusing, exposing, etc.
  • the image sensor includes a plurality of photosensitive units, and each photosensitive unit corresponds to one pixel.
  • the terminal controls the camera to start exposure the photosensitive unit of the image sensor starts to expose.
  • the photosensitive unit of the image sensor is not exposed at the same time, but each exposure unit starts to have different exposure time and end exposure time. There may be some photosensitive cells that have finished exposing, and some of the photosensitive cells may still be exposed.
  • the focus and defocus control of the camera are described below, and can be controlled by using a lens focus motor of the camera.
  • the focus motor generally has an ultrasonic motor, a stepping motor and a voice coil (Voice Coil Motor). , VCM) motor.
  • VCM voice Coil Motor
  • the camera module of the mobile phone can use a VCM motor.
  • the VCM motor controls the entire movement of the lens to take about 10-30 milliseconds.
  • the degree of defocus of the above control lens defocusing determines the degree of background blur.
  • the lens can be controlled to the maximum degree of out of focus.
  • the current portrait is at 1.5 meters, and the lens can be controlled.
  • the lens motor's stroke covers the macro and infinity, leaving a certain margin.
  • the lens motor can be controlled to move to the mechanical end of the telephoto end, or to the mechanical end of the near focal length. Which is specific? One end can be determined according to the actual situation.
  • the handheld terminal can be implemented.
  • the tripod can be used to implement the terminal. If the tripod is used to fix the terminal, a similar or even better effect can be obtained. The main reason is that the tripod can be avoided due to the process of the handheld terminal.
  • Image motion blur caused by hand shake also known as hand shake blur).
  • CMOS complementary metal oxide semiconductor
  • flash a flash
  • lens focus state there are three typical synchronization modes in a sequential synchronization manner of a typical complementary metal oxide semiconductor (CMOS) image sensor, a flash, and a lens focus state. They are called rear curtain sync mode, front curtain sync mode and intermediate sync mode.
  • the flash must be lit during the period in which each line of pixels is in the exposure state. Otherwise, the flash energy obtained by each line of pixels is not the same, then the brightness of the pixels of different lines may be different.
  • rear curtain synchronization, front curtain synchronization, and intermediate synchronization is that the motion smear of the near body is distributed on which side of the clear body.
  • the smear of the rear curtain synchronization is distributed in the opposite direction of the moving direction of the moving body, and the front curtain synchronization is reversed. There are smear on both sides of the middle synchronous motion direction. Which synchronization method needs to be selected depends on the user's preference, different users like different smear effects, and some users do not care about this smear. Spreading the smear on either side of the clear body helps to weaken the smear effect and make the image look clearer.
  • the exposure time of the first line and the bottom line of the rolling shutter CMOS image sensor is sequential and not synchronized, and the image sensor of the global shutter is all exposed at the same time.
  • FIG. 1 is a schematic flowchart diagram of a first embodiment of a photographing control method according to an embodiment of the present invention.
  • the photographing control method described in this embodiment includes the following steps:
  • the terminal can control the camera to defocus, and the image captured by the camera will become blurred after the defocusing, so that the user can feel the background blur effect, wherein the defocus can last for the first time length, the first time
  • the length can be set by the system default or by the user.
  • the exposure can also correspond to an exposure time.
  • the exposure duration is at least greater than or equal to the length of time between the exposure of the bottommost row of pixels of the image sensor of the image sensor and the end exposure of the first row of pixels.
  • the exposure may be performed simultaneously while controlling the camera to be out of focus.
  • one thread can be used to control the camera out of focus, another thread is used to control the exposure, and two threads are synchronized.
  • one process can be used to control the camera out of focus, another process is used to control the exposure, and the two processes are synchronized.
  • control camera defocusing and exposure synchronization can be realized, and the advantage of synchronization is that at the beginning of defocusing, the photosensitive unit of the image sensor can be exposed to the exposure, so that in step 101, as much as possible The photosensitive unit is exposed.
  • the first preset time period is separated, and then the exposure is continued.
  • the first preset time period is as short as possible, wherein the first preset time period may be 0.01 seconds and 0.0095 seconds. , 0.0085 seconds, 0.0092 seconds, and so on.
  • the camera can be controlled to focus and the flash is illuminated, wherein the flash is continuously lit, and optionally, the brightness of the flash can remain unchanged during the continuous lighting process, of course, It may also be in a change, and the length of the focus duration is the second length of time.
  • the flash can be illuminated simultaneously while controlling the focus of the camera.
  • one thread can be used to control the camera to focus, and another thread can be used to illuminate the flash, and the two threads are synchronized.
  • one process can be used to control the focus of the camera, and another process can be used to illuminate the flash, and the two processes are synchronized. In this way, it is possible to control the camera to focus and illuminate the flash simultaneously, and the advantage of the synchronization is that the surrounding environment is brightened at the beginning of the focusing, and thus the focusing can be achieved more quickly.
  • the second preset time period is separated, and then the flash is turned on.
  • the second preset time period is as short as possible, wherein the second preset time period may be 0.01 seconds and 0.0095. Seconds, 0.0085 seconds, 0.0092 seconds, and so on.
  • the image data collected by each photosensitive unit in the image sensor, and the image data is processed by a series of image algorithms to obtain a target image, wherein the image algorithm processing can refer to the prior art, that is, Usually, the terminal performs a series of processing on the original image data collected by the image sensor to obtain a final image.
  • the exposure time may be greater than the first time length, and the exposure time may be greater than the second time length. Of course, the exposure time may also be greater than the sum of the first time length and the second time length.
  • the foregoing steps 101 and 102 may include the following steps:
  • step 102 It is detected whether all the photosensitive cells of the image sensor have started exposure, and if so, step 102 is performed.
  • the accuracy of the focusing in step 102 can be improved, and the focusing speed can be accelerated.
  • a delay time can be preset to detect whether the bottom line pixel starts to be exposed. If it starts, it can be determined that all the photosensitive units have started according to the characteristics of the image sensor of the rolling shutter. exposure.
  • all pixels in the sensor begin to be exposed after the frame sync signal arrives. Therefore, it can be detected based on the control signal whether or not all the photosensitive cells have started exposure.
  • the foregoing steps 101 and 102 may include the following steps:
  • step 102 when all the pixels are exposed, the process of step 102 can be performed, focus is achieved, the flash is turned on, used to enhance the brightness of the dark environment, the exposure speed can be accelerated, and the focusing speed and accuracy can be improved.
  • the image sensor of the rolling shutter there are two cases where only a part of the photosensitive unit is being exposed, other pixels have stopped exposing, or have not started to be exposed, for example: 1. The first line of pixels has begun to be exposed, the bottom is The row pixels have not yet begun to be exposed; 2. The first row of pixels has ended exposure and the bottom row of pixels is being exposed. In both cases, the focus and the flash can be off.
  • the exposure duration and the flash illumination duration can be set by the system default or by the user.
  • the longer the flash is lit the brighter the image, but the blurring may be exacerbated.
  • the bigger the brightness of the flash the better. If you want to reduce the brightness of the image, you can pass This is achieved by shortening the length of time the flash is lit.
  • the switching time of an LED flash is usually on the order of microseconds, allowing precise control of time. Considering the problem of heat generation, the LED flash should not be lit for more than 0.1 second at full load, and the cooling time for two full-load lighting is recommended to be no less than 3 seconds to avoid damage to the LED flash.
  • the terminal can default sensor parameters (such as: exposure duration, flash duration, color, etc.), of course, the user's preferences can be mapped to the sensor data, and then, in actual use, the relevant sensor is used and called
  • the mapping relationship may be divided into multiple levels according to the ambient brightness, and each level corresponds to a set of sensor data, and a correspondence relationship between the ambient brightness and the sensor data is established. Then, as long as the current ambient brightness is known, it can be known which A set of sensor parameters.
  • the target image is obtained, and the following steps may be further included:
  • the third time length may be the same as or different from the first time length
  • the fourth time length may be the same as or different from the second time length
  • the third time length and the fourth time length may be defaulted by the system or the user. Set it yourself.
  • the flash is fired multiple times in the exposure interval, and the lens is also ensured to be in focus during the flashing of the flash, it is out of focus in other time slots (ie, the above process is N times).
  • the above process is N times.
  • the flash and the lens focusing device can be synchronously controlled during the image sensor exposure process, and the background blurring effect under low illumination is realized, which has the advantages of natural blur effect, less image noise, clear image subject, and the like.
  • the scheme is highly reliable, and the embodiment of the invention can have high reliability under low illumination.
  • the embodiment of the present invention does not require any image fusion technology, and an optical background blurred image can be output by single frame imaging.
  • a control lighting flash is employed.
  • the exposure time is set to 0.1 second
  • the flash is illuminated for 30 milliseconds
  • the movement time of the lens VCM motor from defocus to focus is synchronously controlled by about 20 milliseconds.
  • the flash is only illuminated when the focus is achieved, and the target image is obtained.
  • the background may be dark in a dark environment, but it has a background blur effect.
  • the exposure time is increased to 2 seconds, the flash is illuminated for 30 milliseconds, and the movement time of the lens VCM motor from defocus to focus is synchronously controlled for about 20 milliseconds, and the flash is illuminated when the focus is achieved.
  • the background is out of focus for most of the time period, so the background is defocused in the final image, and the foreground is illuminated for 30 milliseconds under the flash light.
  • the energy corresponding to the motion smear is much less than the energy of the flash. Therefore, the foreground Clear, the background also has a defocused effect.
  • the exposure time is short, and the background is dark.
  • the duration of the flash is used to enhance close-up subjects, such as brightening portraits, and thus can further assist in achieving focus and help increase the energy of the pixels corresponding to the photosensitive cells in the image sensor.
  • the camera can be controlled to defocus and continuously expose, wherein the defocusing continues for a first time length, after the first time length, the camera is controlled to focus, and the flash is illuminated, wherein the focus continues for the second time.
  • the length of time, after the second length of time, turn off the flash and end the exposure to get the target image.
  • FIG. 2 it is a schematic flowchart of a second embodiment of a photographing control method according to an embodiment of the present invention.
  • the photographing control method described in this embodiment includes the following steps:
  • illuminating the flash can be implemented as follows:
  • the exposure is ended to obtain a target image.
  • a timing diagram of an embodiment of the present invention is implemented in a rear-curtain synchronization mode.
  • the horizontal axis t represents time
  • the vertical axis represents row coding
  • the horizontal axis t represents time
  • the vertical axis represents High and low level, low level does not light, high level lights
  • the horizontal axis t represents time
  • the vertical axis represents defocus or focus
  • the shaded area can represent rolling shutter CMOS All lines of the image sensor are in the exposed area.
  • this shaded area also exists, and there is no unsynchronized area.
  • Embodiments of the present invention can be implemented by simply illuminating the flash in a time zone that is about to end in this shaded area and controlling the lens to focus. As can be seen from Figure 2a, the flash and focus are illuminated during the time period within the shaded area.
  • the timing diagram of the embodiment of the present invention is implemented in the front curtain synchronization mode.
  • the horizontal axis t represents time
  • the vertical axis represents row coding
  • the horizontal axis t represents time
  • the vertical axis represents High and low level, low level does not light, high level lights
  • the horizontal axis t represents time
  • the vertical axis represents out-of-focus or focus
  • the shaded area can represent all lines of the rolling shutter CMOS image sensor Both are in the exposed area.
  • Embodiments of the present invention can be implemented by simply illuminating the flash in a time zone beginning with this shaded area and controlling the lens to focus. It can be seen from Fig. 2b that the flash is illuminated during the time period in the shaded area, and the focus is first focused and then defocused.
  • the timing diagram of the embodiment of the present invention is implemented in the intermediate synchronization mode.
  • the horizontal axis t represents time
  • the vertical axis represents row coding
  • the horizontal axis t represents time and the vertical axis represents high and low.
  • Level, low level does not light, high level lights
  • the horizontal axis t represents time
  • the vertical axis represents defocus or focus
  • the shaded area can represent all the lines of the rolling shutter CMOS image sensor In the exposed area.
  • Embodiments of the present invention can be implemented by simply illuminating the flash in a certain time zone intermediate the shaded area and controlling the lens to focus.
  • the motion smear in the image may just be evenly distributed on both sides of the clear target. It can be seen from Fig. 2c that the flash is illuminated during the time period in the shaded area, and the focus is first focused and then defocused.
  • FIG. 2d is a timing diagram of an embodiment of the present invention in a stroboscopic mode.
  • the horizontal axis t represents time
  • the vertical axis represents row coding
  • the timing of the flash state horizontal axis t Indicates the time
  • the vertical axis indicates high and low level
  • the low level does not light
  • the high level lights for the timing of the lens
  • the horizontal axis t represents time
  • the vertical axis represents defocus or focus
  • the flash is repeated multiple times during the exposure time. And also ensure that the lens is in focus during the flashing process, and is out of focus in other time slots.
  • the camera can be controlled to defocus and continuously expose, wherein the defocusing continues for a first time length, after the first time length, the camera is controlled to focus, and the flash is illuminated, wherein the focus continues for the second time.
  • the length of time, after the second time length, turns off the flash, and controls the camera to defocus for a third time length. After the third time length ends, the exposure ends, and the target image is obtained. Thereby, a background blur image with better effect can be obtained in a dark environment, and the blurring effect is more remarkable due to two defocuss.
  • FIG. 3 it is a schematic flowchart of a third embodiment of a photographing control method according to an embodiment of the present invention.
  • the photographing control method described in this embodiment includes the following steps:
  • the focus position can be selected in the preview image by human-computer interaction.
  • the preview image may be face-recognized, and the detected face position is used as a focus position.
  • the exposure duration can be determined by photometric techniques.
  • the main principle of the metering technology is as follows: assuming that the reflectance of the measured light area is 18%, the metering is performed by this ratio and then the aperture and shutter values are determined.
  • the aperture and the shutter are related, in the same illumination. Under the condition, the larger the aperture value, the smaller the shutter value, that is, the shorter the exposure time, and if the aperture value is smaller, the shutter value is larger, that is, the exposure time is longer. 18% of this value is based on the reflection of the midtones (gray tone) in the natural scene.
  • the second time length may also be determined according to the photometric technique. Generally, the shorter the exposure time, the shorter the second time length and the longer the exposure time, the longer the second time length.
  • the terminal may include different metering modes, and the metering range and adaptability are also different for different metering modes.
  • the “Evaluation Metering” mode which is set by default, is centered on the AF point used for autofocus, focusing on the focus of the subject while taking into account the overall balance of the screen for metering.
  • the metering value is calculated using an advanced algorithm and converted to the exposure duration.
  • the narrowest metering range is the “spot metering” mode, which only responds to the central portion of the brightness.
  • the evaluation metering mode is sufficient. Spot metering can be used when you want to quickly get a proper exposure for a specific subject in a specific scene such as backlighting. If it is a general landscape photography, it is convenient to select the evaluation metering mode. However, if the scene is complex and interlaced, it is better to use the spot metering mode.
  • the exposure duration can also be determined according to the ambient brightness.
  • the ambient brightness may be obtained by an ambient light sensor, or may be obtained by performing a photometric estimation by a preview image of the image sensor under the condition of no flash, that is, calculating an average brightness of the preview image as the current ambient brightness.
  • the second time length may be determined by the terminal according to the distance information calculation and the preset rule to determine the flash lighting duration.
  • the lighting duration of the flash corresponding to the current distance that is, the second time length, may be determined according to the mapping relationship between the distance information and the lighting duration of the flash.
  • the ranging function can be set in advance. Before measuring the object distance, that is, the distance between the target object and the camera, the distance measurement function is turned on, the camera is aimed at the object to be tested, that is, the target object, and the target object is obtained by detecting the current user operation instruction, thereby triggering the pair.
  • the target object performs focusing, for example, when detecting that the user clicks on an object on the display screen as the target object, and triggers focusing on the target object.
  • the contrast of the image acquired by the camera is associated with the motor position.
  • the mapping relationship between the contrast and the motor position can be preset, and the contrast of the image corresponding to the different motor positions can be obtained by adjusting the position of the built-in motor of the camera.
  • the motor is adjusted to the maximum image contrast, that is, the image is the clearest, that is, The image distance corresponding to the target object may be determined according to the motor position corresponding to the maximum contrast value.
  • the motor can be restored to the initial position, and then the motor is sequentially moved to the left by one step (here, the initial position is assumed to be at the rightmost position), and the contrast of the preview image obtained by each moving motor is respectively obtained, and the contrast is obtained from the contrast.
  • the maximum contrast value is determined, and the number of motor steps corresponding to the maximum contrast value is obtained, so that the image distance corresponding to the target object is calculated according to the initial position of the motor and the number of steps of the motor.
  • a difference between the image distance and the focal length of the lens may be obtained by acquiring a product of the image distance and a lens focal length set in advance, and the quotient of the product and the difference is used as the The object distance between the target object and the lens.
  • the second length of time may also be determined by a distance between the subject and the terminal, wherein depth information corresponding to the preview image may be acquired, and a distance between the subject and the terminal is determined according to the depth information, and the distance is further Then, the second time length is longer, and the shorter the distance, the shorter the second time length.
  • the color of the flash is determined based on the color information of the current ambient light.
  • step 302 can also determine color information of a flash or the like.
  • flash color information can be determined according to ambient light color information, as follows:
  • a mapping relationship between the color information of the ambient light and the color of the flash is set in advance, and then the color of the flash may be determined according to the mapping relationship. In this way, the color of the flash is matched with the environment, and the photographing effect is better.
  • the embodiment of the present invention can first determine the focus position, the second time length, the exposure time, control the camera defocus, and continue exposure with the exposure duration, wherein the defocus continues for the first time length, and the camera is controlled to The focus position is focused to illuminate the flash, wherein the focus continues for the second length of time, the flash is turned off, the camera is again controlled for a third time length of focus, and the exposure is ended to obtain a target image.
  • a background blur image with better effect can be obtained in a dark environment, and the blurring effect is more remarkable due to two defocuss.
  • the device for implementing the photographing control method provided by the embodiment of the present invention is as follows:
  • FIG. 4 is a schematic structural diagram of a first embodiment of a terminal according to an embodiment of the present invention.
  • the terminal described in this embodiment includes: a first control unit 401, a second control unit 402, a shutdown unit 403, and a processing unit 404, as follows:
  • a first control unit 401 configured to control the camera to be out of focus, and to continue exposure, wherein the defocusing continues for a first length of time
  • a second control unit 402 configured to control the camera to focus, illuminate the flash, wherein the focus continues for a second time length
  • a closing unit 403, configured to turn off the flash
  • the processing unit 404 is configured to end the exposure to obtain a target image.
  • FIG. 4b is a modified structure of the terminal described in FIG. 4a, and FIG. 4b may further include: a third control unit 405, as follows:
  • the third control unit 405 is configured to control the camera to continue to defocus for a third time length after the closing unit 403 turns off the flash, and the processing unit 404 ends the exposure to obtain the mesh. Target image.
  • FIG. 4c is a modified structure of the terminal described in FIG. 4a, and FIG. 4c further includes: a first detecting unit 406, as follows:
  • a first detecting unit 406 configured to: after the first control unit 401 controls the camera to be out of focus, and continuously exposes, detecting that all the photosensitive cells of the image sensor are in an exposed state, if the detection result of the first detecting unit 406 is Yes, the camera controls the focus by the second control unit 402 to illuminate the flash.
  • FIG. 4d is a modified structure of the terminal described in FIG. 4a, and FIG. 4d may further include: a fourth control unit 407 and a determining unit 408, as follows:
  • the fourth control unit 407 is configured to control the camera to perform pre-focusing to obtain a focus position before the first control unit 401 controls the camera to defocus and continuously expose the exposure;
  • the determining unit 408 is configured to determine an exposure duration of the exposure and the second length of time.
  • the first control unit 401, the second control unit 402, and the shutdown unit 403 is configured to perform the following process N times, where N is a positive integer:
  • the first control unit 401 controls the camera to be out of focus, wherein the defocusing continues for a third time length
  • the second control unit 402 controls the camera to focus, and illuminates the flash, wherein the focus continues for a fourth time length
  • the closing unit 403 turns off the flash.
  • the terminal described in the embodiment of the present invention can control the camera to defocus and continuously expose, wherein the defocusing continues for a first time length, the camera is controlled to focus, and the flash is illuminated, wherein the focus is continued for a second time length, and the focus is turned off. Flash, end exposure, get the target image. Thereby, a background blur image with better effect can be obtained in a dark environment.
  • FIG. 5 is a schematic structural diagram of a second embodiment of a terminal according to an embodiment of the present invention.
  • the terminal described in this embodiment includes: at least one input device 1000; at least one output device 2000; at least one processor 3000, such as a CPU; and a memory 4000, the input device 1000, the output device 2000, the processor 3000, and the memory 4000 is connected via bus 5000.
  • the input device 1000 may be a touch panel, a physical button, or a mouse.
  • the output device 2000 described above may specifically be a display screen.
  • the above memory 4000 may be a high speed RAM memory or a non-volatile memory such as a magnetic disk memory.
  • the above memory 4000 is used to store a set of program codes, and the input device 1000, the output device 2000, and the processor 3000 are used to call the program code stored in the memory 4000, and perform the following operations:
  • the processor 3000 is configured to:
  • the processor 3000 is further configured to: after the turning off the flash, and ending the exposure to obtain a target image, further specifically:
  • the camera is controlled to continue to defocus for a third length of time.
  • the processor 3000 is further configured to: after the control camera is out of focus and continues to be exposed, and before the controlling the camera to focus and illuminate the flash,
  • the method further includes:
  • the exposure duration of the exposure and the second length of time are determined.
  • the method is further specifically configured to:
  • the input device 1000, the output device 2000, and the processor 3000 described in the embodiments of the present invention may perform the first embodiment and the first method of the photographing control method provided by the embodiment of the present invention.
  • the implementations of the terminal described in the first embodiment of the present invention may also be implemented in the implementation manners in the second embodiment and the third embodiment, and details are not described herein again.
  • the units in all the embodiments of the present invention may be implemented by a general-purpose integrated circuit, such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).
  • a general-purpose integrated circuit such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).
  • the units in the terminal in the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Abstract

Provided is a photograph-capture control method, said method comprising: controlling a camera to defocus and continue to expose, sustaining said defocus for a first length of time (101); controlling the camera to focus and illuminating the flashlamp, sustaining said focus for a second length of time (102); turning off said flashlamp (103); ending exposure to obtain a target image (104). Also provided is a terminal. By means of the photograph-capture control method and terminal, it is possible to obtain a blurred background image in a dark environment.

Description

一种拍照控制方法及终端Photograph control method and terminal
本申请要求于2016年12月08日提交中国专利局、申请号为201611119481.3发明名称为“一种拍照控制方法及终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 2016-1111948, the entire disclosure of which is incorporated herein by reference.
技术领域Technical field
本发明涉及图像处理领域,具体涉及一种拍照控制方法及终端。The present invention relates to the field of image processing, and in particular, to a photographing control method and a terminal.
背景技术Background technique
随着信息技术快速发展,终端(如手机、平板电脑等)使用越来越频繁。随着用户对生活品质的追求,对终端的要求也越来越高,不仅要求终端的处理速度更快,也对终端的拍照功能提出了更高要求。目前来看,虽然采用双摄像头可实现背景虚化效果,其在实现背景虚化过程中,通常会采用抠图算法和深度提取算法,但是,在暗环境情况下,抠图算法和深度提取算法准确性较差且鲁棒性差,导致背景虚化效果较差。With the rapid development of information technology, terminals (such as mobile phones, tablets, etc.) are used more and more frequently. With the pursuit of quality of life, the requirements for the terminal are getting higher and higher, which not only requires the processing speed of the terminal to be faster, but also puts higher requirements on the camera function of the terminal. At present, although the dual camera can achieve the background blur effect, in the process of background blur, the map algorithm and the depth extraction algorithm are usually used, but in the dark environment, the map algorithm and the depth extraction algorithm are used. The accuracy is poor and the robustness is poor, resulting in poor background blurring.
发明内容Summary of the invention
本发明实施例提供了一种拍照控制方法及终端,可在暗环境下,提升图像的背景虚化效果。The embodiment of the invention provides a camera control method and a terminal, which can improve the background blur effect of the image in a dark environment.
本发明实施例第一方面提供了一种拍照控制方法,包括:A first aspect of the embodiments of the present invention provides a photographing control method, including:
控制摄像头离焦,并持续曝光,其中,所述离焦持续第一时间长度;Controlling the camera to be out of focus and continuously exposing, wherein the defocusing continues for a first length of time;
控制所述摄像头合焦,点亮闪光灯,其中,所述合焦持续第二时间长度;Controlling the camera to focus, lighting the flash, wherein the focus continues for a second length of time;
关闭所述闪光灯;Turning off the flash;
结束曝光,得到目标图像。End the exposure and get the target image.
本发明实施例第二方面提供了一种终端,包括:A second aspect of the embodiments of the present invention provides a terminal, including:
第一控制单元,用于控制摄像头离焦,并持续曝光,其中,所述离焦持续第一时间长度;a first control unit, configured to control the camera to be out of focus, and to continue exposure, wherein the defocusing continues for a first length of time;
第二控制单元,用于控制所述摄像头合焦,并点亮闪光灯,其中,所述合焦持续第二时间长度; a second control unit, configured to control the camera to focus, and illuminate the flash, wherein the focus continues for a second length of time;
关闭单元,用于关闭所述闪光灯;a closing unit for turning off the flash;
处理单元,用于结束曝光,得到目标图像。A processing unit for ending the exposure to obtain a target image.
本发明实施例第三方面提供了一种终端,包括:A third aspect of the embodiments of the present invention provides a terminal, including:
存储有可执行程序代码的存储器;a memory storing executable program code;
与所述存储器耦合的处理器;a processor coupled to the memory;
所述处理器调用所述存储器中存储的所述可执行程序代码,执行如第一方面所描述的拍照控制方法的部分或者全部步骤。The processor invokes the executable program code stored in the memory to perform some or all of the steps of the photographing control method as described in the first aspect.
实施本发明实施例,具有如下有益效果:Embodiments of the present invention have the following beneficial effects:
通过本发明实施例可控制摄像头离焦,并持续曝光,其中,该离焦持续第一时间长度,控制摄像头合焦,点亮闪光灯,其中,合焦持续第二时间长度,关闭闪光灯,结束曝光,得到目标图像。从而,可在暗环境下,得到效果更好的背景虚化图像。The camera can be controlled to defocus and continuously expose, wherein the defocusing continues for a first time length, the camera is controlled to focus, and the flash is illuminated, wherein the focus is continued for a second time length, the flash is turned off, and the exposure is ended. , get the target image. Thereby, a background blur image with better effect can be obtained in a dark environment.
附图说明DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are some embodiments of the present invention, Those skilled in the art can also obtain other drawings based on these drawings without paying any creative work.
图1是本发明实施例提供的一种拍照控制方法的第一实施例流程示意图;1 is a schematic flow chart of a first embodiment of a photographing control method according to an embodiment of the present invention;
图2是本发明实施例提供的一种拍照控制方法的第二实施例流程示意图;FIG. 2 is a schematic flowchart diagram of a second embodiment of a photographing control method according to an embodiment of the present invention; FIG.
图2a是本发明实施例提供的后帘同步模式的时序图;2a is a timing diagram of a rear curtain synchronization mode according to an embodiment of the present invention;
图2b是本发明实施例提供的前帘同步模式的时序图;2b is a timing diagram of a front curtain synchronization mode according to an embodiment of the present invention;
图2c是本发明实施例提供的中间同步模式的时序图;2c is a timing diagram of an intermediate synchronization mode according to an embodiment of the present invention;
图2d是本发明实施例提供的频闪模式的时序图;2d is a timing diagram of a stroboscopic mode provided by an embodiment of the present invention;
图3是本发明实施例提供的一种拍照控制方法的第三实施例流程示意图;FIG. 3 is a schematic flowchart diagram of a third embodiment of a photographing control method according to an embodiment of the present invention; FIG.
图4a是本发明实施例提供的一种终端的第一实施例结构示意图;4a is a schematic structural diagram of a first embodiment of a terminal according to an embodiment of the present invention;
图4b是本发明实施例提供的图4a所描述的终端的又一结构示意图;FIG. 4b is still another schematic structural diagram of the terminal depicted in FIG. 4a according to an embodiment of the present invention; FIG.
图4c是本发明实施例提供的图4a所描述的终端的又一结构示意图;FIG. 4c is still another schematic structural diagram of the terminal depicted in FIG. 4a according to an embodiment of the present disclosure;
图4d是本发明实施例提供的图4a所描述的终端的又一结构示意图; FIG. 4d is still another schematic structural diagram of the terminal depicted in FIG. 4a according to an embodiment of the present disclosure;
图5是本发明实施例提供的一种终端的第二实施例结构示意图。FIG. 5 is a schematic structural diagram of a second embodiment of a terminal according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明实施例所描述的终端可以包括智能手机(如Android手机、iOS手机、Windows Phone手机等)、平板电脑、掌上电脑、笔记本电脑、移动互联网设备(MID,Mobile Internet Devices)或穿戴式设备等,上述终端仅是举例,而非穷举,包含但不限于上述终端。The terminal described in the embodiment of the present invention may include a smart phone (such as an Android mobile phone, an iOS mobile phone, a Windows Phone mobile phone, etc.), a tablet computer, a palmtop computer, a notebook computer, a mobile Internet device (MID, Mobile Internet Devices), or a wearable device. The above terminals are merely examples, not exhaustive, and include but are not limited to the above terminals.
需要说明的是,终端可设置有摄像头,该摄像头至少可包含镜头及图像传感器,镜头可用来合焦、离焦、曝光等等,图像传感器包含多个感光单元,每一感光单元对应一个像素,在终端控制摄像头开始曝光时,图像传感器的感光单元即开始进行曝光,通常情况下,图像传感器的感光单元并非同时曝光的,而是每一感光单元开始曝光时长和结束曝光时长不一样,因而,可能有的感光单元已经结束曝光,而有的感光单元可能仍然还在曝光。It should be noted that the terminal may be provided with a camera, the camera may include at least a lens and an image sensor, and the lens may be used for focusing, defocusing, exposing, etc., the image sensor includes a plurality of photosensitive units, and each photosensitive unit corresponds to one pixel. When the terminal controls the camera to start exposure, the photosensitive unit of the image sensor starts to expose. Generally, the photosensitive unit of the image sensor is not exposed at the same time, but each exposure unit starts to have different exposure time and end exposure time. There may be some photosensitive cells that have finished exposing, and some of the photosensitive cells may still be exposed.
可选地,本发明实施例中,以下对摄像头的合焦与离焦控制加以说明,可以使用摄像头的镜头对焦马达来控制,对焦马达一般有超声波马达,步进电机及音圈(Voice Coil Motor,VCM)马达。例如,针对手机而言,手机的摄像头模组可使用VCM马达,通常情况下,VCM马达控制镜头运动整个行程需要10-30毫秒左右。当然,还可以使用步进马达或者超声波马达来推动摄像头的镜头移动。在镜头移动的过程中,可实现不同的对焦。上面的控制镜头失焦的环节的失焦程度决定了背景虚化的程度,如果用户希望大的背景虚化程度,可控制镜头最大程度失焦,例如当前人像在1.5米处,可以控制镜头对焦移动到近端的尽头,一般来说镜头马达的行程都覆盖了微距和无穷远,还留有一定裕量。在不确保损坏镜头的境况下,为了达到增大模糊程度的目的,可以控制镜头马达移动到远焦端的机械尽头,也可以移动到近焦段的机械尽头。具体取哪 一端,可依据实际情况而定。本发明实施例中可以手持终端进行实施,当然,可以用三脚架固定终端进行实施,若采用三脚架固定终端则可以获得相似,甚至更好的效果,主要原因在于,三脚架可避免因手持终端过程中由于手抖造成的图像运动模糊(又称为手抖模糊)。Optionally, in the embodiment of the present invention, the focus and defocus control of the camera are described below, and can be controlled by using a lens focus motor of the camera. The focus motor generally has an ultrasonic motor, a stepping motor and a voice coil (Voice Coil Motor). , VCM) motor. For example, for a mobile phone, the camera module of the mobile phone can use a VCM motor. Generally, the VCM motor controls the entire movement of the lens to take about 10-30 milliseconds. Of course, you can also use a stepper motor or an ultrasonic motor to push the lens of the camera. Different focus can be achieved during the movement of the lens. The degree of defocus of the above control lens defocusing determines the degree of background blur. If the user wants a large background blur, the lens can be controlled to the maximum degree of out of focus. For example, the current portrait is at 1.5 meters, and the lens can be controlled. Moving to the end of the near end, in general, the lens motor's stroke covers the macro and infinity, leaving a certain margin. In order to achieve the purpose of increasing the degree of blurring without ensuring damage to the lens, the lens motor can be controlled to move to the mechanical end of the telephoto end, or to the mechanical end of the near focal length. Which is specific? One end can be determined according to the actual situation. In the embodiment of the present invention, the handheld terminal can be implemented. Of course, the tripod can be used to implement the terminal. If the tripod is used to fix the terminal, a similar or even better effect can be obtained. The main reason is that the tripod can be avoided due to the process of the handheld terminal. Image motion blur caused by hand shake (also known as hand shake blur).
需要说明的是,本发明实施例中,以典型的互补金属氧化物半导体(Complementary Metal Oxide Semiconductor,CMOS)图像传感器、闪光灯、镜头对焦状态三者的时序同步方式,分别有三种典型的同步模式,分别称为后帘同步模式,前帘同步模式和中间同步模式。闪光灯必须在每一行像素都处于曝光状态的时间段点亮,否则,每行像素点获取到的闪光灯能量不相同,那么,拍摄出来的图像,其不同行的像素点的亮度可能不一样。后帘同步,前帘同步,和中间同步的主要区别是,近处主体的运动拖影分布在清晰主体的哪一边。后帘同步的拖影分布在运动主体的运动方向的反方向,前帘同步则相反。中间同步运动方向两侧都有拖影。究竟需要选择哪种同步方式,取决于用户的喜好,不同用户喜欢不同拖影效果,也有的用户不在乎这种拖影的方式。将拖影分布在清晰主体两侧,则能帮助弱化拖影效应,使图像看起来更清楚。卷帘式快门(rolling shutter)CMOS图像传感器第一行和最底行像素的曝光时刻是有先后顺序的,并不同步,全局快门的图像传感器则所有像素全部同时曝光。It should be noted that, in the embodiment of the present invention, there are three typical synchronization modes in a sequential synchronization manner of a typical complementary metal oxide semiconductor (CMOS) image sensor, a flash, and a lens focus state. They are called rear curtain sync mode, front curtain sync mode and intermediate sync mode. The flash must be lit during the period in which each line of pixels is in the exposure state. Otherwise, the flash energy obtained by each line of pixels is not the same, then the brightness of the pixels of different lines may be different. The main difference between rear curtain synchronization, front curtain synchronization, and intermediate synchronization is that the motion smear of the near body is distributed on which side of the clear body. The smear of the rear curtain synchronization is distributed in the opposite direction of the moving direction of the moving body, and the front curtain synchronization is reversed. There are smear on both sides of the middle synchronous motion direction. Which synchronization method needs to be selected depends on the user's preference, different users like different smear effects, and some users do not care about this smear. Spreading the smear on either side of the clear body helps to weaken the smear effect and make the image look clearer. The exposure time of the first line and the bottom line of the rolling shutter CMOS image sensor is sequential and not synchronized, and the image sensor of the global shutter is all exposed at the same time.
以下仅以列举卷帘式快门的同步方式,当然,全局快门实现同步方式更简单,因为不存在行曝光不同步问题,也可以使用本发明实施例中的拍照控制方法。In the following, only the synchronous mode of the rolling shutter is listed. Of course, the global shutter realizes the synchronization mode more simply, because there is no line exposure unsynchronization problem, and the photographing control method in the embodiment of the present invention can also be used.
请参阅图1,为本发明实施例提供的一种拍照控制方法的第一实施例流程示意图。本实施例中所描述的拍照控制方法,包括以下步骤:FIG. 1 is a schematic flowchart diagram of a first embodiment of a photographing control method according to an embodiment of the present invention. The photographing control method described in this embodiment includes the following steps:
101、控制摄像头离焦,并持续曝光,其中,所述离焦持续第一时间长度。101. Control the camera to be out of focus and continue to expose, wherein the defocusing continues for a first length of time.
其中,终端可控制摄像头离焦,在离焦之后摄像头拍摄到的图像会变得模糊,如此,可使用户感觉到背景虚化效果,其中,离焦可持续第一时间长度,该第一时间长度可由系统默认或者用户自行设置。其中,曝光也可以对应一个曝光时长。曝光时长至少大于或等于图像传感器的感光单元的最底行像素开始曝光到第一行像素结束曝光之间的时间长度。 Wherein, the terminal can control the camera to defocus, and the image captured by the camera will become blurred after the defocusing, so that the user can feel the background blur effect, wherein the defocus can last for the first time length, the first time The length can be set by the system default or by the user. Among them, the exposure can also correspond to an exposure time. The exposure duration is at least greater than or equal to the length of time between the exposure of the bottommost row of pixels of the image sensor of the image sensor and the end exposure of the first row of pixels.
可选地,在控制摄像头离焦的同时,可同步进行曝光。例如,可采用一个线程用于控制摄像头离焦,采用另一线程用于控制曝光,两个线程同步进行。又例如,可采用一个进程用于控制摄像头离焦,采用另一进程用于控制曝光,两个进程同步进行。如此,可实现控制摄像头离焦和曝光同步进行,同步进行的好处是,在离焦开始的时候,就可以让图像传感器的感光单元开始曝光,如此,可在步骤101中,可让尽可能多的感光单元进行曝光。Alternatively, the exposure may be performed simultaneously while controlling the camera to be out of focus. For example, one thread can be used to control the camera out of focus, another thread is used to control the exposure, and two threads are synchronized. As another example, one process can be used to control the camera out of focus, another process is used to control the exposure, and the two processes are synchronized. In this way, control camera defocusing and exposure synchronization can be realized, and the advantage of synchronization is that at the beginning of defocusing, the photosensitive unit of the image sensor can be exposed to the exposure, so that in step 101, as much as possible The photosensitive unit is exposed.
可选地,控制摄像头离焦之后,间隔第一预设时间段,再持续曝光,当然,第一预设时间段越短越好,其中,第一预设时间段可为0.01秒、0.0095秒、0.0085秒、0.0092秒等等。Optionally, after the camera is out of focus, the first preset time period is separated, and then the exposure is continued. Of course, the first preset time period is as short as possible, wherein the first preset time period may be 0.01 seconds and 0.0095 seconds. , 0.0085 seconds, 0.0092 seconds, and so on.
102、控制所述摄像头合焦,点亮闪光灯,其中,所述合焦持续第二时间长度。102. Control the camera to focus, and illuminate the flash, wherein the focus continues for a second time length.
其中,在第一时间长度结束后,可控制摄像头合焦,并点亮闪光灯,其中,闪光灯是持续点亮,可选地,在持续点亮过程中,闪光灯的亮度可保持不变,当然,也可以是处于变化的,上述合焦持续时间长度为第二时间长度。Wherein, after the end of the first time length, the camera can be controlled to focus and the flash is illuminated, wherein the flash is continuously lit, and optionally, the brightness of the flash can remain unchanged during the continuous lighting process, of course, It may also be in a change, and the length of the focus duration is the second length of time.
可选地,在控制摄像头合焦的同时,可同步点亮闪光灯。例如,可采用一个线程用于控制摄像头合焦,采用另一线程用于点亮闪光灯,两个线程同步进行。又例如,可采用一个进程用于控制摄像头合焦,采用另一进程用于点亮闪光灯,两个进程同步进行。如此,可实现控制摄像头合焦和点亮闪光灯同步进行,同步进行的好处是,在合焦开始的时候,周围环境会变亮,因而,可更快地实现合焦。Alternatively, the flash can be illuminated simultaneously while controlling the focus of the camera. For example, one thread can be used to control the camera to focus, and another thread can be used to illuminate the flash, and the two threads are synchronized. As another example, one process can be used to control the focus of the camera, and another process can be used to illuminate the flash, and the two processes are synchronized. In this way, it is possible to control the camera to focus and illuminate the flash simultaneously, and the advantage of the synchronization is that the surrounding environment is brightened at the beginning of the focusing, and thus the focusing can be achieved more quickly.
可选地,控制摄像头合焦之后,间隔第二预设时间段,再点亮闪光灯,当然,第二预设时间段越短越好,其中,第二预设时间段可为0.01秒、0.0095秒、0.0085秒、0.0092秒等等。Optionally, after the camera is controlled to focus, the second preset time period is separated, and then the flash is turned on. Of course, the second preset time period is as short as possible, wherein the second preset time period may be 0.01 seconds and 0.0095. Seconds, 0.0085 seconds, 0.0092 seconds, and so on.
需要说明的是,在暗环境下,当不使用闪光灯时,如果曝光时长短,则图像中的噪点就比较多,如果使用闪光灯,图像中就很有可能出现运动模糊。It should be noted that in a dark environment, when the flash is not used, if the exposure time is short, there is more noise in the image. If the flash is used, motion blur is likely to occur in the image.
103、关闭所述闪光灯。103. Turn off the flash.
其中,可检测第二时间长度是否结束,若是,则关闭闪光灯。Among them, it can be detected whether the second time length is over, and if so, the flash is turned off.
可选地,在关闭闪光灯时,图像传感器中的部分感光单元尚未结束曝光。Alternatively, when the flash is turned off, some of the photosensitive cells in the image sensor have not ended the exposure.
104、结束曝光,得到目标图像。 104. End exposure to obtain a target image.
其中,上述结束曝光后,可由图像传感器中的每一感光单元采集的图像数据,并该图像数据进行一系列的图像算法处理,得到目标图像,其中,该图像算法处理可参考现有技术,即通常情况下,终端均会对图像传感器采集的原始图像数据进行一系列的处理,得到最终的图像。上述曝光时长可大于第一时间长度,该曝光时长可大于第二时间长度,当然,曝光时长也可以大于第一时间长度与第二时间长度之和。After the end of the exposure, the image data collected by each photosensitive unit in the image sensor, and the image data is processed by a series of image algorithms to obtain a target image, wherein the image algorithm processing can refer to the prior art, that is, Usually, the terminal performs a series of processing on the original image data collected by the image sensor to obtain a final image. The exposure time may be greater than the first time length, and the exposure time may be greater than the second time length. Of course, the exposure time may also be greater than the sum of the first time length and the second time length.
可选地,上述步骤101与步骤102之间,可包含如下步骤:Optionally, the foregoing steps 101 and 102 may include the following steps:
检测图像传感器的所有感光单元是否已经开始曝光,若是,执行步骤102。It is detected whether all the photosensitive cells of the image sensor have started exposure, and if so, step 102 is performed.
其中,在图像传感器的所有感光单元均已开始曝光时,可以提升步骤102中合焦的准确率,以及加快合焦速度。具体地,可通过帧同步信号来检测图像传感器的所有感光单元是否已经全部开始曝光。对于卷帘式快门的图像传感器,可以预设一个延迟时间,来检测最底行像素是否开始曝光,如果开始了,可根据卷帘式快门的图像传感器的特性,确定所有的感光单元都已经开始曝光。对于全局快门的图像传感器,帧同步信号到来之后传感器中所有像素就全部开始曝光。因此,可以根据控制信号来检测是否所有感光单元已经开始曝光。Wherein, when all the photosensitive cells of the image sensor have started to expose, the accuracy of the focusing in step 102 can be improved, and the focusing speed can be accelerated. Specifically, it is possible to detect whether all the photosensitive cells of the image sensor have all started exposure by the frame synchronization signal. For the image sensor of the rolling shutter, a delay time can be preset to detect whether the bottom line pixel starts to be exposed. If it starts, it can be determined that all the photosensitive units have started according to the characteristics of the image sensor of the rolling shutter. exposure. For an image sensor with a global shutter, all pixels in the sensor begin to be exposed after the frame sync signal arrives. Therefore, it can be detected based on the control signal whether or not all the photosensitive cells have started exposure.
可选地,上述步骤101与步骤102之间,可包含如下步骤:Optionally, the foregoing steps 101 and 102 may include the following steps:
检测图像传感器的所有感光单元中是否存在至少一个感光单元结束曝光,若是,执行步骤102。Detecting whether at least one photosensitive unit is present in all of the photosensitive cells of the image sensor ends the exposure, and if so, executing step 102.
其中,可在所有的像素都在曝光的时候,执行步骤102的过程,合焦,打开闪光灯,用于提升暗环境亮度,可加快曝光速度,提升合焦速度和准确率。对于卷帘式快门的图像传感器而言,有两种情况下,只有一部分感光单元正在曝光,其他像素已经停止曝光,或者还没有开始曝光,例如:1、第一行像素已经开始曝光,最底行像素还没有开始曝光;2、第一行像素已经结束曝光,最底行像素正在曝光。这两种情况下,可不进行合焦和点亮闪光灯。Wherein, when all the pixels are exposed, the process of step 102 can be performed, focus is achieved, the flash is turned on, used to enhance the brightness of the dark environment, the exposure speed can be accelerated, and the focusing speed and accuracy can be improved. For the image sensor of the rolling shutter, there are two cases where only a part of the photosensitive unit is being exposed, other pixels have stopped exposing, or have not started to be exposed, for example: 1. The first line of pixels has begun to be exposed, the bottom is The row pixels have not yet begun to be exposed; 2. The first row of pixels has ended exposure and the bottom row of pixels is being exposed. In both cases, the focus and the flash can be off.
可选地,值得注意的是,曝光时长和闪光灯点亮时长可以由系统默认或者用户自行设置。在相同条件下曝光时长越长,背景亮度越高,设置更低的感光度ISO和更长的曝光时长,可以在背景亮度相当的情况下,获得更佳的信噪比。在ISO相同的情况下,闪光灯点亮时长越长,图像越亮,但运动模糊可能也会加重。通常来说,闪光灯亮度越大越好,如果希望调低图像亮度,可以通 过缩短闪光灯点亮的时长来实现。以发光二极管(Light-Emitting Diode,LED)闪光灯为例,LED闪光灯的开关时间通常是微秒数量级,可精确控制时间。考虑到发热的问题,LED闪光灯满负荷点亮的时间不要超过0.1秒,且两次满负荷点亮的冷却时间建议不小于3秒,以免损害该LED闪光灯。终端可默认传感器参数(如:曝光时长,闪光灯点亮时长,及颜色等),当然,还可将用户的喜好与传感器数据实现建立映射关系,然后,在实际使用时,使用相关传感器,并调用上述映射关系,例如,可依据环境亮度分为多个等级,每一等级对应一组传感器数据,建立环境亮度与传感器数据之间的对应关系,那么,只要知道当前环境亮度,便可以知道采用哪一组传感器参数。Optionally, it is worth noting that the exposure duration and the flash illumination duration can be set by the system default or by the user. The longer the exposure time under the same conditions, the higher the background brightness, the lower the sensitivity ISO and the longer the exposure time, and the better the signal-to-noise ratio can be obtained with the same background brightness. In the case of the same ISO, the longer the flash is lit, the brighter the image, but the blurring may be exacerbated. Generally speaking, the bigger the brightness of the flash, the better. If you want to reduce the brightness of the image, you can pass This is achieved by shortening the length of time the flash is lit. Taking a Light-Emitting Diode (LED) flash as an example, the switching time of an LED flash is usually on the order of microseconds, allowing precise control of time. Considering the problem of heat generation, the LED flash should not be lit for more than 0.1 second at full load, and the cooling time for two full-load lighting is recommended to be no less than 3 seconds to avoid damage to the LED flash. The terminal can default sensor parameters (such as: exposure duration, flash duration, color, etc.), of course, the user's preferences can be mapped to the sensor data, and then, in actual use, the relevant sensor is used and called The mapping relationship may be divided into multiple levels according to the ambient brightness, and each level corresponds to a set of sensor data, and a correspondence relationship between the ambient brightness and the sensor data is established. Then, as long as the current ambient brightness is known, it can be known which A set of sensor parameters.
可选地,在上述步骤103,关闭所述闪光灯之后,以及上述步骤104结束曝光后,得到目标图像之前,还可以包含如下步骤:Optionally, after the flash is turned off in the above step 103, and after the exposing of the step 104, the target image is obtained, and the following steps may be further included:
执行如下流程N次,所述N为正整数:Perform the following procedure N times, where N is a positive integer:
控制摄像头离焦,其中,所述离焦持续第三时间长度;Controlling the camera to be out of focus, wherein the defocusing continues for a third length of time;
控制所述摄像头合焦,点亮闪光灯,其中,所述合焦持续第四时间长度;Controlling the camera to focus, lighting the flash, wherein the focus continues for a fourth time length;
关闭所述闪光灯。Turn off the flash.
其中,上述第三时间长度可与上述第一时间长度相同或者不同,上述第四时间长度可与上述第二时间长度相同或者不同,上述第三时间长度和第四时间长度均可由系统默认或者用户自行设置。The third time length may be the same as or different from the first time length, and the fourth time length may be the same as or different from the second time length, and the third time length and the fourth time length may be defaulted by the system or the user. Set it yourself.
进一步地,若在曝光区间内闪光多次,且同样保证镜头在闪光灯点亮过程中合焦,在其他时隙内离焦(即上述流程N次)。几次闪光时间内,如果被拍摄目标有一定偏移,则可以达到在同一被拍摄目标在同一画面中出现多次的效果。且背景虚化。Further, if the flash is fired multiple times in the exposure interval, and the lens is also ensured to be in focus during the flashing of the flash, it is out of focus in other time slots (ie, the above process is N times). In a few flash times, if there is a certain offset in the subject, it is possible to achieve the effect that the same subject appears multiple times in the same screen. And the background is blurred.
本发明实施例,可在图像传感器曝光过程中同步控制闪光灯和镜头对焦装置,实现了低照度下背景虚化的拍摄效果,具有虚化效果自然,图像噪点少,图像主体清晰等优点,与双摄像头,及抠图虚化的方案比较,无需复杂计算,本方案可靠性高,本发明实施例可在低照度下也具有极高的可靠性。另外,本发明实施例不需要借助任何图像融合的技术,单帧成像即可输出光学的背景虚化图像。 In the embodiment of the invention, the flash and the lens focusing device can be synchronously controlled during the image sensor exposure process, and the background blurring effect under low illumination is realized, which has the advantages of natural blur effect, less image noise, clear image subject, and the like. Compared with the scheme of the camera and the virtual blur, the scheme is highly reliable, and the embodiment of the invention can have high reliability under low illumination. In addition, the embodiment of the present invention does not require any image fusion technology, and an optical background blurred image can be output by single frame imaging.
在实施本发明实施例的过程中,为了减少图像的噪点以及减少主体的运动模糊,采用了控制点亮闪光灯。In the process of implementing the embodiments of the present invention, in order to reduce the noise of the image and reduce the motion blur of the subject, a control lighting flash is employed.
以下针对同一环境、同一场景的不同情况为例加以说明,具体如下:The following describes the different situations in the same environment and the same scenario as follows:
第一种情况,若采用本发明实施例中的拍照控制方法,将曝光时长设置为0.1秒,闪光灯点亮30毫秒,并同步控制了镜头VCM马达从离焦到合焦的运动时间约20毫秒,并合焦的时候闪光灯才点亮,得到目标图像。其中,由于曝光时间短,可能在暗环境下背景较暗,但是具有背景虚化效果。In the first case, if the photographing control method in the embodiment of the present invention is adopted, the exposure time is set to 0.1 second, the flash is illuminated for 30 milliseconds, and the movement time of the lens VCM motor from defocus to focus is synchronously controlled by about 20 milliseconds. The flash is only illuminated when the focus is achieved, and the target image is obtained. Among them, due to the short exposure time, the background may be dark in a dark environment, but it has a background blur effect.
第二种情况,曝光时长增加到了2秒,闪光灯点亮30毫秒,并同步控制了镜头VCM马达从离焦到合焦的运动时间约20毫秒,合焦的时候闪光灯才点亮。背景在大部分时间段内是离焦的,因此最终图像中背景时散焦的,前景在闪光灯强光下被照亮30毫秒,运动拖影对应的能量远远小于闪光灯的能量,因此,前景清晰,背景也具有了离焦模糊的效果。In the second case, the exposure time is increased to 2 seconds, the flash is illuminated for 30 milliseconds, and the movement time of the lens VCM motor from defocus to focus is synchronously controlled for about 20 milliseconds, and the flash is illuminated when the focus is achieved. The background is out of focus for most of the time period, so the background is defocused in the final image, and the foreground is illuminated for 30 milliseconds under the flash light. The energy corresponding to the motion smear is much less than the energy of the flash. Therefore, the foreground Clear, the background also has a defocused effect.
由上可知,在执行本发明实施例的过程中,对曝光时间、闪光灯的持续时间有一定的要求,曝光时间较短,背景较暗。闪光灯的持续时间用于增强近处拍摄目标,例如提亮人像,因此,可进一步辅助完成合焦,并且有助于提升图像传感器中感光单元对应的像素点的能量。It can be seen from the above that in the process of executing the embodiment of the present invention, there are certain requirements on the exposure time and the duration of the flash, the exposure time is short, and the background is dark. The duration of the flash is used to enhance close-up subjects, such as brightening portraits, and thus can further assist in achieving focus and help increase the energy of the pixels corresponding to the photosensitive cells in the image sensor.
通过本发明实施例可控制摄像头离焦,并持续曝光,其中,该离焦持续第一时间长度,在第一时间长度后,控制摄像头合焦,并点亮闪光灯,其中,合焦持续第二时间长度,在第二时间长度后,关闭闪光灯,结束曝光,得到目标图像。从而,可在暗环境下,得到效果更好的背景虚化图像。The camera can be controlled to defocus and continuously expose, wherein the defocusing continues for a first time length, after the first time length, the camera is controlled to focus, and the flash is illuminated, wherein the focus continues for the second time. The length of time, after the second length of time, turn off the flash and end the exposure to get the target image. Thereby, a background blur image with better effect can be obtained in a dark environment.
与上述一致地,参阅图2,为本发明实施例提供的一种拍照控制方法的第二实施例流程示意图。本实施例中所描述的拍照控制方法,包括以下步骤:With reference to FIG. 2, it is a schematic flowchart of a second embodiment of a photographing control method according to an embodiment of the present invention. The photographing control method described in this embodiment includes the following steps:
201、控制摄像头离焦,并持续曝光,其中,所述离焦持续第一时间长度。201. Control the camera to be out of focus and continue to expose, wherein the defocusing continues for a first length of time.
202、控制所述摄像头合焦,点亮闪光灯,其中,所述合焦持续第二时间长度。202. Control the camera to focus, and illuminate the flash, wherein the focus continues for a second time length.
203、关闭所述闪光灯。203. Turn off the flash.
可选地,点亮闪光灯,可按照如下方式实施:Optionally, illuminating the flash can be implemented as follows:
多次点亮闪光灯,例如,点亮-熄灭-点亮-熄灭,如此,可得到图2d中所 描述的效果。Light up the flash multiple times, for example, light-off-light-off-off, so that you can get the picture in Figure 2d Describe the effect.
204、控制所述摄像头持续离焦第三时间长度。204. Control the camera to continue to defocus for a third time length.
205、在所述第三时间长度后,结束曝光,得到目标图像。205. After the third time length, the exposure is ended to obtain a target image.
以下结合上述三种同步模式(后帘同步模式,前帘同步模式和中间同步模式),具体对本发明实施例进行说明:The following describes the embodiments of the present invention in combination with the above three synchronization modes (the rear curtain synchronization mode, the front curtain synchronization mode, and the intermediate synchronization mode):
如图2a,后帘同步模式下实施本发明实施例的时序图,针对曝光的时序,横轴t表示时间,纵轴表示行编码;针对闪光灯状态的时序,横轴t表示时间,纵轴表示高低电平,低电平不点亮,高电平点亮;针对镜头的时序,横轴t表示时间,纵轴表示离焦或合焦,阴影区域可表示卷帘式快门(rolling shutter)CMOS图像传感器所有行都在曝光的区域。当然,对于全局快门的图像传感器,这个阴影区域也同样存在的,而且,其不存在不同步区域。只要选在在这个阴影区域即将结束的一个时间区域内点亮闪光灯并且控制镜头合焦即可实现本发明实施例。由图2a可以看出,在阴影区域内所处时间段点亮闪光灯和合焦。2a, a timing diagram of an embodiment of the present invention is implemented in a rear-curtain synchronization mode. For the timing of exposure, the horizontal axis t represents time, the vertical axis represents row coding, and for the timing of the flash state, the horizontal axis t represents time, and the vertical axis represents High and low level, low level does not light, high level lights; for the timing of the lens, the horizontal axis t represents time, the vertical axis represents defocus or focus, and the shaded area can represent rolling shutter CMOS All lines of the image sensor are in the exposed area. Of course, for an image sensor of the global shutter, this shaded area also exists, and there is no unsynchronized area. Embodiments of the present invention can be implemented by simply illuminating the flash in a time zone that is about to end in this shaded area and controlling the lens to focus. As can be seen from Figure 2a, the flash and focus are illuminated during the time period within the shaded area.
如图2b,前帘同步模式下实施本发明实施例的时序图,针对曝光的时序,横轴t表示时间,纵轴表示行编码;针对闪光灯状态的时序,横轴t表示时间,纵轴表示高低电平,低电平不点亮,高电平点亮;针对镜头的时序,横轴t表示时间,纵轴表示离焦或合焦,阴影区域可表示卷帘式快门CMOS图像传感器所有行都在曝光的区域。只要选在在这个阴影区域开始的一个时间区域内点亮闪光灯并且控制镜头合焦即可实现本发明实施例。由图2b可以看出,在阴影区域内所处时间段点亮闪光灯、先合焦再离焦。2b, the timing diagram of the embodiment of the present invention is implemented in the front curtain synchronization mode. For the timing of exposure, the horizontal axis t represents time, the vertical axis represents row coding, and for the timing of the flash state, the horizontal axis t represents time, and the vertical axis represents High and low level, low level does not light, high level lights; for the timing of the lens, the horizontal axis t represents time, the vertical axis represents out-of-focus or focus, and the shaded area can represent all lines of the rolling shutter CMOS image sensor Both are in the exposed area. Embodiments of the present invention can be implemented by simply illuminating the flash in a time zone beginning with this shaded area and controlling the lens to focus. It can be seen from Fig. 2b that the flash is illuminated during the time period in the shaded area, and the focus is first focused and then defocused.
如图2c,中间同步模式下实施本发明实施例的时序图,针对曝光的时序,横轴t表示时间,纵轴表示行编码;针对闪光灯状态的时序,横轴t表示时间,纵轴表示高低电平,低电平不点亮,高电平点亮;针对镜头的时序,横轴t表示时间,纵轴表示离焦或合焦,阴影区域可表示卷帘式快门CMOS图像传感器所有行都在曝光的区域。只要选在在这个阴影区域中间的某一个时间区域内点亮闪光灯并且控制镜头合焦即可实现本发明实施例。如果选择正中间的区域,且运动目标做匀速运动,则图像中的运动拖影可能刚好均匀分布在清晰目标两侧。由图2c可以看出,在阴影区域内所处时间段点亮闪光灯、先合焦再离焦。 2c, the timing diagram of the embodiment of the present invention is implemented in the intermediate synchronization mode. For the timing of the exposure, the horizontal axis t represents time, the vertical axis represents row coding, and for the timing of the flash state, the horizontal axis t represents time and the vertical axis represents high and low. Level, low level does not light, high level lights; for the timing of the lens, the horizontal axis t represents time, the vertical axis represents defocus or focus, and the shaded area can represent all the lines of the rolling shutter CMOS image sensor In the exposed area. Embodiments of the present invention can be implemented by simply illuminating the flash in a certain time zone intermediate the shaded area and controlling the lens to focus. If you select the area in the middle and the moving target moves at a constant speed, the motion smear in the image may just be evenly distributed on both sides of the clear target. It can be seen from Fig. 2c that the flash is illuminated during the time period in the shaded area, and the focus is first focused and then defocused.
可选地,如图2d,图2d是频闪模式下实施本发明实施例的时序图,针对曝光的时序,横轴t表示时间,纵轴表示行编码;针对闪光灯状态的时序,横轴t表示时间,纵轴表示高低电平,低电平不点亮,高电平点亮;针对镜头的时序,横轴t表示时间,纵轴表示离焦或合焦,在曝光时长内闪光多次,且同样保证镜头在闪光灯点亮过程中合焦,在其他时隙内离焦。几次闪光时间内,如果被拍摄目标有一定偏移,则可以达到在同一被拍摄目标在同一画面中出现多次的效果。且背景虚化。由图2d可以看出,在阴影区域内所处时间段点亮闪光灯两次,可以得到同一被拍摄目标在同一画面中出现多次的效果。Optionally, as shown in FIG. 2d, FIG. 2d is a timing diagram of an embodiment of the present invention in a stroboscopic mode. For the timing of exposure, the horizontal axis t represents time, the vertical axis represents row coding, and the timing of the flash state, horizontal axis t Indicates the time, the vertical axis indicates high and low level, the low level does not light, and the high level lights; for the timing of the lens, the horizontal axis t represents time, the vertical axis represents defocus or focus, and the flash is repeated multiple times during the exposure time. And also ensure that the lens is in focus during the flashing process, and is out of focus in other time slots. In a few flash times, if there is a certain offset in the subject, it is possible to achieve the effect that the same subject appears multiple times in the same screen. And the background is blurred. It can be seen from Fig. 2d that the flash is illuminated twice in the time zone within the shaded area, and the effect that the same subject is appearing multiple times in the same picture can be obtained.
通过本发明实施例可控制摄像头离焦,并持续曝光,其中,该离焦持续第一时间长度,在第一时间长度后,控制摄像头合焦,并点亮闪光灯,其中,合焦持续第二时间长度,在第二时间长度后,关闭闪光灯,再次控制摄像头离焦第三时间长度,在该第三时间长度结束后,结束曝光,得到目标图像。从而,可在暗环境下,得到效果更好的背景虚化图像,并且,由于两次离焦,虚化效果更加明显。The camera can be controlled to defocus and continuously expose, wherein the defocusing continues for a first time length, after the first time length, the camera is controlled to focus, and the flash is illuminated, wherein the focus continues for the second time. The length of time, after the second time length, turns off the flash, and controls the camera to defocus for a third time length. After the third time length ends, the exposure ends, and the target image is obtained. Thereby, a background blur image with better effect can be obtained in a dark environment, and the blurring effect is more remarkable due to two defocuss.
与上述一致地,请参阅图3,为本发明实施例提供的一种拍照控制方法的第三实施例流程示意图。本实施例中所描述的拍照控制方法,包括以下步骤:With reference to FIG. 3, it is a schematic flowchart of a third embodiment of a photographing control method according to an embodiment of the present invention. The photographing control method described in this embodiment includes the following steps:
301、控制摄像头进行合焦,以得到合焦位置。301. Control the camera to perform focusing to obtain a focus position.
可选地,在终端控制摄像头对焦时,可通过人机互动方式在预览图像中选取合焦位置。Optionally, when the terminal controls the camera to focus, the focus position can be selected in the preview image by human-computer interaction.
可选地,在终端控制摄像头对焦时,可对预览图像进行人脸识别,将检测到的人脸位置作为合焦位置。Optionally, when the terminal controls the camera to focus, the preview image may be face-recognized, and the detected face position is used as a focus position.
302、确定曝光时长和第二时间长度。302. Determine an exposure duration and a second length of time.
可选地,可通过测光技术确定曝光时长。其中,测光技术的主要原理如下:假设所测光区域的反光率都是18%,通过这个比例进行测光随后确定光圈和快门的数值,光圈和快门是有相关联系的,在同样的光照条件下,光圈值越大,则快门值越小,即曝光时间越短,而如果光圈值越小,快门值则越大,即曝光时间越长。18%这个数值来源是根据自然景物中中间调(灰色调)的反光表现而定,如果取景画面中白色调居多,那么反射光线将超过18%,如果是全白 场景,可以反射大约90%的入射光,而如果是黑色场景,可能反射率只有百分之几。进一步地,还可以根据测光技术确定第二时间长度,通常情况下,曝光时间越短,则第二时间长度越短,曝光时间越长,则第二时间长度越长。Alternatively, the exposure duration can be determined by photometric techniques. Among them, the main principle of the metering technology is as follows: assuming that the reflectance of the measured light area is 18%, the metering is performed by this ratio and then the aperture and shutter values are determined. The aperture and the shutter are related, in the same illumination. Under the condition, the larger the aperture value, the smaller the shutter value, that is, the shorter the exposure time, and if the aperture value is smaller, the shutter value is larger, that is, the exposure time is longer. 18% of this value is based on the reflection of the midtones (gray tone) in the natural scene. If the white color of the viewfinder is mostly, the reflected light will exceed 18%, if it is all white The scene can reflect about 90% of the incident light, and if it is a black scene, the reflectivity is only a few percent. Further, the second time length may also be determined according to the photometric technique. Generally, the shorter the exposure time, the shorter the second time length and the longer the exposure time, the longer the second time length.
进一步地,现有技术中,终端可包含不同的测光模式,针对不同的测光模式,测光范围和适应性也有所区别。几乎可应用于所有拍摄场景的是默认设置的“评价测光”模式,以自动对焦时所用的自动对焦点为中心,注重合焦被摄体的同时考虑到画面整体平衡进行测光,根据其测光值采用高级算法计算,转换得到曝光时长。测光范围最狭窄的是“点测光”模式,只对中央的部分亮度有反应。一般用评价测光模式就可以了。但逆光等特定场景下想要迅速让特定被摄体获得恰当的曝光时,可以使用点测光。如果是一般的风光摄影,选择评价测光模式拍摄比较方便。但如果是光影复杂交错的场景使用点测光模式是比较好的选择。Further, in the prior art, the terminal may include different metering modes, and the metering range and adaptability are also different for different metering modes. Applicable to almost all shooting scenes, the “Evaluation Metering” mode, which is set by default, is centered on the AF point used for autofocus, focusing on the focus of the subject while taking into account the overall balance of the screen for metering. The metering value is calculated using an advanced algorithm and converted to the exposure duration. The narrowest metering range is the “spot metering” mode, which only responds to the central portion of the brightness. Generally, the evaluation metering mode is sufficient. Spot metering can be used when you want to quickly get a proper exposure for a specific subject in a specific scene such as backlighting. If it is a general landscape photography, it is convenient to select the evaluation metering mode. However, if the scene is complex and interlaced, it is better to use the spot metering mode.
可选地,还可以根据环境亮度确定曝光时长,环境亮度越亮,则曝光时长越短,环境亮度越暗,则曝光时长越短。其中,环境亮度可由环境光传感器获取,或者,可由图像传感器在无闪光灯的条件下拍摄的预览图像进行测光估算得到,即计算预览图像的平均亮度作为当前环境亮度。Optionally, the exposure duration can also be determined according to the ambient brightness. The brighter the ambient brightness, the shorter the exposure duration, and the darker the ambient brightness, the shorter the exposure duration. The ambient brightness may be obtained by an ambient light sensor, or may be obtained by performing a photometric estimation by a preview image of the image sensor under the condition of no flash, that is, calculating an average brightness of the preview image as the current ambient brightness.
可选地,上述第二时间长度可由终端根据距离信息计算及预设规则确定闪光灯点亮时长。在距离信息确定之后,可按照距离信息与闪光灯的点亮时长之间的映射关系,确定当前距离对应的闪光灯的点亮时长,即第二时间长度。Optionally, the second time length may be determined by the terminal according to the distance information calculation and the preset rule to determine the flash lighting duration. After the distance information is determined, the lighting duration of the flash corresponding to the current distance, that is, the second time length, may be determined according to the mapping relationship between the distance information and the lighting duration of the flash.
以下为距离信息的确定方式:The following is how the distance information is determined:
1、检测用户从摄像头采集的预览图像中选定的目标对象,并对所述目标对象进行对焦。1. Detecting a target object selected by a user from a preview image acquired by the camera, and focusing the target object.
具体实施例中,可预先设置测距功能。在需要测量物距即目标对象与摄像头之间的距离之前,则开启该测距功能,将摄像头对准需要测试的物体即目标对象,并通过检测当前用户的操作指令获取目标对象,从而触发对所述目标对象进行对焦,比如可在检测到用户点击显示屏上的某一物体时将该物体作为目标对象,并触发对该目标对象进行对焦。In a specific embodiment, the ranging function can be set in advance. Before measuring the object distance, that is, the distance between the target object and the camera, the distance measurement function is turned on, the camera is aimed at the object to be tested, that is, the target object, and the target object is obtained by detecting the current user operation instruction, thereby triggering the pair. The target object performs focusing, for example, when detecting that the user clicks on an object on the display screen as the target object, and triggers focusing on the target object.
2、调整所述摄像头内置的马达的位置,获得所述马达在不同位置时所述目标对象对应的对比度。 2. Adjusting the position of the motor built in the camera to obtain the contrast corresponding to the target object when the motor is in different positions.
3、从所述对比度中确定出最大对比度值,获取所述最大对比度值对应的像距,所述像距为摄像头的镜头与传感器之间的距离。3. Determine a maximum contrast value from the contrast, and obtain an image distance corresponding to the maximum contrast value, where the image distance is a distance between a lens of the camera and the sensor.
需要说明的是,该摄像头所获取图像的对比度与该马达位置相关联。具体的,可预先设置得到该对比度与马达位置的映射关系,并通过调整摄像头内置马达的位置以获取不同马达位置所对应图像的对比度,当调整马达至图像对比度最大,即图像最清晰时,即可根据该最大对比度值对应的马达位置,确定该目标对象对应的像距。It should be noted that the contrast of the image acquired by the camera is associated with the motor position. Specifically, the mapping relationship between the contrast and the motor position can be preset, and the contrast of the image corresponding to the different motor positions can be obtained by adjusting the position of the built-in motor of the camera. When the motor is adjusted to the maximum image contrast, that is, the image is the clearest, that is, The image distance corresponding to the target object may be determined according to the motor position corresponding to the maximum contrast value.
具体的,可先将马达恢复至初始位置,然后依次推动马达向左移动一步(这里假设初始位置在最右处),分别获取每次移动马达获取得到的预览图像的对比度,并从所述对比度中确定出最大对比度值,获取所述最大对比度值所对应的马达步进数,从而根据所述马达初始位置以及所述马达步进数,计算所述目标对象对应的像距。Specifically, the motor can be restored to the initial position, and then the motor is sequentially moved to the left by one step (here, the initial position is assumed to be at the rightmost position), and the contrast of the preview image obtained by each moving motor is respectively obtained, and the contrast is obtained from the contrast. The maximum contrast value is determined, and the number of motor steps corresponding to the maximum contrast value is obtained, so that the image distance corresponding to the target object is calculated according to the initial position of the motor and the number of steps of the motor.
4、根据所述像距,计算所述目标对象与所述镜头之间的物距。4. Calculate an object distance between the target object and the lens according to the image distance.
具体实施例中,可通过获取所述像距与预先设置的镜头焦距的乘积,获取所述像距与所述镜头焦距的差值,并将所述乘积与所述差值的商作为所述目标对象与所述镜头之间的物距。In a specific embodiment, a difference between the image distance and the focal length of the lens may be obtained by acquiring a product of the image distance and a lens focal length set in advance, and the quotient of the product and the difference is used as the The object distance between the target object and the lens.
可选地,第二时间长度还可以由被拍摄主体与终端之间的距离决定,其中,可获取预览图像对应的深度信息,根据深度信息确定被拍摄主体与终端之间的距离,距离越远,则第二时间长度越来,距离越短,则第二时间长度越短。Optionally, the second length of time may also be determined by a distance between the subject and the terminal, wherein depth information corresponding to the preview image may be acquired, and a distance between the subject and the terminal is determined according to the depth information, and the distance is further Then, the second time length is longer, and the shorter the distance, the shorter the second time length.
303、控制摄像头离焦,并根据所述曝光时长持续曝光,其中,所述离焦持续第一时间长度。303. Control the camera to be out of focus, and continue exposure according to the exposure duration, wherein the defocus is continued for a first time length.
304、根据所述合焦位置进行合焦,点亮闪光灯,其中,所述合焦持续第二时间长度。304. Focusing according to the focus position to illuminate the flash, wherein the focus continues for a second time length.
305、关闭所述闪光灯。305. Turn off the flash.
306、结束曝光,得到目标图像。306. End exposure to obtain a target image.
可选地,上述步骤303之前,还可以包含如下步骤:Optionally, before the foregoing step 303, the following steps may be further included:
根据当前环境光的颜色信息确定闪光灯的颜色。The color of the flash is determined based on the color information of the current ambient light.
例如,步骤302还可以确定闪光等的颜色信息,可选地,可根据环境光颜色信息确定闪光灯颜色信息,具体如下: For example, step 302 can also determine color information of a flash or the like. Optionally, flash color information can be determined according to ambient light color information, as follows:
启动摄像头;从拍摄辅助设备获取光源的颜色数据,该颜色数据是通过设置在拍摄辅助设备上的颜色传感器采集的,颜色传感器的采集角度是用户确定的;根据该颜色数据调整补光光源的颜色;启动调整颜色后的补光光源;通过摄像头采集图像。Starting a camera; acquiring color data of the light source from the photographing auxiliary device, the color data is collected by a color sensor disposed on the photographing auxiliary device, the collection angle of the color sensor is determined by the user; and adjusting the color of the fill light source according to the color data ; Start the fill light source after adjusting the color; capture the image through the camera.
可选地,预先设置环境光的颜色信息与闪光灯的颜色之间的映射关系,然后,可根据该映射关系确定闪光灯的颜色。如此,闪光灯的颜色与环境相搭配,拍照效果更佳。Optionally, a mapping relationship between the color information of the ambient light and the color of the flash is set in advance, and then the color of the flash may be determined according to the mapping relationship. In this way, the color of the flash is matched with the environment, and the photographing effect is better.
通过本发明实施例可先确定合焦位置、第二时长时间长度、曝光时长,控制摄像头离焦,并以该曝光时长持续曝光,其中,该离焦持续第一时间长度,控制摄像头以该合焦位置进行合焦,点亮闪光灯,其中,合焦持续该第二时间长度,关闭闪光灯,再次控制摄像头离焦第三时间长度,结束曝光,得到目标图像。从而,可在暗环境下,得到效果更好的背景虚化图像,并且,由于两次离焦,虚化效果更加明显。The embodiment of the present invention can first determine the focus position, the second time length, the exposure time, control the camera defocus, and continue exposure with the exposure duration, wherein the defocus continues for the first time length, and the camera is controlled to The focus position is focused to illuminate the flash, wherein the focus continues for the second length of time, the flash is turned off, the camera is again controlled for a third time length of focus, and the exposure is ended to obtain a target image. Thereby, a background blur image with better effect can be obtained in a dark environment, and the blurring effect is more remarkable due to two defocuss.
与上述一致地,以下为实施上述本发明实施例提供的拍照控制方法的装置,具体如下:In the following, in the following, the device for implementing the photographing control method provided by the embodiment of the present invention is as follows:
请参阅图4a,为本发明实施例提供的一种终端的第一实施例结构示意图。本实施例中所描述的终端,包括:第一控制单元401、第二控制单元402、关闭单元403和处理单元404,具体如下:FIG. 4 is a schematic structural diagram of a first embodiment of a terminal according to an embodiment of the present invention. The terminal described in this embodiment includes: a first control unit 401, a second control unit 402, a shutdown unit 403, and a processing unit 404, as follows:
第一控制单元401,用于控制摄像头离焦,并持续曝光,其中,所述离焦持续第一时间长度;a first control unit 401, configured to control the camera to be out of focus, and to continue exposure, wherein the defocusing continues for a first length of time;
第二控制单元402,用于控制所述摄像头合焦,点亮闪光灯,其中,所述合焦持续第二时间长度;a second control unit 402, configured to control the camera to focus, illuminate the flash, wherein the focus continues for a second time length;
关闭单元403,用于关闭所述闪光灯;a closing unit 403, configured to turn off the flash;
处理单元404,用于结束曝光,得到目标图像。The processing unit 404 is configured to end the exposure to obtain a target image.
可选地,如图4b,图4b为图4a中所描述的终端的一种变型结构,图4b与图4a相比,还可以包括:第三控制单元405,具体如下:Optionally, as shown in FIG. 4b, FIG. 4b is a modified structure of the terminal described in FIG. 4a, and FIG. 4b may further include: a third control unit 405, as follows:
第三控制单元405,用于在所述关闭单元403关闭所述闪光灯之后,控制所述摄像头持续离焦第三时间长度,由所述处理单元404在结束曝光,得到目 标图像。The third control unit 405 is configured to control the camera to continue to defocus for a third time length after the closing unit 403 turns off the flash, and the processing unit 404 ends the exposure to obtain the mesh. Target image.
可选地,如图4c,图4c为图4a中所描述的终端的一种变型结构,图4c与图4a相比,还可以包括:第一检测单元406,具体如下:Optionally, as shown in FIG. 4c, FIG. 4c is a modified structure of the terminal described in FIG. 4a, and FIG. 4c further includes: a first detecting unit 406, as follows:
第一检测单元406,用于在所述第一控制单元401控制摄像头离焦,并持续曝光之后,检测图像传感器的所有感光单元均处于曝光状态,若所述第一检测单元406的检测结果为是,由所述第二控制单元402控制所述摄像头合焦,点亮闪光灯。a first detecting unit 406, configured to: after the first control unit 401 controls the camera to be out of focus, and continuously exposes, detecting that all the photosensitive cells of the image sensor are in an exposed state, if the detection result of the first detecting unit 406 is Yes, the camera controls the focus by the second control unit 402 to illuminate the flash.
可选地,如图4d,图4d为图4a中所描述的终端的一种变型结构,图4d与图4a相比,还可以包括:第四控制单元407和确定单元408,具体如下:Optionally, as shown in FIG. 4d, FIG. 4d is a modified structure of the terminal described in FIG. 4a, and FIG. 4d may further include: a fourth control unit 407 and a determining unit 408, as follows:
第四控制单元407,用于在所述第一控制单元401控制摄像头离焦,并持续曝光之前,控制所述摄像头进行预合焦,以得到合焦位置;The fourth control unit 407 is configured to control the camera to perform pre-focusing to obtain a focus position before the first control unit 401 controls the camera to defocus and continuously expose the exposure;
确定单元408,用于确定所述曝光的曝光时长和所述第二时间长度。The determining unit 408 is configured to determine an exposure duration of the exposure and the second length of time.
可选地,在所述关闭单元403关闭所述闪光灯之后,以及所述处理单元404结束曝光,得到目标图像之前,所述第一控制单元401、所述第二控制单元402和所述关闭单元403用于执行如下流程N次,所述N为正整数:Optionally, after the closing unit 403 turns off the flash, and the processing unit 404 ends the exposure to obtain the target image, the first control unit 401, the second control unit 402, and the shutdown unit 403 is configured to perform the following process N times, where N is a positive integer:
所述第一控制单元401,控制摄像头离焦,其中,所述离焦持续第三时间长度;The first control unit 401 controls the camera to be out of focus, wherein the defocusing continues for a third time length;
所述第二控制单元402,控制所述摄像头合焦,并点亮闪光灯,其中,所述合焦持续第四时间长度;The second control unit 402 controls the camera to focus, and illuminates the flash, wherein the focus continues for a fourth time length;
所述关闭单元403,关闭所述闪光灯。The closing unit 403 turns off the flash.
通过本发明实施例所描述的终端可控制摄像头离焦,并持续曝光,其中,该离焦持续第一时间长度,控制摄像头合焦,点亮闪光灯,其中,合焦持续第二时间长度,关闭闪光灯,结束曝光,得到目标图像。从而,可在暗环境下,得到效果更好的背景虚化图像。The terminal described in the embodiment of the present invention can control the camera to defocus and continuously expose, wherein the defocusing continues for a first time length, the camera is controlled to focus, and the flash is illuminated, wherein the focus is continued for a second time length, and the focus is turned off. Flash, end exposure, get the target image. Thereby, a background blur image with better effect can be obtained in a dark environment.
请参阅图5,为本发明实施例提供的一种终端的第二实施例结构示意图。本实施例中所描述的终端,包括:至少一个输入设备1000;至少一个输出设备2000;至少一个处理器3000,例如CPU;和存储器4000,上述输入设备1000、输出设备2000、处理器3000和存储器4000通过总线5000连接。 FIG. 5 is a schematic structural diagram of a second embodiment of a terminal according to an embodiment of the present invention. The terminal described in this embodiment includes: at least one input device 1000; at least one output device 2000; at least one processor 3000, such as a CPU; and a memory 4000, the input device 1000, the output device 2000, the processor 3000, and the memory 4000 is connected via bus 5000.
其中,上述输入设备1000具体可为触控面板、物理按键或者鼠标。The input device 1000 may be a touch panel, a physical button, or a mouse.
上述输出设备2000具体可为显示屏。The output device 2000 described above may specifically be a display screen.
上述存储器4000可以是高速RAM存储器,也可为非易失存储器(non-volatile memory),例如磁盘存储器。上述存储器4000用于存储一组程序代码,上述输入设备1000、输出设备2000和处理器3000用于调用存储器4000中存储的程序代码,执行如下操作:The above memory 4000 may be a high speed RAM memory or a non-volatile memory such as a magnetic disk memory. The above memory 4000 is used to store a set of program codes, and the input device 1000, the output device 2000, and the processor 3000 are used to call the program code stored in the memory 4000, and perform the following operations:
上述处理器3000,用于:The processor 3000 is configured to:
控制摄像头离焦,并持续曝光,其中,所述离焦持续第一时间长度;Controlling the camera to be out of focus and continuously exposing, wherein the defocusing continues for a first length of time;
控制所述摄像头合焦,点亮闪光灯,其中,所述合焦持续第二时间长度;Controlling the camera to focus, lighting the flash, wherein the focus continues for a second length of time;
关闭所述闪光灯;Turning off the flash;
结束曝光,得到目标图像。End the exposure and get the target image.
可选地,上述处理器3000在所述关闭所述闪光灯之后,以及所述结束曝光,得到目标图像之前,还具体用于:Optionally, the processor 3000 is further configured to: after the turning off the flash, and ending the exposure to obtain a target image, further specifically:
控制所述摄像头持续离焦第三时间长度。The camera is controlled to continue to defocus for a third length of time.
可选地,上述处理器3000在所述控制摄像头离焦,并持续曝光之后,以及在所述控制所述摄像头合焦,并点亮闪光灯之前,还具体用于:Optionally, the processor 3000 is further configured to: after the control camera is out of focus and continues to be exposed, and before the controlling the camera to focus and illuminate the flash,
检测图像传感器的所有感光单元是否均处于曝光状态。It is detected whether all the photosensitive cells of the image sensor are in an exposure state.
可选地,上述处理器3000控制摄像头离焦,并持续曝光之前,所述方法还包括:Optionally, before the processor 3000 controls the camera to be out of focus and continues to be exposed, the method further includes:
控制所述摄像头进行预合焦,以得到合焦位置;Controlling the camera to perform pre-focusing to obtain a focus position;
确定所述曝光的曝光时长和所述第二时间长度。The exposure duration of the exposure and the second length of time are determined.
可选地,上述处理器3000关闭所述闪光灯之后,以及所述在结束曝光后,得到目标图像之前,还具体用于:Optionally, after the processor 3000 turns off the flash, and after the end of the exposure, after obtaining the target image, the method is further specifically configured to:
执行如下流程N次,所述N为正整数:Perform the following procedure N times, where N is a positive integer:
控制摄像头离焦,其中,所述离焦持续第三时间长度;Controlling the camera to be out of focus, wherein the defocusing continues for a third length of time;
控制所述摄像头合焦,点亮闪光灯,其中,所述合焦持续第四时间长度;Controlling the camera to focus, lighting the flash, wherein the focus continues for a fourth time length;
关闭所述闪光灯。Turn off the flash.
具体实现中,本发明实施例中所描述的输入设备1000、输出设备2000和处理器3000可执行本发明实施例提供的一种拍照控制方法的第一实施例、第 二实施例和第三实施例中所描述的实现方式,也可执行本发明实施例提供的一种终端的第一实施例中所描述的终端的实现方式,在此不再赘述。In a specific implementation, the input device 1000, the output device 2000, and the processor 3000 described in the embodiments of the present invention may perform the first embodiment and the first method of the photographing control method provided by the embodiment of the present invention. The implementations of the terminal described in the first embodiment of the present invention may also be implemented in the implementation manners in the second embodiment and the third embodiment, and details are not described herein again.
本发明所有实施例中的单元,可以通过通用集成电路,例如CPU(Central Processing Unit,中央处理器),或通过ASIC(Application Specific Integrated Circuit,专用集成电路)来实现。The units in all the embodiments of the present invention may be implemented by a general-purpose integrated circuit, such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).
本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the method of the embodiment of the present invention may be sequentially adjusted, merged, and deleted according to actual needs.
本发明实施例终端中的单元可以根据实际需要进行合并、划分和删减。The units in the terminal in the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存取存储器(Random Access Memory,简称RAM)等。One of ordinary skill in the art can understand that all or part of the process of implementing the foregoing embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
以上对本发明实施例所提供的一种拍照控制方法及终端进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。 The photographing control method and the terminal provided by the embodiments of the present invention are described in detail. The principles and embodiments of the present invention are described in the following. The description of the above embodiments is only for helping to understand the present invention. The method and its core idea; at the same time, those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. In summary, the content of the specification should not be understood as Limitations of the invention.

Claims (15)

  1. 一种拍照控制方法,其特征在于,包括:A photographing control method, comprising:
    控制摄像头离焦,并持续曝光,其中,所述离焦持续第一时间长度;Controlling the camera to be out of focus and continuously exposing, wherein the defocusing continues for a first length of time;
    控制所述摄像头合焦,点亮闪光灯,其中,所述合焦持续第二时间长度;Controlling the camera to focus, lighting the flash, wherein the focus continues for a second length of time;
    关闭所述闪光灯;Turning off the flash;
    结束曝光,得到目标图像。End the exposure and get the target image.
  2. 根据权利要求1所述的方法,其特征在于,在所述关闭所述闪光灯之后,以及所述结束曝光,得到目标图像之前,所述方法还包括:The method of claim 1, wherein the method further comprises: after the turning off the flash, and ending the exposure to obtain a target image, the method further comprising:
    控制所述摄像头持续离焦第三时间长度。The camera is controlled to continue to defocus for a third length of time.
  3. 根据权利要求1所述的方法,其特征在于,在所述控制摄像头离焦,并持续曝光之后,以及在所述控制所述摄像头合焦,并点亮闪光灯之前,所述方法还包括:The method of claim 1 wherein after the controlling the camera is out of focus and continuing to be exposed, and before the controlling the camera to focus and illuminating the flash, the method further comprises:
    检测图像传感器的所有感光单元是否均处于曝光状态。It is detected whether all the photosensitive cells of the image sensor are in an exposure state.
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述控制摄像头离焦,并持续曝光之前,所述方法还包括:The method according to any one of claims 1 to 3, wherein before the controlling the camera is out of focus and continuing exposure, the method further comprises:
    控制所述摄像头进行预合焦,以得到合焦位置;Controlling the camera to perform pre-focusing to obtain a focus position;
    确定所述曝光的曝光时长和所述第二时间长度。The exposure duration of the exposure and the second length of time are determined.
  5. 根据权利要求1至3任一项所述的方法,其特征在于,所述关闭所述闪光灯之后,以及所述结束曝光,得到目标图像之前,所述方法还包括:The method according to any one of claims 1 to 3, wherein, after the flash is turned off, and the end of the exposure is performed to obtain a target image, the method further comprises:
    执行如下流程N次,所述N为正整数:Perform the following procedure N times, where N is a positive integer:
    控制摄像头离焦,其中,所述离焦持续第三时间长度;Controlling the camera to be out of focus, wherein the defocusing continues for a third length of time;
    控制所述摄像头合焦,点亮闪光灯,其中,所述合焦持续第四时间长度;Controlling the camera to focus, lighting the flash, wherein the focus continues for a fourth time length;
    关闭所述闪光灯。Turn off the flash.
  6. 一种终端,其特征在于,包括: A terminal, comprising:
    第一控制单元,用于控制摄像头离焦,并持续曝光,其中,所述离焦持续第一时间长度;a first control unit, configured to control the camera to be out of focus, and to continue exposure, wherein the defocusing continues for a first length of time;
    第二控制单元,用于控制所述摄像头合焦,点亮闪光灯,其中,所述合焦持续第二时间长度;a second control unit, configured to control the camera to focus, to illuminate the flash, wherein the focus continues for a second length of time;
    关闭单元,用于关闭所述闪光灯;a closing unit for turning off the flash;
    处理单元,用于结束曝光,得到目标图像。A processing unit for ending the exposure to obtain a target image.
  7. 根据权利要求6所述的终端,其特征在于,所述终端还包括:The terminal according to claim 6, wherein the terminal further comprises:
    第三控制单元,用于在所述关闭单元关闭所述闪光灯之后,控制所述摄像头持续离焦第三时间长度,由所述处理单元结束曝光,得到目标图像。The third control unit is configured to control the camera to continue to defocus for a third time length after the closing unit turns off the flash, and the exposure is ended by the processing unit to obtain a target image.
  8. 根据权利要求6所述的终端,其特征在于,所述终端还包括:The terminal according to claim 6, wherein the terminal further comprises:
    第一检测单元,用于在所述第一控制单元控制摄像头离焦,并持续曝光之后,检测图像传感器的所有感光单元均处于曝光状态,若所述第一检测单元的检测结果为是,由所述第二控制单元控制所述摄像头合焦,点亮闪光灯。a first detecting unit, configured to: after the first control unit controls the camera to defocus, and continuously exposes, detecting that all the photosensitive cells of the image sensor are in an exposed state, if the detection result of the first detecting unit is yes, The second control unit controls the camera to focus and illuminate the flash.
  9. 根据权利要求6至8任一项所述的终端,其特征在于,所述终端还包括:The terminal according to any one of claims 6 to 8, wherein the terminal further comprises:
    第四控制单元,用于在所述第一控制单元控制摄像头离焦,并持续曝光之前,控制所述摄像头进行预合焦,以得到合焦位置;a fourth control unit, configured to control the camera to perform pre-focusing to obtain a focus position before the first control unit controls the camera to defocus and continuously expose;
    确定单元,用于确定所述曝光的曝光时长和所述第二时间长度。a determining unit for determining an exposure duration of the exposure and the second length of time.
  10. 根据权利要求6至8任一项所述的终端,其特征在于,在所述关闭单元关闭所述闪光灯之后,以及所述处理单元结束曝光,得到目标图像之前,所述第一控制单元、所述第二控制单元和所述关闭单元用于执行如下流程N次,所述N为正整数:The terminal according to any one of claims 6 to 8, characterized in that, after the closing unit turns off the flash, and the processing unit ends the exposure to obtain a target image, the first control unit, the The second control unit and the shutdown unit are configured to perform the following process N times, where N is a positive integer:
    所述第一控制单元,控制摄像头离焦,其中,所述离焦持续第三时间长度;The first control unit controls the camera to be out of focus, wherein the defocusing continues for a third time length;
    所述第二控制单元,控制所述摄像头合焦,并点亮闪光灯,其中,所述合焦持续第四时间长度; The second control unit controls the camera to focus, and illuminates the flash, wherein the focus continues for a fourth time length;
    所述关闭单元,关闭所述闪光灯。The closing unit turns off the flash.
  11. 一种终端,其特征在于,包括:A terminal, comprising:
    存储有可执行程序代码的存储器;a memory storing executable program code;
    与所述存储器耦合的处理器;a processor coupled to the memory;
    所述处理器调用所述存储器中存储的所述可执行程序代码,执行如下步骤:The processor calls the executable program code stored in the memory, and performs the following steps:
    控制摄像头离焦,并持续曝光,其中,所述离焦持续第一时间长度;Controlling the camera to be out of focus and continuously exposing, wherein the defocusing continues for a first length of time;
    控制所述摄像头合焦,点亮闪光灯,其中,所述合焦持续第二时间长度;Controlling the camera to focus, lighting the flash, wherein the focus continues for a second length of time;
    关闭所述闪光灯;Turning off the flash;
    结束曝光,得到目标图像。End the exposure and get the target image.
  12. 根据权利要求11所述的终端,其特征在于,在所述关闭所述闪光灯之后,以及所述结束曝光,得到目标图像之前,所述处理器还具体用于:The terminal according to claim 11, wherein the processor is further configured to: after the turning off the flash, and ending the exposure to obtain a target image, the processor is further configured to:
    控制所述摄像头持续离焦第三时间长度。The camera is controlled to continue to defocus for a third length of time.
  13. 根据权利要求11所述的终端,其特征在于,在所述控制摄像头离焦,并持续曝光之后,以及在所述控制所述摄像头合焦,并点亮闪光灯之前,所述处理器还具体用于:The terminal according to claim 11, wherein said processor is further used after said control camera is out of focus and continues to be exposed, and before said controlling said camera to focus and illuminating a flash. to:
    检测图像传感器的所有感光单元是否均处于曝光状态。It is detected whether all the photosensitive cells of the image sensor are in an exposure state.
  14. 根据权利要求11至13任一项所述的终端,其特征在于,所述控制摄像头离焦,并持续曝光之前,所述处理器还具体用于:The terminal according to any one of claims 11 to 13, wherein the processor is further configured to: before the camera is out of focus and continuously exposed;
    控制所述摄像头进行预合焦,以得到合焦位置;Controlling the camera to perform pre-focusing to obtain a focus position;
    确定所述曝光的曝光时长和所述第二时间长度。The exposure duration of the exposure and the second length of time are determined.
  15. 根据权利要求11至13任一项所述的终端,其特征在于,所述关闭所述闪光灯之后,以及所述结束曝光,得到目标图像之前,所述处理器还具体用 于:The terminal according to any one of claims 11 to 13, wherein said processor is further used after said turning off said flash, and said ending exposure to obtain a target image to:
    执行如下流程N次,所述N为正整数:Perform the following procedure N times, where N is a positive integer:
    控制摄像头离焦,其中,所述离焦持续第三时间长度;Controlling the camera to be out of focus, wherein the defocusing continues for a third length of time;
    控制所述摄像头合焦,点亮闪光灯,其中,所述合焦持续第四时间长度;Controlling the camera to focus, lighting the flash, wherein the focus continues for a fourth time length;
    关闭所述闪光灯。 Turn off the flash.
PCT/CN2017/073954 2016-12-08 2017-02-17 Photograph-capture control method and terminal WO2018103197A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611119481.3 2016-12-08
CN201611119481.3A CN106791382A (en) 2016-12-08 2016-12-08 A kind of camera control method and terminal

Publications (1)

Publication Number Publication Date
WO2018103197A1 true WO2018103197A1 (en) 2018-06-14

Family

ID=58882321

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/073954 WO2018103197A1 (en) 2016-12-08 2017-02-17 Photograph-capture control method and terminal

Country Status (2)

Country Link
CN (1) CN106791382A (en)
WO (1) WO2018103197A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112767312A (en) * 2020-12-31 2021-05-07 湖南快乐阳光互动娱乐传媒有限公司 Image processing method and device, storage medium and processor
CN113191956A (en) * 2021-01-19 2021-07-30 西安理工大学 Backlight image enhancement method based on depth cutout
CN113225870A (en) * 2021-03-29 2021-08-06 青岛小鸟看看科技有限公司 VR (virtual reality) equipment positioning method and VR equipment

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109076171B (en) * 2017-10-31 2021-07-13 深圳市大疆创新科技有限公司 Method for flash lamp brightness compensation, unmanned aerial vehicle and storage medium
US10554890B1 (en) 2019-02-18 2020-02-04 Samsung Electronics Co., Ltd. Apparatus and method for generating low-light images with improved bokeh using mobile electronic device
US11062436B2 (en) 2019-05-10 2021-07-13 Samsung Electronics Co., Ltd. Techniques for combining image frames captured using different exposure settings into blended images
CN112351184B (en) * 2019-08-07 2021-11-12 杭州海康威视数字技术股份有限公司 Camera light supplementing method and device
CN111601046B (en) * 2020-04-22 2022-03-01 惠州市德赛西威汽车电子股份有限公司 Dark light environment driving state monitoring method
CN113630545B (en) * 2020-05-07 2023-03-24 华为技术有限公司 Shooting method and equipment
CN111601053B (en) * 2020-05-20 2021-07-27 上海炬佑智能科技有限公司 Image sensor, global shutter control method and computer storage medium
CN112437206B (en) * 2020-11-25 2022-07-29 杭州海康威视数字技术股份有限公司 Light supplement control method and camera

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007041078A1 (en) * 2005-10-04 2007-04-12 Lucent Technologies Inc. Multiple exposure optical imaging apparatus
CN103327253A (en) * 2013-06-26 2013-09-25 深圳市中兴移动通信有限公司 Multiple exposure method and camera shooting device
CN105120154A (en) * 2015-08-20 2015-12-02 深圳市金立通信设备有限公司 Image processing method and terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5039786B2 (en) * 2007-07-23 2012-10-03 パナソニック株式会社 Imaging device
CN105847664B (en) * 2015-07-31 2019-01-29 维沃移动通信有限公司 A kind of method and apparatus that mobile terminal is taken pictures
CN105847674B (en) * 2016-03-25 2019-06-07 维沃移动通信有限公司 A kind of preview image processing method and mobile terminal based on mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007041078A1 (en) * 2005-10-04 2007-04-12 Lucent Technologies Inc. Multiple exposure optical imaging apparatus
CN103327253A (en) * 2013-06-26 2013-09-25 深圳市中兴移动通信有限公司 Multiple exposure method and camera shooting device
CN105120154A (en) * 2015-08-20 2015-12-02 深圳市金立通信设备有限公司 Image processing method and terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
FUSHUIFUYUN, CREATING BLURRED BACKGROUND THROUGH MULTIPLE EXPOSURES, 4 March 2014 (2014-03-04), Retrieved from the Internet <URL:http://yzzhang42.blog.163.com/blog/static/14521245720142355023715> *
LONGZHILANG, CREATING DREAM FLOWER THROUGH VIRTUAL FOCUS + MULTIPLE EXPOSURES, 20 July 2010 (2010-07-20), Retrieved from the Internet <URL:http://mayunlan008.blog.163.com/blog/static/941089502010620970975> *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112767312A (en) * 2020-12-31 2021-05-07 湖南快乐阳光互动娱乐传媒有限公司 Image processing method and device, storage medium and processor
CN113191956A (en) * 2021-01-19 2021-07-30 西安理工大学 Backlight image enhancement method based on depth cutout
CN113191956B (en) * 2021-01-19 2024-02-09 西安理工大学 Backlight image enhancement method based on depth matting
CN113225870A (en) * 2021-03-29 2021-08-06 青岛小鸟看看科技有限公司 VR (virtual reality) equipment positioning method and VR equipment
CN113225870B (en) * 2021-03-29 2023-12-22 青岛小鸟看看科技有限公司 VR equipment positioning method and VR equipment

Also Published As

Publication number Publication date
CN106791382A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
WO2018103197A1 (en) Photograph-capture control method and terminal
JP5096017B2 (en) Imaging device
US8830338B2 (en) Imaging device
US20180227573A1 (en) Electronic device having dynamically controlled flashlight for image capturing and related control method
JP2019215489A (en) Imaging device and focus adjustment method
US8823867B2 (en) Camera with focus detection unit
US8294785B2 (en) Method for adjusting photosensitiveness of digital camera
CN105915807B (en) Method for calculating light quantity change characteristic and electronic device
JP2009294416A (en) Imaging apparatus and its control method
JP2010072619A (en) Exposure operation device and camera
JP2008197144A (en) Photographing apparatus, and focus control method and control unit for photographic lens
JP2008199461A (en) Imaging apparatus
JP6997544B2 (en) Imaging device and its control method, program, storage medium
JP7158880B2 (en) IMAGING DEVICE, CONTROL METHOD THEREOF, AND CONTROL PROGRAM
JP2015167308A (en) Photometry method suitable for face detection autofocus control
JP2009302747A (en) Imaging device, image processing device, and program
US20220345611A1 (en) Image capturing apparatus and control method thereof and storage medium
JP2017032754A (en) Imaging device, control method for same, and program
JP2008026742A (en) Optical equipment and its control method
JP2013041059A (en) Exposure calculation unit and camera
JP2009276560A (en) Imaging apparatus and imaging method
JP2013040996A (en) Exposure calculation unit and camera
JP2008058701A (en) Optical equipment and its control method
JP2017005291A (en) Imaging apparatus, control method for the same, and control program
JP2010041504A (en) Camera

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17879596

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17879596

Country of ref document: EP

Kind code of ref document: A1