WO2017173585A1 - 一种拍照方法及终端 - Google Patents

一种拍照方法及终端 Download PDF

Info

Publication number
WO2017173585A1
WO2017173585A1 PCT/CN2016/078503 CN2016078503W WO2017173585A1 WO 2017173585 A1 WO2017173585 A1 WO 2017173585A1 CN 2016078503 W CN2016078503 W CN 2016078503W WO 2017173585 A1 WO2017173585 A1 WO 2017173585A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame image
frame
information
output
jitter
Prior art date
Application number
PCT/CN2016/078503
Other languages
English (en)
French (fr)
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 华为技术有限公司
Priority to CN201680013023.3A priority Critical patent/CN107615745B/zh
Priority to PCT/CN2016/078503 priority patent/WO2017173585A1/zh
Publication of WO2017173585A1 publication Critical patent/WO2017173585A1/zh

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
    • H04N23/673Focus control based on electronic image sensor signals based on contrast or high frequency components of image signals, e.g. hill climbing method

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a photographing method and a terminal.
  • the process of taking pictures of the terminal includes the following steps: A.
  • the terminal records when the user presses the shooting button. Key time stamp; B, the terminal continuously exposes multiple frame image images in a period of time, each frame image corresponding to its own exposure time stamp; C, the terminal corresponding exposure time stamp in the multi-frame frame image and the above-mentioned key time stamp
  • the closest frame image is taken as the frame image to be output, and then the frame image to be output is optimized to generate a photo that can be presented to the user.
  • the order of steps A and B should be determined according to the actual situation.
  • step B When the terminal adopts the 0 second delay (English: Zero Shutter Lag, ZSL for short) shooting mode (ie, when the user presses the shooting button, it is already
  • step B When the frame image of the corresponding exposure time stamp is selected as the frame image to be outputted in the saved multi-frame frame image, step B will be before step A, and when the non-ZSL shooting mode is adopted, step B will be after step A. .
  • FIG. 1 is the jitter confidence of the terminal over time.
  • the terminal does not change the amount of jitter most of the time.
  • the dithered photon signal 2 is also imaged at the position 20, and the image superimposed by the two photon signals causes the generated frame image to be unclear due to The generated time stamp corresponding to the image frame is close to the key time stamp, so the terminal is likely to use the unclear frame image as the frame image to be output.
  • the embodiment of the invention discloses a photographing method and a terminal, which can reduce the probability that the generated picture is unclear.
  • an embodiment of the present invention provides a photographing method, the method comprising:
  • the terminal receives the input shooting instruction
  • the terminal selects, from the multi-frame frame image, a frame image whose resolution reaches a preset condition, based on a photographing parameter corresponding to each frame image of the multi-frame frame image that is continuously exposed for a period of time
  • the output frame image includes at least one of jitter amount information and contrast information, and the jitter amount information and the contrast information are both used to reflect the sharpness of the frame image.
  • the frame image to be output is subjected to subsequent processing such as noise reduction and enhancement to generate a picture that can be presented to the user.
  • the starting point of the period of time is that the terminal receives the moment when the user inputs the shooting instruction through the virtual button, that is, the period of time is a period of time after the terminal receives the shooting instruction.
  • the end of the period of time is that the terminal receives the moment when the user inputs the shooting instruction through the virtual button, that is, the period of time is a period of time before the terminal receives the shooting instruction.
  • the terminal After receiving the shooting instruction input by the user, the terminal selects a clear frame image as the frame image to be output based on the jitter amount information or the contrast information from the multi-frame frame image continuously exposed for a period of time. The probability that the generated image is unclear.
  • the selecting, from the multi-frame frame image, a frame image whose resolution reaches a preset condition, as the frame image to be output includes:
  • the frame image having the smallest amount of jitter in the multi-frame frame image is taken as the frame image to be output;
  • a frame image having the largest contrast among the multi-frame image is taken as a frame image to be output.
  • the shooting parameter includes the jitter amount information, the contrast information, and the light source information, where the light source information is a frame image Whether it is information of a frame image obtained by exposure under a point light source, wherein a frame image that is most recently exposed at a time when the photographing instruction is received is a target frame image;
  • the selecting, from the multi-frame frame image, a frame image whose resolution reaches a preset condition as the frame image to be output includes:
  • the frame image with the smallest amount of jitter in the multi-frame frame image is used as the frame image to be output;
  • the frame image having the largest contrast among the multi-frame image is taken as the frame image to be output.
  • the frame image before selecting the frame image as the frame image to be output from the multi-frame frame image, first determining whether the target frame image is taken under the point light source based on the light source information, and if not shooting under the point light source, The size of the contrast is used to select the frame image to be output, so that the frame image to be output selected by the contrast is not clear.
  • the shooting parameter includes the jitter amount information, and a frame image of the multi-frame frame image that is closest to the time of receiving the shooting instruction For the target frame image;
  • determining whether a jitter amount of the frame image in the frame image other than the target frame image in the multi-frame frame image is smaller than a second jitter threshold
  • the frame image having the smallest amount of jitter in the multi-frame image is taken as the frame image to be output, or when the shooting parameter includes contrast information
  • the frame image with the largest contrast among the multi-frame frame images is used as the frame image to be output.
  • the target frame image and the jitter amount of the frame image around the target frame image are too large, and if too large, the frame image with the smallest jitter or the largest contrast is selected from the multi-frame frame image.
  • the output frame image is first determined whether the target frame image and the jitter amount of the frame image around the target frame image are too large, and if too large, the frame image with the smallest jitter or the largest contrast is selected from the multi-frame frame image.
  • the method further includes:
  • the target frame image is taken as a frame image to be output.
  • the target frame image is used as the frame image to be output, and the frame image to be output is ensured to be the frame image that the user most wants to capture and is clearer.
  • the method further includes:
  • the frame image whose exposure time is closest to the exposure time of the target frame image is to be outputted in the frame image whose jitter amount is smaller than the second preset threshold.
  • the frame image with a smaller amount of jitter in the vicinity is used as the frame image to be output, so that the determined waiting is performed.
  • the output frame image can be as close as possible to the frame image that the user wants to capture.
  • the selecting, from the multi-frame frame image, a frame image whose resolution reaches a preset condition, as the frame image to be output includes:
  • an N frame frame image in which the amount of jitter in the multi-frame frame image is arranged in the first N bits is used as a frame image to be output;
  • an N frame frame image in which the contrast in the first N bits is arranged from the largest to the smallest in the multiframe frame image is taken as a frame image to be output, and N is a positive integer greater than 1.
  • the shooting parameter includes the jitter amount information, the contrast information, and the light source information, where the light source information indicates whether the frame image is at a point Information of a frame image obtained by exposure under a light source, wherein a frame image that is most recently exposed at a time when the photographing instruction is received in the multi-frame image is a target frame image; and selecting a sharpness from the multi-frame image
  • the conditional frame image as the frame image to be output includes:
  • the N frame frame image in which the amount of jitter in the multi-frame frame image is arranged from the smallest to the largest N bits is used as the frame image to be output;
  • the N frame frame image in which the contrast in the first N bits is arranged from the largest to the smallest in the multiframe frame image is taken as the frame image to be output, and N is a positive integer greater than 1.
  • the frame image before selecting the frame image as the frame image to be output from the multi-frame frame image, first determining whether the target frame image is taken under the point light source based on the light source information, and if not shooting under the point light source, The size of the contrast is used to select the frame image to be output, so that the frame image to be output selected by the contrast is not clear.
  • the method before the terminal receives the input shooting instruction, the method further includes:
  • the terminal continuously exposes the multi-frame frame image during the period of time.
  • the terminal continuously exposing the multi-frame frame image in the period of time includes:
  • the terminal continuously exposes the multi-frame frame image through a plurality of cameras during the period of time.
  • the efficiency of exposing the frame image can be improved by exposing the frame image by a plurality of cameras.
  • the target frame image corresponds to at least motion information, exposure duration information, and An item of the jitter amount information, wherein the motion information is information indicating whether the frame image is in a motion state, and the exposure duration information is information indicating a length of time during which the frame image is exposed, a frame image that is most recently exposed in a frame frame image from a time when the photographing instruction is received is a target frame image; and the terminal responds to the photographing instruction, and corresponds to photographing each frame image in a multi-frame frame image that is continuously exposed for a period of time
  • a frame image whose resolution reaches a preset condition is selected from the multi-frame frame image as a frame image to be output.
  • a frame image to be output from the multi-frame frame image it is determined whether it is necessary to select a frame image based on at least one of motion information, exposure duration information, and jitter amount information, and if necessary, performing multi-frame from The operation of selecting the frame image to be outputted in the frame image, if not necessary, does not perform the operation of selecting the frame image to be output from the multi-frame frame image, thereby reducing the power consumption of the terminal.
  • an embodiment of the present invention provides a terminal, where the terminal includes:
  • a receiving unit configured to receive an input shooting instruction
  • a response unit configured to select, according to the shooting instruction, a frame image whose resolution reaches a preset condition from the multi-frame frame image based on a shooting parameter corresponding to each frame image in the continuously-exposing multi-frame frame image in a period of time
  • the photographing parameter includes at least one of the shake amount information and the contrast information, and the shake amount information and the contrast information are both used to reflect the sharpness of the frame image.
  • the frame image to be output is subjected to subsequent processing such as noise reduction and enhancement to generate a picture that can be presented to the user.
  • the starting point of the period of time is that the terminal receives the moment when the user inputs the shooting instruction through the virtual button, that is, the period of time is a period of time after the terminal receives the shooting instruction.
  • the end of the period of time is that the terminal receives the moment when the user inputs the shooting instruction through the virtual button, that is, the period of time is a period of time before the terminal receives the shooting instruction.
  • the terminal After receiving the shooting instruction input by the user, the terminal selects a clear frame image as the frame image to be output based on the jitter amount information or the contrast information from the multi-frame frame image continuously exposed for a period of time. The probability that the generated image is unclear.
  • the response unit selects, from the multi-frame frame image, a frame image whose resolution reaches a preset condition, as a frame image to be output, specifically :
  • the frame image having the smallest amount of jitter in the multi-frame frame image is taken as the frame image to be output;
  • a frame image having the largest contrast among the multi-frame image is taken as a frame image to be output.
  • the shooting parameter includes the jitter amount information, the contrast information, and the light source information, where the light source information indicates whether the frame image is at a point Information of a frame image obtained by exposure under a light source, wherein a frame image that is most recently exposed at a time when the photographing instruction is received in the multi-frame frame image is a target frame image;
  • the response unit selects, as the frame image to be output, a frame image whose resolution reaches a preset condition from the multi-frame frame image, specifically:
  • the frame image with the smallest amount of jitter in the multi-frame frame image is used as the frame image to be output;
  • the frame image having the largest contrast among the multi-frame image is taken as the frame image to be output.
  • the frame image before selecting the frame image as the frame image to be output from the multi-frame frame image, first determining whether the target frame image is taken under the point light source based on the light source information, and if not shooting under the point light source, The size of the contrast is used to select the frame image to be output, so that the frame image to be output selected by the contrast is not clear.
  • the photographing parameter includes the jitter amount information, and a frame image of the multi-frame frame image that is closest to the time of receiving the photographing instruction For the target frame image;
  • the response unit selects, from the multi-frame frame image, a frame image whose resolution reaches a preset condition as a frame image to be output, specifically;
  • determining whether a jitter amount of the frame image in the frame image other than the target frame image in the multi-frame frame image is smaller than a second jitter threshold
  • the frame image having the smallest amount of jitter in the multi-frame image is taken as the frame image to be output, or when the shooting parameter includes contrast information
  • the frame image with the largest contrast among the multi-frame frame images is used as the frame image to be output.
  • the target frame image and the jitter amount of the frame image around the target frame image are too large, and if too large, the frame image with the smallest jitter or the largest contrast is selected from the multi-frame frame image.
  • the output frame image is first determined whether the target frame image and the jitter amount of the frame image around the target frame image are too large, and if too large, the frame image with the smallest jitter or the largest contrast is selected from the multi-frame frame image.
  • the responding unit is further configured to: the amount of jitter in the target frame image is lower than the first When the threshold is shaken, the target frame image is taken as a frame image to be output.
  • the target frame image is used as the frame image to be output, and the frame image to be output is ensured to be the frame image that the user most wants to capture and is clearer.
  • the response unit is further configured to be in the multi-frame frame image
  • the exposure time is shorter than the target frame image in the frame image in which the amount of jitter is smaller than the second predetermined threshold
  • the frame image closest to the exposure time is taken as the frame image to be output.
  • the frame image with a smaller amount of jitter in the vicinity is used as the frame image to be output, so that the determined waiting is performed.
  • the output frame image can be as close as possible to the frame image that the user wants to capture.
  • the response unit selects, from the multi-frame frame image, a frame image whose resolution reaches a preset condition, as a frame image to be output, specifically :
  • an N frame frame image in which the amount of jitter in the multi-frame frame image is arranged in the first N bits is used as a frame image to be output;
  • an N frame frame image in which the contrast in the first N bits is arranged from the largest to the smallest in the multiframe frame image is taken as a frame image to be output, and N is a positive integer greater than 1.
  • the shooting parameter includes the jitter amount information, the contrast information, and the light source information, where the light source information indicates whether the frame image is at a point Information of a frame image obtained by exposure under a light source, wherein a frame image that is most recently exposed at a time when the photographing instruction is received is a target frame image; and the response unit selects a sharpness from the multi-frame frame image
  • the frame image that reaches the preset condition is used as the frame image to be output, specifically:
  • the N frame frame image in which the amount of jitter in the multi-frame frame image is arranged from the smallest to the largest N bits is used as the frame image to be output;
  • the N frame frame image in which the contrast in the first N bits is arranged from the largest to the smallest in the multiframe frame image is taken as the frame image to be output, and N is a positive integer greater than 1.
  • the frame image before selecting the frame image as the frame image to be output from the multi-frame frame image, first determining whether the target frame image is taken under the point light source based on the light source information, and if not shooting under the point light source, The size of the contrast is used to select the frame image to be output, so that the frame image to be output selected by the contrast is not clear.
  • the terminal further includes an exposure unit, configured to continuously expose the multi-frame frame image during the period of time before the receiving unit receives the input shooting instruction .
  • the exposing unit is specifically configured to continuously expose the multiple frames by using multiple cameras in the period of time Frame image.
  • the efficiency of exposing the frame image can be improved by exposing the frame image by a plurality of cameras.
  • the target frame image corresponds to at least motion information, exposure duration information, and An item of the jitter amount information, wherein the motion information is information indicating whether the frame image is in a motion state, the exposure duration information is information indicating a length of time during which the frame image is exposed, and the distance in the multi-frame frame image is received by the shooting.
  • the frame image of the most recently exposed time is the target frame image; the response unit includes:
  • a determining subunit configured to determine, according to at least one of motion information, exposure duration information, and jitter amount information corresponding to the target frame image, whether to select a frame image from the multiframe frame image as The condition of the frame image to be output;
  • Selecting a subunit for selecting a resolution from the multiframe frame image to a preset when the judging subunit determines that a condition for selecting a frame image from the multiframe frame image as the frame image to be output is satisfied The frame image of the condition is taken as the frame image to be output.
  • a frame image to be output from the multi-frame frame image it is determined whether it is necessary to select a frame image based on at least one of motion information, exposure duration information, and jitter amount information, and if necessary, performing multi-frame from The operation of selecting the frame image to be outputted in the frame image, if not necessary, does not perform the operation of selecting the frame image to be output from the multi-frame frame image, thereby reducing the power consumption of the terminal.
  • an embodiment of the present invention provides a terminal, where the terminal includes a memory, a processor, and a user interface, where the memory is used to store a program, and the processor invokes a program in the memory to perform the following operations. :
  • the shooting parameter includes at least one of jitter amount information and contrast information, and the jitter amount information and the contrast information are both used to reflect the sharpness of the frame image.
  • the frame image to be output is subjected to subsequent processing such as noise reduction and enhancement to generate a picture that can be presented to the user.
  • the starting point of the period of time is that the terminal receives the moment when the user inputs the shooting instruction through the virtual button, that is, the period of time is a period of time after the terminal receives the shooting instruction.
  • the end of the period of time is that the terminal receives the moment when the user inputs the shooting instruction through the virtual button, that is, the period of time is a period of time before the terminal receives the shooting instruction.
  • the terminal After receiving the shooting instruction input by the user, the terminal selects a clear frame image as the frame image to be output based on the jitter amount information or the contrast information from the multi-frame frame image continuously exposed for a period of time. The probability that the generated image is unclear.
  • the processor selects, from the multi-frame frame image, a frame image whose resolution reaches a preset condition, as a frame image to be output, specifically :
  • the frame image having the smallest amount of jitter in the multi-frame frame image is taken as the frame image to be output;
  • a frame image having the largest contrast among the multi-frame image is taken as a frame image to be output.
  • the shooting parameter includes the jitter amount information, the contrast information, and the light source information, where the light source information indicates whether the frame image is at a point Information of a frame image obtained by exposure under a light source, wherein a frame image that is most recently exposed at a time when the photographing instruction is received in the multi-frame frame image is a target frame image;
  • the processor selects, as the frame image to be output, a frame image whose resolution reaches a preset condition from the multi-frame frame image, specifically:
  • the frame image with the smallest amount of jitter in the multi-frame frame image is used as the frame image to be output;
  • the frame image having the largest contrast among the multi-frame image is taken as the frame image to be output.
  • the frame image before selecting the frame image as the frame image to be output from the multi-frame frame image, first determining whether the target frame image is taken under the point light source based on the light source information, and if not shooting under the point light source, The size of the contrast is used to select the frame image to be output, so that the frame image to be output selected by the contrast is not clear.
  • the shooting parameter includes the jitter amount information, and a frame image of the multi-frame frame image that is closest to the time of receiving the shooting instruction For the target frame image;
  • the processor selects, as the frame image to be output, a frame image whose resolution reaches a preset condition from the multi-frame frame image, specifically:
  • determining whether a jitter amount of the frame image in the frame image other than the target frame image in the multi-frame frame image is smaller than a second jitter threshold
  • the frame image having the smallest amount of jitter in the multi-frame image is taken as the frame image to be output, or when the shooting parameter includes contrast information
  • the frame image with the largest contrast among the multi-frame frame images is used as the frame image to be output.
  • the target frame image and the jitter amount of the frame image around the target frame image are too large, and if too large, the frame image with the smallest jitter or the largest contrast is selected from the multi-frame frame image.
  • the output frame image is first determined whether the target frame image and the jitter amount of the frame image around the target frame image are too large, and if too large, the frame image with the smallest jitter or the largest contrast is selected from the multi-frame frame image.
  • the processor is further configured to: determine that the jitter of the target frame image is lower than the first jitter At the threshold, the target frame image is taken as a frame image to be output.
  • the target frame image is used as the frame image to be output, and the frame image to be output is ensured to be the frame image that the user most wants to capture and is clearer.
  • the processor is further configured to:
  • the frame image whose jitter amount is smaller than the second preset threshold is determined.
  • the frame image whose exposure time is closest to the exposure time of the target frame image is taken as the frame image to be output.
  • the frame image with a smaller amount of jitter in the vicinity is used as the frame image to be output, so that the determined waiting is performed.
  • the output frame image can be as close as possible to the frame image that the user wants to capture.
  • the processor selects, from the multi-frame frame image, a frame image whose resolution reaches a preset condition, as a frame image to be output, specifically :
  • an N frame frame image in which the amount of jitter in the multi-frame frame image is arranged in the first N bits is used as a frame image to be output;
  • an N frame frame image in which the contrast in the first N bits is arranged from the largest to the smallest in the multiframe frame image is taken as a frame image to be output, and N is a positive integer greater than 1.
  • the shooting parameter includes the jitter amount information, the contrast information, and the light source information, where the light source information indicates whether the frame image is at a point Information of a frame image obtained by exposure under a light source, wherein a frame image that is most recently exposed at a time when the photographing instruction is received is a target frame image; and the processor selects a sharpness from the multi-frame image
  • the frame image that reaches the preset condition is used as the frame image to be output, specifically:
  • the N frame frame image in which the amount of jitter in the multi-frame frame image is arranged from the smallest to the largest N bits is used as the frame image to be output;
  • the N frame frame image in which the contrast in the first N bits is arranged from the largest to the smallest in the multiframe frame image is taken as the frame image to be output, and N is a positive integer greater than 1.
  • the frame image before selecting the frame image as the frame image to be output from the multi-frame frame image, first determining whether the target frame image is taken under the point light source based on the light source information, and if not shooting under the point light source, The size of the contrast is used to select the frame image to be output, so that the frame image to be output selected by the contrast is not clear.
  • the processor is further configured to continuously expose the multi-frame frame image during the period of time before receiving the input shooting instruction through the user interface.
  • the processor continuously exposing the multi-frame frame image in the period of time, specifically: The multi-frame frame image is continuously exposed by a plurality of cameras over the period of time.
  • the efficiency of exposing the frame image can be improved by exposing the frame image by a plurality of cameras.
  • the target frame image corresponds to at least the motion information, the exposure duration information, and An item of the jitter amount information, wherein the motion information is information indicating whether the frame image is in a motion state, the exposure duration information is information indicating a length of time during which the frame image is exposed, and the distance in the multi-frame frame image is received by the shooting.
  • the frame image of the most recently exposed time is the target frame image;
  • the processor is responsive to the shooting instruction, based on the multi-frame frame continuously exposed for a period of time Image capturing parameters corresponding to each frame of the frame image, selecting from the multi-resolution image frames in an image frame reaches a preset condition as the frame image to be output, specifically:
  • a frame image whose resolution reaches a preset condition is selected from the multi-frame frame image as a frame image to be output.
  • a frame image to be output from the multi-frame frame image it is determined whether it is necessary to select a frame image based on at least one of motion information, exposure duration information, and jitter amount information, and if necessary, performing multi-frame from The operation of selecting the frame image to be outputted in the frame image, if not necessary, does not perform the operation of selecting the frame image to be output from the multi-frame frame image, thereby reducing the power consumption of the terminal.
  • the plurality of cameras include at least one camera that exposes a color frame image and at least one camera that exposes a black and white frame image.
  • the frame image acquired by the camera that captures the color frame image and the camera that captures the black and white frame image has a lower frame noise and higher resolution of the frame image acquired by the two types of cameras.
  • an embodiment of the present invention provides a computer readable storage medium storing one or more computer programs, the one or more computer programs including instructions, when the instructions are included
  • the terminal of one or more applications when executed, causes the terminal to perform the method described in any of the possible implementations of the first aspect.
  • the terminal By executing the program in the storage medium, after receiving the shooting instruction input by the user, the terminal selects a clear frame image as the to-be-output based on the jitter amount information or the contrast information from the multi-frame frame image continuously exposed for a period of time.
  • the frame image reduces the probability that the generated picture is unclear.
  • the terminal After receiving the shooting instruction input by the user, the terminal selects a clear frame image as the frame image to be output based on the jitter amount information or the contrast information from the multi-frame frame image continuously exposed for a period of time. , reducing the probability that the generated picture is unclear.
  • 1 is a schematic diagram showing changes in jitter amount with time in the prior art
  • FIG. 2 is a schematic diagram showing the principle of causing frame image blur in the prior art
  • FIG. 3 is a schematic flowchart diagram of a photographing method according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of an effect of a picture obtained from a frame image according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of another effect of a picture obtained by using a frame image according to an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of another effect of a picture obtained from a frame image according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of still another terminal according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of still another mobile phone according to an embodiment of the present invention.
  • the terminal described in the embodiment of the present invention may be a camera, a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a mobile internet device (MID), a wearable device, or other terminal device capable of taking a photo.
  • a camera a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a mobile internet device (MID), a wearable device, or other terminal device capable of taking a photo.
  • MID mobile internet device
  • FIG. 3 is a schematic flowchart of a photographing method according to an embodiment of the present invention, which includes, but is not limited to, the following steps.
  • Step S301 The terminal continuously exposes the multi-frame frame image for a period of time
  • each frame image of the continuously exposed multi-frame frame image has its own shooting parameter, and the shooting parameter includes at least one of the jitter amount information and the contrast information, that is, the shooting parameter is used in one solution. Including the jitter amount information but not the contrast information, in another solution, the shooting parameter includes contrast information but does not include jitter amount information. In still another aspect, the shooting parameter includes jitter amount information and contrast information, the shooting parameter is In addition to the already-defined information, whether or not to include other information or other information is not limited herein.
  • the jitter amount information reflects the amount of jitter of the terminal when the terminal exposes the frame image, and if the amount of jitter is large, the exposure is exposed. The frame image is not clear and the contrast is the contrast of the exposed frame image.
  • the contrast information can be calculated by the terminal during the focusing process; if the shooting parameter has the jitter amount information, the jitter amount information can pass through the gyro sensor (English: gyro sensor), gravity sensor and the like.
  • the amount of jitter of the terminal is calculated according to the exposure time T of the image and the angular velocity information acquired by the gyro sensor during the exposure time T.
  • the integral of the angular velocity absolute value of the gyro sensor during the exposure time T may reflect the moving distance of the terminal T during the image exposure time.
  • the frequency is approximately It is 10ms once (that is, the time interval for obtaining the angular velocity is 10ms). Therefore, in the discrete case, it can be considered that the terminal performs uniform motion during the time interval for obtaining the angular velocity, so the calculation formula of the jitter amount of the terminal can be:
  • Equation 1-1 gyroX i , gyroY i , gyroZ i are the angular velocities of the gyro sensor in the preset three directions in the time period t i , and d is the amount of jitter of the terminal in the image exposure time T, The larger d is, the larger the jitter amount of the terminal is, and the jitter amount of the terminal can reflect the sharpness of the frame image exposed by the terminal when it is shaken. There are other ways to calculate the amount of jitter, which are not examples here.
  • the time at which the terminal exposes the frame image is not limited herein, and the multi-frame frame image may be exposed for a period of time before the user starts the camera for preview but the shooting command is not input, or may be exposed for a period of time after the user inputs the shooting instruction.
  • a frame frame image the time period may be a time configured for the terminal in advance, and optionally, the time period may also be a time set by the user according to requirements; optionally, each frame image in the multi-frame frame image The exposure time exists in sequence; the multi-frame frame image obtained by the exposure can be cached in a preset storage space for subsequent use.
  • the terminal exposes the frame image through a plurality of cameras, and the plurality of cameras share the exposure to obtain a plurality of frame image images for subsequent use in a short time, thereby improving the efficiency of the exposed frame image; further
  • the plurality of cameras may include at least one image for exposing the color frame image and at least one image for exposing the black and white frame image.
  • the two cameras are independent of each other, and the optical axes are parallel, so that the terminal can be exposed to obtain the same scene.
  • the frame image acquired by the above two cameras in the embodiment of the present invention can be used for Subsequent synthesis of low noise, high resolution pictures.
  • a single camera can also be set to work alone, and the single camera can sequentially expose color frame images and black and white frame images of the same scene.
  • Step S302 The terminal receives the shooting instruction input by the user and marks the shooting time stamp of the shooting instruction.
  • the user may input a shooting instruction to trigger the terminal to take a photo by means of a button, a voice control, a gesture control, etc., preferably by inputting the shooting instruction through a virtual button, and correspondingly, the terminal receives the shooting. Commands and marks the shooting timestamp that received the shooting command.
  • step S301 is before step S302, and step S302 is preceded by step S301.
  • the terminal selects a frame image as a frame image to be output from the multi-frame frame image exposed during the period of time in response to the shooting instruction, and selects a frame image as the to-be-output from the multi-frame frame image exposed during the period of time.
  • the frame image may be specifically: selecting a frame image from the multi-frame frame image as the frame image to be output, or selecting a multi-frame frame image as the frame image to be output from the multi-frame frame image, and the following step S303 is performed.
  • step S305 a scheme for selecting a frame image from the multi-frame image as the frame image to be output is illustrated, and step S306 is used to select at least two frame images from the multi-frame image as the frame image to be output.
  • Step S303 The terminal determines whether the amount of jitter corresponding to the target frame image is smaller than the first jitter threshold T1. If the target frame image is the frame image to be output, if not smaller, step S304 is performed.
  • each frame image of the multi-frame frame image corresponds to its own exposure time stamp
  • the terminal selects a corresponding exposure timestamp from the multi-frame frame image according to the exposure time stamp of the frame image of each frame from the shooting timestamp.
  • the most recent frame image is used as the target frame image.
  • the terminal determines, according to the jitter amount information corresponding to the target frame image, whether the jitter amount of the terminal is less than a preset first jitter threshold T1 when the target frame image is exposed, and if the jitter amount is less than the T1, the terminal sets the target frame image.
  • step S304 is performed to select from other frame images.
  • the frame image with higher definition is used as the final frame image to be output, and the amount of jitter of the target frame image is the same.
  • Step S304 The terminal determines whether the jitter amount corresponding to the frame image in the frame image other than the target frame image in the multi-frame frame image is smaller than the second jitter threshold T2, and if the jitter amount corresponding to the frame image is less than T2, A frame image whose exposure amount is smaller than T2 and whose exposure time is closest to the exposure time of the target frame image is taken as the frame image to be output. If there is no corresponding frame image whose jitter amount is smaller than T2, step S305 is performed.
  • the second jitter threshold T2 is smaller than the first jitter threshold T1, that is, the terminal is targeted to the target.
  • the requirement of the jitter amount of the frame image is lower than the requirement of the jitter amount of the other frame image, because the exposure time stamp corresponding to the target frame image is closest to the shooting time stamp, that is, the target frame image is the scene that the user most wants to shoot. Therefore, the requirement for the target frame image is relatively low.
  • the terminal determines the frame image according to the order of the frame image A5, the frame image B5, the frame image A4, the frame image B4, the frame image A3, the frame image B3, the frame image A2, the frame image B2, the frame image A1, and the frame image B1.
  • Step S305 In the first optional solution, the shooting parameter includes the jitter amount information, and the frame image with the smallest jitter amount may be selected from the multi-frame frame image as the frame image to be output.
  • the shooting parameters include contrast information, and the frame image with the largest contrast can be selected from the multi-frame image as the frame image to be output.
  • the shooting parameter includes both the jitter amount information and the contrast information.
  • the frame image with the smallest amount of jitter may be selected from the multi-frame frame image as the frame image to be outputted, or may be The frame image having the largest contrast is selected as the frame image to be outputted in the multi-frame frame image.
  • the frame images selected by these three alternative schemes are frame images whose resolution meets the preset condition.
  • the shooting parameter may further include light source information, where the light source information is used to identify whether the corresponding frame image is exposed under the point light source, and may be filtered when the frame image is exposed. Filtering the frame image to determine whether the frame image contains some features of the point source, and if so, determining that the frame image is taken under the scene of the point source;
  • the terminal determines, according to the light source information corresponding to the target frame image, whether the target frame image is exposed under the point light source, and if the target frame image is exposed under the point light source, selecting a corresponding amount of jitter from the multi-frame frame image. The smallest frame image is used as the frame image to be output.
  • the frame image with the largest contrast is selected as the frame image to be outputted from the multi-frame image. It should be noted that the reason why the frame image to be output is selected based on the "shake amount" or the "contrast" according to the point source is because the contrast difference of each frame image itself is relatively large in the scene of the point source, each The contrast between the frame images is not comparable.
  • the frame image obtained by performing steps S303 to S305 is used for performing denoising, enhancement, and the like optimization processing on the terminal to obtain a picture that can be presented to the user.
  • the picture obtained by the optimized process of the frame image has a higher probability of clearing the picture
  • Table 1 is a comparison result of clear probability
  • FIG. 4 is specific. A comparison of the clarity effects.
  • Step S306 The N frame frame image in which the corresponding jitter amount in the multi-frame frame image is arranged in the first N bits is used as the frame image to be output; or the corresponding contrast in the multi-frame frame image is arranged from largest to smallest.
  • the N-frame image of the first N bits is taken as the frame image to be output.
  • the shooting parameter includes jitter amount information, and the terminal sorts the multi-frame frame image according to the amount of jitter from small to large, and selects the first N frame image as the to-be-output. a frame image; in the second optional solution, the shooting parameter includes contrast information, and the terminal sorts the multi-frame frame image according to the contrast ratio from large to small, and selects the first N frame image as the final to be output. Frame image.
  • the shooting parameter includes jitter amount information, contrast information, and light source information
  • the terminal determines, according to the light source information corresponding to the target frame image, whether the target frame image is exposed under the point light source, and if If the spot light source is exposed, the terminal sorts the multi-frame frame image according to the amount of jitter from small to large, and selects the first N frame image as the final frame image to be output; if not exposed under the point source
  • the terminal frame map of the multiframe The images are sorted according to the contrast from large to small, and the first N frame image is selected as the final frame image to be output.
  • the selected N-frame image is used by the terminal to perform denoising, enhancement, synthesis, and the like to obtain a picture that can be presented to the user, where N is a positive integer greater than one.
  • the frame images selected by these three alternative schemes are frame images whose resolution meets the preset condition.
  • the N frame frame image obtained by performing step S306 can be used for the terminal to perform optimization processing such as time domain noise reduction to obtain a picture that can be presented to the user.
  • the picture obtained by the time domain denoising process of the frame image selected in step S306 is more clear than the picture obtained by the time domain denoising process in the prior art frame picture, and the picture 2 is clear.
  • the comparison results of the probabilities, Figure 5 is a comparison of the specific sharpness effects.
  • the N frame frame image obtained by performing step S306 can also be used for optimization processing such as time domain interpolation by the terminal to obtain a picture that can be presented to the user.
  • the picture obtained by processing the frame image selected in step S306 by time domain interpolation or the like has a higher probability of clearing the picture than the picture obtained by the time domain interpolation process in the prior art frame table, and Table 3 is a clear probability. Comparing the results, Figure 6 is a comparison of the specific sharpness effects.
  • the terminal may also be configured with a determination condition to enable the terminal to perform the foregoing steps S303-S305 or the solution of step S306 according to actual conditions.
  • the camera mode of the terminal is manually set to the digital zoom (ZOOM) mode, and in the ZOOM mode, the frame image is appropriately selected by the scheme of step S306; in addition, the terminal is in low illumination.
  • the scheme of step S306 it is also suitable to use the scheme of step S306 to select a frame image, and the terminal When in a non-low illumination scene, the scheme of steps S303 to S305 is suitably used to select a frame image.
  • the frame selection scheme may be different. Therefore, the embodiment of the present invention provides a mode selection mechanism, and the terminal may automatically select the solution of steps S303 to S305 based on the mode selection mechanism, or select the solution of step S306.
  • the mode selection mechanism specifically performs the following steps before selecting a frame image:
  • Step S307 The terminal determines whether its own ZOOM mode has been turned on, or determines whether the target frame image belongs to a low illumination scene according to the sensitivity information corresponding to the target frame image (high sensitivity in a low illumination scene); If the result of the determination is YES, the frame image is selected using the scheme of step S306. If the determination result of both conditions is NO, the frame image is selected by the scheme of steps S303 to S305.
  • the process of selecting a frame image from the multi-frame frame image as the frame image to be output may be used in the actual application to determine whether a frame selection is required based on the relevant information before selecting the frame image, and if it is determined that the frame selection is required
  • the frame selection process is performed by performing steps S303 to S305 or performing step S306. If it is determined that the frame selection is not required, the above frame selection process is not performed. The following describes how to determine whether frame selection is required by step S308.
  • Step S308 The terminal determines, according to at least one of the motion information, the exposure duration information, and the jitter amount information corresponding to the target frame image, whether the frame image is selected from the multi-frame frame image as the frame image to be output, in response to the shooting instruction. The condition of the frame selection process is performed if it is satisfied.
  • the terminal determines whether the motion information, the exposure duration information, and the jitter amount information corresponding to the target frame image meet a preset frame selection condition.
  • Each frame image has its own exposure duration information as in the prior art.
  • each frame image also has its own motion information, and the motion information is that the terminal sends the current frame image to the previous frame. (or the last few frames) the result of the comparison of the frame images. If the comparison finds that the offset of the scene in the current frame image is lower than the offset of the scene in the previous frame image, the current offset is displayed.
  • the scene is a motion scene. If the offset does not reach the preset offset value, the current scene is a still scene.
  • the motion information can be set to “1” to identify the currently shot scene as a motion scene.
  • the information is set to “0” to identify the currently shot scene as a still scene. Of course, other means can be used to identify the motion of the shooting scene.
  • the preset frame selection condition is: the target frame image is exposed in a still scene, and the exposure time of the target frame image is higher than a preset exposure time threshold, and the target frame image is The amount of jitter exceeds the preset target jitter threshold.
  • the target frame image is exposed in a still scene, and based on the exposure duration information, it can be determined whether the exposure duration of the target frame image is higher than a preset exposure.
  • the duration threshold may be based on the jitter amount information to determine whether the amount of jitter of the target image exceeds the target jitter threshold.
  • the terminal after receiving the shooting instruction input by the user, the terminal selects a clear frame image as the to-be-output based on the jitter amount information or the contrast information from the multi-frame frame image continuously exposed for a period of time.
  • the frame image reduces the probability that the generated picture is unclear.
  • FIG. 7 is a schematic structural diagram of a terminal 70 according to an embodiment of the present invention.
  • the terminal 70 may include a receiving unit 701 and a response unit 702.
  • the detailed description of the receiving unit 701 and the response unit 702 is as follows.
  • the receiving unit 701 is configured to receive an input shooting instruction
  • the response unit 702 is configured to select, according to the shooting instruction, a frame image with a resolution reaching a preset condition from the multi-frame frame image based on a shooting parameter corresponding to each frame image of the continuously-exposing multi-frame frame image in a period of time
  • the photographing parameter includes at least one of the shake amount information and the contrast information, and the shake amount information and the contrast information are both used to reflect the sharpness of the frame image.
  • the frame image to be output is subjected to subsequent processing such as noise reduction and enhancement to generate a picture that can be presented to the user.
  • the starting point of the period of time is that the terminal 70 receives the moment when the user inputs the shooting instruction through the virtual button, that is, the period of time is a period of time after the terminal 70 receives the shooting instruction.
  • the end of the period of time is that the terminal 70 receives the moment when the user inputs a shooting instruction through the virtual button, that is, the period of time before the terminal 70 receives the shooting instruction.
  • the terminal 70 selects a clear frame image as the frame image to be output based on the jitter amount information or the contrast information from the multi-frame frame image continuously exposed for a period of time, Reduces the probability that the generated picture is unclear.
  • the response unit 702 selects, as the frame image to be output, a frame image whose resolution reaches a preset condition from the multi-frame frame image, specifically:
  • the frame image having the smallest amount of jitter in the multi-frame frame image is taken as the frame image to be output;
  • a frame image having the largest contrast among the multi-frame image is taken as a frame image to be output.
  • the shooting parameter includes the jitter amount information, the contrast information, and the light source information
  • the light source information is information indicating whether the frame image is a frame image obtained by exposure under a point light source. a frame image that is most recently exposed from a time at which the shooting instruction is received in the multi-frame frame image is a target frame image;
  • the response unit 702 selects, as the frame image to be output, a frame image whose resolution reaches a preset condition from the multi-frame frame image, specifically:
  • the frame image with the smallest amount of jitter in the multi-frame frame image is used as the frame image to be output;
  • the frame image having the largest contrast among the multi-frame image is taken as the frame image to be output.
  • the frame image before selecting the frame image as the frame image to be output from the multi-frame frame image, first determining whether the target frame image is taken under the point light source based on the light source information, and if not shooting under the point light source, The size of the contrast is used to select the frame image to be output, so that the frame image to be output selected by the contrast is not clear.
  • the shooting parameter includes the jitter amount information, and a frame image that is most recently exposed from a time when the shooting instruction is received in the multi-frame frame image is a target frame image;
  • the response unit 702 selects, from the multi-frame frame image, a frame image whose resolution reaches a preset condition as a frame image to be output, specifically;
  • determining whether a jitter amount of the frame image in the frame image other than the target frame image in the multi-frame frame image is smaller than a second jitter threshold
  • the frame image having the smallest amount of jitter in the multi-frame image is taken as the frame image to be output, or when the shooting parameter includes contrast information
  • the frame image with the largest contrast among the multi-frame frame images is used as the frame image to be output.
  • the target frame image and the jitter amount of the frame image around the target frame image are too large, and if too large, the frame image with the smallest jitter or the largest contrast is selected from the multi-frame frame image.
  • the output frame image is first determined whether the target frame image and the jitter amount of the frame image around the target frame image are too large, and if too large, the frame image with the smallest jitter or the largest contrast is selected from the multi-frame frame image.
  • the response unit 702 is further configured to use the target frame image as a frame image to be output when a jitter amount of the target frame image is lower than the first jitter threshold.
  • the target frame image is used as the frame image to be output, and the frame image to be output is ensured to be the frame image that the user most wants to capture and is clearer.
  • the response unit 702 is further configured to: when the amount of jitter of the frame image in the frame image other than the target frame image is smaller than the second jitter threshold in the multi-frame frame image And a frame image in which the exposure time is closest to the exposure time of the target frame image in the frame image whose amount of jitter is smaller than the second preset threshold is used as the frame image to be output.
  • the frame image with a smaller amount of jitter in the vicinity is used as the frame image to be output, so that the determined waiting is performed.
  • the output frame image can be as close as possible to the frame image that the user wants to capture.
  • the response unit 702 selects, as the frame image to be output, a frame image whose resolution reaches a preset condition from the multi-frame frame image, specifically:
  • an N frame frame image in which the amount of jitter in the multi-frame frame image is arranged in the first N bits is used as a frame image to be output;
  • an N frame frame image in which the contrast in the first N bits is arranged from the largest to the smallest in the multiframe frame image is taken as a frame image to be output, and N is a positive integer greater than 1.
  • the shooting parameter includes the jitter amount information, the contrast information, and the light source information
  • the light source information is information indicating whether the frame image is a frame image obtained by exposure under a point light source.
  • a frame image that is most recently exposed from a time at which the shooting instruction is received in the multi-frame frame image is a target frame image;
  • the response unit 702 selects, from the multi-frame frame image, a frame image whose resolution reaches a preset condition as The frame image to be output is specifically:
  • the N frame frame image in which the amount of jitter in the multi-frame frame image is arranged from the smallest to the largest N bits is used as the frame image to be output;
  • the N frame frame image in which the contrast in the first N bits is arranged from the largest to the smallest in the multiframe frame image is taken as the frame image to be output, and N is a positive integer greater than 1.
  • the frame image before selecting the frame image as the frame image to be output from the multi-frame frame image, first determining whether the target frame image is taken under the point light source based on the light source information, and if not shooting under the point light source, The size of the contrast is used to select the frame image to be output, so that the frame image to be output selected by the contrast is not clear.
  • the terminal 70 further includes an exposure unit, and the exposure unit is configured to continuously expose the multi-frame in the period of time before the receiving unit 701 receives the input shooting instruction. Frame image.
  • the exposing unit is specifically configured to continuously expose the multi-frame frame image by a plurality of cameras during the period of time.
  • the efficiency of exposing the frame image can be improved by exposing the frame image by a plurality of cameras.
  • the plurality of cameras includes at least one camera that exposes a color frame image and at least one camera that exposes a black and white frame image.
  • the frame image acquired by the camera that captures the color frame image and the camera that captures the black and white frame image has a lower frame noise and higher resolution of the frame image acquired by the two types of cameras.
  • the target frame image corresponds to at least one of motion information, exposure duration information, and jitter amount information
  • the motion information is information indicating whether the frame image is in a motion state
  • the exposure time length information is information indicating a length of time during which the frame image is exposed, and the frame image that is most recently exposed from the time when the image capturing instruction is received is the target frame image
  • the response unit 702 includes:
  • a determining subunit configured to determine, according to at least one of motion information, exposure duration information, and jitter amount information corresponding to the target frame image, whether to select a frame image from the multiframe frame image as The condition of the frame image to be output;
  • Selecting a subunit for selecting a resolution from the multiframe frame image to a preset when the judging subunit determines that a condition for selecting a frame image from the multiframe frame image as the frame image to be output is satisfied The frame image of the condition is taken as the frame image to be output.
  • a frame image to be output from the multi-frame frame image it is determined whether it is necessary to select a frame image based on at least one of motion information, exposure duration information, and jitter amount information, and if necessary, performing multi-frame from The operation of selecting the frame image to be outputted in the frame image, if not necessary, does not perform the operation of selecting the frame image to be output from the multi-frame frame image, reducing the power consumption of the terminal 70.
  • terminal 70 shown in FIG. 7 can also be specifically implemented corresponding to the method embodiment shown in FIG. 3.
  • FIG. 8 is another terminal 80 according to an embodiment of the present invention.
  • the terminal 80 includes a processor 801, a memory 802, and a user interface 803.
  • the processor 801, the memory 802, and the user interface 803 are mutually connected by a bus. connection.
  • Memory 802 includes, but is not limited to, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), or portable read only memory (CD-ROM).
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • CD-ROM portable read only memory
  • the processor 801 may be one or more central processing units (CPUs). In the case that the processor 801 is a CPU, the CPU may be a single core CPU or a multi-core CPU.
  • CPUs central processing units
  • the user interface 803 can be an interface of a touch screen, an interface of a physical button, an interface of a voice control component, an interface of a gesture recognition component, etc., in general, the user interface 803 is an operation information acquired by the terminal. interface.
  • the memory 802 is also used to store information such as related fingers, data, and the like.
  • a frame image whose resolution reaches a preset condition is selected from the multi-frame frame image as a frame to be outputted And an image of the at least one of the shake amount information and the contrast information, wherein the shake amount information and the contrast information are both used to reflect the sharpness of the frame image.
  • the frame image to be output is subjected to subsequent processing such as noise reduction and enhancement to generate a picture that can be presented to the user.
  • the starting point of the period of time is that the terminal 80 receives the moment when the user inputs a shooting instruction through the virtual button, that is, the period of time is a period of time after the terminal 80 receives the shooting instruction.
  • the end of the period of time is that the terminal 80 receives the moment when the user inputs a shooting instruction through the virtual button, that is, the period of time before the terminal 80 receives the shooting instruction.
  • the terminal 80 selects a clear frame image as the frame image to be output based on the jitter amount information or the contrast information from the multi-frame frame image continuously exposed for a period of time, Reduces the probability that the generated picture is unclear.
  • the processor 801 selects, as the frame image to be output, a frame image whose resolution reaches a preset condition from the multi-frame frame image, specifically:
  • the frame image having the smallest amount of jitter in the multi-frame frame image is taken as the frame image to be output;
  • a frame image having the largest contrast among the multi-frame image is taken as a frame image to be output.
  • the shooting parameter includes the jitter amount information, the contrast information, and the light source information
  • the light source information is a frame indicating whether the frame image is exposed under a point light source.
  • Information of an image wherein a frame image that is most recently exposed at a time when the photographing instruction is received in the multi-frame frame image is a target frame image;
  • the processor 801 selects, as the frame image to be output, a frame image whose resolution reaches a preset condition from the multi-frame frame image, specifically:
  • the frame image with the smallest amount of jitter in the multi-frame frame image is used as the frame image to be output;
  • the frame image having the largest contrast among the multi-frame image is taken as the frame image to be output.
  • the frame image before selecting the frame image as the frame image to be output from the multi-frame frame image, first determining whether the target frame image is taken under the point light source based on the light source information, and if not shooting under the point light source, The size of the contrast is used to select the frame image to be output, so that the frame image to be output selected by the contrast is not clear.
  • the shooting parameter includes the jitter amount information, and a frame image that is most recently exposed from a time when the shooting instruction is received in the multi-frame frame image is a target frame image;
  • the processor 801 selects, as the frame image to be output, a frame image whose resolution reaches a preset condition from the multi-frame frame image, specifically:
  • determining whether a jitter amount of the frame image in the frame image other than the target frame image in the multi-frame frame image is smaller than a second jitter threshold
  • the frame image having the smallest amount of jitter in the multi-frame image is taken as the frame image to be output, or when the shooting parameter includes contrast information
  • the frame image with the largest contrast among the multi-frame frame images is used as the frame image to be output.
  • the target frame image and the jitter amount of the frame image around the target frame image are too large, and if too large, the frame image with the smallest jitter or the largest contrast is selected from the multi-frame frame image.
  • the output frame image is first determined whether the target frame image and the jitter amount of the frame image around the target frame image are too large, and if too large, the frame image with the smallest jitter or the largest contrast is selected from the multi-frame frame image.
  • the processor 801 is further configured to use the target frame image as a frame image to be output when determining that the jitter amount of the target frame image is lower than the first jitter threshold.
  • the target frame image is used as the frame image to be output, and the frame image to be output is ensured to be the frame image that the user most wants to capture and is clearer.
  • processor 801 is further configured to:
  • the jitter amount of the frame image in the frame image other than the target frame image in the multi-frame frame image is smaller than the second jitter threshold
  • the jitter amount is smaller than the frame image of the second preset threshold
  • the frame image whose exposure time is closest to the exposure time of the target frame image is taken as the frame image to be output.
  • the frame image with a smaller amount of jitter in the vicinity is used as the frame image to be output, so that the determined waiting is performed.
  • the output frame image can be as close as possible to the frame image that the user wants to capture.
  • the processor 801 selects, as the frame image to be output, a frame image whose resolution reaches a preset condition from the multi-frame frame image, specifically:
  • an N frame frame image in which the amount of jitter in the multi-frame frame image is arranged in the first N bits is used as a frame image to be output;
  • an N frame frame image in which the contrast in the first N bits is arranged from the largest to the smallest in the multiframe frame image is taken as a frame image to be output, and N is a positive integer greater than 1.
  • the shooting parameter includes the jitter amount information, the contrast information, and the light source information
  • the light source information is information indicating whether the frame image is a frame image obtained by exposure under a point light source.
  • a frame image that is most recently exposed from a time when the photographing instruction is received in the multi-frame frame image is a target frame image; and the processor 801 selects, from the multi-frame frame image, a frame image whose resolution reaches a preset condition as The frame image to be output is specifically:
  • the N frame frame image in which the amount of jitter in the multi-frame frame image is arranged from the smallest to the largest N bits is used as the frame image to be output;
  • the N frame frame image in which the contrast in the first N bits is arranged from the largest to the smallest in the multiframe frame image is taken as the frame image to be output, and N is a positive integer greater than 1.
  • the frame image before selecting the frame image as the frame image to be output from the multi-frame frame image, first determining whether the target frame image is taken under the point light source based on the light source information, and if not shooting under the point light source, The size of the contrast is used to select the frame image to be output, so that the frame image to be output selected by the contrast is not clear.
  • the processor 801 is further configured to continuously expose the multi-frame frame image for the period of time before receiving the input shooting instruction through the user interface 803.
  • the processor 801 continuously exposing the multi-frame frame image in the period of time, specifically: The multi-frame frame image is continuously exposed by a plurality of cameras over the period of time.
  • the efficiency of exposing the frame image can be improved by exposing the frame image by a plurality of cameras.
  • the plurality of cameras includes at least one camera that exposes a color frame image and at least one camera that exposes a black and white frame image.
  • the frame image acquired by the camera that captures the color frame image and the camera that captures the black and white frame image has a lower frame noise and higher resolution of the frame image acquired by the two types of cameras.
  • the target frame image corresponds to at least one of motion information, exposure duration information, and jitter amount information
  • the motion information is information indicating whether the frame image is in a motion state
  • the exposure duration is The information is information indicating a length of time during which the frame image is exposed, and the frame image that is most recently exposed from the time when the shooting instruction is received is the target frame image; and the processor 801 responds to the shooting instruction based on the segment a frame image corresponding to each frame image in the continuously exposed multi-frame frame image, and a frame image whose resolution reaches a preset condition is selected from the multi-frame frame image as a frame image to be output, specifically:
  • a frame image whose resolution reaches a preset condition is selected from the multi-frame frame image as a frame image to be output.
  • a frame image to be output from the multi-frame frame image it is determined whether it is necessary to select a frame image based on at least one of motion information, exposure duration information, and jitter amount information, and if necessary, performing multi-frame from The operation of selecting the frame image to be outputted in the frame image, if not necessary, does not perform the operation of selecting the frame image to be output from the multi-frame frame image, reducing the power consumption of the terminal 80.
  • terminal 80 shown in FIG. 8 can also be specifically implemented corresponding to the method embodiment shown in FIG. 3.
  • FIG. 9 is a mobile phone 90 according to an embodiment of the present invention.
  • the mobile phone 90 may include at least one memory 901, a baseband chip 902, a radio frequency module 903, a peripheral system 904, and a sensor 905.
  • the memory 901 is configured to store an operating system, a network communication program, a user interface program, a ringtone setting program, and the like;
  • the baseband chip 902 includes at least one processor 9021, such as a CPU, a clock module 9022, and a power management module 9023;
  • the peripheral system 904 includes audio.
  • the memory 901 can be used to store instructions and data, and the memory 901 can mainly include a storage instruction area and a storage data area, wherein the storage instruction area can store an operating system, instructions required for at least one function, etc.; the instructions can cause the processor 9021 to execute Related operations; the processor 9021 is a control center for the handset 90, which connects various portions of the entire handset 90 using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 901, and by calling stored in the memory.
  • the data in the 901 is used to perform various functions and processing data of the mobile phone 90.
  • the processor 9021 is specifically configured to perform the following operations:
  • the output frame image includes at least one of jitter amount information and contrast information, and the jitter amount information and the contrast information are both used to reflect the sharpness of the frame image.
  • the frame image to be output is subjected to subsequent processing such as noise reduction and enhancement to generate a picture that can be presented to the user.
  • the starting point of the period of time is that the mobile phone 90 receives the moment when the user inputs a shooting instruction through the virtual button, that is, the period of time after the mobile phone 90 receives the shooting instruction.
  • the end of the period of time is that the mobile phone 90 receives the moment when the user inputs a shooting instruction through the virtual button, that is, the period of time before the mobile phone 90 receives the shooting instruction.
  • the jitter amount information is jitter information of the mobile phone 90 acquired by the mobile phone 90 controlling the sensor 905 in real time.
  • the mobile phone 90 selects a clear frame image as the frame image to be output based on the jitter amount information or the contrast information from the multi-frame frame image continuously exposed for a period of time. Reduces the probability that the generated picture is unclear.
  • the processor 9021 selects, as the frame image to be output, a frame image whose resolution reaches a preset condition from the multi-frame frame image, specifically:
  • the frame image having the smallest amount of jitter in the multi-frame frame image is taken as the frame image to be output;
  • a frame image having the largest contrast among the multi-frame image is taken as a frame image to be output.
  • the shooting parameter includes the jitter amount information, the contrast information, and the light source information
  • the light source information is information indicating whether the frame image is a frame image obtained by exposure under a point light source. a frame image that is most recently exposed from a time at which the shooting instruction is received in the multi-frame frame image is a target frame image;
  • the processor 9021 selects, as the frame image to be output, a frame image whose resolution reaches a preset condition from the multi-frame frame image, specifically:
  • the frame image with the smallest amount of jitter in the multi-frame frame image is used as the frame image to be output;
  • the frame image having the largest contrast among the multi-frame image is taken as the frame image to be output.
  • the frame image before selecting the frame image as the frame image to be output from the multi-frame frame image, first determining whether the target frame image is taken under the point light source based on the light source information, and if not shooting under the point light source, The size of the contrast is used to select the frame image to be output, so that the frame image to be output selected by the contrast is not clear.
  • the shooting parameter includes the jitter amount information, and a frame image that is most recently exposed from a time when the shooting instruction is received in the multi-frame frame image is a target frame image;
  • the processor 9021 selects, as the frame image to be output, a frame image whose resolution reaches a preset condition from the multi-frame frame image, specifically:
  • determining whether a jitter amount of the frame image in the frame image other than the target frame image in the multi-frame frame image is smaller than a second jitter threshold
  • the frame image having the smallest amount of jitter in the multi-frame image is taken as the frame image to be output, or when the shooting parameter includes contrast information
  • the frame image with the largest contrast among the multi-frame frame images is used as the frame image to be output.
  • the target frame image and the jitter amount of the frame image around the target frame image are too large, and if too large, the frame image with the smallest jitter or the largest contrast is selected from the multi-frame frame image.
  • the output frame image is first determined whether the target frame image and the jitter amount of the frame image around the target frame image are too large, and if too large, the frame image with the smallest jitter or the largest contrast is selected from the multi-frame frame image.
  • the processor 9021 is further configured to use the target frame image as a frame image to be output when determining that the jitter amount of the target frame image is lower than the first jitter threshold.
  • the target frame image is used as the frame image to be output, and the frame image to be output is ensured to be the frame image that the user most wants to capture and is clearer.
  • processor 9021 is further configured to:
  • the jitter amount of the frame image in the frame image other than the target frame image in the multi-frame frame image is smaller than the second jitter threshold
  • the jitter amount is smaller than the frame image of the second preset threshold
  • the frame image whose exposure time is closest to the exposure time of the target frame image is taken as the frame image to be output.
  • the frame image with a smaller amount of jitter in the vicinity is used as the frame image to be output, so that the determined waiting is performed.
  • the output frame image can be as close as possible to the frame image that the user wants to capture.
  • the processor 9021 selects, as the frame image to be output, a frame image whose resolution reaches a preset condition from the multi-frame frame image, specifically:
  • an N frame frame image in which the amount of jitter in the multi-frame frame image is arranged in the first N bits is used as a frame image to be output;
  • an N frame frame image in which the contrast in the first N bits is arranged from the largest to the smallest in the multiframe frame image is taken as a frame image to be output, and N is a positive integer greater than 1.
  • the shooting parameter includes the jitter amount information, the contrast information, and the light source information
  • the light source information is information indicating whether the frame image is a frame image obtained by exposure under a point light source.
  • a frame image that is most recently exposed from a time when the photographing instruction is received in the multi-frame frame image is a target frame image; the processor 9021 selects, from the multi-frame frame image, a frame image whose resolution reaches a preset condition as The frame image to be output is specifically:
  • the N frame frame image in which the amount of jitter in the multi-frame frame image is arranged from the smallest to the largest N bits is used as the frame image to be output;
  • the N frame frame image in which the contrast in the first N bits is arranged from the largest to the smallest in the multiframe frame image is taken as the frame image to be output, and N is a positive integer greater than 1.
  • the frame image to be output before selecting the frame image as the frame image to be output from the multi-frame frame image, first determining whether the target frame image is taken under the point light source based on the light source information, if shooting under the point light source The frame image to be output is not selected based on the size of the contrast, and the frame image to be output selected by the contrast is prevented from being unclear.
  • the processor 9021 is further configured to continuously expose the multi-frame frame image for the period of time before receiving the input shooting instruction through the user interface.
  • the processor 9021 continuously exposes the multi-frame frame image during the period of time, specifically: continuously exposing the multi-frame frame by multiple cameras during the period of time image.
  • the efficiency of exposing the frame image can be improved by exposing the frame image by a plurality of cameras.
  • the plurality of cameras includes at least one camera that exposes a color frame image and at least one camera that exposes a black and white frame image.
  • the frame image acquired by the camera that captures the color frame image and the camera that captures the black and white frame image has a lower frame noise and higher resolution of the frame image acquired by the two types of cameras.
  • the target frame image corresponds to at least one of motion information, exposure duration information, and jitter amount information
  • the motion information is information indicating whether the frame image is in a motion state
  • the exposure duration is The information is information indicating a length of time during which the frame image is exposed, wherein the frame image that is most recently exposed from the time when the shooting instruction is received is the target frame image;
  • the processor 9021 is responsive to the shooting instruction, based on the segment a frame image corresponding to each frame image in the continuously exposed multi-frame frame image, and a frame image whose resolution reaches a preset condition is selected from the multi-frame frame image as a frame image to be output, specifically:
  • a frame image whose resolution reaches a preset condition is selected from the multi-frame frame image as a frame image to be output.
  • determining whether it is necessary to select a frame image based on at least one of motion information, exposure duration information, and jitter amount information if necessary. The operation of selecting the frame image to be output from the multi-frame frame image is performed, and if it is not necessary, the operation of selecting the frame image to be output from the multi-frame frame image is not performed, and the power consumption of the mobile phone 90 is reduced.
  • Touch display 9044 can be used to display information entered by the user or information provided to the user as well as various menus of handset 90.
  • the touch screen display 9044 may include a touch panel and a display panel.
  • the display panel may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.
  • the touch panel may cover the display panel, and when the touch panel detects a touch operation on or near the touch panel, the touch panel transmits to the processor to determine the type of the touch event, and then the processor 9021 displays the panel according to the type of the touch event. Provide corresponding visual output on it.
  • the touch panel and the display panel are two separate components to implement the input and output functions of the handset 90, but in some embodiments, the touch panel can be integrated with the display panel to implement the input and output functions of the handset 90.
  • Audio input/output circuitry 9047 and audio controller 9042 can provide an audio interface between the user and handset 90.
  • the audio input/output circuit 9047 can transmit the converted audio data of the received audio data to the speaker, and convert it into a sound signal output by the speaker; on the other hand, the audio input/output device 9047 can be used for detecting and detecting the surrounding environment. A ringtone or music, and the detected ringtone or music is converted into an electrical signal to the processor 9021.
  • the mobile phone 90 shown in FIG. 9 can also be specifically implemented corresponding to the method embodiment shown in FIG. 3.
  • the terminal after receiving the shooting instruction input by the user, the terminal selects a clear frame image based on the jitter amount information or the contrast information from the multi-frame frame image continuously exposed for a period of time.
  • the frame image to be output reduces the probability that the generated picture is unclear.
  • the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Abstract

