A kind of method and apparatus of Lookup protocol screening-mode
Technical field
The present invention relates to technical field of electronic products, particularly relate to a kind of method and apparatus of Lookup protocol screening-mode.
Background technology
Along with popularizing of the camera function in smart mobile phone, use mobile phone carries out taking becomes one of conventional function of mobile phone.
Due to most of user be unfamiliar with which kind of scene under need to use which kind of screening-mode of mobile phone, make shooting photo effect out undesirable, make troubles to the use of user.
Summary of the invention
Embodiments of the invention provide a kind of method and apparatus of Lookup protocol screening-mode, achieve the Lookup protocol of screening-mode, improve shooting effect.
For achieving the above object, embodiments of the invention adopt following technical scheme:
On the one hand, the invention provides a kind of method of Lookup protocol screening-mode, comprising:
Open the Face datection function of capture apparatus, and obtain the graphical information identifying everyone face region in the preview interface of described capture apparatus, described graphical information is used for identifying the regional extent that each face occupies;
The first ratio value of maximum face region area and described preview interface area in described preview interface is calculated according to the physical size of described graphical information, described preview interface;
When described first ratio value is more than or equal to first threshold, the screening-mode of described capture apparatus is set to character motif pattern, and described first threshold is that described capture apparatus individual human face region area in the photo of shooting character motif occupies the percentage of the photo gross area;
When described first ratio value is less than described first threshold, the screening-mode of described capture apparatus is set to non-character motif pattern.
In the first possible implementation of first aspect, when described graphical information is rectangle frame information, when described rectangle frame information comprises rectangle frame wide and high, the first ratio value that the described physical size according to described graphical information, described preview interface calculates maximum face area and described preview interface area in described preview interface is specially:
According to R
face=Max (X
face1* Y
face1, X
face2* Y
face2..., X
facen* Y
facen)/(X
pic* Y
pic) calculate the first ratio value of maximum face area and described preview interface area in described preview interface, wherein R
facefor the first ratio value of maximum face area in described preview interface and described preview interface area, (X
face1, Y
face1), (X
face2, Y
face2) ..., (X
facen, Y
facen) be respectively the wide and high of the rectangle frame of n the different face of mark got in described preview interface, (X
pic, Y
pic) wide and high for described preview interface.
In conjunction with the first possible implementation of first aspect or first aspect, in the implementation that the second is possible, after the described screening-mode by described capture apparatus is set to character motif pattern, described method also comprises:
The current distance of the person of being taken that in described preview interface, maximum face is corresponding and described capture apparatus is calculated according to described first ratio value, preset rules distance, preset ratio value, described preset rules distance is for when whole the face of the person of being taken is included in photo, the minimum distance of the described person of being taken and described capture apparatus, described preset ratio value is when described capture apparatus is described preset rules distance with the distance of the person of being taken, the maximum face region area of the person of being taken and the ratio value of described preview interface area;
Judge whether described current distance is greater than preset security distance, described preset security distance for when the intensity of illumination of the photoflash lamp of described capture apparatus be human eye bear maximum safe intensity of illumination time, the safe distance of described capture apparatus and the person of being taken;
When described current distance is not more than described preset security distance, the operating state of the photoflash lamp of described capture apparatus is set to close.
In conjunction with the implementation that the second of first aspect is possible, in the implementation that the third is possible, describedly calculate the person of being taken that in described preview interface, maximum face is corresponding be specially with the current distance of described capture apparatus according to described first ratio value, preset rules distance, preset ratio value:
According to
Calculate the current distance of the person of being taken that in described preview interface, maximum face is corresponding and described capture apparatus, wherein D
currentthe be taken person corresponding for maximum face in described preview interface and the current distance of described capture apparatus, R
maxfor described preset ratio value, R
facefor described first ratio value, D
nearestfor described preset rules distance.
In conjunction with the implementation that the second of first aspect is possible, in the 4th kind of possible implementation, described method also comprises:
When described current distance is greater than described preset security distance, the operating state of described photoflash lamp is set according to the parameter request of the character motif pattern of described capture apparatus.
Second aspect, the invention provides a kind of device of Lookup protocol screening-mode, comprising:
Acquiring unit, for opening the Face datection function of capture apparatus, and obtains in the preview interface of described capture apparatus, identifies the graphical information in everyone face region, and described graphical information is used for identifying the regional extent that each face occupies;
First processing unit, for calculating the first ratio value of maximum face region area and described preview interface area in described preview interface according to the physical size of described graphical information, described preview interface;
Setting unit, for when described first ratio value is more than or equal to first threshold, the screening-mode of described capture apparatus is set to character motif pattern, and described first threshold is that described capture apparatus individual human face region area in the photo of shooting character motif occupies the percentage of the photo gross area;
Described setting unit, also for when described first ratio value is less than described first threshold, is set to non-character motif pattern by the screening-mode of described capture apparatus.
In the first possible implementation of second aspect, when described graphical information is rectangle frame information, when described rectangle frame information comprises rectangle frame wide and high,
Described first processing unit, specifically for according to R
face=Max (X
face1* Y
face1, X
face2* Y
face2..., X
facen* Y
facen)/(X
pic* Y
pic) calculate the first ratio value of maximum face area and described preview interface area in described preview interface, wherein R
facefor the first ratio value of maximum face area in described preview interface and described preview interface area, (X
face1, Y
face1), (X
face2, Y
face2) ..., (X
facen, Y
facen) be respectively the wide and high of the rectangle frame of n the different face of mark got in described preview interface, (X
pic, Y
pic) wide and high for described preview interface.
In conjunction with the first possible implementation of second aspect or second aspect, in the implementation that the second is possible, described device also comprises:
Second processing unit, for calculating the current distance of the person of being taken that in described preview interface, maximum face is corresponding and described capture apparatus according to described first ratio value, preset rules distance, preset ratio value, described preset rules distance is for when whole the face of the person of being taken is included in photo, the minimum distance of the described person of being taken and described capture apparatus, described preset ratio value is when described capture apparatus is described preset rules distance with the distance of the person of being taken, the maximum face region area of the person of being taken and the ratio value of described preview interface area;
3rd processing unit, for judging whether described current distance is greater than preset security distance, described preset security distance for when the intensity of illumination of the photoflash lamp of described capture apparatus be human eye bear maximum safe intensity of illumination time, the safe distance of described capture apparatus and the person of being taken;
Described setting unit, also for when described current distance is not more than described preset security distance, is set to the operating state of the photoflash lamp of described capture apparatus close.
In conjunction with the implementation that the second of second aspect is possible, in the implementation that the third is possible, described second processing unit, specifically for basis
Calculate the current distance of the person of being taken that in described preview interface, maximum face is corresponding and described capture apparatus, wherein D
currentthe be taken person corresponding for maximum face in described preview interface and the current distance of described capture apparatus, R
maxfor described preset ratio value, R
facefor described first ratio value, D
nearestfor described preset rules distance.
In conjunction with the implementation that the second of second aspect is possible, in the 4th kind of possible implementation, described setting unit, also for when described current distance is greater than described preset security distance, the operating state of described photoflash lamp is set according to the parameter request of the character motif pattern of described capture apparatus.
The method and apparatus of a kind of Lookup protocol screening-mode that the embodiment of the present invention provides, open the Face datection function of capture apparatus, and obtain the graphical information identifying everyone face region in the preview interface of described capture apparatus, then according to described graphical information, the physical size of described preview interface calculates the first ratio value of maximum face region area and described preview interface area in described preview interface, when described first ratio value is more than or equal to first threshold, the screening-mode of described capture apparatus is set to character motif pattern, when described first ratio value is less than described first threshold, the screening-mode of described capture apparatus is set to non-character motif pattern.
The embodiment of the present invention solve in prior art due to most of user be unfamiliar with which kind of scene under need to use which kind of screening-mode of mobile phone, make shooting photo effect out undesirable, to the problem that the use of user is made troubles, achieve the Lookup protocol of screening-mode, improve shooting effect.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, be briefly described to the accompanying drawing used required in the embodiment of the present invention below, apparently, accompanying drawing described is below only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The flow chart of the method for a kind of Lookup protocol screening-mode that Fig. 1 provides for the embodiment of the present invention 1;
The flow chart of the method for the another kind of Lookup protocol screening-mode that Fig. 2 provides for the embodiment of the present invention 1;
The structure chart of the device of a kind of Lookup protocol screening-mode that Fig. 3 provides for the embodiment of the present invention 2;
The structure chart of the device of the another kind of Lookup protocol screening-mode that Fig. 4 provides for the embodiment of the present invention 2;
The structure chart of the device of a kind of Lookup protocol screening-mode that Fig. 5 provides for the embodiment of the present invention 3.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The capture apparatus that the embodiment of the present invention relates to can be the camera in smart mobile phone, can be also the digital camera having carried operating system, not limit in the present invention.As shown in Figure 1, the embodiment of the present invention provides a kind of method of Lookup protocol screening-mode, and carry out to utilize the camera in smart mobile phone being shot for example, described method specifically comprises the steps:
101, open the Face datection function of capture apparatus, and obtain the graphical information identifying everyone face region in the preview interface of described capture apparatus, described graphical information is used for identifying the regional extent that each face occupies.
When user opens the camera in described smart mobile phone, when taking, the Face datection function of camera is opened automatically, carries out Face datection to the image in the preview interface of described mobile telephone display.
Human face detection tech is the feature according to face, will appear at the recognition of face of preview interface out, and then mark out.In the prior art, human face detection tech is comparative maturity, such as, Face datection based on template matches, the Face datection based on face shaping, the Face datection based on the Face datection of neural net, feature based, the Face datection based on the colour of skin etc., do not limit in embodiments of the present invention and use which kind of human face detection tech, as long as the human face region in preview interface can be identified out.In existing human face detection tech, figure is usually utilized to identify out by human face region, such as rectangle frame, ellipse, circle, square etc.
The graphical information of each human face region of mark is obtained in the preview interface of mobile telephone display, several human face region is had just to have several graphical information, the figure wherein identifying human face region can be identical, also can be different, as long as the regional extent that each face occupies can be identified out.
In addition, before the graphical information obtaining mark human face region, do not limit described camera and whether focus successfully.Because user may be there is when using camera shooting; do not focus and successfully just take; therefore in order to ensure the eyes protecting the person of being taken to greatest extent; acquisition in this step identifies the graphical information of human face region and whether successfully not to rely on focusing, but whether depend on Face datection successful.
102, the first ratio value of maximum face region area and described preview interface area in described preview interface is calculated according to the physical size of described graphical information, described preview interface.
According to the graphical information got, obtain the area of each human face region, wherein the ratio of the area of the preview interface of maximum face region area and described mobile telephone display is described first ratio value.
103, when described first ratio value is more than or equal to first threshold, the screening-mode of described capture apparatus is set to character motif pattern, and described first threshold is that described capture apparatus individual human face region area in the photo of shooting character motif occupies the percentage of the photo gross area.
Wherein, described first threshold be by camera when taking the photo of character motif, individual human face region area in photo occupies the percentage of the photo gross area, and the statistical value through repeatedly calculating, camera in different smart mobile phones, corresponding different first thresholds, such as, in VIVA mobile phone, described first threshold is 0.07.
104, when described first ratio value is less than described first threshold, the screening-mode of described capture apparatus is set to non-character motif pattern.
Because the person of being taken is far away with the distance of described camera, the area ratio that the human face region area of the person of being taken occupies in described preview interface is less, therefore when described first ratio value is less than described first threshold, the ratio value of maximum face region area and described preview interface area in described preview interface is described, be less than the ration statistics value of described camera individual human face region area and photo area in the photo of shooting character motif, so corresponding with described first ratio value described face and the distance of camera are greater than camera corresponding to described first threshold when taking the photo of character motif, the ultimate range of personage and described camera, now then think that user will take personage, so the screening-mode of described capture apparatus is set to non-character motif pattern, the such as landscape matic mould, then take according to the Common Parameters of the landscape matic mould, such as, the large depth of field, slow shutter etc.
The method of a kind of Lookup protocol screening-mode that the embodiment of the present invention provides, open the Face datection function of capture apparatus, and obtain the graphical information identifying everyone face region in the preview interface of described capture apparatus, then according to described graphical information, the physical size of described preview interface calculates the first ratio value of maximum face region area and described preview interface area in described preview interface, when described first ratio value is more than or equal to first threshold, the screening-mode of described capture apparatus is set to character motif pattern, when described first ratio value is less than described first threshold, the screening-mode of described capture apparatus is set to non-character motif pattern.The embodiment of the present invention solve in prior art due to most of user be unfamiliar with which kind of scene under need to use which kind of screening-mode of mobile phone, make shooting photo effect out undesirable, to the problem that the use of user is made troubles, achieve the Lookup protocol of screening-mode, improve shooting effect.
In a kind of implementation of the embodiment of the present invention, provide a kind of method of Lookup protocol screening-mode, as shown in Figure 2, carry out to utilize the camera in smart mobile phone being shot for example, described method specifically comprises the steps:
201, open the Face datection function of capture apparatus, and obtain the graphical information identifying everyone face region in the preview interface of described capture apparatus, described graphical information is used for identifying the regional extent that each face occupies.
When user opens the camera in described smart mobile phone, when taking, the Face datection function of camera is opened automatically, carries out Face datection to the image in the preview interface of described mobile telephone display.
Human face detection tech is the feature according to face, will appear at the recognition of face of preview interface out, and then mark out.In the prior art, human face detection tech is comparative maturity, such as, Face datection based on template matches, the Face datection based on face shaping, the Face datection based on the Face datection of neural net, feature based, the Face datection based on the colour of skin etc., do not limit in embodiments of the present invention and use which kind of human face detection tech, as long as the human face region in preview interface can be identified out.In existing human face detection tech, figure is usually utilized to identify out by human face region, such as rectangle frame, ellipse, circle, square etc.
The graphical information of each human face region of mark is obtained in the preview interface of mobile telephone display, several human face region is had just to have several graphical information, the figure wherein identifying human face region can be identical, also can be different, as long as the regional extent that each face occupies can be identified out.
In addition, before the graphical information obtaining mark human face region, do not limit described camera and whether focus successfully.Because user may be there is when using camera shooting; do not focus and successfully just take; therefore in order to ensure the eyes protecting the person of being taken to greatest extent; acquisition in this step identifies the graphical information of human face region and whether successfully not to rely on focusing, but whether depend on Face datection successful.
202, the first ratio value of maximum face region area and described preview interface area in described preview interface is calculated according to the physical size of described graphical information, described preview interface.
According to the graphical information got, obtain the area of each human face region, wherein the ratio of the area of the preview interface of maximum face region area and described mobile telephone display is described first ratio value.
When using the human face region of rectangle frame to described preview interface to identify, the rectangle frame information got comprises the wide and high of rectangle frame, in addition, obtain the wide and high of the preview interface of described camera in advance, then calculate the first ratio value of maximum face area and described preview interface area in described preview interface according to formula (1).
R
face=Max(X
face1*Y
face1,X
face2*Y
face2,...,X
facen*Y
facen)/(X
pic*Y
pic) (1)
Wherein, R
facefor the first ratio value of maximum face area in described preview interface and described preview interface area, (X
face1, Y
face1), (X
face2, Y
face2) ..., (X
facen, Y
facen) be respectively the wide and high of the rectangle frame of n the different face of mark got in described preview interface, (X
pic, Y
pic) wide and high for described preview interface.
In addition, when only identifying a face in described preview interface, then above-mentioned formula (1) is converted to the first ratio value that formula (2) calculates maximum face area and described preview interface area in described preview interface.
R
face=(X
face*Y
face)/(X
pic*Y
pic) (2)
Wherein, R
facefor the first ratio value of face area in described preview interface and described preview interface area, (X
face, Y
face) wide and high for the rectangle frame of face that gets in described preview interface, (X
pic, Y
pic) wide and high for described preview interface.
203, judge whether described first ratio value is less than first threshold, described first threshold is that described capture apparatus individual human face region area in the photo of shooting character motif occupies the percentage of the photo gross area.
Described first threshold be by camera when taking the photo of character motif, individual human face region area in photo occupies the percentage of the photo gross area, and the statistical value through repeatedly calculating, camera in different smart mobile phones, corresponding different first thresholds, such as, in VIVA mobile phone, described first threshold is 0.07.
204, when described first ratio value is more than or equal to described first threshold, the screening-mode of described capture apparatus is set to character motif pattern, and described first threshold is that described capture apparatus individual human face region area in the photo of shooting character motif occupies the percentage of the photo gross area.
Wherein, described first threshold be by camera when taking the photo of character motif, individual human face region area in photo occupies the percentage of the photo gross area, and the statistical value through repeatedly calculating, camera in different smart mobile phones, corresponding different first thresholds, such as, in VIVA mobile phone, described first threshold is 0.07.
When described first ratio value is more than or equal to first threshold, the photo for character motif now taken being described, by calculating the current distance of camera and the person of being taken, and then judging whether the photoflash lamp of camera can damage the eyes of the person of being taken.
205, the current distance of the person of being taken that in described preview interface, maximum face is corresponding and described capture apparatus is calculated according to described first ratio value, preset rules distance, preset ratio value, described preset rules distance is for when whole the face of the person of being taken is included in photo, the minimum distance of the described person of being taken and described capture apparatus, described preset ratio value is when described capture apparatus is described preset rules distance with the distance of the person of being taken, the maximum face region area of the person of being taken and the ratio value of described preview interface area.
When the camera in VIVA mobile phone is when taking the photo of character motif, camera is 15cm with the distance of the person of being taken, the face be taken can be included completely in photo, if the distance person of being taken is closer again, the face be taken can not intactly be presented in preview interface, thus not by human face detection tech by Face datection out.So 15cm is now designated as preset rules distance, i.e. the minimum distance of the described camera person of being taken and described capture apparatus in the photo of shooting character motif.And when camera is 15cm with the distance of the person of being taken, the statistical value of the first ratio value obtained is 0.35, then the first ratio value is now preset ratio value, namely when camera is described preset rules distance with the distance of the person of being taken, the maximum face region area of the person of being taken and the ratio value of described preview interface area.
The current distance of the person of being taken that in described preview interface, maximum face is corresponding and described capture apparatus is calculated according to formula (3).
Wherein D
currentthe be taken person corresponding for maximum face in described preview interface and the current distance of described capture apparatus, R
maxfor described preset ratio value, R
facefor described first ratio value, D
nearestfor described preset rules distance.
Wherein, because the person of being taken is far away with the distance of described camera, the area ratio that the human face region area of the person of being taken occupies in described preview interface is less, and area ratio is directly proportional to square distance.I.e. R
maxwith (D
nearest)
2proportional, R
facewith (D
current)
2proportional.
206, judge whether described current distance is greater than preset security distance, described preset security distance for when the intensity of illumination of the photoflash lamp of described capture apparatus be human eye bear maximum safe intensity of illumination time, the safe distance of described capture apparatus and the person of being taken.
In existing research, the maximum intensity of illumination that human eye can bear is 106cd/m
2.In order to better protect the eyes of the person of being taken, the safe intensity of illumination that we can set that human eye can bear is 80cd/m
2.Wherein, due to the model of photoflash lamp in camera and the difference of intensity, the person of being taken is 80cd/m in the intensity of illumination of the photoflash lamp bearing different cameral
2time, all have different from the distance of camera.Such as, intensity of illumination tester can be utilized to test out, the intensity of illumination that the photoflash lamp receiving camera when intensity of illumination tester sends is 80cd/m
2time, obtain the distance of described intensity of illumination tester and camera, and described distance is set to preset security distance, such as, in VIVA mobile phone, preset security distance is 5 meters.
In step 206, judge whether the described current distance obtained is greater than described preset security distance, to avoid damaging the eyes of the person of being taken.
207, when described current distance is not more than described preset security distance, the operating state of the photoflash lamp of described capture apparatus is set to close.
When described current distance is less than or equal to described preset security distance, if when illustrating that the photoflash lamp of now camera is in opening, use described camera to take the person of being taken, can damage the eyes of the person of being taken.Therefore, while the screening-mode of described camera is set to character motif pattern, positive closing photoflash lamp, wherein other parameters of character motif pattern can utilize the Common Parameters used in prior art to arrange, such as white balance, tone, burst mode, the shallow depth of field, the isoparametric setting of large aperture.If light is very dark, suitably can improves the photosensitive susceptibility of camera, specifically be arranged voluntarily by user.
208, when described current distance is greater than described preset security distance, the operating state of described photoflash lamp is set according to the parameter request of the character motif pattern of described capture apparatus.
From step 204, the photo for character motif now taken, and described current distance is greater than described preset security distance, then the photoflash lamp of described camera can not damage the eyes of the person of being taken, therefore the operating state of described photoflash lamp is set according to the parameter request of described character motif pattern, not limiting described photoflash lamp is open or close, and is determined by the parameter request of described character motif pattern.
209, when described first ratio value is less than first threshold, the screening-mode of described capture apparatus is set to non-character motif pattern.
Because the person of being taken is far away with the distance of described camera, the area ratio that the human face region area of the person of being taken occupies in described preview interface is less, therefore when described first ratio value is less than described first threshold, the ratio value of maximum face region area and described preview interface area in described preview interface is described, be less than the ration statistics value of described camera individual human face region area and photo area in the photo of shooting character motif, so corresponding with described first ratio value described face and the distance of camera are greater than camera corresponding to described first threshold when taking the photo of character motif, the ultimate range of personage and described camera, now then think that user will take personage, so the screening-mode of described capture apparatus is set to non-character motif pattern, the such as landscape matic mould, then take according to the Common Parameters of the landscape matic mould, such as, the large depth of field, slow shutter etc.
Pass through the embodiment of the present invention, reduce user when using capture apparatus, to the physiological damage that the person of being taken brings, improve user for when being unfamiliar with the optimum configurations of capture apparatus simultaneously, the quality of taking pictures, and can Lookup protocol screening-mode, be convenient to user and obtain better shooting effect.
Embodiment 2
The embodiment of the present invention provides a kind of device of Lookup protocol screening-mode, and as shown in Figure 3, described device 30 comprises acquiring unit 31, first processing unit 32 and setting unit 33.
Wherein, acquiring unit 31, for opening the Face datection function of capture apparatus, and obtains in the preview interface of described capture apparatus, identifies the graphical information in everyone face region, and described graphical information is used for identifying the regional extent that each face occupies;
First processing unit 32, for calculating the first ratio value of maximum face region area and described preview interface area in described preview interface according to the physical size of described graphical information, described preview interface;
Setting unit 33, for when described first ratio value is more than or equal to first threshold, the screening-mode of described capture apparatus is set to character motif pattern, and described first threshold is that described capture apparatus individual human face region area in the photo of shooting character motif occupies the percentage of the photo gross area;
Described setting unit 33, also for when described first ratio value is less than described first threshold, is set to non-character motif pattern by the screening-mode of described capture apparatus.
The device of a kind of Lookup protocol screening-mode that the embodiment of the present invention provides, open the Face datection function of capture apparatus, and obtain the graphical information identifying everyone face region in the preview interface of described capture apparatus, then according to described graphical information, the physical size of described preview interface calculates the first ratio value of maximum face region area and described preview interface area in described preview interface, when described first ratio value is more than or equal to first threshold, the screening-mode of described capture apparatus is set to character motif pattern, when described first ratio value is less than described first threshold, the screening-mode of described capture apparatus is set to non-character motif pattern.The embodiment of the present invention solve in prior art due to most of user be unfamiliar with which kind of scene under need to use which kind of screening-mode of mobile phone, make shooting photo effect out undesirable, to the problem that the use of user is made troubles, achieve the Lookup protocol of screening-mode, improve shooting effect.
Optionally, when described graphical information is rectangle frame information, when described rectangle frame information comprises rectangle frame wide and high, described first processing unit, specifically for according to R
face=Max (X
face1* Y
face1, X
face2* Y
face2..., X
facen* Y
facen)/(X
pic* Y
pic) calculate the first ratio value of maximum face area and described preview interface area in described preview interface, wherein R
facefor the first ratio value of maximum face area in described preview interface and described preview interface area, (X
face1, Y
face1), (X
face2, Y
face2) ..., (X
facen, Y
facen) be respectively the wide and high of the rectangle frame of n the different face of mark got in described preview interface, (X
pic, Y
pic) wide and high for described preview interface.
Optionally, as shown in Figure 4, described device 30 also comprises:
Second processing unit 34, for calculating the current distance of the person of being taken that in described preview interface, maximum face is corresponding and described capture apparatus according to described first ratio value, preset rules distance, preset ratio value, described preset rules distance is for when whole the face of the person of being taken is included in photo, the minimum distance of the described person of being taken and described capture apparatus, described preset ratio value is when described capture apparatus is described preset rules distance with the distance of the person of being taken, the maximum face region area of the person of being taken and the ratio value of described preview interface area;
3rd processing unit 35, for judging whether described current distance is greater than preset security distance, described preset security distance for when the intensity of illumination of the photoflash lamp of described capture apparatus be human eye bear maximum safe intensity of illumination time, the safe distance of described capture apparatus and the person of being taken;
Described setting unit 33, also for when described current distance is not more than described preset security distance, is set to the operating state of the photoflash lamp of described capture apparatus close.
Optionally, described second processing unit, specifically for basis
Calculate the current distance of the person of being taken that in described preview interface, maximum face is corresponding and described capture apparatus, wherein D
currentthe be taken person corresponding for maximum face in described preview interface and the current distance of described capture apparatus, R
maxfor described preset ratio value, R
facefor described first ratio value, D
nearestfor described preset rules distance.
Optionally, described setting unit, also for when described first ratio value is less than first threshold, is set to non-character motif pattern by the screening-mode of described capture apparatus.
Optionally, described setting unit, also for when described current distance is greater than described preset security distance, arranges the operating state of described photoflash lamp according to the parameter request of the character motif pattern of described capture apparatus.
The operating process of described device 30, see the processing procedure of the method for above-mentioned Lookup protocol screening-mode.
Embodiment 3
The embodiment of the present invention provides a kind of device of Lookup protocol screening-mode, and as shown in Figure 5, described device 50 comprises memory 51 and processor 52.
Wherein, memory 51, for storing instruction and parameter preset;
Processor 52, for the instruction in execute store 51, specifically performs:
Open the Face datection function of capture apparatus, and obtain the graphical information identifying everyone face region in the preview interface of described capture apparatus, described graphical information is used for identifying the regional extent that each face occupies;
The first ratio value of maximum face region area and described preview interface area in described preview interface is calculated according to the physical size of described graphical information, described preview interface;
When described first ratio value is more than or equal to first threshold, the screening-mode of described capture apparatus is set to character motif pattern, and described first threshold is that described capture apparatus individual human face region area in the photo of shooting character motif occupies the percentage of the photo gross area;
When described first ratio value is less than described first threshold, the screening-mode of described capture apparatus is set to non-character motif pattern.
The device of a kind of Lookup protocol screening-mode that the embodiment of the present invention provides, open the Face datection function of capture apparatus, and obtain the graphical information identifying everyone face region in the preview interface of described capture apparatus, then according to described graphical information, the physical size of described preview interface calculates the first ratio value of maximum face region area and described preview interface area in described preview interface, when described first ratio value is more than or equal to first threshold, the screening-mode of described capture apparatus is set to character motif pattern, when described first ratio value is less than described first threshold, the screening-mode of described capture apparatus is set to non-character motif pattern.The embodiment of the present invention solve in prior art due to most of user be unfamiliar with which kind of scene under need to use which kind of screening-mode of mobile phone, make shooting photo effect out undesirable, to the problem that the use of user is made troubles, achieve the Lookup protocol of screening-mode, improve shooting effect.
Optionally, described processor 52, also for performing:
When described graphical information is rectangle frame information, when described rectangle frame information comprises rectangle frame wide and high, the first ratio value that the described physical size according to described graphical information, described preview interface calculates maximum face area and described preview interface area in described preview interface is specially:
According to R
face=Max (X
face1* Y
face1, X
face2* Y
face2..., X
facen* Y
facen)/(X
pic* Y
pic) calculate the first ratio value of maximum face area and described preview interface area in described preview interface, wherein R
facefor the first ratio value of maximum face area in described preview interface and described preview interface area, (X
face1, Y
face1), (X
face2, Y
face2) ..., (X
facen, Y
facen) be respectively the wide and high of the rectangle frame of n the different face of mark got in described preview interface, (X
pic, Y
pic) wide and high for described preview interface.
Optionally, described processor 52, also for performing:
The current distance of the person of being taken that in described preview interface, maximum face is corresponding and described capture apparatus is calculated according to described first ratio value, preset rules distance, preset ratio value, described preset rules distance is for when whole the face of the person of being taken is included in photo, the minimum distance of the described person of being taken and described capture apparatus, described preset ratio value is when described capture apparatus is described preset rules distance with the distance of the person of being taken, the maximum face region area of the person of being taken and the ratio value of described preview interface area;
Judge whether described current distance is greater than preset security distance, described preset security distance for when the intensity of illumination of the photoflash lamp of described capture apparatus be human eye bear maximum safe intensity of illumination time, the safe distance of described capture apparatus and the person of being taken;
When described current distance is not more than described preset security distance, the operating state of the photoflash lamp of described capture apparatus is set to close.
Optionally, described processor 52, also for performing:
Calculate the person of being taken that in described preview interface, maximum face is corresponding be specially with the current distance of described capture apparatus according to described first ratio value, preset rules distance, preset ratio value:
According to
Calculate the current distance of the person of being taken that in described preview interface, maximum face is corresponding and described capture apparatus, wherein D
currentthe be taken person corresponding for maximum face in described preview interface and the current distance of described capture apparatus, R
maxfor described preset ratio value, R
facefor described first ratio value, D
nearestfor described preset rules distance.
When described first ratio value is less than first threshold, the screening-mode of described capture apparatus is set to non-character motif pattern.
Optionally, described processor 52, also for performing:
When described current distance is greater than described preset security distance, the operating state of described photoflash lamp is set according to the parameter request of the character motif pattern of described capture apparatus.
The operating process of described device 50, see the processing procedure of the method for above-mentioned Lookup protocol screening-mode.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add required common hardware by software and realize, and can certainly pass through hardware, but in a lot of situation, the former is better execution mode.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in the storage medium that can read, as the floppy disk of computer, hard disk or CD etc., comprise some instructions and perform method described in each embodiment of the present invention in order to make a computer equipment (can be personal computer, server, or the network equipment etc.).
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of described claim.