Invention content
Technical problem to be solved of the embodiment of the present invention is, provides a kind of photographic method and mobile terminal, can be at end
Automatic camera is to obtain the photo of high quality in a state that end is stablized.
First aspect present invention provides a kind of photographic method, including:
When reaching pre-set automatic camera time interval, the acceleration information of terminal is obtained;
When the acceleration information meets stable condition, then image data is obtained;
Picture quality detection is carried out, and meet quality requirements in the picture quality of described image data to described image data
When, store described image data.
In the first possible implementation, the acceleration information meets stable condition and specifically includes:
The acceleration information includes 3-axis acceleration value;
Judge whether the summation of the 3-axis acceleration value is less than preset acceleration rate threshold;
If being judged as YES, the acceleration information meets stable condition.
With reference to first aspect or the first possible realization method of first aspect, in second of possible realization method
In, it is described that picture quality detection is carried out to described image data, and meet quality requirements in the picture quality of described image data
When store described image data, specifically include:
Whether the brightness value and/or definition values for detecting described image data are in gross threshold value;
If detecting, the brightness value of described image data and/or definition values are in gross threshold value, are detected
Whether described image data include face image data;
Face image data is not included in described image data if detecting, it is determined that the picture quality of described image data
Meet quality requirements, and store described image data.
Second of possible realization method with reference to first aspect, in the third possible realization method, further includes:
If detecting in described image data comprising face image data, the face in the face image data is detected
Whether image is in blink state;
If the facial image, which is not detected, is in blink state, it is determined that the picture quality of described image data meets matter
Amount condition, and store described image data.
The third possible realization method with reference to first aspect, in the 4th kind of possible realization method, if it is described not
Detect that the facial image is in blink state, it is determined that the picture quality of described image data meets quality requirements, and deposits
Described image data are stored up, including:
If the facial image, which is not detected, is in blink state, whether the facial image is detected in smile state;
If detecting, the facial image is in smile state, it is determined that the picture quality of described image data meets quality
Condition, and store described image data.
With reference to first aspect or second of the first possible realization method of first aspect or first aspect may
Realization method or the third possible realization method of first aspect or the 4th kind of possible realization method of first aspect,
In the 5th kind of possible realization method, described when reaching pre-set automatic camera time interval, terminal is obtained
Before acceleration information, further include:
At least one time interval is set, and compartment name is set respectively at least one time interval;
The compartment name is shown in the display interface of this terminal;
It is when detecting the clicking operation to the compartment name, the corresponding time interval of selected compartment name is pre-
It is set as the automatic camera time interval.
With reference to first aspect or second of the first possible realization method of first aspect or first aspect may
Realization method or the third possible realization method of first aspect or the 4th kind of possible realization method of first aspect,
Or the 5th kind of possible realization method of first aspect, in the 6th kind of possible realization method, further include:
When detecting that cam lens or photoinduction sensor are obscured by an object, suspend the automatic camera work(of this terminal
Can, the photoinduction sensor is included close to optical sensor;
When detecting that the object for blocking the cam lens or the photoinduction sensor is removed, start this terminal
Automatic photo function placed in a suspend state.
With reference to first aspect or second of the first possible realization method of first aspect or first aspect may
Realization method or the third possible realization method of first aspect or the 4th kind of possible realization method of first aspect,
Or the 5th kind of possible realization method of first aspect or the 6th kind of possible realization method of first aspect, it can at the 7th kind
In the realization method of energy, further include:
When running the automatic photo function, the screen of terminal is closed in control, and the automatic photo function is controlled to protect
Hold operating status.
Second aspect of the present invention provides a kind of mobile terminal, including:
Acceleration acquisition module, for when reaching pre-set automatic camera time interval, obtaining the acceleration of terminal
Spend information;
Image collection module, for when the acceleration information meets stable condition, obtaining image data;
Memory module is detected, the described image data for being got to described image acquisition module carry out picture quality inspection
It surveys, and when the picture quality of described image data meets quality requirements, stores described image data.
In the first possible implementation, it further includes:
The acceleration information includes 3-axis acceleration value;
Acceleration judgment module, for judging whether the summation of the 3-axis acceleration value is less than preset acceleration threshold
Value;
Stablize determining module, if being judged as YES for the acceleration judgment module, it is determined that the acceleration information is expired
Sufficient stable condition.
With reference to the possible realization method of the first of second aspect or second aspect, in second of possible realization method
In, the detection memory module includes:
Gross detection unit, for detecting whether the brightness value of described image data and/or definition values are in
In gross threshold value;
Facial image detection unit, if detecting the brightness value of described image data for the gross detection unit
It is in gross threshold value with definition values, then whether detects described image data comprising face image data;
First determining storage unit does not include if being detected in described image data for the facial image detection unit
Face image data, it is determined that the picture quality of described image data meets quality requirements, and stores described image data.
With reference to second of possible realization method of second aspect, in the third possible realization method, the detection
Memory module further includes:
Blink detection unit includes face figure if being detected for the facial image detection unit in described image data
As data, then whether the facial image in the face image data is detected in blink state;
Second determining storage unit, if the facial image, which is not detected, for the blink detection unit is in blink shape
State, it is determined that the picture quality of described image data meets quality requirements, and stores described image data.
With reference to the third possible realization method of second aspect, in the 4th kind of possible realization method, described second
Determine that storage unit includes:
Smile detection sub-unit if being in blink state for the facial image to be not detected, detects the face figure
Seem no in smile state;
Quality determination subelement, if detecting that the facial image is in smile shape for the smile detection sub-unit
State, it is determined that the picture quality of described image data meets quality requirements, and stores described image data.
Second with reference to the possible realization method of the first of second aspect or second aspect or second aspect may
Realization method or the third possible realization method of second aspect or the 4th kind of possible realization method of second aspect,
In the 5th kind of possible realization method, further include:
Title setup module for setting at least one time interval, and sets at least one time interval respectively
Put compartment name;
Display module, for the compartment name to be shown in the display interface of this terminal;
Time interval presetting module, for when detecting the clicking operation to the compartment name, by selected
The automatic camera time interval is preset as every the corresponding time interval of title.
Second with reference to the possible realization method of the first of second aspect or second aspect or second aspect may
Realization method or the third possible realization method of second aspect or the 4th kind of possible realization method of second aspect,
Or the 5th kind of possible realization method of second aspect, in the 6th kind of possible realization method, further include:
Suspend module, for when detecting that cam lens or photoinduction sensor are obscured by an object, suspending this terminal
Automatic photo function, the photoinduction sensor includes close to optical sensor;
Starting module detects that the object for blocking the cam lens or the photoinduction sensor is removed for working as
When, start the automatic photo function placed in a suspend state of this terminal.
Second with reference to the possible realization method of the first of second aspect or second aspect or second aspect may
Realization method or the third possible realization method of second aspect or the 4th kind of possible realization method of second aspect,
Or the 5th kind of possible realization method of second aspect or the 6th kind of possible realization method of second aspect, it can at the 7th kind
In the realization method of energy, further include:
Screen control module, for when running the automatic photo function, the screen of terminal to be closed in control, and controls institute
It states automatic photo function and remains operational state.
Third aspect present invention provides a kind of mobile terminal, including:Processor, camera, memory, acceleration sensing
Device and timer;
The timer, for when the time of institute's timing reaching pre-set automatic camera time interval, triggering institute
State the acceleration information that acceleration transducer obtains terminal;
The acceleration transducer, under the control of the timer, obtaining the acceleration information of terminal, and
The acceleration information is sent to the processor;
The processor, for receiving the acceleration information that the acceleration transducer is got, and it is described when detecting
When acceleration information meets stable condition, the camera is controlled to obtain image data;
The camera, for obtaining described image data under the control of the processor;
The processor is additionally operable to carry out the described image data that the camera obtains picture quality detection, and
When detecting that the picture quality of described image data meets quality requirements, the memory storage described image data are controlled;
The memory, for storing described image data under the control of the processor.
In the first possible implementation, the processor, in the image matter for detecting described image data
When amount meets quality requirements, the memory storage described image data is controlled to specifically include:
The acceleration information includes 3-axis acceleration value;
Judge whether the summation of the 3-axis acceleration value that the acceleration transducer is got is less than preset acceleration
Threshold value is spent, when being judged as YES, determines that the acceleration information meets stable condition, controls the memory storage described image
Data.
With reference to the possible realization method of the first of the third aspect or the third aspect, in second of possible realization method
In, the processor is additionally operable to carry out picture quality detection, and detecting to the described image data that the camera obtains
When the picture quality of described image data meets quality requirements, the memory storage described image data are controlled, are specifically included:
Whether the brightness value and/or definition values for detecting described image data are in gross threshold value, and if
Detect that the brightness value of described image data and/or definition values are in gross threshold value, then further described in detection
Image data whether comprising face image data, and if detect and do not include face image data in described image data,
It determines that the picture quality of described image data meets quality requirements, and controls the memory storage described image data.
With reference to second of possible realization method of the third aspect, in the third possible realization method,
The processor if being additionally operable to detect in described image data comprising face image data, further detects
Whether facial image in the face image data is in blink state, and if the facial image is not detected and is in blinking
Eye state, it is determined that the picture quality of described image data meets quality requirements, and controls the memory storage described image
Data.
With reference to the third possible realization method of the third aspect, in the 4th kind of possible realization method,
The processor if being in blink state specifically for the facial image is not detected, further detects institute
Facial image is stated whether in smile state, and if detect that the facial image is in smile state, it is determined that the figure
As the picture quality of data meets quality requirements, and controls the memory storage described image data.
Second with reference to the possible realization method of the first of the third aspect or the third aspect or the third aspect may
Realization method or the third possible realization method of the third aspect or the 4th kind of possible realization method of the third aspect,
In the 5th kind of possible realization method, the processor is additionally operable to set at least one time interval, and to described at least one
A time interval sets compartment name respectively, and the compartment name is shown in the display interface of display screen, and when detection
During to the clicking operation of the compartment name, the corresponding time interval of selected compartment name is preset as the automatic bat
According to time interval.
Second with reference to the possible realization method of the first of the third aspect or the third aspect or the third aspect may
Realization method or the third possible realization method of the third aspect or the 4th kind of possible realization method of the third aspect,
Or the 5th kind of possible realization method of the third aspect, in the 6th kind of possible realization method, the processor is additionally operable to work as
When detecting that cam lens or photoinduction sensor are obscured by an object, suspend the automatic photo function of this terminal, the light sensation
Inductive sensing device is included close to optical sensor, is additionally operable to block the cam lens or the photoinduction sensor when detecting
When object is removed, start the automatic photo function placed in a suspend state of this terminal.
Second with reference to the possible realization method of the first of the third aspect or the third aspect or the third aspect may
Realization method or the third possible realization method of the third aspect or the 4th kind of possible realization method of the third aspect,
Or the 5th kind of possible realization method of the third aspect or the 6th kind of possible realization method of the third aspect, it can at the 7th kind
In the realization method of energy, the processor is additionally operable to when running the automatic photo function, is controlled and closed according to out code
The screen of terminal, and the automatic photo function is controlled to remain operational state.
Therefore the embodiment of the present invention can make terminal with certain frequency by setting automatic camera time interval
Carry out recyclable automatic camera, allow user without being operated again to camera button, meet take pictures automate, intelligent need
It asks, while terminal just triggers the automatic shooting of photo at steady-state, reduces terminal taking to the probability of invalid photo,
And quality testing can be carried out to captured photo to store high-quality photos, it is finally captured to further ensure user
The quality of photo.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other without creative efforts
Embodiment shall fall within the protection scope of the present invention.
Fig. 1 is referred to, is a kind of flow diagram of photographic method provided in an embodiment of the present invention, the method includes:
S101 when reaching pre-set automatic camera time interval, obtains the acceleration information of terminal;
Specifically, the pre-set automatic camera time interval can independently be selected by user, such as when user selects
When selecting using 5 seconds as automatic camera time interval, every five seconds for example is obtained the acceleration information of a terminal by terminal, and is taken pictures.
Terminal can calculate whether the stand-by period reaches pre-set automatic camera time interval by timer, wherein, it is described fixed
When device can use Android system delay message substitute.When reaching pre-set automatic camera time interval, Ke Yitong
The 3-axis acceleration value that acceleration transducer obtains terminal is crossed, to obtain acceleration information.
S102 when the acceleration information meets stable condition, then obtains image data;
Specifically, the acceleration information can include the 3-axis acceleration value of terminal, when the acceleration information meets
During stable condition, terminal can obtain image data by built-in camera either external camera triggering shooting, wherein, institute
It states the summation that stable condition can be 3-axis acceleration value and is less than acceleration rate threshold, for example, acceleration transducer persistently obtains end
The X-axis at end, Y-axis, Z axis acceleration value, when the lasting acquisition time is more than 500 milliseconds, and the acceleration of the X-axis of terminal, Y-axis, Z axis
When the accumulative total of the absolute value of angle value is less than the acceleration rate threshold of 0.01 meter/square second, it may be determined that the acceleration information
Meet stable condition, i.e., terminal at this time does not shake, and starts triggering shooting and obtain image data.
S103 carries out picture quality detection, and meet matter in the picture quality of described image data to described image data
During amount condition, described image data are stored;
Specifically, after shooting gets image data, terminal can carry out picture quality to the image data got
Detection, and described image data are stored when described image quality meets quality requirements, for example, terminal can detect what is got
Whether the factors such as clarity, the brightness value of image data meet the requirements, and when meeting the requirements, determine that described image quality meets
Quality requirements, and store described image data.When described image quality is unsatisfactory for quality requirements, described image number is not stored
According to, and delete described image data.
Therefore the embodiment of the present invention can make terminal with certain frequency by setting automatic camera time interval
Carry out recyclable automatic camera, allow user without being operated again to camera button, meet take pictures automate, intelligent need
It asks, while terminal just triggers the automatic shooting of photo at steady-state, reduces terminal taking to the probability of invalid photo,
And quality testing can be carried out to captured photo to store high-quality photos, it is finally captured to further ensure user
The quality of photo.
Fig. 2 is referred to again, for the flow diagram of another photographic method provided in an embodiment of the present invention, the method packet
It includes:
S201 sets at least one time interval, and sets compartment name respectively at least one time interval;
Specifically, when the time interval of setting is 1 second, it is " 1 second that compartment name can be set to the time interval
Clock ";Or the time interval of setting is 10 minutes, it is " 10 minutes " that compartment name can be set to the time interval;Or
When the time interval of setting will make to take pictures, interval is as short as possible, and it is " video recording " that compartment name can be set to the time interval;
Or when the time interval of setting will make to take pictures interval infinity, it is " single that compartment name can be set to the time interval
It claps ";Set time interval can also be other duration sizes, and which is not described herein again.
The compartment name is shown in the display interface of this terminal by S202;
S203, when detecting the clicking operation to the compartment name, by the selected compartment name corresponding time
Interval is preset as the automatic camera time interval;
Specifically, when detecting clicking operation of the user to the compartment name, it can be by selected compartment name
Corresponding time interval is preset as the automatic camera time interval.For example, shown on display interface 10 it is different between
Every title, when user clicks the compartment name for selecting one of them entitled " 10 seconds ", terminal will be the interval of " 10 seconds "
The corresponding time interval of title is preset as the automatic camera time interval, and automatic camera time interval at this time will be 10 seconds;
When user has selected the compartment name of entitled " 1 minute " again in this 10 different compartment names, between the automatic camera time
Every will be switched to 1 minute from 10 seconds.
S204 when reaching pre-set automatic camera time interval, obtains the acceleration information of terminal;
Specifically, the pre-set automatic camera time interval can independently be selected by user, such as when user selects
When selecting using 5 seconds as automatic camera time interval, every five seconds for example is obtained the acceleration information of a terminal by terminal, and is taken pictures.
Terminal can calculate whether the stand-by period reaches pre-set automatic camera time interval by timer, wherein, it is described fixed
When device can use Android system delay message substitute.When reaching pre-set automatic camera time interval, Ke Yitong
The 3-axis acceleration value that acceleration transducer obtains terminal is crossed, to obtain acceleration information.
S205 when the acceleration information meets stable condition, then obtains image data;
Specifically, the acceleration information can include the 3-axis acceleration value of terminal, when the acceleration information meets
During stable condition, terminal can obtain image data by built-in camera either external camera triggering shooting, wherein, institute
It states the summation that stable condition can be 3-axis acceleration value and is less than acceleration rate threshold, for example, acceleration transducer persistently obtains end
The X-axis at end, Y-axis, Z axis acceleration value, when the lasting acquisition time is more than 500 milliseconds, and the acceleration of the X-axis of terminal, Y-axis, Z axis
When the accumulative total of the absolute value of angle value is less than the acceleration rate threshold of 0.01 meter/square second, it may be determined that the acceleration information
Meet stable condition, i.e., terminal at this time does not shake, and starts triggering shooting and obtain image data.
S206 carries out picture quality detection, and meet matter in the picture quality of described image data to described image data
During amount condition, described image data are stored;
Specifically, after shooting gets image data, terminal can carry out picture quality to the image data got
Detection, and described image data are stored when described image quality meets quality requirements, for example, terminal can detect what is got
Whether the factors such as clarity, the brightness value of image data meet the requirements, and when meeting the requirements, determine that described image quality meets
Quality requirements, and store described image data.When described image quality is unsatisfactory for quality requirements, described image number is not stored
According to, and delete described image data.
Terminal provided in an embodiment of the present invention can also be hidden detecting cam lens or photoinduction sensor by object
During gear, suspend the automatic photo function of this terminal, the photoinduction sensor is included close to optical sensor;
When detecting that the object for blocking the cam lens or the photoinduction sensor is removed, start this terminal
Automatic photo function placed in a suspend state;
Specifically, one can be set according to phase controlling switch, control switch is total to by optical sensor, slide switch and shielding plate
With composition.Slide switch is integrated with shielding plate, and when slide switch is shut, shielding plate also just shelters from photoinduction sensor,
Automatic photo function will be closed;When slide switch is opened, shielding plate does not just block photoinduction sensor yet, automatic by starting
Camera function.After slide switch is opened, then with hand or other object shielding light inductive pick-ups or cam lens, it will suspend
Automatic photo function that is, when detecting that cam lens or photoinduction sensor are obscured by an object, suspends the automatic of this terminal
Camera function;After handle or other objects remove photoinduction sensor or cam lens, automatic photo function will be automatic extensive
It is multiple, i.e., when detecting that the object for blocking the cam lens or the photoinduction sensor is removed, start this terminal
Automatic photo function placed in a suspend state.The photoinduction sensor is included close to optical sensor, when user opens automatic clap
After function, open described close to optical sensor, when user is blocked close to optical sensor, pause automatic photo function;When with
Family from it is described close to optical sensor remove when, automatic photo function will be restored.
When running the automatic photo function, the screen of terminal is closed in control, and the automatic photo function is controlled to protect
Hold operating status;
Specifically, during the automatic photo function is run, the screen for closing terminal, and same time control can be controlled
It makes the automatic photo function and remains operational state, i.e., user, which clicks to go out, shields button or terminal without mode of operation more than time threshold
When, terminal closes screen, and takes pictures and apply continuing to run with from the background to realize automatic camera.For example, when the photograph control of user's long-press
During system switch, automatic photo function is opened, terminal can be obtained according to time interval set by user with certain frequency cycle shooting
Take photo;When pressing terminal supplying power key without operation overtime or user by regular hour terminal, terminal screen is closed, but from
Dynamic camera function is still in running background;If user needs to take pictures manually at this time, only need short-press once according to phase controlling switch, screen point
It is bright and can previewing photos on the screen, into manual exposal model is supported, user, can again per short-press once according to phase controlling switch
It takes a picture immediately;When user no longer operates, and enter automatic camera pattern.
Therefore the embodiment of the present invention can make terminal with certain frequency by setting automatic camera time interval
Carry out recyclable automatic camera, allow user without being operated again to camera button, meet take pictures automate, intelligent need
It asks, while terminal just triggers the automatic shooting of photo at steady-state, reduces terminal taking to the probability of invalid photo,
And quality testing can be carried out to captured photo to store high-quality photos, it is finally captured to further ensure user
The quality of photo;And pause mechanism is added in during automatic camera, user is allow easily to suspend, restores automatic camera
Function;And during automatic camera, the screen of terminal can close, to save the battery capacity of terminal.
Further, then Fig. 3 is referred to, the method for terminal steady is judged for one of which provided in an embodiment of the present invention
Flow diagram, the method includes:
S301, judges whether the summation of the 3-axis acceleration value is less than preset acceleration rate threshold;
Specifically, in S102 steps or S205 steps, can by judge the 3-axis acceleration value summation whether
Less than preset acceleration rate threshold, to determine whether the acceleration information meets stable condition, the acceleration information includes
3-axis acceleration value.
S302, if being judged as YES, the acceleration information meets stable condition;
When S301 steps are judged as YES, it is determined that the acceleration information meets stable condition, at this point it is possible to perform described
The step of obtaining image data.For example, acceleration transducer persistently obtain the X-axis of terminal, Y-axis, Z axis acceleration value, when holding
It is continuous to obtain the time more than 500 milliseconds, and the accumulative total of the absolute value of the acceleration value of the X-axis of terminal, Y-axis, Z axis is less than 0.01
During the acceleration rate threshold of rice/square second, it may be determined that the acceleration information meets stable condition, i.e., terminal at this time is not sent out
It is raw to shake, and start triggering shooting and obtain image data.
Therefore the embodiment of the present invention is by judging whether the summation of acceleration information is less than acceleration rate threshold, it can be with
Ensure terminal at steady-state, shooting obtains photo.
Further, then Fig. 4 is referred to, is the method for one of which detection image quality provided in an embodiment of the present invention
Flow diagram, the method for the embodiment of the present invention may correspond to the S103 in the corresponding embodiments of above-mentioned Fig. 1 or Fig. 2 pairs
S206 in the embodiment answered.The embodiment of the present invention is described in detail with detection image quality.The embodiment of the present invention it is described
Method specifically includes:
Whether S401, the brightness value and/or definition values for detecting described image data are in gross threshold value;
Specifically, the gross threshold value is the threshold value being pre-set in this terminal, the gross threshold value can
To include luminance threshold and clarity threshold.Whether the brightness value and/or definition values for detecting described image data are in base
In this quality threshold, that is, the brightness value of described image data is detected whether in luminance threshold, while described image data
Whether definition values reach clarity threshold.
S402, if detecting, the brightness value of described image data and/or definition values are in gross threshold value,
Detect whether described image data include face image data;
When S401 detects that at least one of brightness value and definition values of described image data are not in gross
During threshold value, that is, detect described image data brightness value is too dark or too bright or the clarity of described image data does not reach
During to the clarity threshold, illustrate that photo does not meet quality requirement, then delete the photo.Wherein, when detecting described image
When the clarity of data does not reach the clarity threshold, illustrate that photo is relatively fuzzyyer, photographic fog is mainly shaken by camera
Dynamic, target object is mobile or focusing is unsuccessfully etc. caused by factors.If detect the brightness value of described image data and/or clear
Clear angle value is in gross threshold value, then whether detects described image data comprising face image data.
S403 does not include face image data, it is determined that the figure of described image data if detecting in described image data
Image quality amount meets quality requirements, and stores described image data;
Do not include face image data in described image data if detecting, illustrate that current captured photo shines for scenery
Piece can then determine that the picture quality of described image data meets quality requirements, and stores described image data.
The embodiment of the present invention is by detecting brightness and clarity, it is ensured that the quality of the final captured photo of user.
Further, then Fig. 5 is referred to, is the method for wherein another detection image quality provided in an embodiment of the present invention
Flow diagram, the method for the embodiment of the present invention may correspond to S103 or Fig. 2 in the corresponding embodiments of above-mentioned Fig. 1
S206 in corresponding embodiment.The embodiment of the present invention is described in detail with detection image quality.The institute of the embodiment of the present invention
The method of stating specifically includes:
Whether S501, the brightness value and/or definition values for detecting described image data are in gross threshold value;
Specifically, the gross threshold value is the threshold value being pre-set in this terminal, the gross threshold value can
To include luminance threshold and clarity threshold.Whether the brightness value and/or definition values for detecting described image data are in base
In this quality threshold, that is, the brightness value of described image data is detected whether in luminance threshold, while described image data
Whether definition values reach clarity threshold.
S502, if detecting, the brightness value of described image data and/or definition values are in gross threshold value,
Detect whether described image data include face image data;
When S501 detects that at least one of brightness value and definition values of described image data are not in gross
During threshold value, that is, detect described image data brightness value is too dark or too bright or the clarity of described image data does not reach
During to the clarity threshold, illustrate that photo does not meet quality requirement, then delete the photo.Wherein, when detecting described image
When the clarity of data does not reach the clarity threshold, illustrate that photo is relatively fuzzyyer, photographic fog is mainly shaken by camera
Dynamic, target object is mobile or focusing is unsuccessfully etc. caused by factors.If detect the brightness value of described image data and/or clear
Clear angle value is in gross threshold value, then whether detects described image data comprising face image data.
S503 if detecting in described image data comprising face image data, is detected in the face image data
Facial image whether be in blink state;
If step S502 is detected in described image data comprising face image data, the face figure is further detected
As whether the facial image in data is in blink state.
S504, if the facial image, which is not detected, is in blink state, it is determined that the picture quality of described image data
Meet quality requirements, and store described image data;
If step S503 is not detected the facial image and is in blink state, the figure of described image data can be determined
Image quality amount meets quality requirements, and stores described image data;If step S503 detects that the facial image is in blink shape
State illustrates that photo does not meet quality requirement, then deletes the photo.
The embodiment of the present invention may further ensure that the final institute of user by detecting brightness, clarity and blink state
Shoot the quality of photo.
Further, then Fig. 6 is referred to, is the method for wherein another detection image quality provided in an embodiment of the present invention
Flow diagram, the method for the embodiment of the present invention may correspond to S103 or Fig. 2 in the corresponding embodiments of above-mentioned Fig. 1
S206 in corresponding embodiment.The embodiment of the present invention is described in detail with detection image quality.The institute of the embodiment of the present invention
The method of stating specifically includes:
Whether S601, the brightness value and/or definition values for detecting described image data are in gross threshold value;
S602, if detecting, the brightness value of described image data and/or definition values are in gross threshold value,
Detect whether described image data include face image data;
S603 if detecting in described image data comprising face image data, is detected in the face image data
Facial image whether be in blink state;
Whether S604 if the facial image, which is not detected, is in blink state, detects the facial image in smile
State;
Specifically, when the facial image being not detected being in blink state, detect whether the facial image is in
Smile state;If detecting, the facial image is in blink state, and described image data are unsatisfactory for quality requirements, delete institute
State image data.Wherein, the detection function of the smile state can independently be chosen whether to open by user, if being not turned on pair
The detection function of the smile state, then when the facial image being not detected being in blink state, you can preserve the figure
As data.
S605, if detecting, the facial image is in smile state, it is determined that the picture quality of described image data expires
Sufficient quality requirements, and store described image data;
Specifically, when detecting that the facial image is in smile state, it is determined that the picture quality of described image data
Meet quality requirements, and store described image data;If the facial image, which is not detected, is in smile state, described image
Data are unsatisfactory for quality requirements, and delete described image data.
Wherein, the specific embodiment of step S601 to S603 may refer to S501 in above-mentioned Fig. 5 corresponding embodiments extremely
S503 is not discussed here.
The embodiment of the present invention may further ensure that use by detecting brightness, clarity, blink state and smile state
The quality of the final captured photo in family.
Fig. 7 is referred to, for a kind of structure diagram of mobile terminal 1 provided in an embodiment of the present invention, the mobile terminal 1
It can include:Acceleration acquisition module 11, image collection module 12, detection memory module 13;
The acceleration acquisition module 11, for when reaching pre-set automatic camera time interval, obtaining terminal
Acceleration information;
Specifically, the pre-set automatic camera time interval can independently be selected by user, such as when user selects
When selecting using 5 seconds as automatic camera time interval, every five seconds for example is obtained the acceleration of a terminal by the acceleration acquisition module 11
Information, and take pictures.Whether the acceleration acquisition module 11 can be reached by the timer calculating stand-by period sets in advance
The automatic camera time interval put, wherein, the timer can use the delay message of Android system to substitute.It is advance reaching
During the automatic camera time interval of setting, the acceleration acquisition module 11 can obtain the three of terminal by acceleration transducer
Axle acceleration value, to obtain acceleration information.
Described image acquisition module 12, for when the acceleration information meets stable condition, obtaining image data;
Specifically, the acceleration information can include the 3-axis acceleration value of terminal, when the acceleration information meets
During stable condition, described image acquisition module 12 can obtain figure by built-in camera either external camera triggering shooting
As data, wherein, the stable condition can be that the summation of 3-axis acceleration value is less than acceleration rate threshold, for example, acceleration passes
Sensor persistently obtain the X-axis of terminal, Y-axis, Z axis acceleration value, when the lasting acquisition time is more than 500 milliseconds, and the X of terminal
Axis, Y-axis, Z axis acceleration value absolute value accumulative total be less than 0.01 meter/square second acceleration rate threshold when, can be true
The fixed acceleration information meets stable condition, i.e., terminal at this time does not shake, and described image acquisition module 12 starts
Triggering shooting obtains image data.
The detection memory module 13, the described image data for being got to described image acquisition module carry out image
Quality testing, and when the picture quality of described image data meets quality requirements, store described image data;
Specifically, after the shooting of described image acquisition module 12 gets image data, the detection memory module 13 can
To carry out picture quality detection to the image data got, and the figure is stored when described image quality meets quality requirements
As data, for example, the detection memory module 13 can detect the factors such as the clarity of the image data got, brightness value is
It is no to meet the requirements, when meeting the requirements, determine that described image quality meets quality requirements, and store described image data.When
When described image quality is unsatisfactory for quality requirements, the detection memory module 13 does not store described image data, and described in deletion
Image data.
Therefore the embodiment of the present invention can make terminal with certain frequency by setting automatic camera time interval
Carry out recyclable automatic camera, allow user without being operated again to camera button, meet take pictures automate, intelligent need
It asks, while terminal just triggers the automatic shooting of photo at steady-state, reduces terminal taking to the probability of invalid photo,
And quality testing can be carried out to captured photo to store high-quality photos, it is finally captured to further ensure user
The quality of photo.
Fig. 8 is referred to again, for the structure diagram of another mobile terminal 1 provided in an embodiment of the present invention, the movement
Terminal 1 can include:Title setup module 16, display module 17, time interval presetting module 18, acceleration acquisition module 11,
Acceleration judgment module 14 stablizes determining module 15, image collection module 12, detection memory module 13, pause module 19, starts
Module 20, screen control module 21;
The title setup module 16, for setting at least one time interval, and at least one time interval
Compartment name is set respectively;
Specifically, when the time interval of the title setup module 16 setting is 1 second, the title setup module 16 can
To set compartment name as " 1 second " to the time interval;Or the time interval that the title setup module 16 is set is
10 minutes, it was " 10 minutes " that the title setup module 16, which can set the time interval compartment name,;Or when described
The time interval that title setup module 16 is set will make to take pictures, and interval is as short as possible, and the title setup module 16 can be to described
Time interval setting compartment name is " video recording ";Or between the time interval of the title setup module 16 setting will make to take pictures
When infinity, the title setup module 16 can set the time interval compartment name as " single to clap ";The title
Time interval set by setup module 16 can also be other duration sizes, and which is not described herein again.
The display module 17, for the compartment name to be shown in the display interface of this terminal;
The time interval presetting module 18, selected by when detecting the clicking operation to the compartment name, inciting somebody to action
The corresponding time interval of compartment name selected is preset as the automatic camera time interval;
Specifically, when the time interval presetting module 18 detects clicking operation of the user to the compartment name,
The corresponding time interval of selected compartment name can be preset as the automatic camera by the time interval presetting module 18
Time interval.For example, the display module 17 shows 10 different compartment names on display interface, selected when user clicks
When selecting the compartment name of one of them entitled " 10 seconds ", the time interval presetting module 18 will be the interval name of " 10 seconds "
Corresponding time interval is claimed to be preset as the automatic camera time interval, automatic camera time interval at this time will be 10 seconds;When
When user has selected the compartment name of entitled " 1 minute " again in this 10 different compartment names, the time interval is preset
Module 18 then will switch to automatic camera time interval 1 minute from 10 seconds.
The acceleration acquisition module 11, for when reaching pre-set automatic camera time interval, obtaining terminal
Acceleration information;
Specifically, the 18 pre-set automatic camera time interval of time interval presetting module can be autonomous by user
Selection, such as when user is selected using 5 seconds as automatic camera time interval, the acceleration acquisition module 11 obtains every five seconds for example
The acceleration information of a terminal is taken, and is taken pictures.The acceleration acquisition module 11 can be calculated by timer and be waited for
Whether the time reaches pre-set automatic camera time interval, wherein, the timer can use the delay of Android system
Message substitutes.When reaching pre-set automatic camera time interval, the acceleration acquisition module 11 can pass through acceleration
The 3-axis acceleration value that sensor obtains terminal is spent, to obtain acceleration information.
The acceleration judgment module 14, for judging whether the summation of the 3-axis acceleration value is less than preset acceleration
Spend threshold value;
After the acceleration acquisition module 11 gets acceleration information, the acceleration judgment module 14 may determine that
Whether the summation of the 3-axis acceleration value is less than preset acceleration rate threshold, and the acceleration information includes 3-axis acceleration
Value.
The stable determining module 15, if being judged as YES for the acceleration judgment module 14, it is determined that the acceleration
Degree information meets stable condition;
When the acceleration judgment module 14 is judged as YES, the stable determining module 15 can determine the acceleration
Information meets stable condition.For example, the acceleration acquisition module 11 persistently obtains X-axis, the Y of terminal by acceleration transducer
The acceleration value of axis, Z axis, when the lasting acquisition time is more than 500 milliseconds, and the acceleration value of the X-axis of terminal, Y-axis, Z axis is exhausted
When being less than the acceleration rate threshold of 0.01 meter/square second to the accumulative total of value, the stable determining module 15 can determine described
Acceleration information meets stable condition, i.e., terminal at this time does not shake, and starts triggering shooting and obtain image data.
Described image acquisition module 12, for when the acceleration information meets stable condition, obtaining image data;
Specifically, the acceleration information can include the 3-axis acceleration value of terminal, when the stable determining module 15
When determining that acceleration information meets stable condition, described image acquisition module 12 can be taken the photograph by the way that built-in camera is either external
As head triggering shooting acquisition image data, wherein, the stable condition can be that the summation of 3-axis acceleration value is less than acceleration
Threshold value, for example, acceleration transducer persistently obtain the X-axis of terminal, Y-axis, Z axis acceleration value, be more than when the lasting acquisition time
500 milliseconds, and the accumulative total of the absolute value of the acceleration value of the X-axis of terminal, Y-axis, Z axis is less than adding for 0.01 meter/square second
During threshold speed, it may be determined that the acceleration information meets stable condition, i.e., terminal at this time does not shake, the figure
Image data is obtained as acquisition module 12 starts triggering shooting.
The detection memory module 13, the described image data for being got to described image acquisition module carry out image
Quality testing, and when the picture quality of described image data meets quality requirements, store described image data;
Specifically, after the shooting of described image acquisition module 12 gets image data, the detection memory module 13 can
To carry out picture quality detection to the image data got, and the figure is stored when described image quality meets quality requirements
As data, for example, the detection memory module 13 can detect the factors such as the clarity of the image data got, brightness value is
It is no to meet the requirements, when meeting the requirements, determine that described image quality meets quality requirements, and store described image data.When
When described image quality is unsatisfactory for quality requirements, the detection memory module 13 does not store described image data, and described in deletion
Image data.
The pause module 19, for when detecting that cam lens or photoinduction sensor are obscured by an object, suspending
The automatic photo function of this terminal, the photoinduction sensor are included close to optical sensor;
The starting module 20 detects the object for blocking the cam lens or the photoinduction sensor for working as
When being removed, start the automatic photo function placed in a suspend state of this terminal;
Specifically, one can be set according to phase controlling switch, control switch is total to by optical sensor, slide switch and shielding plate
With composition.Slide switch is integrated with shielding plate, and when slide switch is shut, shielding plate also just shelters from photoinduction sensor,
Automatic photo function will be closed;When slide switch is opened, shielding plate does not just block photoinduction sensor yet, automatic by starting
Camera function.After slide switch is opened, then with hand or other object shielding light inductive pick-ups or cam lens, it is described temporarily
Automatic photo function will be suspended by stopping module 19, i.e., described pause module 19 is detecting cam lens or photoinduction sensor quilt
When object blocks, suspend the automatic photo function of this terminal;When handle or other objects remove photoinduction sensor or camera
After camera lens, the starting module 20 will start automatic photo function, i.e., block the camera shooting when the starting module 20 detects
When the object of head mirror head or the photoinduction sensor is removed, the starting module 20 starts this terminal placed in a suspend state
Automatic photo function.The photoinduction sensor is included close to optical sensor, after user opens automatic photo function, opens
It is described close to optical sensor, when user is blocked close to optical sensor, the pause module 19 suspends automatic photo function;When with
Family from it is described close to optical sensor remove when, the starting module 20 will restore automatic photo function.
The screen control module 21, for when running the automatic photo function, the screen of terminal to be closed in control, and
The automatic photo function is controlled to remain operational state;
Specifically, during the automatic photo function is run, the screen control module 21 can control closing
The screen of terminal, and the automatic photo function is controlled to remain operational state simultaneously, i.e. user click go out screen button or terminal without
When mode of operation is more than time threshold, the screen control module 21 closes screen, and take pictures apply continue to run with from the background with
Realize automatic camera.For example, when user's long-press shines phase controlling switch, automatic photo function is opened, terminal can be according to user
The time interval of setting recycles shooting with certain frequency and obtains photo;When process regular hour terminal is without operation overtime or user
When pressing terminal supplying power key, the screen control module 21 controls screen to close, and automatic photo function is controlled to continue on backstage
Operation;If user needs to take pictures manually at this time, only need short-press once according to phase controlling switch, screen is lighted and can be pre- on the screen
Look at photo, into manual exposal model is supported, user can take a picture immediately again per short-press once according to phase controlling switch;When
When user no longer operates, and enter automatic camera pattern.
Further, then Fig. 9 is referred to, Fig. 9 is the structure diagram that memory module 13 is detected in Fig. 8, and the detection is deposited
Storage module 13 can include:Gross detection unit 131, facial image detection unit 132, the first determining storage unit 133,
Blink detection unit 134, the second determining storage unit 135;
The gross detection unit 131, for whether detecting the brightness value of described image data and/or definition values
It is in gross threshold value;
Specifically, the gross threshold value is the threshold value being pre-set in this terminal, the gross threshold value can
To include luminance threshold and clarity threshold.The gross detection unit 131 detect described image data brightness value and/
Or whether definition values are in gross threshold value, that is, whether the brightness value for detecting described image data is in luminance threshold
It is interior, while whether the definition values of described image data reach clarity threshold.
The facial image detection unit 132, if detecting described image number for the gross detection unit 131
According to brightness value and definition values be in gross threshold value, then whether detect described image data comprising facial image number
According to;
If the gross detection unit 131 detects that the brightness value of described image data and definition values are in base
In this quality threshold, then whether the facial image detection unit 132 can detect described image data comprising facial image number
According to.When the gross detection unit 131 detects at least one of brightness value and definition values of described image data
When being not in gross threshold value, i.e., described gross detection unit 131 detects that the brightness value of described image data is too dark
Or too bright or described image data clarity are not when reaching the clarity threshold, illustrating that photo does not meet quality will
It asks, then deletes the photo.Wherein, it when the clarity for detecting described image data does not reach the clarity threshold, says
Bright photo is relatively fuzzy, photographic fog is mainly shaken by camera, target object is mobile or focusing unsuccessfully etc. factors cause
's.
The first determining storage unit 133, if detecting described image number for the facial image detection unit 132
Face image data is not included in, it is determined that the picture quality of described image data meets quality requirements, and stores the figure
As data;
If the facial image detection unit 132, which detects, does not include face image data, explanation in described image data
Current captured photo is scenery photo, then the described first determining storage unit 133 can determine the figure of described image data
Image quality amount meets quality requirements, and stores described image data.
The blink detection unit 134, if being detected in described image data for the facial image detection unit 132
Comprising face image data, then whether the facial image in the face image data is detected in blink state;
The second determining storage unit 135, if the facial image is not detected for the blink detection unit 134
In blink state, it is determined that the picture quality of described image data meets quality requirements, and stores described image data;
Specifically, be in blink state when the facial image is not detected in the blink detection unit 134, then described
Two determining storage units 135 determine that the picture quality of described image data meets quality requirements, and store described image data;If
The blink detection unit 134 detects that the facial image is in blink state, then the picture quality of described image data is not
Meet quality requirements, and delete described image data.
Further, then Figure 10 is referred to, Figure 10 is the structure diagram of the second determining storage unit 135 in Fig. 9, described
Second determining storage unit 135 can include:Smile detection sub-unit 1351, quality determination subelement 1352;
The smile detection sub-unit 1351 if being in blink state for the facial image to be not detected, detects institute
Facial image is stated whether in smile state;
Specifically, when the blink detection unit 134 is not detected the facial image and is in blink state, it is described micro-
It laughs at detection sub-unit 1351 and whether detects the facial image in smile state;If the blink detection unit 134 detects
The facial image is in blink state, then described image data are unsatisfactory for quality requirements, deletes described image data.Wherein,
The detection function of the smile state can independently be chosen whether to open by user, if being not turned on the inspection to the smile state
Brake, then when the blink detection unit 134 is not detected the facial image and is in blink state, you can by described
Two determining storage units 135 preserve described image data.
The quality determination subelement 1352, if detecting the facial image for the smile detection sub-unit 1351
In smile state, it is determined that the picture quality of described image data meets quality requirements, and stores described image data;
Specifically, when the smile detection sub-unit 1351 detects that the facial image is in smile state, then it is described
Quality determination subelement 1352 determines that the picture quality of described image data meets quality requirements, and stores described image data;
If the smile detection sub-unit 1351 is not detected the facial image and is in smile state, described image data are unsatisfactory for
Quality requirements, and delete described image data.
Therefore the embodiment of the present invention can make terminal with certain frequency by setting automatic camera time interval
Carry out recyclable automatic camera, allow user without being operated again to camera button, meet take pictures automate, intelligent need
It asks, while terminal just triggers the automatic shooting of photo at steady-state, reduces terminal taking to the probability of invalid photo,
And quality testing can be carried out to captured photo to store high-quality photos, it is finally captured to further ensure user
The quality of photo;And pause mechanism is added in during automatic camera, user is allow easily to suspend, restores automatic camera
Function;And during automatic camera, the screen of terminal can close, to save the battery capacity of terminal.
Figure 11 is referred to again, for the structure diagram of another mobile terminal 1 provided in an embodiment of the present invention, the movement
Terminal 1 can include:Processor 1001, camera 1002, memory 1003, acceleration transducer 1004 and timer
1005;
The timer 1005, for when the time of institute's timing reaching pre-set automatic camera time interval, touching
Send out acceleration transducer 1004 described and obtain the acceleration information of terminal;
The acceleration transducer 1004, under the control of the timer 1005, obtaining the acceleration of terminal
Information is spent, and the acceleration information is sent to the processor 1001;
The processor 1001, for receiving the acceleration information that the acceleration transducer 1004 is got, and when inspection
When measuring the acceleration information and meeting stable condition, the camera 1002 is controlled to obtain image data;
The camera 1002, for obtaining described image data under the control of the processor 1001;
The processor 1001 is additionally operable to carry out picture quality inspection to the described image data that the camera 1002 obtains
It surveys, and when the picture quality for detecting described image data meets quality requirements, the memory 1003 is controlled to store described
Image data;
The memory 1003, for storing described image data under the control of the processor 1001.
Wherein, the processor 1001, during for meeting quality requirements in the picture quality for detecting described image data,
The memory 1003 is controlled to store described image data to specifically include:
The acceleration information includes 3-axis acceleration value;
It is preset to judge whether the summation of the 3-axis acceleration value that the acceleration transducer 1004 gets is less than
Acceleration rate threshold when being judged as YES, determines that the acceleration information meets stable condition, the memory 1003 is controlled to store
Described image data.
Wherein, the processor 1001 is additionally operable to carry out image to the described image data that the camera 1002 obtains
Quality testing, and when the picture quality for detecting described image data meets quality requirements, the memory 1003 is controlled to deposit
Described image data are stored up, are specifically included:
Whether the brightness value and/or definition values for detecting described image data are in gross threshold value, and if
Detect that the brightness value of described image data and/or definition values are in gross threshold value, then further described in detection
Image data whether comprising face image data, and if detect and do not include face image data in described image data,
It determines that the picture quality of described image data meets quality requirements, and the memory 1003 is controlled to store described image data.
Wherein, the processor 1001, if being additionally operable to detect in described image data comprising face image data, into
Whether one step detects facial image in the face image data in blink state, and if being not detected the face figure
As being in blink state, it is determined that the picture quality of described image data meets quality requirements, and controls the memory 1003
Store described image data.
Wherein, the processor 1001, if blink state is in specifically for the facial image is not detected, into one
Whether step detects the facial image in smile state, and if detect that the facial image is in smile state, really
The picture quality for determining described image data meets quality requirements, and the memory 1003 is controlled to store described image data.
Wherein, the processor 1001 is additionally operable to set at least one time interval, and between at least one time
Every setting compartment name respectively, and the compartment name is shown in the display interface of display screen, and when detecting to described
During the clicking operation of compartment name, the corresponding time interval of selected compartment name was preset as between the automatic camera time
Every.
Wherein, the processor 1001 is additionally operable to 1002 camera lens of camera or photoinduction sensor ought be detected by object
When blocking, suspend the automatic photo function of this terminal, the photoinduction sensor includes, close to optical sensor, being additionally operable to when detection
When being removed to the object for blocking 1002 camera lens of camera or the photoinduction sensor, start this terminal is in pause
The automatic photo function of state.
Wherein, the processor 1001 is additionally operable to when running the automatic photo function, is controlled and closed according to out code
The screen of terminal is closed, and the automatic photo function is controlled to remain operational state.
The out code can be generated when user clicks the switch key of screen;Alternatively, the timer
1005 whithin a period of time, does not detect that user clicks screen, at this point, the timer 1005 will generate out code, institute
The screen for closing terminal can be controlled according to the out code by stating processor 1001.
The specific implementation process of the embodiment of the present invention may refer to the embodiment corresponding to Fig. 1 to Figure 10, here no longer into
Row repeats.
Therefore the embodiment of the present invention can make terminal with certain frequency by setting automatic camera time interval
Carry out recyclable automatic camera, allow user without being operated again to camera button, meet take pictures automate, intelligent need
It asks, while terminal just triggers the automatic shooting of photo at steady-state, reduces terminal taking to the probability of invalid photo,
And quality testing can be carried out to captured photo to store high-quality photos, it is finally captured to further ensure user
The quality of photo;And pause mechanism is added in during automatic camera, user is allow easily to suspend, restores automatic camera
Function;And during automatic camera, the screen of terminal can close, to save the battery capacity of terminal.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a computer read/write memory medium
In, the program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory(Read-Only Memory, ROM)Or random access memory(Random Access
Memory, RAM)Deng.
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly
It encloses, therefore equivalent variations made according to the claims of the present invention, is still within the scope of the present invention.