实施例公开一种拍照方法及终端,该方法包括:终端接收输入的拍摄指令;所述终端响应所述拍摄指令,基于一段时间内连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,所述拍摄参数至少包含抖动量信息和对比度信息中一项,所述抖动量信息和所述对比度信息均用于反映帧图像的清晰度。通过实施本实施例,能够减小生成的图片不清晰的概率。

Description

一种拍照方法及终端 技术领域
本发明涉及计算机技术领域,尤其涉及一种拍照方法及终端。
背景技术
随着电子技术的快速发展,大部分终端(例如,手机、电脑、智能手表等)都具备了拍照的功能,终端拍照的过程包括如下几个步骤:A、终端记录用户按下拍摄按键时的按键时间戳;B、终端在一段时间内连续曝光多帧帧图像,每个帧图像对应有自身的曝光时间戳;C、终端将该多帧帧图像中对应的曝光时间戳与上述按键时间戳最接近的帧图像作为待输出的帧图像,然后对该待输出的帧图像做优化处理以生成能够展现给用户的照片。其中,步骤A和B的先后顺序要根据实际情况而定,当终端采用的是0秒延时(英文:Zero Shutter Lag,简称:ZSL)拍摄模式(即在用户按下拍摄按键时立即从已经存好的多帧帧图像中选择对应的曝光时间戳最近的帧图像作为待输出的帧图像)时,步骤B会在步骤A之前,当采用非ZSL拍摄模式时,步骤B会在步骤A之后。
用户在拍照的过程中通常会受所处环境(如车上,步行),或者操作方式(如按拍摄键用力较大等)的影响而出现终端抖动的情况。由于终端拍照的时候需要一定的曝光时间来达到足够的进光量,因此如果在曝光时间内终端出现抖动会造成曝光的帧图像模糊,图1是一段时间内终端的抖动量(shake confidence)随时间变化而变化的示意图,该终端在大部分时间的抖动量变换不大,当用户在某个时间点按下拍照按键时就会出现曲线10所示的较大抖动,抖动较大会出现图2所示的情况,即抖动前光子信号1在感光芯片上的位置20处成像,抖动后光子信号2也在该位置20处成像,两种光子信号成的像叠加导致生成的帧图像不清晰,由于生成的该图像帧对应的时间戳接近按键时间戳,因此该终端很可能将该不清晰的帧图像作为待输出的帧图像。
综上所述,现有技术中获取待输出的帧图像的方式会导致最终生成的图片 不清晰。
发明内容
本发明实施例公开了一种拍照方法及终端,能够减小生成的图片不清晰的概率。
第一方面,本发明实施例提供一种拍照方法,该方法包括:
终端接收输入的拍摄指令;
所述终端响应所述拍摄指令,基于一段时间内连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,所述拍摄参数至少包含抖动量信息和对比度信息中一项,所述抖动量信息和所述对比度信息均用于反映帧图像的清晰度。该待输出的帧图像经过降噪、增强等后续处理即可生成能够展现给用户的图片。在一种可选的方案中,该一段时间的起点为终端接收到用户通过虚拟按钮输入拍摄指令的时刻,即该一段时间为该终端接收到该拍摄指令之后的一段时间。在又一可选的方案中,该一段时间的终点为终端接收到用户通过虚拟按钮输入拍摄指令的时刻,即该一段时间为该终端接收到该拍摄指令之前的一段时间。
通过执行上述步骤,终端在接收到用户输入的拍摄指令后,从一段时间内连续曝光的多帧帧图像中基于抖动量信息,或者对比度信息选择较清晰的帧图像作为待输出的帧图像,减小了生成的图片不清晰的概率。
结合第一方面,在第一方面的第一种可能的实现方式中,所述从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像包括:
当所述拍摄参数包含抖动量信息时,将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;或者
当所述拍摄参数包含对比度信息时,将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
结合第一方面,在第一方面的第二种可能的实现方式中,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像 是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
所述从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像包括:
根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
若是,则将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;
若否,则将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
具体地,在从多帧帧图像中选择帧图像作为待输出的帧图像之前,先基于光源信息来判断该目标帧图像是否是在点光源下拍摄的,若是在点光源下拍摄的则不基于对比度的大小来选择待输出的帧图像,避免通过该对比度选择的待输出的帧图像不清晰。
结合第一方面,在第一方面的第三种可能的实现方式中,所述拍摄参数包含所述抖动量信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
所述从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像包括;
判断所述目标帧图像的抖动量是否低于第一抖动阈值;
若不低于所述第一抖动阈值,则判断所述多帧帧图像中除所述目标帧图像以外的其他帧图像中是否有帧图像的抖动量小于第二抖动阈值;
若没有帧图像的抖动量小于所述第二抖动阈值,则将所述多帧帧图像中的抖动量最小的帧图像作为待输出的帧图像,或者当所述拍摄参数包含对比度信息时将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
具体地,先判断该目标帧图像以及目标帧图像周围的帧图像的抖动量是否都太大,如果都太大才从该多帧帧图像中选择抖动量最小,或者对比度最大的帧图像作为待输出的帧图像。
结合第一方面的第三种可能的实现方式,在第一方面的第四种可能的实现方式中,所述方法还包括:
若低于所述第一抖动阈值,则将所述目标帧图像作为待输出的帧图像。
具体地,当该目标帧图像的抖动量比较小时,将该目标帧图像作为待输出的帧图像,保证该待输出的帧图像为用户最想拍摄的且较清晰的帧图像。
结合第一方面的第三种可能的实现方式或者第四种可能的实现方式,在第一方面的第五种可能的实现方式中,所述方法还包括:
若有帧图像的抖动量小于所述第二抖动阈值,则将抖动量小于所述第二预设阈值的帧图像中,曝光时间距离所述目标帧图像的曝光时间最近的帧图像作为待输出的帧图像。
具体地,当目标帧图像的抖动量较大,而该目标帧图像附近有帧图像的抖动量比较小时,将该附近的抖动量比较小的帧图像作为待输出的帧图像,使得确定的待输出的帧图像能够尽量接近用户想要拍摄的帧图像。
结合第一方面,在第一方面的第六种可能的实现方式中,所述从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像包括:
当所述拍摄参数包含所述抖动量信息时,将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;或者
当所述拍摄参数包含所述对比度信息时,将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
结合第一方面,在第一方面的第七种可能的实现方式中,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像包括:
根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
若是,则将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;
若否,则将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
具体地,在从多帧帧图像中选择帧图像作为待输出的帧图像之前,先基于光源信息来判断该目标帧图像是否是在点光源下拍摄的,若是在点光源下拍摄的则不基于对比度的大小来选择待输出的帧图像,避免通过该对比度选择的待输出的帧图像不清晰。
结合第一方面,或者第一方面的第一种可能的实现方式,或者第一方面的第二种可能的实现方式,或者第一方面的第三种可能的实现方式,或者第一方面的第四种可能的实现方式,或者第一方面的第五种可能的实现方式,或者第一方面的第六种可能的实现方式,或者第一方面的第七种可能的实现方式,在第一方面的第八种可能的实现方式中,所述终端接收输入的拍摄指令之前,所述方法还包括:
所述终端在所述一段时间内连续曝光所述多帧帧图像。
结合第一方面的第八种可能的实现方式,在第一方面的第九种可能的实现方式中,所述终端在所述一段时间内连续曝光所述多帧帧图像包括:
所述终端在所述一段时间内通过多个摄像头连续曝光所述多帧帧图像。
具体地,通过多个摄像头曝光帧图像能够提高曝光帧图像的效率。
结合第一方面,或者第一方面的第一种可能的实现方式,或者第一方面的第二种可能的实现方式,或者第一方面的第三种可能的实现方式,或者第一方面的第四种可能的实现方式,或者第一方面的第五种可能的实现方式,或者第一方面的第六种可能的实现方式,或者第一方面的第七种可能的实现方式,或者第一方面的第八种可能的实现方式,或者第一方面的第九种可能的实现方式,在第一方面的第十种可能的实现方式中,所述目标帧图像至少对应运动信息、曝光时长信息和抖动量信息中一项,所述运动信息为表明帧图像是否处于运动状态的信息,所述曝光时长信息为表明帧图像曝光的时间长度的信息,所述多 帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述终端响应所述拍摄指令,基于一段时间内连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像包括:
响应所述拍摄指令,根据所述目标帧图像对应的运动信息、曝光时长信息和抖动量信息中至少一项来判断是否满足从所述多帧帧图像中选择帧图像作为待输出的帧图像的条件;
若满足,则从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像。
具体地,在从多帧帧图像中选择待输出的帧图像之前,基于运动信息、曝光时长信息和抖动量信息中至少一项来判断是否有必要选择帧图像,若有必要才执行从多帧帧图像中选择待输出的帧图像的操作,若没必要则不执行从多帧帧图像中选择待输出的帧图像的操作,减小了终端的功耗。
第二方面,本发明实施例提供一种终端,该终端包括:
接收单元,用于接收输入的拍摄指令;
响应单元,用于响应所述拍摄指令,基于一段时间内连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,所述拍摄参数至少包含抖动量信息和对比度信息中一项,所述抖动量信息和所述对比度信息均用于反映帧图像的清晰度。该待输出的帧图像经过降噪、增强等后续处理即可生成能够展现给用户的图片。在一种可选的方案中,该一段时间的起点为终端接收到用户通过虚拟按钮输入拍摄指令的时刻,即该一段时间为该终端接收到该拍摄指令之后的一段时间。在又一可选的方案中,该一段时间的终点为终端接收到用户通过虚拟按钮输入拍摄指令的时刻,即该一段时间为该终端接收到该拍摄指令之前的一段时间。
通过运行上述单元,终端在接收到用户输入的拍摄指令后,从一段时间内连续曝光的多帧帧图像中基于抖动量信息,或者对比度信息选择较清晰的帧图像作为待输出的帧图像,减小了生成的图片不清晰的概率。
结合第二方面,在第二方面的第一种可能的实现方式中,所述响应单元从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
当所述拍摄参数包含抖动量信息时,将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;或者
当所述拍摄参数包含对比度信息时,将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
结合第二方面,在第二方面的第二种可能的实现方式中,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
所述响应单元从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
若是,则将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;
若否,则将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
具体地,在从多帧帧图像中选择帧图像作为待输出的帧图像之前,先基于光源信息来判断该目标帧图像是否是在点光源下拍摄的,若是在点光源下拍摄的则不基于对比度的大小来选择待输出的帧图像,避免通过该对比度选择的待输出的帧图像不清晰。
结合第二方面,在第二方面的第三种可能的实现方式中,所述拍摄参数包含所述抖动量信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
所述响应单元从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为;
判断所述目标帧图像的抖动量是否低于第一抖动阈值;
若不低于所述第一抖动阈值,则判断所述多帧帧图像中除所述目标帧图像以外的其他帧图像中是否有帧图像的抖动量小于第二抖动阈值;
若没有帧图像的抖动量小于所述第二抖动阈值,则将所述多帧帧图像中的抖动量最小的帧图像作为待输出的帧图像,或者当所述拍摄参数包含对比度信息时将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
具体地,先判断该目标帧图像以及目标帧图像周围的帧图像的抖动量是否都太大,如果都太大才从该多帧帧图像中选择抖动量最小,或者对比度最大的帧图像作为待输出的帧图像。
结合第二方面的第三种可能的实现方式,在第二方面的第四种可能的实现方式中,所述响应单元还还用于在所述目标帧图像的抖动量低于所述第一抖动阈值时,将所述目标帧图像作为待输出的帧图像。
具体地,当该目标帧图像的抖动量比较小时,将该目标帧图像作为待输出的帧图像,保证该待输出的帧图像为用户最想拍摄的且较清晰的帧图像。
结合第二方面的第三种可能的实现方式或者第四种可能的实现方式,在第二方面的第五种可能的实现方式中,所述响应单元还用于在所述多帧帧图像中除所述目标帧图像以外的其他帧图像中有帧图像的抖动量小于第二抖动阈值时,将抖动量小于所述第二预设阈值的帧图像中,曝光时间距离所述目标帧图像的曝光时间最近的帧图像作为待输出的帧图像。
具体地,当目标帧图像的抖动量较大,而该目标帧图像附近有帧图像的抖动量比较小时,将该附近的抖动量比较小的帧图像作为待输出的帧图像,使得确定的待输出的帧图像能够尽量接近用户想要拍摄的帧图像。
结合第二方面,在第二方面的第六种可能的实现方式中,所述响应单元从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
当所述拍摄参数包含所述抖动量信息时,将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;或者
当所述拍摄参数包含所述对比度信息时,将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
结合第二方面,在第二方面的第七种可能的实现方式中,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述响应单元从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
若是,则将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;
若否,则将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
具体地,在从多帧帧图像中选择帧图像作为待输出的帧图像之前,先基于光源信息来判断该目标帧图像是否是在点光源下拍摄的,若是在点光源下拍摄的则不基于对比度的大小来选择待输出的帧图像,避免通过该对比度选择的待输出的帧图像不清晰。
结合第二方面,或者第二方面的第一种可能的实现方式,或者第二方面的第二种可能的实现方式,或者第二方面的第三种可能的实现方式,或者第二方面的第四种可能的实现方式,或者第二方面的第五种可能的实现方式,或者第二方面的第六种可能的实现方式,或者第二方面的第七种可能的实现方式,在第二方面的第八种可能的实现方式中,所述终端还包括曝光单元,所述曝光单元用于在所述接收单元接收输入的拍摄指令之前,在所述一段时间内连续曝光所述多帧帧图像。
结合第二方面的第八种可能的实现方式,在第二方面的第九种可能的实现方式中,所述曝光单元具体用于在所述一段时间内通过多个摄像头连续曝光所述多帧帧图像。
具体地,通过多个摄像头曝光帧图像能够提高曝光帧图像的效率。
结合第二方面,或者第二方面的第一种可能的实现方式,或者第二方面的第二种可能的实现方式,或者第二方面的第三种可能的实现方式,或者第二方面的第四种可能的实现方式,或者第二方面的第五种可能的实现方式,或者第二方面的第六种可能的实现方式,或者第二方面的第七种可能的实现方式,或者第二方面的第八种可能的实现方式,或者第二方面的第九种可能的实现方式,在第二方面的第十种可能的实现方式中,所述目标帧图像至少对应运动信息、曝光时长信息和抖动量信息中一项,所述运动信息为表明帧图像是否处于运动状态的信息,所述曝光时长信息为表明帧图像曝光的时间长度的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述响应单元包括:
判断子单元,用于响应所述拍摄指令,根据所述目标帧图像对应的运动信息、曝光时长信息和抖动量信息中至少一项来判断是否满足从所述多帧帧图像中选择帧图像作为待输出的帧图像的条件;
选择子单元,用于在所述判断子单元判断出满足从所述多帧帧图像中选择帧图像作为待输出的帧图像的条件时,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像。
具体地,在从多帧帧图像中选择待输出的帧图像之前,基于运动信息、曝光时长信息和抖动量信息中至少一项来判断是否有必要选择帧图像,若有必要才执行从多帧帧图像中选择待输出的帧图像的操作,若没必要则不执行从多帧帧图像中选择待输出的帧图像的操作,减小了终端的功耗。
第三方面,本发明实施例提供一种终端,所述终端包括存储器、处理器和用户接口,所述存储器用于存储程序,所述处理器调用所述存储器中的程序,用于执行如下操作:
通过所述用户接口接收输入的拍摄指令;
响应所述拍摄指令,基于一段时间内连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为 待输出的帧图像,所述拍摄参数至少包含抖动量信息和对比度信息中一项,所述抖动量信息和所述对比度信息均用于反映帧图像的清晰度。该待输出的帧图像经过降噪、增强等后续处理即可生成能够展现给用户的图片。在一种可选的方案中,该一段时间的起点为终端接收到用户通过虚拟按钮输入拍摄指令的时刻,即该一段时间为该终端接收到该拍摄指令之后的一段时间。在又一可选的方案中,该一段时间的终点为终端接收到用户通过虚拟按钮输入拍摄指令的时刻,即该一段时间为该终端接收到该拍摄指令之前的一段时间。
通过执行上述操作,终端在接收到用户输入的拍摄指令后,从一段时间内连续曝光的多帧帧图像中基于抖动量信息,或者对比度信息选择较清晰的帧图像作为待输出的帧图像,减小了生成的图片不清晰的概率。
结合第三方面,在第三方面的第一种可能的实现方式中,所述处理器从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
当所述拍摄参数包含抖动量信息时,将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;或者
当所述拍摄参数包含对比度信息时,将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
结合第三方面,在第三方面的第二种可能的实现方式中,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
所述处理器从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
若是,则将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;
若否,则将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
具体地,在从多帧帧图像中选择帧图像作为待输出的帧图像之前,先基于光源信息来判断该目标帧图像是否是在点光源下拍摄的,若是在点光源下拍摄的则不基于对比度的大小来选择待输出的帧图像,避免通过该对比度选择的待输出的帧图像不清晰。
结合第三方面,在第三方面的第三种可能的实现方式中,所述拍摄参数包含所述抖动量信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
所述处理器从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
判断所述目标帧图像的抖动量是否低于第一抖动阈值;
若不低于所述第一抖动阈值,则判断所述多帧帧图像中除所述目标帧图像以外的其他帧图像中是否有帧图像的抖动量小于第二抖动阈值;
若没有帧图像的抖动量小于所述第二抖动阈值,则将所述多帧帧图像中的抖动量最小的帧图像作为待输出的帧图像,或者当所述拍摄参数包含对比度信息时将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
具体地,先判断该目标帧图像以及目标帧图像周围的帧图像的抖动量是否都太大,如果都太大才从该多帧帧图像中选择抖动量最小,或者对比度最大的帧图像作为待输出的帧图像。
结合第三方面的第三种可能的实现方式,在第三方面的第四种可能的实现方式中,所述处理器还用于在判断出所述目标帧图像的抖动量低于第一抖动阈值时,将所述目标帧图像作为待输出的帧图像。
具体地,当该目标帧图像的抖动量比较小时,将该目标帧图像作为待输出的帧图像,保证该待输出的帧图像为用户最想拍摄的且较清晰的帧图像。
结合第三方面的第三种可能的实现方式或者第四种可能的实现方式,在第三方面的第五种可能的实现方式中,所述处理器还用于:
在判断出所述多帧帧图像中除所述目标帧图像以外的其他帧图像中有帧图像的抖动量小于第二抖动阈值时,将抖动量小于所述第二预设阈值的帧图像 中,曝光时间距离所述目标帧图像的曝光时间最近的帧图像作为待输出的帧图像。
具体地,当目标帧图像的抖动量较大,而该目标帧图像附近有帧图像的抖动量比较小时,将该附近的抖动量比较小的帧图像作为待输出的帧图像,使得确定的待输出的帧图像能够尽量接近用户想要拍摄的帧图像。
结合第三方面,在第三方面的第六种可能的实现方式中,所述处理器从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
当所述拍摄参数包含所述抖动量信息时,将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;或者
当所述拍摄参数包含所述对比度信息时,将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
结合第三方面,在第三方面的第七种可能的实现方式中,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述处理器从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
若是,则将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;
若否,则将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
具体地,在从多帧帧图像中选择帧图像作为待输出的帧图像之前,先基于光源信息来判断该目标帧图像是否是在点光源下拍摄的,若是在点光源下拍摄的则不基于对比度的大小来选择待输出的帧图像,避免通过该对比度选择的待输出的帧图像不清晰。
结合第三方面,或者第三方面的第一种可能的实现方式,或者第三方面的第二种可能的实现方式,或者第三方面的第三种可能的实现方式,或者第三方面的第四种可能的实现方式,或者第三方面的第五种可能的实现方式,或者第三方面的第六种可能的实现方式,或者第三方面的第七种可能的实现方式,在第三方面的第八种可能的实现方式中,所述处理器还用于在通过所述用户接口接收输入的拍摄指令之前,在所述一段时间内连续曝光所述多帧帧图像。
结合第三方面的第八种可能的实现方式,在第三方面的第九种可能的实现方式中,所述处理器在所述一段时间内连续曝光所述多帧帧图像,具体为:在所述一段时间内通过多个摄像头连续曝光所述多帧帧图像。
具体地,通过多个摄像头曝光帧图像能够提高曝光帧图像的效率。
结合第三方面,或者第三方面的第一种可能的实现方式,或者第三方面的第二种可能的实现方式,或者第三方面的第三种可能的实现方式,或者第三方面的第四种可能的实现方式,或者第三方面的第五种可能的实现方式,或者第三方面的第六种可能的实现方式,或者第三方面的第七种可能的实现方式,或者第三方面的第八种可能的实现方式,或者第三方面的第九种可能的实现方式,在第三方面的第十种可能的实现方式中,所述目标帧图像至少对应运动信息、曝光时长信息和抖动量信息中一项,所述运动信息为表明帧图像是否处于运动状态的信息,所述曝光时长信息为表明帧图像曝光的时间长度的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述处理器响应所述拍摄指令,基于一段时间内连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
响应所述拍摄指令,根据所述目标帧图像对应的运动信息、曝光时长信息和抖动量信息中至少一项来判断是否满足从所述多帧帧图像中选择帧图像作为待输出的帧图像的条件;
若满足,则从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像。
具体地,在从多帧帧图像中选择待输出的帧图像之前,基于运动信息、曝光时长信息和抖动量信息中至少一项来判断是否有必要选择帧图像,若有必要才执行从多帧帧图像中选择待输出的帧图像的操作,若没必要则不执行从多帧帧图像中选择待输出的帧图像的操作,减小了终端的功耗。
在第一方面,或者第二方面,或者第三方面的一些可能的实现方式中,所述多个摄像头包含至少一个曝光彩色帧图像的摄像头和至少一个曝光黑白帧图像的摄像头。
具体地,通过拍摄彩色帧图像的摄像头和拍摄黑白帧图像的摄像头共同获取的帧图像,通过这两种摄像头获取的帧图像合成的图片噪声更低、解析更高。
第四方面,本发明实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令,所述指令当被包括一个或多个应用程序的终端执行时使所述终端执行第一方面任一可能的实现方式所描述的方法。
通过执行该存储介质中的程序,终端在接收到用户输入的拍摄指令后,从一段时间内连续曝光的多帧帧图像中基于抖动量信息,或者对比度信息选择较清晰的帧图像作为待输出的帧图像,减小了生成的图片不清晰的概率。
通过实施本发明实施例,终端在接收到用户输入的拍摄指令后,从一段时间内连续曝光的多帧帧图像中基于抖动量信息,或者对比度信息选择较清晰的帧图像作为待输出的帧图像,减小了生成的图片不清晰的概率。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍。
图1为现有技术中抖动量随时间变化的示意图;
图2为现有技术中导致帧图像模糊的原理示意图;
图3为本发明实施例公开的一种拍照方法的流程示意图;
图4为本发明实施例公开的一种由帧图像得到的图片的效果示意图;
图5为本发明实施例公开的又一种由帧图像得到的图片的效果示意图;
图6为本发明实施例公开的又一种由帧图像得到的图片的效果示意图;
图7为本发明实施例公开的一种终端的结构示意图;
图8为本发明实施例公开的又一种终端的结构示意图;
图9为本发明实施例公开的又一种手机的结构示意图;
具体实施方式
下面将结合附图对本发明实施例中的技术方案进行清楚、完整地描述。
本发明实施例所描述的终端可以是照相机、手机、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(MID,mobile internet device)、可穿戴设备、或其他可以拍摄照片的终端设备。
请参见图3,图3是本发明实施例提供的一种拍照方法的流程示意图,该方法包括但不限于如下步骤。
步骤S301:终端在一段时间内连续曝光多帧帧图像,
具体地,连续曝光的多帧帧图像中每帧帧图像对应有自身的拍摄参数,该拍摄参数包括抖动量信息和对比度信息中至少一项,也即是说,在一种方案中该拍摄参数包括抖动量信息但不包含对比度信息,在又一种方案中该拍摄参数包含对比度信息但不包含抖动量信息,在又一种方案中该拍摄参数包含抖动量信息和对比度信息,该拍摄参数除了包含已经明确的信息之外,是否还包含其他信息或者包含其他什么信息此处不作限制,该抖动量信息反映的是该终端曝光帧图像时该终端的抖动量,如果抖动量大则曝光出的帧图像不清晰,该对比度为曝光的帧图像的对比度。
如果拍摄参数包含对比度信息则该对比度信息可以由该终端在对焦的过程中计算得到;如果拍摄参数存在抖动量信息则该抖动量信息可以通过陀螺仪传感器(英文:gyro sensor)、重力传感器等元件来获取;例如,根据图像的曝光时间T以及该曝光时间T内陀螺仪传感器获取到的角速度信息计算该终端的抖动量。陀螺仪传感器的角速度绝对值在该曝光时间T内的积分可反映终端在图像曝光时间内T的运动距离。由于陀螺仪传感器获取角速度的频率大约 为10ms一次(即获取角速度的时间间隔为10ms),因此离散情况下可以认为终端在获取角速度的时间间隔内做的是匀速运动,因此终端的抖动量计算公式可以为:
Figure PCTCN2016078503-appb-000001
在公式1-1中,gyroXi,gyroYi,gyroZi为在时间段ti内的陀螺仪传感器在预设的三个方向上的角速度,d为在图像曝光时间T内终端的抖动量,d越大则表明终端的抖动量越大,终端的抖动量能够反映该终端在抖动时曝光出的帧图像的清晰度。计算抖动量还存在其他方式,此处不一一举例。
终端曝光帧图像的时间此处不作限制,可以在用户启动照相机进行预览但未输入拍摄指令之前的一段时间来曝光该多帧帧图像,也可以在用户输入拍摄指令之后的一段时间来曝光该多帧帧图像,该一段时间可以为预先为该终端配置的一个时间,可选的,该一段时间还可以为用户根据需要设置的一个时间;可选的,该多帧帧图像中各个帧图像的曝光时间存在先后顺序;曝光得到的多帧帧图像可以缓存到预设的存储空间中供后续使用。
在一种可选的方案中,该终端通过多个摄像头曝光帧图像,多个摄像头共同曝光可以在很短的时间内曝光得到很多帧帧图像供后续使用,提高了曝光帧图像的效率;进一步地,该多个摄像头中可以包括至少一个用来曝光彩色帧图像的摄像和至少一个用来曝光黑白帧图像的摄像,两种摄像头相互独立,光轴平行,使得该终端可以曝光得到同一场景的黑白帧图像和彩色图像。由于黑白的帧图像具有对光的高采样率以及噪声低的特点,彩色帧图像具有解析度较低、噪声较大的特点,因此本发明实施例通过上述两种摄像头获取的帧图像可以用于后续合成噪声较低、解析度高的图片。在实际使用时,还可以设置单个摄像头单独工作,该单个摄像头可以先后曝光同一场景的彩色帧图像和黑白帧图像。
步骤S302:终端接收用户输入的拍摄指令并标记输入该拍摄指令的拍摄时间戳。
具体地,用户可以通过按键、声控、手势控制等方式来输入拍摄指令以触发终端拍照,优选通过虚拟按键来输入该拍摄指令,相应地,终端接收该拍摄 指令并标记接收该拍摄指令的拍摄时间戳。
需要说明的是,步骤S301与S302的执行顺序此处不作限制,一种可选的方式中步骤S301在步骤S302之前,一种方案中步骤S302在步骤S301之前。进一步地,该终端响应上述拍摄指令,从该一段时间内曝光的多帧帧图像中选择帧图像作为待输出的帧图像,从该一段时间内曝光的多帧帧图像中选择帧图像作为待输出的帧图像可以具体为:从该多帧帧图像中选择一帧帧图像作为待输出的帧图像,或者从该多帧帧图像中选择多帧帧图像作为待输出的帧图像,以下通过步骤S303~S305来阐述从该多帧帧图像中选择一帧帧图像作为待输出的帧图像的方案,通过步骤S306来阐述从该多帧帧图像中选择至少两帧帧图像作为待输出的帧图像的方案。
步骤S303:该终端判断该目标帧图像对应的抖动量是否小于第一抖动阈值T1,若小于则将该目标帧图像作为最终待输出的帧图像,若不小于则执行步骤S304。
具体地,该多帧帧图像中每帧帧图像都对应自身的曝光时间戳,终端根据该每帧帧图像的曝光时间戳从该多帧帧图像中选择对应的曝光时间戳离上述拍摄时间戳最近的帧图像作为目标帧图像。该终端根据该目标帧图像对应的抖动量信息判断该曝光该目标帧图像时该终端的抖动量是否小于预设的第一抖动阈值T1,若该抖动量小于该T1,则终端将目标帧图像作为最终待输出的帧图像;若该抖动量不小于该T1,则表明该目标帧图像的清晰度较差,不适宜作为最终待输出的帧图像,因此执行步骤S304来从其他帧图像中选择清晰度较高的帧图像作为最终待输出的帧图像,目标帧图像的抖动量与该。
步骤S304:该终端判断该多帧帧图像中除该目标帧图像以外的其他帧图像中是否有帧图像对应的抖动量小于第二抖动阈值T2,若有帧图像对应的抖动量小于T2,则将对应的抖动量小于T2的帧图像中曝光时间距离该目标帧图像的曝光时间最近的帧图像作为待输出的帧图像。若没有对应的抖动量小于T2的帧图像,则执行步骤S305。
具体地,该第二抖动阈值T2小于第一抖动阈值T1,也即是说终端对目标 帧图像的抖动量的要求比对其他帧图像的抖动量的要求要低,其原因在于,目标帧图像对应的曝光时间戳最接近拍摄时间戳,即该目标帧图像为用户最想拍摄的场景,因此对该目标帧图像的要求相对较低。
进一步地,以下举例说明如何基于该T2从该多帧帧图像中选择帧图像作为最终待输出的帧图像,假设缓存的多帧帧图像按曝光时间戳的先后排序依次为:帧图像A1、帧图像A2、帧图像A3、帧图像A4、帧图像A5、目标帧图像、帧图像B5、帧图像B4、帧图像B3、帧图像B2、帧图像B1。那么该终端按照帧图像A5、帧图像B5、帧图像A4、帧图像B4、帧图像A3、帧图像B3、帧图像A2、帧图像B2、帧图像A1、帧图像B1的顺序来判断照帧图像A5的抖动量、帧图像B5的抖动量、帧图像A4的抖动量、帧图像B4的抖动量、帧图像A3的抖动量、帧图像B3的抖动量、帧图像A2的抖动量、帧图像B2的抖动量、帧图像A1的抖动量、帧图像B1的抖动量是否低于T2,当判断出其中某个帧图像的抖动量小于该T2时,则停止判断后面的帧图像的抖动量是否小于T2,并将该某个帧图像作为最终待输出的帧图像。若对该多帧帧图像的抖动量都进行判断后发现没有帧图像的抖动量小于T2,则执行步骤S305。
步骤S305:在第一种可选的方案中,上述拍摄参数包含抖动量信息,此时可以从该多帧帧图像中选择抖动量最小的帧图像作为待输出的帧图像。在第二种可选的方案中,上述拍摄参数包含对比度信息,此时可以从该多帧帧图像中选择对比度最大的帧图像作为待输出的帧图像。在第三种可选的方案中,上述拍摄参数既包含抖动量信息也包含对比度信息,此时可能从该多帧帧图像中选择抖动量最小的帧图像作为待输出的帧图像,也可能从该多帧帧图像中选择对比度最大的帧图像作为待输出的帧图像。通过这三种可选的方案选择出的帧图像均为清晰度满足预设条件的帧图像。
以下对第三种可选的方案进行举例说明,该拍摄参数还可以包括光源信息,该光源信息用于标识对应的帧图像是否是在点光源下曝光的,可以在曝光帧图像的时候通过滤波器对该帧图像进行滤波处理以判断该帧图像中是否含有点光源的一些特征,如果有则可以确定该帧图像是在点光源的场景下拍摄的;该 终端根据该目标帧图像对应的光源信息判断该目标帧图像是否是在点光源下曝光的,如果该目标帧图像是在点光源下曝光的,则从该多帧帧图像中选择对应的抖动量最小的帧图像作为待输出的帧图像,如果该目标帧图像不是在点光源下曝光的,则从该多帧帧图像中选择对应的对比度最大的帧图像作为待输出的帧图像。需要说明的是,之所以要根据点光源来选择基于“抖动量”还是基于“对比度”选择待输出的帧图像,是因为在点光源的场景下每个帧图像自身的对比度差异比较大,各个帧图像之间的对比度没有可比性。
通过执行步骤S303~S305得到的帧图像用于终端做去噪、增强等优化处理以得到能够呈现给用户的图片。通过该流程选出的帧图像经优化得到的图片,与现有技术中的帧图像经优化得到的图片相比,图片清晰的概率较大,表1为清晰概率的对比结果,图4为具体的清晰度效果对比图。
  清晰的概率(振动台上拍摄) 清晰的概率(手动拍摄)
