CN105072327B - A kind of method and apparatus of the portrait processing of anti-eye closing - Google Patents

A kind of method and apparatus of the portrait processing of anti-eye closing Download PDF

Info

Publication number
CN105072327B
CN105072327B CN201510416911.7A CN201510416911A CN105072327B CN 105072327 B CN105072327 B CN 105072327B CN 201510416911 A CN201510416911 A CN 201510416911A CN 105072327 B CN105072327 B CN 105072327B
Authority
CN
China
Prior art keywords
image
eye
eyes
portrait
face
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.)
Expired - Fee Related
Application number
CN201510416911.7A
Other languages
Chinese (zh)
Other versions
CN105072327A (en
Inventor
刘彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201510416911.7A priority Critical patent/CN105072327B/en
Publication of CN105072327A publication Critical patent/CN105072327A/en
Application granted granted Critical
Publication of CN105072327B publication Critical patent/CN105072327B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

The present invention relates to the method and apparatus that a kind of portrait of anti-eye closing is handled, and including shooting unit, detection unit, transfer unit and processing unit;The shooting unit, for obtaining image to be confirmed;The detection unit, for obtaining first image in the image to be confirmed and detecting the state of the wherein eyes of owner's picture;It is described to transfer unit, if being in closed-eye state for the eyes of at least one portrait, first image is preserved, and the subsequent image after transferring;The processing unit, the eye for being in closed-eye state to first image according to the subsequent image do Local treatment, so that the eyes of owner's picture are in eyes-open state in first image.As it can be seen that the method and apparatus of the portrait processing of the anti-eye closing, can effectively avoid the eyes for taking portrait from being in the photo of closed-eye state, greatly improve the quality of photo in itself, optimize user experience.

Description

A kind of method and apparatus of the portrait processing of anti-eye closing
Technical field
The method and dress handled the present invention relates to technical field of image processing more particularly to a kind of portrait of anti-eye closing It puts.
Background technology
With mobile terminal, such as the continuous development of the shooting technology of mobile phone, more and more users play self-timer using mobile phone Or group claps, various U.S.'s face camera functions also occur therewith.U.S. face camera function by captured image to be confirmed into pedestrian Face identifies, whitening, convergence, the mill post-processing operations such as skin are then carried out to face, realizes that the image that confirmation is allowed to take seems face Skin is more smooth, the visual effect of Bai Liang.U.S. face camera function almost becomes the essential function that female user is taken pictures now.So And when more people together group clap, particularly travel outdoors souvenir when, it is easy to just take some human eye and be in closed-eye state Photo, the quality of this photo not only big heavy discount can also more or less influence the mood of playing of people.
The content of the invention
It is an object of the invention to propose a kind of method and apparatus of the portrait of anti-eye closing processing, can effectively avoid The eyes for taking portrait are in the photo of closed-eye state, greatly improve the quality of photo in itself, optimize user experience.
For this purpose, the present invention uses following technical scheme:
In a first aspect, a kind of method of the portrait processing of anti-eye closing is provided, including:
It obtains and confirms shooting instruction, image to be confirmed, the image to be confirmed are obtained by the interface of finding a view for shooting portrait Several including continuously acquiring do not do the image that digital image compression is handled;
First image in the image to be confirmed is obtained, is detected using Face datection algorithm in first image The state of the eyes of owner's picture;
If the eyes of at least one portrait are in closed-eye state, first image is preserved, and transfers described Subsequent image after one image;
Whether the eyes for detecting the portrait for being in closed-eye state corresponding to first image in the subsequent image open It opens;If opening, first image is corresponded in closed-eye state using corresponding this subsequent image of eyes-open state Eye does Local treatment, so that the eyes of owner's picture are in eyes-open state in first image.
Second aspect provides a kind of device of the portrait processing of anti-eye closing, including:
Shooting unit confirms shooting instruction for obtaining, and image to be confirmed, institute are obtained by the interface of finding a view for shooting portrait State image to be confirmed include continuously acquire several do not do digital image compression processing image;
For obtaining first image in the image to be confirmed, institute is detected using Face datection algorithm for detection unit State the state of the eyes of owner's picture in first image;
Unit is transferred, if being in closed-eye state for the eyes of at least one portrait, preserves first image, And transfer the subsequent image after first image;
Processing unit, for detecting the portrait for corresponding to first image in the subsequent image and being in closed-eye state Eyes whether open;If opening, using corresponding this subsequent image of eyes-open state to first image corresponding position Local treatment is done in the eye of closed-eye state, so that the eyes of owner's picture are in eyes-open state in first image.
The beneficial effects of the present invention are:A kind of method and apparatus of the portrait processing of anti-eye closing, it is single including shooting Member, detection unit transfer unit and processing unit;The shooting unit confirms shooting instruction, by shooting portrait for obtaining Interface of finding a view obtain image to be confirmed, the image to be confirmed include continuously acquiring several do not do at digital image compression The image of reason;The detection unit for obtaining first image in the image to be confirmed, is examined using Face datection algorithm Survey the state of the eyes of owner's picture in first image;It is described to transfer unit, if the eye at least one portrait Eyeball is in closed-eye state, then preserves first image, and transfers the subsequent image after first image;The place Manage unit, for detect in the subsequent image correspond to first image be in closed-eye state portrait eyes whether It opens;If opening, first image is corresponded in closed-eye state using corresponding this subsequent image of eyes-open state Eye do Local treatment so that the eyes of owner's picture are in eyes-open state in first image.As it can be seen that the anti-eye closing Portrait processing method and apparatus, the eyes for taking portrait can effectively be avoided to be in the photo of closed-eye state, significantly The quality of photo in itself is improved, optimizes user experience.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, institute in being described below to the embodiment of the present invention Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the present invention Example, for those of ordinary skill in the art, without creative efforts, can also implement according to the present invention The content of example and these attached drawings obtain other attached drawings.
Fig. 1 is the method flow diagram of method one embodiment of the portrait processing of anti-eye closing provided by the invention.
Fig. 2 is the method flow diagram of second embodiment of method of the portrait processing of anti-eye closing provided by the invention.
Fig. 3 is the block diagram of device one embodiment of the portrait processing of anti-eye closing provided by the invention.
Fig. 4 is the block diagram of second embodiment of device of the portrait processing of anti-eye closing provided by the invention.
Specific embodiment
For make present invention solves the technical problem that, the technical solution that uses and the technique effect that reaches it is clearer, below The technical solution of the embodiment of the present invention will be described in further detail with reference to attached drawing, it is clear that described embodiment is only It is part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those skilled in the art exist All other embodiments obtained under the premise of creative work are not made, belong to the scope of protection of the invention.
It please refers to Fig.1, is the side of method one embodiment of the portrait processing of anti-eye closing provided by the invention Method flow chart.The method of the portrait processing of the anti-eye closing of the embodiment of the present invention can be applied to various possess camera function Intelligent terminal, such as mobile phone, tablet, smartwatch.
The method of the portrait processing of the anti-eye closing, including:
Step S101, obtain and confirm shooting instruction, image to be confirmed is obtained by the interface of finding a view for shooting portrait, it is described to treat Confirm image include continuously acquire several do not do digital image compression processing image.
The interface of finding a view of the shooting portrait is the form or display screen for the intelligent terminal for possessing camera function.
Image can be such that picture signal is transmitted in high quality after digital image compression is handled, and convenient for image Retrieval, analysis, processing and storage.
Step S102, first image in the image to be confirmed is obtained, utilizes Face datection algorithm detection described the The state of the eyes of owner's picture in one image.
Confirm shooting instruction when obtaining, that is, represent that user is satisfied in the main to the image to be confirmed at interface of finding a view at present, pass through Confirmation shooting key is pressed, processing output is carried out to image to be confirmed, forms final portrait picture.
The process of the state of the eyes of owner's picture in first image is detected using Face datection algorithm, it is main to divide For the detection of people face part, the ocular detection based on face sorting survey and three parts of eyes detection.
Face sorting surveys the detection of the characteristic point on Main Basiss face, and carrying out characteristic point to facial image detects it Before, it is also necessary to carry out feature point extraction and classification.During detecting face, first by facial image and face template to be determined Template matches are carried out, if it does, being so projected into face subspace, face is determined whether by feature sub-face technology. Feature sub-face technology finds the basic element of facial image distribution, i.e. facial image sample set covariance square from the angle of statistics The feature vector of battle array, facial image is approx characterized with this.These feature vectors are known as eigenface (Eigenface).In fact, Eigenface reflects the structural relation for lying in information and face inside face sample set.By eyes, cheek, lower jaw sample The feature vector of this collection covariance matrix is known as eigen eyes, feature jaw and feature lip, is referred to as sub-face of feature.Sub-face of feature is corresponding Image space in be turned into subspace, be known as sub-face space.Projector distance of the test image window in sub-face space is calculated, if Video in window meets threshold value comparison condition, then judges it for face.The corresponding region behaviour face part of the face.
It is that the above-mentioned face sorting of ocular detection Main Basiss is surveyed as a result, figure according to the definite face part Picture utilizes the initial position of the three front yards ratio estimate nose of five.Define two initial ranging rectangles, difference two to left and right Residing approximate location growth.The characteristics of being significantly lower than face gray scale according to human eye gray scale, eye is found using search rectangular Edge, and the center of pupil in eyeball is positioned, the ocular of final definite face part.
Eyes detection Main Basiss eye feature value, such as the inspection of pupil middle height, interpupillary distance or pupil gray value It surveys as a result, being in eyes-open state to eyes or closed-eye state judges.
If step S103, the eyes of at least one portrait are in closed-eye state, first image is preserved, and is adjusted Take the subsequent image after first image.
If it was found that the eyes of at least one portrait are in closed-eye state, illustrate that picture quality to be confirmed at this time is relatively low, The requirement of user is not achieved, it is necessary to carry out the portrait processing of anti-eye closing to image to be confirmed.
Step S104, detect and correspond to the eye that first image is in the portrait of closed-eye state in the subsequent image Whether eyeball is opened;If opening, first image is corresponded to be in using corresponding this subsequent image of eyes-open state and is closed The eye of eye shape state does Local treatment, so that the eyes of owner's picture are in eyes-open state in first image.
Preferably, eye Local treatment is described in the eye being in using eye in the subsequent image of eyes-open state is replaced The eye that portrait is in closed-eye state is corresponded in first image, on the premise of face characteristic coincide substantially, eyes-open state Eye be directly covered in the eye of closed-eye state.
The method of the portrait processing provided in an embodiment of the present invention for moving anti-eye closing, can effectively avoid taking portrait Eyes are in the photo of closed-eye state, greatly improve the quality of photo in itself, optimize user experience.
It please refers to Fig.2, is the side of second embodiment of method of the portrait processing of anti-eye closing provided by the invention Method flow chart.On the basis of the one embodiment for the method that the embodiment of the present invention is handled in the portrait of anti-eye closing, to eye It does Local treatment and is illustrated the step of judging the state of portrait eye in portion.
The method of the portrait processing of the anti-eye closing, including:
Step S201, camera function is started.
Start camera function, that is, terminal is allowed to enter state of taking pictures, the interface of finding a view for shooting portrait starts to find a view.
Step S202, obtain and confirm shooting instruction, image to be confirmed is obtained by the interface of finding a view for shooting portrait, it is described to treat Confirm image include continuously acquire several do not do digital image compression processing image.
Step S203, first image in the image to be confirmed is obtained, utilizes Face datection algorithm detection described the The state of the eyes of owner's picture in one image.
Preferably, the state that the eyes of owner's picture in first image are detected using Face datection algorithm, Including:
The eye feature value of owner's picture in first image, the eye feature are detected using Face datection algorithm Pupil middle height, interpupillary distance or the pupil gray value that value includes;
When any portrait pupil middle height be less than or equal to preset height, then judge that the eyes of the portrait are in eye closing shape State;When any portrait pupil middle height be more than the preset height, then judge that the eyes of the portrait are in eyes-open state, Or;
When the interpupillary distance for not detecting any portrait, then judge that the eyes of the portrait are in closed-eye state;When detection is taken office The interpupillary distance of one portrait, then judge the portrait eyes be in eyes-open state or;
When the pupil gray value of any portrait is less than or equal to default pupil gray value, then judges that the eyes of the portrait are in and close Eye shape state;When any portrait pupil gray value be more than the default pupil gray value, then judge the portrait eyes be in open Eye shape state.
Eyeball refers to center section before eyeball, this position is made of cornea, iris and pupil.It is high in the middle part of pupil Spend the centerline height for circular pupil, the color depth that interpupillary distance is the distance between two pupils, pupil gray value is pupil.
When preset height is in normal eyes-open state for eyes pre-set, corresponding to the face size in image Pupil middle height, it is that eyes pre-set, corresponding to the face size in image are in normal to preset pupil gray value Pupil gray value during eyes-open state.Model that can be according to different terminals in actual application and configuration, to preset height It is configured with default pupil gray value.
If step S204a, the eyes of at least one portrait are in closed-eye state, first image is preserved, and Transfer the subsequent image after first image.
If step S204b, the eyes of nobody's picture are in closed-eye state, digital picture is carried out to first image Compression handle, through the digital image compression treated finally portrait picture be shown in screen.
It, can be directly to image to be captured into brief biography of a deceased person digital picture pressure if the eyes of nobody's picture are in closed-eye state Contracting is handled, to export.
It should be noted that step S204a and step S204b, there is no sequencing relation, alternatively implements.
Step S205, in preset period of time, detect in the subsequent image and be in corresponding to first image Whether the eyes of the portrait of closed-eye state are opened.
Preferably, the preset period of time is 2s.In 2s, the eye of portrait is not opened still, is continuously in and closes If eye shape state, then may determine that this be in order to build more lively shooting effect deliberately for it.It can directly treat at this time The image of shooting is into the processing of brief biography of a deceased person digital image compression, to export.
If step S206a, opening, first image is corresponded to using corresponding this subsequent image of eyes-open state Eye in closed-eye state does Local treatment, so that the eyes of owner's picture are in eyes-open state in first image; The image that the eyes for making the owner's picture obtained after the Local treatment are in eyes-open state carries out digital image compression processing, Through the digital image compression, treated that final portrait picture is shown in screen.
If step S206b, not opening, digital image compression processing is carried out to first image, described in warp Treated that final portrait picture is shown in screen for digital image compression.
Step S206a and step S206b allow terminal anti-eye closing portrait processing process is more intelligent and people Property improves the satisfaction of user.It should be noted that step S206a and step S206b is there is no sequencing relation, Alternatively implements.
Preferably, the digital image compression processing is to be handled using the digital image compression of JPEG encryption algorithms.
JPEG encryption algorithms are the canonical algorithm of Static Picture Compression.JPEG encryption algorithms must meet the following requirement:
1st, JPEG encryption algorithms are independently of the resolution ratio of image.
2nd, there is the encoding rate less than 1bit/ pixels, and image can be established in five seconds, in real time with meeting It asks.
3rd, original image can be recovered without distortions in the case where compression ratio is about 2.
4th, the encoding and decoding of support order and progressive encoding and decoding.
5th, to the adaptive ability of various iconic elements and data precision.
6th, coding/decoding apparatus is simply easily realized.
The method of the portrait processing of anti-eye closing provided in an embodiment of the present invention, it is real first by Face datection algorithm When detection shooting portrait interface of finding a view in all faces position and corresponding eye state.Be pressed when confirmation shoots key, It sends after confirming shooting instruction, before image to be confirmed does JPEG codings, takes first image, and judge first image First image if there is human eye is in closed-eye state, is then first preserved, not done by the state of middle portrait eyes JPEG is encoded.Every image gives more sustained attention the eye state of eye closing people below.Until the eyes of eye closing people are in eyes-open state, According to the eyes of the people and the feature of face, to the eye closing people of first image, corresponding eye Local treatment is carried out, makes its eye Eyeball is in eyes-open state.If eye closing people is continuously in closed-eye state more than 2s, without eye Local treatment, acquiescence is special Expect the effect for taking eye closing rather than because the photo of eye closing is taken caused by blink.Finally by the by eye processing One image carries out JPEG codings, exports final portrait picture.
The method of the portrait processing of anti-eye closing provided in an embodiment of the present invention, can be obtained by Face datection algorithm To the state of human eye, eye Local treatment then is carried out to the portrait of eye closing, the eyes-open state of portrait is synthesized to first figure As upper, eye closing portrait is made to be in eyes-open state, to take higher-quality portrait photo, effectively avoids taking eye closing portrait Photo.
The embodiment of the device handled below for the portrait of anti-eye closing provided in an embodiment of the present invention.The people of anti-eye closing As the embodiment of the embodiment and the method for the portrait processing of above-mentioned anti-eye closing of the device of shooting processing belongs to same structure Think, the detail content of not detailed description in the embodiment of the device of the portrait of anti-eye closing processing, may be referred to above-mentioned anti-close The embodiment of the method for the portrait processing of eye.
It please refers to Fig.3, is the knot of device one embodiment of the portrait processing of anti-eye closing provided by the invention Structure block diagram.
The device of the portrait processing of the anti-eye closing, including:
Shooting unit confirms shooting instruction for obtaining, and image to be confirmed, institute are obtained by the interface of finding a view for shooting portrait State image to be confirmed include continuously acquire several do not do digital image compression processing image;
For obtaining first image in the image to be confirmed, institute is detected using Face datection algorithm for detection unit State the state of the eyes of owner's picture in first image;
Unit is transferred, if being in closed-eye state for the eyes of at least one portrait, preserves first image, And transfer the subsequent image after first image;
Processing unit, for detecting the portrait for corresponding to first image in the subsequent image and being in closed-eye state Eyes whether open;If opening, using corresponding this subsequent image of eyes-open state to first image corresponding position Local treatment is done in the eye of closed-eye state, so that the eyes of owner's picture are in eyes-open state in first image.
The device of the portrait processing of anti-eye closing provided in an embodiment of the present invention effectively can avoid taking the eye of portrait Eyeball is in the photo of closed-eye state, greatly improves the quality of photo in itself, optimizes user experience.
It please refers to Fig.4, is the structure of second embodiment of device of the portrait processing of anti-eye closing provided by the invention Block diagram.On the basis of the one embodiment for the device that the embodiment of the present invention is handled in the portrait of anti-eye closing, add Display unit and start unit.
The device of the portrait processing of the anti-eye closing, including:
Shooting unit confirms shooting instruction for obtaining, and image to be confirmed, institute are obtained by the interface of finding a view for shooting portrait State image to be confirmed include continuously acquire several do not do digital image compression processing image;
For obtaining first image in the image to be confirmed, institute is detected using Face datection algorithm for detection unit State the state of the eyes of owner's picture in first image;
Unit is transferred, if being in closed-eye state for the eyes of at least one portrait, preserves first image, And transfer the subsequent image after first image;
Processing unit, for detecting the portrait for corresponding to first image in the subsequent image and being in closed-eye state Eyes whether open;If opening, using corresponding this subsequent image of eyes-open state to first image corresponding position Local treatment is done in the eye of closed-eye state, so that the eyes of owner's picture are in eyes-open state in first image.
Wherein, the processing unit, is specifically used for:
In preset period of time, detect in the subsequent image and be in closed-eye state corresponding to first image Whether the eyes of portrait are opened;
If opening, first image is corresponded in eye closing shape using corresponding this subsequent image of eyes-open state The eye of state does Local treatment, so that the eyes of owner's picture are in eyes-open state in first image;To doing the office The image that the eyes of the owner's picture obtained after portion's processing are in eyes-open state carries out digital image compression processing, through the number Final portrait picture after word image Compression is shown in screen;
If not opening, digital image compression processing is carried out to first image, through the digital picture pressure Treated that final portrait picture is shown in screen for contracting.
Wherein, the digital image compression processing is to be handled using the digital image compression of JPEG encryption algorithms.
Wherein, the device of the portrait processing of the anti-eye closing further includes display unit, the display unit, if for The eyes of nobody's picture are in closed-eye state, then digital image compression processing are carried out to first image, through the number Final portrait picture after word image Compression is shown in screen.
Wherein, the state that the eyes of owner's picture in first image are detected using Face datection algorithm, bag It includes:
The eye feature value of owner's picture in first image, the eye feature are detected using Face datection algorithm Pupil middle height, interpupillary distance or the pupil gray value that value includes;
When any portrait pupil middle height be less than or equal to preset height, then judge that the eyes of the portrait are in eye closing shape State;When any portrait pupil middle height be more than the preset height, then judge that the eyes of the portrait are in eyes-open state, Or;
When the interpupillary distance for not detecting any portrait, then judge that the eyes of the portrait are in closed-eye state;When detection is taken office The interpupillary distance of one portrait, then judge the portrait eyes be in eyes-open state or;
When the pupil gray value of any portrait is less than or equal to default pupil gray value, then judges that the eyes of the portrait are in and close Eye shape state;When any portrait pupil gray value be more than the default pupil gray value, then judge the portrait eyes be in open Eye shape state.
Wherein, the device of the portrait processing of the anti-eye closing further includes start unit, the start unit, for opening Dynamic camera function.
The device of the portrait processing of anti-eye closing provided in an embodiment of the present invention, remarkable face detection algorithm can be got Then the state of human eye carries out eye Local treatment to the portrait of eye closing, the eyes-open state of portrait is synthesized to first image On, eye closing portrait is made to be in eyes-open state, to take higher-quality portrait photo, effectively avoids taking the photograph of eye closing portrait Piece.
A kind of method and apparatus of the portrait processing of anti-eye closing can effectively avoid the eyes for taking portrait from being in and close The photo of eye shape state greatly improves the quality of photo in itself, optimizes user experience.
One of ordinary skill in the art will appreciate that hardware can be passed through by realizing all or part of step of above-described embodiment It completes, relevant hardware can also be instructed to complete by program, which can be stored in a computer-readable storage medium In matter, storage medium can include memory, disk or CD etc..
More than content is only presently preferred embodiments of the present invention, according to the invention for those of ordinary skill in the art Thought, there will be changes, this specification content should not be construed as to the present invention in specific embodiments and applications Limitation.

Claims (10)

1. a kind of method of the portrait processing of anti-eye closing, which is characterized in that including:
It obtains and confirms shooting instruction, image to be confirmed is obtained by the interface of finding a view for shooting portrait, the image to be confirmed includes Several continuously acquired do not do the image that digital image compression is handled;
First image in the image to be confirmed is obtained, is detected in first image and owned using Face datection algorithm The state of the eyes of portrait, wherein the detection includes the ocular that face sorting is surveyed, surveyed based on the face sorting Detection and eyes detection;
The face sorting survey includes:Carry out the feature point extraction on face and classification;It will be to be determined according to the characteristic point Facial image and face template carry out template matches, if it does, then it is empty that facial image to be determined is projected to face Between;Projector distance of the test image window in the face subspace is calculated, if video in window meets threshold value comparison condition, Facial image to be determined is judged for face, is turned into wherein the face subspace is sub-face of feature in corresponding image space Subspace, the spy that the feature vector of the sample set covariance matrix of the sub-face of feature including eyes, cheek and lower jaw is formed Levy eye, feature jaw and feature lip, the feature vector of the sample set covariance matrix is from the angle of statistics by feature sub-face technology Spend the basic element for the facial image distribution to be determined found;
The ocular detection includes:According to the image of the definite face part, the three front yards ratio-dependent of five is utilized The initial position of nose;Two initial ranging rectangles are defined, respectively the location of two growths to left and right, according to human eye ash The characteristics of degree is less than face gray scale, the edge of eye is found using described search rectangle, and positions the center of pupil in eyeball;Root The ocular of the face part is determined according to the center of the initial position of the nose, the edge of eye and pupil;
The eyes detection includes:According to eye feature value, eyes-open state is in eyes or closed-eye state is sentenced It is disconnected, wherein the eye feature value includes pupil middle height, interpupillary distance or pupil gray value;
If the eyes of at least one portrait are in closed-eye state, first image is preserved, and transfers described first Subsequent image after image;
In preset period of time 2s, detect and correspond to the people that first image is in closed-eye state in the subsequent image Whether the eyes of picture are opened;If opening, first image is corresponded to using corresponding this subsequent image of eyes-open state Eye in closed-eye state does Local treatment, so that the eyes of owner's picture are in eyes-open state in first image; The image that the eyes for making the owner's picture obtained after the Local treatment are in eyes-open state carries out digital image compression processing, Through the digital image compression, treated that final portrait picture is shown in screen;Wherein, the Local treatment is using eye The eye that portion is in the subsequent image of eyes-open state, which replaces, to be corresponded to portrait in first image and is in closed-eye state The eye of eyes-open state on the premise of face characteristic coincide, is directly covered in the eye of closed-eye state by eye;
If not opening, digital image compression processing is carried out to first image, at through the digital image compression Final portrait picture after reason is shown in screen.
2. the method for the portrait processing of anti-eye closing according to claim 1, which is characterized in that the digital picture pressure Contracting processing is to be handled using the digital image compression of JPEG encryption algorithms.
3. the method for the portrait processing of anti-eye closing according to claim 1, which is characterized in that described to be examined using face In method of determining and calculating detection first image after the state of the eyes of owner's picture, further include:
If the eyes of nobody's picture are in closed-eye state, digital image compression processing is carried out to first image, warp Treated that final portrait picture is shown in screen for the digital image compression.
4. the method for the portrait processing of the anti-eye closing according to claim 1 or 3, which is characterized in that described to utilize people Face detection algorithm detects the state of the eyes of owner's picture in first image, including:
The eye feature value of owner's picture in first image, the eye feature value bag are detected using Face datection algorithm Pupil middle height, interpupillary distance or the pupil gray value included;
When any portrait pupil middle height be less than or equal to preset height, then judge that the eyes of the portrait are in closed-eye state; When any portrait pupil middle height be more than the preset height, then judge the portrait eyes be in eyes-open state or;
When the interpupillary distance for not detecting any portrait, then judge that the eyes of the portrait are in closed-eye state;When detecting any people The interpupillary distance of picture, then judge the portrait eyes be in eyes-open state or;
When the pupil gray value of any portrait is less than or equal to default pupil gray value, then judge that the eyes of the portrait are in eye closing shape State;When any portrait pupil gray value be more than the default pupil gray value, then judge that the eyes of the portrait are in eye opening shape State.
5. the method for the portrait processing of anti-eye closing according to claim 1, which is characterized in that described obtain confirms bat It takes the photograph before instruction, further includes:Start camera function.
6. a kind of device of the portrait processing of anti-eye closing, which is characterized in that including:
Shooting unit confirms shooting instruction for obtaining, and image to be confirmed is obtained by the interface of finding a view for shooting portrait, described to treat Confirm image include continuously acquire several do not do digital image compression processing image;
Detection unit for obtaining first image in the image to be confirmed, utilizes Face datection algorithm detection described the The state of the eyes of owner's picture in one image is surveyed, wherein the detection includes face sorting based on the face part The ocular detection of detection and eyes detection;
The face sorting survey includes:Carry out the feature point extraction on face and classification;It will be to be determined according to the characteristic point Facial image and face template carry out template matches, if it does, then it is empty that facial image to be determined is projected to face Between;Projector distance of the test image window in the face subspace is calculated, if video in window meets threshold value comparison condition, Facial image to be determined is judged for face, is turned into wherein the face subspace is sub-face of feature in corresponding image space Subspace, the spy that the feature vector of the sample set covariance matrix of the sub-face of feature including eyes, cheek and lower jaw is formed Levy eye, feature jaw and feature lip, the feature vector of the sample set covariance matrix is from the angle of statistics by feature sub-face technology Spend the basic element for the facial image distribution to be determined found;
The ocular detection includes:According to the image of the definite face part, the three front yards ratio-dependent of five is utilized The initial position of nose;Two initial ranging rectangles are defined, respectively the location of two growths to left and right, according to human eye ash The characteristics of degree is less than face gray scale, the edge of eye is found using described search rectangle, and positions the center of pupil in eyeball;Root The ocular of the face part is determined according to the center of the initial position of the nose, the edge of eye and pupil;
The eyes detection includes:According to eye feature value, eyes-open state is in eyes or closed-eye state is sentenced It is disconnected, wherein the eye feature value includes pupil middle height, interpupillary distance or pupil gray value;
Unit is transferred, if being in closed-eye state for the eyes of at least one portrait, first image is preserved, and adjusts Take the subsequent image after first image;
Processing unit corresponds in preset period of time 2s, detecting in the subsequent image at first image Whether opened in the eyes of the portrait of closed-eye state;If opening, using corresponding this subsequent image of eyes-open state to described First image corresponds to the eye in closed-eye state and does Local treatment so that in first image owner's picture eyes In eyes-open state;The image that the eyes for making the owner's picture obtained after the Local treatment are in eyes-open state carries out number Image Compression, treated that final portrait picture is shown in screen through the digital image compression;Wherein, the part It handles to replace in first image for the eye being in the subsequent image of eyes-open state using eye and correspond at portrait In the eye of closed-eye state, on the premise of face characteristic coincide, the eye of eyes-open state is directly covered in closed-eye state Eye;
If not opening, digital image compression processing is carried out to first image, at through the digital image compression Final portrait picture after reason is shown in screen.
7. the device of the portrait processing of anti-eye closing according to claim 6, which is characterized in that the digital picture pressure Contracting processing is to be handled using the digital image compression of JPEG encryption algorithms.
8. the device of the portrait processing of anti-eye closing according to claim 6, which is characterized in that the people of the anti-eye closing Display unit, the display unit are further included as shooting the device handled, if being in closed-eye state for the eyes of nobody's picture, Digital image compression processing then is carried out to first image, through the digital image compression treated final portrait figure Piece is shown in screen.
9. the device of the portrait processing of the anti-eye closing according to claim 6 or 8, which is characterized in that described to utilize people Face detection algorithm detects the state of the eyes of owner's picture in first image, including:
The eye feature value of owner's picture in first image, the eye feature value bag are detected using Face datection algorithm Pupil middle height, interpupillary distance or the pupil gray value included;
When any portrait pupil middle height be less than or equal to preset height, then judge that the eyes of the portrait are in closed-eye state; When any portrait pupil middle height be more than the preset height, then judge the portrait eyes be in eyes-open state or;
When the interpupillary distance for not detecting any portrait, then judge that the eyes of the portrait are in closed-eye state;When detecting any people The interpupillary distance of picture, then judge the portrait eyes be in eyes-open state or;
When the pupil gray value of any portrait is less than or equal to default pupil gray value, then judge that the eyes of the portrait are in eye closing shape State;When any portrait pupil gray value be more than the default pupil gray value, then judge that the eyes of the portrait are in eye opening shape State.
10. the device of the portrait processing of anti-eye closing according to claim 6, which is characterized in that the anti-eye closing The device of portrait processing further includes start unit, the start unit, for starting camera function.
CN201510416911.7A 2015-07-15 2015-07-15 A kind of method and apparatus of the portrait processing of anti-eye closing Expired - Fee Related CN105072327B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510416911.7A CN105072327B (en) 2015-07-15 2015-07-15 A kind of method and apparatus of the portrait processing of anti-eye closing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510416911.7A CN105072327B (en) 2015-07-15 2015-07-15 A kind of method and apparatus of the portrait processing of anti-eye closing

Publications (2)

Publication Number Publication Date
CN105072327A CN105072327A (en) 2015-11-18
CN105072327B true CN105072327B (en) 2018-05-25

Family

ID=54501596

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510416911.7A Expired - Fee Related CN105072327B (en) 2015-07-15 2015-07-15 A kind of method and apparatus of the portrait processing of anti-eye closing

Country Status (1)

Country Link
CN (1) CN105072327B (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105592249B (en) * 2015-12-23 2018-12-21 努比亚技术有限公司 The terminal and method of eyelid reconstruction are carried out to personage in photo based on eyeprint identification
CN105827969A (en) * 2016-03-29 2016-08-03 乐视控股(北京)有限公司 Intelligent camera method and device, and mobile device
CN106250426A (en) * 2016-07-25 2016-12-21 深圳天珑无线科技有限公司 A kind of photo processing method and terminal
US10148884B2 (en) * 2016-07-29 2018-12-04 Microsoft Technology Licensing, Llc Facilitating capturing a digital image
CN107292261B (en) * 2017-06-16 2021-07-13 深圳天珑无线科技有限公司 Photographing method and mobile terminal thereof
CN107622483A (en) * 2017-09-15 2018-01-23 深圳市金立通信设备有限公司 A kind of image combining method and terminal
CN107743195A (en) * 2017-10-09 2018-02-27 惠州Tcl移动通信有限公司 A kind of photographic method, mobile terminal and storage medium
CN107833197B (en) * 2017-10-31 2021-03-02 Oppo广东移动通信有限公司 Image processing method and device, computer readable storage medium and electronic equipment
CN108022206A (en) * 2017-11-30 2018-05-11 广东欧珀移动通信有限公司 Image processing method, device, electronic equipment and computer-readable recording medium
CN107911608A (en) * 2017-11-30 2018-04-13 西安科锐盛创新科技有限公司 The method of anti-shooting of closing one's eyes
CN108234878A (en) * 2018-01-31 2018-06-29 广东欧珀移动通信有限公司 Image processing method, device and terminal
CN108229443A (en) * 2018-02-08 2018-06-29 三星电子(中国)研发中心 A kind of photographic method and device of anti-eye closing
CN108462831B (en) * 2018-03-18 2020-09-08 Oppo广东移动通信有限公司 Image processing method, image processing device, storage medium and electronic equipment
CN108259766B (en) * 2018-03-29 2020-05-19 宁波大学 Photographing and shooting processing method for mobile intelligent terminal
CN108259769B (en) * 2018-03-30 2020-08-14 Oppo广东移动通信有限公司 Image processing method, image processing device, storage medium and electronic equipment
CN110717349A (en) * 2018-07-11 2020-01-21 深圳纬目信息技术有限公司 Table mat and state monitoring method
CN114170069A (en) * 2021-11-25 2022-03-11 杭州电子科技大学上虞科学与工程研究院有限公司 Automatic eye closing processing method based on continuous multiple pictures

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101617339A (en) * 2007-02-15 2009-12-30 索尼株式会社 Image processing apparatus and image processing method
WO2010029922A1 (en) * 2008-09-12 2010-03-18 アイシン精機株式会社 Open/closed-eye judgment device, device for estimating degree of eye openness, and program
CN103369248A (en) * 2013-07-20 2013-10-23 厦门美图移动科技有限公司 Method for photographing allowing closed eyes to be opened
CN103716539A (en) * 2013-12-16 2014-04-09 乐视致新电子科技(天津)有限公司 Photographing method and apparatus
CN104052908A (en) * 2013-03-15 2014-09-17 卡西欧计算机株式会社 Display device and display method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8102417B2 (en) * 2006-10-25 2012-01-24 Delphi Technologies, Inc. Eye closure recognition system and method
CN100463000C (en) * 2007-09-27 2009-02-18 上海交通大学 Human eye state detection method based on cascade classification and hough circle transform
JP5169139B2 (en) * 2007-10-25 2013-03-27 株式会社ニコン Camera and image recording program
CN102193621A (en) * 2010-03-17 2011-09-21 三星电子(中国)研发中心 Vision-based interactive electronic equipment control system and control method thereof
JP6304999B2 (en) * 2013-10-09 2018-04-04 アイシン精機株式会社 Face detection apparatus, method and program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101617339A (en) * 2007-02-15 2009-12-30 索尼株式会社 Image processing apparatus and image processing method
WO2010029922A1 (en) * 2008-09-12 2010-03-18 アイシン精機株式会社 Open/closed-eye judgment device, device for estimating degree of eye openness, and program
CN102150189A (en) * 2008-09-12 2011-08-10 爱信精机株式会社 Open-eye or closed-eye determination apparatus, degree of eye openness estimation apparatus and program
CN104052908A (en) * 2013-03-15 2014-09-17 卡西欧计算机株式会社 Display device and display method
CN103369248A (en) * 2013-07-20 2013-10-23 厦门美图移动科技有限公司 Method for photographing allowing closed eyes to be opened
CN103716539A (en) * 2013-12-16 2014-04-09 乐视致新电子科技(天津)有限公司 Photographing method and apparatus

Also Published As

Publication number Publication date
CN105072327A (en) 2015-11-18

Similar Documents

Publication Publication Date Title
CN105072327B (en) A kind of method and apparatus of the portrait processing of anti-eye closing
TWI751161B (en) Terminal equipment, smart phone, authentication method and system based on face recognition
CN105184246B (en) Living body detection method and living body detection system
CN105975935B (en) A kind of face image processing process and device
CN106127167B (en) Recognition methods, device and the mobile terminal of target object in a kind of augmented reality
CN108076290B (en) Image processing method and mobile terminal
US20170161553A1 (en) Method and electronic device for capturing photo
CN110837750B (en) Face quality evaluation method and device
CN109190522B (en) Living body detection method based on infrared camera
WO2017211139A1 (en) Method and apparatus for implementing video communication
CN107330370B (en) Forehead wrinkle action detection method and device and living body identification method and system
CN102946516A (en) Mobile terminal and method for detecting blink action and realizing autodyne by mobile terminal
CN107231529A (en) Image processing method, mobile terminal and storage medium
WO2015158087A1 (en) Method and apparatus for detecting health status of human eyes and mobile terminal
CN115599219B (en) Eye protection control method, system and equipment for display screen and storage medium
CN106881716A (en) Human body follower method and system based on 3D cameras robot
CN109977846B (en) Living body detection method and system based on near-infrared monocular photography
CN106412420B (en) It is a kind of to interact implementation method of taking pictures
CN106157262B (en) Augmented reality processing method and device and mobile terminal
CN112329727A (en) Living body detection method and device
CN114187166A (en) Image processing method, intelligent terminal and storage medium
JP2010239499A (en) Communication terminal unit, communication control unit, method of controlling communication of communication terminal unit, and communication control program
CN110309693A (en) Multi-level state detecting system and method
CN106599779A (en) Human ear recognition method
WO2020119518A1 (en) Control method and device based on spatial awareness of artificial retina

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180525