Summary of the invention
Mirror is necessary to provide a kind of anti-portrait system and method for closing one's eyes that is applied to photographic equipment in above content, can from many body images of continuous shooting, select the best human image that nothing is closed one's eyes by Automatic sieve.
The described anti-portrait system that closes one's eyes installs and operates in the camera, and this camera comprises camera unit and storage unit.The portrait system that should anti-close one's eyes comprises: the photography control module; Be used to be provided with the face characteristic value and the eye feature value of body image; This face characteristic value and eye feature value are stored in storage unit; Produce single and take the company of body image continuously and clap instruction, and according to this companys clap the instruction control camera unit continuously shooting comprise portrait scene to obtain many body images; The human face detection module is used for detecting human face region according to the face characteristic value at each body image, and writes down the human face region resolution of each body image, and people's face quantity of each body image of statistics; The eye detecting module is used in each human face region, detecting eye areas according to the eye feature value, and writes down the eye areas resolution of each body image, and the eyeball quantity of each body image of statistics; The image screening module is used for calculating the ratio of each body image people face quantity and eyeball quantity, and the ratio that filters out people's face quantity and eyeball quantity near 1: 2 body image as the best human image.
The described anti-portrait method of closing one's eyes comprises step: the face characteristic value and the eye feature value of body image are set, and this face characteristic value and eye feature value are stored in storage unit; Produce single and take the company of body image continuously and clap instruction, and according to this companys clap the instruction control camera unit continuously shooting comprise portrait scene to obtain many body images; In each body image, detect human face region according to the face characteristic value, and write down the human face region resolution of each body image; Add up people's face quantity of each body image; In each human face region, detect eye areas according to the eye feature value, and write down the eye areas resolution of each body image; Add up the eyeball quantity of each body image; Calculate the ratio of people's face quantity and eyeball quantity in each body image; The ratio that filters out people's face quantity and eyeball quantity near 1: 2 body image as the best human image.
Compared to prior art; The anti-portrait system and method for closing one's eyes of the present invention; Can utilize camera in single shot image process, to take many body images continuously, and Automatic sieve is selected the best human image that nothing is closed one's eyes from these many body images.
Embodiment
As shown in Figure 1, be the Organization Chart of anti-portrait system 10 preferred embodiments of closing one's eyes of the present invention.In the present embodiment; The described anti-portrait system 10 that closes one's eyes installs and operates in the camera 1; Can in single shot image process, take many body images continuously, and Automatic sieve is selected the best human image that nothing is closed one's eyes from these many body images.In the present embodiment, described camera 1 can be for video camera, or be digital camera.This camera 1 include but not limited to, camera unit 20, storage unit 30 and microprocessor 40.
In the present embodiment, the described anti-portrait system 10 that closes one's eyes comprises photography control module 101, human face detection module 102, eye detecting module 103 and image screening module 104.The alleged module of the present invention is meant a kind of can be by microprocessor 40 performed and can accomplish the series of computation machine program segment of fixed function, and it is stored in the storage unit 30 of camera 10.
Described photography control module 101 is used to be provided with the face characteristic value and the eye feature value of body image, and this face characteristic value and eye feature value are stored in the storage unit 30.This photography control module 101 also is used to produce company's bat instruction that single is taken body image quantity (for example connect and clap 4) continuously; And according to this companys clap instruction control camera unit 20 continuously shootings comprise portrait scene to obtain many body images, portrait 1 to portrait 4 for example shown in Figure 2.In body image detecting human face region process; If the similarity of specific imagery zone and the human face region sample of setting up in advance surpasses certain door numerical value (for example 95%); As the face characteristic value, the imagery zone that surpasses the face characteristic value just can be demarcated is people's face to 101 of control modules of photography with this door numerical value.In body image detecting eye areas process; If the similarity of specific imagery zone and the eye areas sample of setting up in advance surpasses certain door numerical value (for example 90%); As the eye feature value, the imagery zone that surpasses the eye feature value just can be demarcated is eye areas to 101 of control modules of photography with this door numerical value.
Described human face detection module 102 is used for detecting human face region according to described face characteristic value at each body image, writes down the human face region resolution of each body image, and people's face quantity of each body image of statistics.With reference to shown in Figure 2, human face detection module 102 detects people's face quantity separately according to the face characteristic value in portrait 1 to portrait 4 be 1, that is all comprise a width of cloth people face image in each body image.Described human face region resolution is meant human face region in the resolution of body image separately, and the be taken quality of people's face image of its reflection when human face region resolution is high, explains that the quality of people's face image is good, otherwise, explain that the quality of people's face image is not good.
Described eye detecting module 103 is used in each human face region, detecting eye areas according to described eye feature value, writes down the eye areas resolution of each body image, and the eyeball quantity of each body image of statistics.In human face region, detect in the eye areas process; Eye detecting module 103 can directly be identified as eye areas with the zone near a place of three minutes, human face region top, also can do eye feature comparison (Template Matching) with human face region through the eye areas sample (comprising the eye feature data) that will set up in advance and detect eye areas.In eye areas, detect in the eyeball position process; It is eyeball position that eye detecting module 103 can be directly carried out the dark round zone that color analysis obtains in the eye areas to eye areas, makes the eyeball aspect ratio to adding up eyeball quantity through eyeball sample (comprising eye feature pupil data) and the eye areas that will set up in advance.With reference to shown in Figure 3; Eye detecting module 103 detects eye areas 1 to eye areas 4 according to the eye feature value separately in people's face 1 to people's face 4; And in eye areas 1 and eye areas 4, detect eyeball quantity and be 0, respectively do for oneself 2 and in eye areas 2 and eye areas 3, detect eyeball quantity.
Described image screening module 104 is used for calculating the ratio of each body image people face quantity and eyeball quantity, and the ratio that filters out people's face quantity and eyeball quantity is alternative image near 1: 2 body image.In the present embodiment, if be not counted in special cases such as deformity and genetic mutation, the quantitative proportion of people's face and eyeball is 1: 2 (that is everyone has a face and two eyeballs).If institute take the photograph in the body image personage at the moment eyes for shutting state, then people's face quantity does not change (people's face quantity=1), but eyeball quantity can tail off (eyeball quantity<2), this principle is also identical when many people take pictures simultaneously.That is if there is the people to shut at the moment eyes, the people's face and the eyeball quantitative proportion that then calculate at last can be greater than 1: 2.In like manner; If all person's of being taken eyes are all open configuration; The people's face and the eyeball quantitative proportion that then calculate at last can equal 1: 2, image screening module 104 promptly in the body image that single is taken continuously automatic screening equal or near 1: 2 body image as alternative body image.
Described image screening module 104 is used to also judge whether alternative body image has only one; Should alternative image when alternative body image has only one as the best human image, the alternative image that when alternative body image surpasses, will have the highest human face region resolution and eye areas resolution is as the best human image.
As shown in Figure 4, be the process flow diagram of the anti-portrait method preferred embodiment of closing one's eyes of the present invention.In the present embodiment, this method can make camera 1 Automatic sieve from many body images of continuous shooting select does not have the best human image of closing one's eyes.
Step S40, photography control module 101 is provided with the face characteristic value and the eye feature value of body image, and this face characteristic value and eye feature value are stored in the storage unit 30.In body image detecting human face region process; If the similarity of specific imagery zone and people's face sample is above certain door numerical value (for example 95%); As the face characteristic value, the imagery zone that surpasses this face characteristic value just can be demarcated is people's face to 101 of control modules of photography with this door numerical value.In body image detecting eye areas process; If the similarity of specific imagery zone and eye sample is above certain door numerical value (for example 90%); As the eye eigenwert, the imagery zone that surpasses this eye feature value just can be demarcated is eye areas to 101 of control modules of photography with this door numerical value.
Step S41; Photography control module 101 produces company's bat instruction that single is taken body image quantity (for example connect and clap 4) continuously; And according to this company clap instruction control camera unit 20 take continuously comprise portrait scene to obtain many body images, portrait 1 to portrait 4 for example shown in Figure 2.
Step S42, human face detection module 102 is detected human face region according to described face characteristic value in each body image, and writes down the human face region resolution of each body image.Described human face region resolution is meant human face region in the resolution of body image separately, and the be taken quality of people's face image of its reflection when human face region resolution is high, explains that the quality of people's face image is good, otherwise, explain that the quality of people's face image is not good.
Step S43, each opens people's face quantity of body image human face detection module 102 statistics.With reference to shown in Figure 2, human face detection module 102 detects people's face quantity separately according to the face characteristic value in portrait 1 to portrait 4 be 1, that is all comprise a width of cloth people face image in each body image.
Step S44, eye detecting module 103 detects eye areas according to described eye feature value in each human face region, and writes down the eye areas resolution of each body image.In human face region, detect in the eye areas process; Eye detecting module 103 can directly be identified as eye areas with the zone near a place of three minutes, human face region top, also can do eye feature comparison (Template Matching) with human face region through the eye areas sample of setting up in advance (comprising the eye feature data) and detect eye areas.With reference to shown in Figure 3, eye detecting module 103 detects eye areas 1 to eye areas 4 according to the eye feature value separately in people's face 1 to people's face 4.
Step S45, each opens the eyeball quantity of body image eye detecting module 103 statistics.In eye areas, detect in the eyeball position process; It is eyeball position that eye detecting module 103 is directly carried out the dark round zone that color analysis obtains in the eye areas to eye areas, makes the eyeball aspect ratio to adding up eyeball quantity through eyeball sample (comprising eye feature pupil data) and the eye areas set up in advance.With reference to shown in Figure 3, eye detecting module 103 detects eyeball quantity and is 0 in eye areas 1 and eye areas 4, respectively does for oneself 2 and in eye areas 2 and eye areas 3, detect eyeball quantity.
Step S46, the ratio of people's face quantity and eyeball quantity in each body image of image screening module 104 calculating.Step S47, the ratio that image screening module 104 filters out people's face quantity and eyeball quantity is alternative image near 1: 2 body image.In the present embodiment, if be not counted in special cases such as deformity and genetic mutation, the quantitative proportion of people's face and eyeball is 1: 2 (that is everyone has a face and two eyeballs).If institute take the photograph in the body image personage at the moment eyes for shutting state, then people's face quantity does not change (people's face quantity=1), but eyeball quantity can tail off (eyeball quantity<2), this principle is also identical when many people take pictures simultaneously.That is if there is the people to shut at the moment eyes, the people's face and the eyeball quantitative proportion that then calculate at last can be greater than 1: 2.In like manner; If all person's of being taken eyes are all open configuration; The people's face and the eyeball quantitative proportion that then calculate at last can equal 1: 2, image screening module 104 promptly in the body image that the single single is taken continuously automatic screening equal or near 1: 2 body image as alternative body image.
Step S48, image screening module 104 judges whether alternative body image has only one.If alternative body image has only one, step S49,104 of image screening module should alternative body image as the best human image.If alternative body image surpasses one, step S50,104 alternative images that will have the highest human face region resolution and eye areas resolution of image screening module are as the best human image.
Above embodiment is only unrestricted in order to technical scheme of the present invention to be described; Although the present invention is specified with reference to above preferred embodiment; Those of ordinary skill in the art should be appreciated that and can make amendment or be equal to spirit and the scope that replacement should not break away from technical scheme of the present invention technical scheme of the present invention.