现有技术(不选帧) 34% 67%
S303~S305(选帧) 74% 78%
表1
步骤S306:将该多帧帧图像中对应的抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;或者将该多帧帧图像中对应的对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像。
具体地,在第一种可选的方案中,上述拍摄参数包含抖动量信息,该终端对该多帧帧图像按照抖动量的从小到大来排序,选择其中前N帧帧图像作为待输出的帧图像;在在第二种可选的方案中,上述拍摄参数包含对比度信息,该终端对该多帧帧图像按照对比度的从大到小来排序,选择其中前N帧帧图像作为最终待输出的帧图像。在第三种可选的方案中,该拍摄参数包括抖动量信息、对比度信息和光源信息,该终端根据目标帧图像对应的光源信息判断目标帧图像是否是在点光源下曝光得到的,若是在点光源下曝光得到的,则该终端对该多帧帧图像按照抖动量的从小到大来排序,选择其中前N帧帧图像作为最终待输出的帧图像;若不是在点光源下曝光得到的,该终端对该多帧帧图 像按照对比度的从大到小来排序,选择其中前N帧帧图像作为最终待输出的帧图像。选出的N帧图像用于该终端做去噪、增强、合成等优化处理以得到能够呈现给用户的图片,N为大于1的正整数。通过这三种可选的方案选择出的帧图像均为清晰度满足预设条件的帧图像。
通过执行步骤S306得到的N帧帧图像可以用于该终端做时域降噪等优化处理以得到能够呈现给用户的图片。通过步骤S306选出的帧图像经时域降噪等处理得到的图片,与现有技术中的帧图像经时域降噪处理得到的图片相比,图片清晰的概率较大,表2为清晰概率的对比结果,图5为具体的清晰度效果对比图。
  清晰的概率(手动拍摄)
