CN107911618A - Processing method, terminal and the terminal readable storage medium storing program for executing taken pictures - Google Patents
Processing method, terminal and the terminal readable storage medium storing program for executing taken pictures Download PDFInfo
- Publication number
- CN107911618A CN107911618A CN201711451053.5A CN201711451053A CN107911618A CN 107911618 A CN107911618 A CN 107911618A CN 201711451053 A CN201711451053 A CN 201711451053A CN 107911618 A CN107911618 A CN 107911618A
- Authority
- CN
- China
- Prior art keywords
- focusing
- facial image
- terminal
- image
- preview
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/61—Control of cameras or camera modules based on recognised objects
- H04N23/611—Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
The present invention provides a kind of processing method taken pictures, terminal and terminal readable storage medium storing program for executing, by using identification terminal be in enter take pictures preview mode when, detect in present preview image and whether there is facial image;If detecting in the present preview image there are facial image, focusing process is carried out to the facial image using phase type focal modes;Processing of taking pictures is carried out to the preview image after focusing process, to obtain the technical solution of corresponding photo, so that compared with the existing focusing mode using contrast formula, on the basis of focus effects are ensured, focusing time of taking pictures is effectively reduced, improves treatment effeciency of taking pictures, optimizes experience of taking pictures.
Description
Technical field
The present invention relates to electronic technology, more particularly to a kind of processing method taken pictures, terminal and terminal readable storage medium storing program for executing.
Background technology
With the development of electronic technology, more and more people, which have, to carry out self-timer using electronic equipment or shoots other people need
Ask.For the demand of catering to, existing terminal gradually starts to support the focus function based on face.
In the prior art, taking pictures for face is realized based on contrast formula focal modes, i.e., when terminal is determining
There are during facial image, calling contrast formula focuses module to obtain the contrast value of image of the facial image in each focus point,
And after the focus point of optimal facial image is obtained, take pictures to facial image to obtain photo.
But focused using contrast formula focal modes to face, it is necessary to obtain figure of the face in each focus point
Picture, required focusing time is longer when it is taken pictures, especially in capture face moment facial expression scene under, it is long
Focusing time does not very utilize candid photograph user experience.Therefore, focusing time of the terminal when shooting face how is reduced, improves and claps
Become the technical problem of urgent need to resolve according to efficiency.
The content of the invention
The present invention provides a kind of processing method taken pictures, terminal and terminal readable storage medium storing program for executing, for solving the prior art
Focusing time during middle shooting face is longer, less efficient technical problem of taking pictures.
One aspect of the invention provides a kind of processing method taken pictures, including:It is in identification terminal and enters preview of taking pictures
During pattern, detect in present preview image and whether there is facial image;
If detect there are facial image in the present preview image, using phase type focal modes to the face
Image carries out focusing process;
Processing of taking pictures is carried out to the preview image after focusing process, to obtain corresponding photo.
It is described the facial image to be carried out pair using phase type focal modes in wherein a kind of optional embodiment
Jiao's processing, including:
The portrait area in the present preview image is obtained using auto-focusing algorithm;
Statistics obtains the Pixel Information in the portrait area;
According to the Pixel Information and phase type focus algorithm, control focusing motor, so that the focusing motor is by eyeglass
The focus point of the facial image is pushed to, to complete the focusing to the facial image.
In wherein a kind of optional embodiment, if described detect that there are face figure in the present preview image
Picture, then carry out focusing process using phase type focal modes to the facial image, including:
If detecting, there are facial image, the brightness of detection acquisition present preview image in the present preview image
Value;
When the brightness value is more than or equal to predetermined luminance threshold value, using phase type focal modes to the facial image into
Row focusing process;
Then the method further includes:
When the brightness value is less than the predetermined luminance threshold value, using contrast formula focal modes to the facial image into
Row focusing process.
In wherein a kind of optional embodiment, the preview image to after focusing process carries out processing of taking pictures, with
Obtaining corresponding photo includes:
Preview image after the focusing process is exposed, obtains exposure information;
White balance processing is carried out to the preview image after the focusing process according to the exposure information;
Facial image after dialogue Balance Treatment carries out picture signal processing and obtains photo.
Another aspect of the present invention provides a kind of terminal, including:
Face detection module, for when identification terminal takes pictures preview mode in entrance, detecting in present preview image
With the presence or absence of facial image;
Focus module, in detecting the present preview image in the face detection module there are facial image,
Focusing process is carried out to the facial image using phase type focal modes;
Photo obtains module, for carrying out processing of taking pictures to the preview image after focusing process, to obtain corresponding photo.
In wherein a kind of optional embodiment, the focusing module, is specifically used for:
The portrait area in the present preview image is obtained using auto-focusing algorithm;
Statistics obtains the Pixel Information in the portrait area;
According to the Pixel Information and phase type focus algorithm, control focusing motor, so that the focusing motor is by eyeglass
The focus point of the facial image is pushed to, to complete the focusing to the facial image.
In wherein a kind of optional embodiment, which further includes:Brightness detection module;
The brightness detection module, for detecting that there are people in the present preview image in the face detection module
During face image, detection obtains the brightness value of present preview image, and judges whether the brightness value is more than or equal to predetermined luminance threshold
Value;
Correspondingly, the focusing module is additionally operable to:
When the brightness detection module determines to be more than or equal to predetermined luminance threshold value in the brightness value, using phase type pair
Burnt pattern carries out focusing process to the facial image;Determine to be less than in the brightness value in the brightness detection module default bright
When spending threshold value, focusing process is carried out to the facial image using contrast formula focal modes.
In wherein a kind of optional embodiment, the photo obtain module include exposure module, white balance module and
Image signal processing blocks;
The exposure module, for being exposed to the preview image after the focusing process, obtains exposure information;
The white balance module, for being put down in vain to the preview image after the focusing process according to the exposure information
Weighing apparatus processing;
Described image signal processing module, carries out picture signal processing for the facial image after dialogue Balance Treatment and obtains
Obtain photo.
Another aspect of the invention provides a kind of terminal, including:Memory, the processor being connected with the memory,
And it is stored in the computer program that can be run on the memory and on the processor, it is characterised in that
The processor performs the processing method taken pictures described in any of the above-described when running the computer program.
Further aspect of the present invention additionally provides a kind of readable storage medium of terminal, including program, when it is transported in terminal
During row so that terminal performs the processing method taken pictures described in any of the above-described.
The present invention provides a kind of processing method taken pictures, terminal and terminal readable storage medium storing program for executing, by using whole in identification
End be in enter take pictures preview mode when, detect present preview image in whether there is facial image;If detect described current
There are facial image in preview image, then focusing process is carried out to the facial image using phase type focal modes;To focusing
Preview image after processing carries out processing of taking pictures, to obtain the technical solution of corresponding photo so that with existing utilization
Contrast formula focusing mode is compared, and on the basis of focus effects are ensured, is effectively reduced focusing time of taking pictures, is improved place of taking pictures
Efficiency is managed, optimizes experience of taking pictures.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is attached drawing needed in technology description to be briefly described, it should be apparent that, drawings in the following description are this hairs
Some bright embodiments, for those of ordinary skill in the art, without creative efforts, can be with root
Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of flow diagram for processing method taken pictures that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow diagram for the processing method taken pictures provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of flow diagram for processing method taken pictures that the embodiment of the present invention three provides;
Fig. 4 is a kind of structure diagram for terminal that the embodiment of the present invention four provides;
Fig. 5 is a kind of structure diagram for terminal that the embodiment of the present invention five provides;
Fig. 6 is a kind of structure diagram for terminal that the embodiment of the present invention six provides;
Fig. 7 is a kind of structure diagram for terminal that the embodiment of the present invention seven provides.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
Part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
All other embodiments obtained without creative efforts, belong to the scope of protection of the invention.
With the development of electronic technology, more and more people, which have, to carry out self-timer using terminal or shoots his Man's Demands.
For the demand of catering to, existing terminal gradually starts to support the focus function based on face.
In the prior art, the focusing of taking pictures to face is realized based on contrast formula focal modes, i.e., when terminal exists
Determine that calling contrast formula focuses module to obtain the contrast value of image of the face in each focus point there are during facial image,
And obtain the focus point of optimal facial image.
Furthermore, it is understood that the camera of terminal is opened and entered when taking pictures preview mode, detection and knowledge to facial image
The not required time is about 0.2 second to 0.3 second, and above-mentioned focusing institute is being carried out to facial image using contrast formula focal modes
The time needed is about 0.6 second to 1.0 seconds.
And it is well known that either self-timer still in other people take pictures, to grabbing for the facial expression of personage's moment
Bat is the frequent required content of taking pictures of user.And using existing terminal take pictures face when, terminate institute from starting to take pictures to taking pictures
The time needed would be about 0.8 to 1.3 second, and particularly relatively long the time required to its focusing, this will extremely be unfavorable for user
Experience of taking pictures, particularly to personage's moment facial expression candid photograph experience, therefore, how to reduce terminal shooting facial image
When the time it takes particularly focus the required time, become the technical problem of urgent need to resolve.
Based on above-mentioned technical problem, the present invention provides a kind of processing method taken pictures, terminal and terminal readable storage
Medium.
Fig. 1 is a kind of flow diagram for processing method taken pictures that the embodiment of the present invention one provides, should such as Fig. 1 depicted
The processing method taken pictures includes:
Step 101, identification terminal be in enter take pictures preview mode when, detect present preview image in whether there is people
Face image.
If step 102, detect there are facial image in present preview image, using phase type focal modes to face
Image carries out focusing process.
Step 103, carry out processing of taking pictures to the preview image after focusing process, to obtain corresponding photo.
It should be noted that the executive agent of the processing method provided by the invention taken pictures is terminal, its concretely by
It is arranged on being obtained the hardware configurations such as module by focusing module, face recognition module, photo and being formed in terminal.And terminal specifically may be used
To possess the intelligent mobile terminal of camera function, wherein mobile terminal includes mobile phone, tablet computer, palm multimedia equipment, stream
Media device, mobile internet device, wearable device or other kinds of equipment.
Specifically, in the step 101 of the present embodiment one, when user is intended to be taken pictures by mobile terminal, terminal
Camera will be started and enter preview mode of taking pictures, preview mode of taking pictures will show the current field of taking pictures of camera acquisition to user
Scape, and by terminal face detection module to being detected in present preview image with the presence or absence of facial image.It is therein to take pictures
Preview mode chicken leg can be the preview interface of taking pictures in the camera APP of terminal, or install third-party application in the terminal
The preview interface of taking pictures in preview interface of taking pictures, microblogging APP in preview interface of taking pictures in APP, such as wechat APP.
Certainly, which exists in some other scene for needing to obtain facial image, such as people
Facial image preview under face image identification scene, based on required facial image preview when paying scene human face feature extraction
Deng.
In addition, above-mentioned camera is concretely located at the preceding camera on front side of terminal, and/or, on rear side of terminal
Rear camera, the type of its camera can be the camera that single-lens camera is alternatively more camera lenses.
Then, in the step 102 of the present embodiment one, in detecting present preview image there are facial image when,
Terminal will focus facial image using phase type focal modes.
Specifically, the portrait area in present preview image is obtained using auto-focusing algorithm first;Statistics obtains
Pixel Information in portrait area;According to Pixel Information and phase type focus algorithm control focusing motor, so that focusing motor will
Eyeglass is pushed to the focus point of facial image and completes to focus.
Furthermore, it is understood that in a step 102, when terminal in detecting present preview image there are after facial image,
The portrait area where facial image will be determined using auto-focusing algorithm first, in general, definite portrait area will
It can be labeled in the form of the block diagrams such as square frame, round frame in the preview screen for taking pictures preview mode, which, which will be used as, needs
The target area of processing;Then, the Pixel Information in the portrait area in block diagram is counted, these Pixel Informations include but
It is not limited to confidence level that pixel number, pixel point coordinates, pixel gray value, pixels statistics solve etc..After again, according to obtaining
The Pixel Information of the portrait area obtained, calls phase type focus algorithm, to generate the tune for being used for controlling motor of focusing to focus
Jiao's instruction, so that eyeglass is pushed to the corresponding focus point of facial image by focusing motor according to focusing instruction, to complete to focus.
Wherein it should be noted that phase type focusing can be described as phase-detection auto-focusing again, its principle is:Photosensitive member
Some masking pixels are reserved on part, these masking pixels are specifically used to carry out phase-detection, and by between pixel
Distance and its change determine the deviant of focusing, and so as to fulfill accurate focusing, phase-detection instruction detection therein deviates
Amount, and provide the signal of " focus is accurate " or " focus inaccurate ", terminal is according to the crest location in the signal waveform of the signal
Determine offset direction.
Specific in the present embodiment, in the Pixel Information of the portrait area according to acquisition, phase type focus algorithm is called, with
Generation is used for the focusing instruction for controlling focusing motor to focus, so that focusing eyeglass is pushed to phase by motor according to focusing instruction
The focus point answered simultaneously completes focusing and can be further subdivided into the following steps:First, the Pixel Information obtained according to statistics, really
Determine the opposite paired pixel in left and right, and left and right sides correlation situation is obtained by way of comparison, it is accurately right to determine
Focus, generation focusing instruction;Then, motor of focusing is instructed according to the focusing is disposably pushed to corresponding position by focusing eyeglass
Put, to complete to focus.Then, cocoa carries out processing of taking pictures to the preview image after focusing process, to obtain corresponding photo
Focusing mode that what the embodiment of the present application one was provided take pictures, by after facial image is detected, utilizing phase
Formula focus so that focusing motor can will focusing eyeglass disposably be pushed to corresponding focus point, its focusing time 0.2 to
0.3 second, so that being reduced to 0.4 to 0.6 second from starting to take pictures to the time needed for terminating of taking pictures, it can effectively avoid existing skill
The problem of focusing time is grown caused by multiple promotion focusing eyeglass in art could obtain focus point, and efficiency of taking pictures is low.Meanwhile
Have greatly improved also for the experience of taking pictures for capturing personage's moment facial expression.
In order to further obtain preferably focusing experience, on the basis of the technical solution that above-described embodiment one is provided,
Fig. 2 is a kind of flow diagram for the processing method taken pictures provided by Embodiment 2 of the present invention.
As shown in Fig. 2, the processing method taken pictures includes:
Step 201, identification terminal be in enter take pictures preview mode when, detect present preview image in whether there is people
Face image.
If step 202, detect in present preview image there are facial image, detect and obtain the bright of present preview image
Angle value.
Step 203, judge whether brightness value is more than or equal to predetermined luminance threshold value.
If so, then perform step 204;If it is not, then perform step 205.
Step 204, using phase type focal modes to facial image carry out focusing process.
Perform step 206.
Step 205, using contrast formula focal modes to facial image carry out focusing process.
Perform step 206.
Step 206, carry out processing of taking pictures to the preview image after focusing process, to obtain corresponding photo.
Specifically, in the step 201 of the present embodiment two, with embodiment one similarly when user is intended to by mobile whole
When end is taken pictures, terminal will start camera and enter preview mode of taking pictures, and preview mode of taking pictures will be shown to user to image
The current scene of taking pictures that head obtains.Preview mode therein of taking pictures can be the preview of taking pictures in the camera APP of terminal, or pacify
Preview of taking pictures in dress third-party application APP in the terminal, as taking pictures in the preview of taking pictures in wechat APP, microblogging APP is pre-
Look at.Certainly, which exists in some other scene for needing to obtain facial image, such as face figure
As the facial image preview under identification scene, based on required facial image preview etc. when paying scene human face feature extraction.
In addition, above-mentioned camera is concretely located at the preceding camera on front side of terminal, and/or, the rear camera on rear side of terminal,
The type of its camera can be the camera that single-lens camera is alternatively more camera lenses.
Then, what is different from the first embodiment is that the present embodiment two step 202 in 203, currently take pictures when detecting
In scene there are facial image in the case of, terminal will be detected the brightness value for scene of currently taking pictures, will detect obtain
Brightness value is compared with default luminance threshold, and according to comparison result select this focus used by focal modes.
Furthermore, it is understood that for as phase type focal modes, such as embodiment one, due to the definite needs of its focus point
The Pixel Information that statistics obtains is fixed against, therefore, if present terminal is under more dim environment, it counts acquired picture
The accuracy of prime information will receive influence, this will extend the focusing time of phase type focal modes to a certain extent, because
This, in order to avoid such situation occurs, on the basis of embodiment one, the embodiment of the present invention two also add to currently taking pictures
The step of detection and judgement of scene illumination values.
The present embodiment two is on the basis of embodiment one, by using such mode, so that determining currently in advance
Look at when being greater than or equal to default luminance threshold there are facial image and brightness value in image, terminal uses phase type focal modes
Focusing process is carried out to facial image, otherwise, will be focused using existing contrast formula focal modes to facial image, so that
It ensure that no matter current scene is under dim bad border to be under bright light environments, the focusing of the focusing of taking pictures to facial image
Time is minimum, focusing efficiency highest of taking pictures.
In addition, on the basis of each technical solution that above-described embodiment one and embodiment two provide, Fig. 3 is implemented for the present invention
A kind of flow diagram for processing method taken pictures that example three provides.
As shown in figure 3, the photographic method includes:
Step 301, identification terminal be in enter take pictures preview mode when, detect present preview image in whether there is people
Face image.
If step 302, detect in present preview image there are facial image, detect and obtain the bright of present preview image
Angle value.
Step 303, judge whether brightness value is more than or equal to predetermined luminance threshold value.
If so, then perform step 304;If it is not, then perform step 305.
Step 304, using phase type focal modes to facial image carry out focusing process.
Perform step 306.
Step 305, using contrast formula focal modes to facial image carry out focusing process.
Perform step 306.
Step 306, be exposed the preview image after focusing process, obtains exposure information.
Step 307, according to exposure information to after focusing process preview image carry out white balance processing.
Facial image after step 308, dialogue Balance Treatment carries out picture signal processing and obtains photo.
It should be noted that in the technical solution of the present embodiment three, there are face figure in current preview pattern is detected
As in the case of, it is necessary to successively perform detection obtain brightness value the step of and to being exposed place to defocused facial image
Reason.
Specifically, in the present embodiment three, with embodiment one and embodiment two similarly, when user's movement to be passed through
When terminal is taken pictures, terminal will start camera and enter preview mode of taking pictures, and preview mode of taking pictures will be shown to user to be taken the photograph
The current scene of taking pictures obtained as head.Preview mode therein of taking pictures can be the preview of taking pictures in the camera APP of terminal, or
Preview of taking pictures in the third-party application APP of installation in the terminal, such as taking pictures in the preview of taking pictures in wechat APP, microblogging APP
Preview etc..Certainly, which exists in some other scene for needing to obtain facial image, such as face
Facial image preview under image recognition scene, based on required facial image preview when paying scene human face feature extraction
Deng.In addition, above-mentioned camera is concretely located at the preceding camera on front side of terminal, and/or, the rear shooting on rear side of terminal
Head, the type of its camera can be the camera that single-lens camera is alternatively more camera lenses.Then, terminal will be to currently taking pictures
The brightness value of scene is detected, and the brightness value for detecting acquisition is compared with default luminance threshold, and is tied according to comparing
Fruit selects focal modes used by this focusing.
Unlike embodiment one and embodiment two, the present embodiment three is further included to the face in scene of currently taking pictures
The step of image is exposed, acquisition exposure information.
Specifically, in order to obtain the photo of high quality, in the case of facial image is detected, can to facial image into
Row exposure-processed, and obtain the exposure information including time for exposure and exposure intensity;Wherein, the time for exposure is concretely
10 milliseconds, certain time for exposure and exposure intensity can voluntarily be set by those skilled in the art according to actual conditions.Correspondingly,
After completing to the focusing of facial image, using exposure technique, and according to exposure information to completing to defocused face figure
As carrying out white balance processing, so as to more meet Natural color to defocused facial image, finally, picture signal treatment technology pair is utilized
Facial image after the white balance processing of acquisition is handled and exports final photo, and wherein picture signal treatment technology includes
But it is not limited to noise reduction process.
The processing method taken pictures that the embodiment of the present invention three provides, on the basis of embodiment one and embodiment two, including
There is the step of exposure, white balance and picture signal are handled, so that the quality of the photo of output significantly improves.
Present invention also offers a kind of terminal, Fig. 4 is a kind of structure diagram for terminal that the embodiment of the present invention four provides.
As shown in figure 4, the terminal includes:
Face detection module 10, for when identification terminal takes pictures preview mode in entrance, detecting present preview image
In whether there is facial image;
Focus module 20, in detecting present preview image in face detection module there are facial image, using phase
Position formula focal modes carry out focusing process to facial image.
Photo obtains module 30, for carrying out processing of taking pictures to the preview image after processing, to obtain corresponding photo.
The terminal specifically may be provided in terminal, and terminal concretely possesses the intelligent mobile terminal of camera function, wherein
Mobile terminal includes mobile phone, tablet computer, palm multimedia equipment, stream media equipment, mobile internet device, wearable device
Or other kinds of equipment.
Specifically, when user is intended to be taken pictures by mobile terminal, terminal will start camera and enter take pictures it is pre-
Look at pattern, preview mode of taking pictures will show the current scene of taking pictures that camera obtains to user.Preview mode therein of taking pictures can
For the preview of taking pictures in the camera APP of terminal, or the preview of taking pictures in the third-party application APP of installation in the terminal, such as
Preview of taking pictures in preview of taking pictures, microblogging APP in wechat APP etc..Certainly, which exists in some other
Need the scene obtained to facial image, as facial image identify scene under facial image preview, based on pay scene
Required facial image preview etc. during human face feature extraction.In addition, above-mentioned camera is concretely located on front side of terminal
Preceding camera, and/or, the rear camera on rear side of terminal, the type of its camera can be that single-lens camera is alternatively
The camera of more camera lenses.Face detection module 10 can use face recognition algorithms or Face datection algorithm, to current scene of taking pictures
In be identified and detect with the presence or absence of facial image.
Then, focusing module 20 will focus facial image using phase type focal modes.Specifically, it is sharp first
The portrait area in current scene of taking pictures is obtained with auto-focusing algorithm;Statistics obtains the Pixel Information in portrait area;According to
Pixel Information and phase type focus algorithm control focusing motor, so that eyeglass is pushed to focus point and completion pair by focusing motor
It is burnt.Finally, module 30 is obtained by photo the preview image after focusing process take pictures and processing and obtain photo.
Furthermore, it is understood that focusing module 20 is specifically used for:First facial image place is determined using auto-focusing algorithm
Portrait area, in general, definite portrait area will be labeled in preview mould of taking pictures in the form of the block diagrams such as square frame, round frame
In the preview screen of formula, which will be used as target area to be treated;Then, in the portrait area in block diagram
Pixel Information is counted, these Pixel Informations include but is not limited to pixel number, pixel point coordinates, pixel gray value,
Confidence level that pixels statistics solve etc..After again, according to the Pixel Information of the portrait area of acquisition, phase type focusing is called to calculate
Method, is instructed with generating the focusing for being used for controlling focusing motor to focus, so that focusing motor pushes away eyeglass according to focusing instruction
Send to corresponding focus point and complete to focus.
Wherein it should be noted that phase type focusing can be described as phase-detection auto-focusing again, its principle is:Photosensitive member
Some masking pixels are reserved on part, these masking pixels are specifically used to carry out phase-detection, and by between pixel
Distance and its change determine the deviant of focusing, and so as to fulfill accurate focusing, phase-detection instruction detection therein deviates
Amount, and provide the signal of " focus is accurate " or " focus inaccurate ", focusing module 20 is according to the ripple in the signal waveform of the signal
Peak position determines offset direction.
Specific in the present embodiment, focusing module 20 is in the Pixel Information of the portrait area according to acquisition, calling phase type
Focus algorithm, is instructed with generating the focusing for being used for controlling focusing motor to focus, so that focusing motor will according to focusing instruction
Focusing eyeglass, which pushes to corresponding focus point and completes focusing, can be further subdivided into the following steps:First, according to statistics
The Pixel Information of acquisition, determines the opposite paired pixel in left and right, and left and right sides correlation feelings are obtained by way of comparison
Condition, to determine accurate focus point, generation focusing instruction;Then, motor of focusing will focus eyeglass once according to focusing instruction
Property is pushed to corresponding position, to complete to focus.
The terminal that the embodiment of the present application one is provided, by after facial image is detected, being focused using phase type, from
And cause focusing motor can will focusing eyeglass disposably be pushed to corresponding focus point, its focusing time at 0.2 to 0.3 second, from
And to be reduced to 0.4 to 0.6 second from starting to take pictures to the time needed for terminating of taking pictures, it can effectively avoid of the prior art more
The problem of focusing time is grown caused by secondary promotion focusing eyeglass could obtain focus point, and efficiency of taking pictures is low.Meanwhile also for grabbing
The experience of taking pictures for clapping personage's moment facial expression has greatly improved.
On the basis of structure shown in Fig. 4, Fig. 5 is a kind of structure diagram for terminal that the embodiment of the present invention five provides.
As shown in figure 5, the terminal includes:Face detection module 10, focusing module 20, photo obtain module 30 and brightness
Detection module 40.
Wherein, face detection module 10, for when identification terminal takes pictures preview mode in entrance, detecting current preview
It whether there is facial image in image;
Focus module 20, in detecting present preview image in face detection module there are facial image, using phase
Position formula focal modes or contrast formula focal modes carry out focusing process to facial image.
Photo obtains module 30, for carrying out processing of taking pictures to the preview image after focusing process, to obtain corresponding photograph
Piece.
Brightness detection module 40, for detecting that there are facial image in present preview image in face detection module 10
When, detection obtains the brightness value of present preview image, and judges whether brightness value is more than or equal to predetermined luminance threshold value;
Correspondingly, focusing module 20 is additionally operable to:
In the case where brightness detection module 40 determines that the brightness value of current scene of taking pictures is more than or equal to predetermined luminance threshold value,
Focusing process is carried out to facial image using phase type focal modes;Current the bright of scene of taking pictures is determined in brightness detection module 40
Focusing process is carried out to facial image using contrast formula focal modes when angle value is less than the situation of predetermined luminance threshold value.
The step of terminal in the present embodiment can be used for performing embodiment of the method shown in above-mentioned Fig. 2, its realization principle is similar,
Details are not described herein.
The present embodiment five is on the basis of example IV, by adopting such structure, so that determining current clap
During according to being greater than or equal to default luminance threshold there are facial image and brightness value in scene, terminal uses phase type focal modes
Focus to facial image, otherwise, will be focused using existing contrast formula focal modes to facial image, so as to ensure
No matter current scene, which is under dim bad border, is under bright light environments, the focusing time of the focusing of taking pictures to facial image
It is minimum, focusing efficiency highest of taking pictures.
On the basis of structure shown in Fig. 4 or Fig. 5, Fig. 6 is that a kind of structure for terminal that the embodiment of the present invention six provides is shown
It is intended to.
As shown in fig. 6, the terminal includes:Face detection module 10, focusing module 20, photo obtain module;Wherein, photo
Obtaining module includes exposure module 31, white balance module 32 and image signal processing blocks 33;
Wherein, face detection module 10, for when identification terminal takes pictures preview mode in entrance, detecting current preview
It whether there is facial image picture in image;
Focus module 20, in detecting present preview image in face detection module there are facial image, using phase
Position formula focal modes carry out focusing process to facial image.
Exposure module 31, for being exposed to the preview image after focusing process, obtains exposure information;
White balance module 32, for carrying out white balance processing to the preview image after focusing process according to exposure information;
Image signal processing blocks 33, carry out picture signal processing for the facial image after dialogue Balance Treatment and obtain
Photo.
The step of terminal in the present embodiment can be used for performing above-mentioned Fig. 3 embodiments of the method, its realization principle is similar, herein
Repeat no more.
Specifically, in order to obtain the photo of high quality, in the case of facial image is detected, can to facial image into
Row exposure-processed, and obtain the exposure information including time for exposure and exposure intensity;Wherein, the time for exposure is concretely
10 milliseconds, certain time for exposure and exposure intensity can voluntarily be set by those skilled in the art according to actual conditions.Correspondingly,
After completing to the focusing of facial image, completion will also carry out at white balance defocused facial image according to exposure information
Reason, so as to more meet Natural color to defocused facial image, finally, using picture signal treatment technology to the white balance of acquisition at
Facial image after reason is handled and exports final photo, and wherein picture signal treatment technology includes but not limited at noise reduction
Reason.
The terminal that the embodiment of the present invention six provides, on the basis of example IV and embodiment five, includes exposure, Bai Ping
The step of weighing apparatus and picture signal processing, so that the quality of the photo of output significantly improves.
Fig. 7 is a kind of structure diagram for terminal that the embodiment of the present invention seven provides.As shown in fig. 7, the terminal includes:Deposit
Reservoir 41, processor 42 and the computer program that can be run on memory 41 and on processor 42 is stored in, processor 42 is transported
The method that any of the above-described embodiment is performed during row computer program.
The present invention also provides a kind of terminal readable storage medium storing program for executing, including program, when it is running in terminal so that terminal
The method for performing any of the above-described embodiment.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that:It still may be used
To modify to the technical solution described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic;
And these modifications or replacement, the essence of appropriate technical solution is departed from the scope of various embodiments of the present invention technical solution.
Claims (10)
- A kind of 1. processing method taken pictures, it is characterised in that including:When identification terminal takes pictures preview mode in entrance, detect in present preview image and whether there is facial image;If detect there are facial image in the present preview image, using phase type focal modes to the facial image Carry out focusing process;Processing of taking pictures is carried out to the preview image after focusing process, to obtain corresponding photo.
- 2. the processing method according to claim 1 taken pictures, it is characterised in that described to use phase type focal modes to institute State facial image and carry out focusing process, including:The portrait area in the present preview image is obtained using auto-focusing algorithm;Statistics obtains the Pixel Information in the portrait area;According to the Pixel Information and phase type focus algorithm, control focusing motor, so that the focusing motor promotes eyeglass To the focus point of the facial image, to complete the focusing to the facial image.
- 3. the processing method according to claim 1 taken pictures, it is characterised in that if described detect the current preview figure There are facial image as in, then focusing process is carried out to the facial image using phase type focal modes, including:If detecting, there are facial image, the brightness value of detection acquisition present preview image in the present preview image;When the brightness value is more than or equal to predetermined luminance threshold value, the facial image is carried out using phase type focal modes pair Jiao's processing;Then the method further includes:When the brightness value is less than the predetermined luminance threshold value, the facial image is carried out using contrast formula focal modes pair Jiao's processing.
- 4. the processing method taken pictures according to claim 1-3 any one of them, it is characterised in that it is described to focusing process after Preview image carries out processing of taking pictures, and is included with obtaining corresponding photo:Preview image after the focusing process is exposed, obtains exposure information;White balance processing is carried out to the preview image after the focusing process according to the exposure information;Facial image after dialogue Balance Treatment carries out picture signal processing and obtains photo.
- A kind of 5. terminal, it is characterised in that including:Face detection module, for identification terminal be in enter take pictures preview mode when, detect present preview image in whether There are facial image;Focusing module, for, there are facial image, being used in detecting the present preview image in the face detection module Phase type focal modes carry out focusing process to the facial image;Photo obtains module, for carrying out processing of taking pictures to the preview image after processing, to obtain corresponding photo.
- 6. terminal according to claim 5, it is characterised in that the focusing module, is specifically used for:The portrait area in the present preview image is obtained using auto-focusing algorithm;Statistics obtains the Pixel Information in the portrait area;According to the Pixel Information and phase type focus algorithm, control focusing motor, so that the focusing motor promotes eyeglass To the focus point of the facial image, to complete the focusing to the facial image.
- 7. terminal according to claim 5, it is characterised in that further include:Brightness detection module;The brightness detection module, for there are face figure in detecting the present preview image in the face detection module During picture, detection obtains the brightness value of present preview image, and judges whether the brightness value is more than or equal to predetermined luminance threshold value;Correspondingly, the focusing module is additionally operable to:When the brightness detection module determines to be more than or equal to predetermined luminance threshold value in the brightness value, using phase type focusing mould Formula carries out focusing process to the facial image;Determine to be less than predetermined luminance threshold in the brightness value in the brightness detection module During value, focusing process is carried out to the facial image using contrast formula focal modes.
- 8. according to claim 5-7 any one of them terminals, it is characterised in that the photo, which obtains module, includes exposure mould Block, white balance module and image signal processing blocks;The exposure module, for being exposed to the preview image after the focusing process, obtains exposure information;The white balance module, for being carried out according to the exposure information to the preview image after the focusing process at white balance Reason;Described image signal processing module, carries out picture signal processing for the facial image after dialogue Balance Treatment and obtains photograph Piece.
- A kind of 9. terminal, it is characterised in that including:Memory, the processor being connected with the memory, and it is stored in described deposit On reservoir and the computer program that can run on the processor, it is characterised in thatPerform claim requires 1~4 any one of them method when the processor runs the computer program.
- 10. a kind of terminal readable storage medium storing program for executing, it is characterised in that including program, when it is running in terminal so that terminal is held Row Claims 1 to 4 any one of them method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711451053.5A CN107911618A (en) | 2017-12-27 | 2017-12-27 | Processing method, terminal and the terminal readable storage medium storing program for executing taken pictures |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711451053.5A CN107911618A (en) | 2017-12-27 | 2017-12-27 | Processing method, terminal and the terminal readable storage medium storing program for executing taken pictures |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107911618A true CN107911618A (en) | 2018-04-13 |
Family
ID=61871623
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711451053.5A Pending CN107911618A (en) | 2017-12-27 | 2017-12-27 | Processing method, terminal and the terminal readable storage medium storing program for executing taken pictures |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107911618A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110475071A (en) * | 2019-09-19 | 2019-11-19 | 厦门美图之家科技有限公司 | Phase focusing method, device, electronic equipment and machine readable storage medium |
CN113766125A (en) * | 2019-09-29 | 2021-12-07 | Oppo广东移动通信有限公司 | Focusing method and device, electronic equipment and computer readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090059029A1 (en) * | 2007-08-30 | 2009-03-05 | Seiko Epson Corporation | Image Processing Device, Image Processing Program, Image Processing System, and Image Processing Method |
CN104811620A (en) * | 2015-04-28 | 2015-07-29 | 上海与德通讯技术有限公司 | Focusing method and focusing system |
CN105007425A (en) * | 2015-07-23 | 2015-10-28 | 广东欧珀移动通信有限公司 | Contrast type focusing method and mobile terminal |
CN107257433A (en) * | 2017-06-16 | 2017-10-17 | 广东欧珀移动通信有限公司 | Focusing method, device, terminal and computer-readable recording medium |
-
2017
- 2017-12-27 CN CN201711451053.5A patent/CN107911618A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090059029A1 (en) * | 2007-08-30 | 2009-03-05 | Seiko Epson Corporation | Image Processing Device, Image Processing Program, Image Processing System, and Image Processing Method |
CN104811620A (en) * | 2015-04-28 | 2015-07-29 | 上海与德通讯技术有限公司 | Focusing method and focusing system |
CN105007425A (en) * | 2015-07-23 | 2015-10-28 | 广东欧珀移动通信有限公司 | Contrast type focusing method and mobile terminal |
CN107257433A (en) * | 2017-06-16 | 2017-10-17 | 广东欧珀移动通信有限公司 | Focusing method, device, terminal and computer-readable recording medium |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110475071A (en) * | 2019-09-19 | 2019-11-19 | 厦门美图之家科技有限公司 | Phase focusing method, device, electronic equipment and machine readable storage medium |
CN110475071B (en) * | 2019-09-19 | 2021-06-04 | 厦门美图之家科技有限公司 | Phase focusing method, phase focusing device, electronic equipment and machine-readable storage medium |
CN113766125A (en) * | 2019-09-29 | 2021-12-07 | Oppo广东移动通信有限公司 | Focusing method and device, electronic equipment and computer readable storage medium |
CN113766125B (en) * | 2019-09-29 | 2022-10-25 | Oppo广东移动通信有限公司 | Focusing method and device, electronic equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111028189B (en) | Image processing method, device, storage medium and electronic equipment | |
CN108322646B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
JP4759095B2 (en) | Face tracking in camera processors | |
CN110149482A (en) | Focusing method, device, electronic equipment and computer readable storage medium | |
CN113766125B (en) | Focusing method and device, electronic equipment and computer readable storage medium | |
CN103888683A (en) | Mobile terminal and shooting method thereof | |
KR20100055946A (en) | Method and apparatus for generating thumbnail of moving picture | |
US20130010138A1 (en) | Digital Camera with an Image Processor | |
CN111246093B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN111654643B (en) | Exposure parameter determination method and device, unmanned aerial vehicle and computer readable storage medium | |
CN108513074B (en) | Self-photographing control method and device and electronic equipment | |
CN110717871A (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN108093170B (en) | User photographing method, device and equipment | |
CN108052883B (en) | User photographing method, device and equipment | |
CN113298735A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN106791451A (en) | A kind of photographic method of intelligent terminal | |
CN107911618A (en) | Processing method, terminal and the terminal readable storage medium storing program for executing taken pictures | |
CN116320771A (en) | Shooting method and electronic equipment | |
CN108259767B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN110891145B (en) | Method for obtaining image by photographing and electronic equipment | |
CN112911146A (en) | Intelligent dimming method based on human face | |
CN116506724A (en) | Photographing auxiliary method, photographing auxiliary device, medium and terminal | |
CN108495038B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN109120856B (en) | Camera shooting method and device | |
CN108520036B (en) | Image selection method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180413 |
|
RJ01 | Rejection of invention patent application after publication |