现有技术(不选帧) 30%
步骤S306(选帧) 70%
表2
通过执行步骤S306得到的N帧帧图像还可以用于该终端做时域插值等优化处理以得到能够呈现给用户的图片。通过步骤S306选出的帧图像经时域插值等处理得到的图片,与现有技术中的帧图像经时域插值处理得到的图片相比,图片清晰的概率较大,表3为清晰概率的对比结果,图6为具体的清晰度效果对比图。
  清晰的概率(手动拍摄)
现有技术(不选帧) 60%
步骤S306(选帧) 75%
表3
在本发明实施例中,还可以为该终端设置判断条件来使终端根据实际情况选择执行上述步骤S303~S305的方案还是执行步骤S306的方案。通常情况下,用户拍摄较远或者较小的景物时会手动将终端的拍照模式设置为数码变焦(ZOOM)模式,ZOOM模式下适宜采用步骤S306的方案来选择帧图像;另外,终端处于低照度场景时也适宜采用步骤S306的方案来选择帧图像,终端 处于非低照度场景时适宜采用步骤S303~S305的方案来选择帧图像。
由于不同场景适用的的选帧方案可能不同,因此本发明实施例提供一种模式选择机制,终端可以基于该模式选择机制自动选择执行步骤S303~S305的方案,还是选择执行步骤S306的方案。该模式选择机制具体为在选择帧图像之前执行如下步骤:
步骤S307:该终端判断自身的ZOOM模式是否已经开启,或者根据目标帧图像对应的感光度信息判断该目标帧图像是否属于低照度场景(低照度场景下感光度较高);若任意一个条件的判断结果为是,则采用步骤S306的方案来选择帧图像,若两个条件的判断结果均为否,则采用步骤S303~S305的方案来选择帧图像。
以上阐述的从该多帧帧图像中选择帧图像作为待输出的帧图像的过程,在实际应用中还可以在选择帧图像之前基于相关信息判断是否需要进行选帧,如果判断出需要选帧则通过执行步骤S303~S305,或者执行步骤S306来选帧,如果判断出不需要选帧则不执行上述选帧流程。以下通过步骤S308来讲述如何判断是否需要进行选帧。
步骤S308:终端响应该拍摄指令,根据该目标帧图像对应的运动信息、曝光时长信息和抖动量信息中至少一项来判断是否满足从该多帧帧图像中选择帧图像作为待输出的帧图像的条件;若满足,则执行上述选帧流程。
具体地,该终端判断该目标帧图像对应的运动信息、曝光时长信息和抖动量信息是否满足预设的选帧条件。像现有技术一样每个帧图像都对应有自己的曝光时长信息,本发明实施例中,每个帧图像还有自身的运动信息,该运动信息为该终端将当前的帧图像与上一帧(或者上几帧)帧图像对比得到的结果,如果对比后发现当前的帧图像中的景物相较于前一帧帧图像中的景物的偏移量达到预设偏移值则表明当前拍摄的场景为运动场景,若偏移量未达到该预设偏移值则表明当前拍摄的场景为静止场景,可以将该运动信息设置为“1”来标识当前拍摄的场景为运动场景,将该运动信息设置为“0”来标识当前拍摄的场景为静止场景,当然还可以通过其他手段来标识拍摄场景的运动情况。
在一种可选的方案中,该预设的选帧条件为:目标帧图像是在静止场景下曝光得到的,目标帧图像的曝光时长高于预设曝光时长阈值,且该目标帧图像的抖动量超过预设的目标抖动阈值。相应的,基于目标帧图像对应的运动信息可以判断出该目标帧图像是否是在静止场景场景下曝光得到的,基于该曝光时长信息可以判断出该目标帧图像的曝光时长是否高于预设曝光时长阈值,基于该抖动量信息可以判断出该目标图像的抖动量是否超过该目标抖动阈值。
在图3所示的方法中,终端在接收到用户输入的拍摄指令后,从一段时间内连续曝光的多帧帧图像中基于抖动量信息,或者对比度信息选择较清晰的帧图像作为待输出的帧图像,减小了生成的图片不清晰的概率。
上面详细阐述了本发明实施例的方法,为了便于更好地实施本发明实施例的上述方案,相应地,下面提供了本发明实施例的终端。
请参见图7,图7是本发明实施例提供的一种终端70的结构示意图,该终端70可以包括接收单元701和响应单元702,接收单元701和响应单元702的详细描述如下。
接收单元701用于接收输入的拍摄指令;
响应单元702用于响应所述拍摄指令,基于一段时间内连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,所述拍摄参数至少包含抖动量信息和对比度信息中一项,所述抖动量信息和所述对比度信息均用于反映帧图像的清晰度。该待输出的帧图像经过降噪、增强等后续处理即可生成能够展现给用户的图片。在一种可选的方案中,该一段时间的起点为终端70接收到用户通过虚拟按钮输入拍摄指令的时刻,即该一段时间为该终端70接收到该拍摄指令之后的一段时间。在又一可选的方案中,该一段时间的终点为终端70接收到用户通过虚拟按钮输入拍摄指令的时刻,即该一段时间为该终端70接收到该拍摄指令之前的一段时间。
通过运行上述单元,终端70在接收到用户输入的拍摄指令后,从一段时间内连续曝光的多帧帧图像中基于抖动量信息,或者对比度信息选择较清晰的帧图像作为待输出的帧图像,减小了生成的图片不清晰的概率。
在一种可选的方案中,所述响应单元702从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
当所述拍摄参数包含抖动量信息时,将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;或者
当所述拍摄参数包含对比度信息时,将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
在又一种可选的方案中,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
所述响应单元702从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
若是,则将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;
若否,则将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
具体地,在从多帧帧图像中选择帧图像作为待输出的帧图像之前,先基于光源信息来判断该目标帧图像是否是在点光源下拍摄的,若是在点光源下拍摄的则不基于对比度的大小来选择待输出的帧图像,避免通过该对比度选择的待输出的帧图像不清晰。
在又一种可选的方案中,所述拍摄参数包含所述抖动量信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
所述响应单元702从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为;
判断所述目标帧图像的抖动量是否低于第一抖动阈值;
若不低于所述第一抖动阈值,则判断所述多帧帧图像中除所述目标帧图像以外的其他帧图像中是否有帧图像的抖动量小于第二抖动阈值;
若没有帧图像的抖动量小于所述第二抖动阈值,则将所述多帧帧图像中的抖动量最小的帧图像作为待输出的帧图像,或者当所述拍摄参数包含对比度信息时将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
具体地,先判断该目标帧图像以及目标帧图像周围的帧图像的抖动量是否都太大,如果都太大才从该多帧帧图像中选择抖动量最小,或者对比度最大的帧图像作为待输出的帧图像。
在又一种可选的方案中,所述响应单元702还还用于在所述目标帧图像的抖动量低于所述第一抖动阈值时,将所述目标帧图像作为待输出的帧图像。
具体地,当该目标帧图像的抖动量比较小时,将该目标帧图像作为待输出的帧图像,保证该待输出的帧图像为用户最想拍摄的且较清晰的帧图像。
在又一种可选的方案中,所述响应单元702还用于在所述多帧帧图像中除所述目标帧图像以外的其他帧图像中有帧图像的抖动量小于第二抖动阈值时,将抖动量小于所述第二预设阈值的帧图像中,曝光时间距离所述目标帧图像的曝光时间最近的帧图像作为待输出的帧图像。
具体地,当目标帧图像的抖动量较大,而该目标帧图像附近有帧图像的抖动量比较小时,将该附近的抖动量比较小的帧图像作为待输出的帧图像,使得确定的待输出的帧图像能够尽量接近用户想要拍摄的帧图像。
在又一种可选的方案中,所述响应单元702从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
当所述拍摄参数包含所述抖动量信息时,将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;或者
当所述拍摄参数包含所述对比度信息时,将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
在又一种可选的方案中,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述响应单元702从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
若是,则将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;
若否,则将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
具体地,在从多帧帧图像中选择帧图像作为待输出的帧图像之前,先基于光源信息来判断该目标帧图像是否是在点光源下拍摄的,若是在点光源下拍摄的则不基于对比度的大小来选择待输出的帧图像,避免通过该对比度选择的待输出的帧图像不清晰。
在又一种可选的方案中,所述终端70还包括曝光单元,所述曝光单元用于在所述接收单元701接收输入的拍摄指令之前,在所述一段时间内连续曝光所述多帧帧图像。
在又一种可选的方案中,所述曝光单元具体用于在所述一段时间内通过多个摄像头连续曝光所述多帧帧图像。
具体地,通过多个摄像头曝光帧图像能够提高曝光帧图像的效率。
在又一种可选的方案中,所述多个摄像头包含至少一个曝光彩色帧图像的摄像头和至少一个曝光黑白帧图像的摄像头。
具体地,通过拍摄彩色帧图像的摄像头和拍摄黑白帧图像的摄像头共同获取的帧图像,通过这两种摄像头获取的帧图像合成的图片噪声更低、解析更高。
在又一种可选的方案中,所述目标帧图像至少对应运动信息、曝光时长信息和抖动量信息中一项,所述运动信息为表明帧图像是否处于运动状态的信息, 所述曝光时长信息为表明帧图像曝光的时间长度的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述响应单元702包括:
判断子单元,用于响应所述拍摄指令,根据所述目标帧图像对应的运动信息、曝光时长信息和抖动量信息中至少一项来判断是否满足从所述多帧帧图像中选择帧图像作为待输出的帧图像的条件;
选择子单元,用于在所述判断子单元判断出满足从所述多帧帧图像中选择帧图像作为待输出的帧图像的条件时,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像。
具体地,在从多帧帧图像中选择待输出的帧图像之前,基于运动信息、曝光时长信息和抖动量信息中至少一项来判断是否有必要选择帧图像,若有必要才执行从多帧帧图像中选择待输出的帧图像的操作,若没必要则不执行从多帧帧图像中选择待输出的帧图像的操作,减小了终端70的功耗。
需要说明的是,图7所示终端70还可以对应参照图3所示方法实施例来具体实现。
请参见图8,图8是本发明实施例提供的又一种终端80,该终端80包括处理器801、存储器802和用户接口803,所述处理器801、存储器802和用户接口803通过总线相互连接。
存储器802包括但不限于是随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或者快闪存储器)、或便携式只读存储器(CD-ROM)。
处理器801可以是一个或多个中央处理器(Central Processing Unit,简称CPU),在处理器801是一个CPU的情况下,该CPU可以是单核CPU,也可以是多核CPU。
用户接口803可以是触摸屏的接口,物理按键的接口,声控组件的接口,手势识别组件的接口等,总而言之该用户接口803为该终端获取的操作信息的 接口。
存储器802还用于存储相关指、数据等信息。
所述终端80中的处理器801用于读取所述存储器802中存储的程序代码后,执行以下操作:
通过所述用户接口803接收输入的拍摄指令;
响应所述拍摄指令,基于一段时间内连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,所述拍摄参数至少包含抖动量信息和对比度信息中一项,所述抖动量信息和所述对比度信息均用于反映帧图像的清晰度。该待输出的帧图像经过降噪、增强等后续处理即可生成能够展现给用户的图片。在一种可选的方案中,该一段时间的起点为终端80接收到用户通过虚拟按钮输入拍摄指令的时刻,即该一段时间为该终端80接收到该拍摄指令之后的一段时间。在又一可选的方案中,该一段时间的终点为终端80接收到用户通过虚拟按钮输入拍摄指令的时刻,即该一段时间为该终端80接收到该拍摄指令之前的一段时间。
通过执行上述操作,终端80在接收到用户输入的拍摄指令后,从一段时间内连续曝光的多帧帧图像中基于抖动量信息,或者对比度信息选择较清晰的帧图像作为待输出的帧图像,减小了生成的图片不清晰的概率。
在一种可选的方案中,所述处理器801从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
当所述拍摄参数包含抖动量信息时,将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;或者
当所述拍摄参数包含对比度信息时,将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
在又一种可选的方案中,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧 图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
所述处理器801从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
若是,则将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;
若否,则将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
具体地,在从多帧帧图像中选择帧图像作为待输出的帧图像之前,先基于光源信息来判断该目标帧图像是否是在点光源下拍摄的,若是在点光源下拍摄的则不基于对比度的大小来选择待输出的帧图像,避免通过该对比度选择的待输出的帧图像不清晰。
在又一种可选的方案中,所述拍摄参数包含所述抖动量信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
所述处理器801从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
判断所述目标帧图像的抖动量是否低于第一抖动阈值;
若不低于所述第一抖动阈值,则判断所述多帧帧图像中除所述目标帧图像以外的其他帧图像中是否有帧图像的抖动量小于第二抖动阈值;
若没有帧图像的抖动量小于所述第二抖动阈值,则将所述多帧帧图像中的抖动量最小的帧图像作为待输出的帧图像,或者当所述拍摄参数包含对比度信息时将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
具体地,先判断该目标帧图像以及目标帧图像周围的帧图像的抖动量是否都太大,如果都太大才从该多帧帧图像中选择抖动量最小,或者对比度最大的帧图像作为待输出的帧图像。
在又一种可选的方案中,所述处理器801还用于在判断出所述目标帧图像的抖动量低于第一抖动阈值时,将所述目标帧图像作为待输出的帧图像。
具体地,当该目标帧图像的抖动量比较小时,将该目标帧图像作为待输出的帧图像,保证该待输出的帧图像为用户最想拍摄的且较清晰的帧图像。
在又一种可选的方案中,所述处理器801还用于:
在判断出所述多帧帧图像中除所述目标帧图像以外的其他帧图像中有帧图像的抖动量小于第二抖动阈值时,将抖动量小于所述第二预设阈值的帧图像中,曝光时间距离所述目标帧图像的曝光时间最近的帧图像作为待输出的帧图像。
具体地,当目标帧图像的抖动量较大,而该目标帧图像附近有帧图像的抖动量比较小时,将该附近的抖动量比较小的帧图像作为待输出的帧图像,使得确定的待输出的帧图像能够尽量接近用户想要拍摄的帧图像。
在又一种可选的方案中,所述处理器801从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
当所述拍摄参数包含所述抖动量信息时,将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;或者
当所述拍摄参数包含所述对比度信息时,将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
在又一种可选的方案中,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述处理器801从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
若是,则将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;
若否,则将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
具体地,在从多帧帧图像中选择帧图像作为待输出的帧图像之前,先基于光源信息来判断该目标帧图像是否是在点光源下拍摄的,若是在点光源下拍摄的则不基于对比度的大小来选择待输出的帧图像,避免通过该对比度选择的待输出的帧图像不清晰。
在又一种可选的方案中,所述处理器801还用于在通过所述用户接口803接收输入的拍摄指令之前,在所述一段时间内连续曝光所述多帧帧图像。
结合第三方面的第八种可能的实现方式,在第三方面的第九种可能的实现方式中,所述处理器801在所述一段时间内连续曝光所述多帧帧图像,具体为:在所述一段时间内通过多个摄像头连续曝光所述多帧帧图像。
具体地,通过多个摄像头曝光帧图像能够提高曝光帧图像的效率。
在又一种可选的方案中,所述多个摄像头包含至少一个曝光彩色帧图像的摄像头和至少一个曝光黑白帧图像的摄像头。
具体地,通过拍摄彩色帧图像的摄像头和拍摄黑白帧图像的摄像头共同获取的帧图像,通过这两种摄像头获取的帧图像合成的图片噪声更低、解析更高。
在又一种可选的方案中,所述目标帧图像至少对应运动信息、曝光时长信息和抖动量信息中一项,所述运动信息为表明帧图像是否处于运动状态的信息,所述曝光时长信息为表明帧图像曝光的时间长度的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述处理器801响应所述拍摄指令,基于一段时间内连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
响应所述拍摄指令,根据所述目标帧图像对应的运动信息、曝光时长信息和抖动量信息中至少一项来判断是否满足从所述多帧帧图像中选择帧图像作为待输出的帧图像的条件;
若满足,则从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像。
具体地,在从多帧帧图像中选择待输出的帧图像之前,基于运动信息、曝光时长信息和抖动量信息中至少一项来判断是否有必要选择帧图像,若有必要才执行从多帧帧图像中选择待输出的帧图像的操作,若没必要则不执行从多帧帧图像中选择待输出的帧图像的操作,减小了终端80的功耗。
需要说明的是,图8所示终端80还可以对应参照图3所示方法实施例来具体实现。
请参见图9,图9为本发明实施例提供的一种手机90,该手机90可以包括:至少一个存储器901、基带芯片902、射频模块903、外围系统904和传感器905。其中,存储器901用于存储操作系统、网络通信程序、用户接口程序、铃声设置程序等;基带芯片902包括至少一个处理器9021,例如CPU,时钟模块9022和电源管理模块9023;外围系统904包括音频控制器9042、音摄像头控制器9043、触摸显示屏控制器9044和传感器管理模块9045,相应地,还包括音频输入/输出电路9047、摄像头9048和触摸显示屏9049;进一步地,传感器905可以包括光线传感器、加速度传感器(或陀螺仪)等,总而言之,传感器905可以视实际需要来增加或者减少;存储器901可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。存储器905可选的还可以是至少一个位于远离前述处理器9021的存储装置。
存储器901可用于存储指令和数据,存储器901可主要包括存储指令区和存储数据区,其中,存储指令区可存储操作系统、至少一个功能所需的指令等;所述指令可使处理器9021执行相关操作;该处理器9021是手机90的控制中心,利用各种接口和线路连接整个手机90的各个部分,通过运行或执行存储在存储器901内的软件程序和/或模块,以及调用存储在存储器901内的数据,执行手机90的各种功能和处理数据,在本发明实施例中该处理器9021具体用于执行如下操作:
接收用户通过触摸显示屏9049输入的拍摄指令;
响应所述拍摄指令,基于一段时间内通过摄像头9048连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,所述拍摄参数至少包含抖动量信息和对比度信息中一项,所述抖动量信息和所述对比度信息均用于反映帧图像的清晰度。该待输出的帧图像经过降噪、增强等后续处理即可生成能够展现给用户的图片。在一种可选的方案中,该一段时间的起点为手机90接收到用户通过虚拟按钮输入拍摄指令的时刻,即该一段时间为该手机90接收到该拍摄指令之后的一段时间。在又一可选的方案中,该一段时间的终点为手机90接收到用户通过虚拟按钮输入拍摄指令的时刻,即该一段时间为该手机90接收到该拍摄指令之前的一段时间。该抖动量信息为该手机90控制传感器905获取到的该手机90实时的抖动信息。
通过执行上述操作,手机90在接收到用户输入的拍摄指令后,从一段时间内连续曝光的多帧帧图像中基于抖动量信息,或者对比度信息选择较清晰的帧图像作为待输出的帧图像,减小了生成的图片不清晰的概率。
在一种可选的方案中,所述处理器9021从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
当所述拍摄参数包含抖动量信息时,将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;或者
当所述拍摄参数包含对比度信息时,将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
在又一种可选的方案中,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
所述处理器9021从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
若是,则将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;
若否,则将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
具体地,在从多帧帧图像中选择帧图像作为待输出的帧图像之前,先基于光源信息来判断该目标帧图像是否是在点光源下拍摄的,若是在点光源下拍摄的则不基于对比度的大小来选择待输出的帧图像,避免通过该对比度选择的待输出的帧图像不清晰。
在又一种可选的方案中,所述拍摄参数包含所述抖动量信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
所述处理器9021从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
判断所述目标帧图像的抖动量是否低于第一抖动阈值;
若不低于所述第一抖动阈值,则判断所述多帧帧图像中除所述目标帧图像以外的其他帧图像中是否有帧图像的抖动量小于第二抖动阈值;
若没有帧图像的抖动量小于所述第二抖动阈值,则将所述多帧帧图像中的抖动量最小的帧图像作为待输出的帧图像,或者当所述拍摄参数包含对比度信息时将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
具体地,先判断该目标帧图像以及目标帧图像周围的帧图像的抖动量是否都太大,如果都太大才从该多帧帧图像中选择抖动量最小,或者对比度最大的帧图像作为待输出的帧图像。
在又一种可选的方案中,所述处理器9021还用于在判断出所述目标帧图像的抖动量低于第一抖动阈值时,将所述目标帧图像作为待输出的帧图像。
具体地,当该目标帧图像的抖动量比较小时,将该目标帧图像作为待输出的帧图像,保证该待输出的帧图像为用户最想拍摄的且较清晰的帧图像。
在又一种可选的方案中,所述处理器9021还用于:
在判断出所述多帧帧图像中除所述目标帧图像以外的其他帧图像中有帧图像的抖动量小于第二抖动阈值时,将抖动量小于所述第二预设阈值的帧图像中,曝光时间距离所述目标帧图像的曝光时间最近的帧图像作为待输出的帧图像。
具体地,当目标帧图像的抖动量较大,而该目标帧图像附近有帧图像的抖动量比较小时,将该附近的抖动量比较小的帧图像作为待输出的帧图像,使得确定的待输出的帧图像能够尽量接近用户想要拍摄的帧图像。
在又一种可选的方案中,所述处理器9021从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
当所述拍摄参数包含所述抖动量信息时,将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;或者
当所述拍摄参数包含所述对比度信息时,将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
在又一种可选的方案中,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述处理器9021从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
若是,则将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;
若否,则将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
具体地,在从多帧帧图像中选择帧图像作为待输出的帧图像之前,先基于光源信息来判断该目标帧图像是否是在点光源下拍摄的,若是在点光源下拍摄 的则不基于对比度的大小来选择待输出的帧图像,避免通过该对比度选择的待输出的帧图像不清晰。
在又一种可选的方案中,所述处理器9021还用于在通过所述用户接口接收输入的拍摄指令之前,在所述一段时间内连续曝光所述多帧帧图像。
在又一种可选的方案中,所述处理器9021在所述一段时间内连续曝光所述多帧帧图像,具体为:在所述一段时间内通过多个摄像头连续曝光所述多帧帧图像。
具体地,通过多个摄像头曝光帧图像能够提高曝光帧图像的效率。
在又一种可选的方案中,所述多个摄像头包含至少一个曝光彩色帧图像的摄像头和至少一个曝光黑白帧图像的摄像头。
具体地,通过拍摄彩色帧图像的摄像头和拍摄黑白帧图像的摄像头共同获取的帧图像,通过这两种摄像头获取的帧图像合成的图片噪声更低、解析更高。
在又一种可选的方案中,所述目标帧图像至少对应运动信息、曝光时长信息和抖动量信息中一项,所述运动信息为表明帧图像是否处于运动状态的信息,所述曝光时长信息为表明帧图像曝光的时间长度的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述处理器9021响应所述拍摄指令,基于一段时间内连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
响应所述拍摄指令,根据所述目标帧图像对应的运动信息、曝光时长信息和抖动量信息中至少一项来判断是否满足从所述多帧帧图像中选择帧图像作为待输出的帧图像的条件;
若满足,则从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像。
具体地,在从多帧帧图像中选择待输出的帧图像之前,基于运动信息、曝光时长信息和抖动量信息中至少一项来判断是否有必要选择帧图像,若有必要 才执行从多帧帧图像中选择待输出的帧图像的操作,若没必要则不执行从多帧帧图像中选择待输出的帧图像的操作,减小了手机90的功耗。
触摸显示屏9044可用于显示由用户输入的信息或提供给用户的信息以及手机90的各种菜单。触摸显示屏9044可包括触控面板和显示面板,可选的,可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板。进一步的,触控面板可覆盖显示面板,当触控面板检测到在其上或附近的触摸操作后,传送给处理器以确定触摸事件的类型,随后处理器9021根据触摸事件的类型在显示面板上提供相应的视觉输出。触控面板与显示面板是作为两个独立的部件来实现手机90的输入和输出功能,但是在某些实施例中,可以将触控面板与显示面板集成而实现手机90的输入和输出功能。
音频输入/输出电路9047和音频控制器9042可提供用户与手机90之间的音频接口。音频输入/输出电路9047可将接收到的音频数据转换后的电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,音频输入/输出器件9047可以用于检测检测周围环境中的铃声或音乐,并将所检测到的铃声或音乐转换为电信号传递给处理器9021。
需要说明的是,图9所示手机90还可以对应参照图3所示方法实施例来具体实现。
综上所述,通过实施本发明实施例,终端在接收到用户输入的拍摄指令后,从一段时间内连续曝光的多帧帧图像中基于抖动量信息,或者对比度信息选择较清晰的帧图像作为待输出的帧图像,减小了生成的图片不清晰的概率。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上实施例仅揭露了本发明中较佳实施例,不能以此来限定本发明之权利 范围,本领域普通技术人员可以理解实现上述实施例的全部或部分流程,并依本发明权利要求所作的等同变化,仍属于发明所涵盖的范围。

Claims (37)

  1. 一种拍照方法,其特征在于,包括:
    终端接收输入的拍摄指令;
    所述终端响应所述拍摄指令,基于一段时间内连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,所述拍摄参数至少包含抖动量信息和对比度信息中一项,所述抖动量信息和所述对比度信息均用于反映帧图像的清晰度。
  2. 根据权利要求1所述的方法,其特征在于,所述从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像包括:
    当所述拍摄参数包含抖动量信息时,将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;或者
    当所述拍摄参数包含对比度信息时,将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
  3. 根据权利要求1所述的方法,其特征在于,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
    所述从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像包括:
    根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
    若是,则将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;
    若否,则将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
  4. 根据权利要求1所述的方法,其特征在于,所述拍摄参数包含所述抖动量信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
    所述从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像包括;
    判断所述目标帧图像的抖动量是否低于第一抖动阈值;
    若不低于所述第一抖动阈值,则判断所述多帧帧图像中除所述目标帧图像以外的其他帧图像中是否有帧图像的抖动量小于第二抖动阈值;
    若没有帧图像的抖动量小于所述第二抖动阈值,则将所述多帧帧图像中的抖动量最小的帧图像作为待输出的帧图像,或者当所述拍摄参数包含对比度信息时将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    若低于所述第一抖动阈值,则将所述目标帧图像作为待输出的帧图像。
  6. 根据权利要求4或5所述的方法,其特征在于,所述方法还包括:
    若有帧图像的抖动量小于所述第二抖动阈值,则将抖动量小于所述第二预设阈值的帧图像中,曝光时间距离所述目标帧图像的曝光时间最近的帧图像作为待输出的帧图像。
  7. 根据权利要求1所述的方法,其特征在于,所述从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像包括:
    当所述拍摄参数包含所述抖动量信息时,将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;或者
    当所述拍摄参数包含所述对比度信息时,将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
  8. 根据权利要求1所述的方法,其特征在于,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像包括:
    根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
    若是,则将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;
    若否,则将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
  9. 根据权利要求1~8任一项所述的方法,其特征在于,所述终端接收输入的拍摄指令之前,所述方法还包括:
    所述终端在所述一段时间内连续曝光所述多帧帧图像。
  10. 根据权利要求9所述的方法,其特征在于,所述终端在所述一段时间内连续曝光所述多帧帧图像包括:
    所述终端在所述一段时间内通过多个摄像头连续曝光所述多帧帧图像。
  11. 根据权利要求10所述的方法,其特征在于,所述多个摄像头包含至少一个曝光彩色帧图像的摄像头和至少一个曝光黑白帧图像的摄像头。
  12. 根据权利要求1~11任一项所述的方法,其特征在于,所述目标帧图像至少对应运动信息、曝光时长信息和抖动量信息中一项,所述运动信息为表明帧图像是否处于运动状态的信息,所述曝光时长信息为表明帧图像曝光的时间长度的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧 图像为目标帧图像;所述终端响应所述拍摄指令,基于一段时间内连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像包括:
    响应所述拍摄指令,根据所述目标帧图像对应的运动信息、曝光时长信息和抖动量信息中至少一项来判断是否满足从所述多帧帧图像中选择帧图像作为待输出的帧图像的条件;
    若满足,则从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像。
  13. 一种终端,其特征在于,包括:
    接收单元,用于接收输入的拍摄指令;
    响应单元,用于响应所述拍摄指令,基于一段时间内连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,所述拍摄参数至少包含抖动量信息和对比度信息中一项,所述抖动量信息和所述对比度信息均用于反映帧图像的清晰度。
  14. 根据权利要求13所述的终端,其特征在于,所述响应单元从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
    当所述拍摄参数包含抖动量信息时,将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;或者
    当所述拍摄参数包含对比度信息时,将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
  15. 根据权利要求13所述的终端,其特征在于,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
    所述响应单元从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
    根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
    若是,则将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;
    若否,则将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
  16. 根据权利要求13所述的终端,其特征在于,所述拍摄参数包含所述抖动量信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
    所述响应单元从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为;
    判断所述目标帧图像的抖动量是否低于第一抖动阈值;
    若不低于所述第一抖动阈值,则判断所述多帧帧图像中除所述目标帧图像以外的其他帧图像中是否有帧图像的抖动量小于第二抖动阈值;
    若没有帧图像的抖动量小于所述第二抖动阈值,则将所述多帧帧图像中的抖动量最小的帧图像作为待输出的帧图像,或者当所述拍摄参数包含对比度信息时将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
  17. 根据权利要求16所述的终端,其特征在于,所述响应单元还还用于在所述目标帧图像的抖动量低于所述第一抖动阈值时,将所述目标帧图像作为待输出的帧图像。
  18. 根据权利要求16或17所述的终端,其特征在于,所述响应单元还用于在所述多帧帧图像中除所述目标帧图像以外的其他帧图像中有帧图像的抖动量小于第二抖动阈值时,将抖动量小于所述第二预设阈值的帧图像中,曝光时间距离所述目标帧图像的曝光时间最近的帧图像作为待输出的帧图像。
  19. 根据权利要求13所述的终端,其特征在于,所述响应单元从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
    当所述拍摄参数包含所述抖动量信息时,将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;或者
    当所述拍摄参数包含所述对比度信息时,将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
  20. 根据权利要求13所述的终端,其特征在于,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述响应单元从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
    根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
    若是,则将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;
    若否,则将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
  21. 根据权利要求13~20任一项所述的终端,其特征在于,所述终端还包括曝光单元,所述曝光单元用于在所述接收单元接收输入的拍摄指令之前,在所述一段时间内连续曝光所述多帧帧图像。
  22. 根据权利要求21所述的终端,其特征在于,所述曝光单元具体用于在所述一段时间内通过多个摄像头连续曝光所述多帧帧图像。
  23. 根据权利要求22所述的终端,其特征在于,所述多个摄像头包含至少一个曝光彩色帧图像的摄像头和至少一个曝光黑白帧图像的摄像头。
  24. 根据权利要求13~23任一项所述的终端,其特征在于,所述目标帧图像至少对应运动信息、曝光时长信息和抖动量信息中一项,所述运动信息为表明帧图像是否处于运动状态的信息,所述曝光时长信息为表明帧图像曝光的时间长度的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述响应单元包括:
    判断子单元,用于响应所述拍摄指令,根据所述目标帧图像对应的运动信息、曝光时长信息和抖动量信息中至少一项来判断是否满足从所述多帧帧图像中选择帧图像作为待输出的帧图像的条件;
    选择子单元,用于在所述判断子单元判断出满足从所述多帧帧图像中选择帧图像作为待输出的帧图像的条件时,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像。
  25. 一种终端,其特征在于,所述终端包括存储器、处理器和用户接口,所述存储器用于存储程序,所述处理器调用所述存储器中的程序,用于执行如下操作:
    通过所述用户接口接收输入的拍摄指令;
    响应所述拍摄指令,基于一段时间内连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,所述拍摄参数至少包含抖动量信息和对比度信息中一项,所述抖动量信息和所述对比度信息均用于反映帧图像的清晰度。
  26. 根据权利要求25所述的终端,其特征在于,所述处理器从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
    当所述拍摄参数包含抖动量信息时,将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;或者
    当所述拍摄参数包含对比度信息时,将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
  27. 根据权利要求25所述的终端,其特征在于,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
    所述处理器从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
    根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
    若是,则将所述多帧帧图像中抖动量最小的帧图像作为待输出的帧图像;
    若否,则将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
  28. 根据权利要求25所述的终端,其特征在于,所述拍摄参数包含所述抖动量信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;
    所述处理器从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
    判断所述目标帧图像的抖动量是否低于第一抖动阈值;
    若不低于所述第一抖动阈值,则判断所述多帧帧图像中除所述目标帧图像以外的其他帧图像中是否有帧图像的抖动量小于第二抖动阈值;
    若没有帧图像的抖动量小于所述第二抖动阈值,则将所述多帧帧图像中的抖动量最小的帧图像作为待输出的帧图像,或者当所述拍摄参数包含对比度信息时将所述多帧帧图像中对比度最大的帧图像作为待输出的帧图像。
  29. 根据权利要求28所述的终端,其特征在于,所述处理器还用于在判断出所述目标帧图像的抖动量低于第一抖动阈值时,将所述目标帧图像作为待输出的帧图像。
  30. 根据权利要求28或29所述的终端,其特征在于,所述处理器还用于:
    在判断出所述多帧帧图像中除所述目标帧图像以外的其他帧图像中有帧图像的抖动量小于第二抖动阈值时,将抖动量小于所述第二预设阈值的帧图像中,曝光时间距离所述目标帧图像的曝光时间最近的帧图像作为待输出的帧图像。
  31. 根据权利要求25所述的终端,其特征在于,所述处理器从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
    当所述拍摄参数包含所述抖动量信息时,将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;或者
    当所述拍摄参数包含所述对比度信息时,将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
  32. 根据权利要求25所述的终端,其特征在于,所述拍摄参数包含所述抖动量信息、所述对比度信息和光源信息,所述光源信息为表示帧图像是否是在点光源下曝光得到的帧图像的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述处理器从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
    根据所述目标帧图像对应的光源信息判断所述目标帧图像是否是在点光源下曝光得到的帧图像;
    若是,则将所述多帧帧图像中抖动量从小到大排列在前N位的N帧帧图像作为待输出的帧图像;
    若否,则将所述多帧帧图像中对比度从大到小排列在前N位的N帧帧图像作为待输出的帧图像,N为大于1的正整数。
  33. 根据权利要求25~32任一项所述的终端,其特征在于,所述处理器还用于在通过所述用户接口接收输入的拍摄指令之前,在所述一段时间内连续曝光所述多帧帧图像。
  34. 根据权利要求33所述的终端,其特征在于,所述处理器在所述一段时间内连续曝光所述多帧帧图像,具体为:在所述一段时间内通过多个摄像头连续曝光所述多帧帧图像。
  35. 根据权利要求34所述的终端,其特征在于,所述多个摄像头包含至少一个曝光彩色帧图像的摄像头和至少一个曝光黑白帧图像的摄像头。
  36. 根据权利要求25~35任一项所述的终端,其特征在于,所述目标帧图像至少对应运动信息、曝光时长信息和抖动量信息中一项,所述运动信息为表明帧图像是否处于运动状态的信息,所述曝光时长信息为表明帧图像曝光的时间长度的信息,所述多帧帧图像中距离接收所述拍摄指令的时刻最近曝光的帧图像为目标帧图像;所述处理器响应所述拍摄指令,基于一段时间内连续曝光的多帧帧图像中每帧帧图像对应的拍摄参数,从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像,具体为:
    响应所述拍摄指令,根据所述目标帧图像对应的运动信息、曝光时长信息和抖动量信息中至少一项来判断是否满足从所述多帧帧图像中选择帧图像作为待输出的帧图像的条件;
    若满足,则从所述多帧帧图像中选择清晰度达到预设条件的帧图像作为待输出的帧图像。
  37. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令,所述指令当被包括一个或多个应用程序的终端执行时使所述终端执行权利要求1-12任一项所述的方法。
PCT/CN2016/078503 2016-04-05 2016-04-05 一种拍照方法及终端 WO2017173585A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201680013023.3A CN107615745B (zh) 2016-04-05 2016-04-05 一种拍照方法及终端
PCT/CN2016/078503 WO2017173585A1 (zh) 2016-04-05 2016-04-05 一种拍照方法及终端

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/078503 WO2017173585A1 (zh) 2016-04-05 2016-04-05 一种拍照方法及终端

Publications (1)

Publication Number Publication Date
WO2017173585A1 true WO2017173585A1 (zh) 2017-10-12

Family

ID=60000164

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/078503 WO2017173585A1 (zh) 2016-04-05 2016-04-05 一种拍照方法及终端

Country Status (2)

Country Link
CN (1) CN107615745B (zh)
WO (1) WO2017173585A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108184056A (zh) * 2017-12-28 2018-06-19 上海传英信息技术有限公司 抓拍方法及终端设备
CN109671106A (zh) * 2017-10-13 2019-04-23 华为技术有限公司 一种图像处理方法、装置与设备
CN110177215A (zh) * 2019-06-28 2019-08-27 Oppo广东移动通信有限公司 图像处理方法、图像处理器、拍摄装置和电子设备
CN110798627A (zh) * 2019-10-12 2020-02-14 深圳酷派技术有限公司 一种拍摄方法、装置、存储介质及终端
CN113938602A (zh) * 2021-09-08 2022-01-14 荣耀终端有限公司 图像处理方法、电子设备、芯片及可读存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111193867B (zh) * 2020-01-08 2021-03-23 Oppo广东移动通信有限公司 图像处理方法、图像处理器、拍摄装置和电子设备
CN112437283B (zh) * 2020-11-09 2022-06-10 广景视睿科技(深圳)有限公司 一种调整投影抖动的方法和系统
CN114827447B (zh) * 2021-01-29 2024-02-09 北京小米移动软件有限公司 图像抖动校正方法和装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070242936A1 (en) * 2006-04-18 2007-10-18 Fujitsu Limited Image shooting device with camera shake correction function, camera shake correction method and storage medium recording pre-process program for camera shake correction process
US20090087099A1 (en) * 2007-09-28 2009-04-02 Fujifilm Corporation Image processing apparatus, image capturing apparatus, image processing method and recording medium
CN101854484A (zh) * 2009-03-31 2010-10-06 卡西欧计算机株式会社 图像选择装置、图像选择方法
CN101895679A (zh) * 2009-02-17 2010-11-24 卡西欧计算机株式会社 拍摄装置和拍摄方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070242936A1 (en) * 2006-04-18 2007-10-18 Fujitsu Limited Image shooting device with camera shake correction function, camera shake correction method and storage medium recording pre-process program for camera shake correction process
US20090087099A1 (en) * 2007-09-28 2009-04-02 Fujifilm Corporation Image processing apparatus, image capturing apparatus, image processing method and recording medium
CN101895679A (zh) * 2009-02-17 2010-11-24 卡西欧计算机株式会社 拍摄装置和拍摄方法
CN101854484A (zh) * 2009-03-31 2010-10-06 卡西欧计算机株式会社 图像选择装置、图像选择方法

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109671106A (zh) * 2017-10-13 2019-04-23 华为技术有限公司 一种图像处理方法、装置与设备
CN109671106B (zh) * 2017-10-13 2023-09-05 华为技术有限公司 一种图像处理方法、装置与设备
CN108184056A (zh) * 2017-12-28 2018-06-19 上海传英信息技术有限公司 抓拍方法及终端设备
CN110177215A (zh) * 2019-06-28 2019-08-27 Oppo广东移动通信有限公司 图像处理方法、图像处理器、拍摄装置和电子设备
CN110798627A (zh) * 2019-10-12 2020-02-14 深圳酷派技术有限公司 一种拍摄方法、装置、存储介质及终端
CN113938602A (zh) * 2021-09-08 2022-01-14 荣耀终端有限公司 图像处理方法、电子设备、芯片及可读存储介质
CN113938602B (zh) * 2021-09-08 2022-08-02 荣耀终端有限公司 图像处理方法、电子设备、芯片及可读存储介质

Also Published As

Publication number Publication date
CN107615745B (zh) 2020-03-20
CN107615745A (zh) 2018-01-19

Similar Documents

Publication Publication Date Title
WO2017173585A1 (zh) 一种拍照方法及终端
JP7169383B2 (ja) 夜間撮影モード処理を使用する撮影及びユーザインターフェイス
JP2023501663A (ja) 撮影方法および電子デバイス
CN109756671B (zh) 使用多个相机记录图像的电子装置及其操作方法
WO2017124899A1 (zh) 一种信息处理方法及装置、电子设备
CN109040523B (zh) 伪影消除方法、装置、存储介质及终端
CN108513069B (zh) 图像处理方法、装置、存储介质及电子设备
WO2021190613A9 (zh) 一种拍照方法及装置
WO2021185250A1 (zh) 图像处理方法及装置
WO2018184260A1 (zh) 文档图像的校正方法及装置
US11438521B2 (en) Image capturing device, image capturing method, and program
WO2022266907A1 (zh) 处理方法、终端设备及存储介质
US20220272275A1 (en) Photographing method and electronic device
CN115689963A (zh) 一种图像处理方法及电子设备
US10769416B2 (en) Image processing method, electronic device and storage medium
CN108259767B (zh) 图像处理方法、装置、存储介质及电子设备
WO2021185374A1 (zh) 一种拍摄图像的方法及电子设备
CN108495038B (zh) 图像处理方法、装置、存储介质及电子设备
CN110830721A (zh) 一种图像处理方法、电子设备及介质
CN116668836B (zh) 拍照处理方法和电子设备
WO2023160224A9 (zh) 一种拍摄方法及相关设备
EP3945717A1 (en) Take-off capture method and electronic device, and storage medium
WO2020158200A1 (ja) 撮像装置の制御装置、撮像装置、撮像装置の制御方法、撮像装置の制御プログラム
CN117957852A (zh) 用于减少的时延的相机初始化
CN117692761A (zh) 运动抓拍方法及电子设备

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 16897520

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16897520

Country of ref document: EP

Kind code of ref document: A1