CN103914689B - Picture method of cutting out and device based on recognition of face - Google Patents
Picture method of cutting out and device based on recognition of face Download PDFInfo
- Publication number
- CN103914689B CN103914689B CN201410140768.9A CN201410140768A CN103914689B CN 103914689 B CN103914689 B CN 103914689B CN 201410140768 A CN201410140768 A CN 201410140768A CN 103914689 B CN103914689 B CN 103914689B
- Authority
- CN
- China
- Prior art keywords
- picture
- cutting
- face
- crop box
- recognition
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 210000000746 body region Anatomy 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000012216 screening Methods 0.000 claims description 3
- 238000001914 filtration Methods 0.000 claims description 2
- 230000000694 effects Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 10
- 230000009466 transformation Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 238000000844 transformation Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000001815 facial effect Effects 0.000 description 1
- 235000013305 food Nutrition 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 239000000843 powder Substances 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 238000009966 trimming Methods 0.000 description 1
- 210000000216 zygoma Anatomy 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/179—Human faces, e.g. facial parts, sketches or expressions metadata assisted face recognition
Landscapes
- Engineering & Computer Science (AREA)
- Library & Information Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a kind of picture method of cutting out and device based on recognition of face.The method includes:Recognition of face is carried out to picture;If recognizing face, cutting out size according to face recognition result and target carries out cutting to the picture;If unidentified to face, main body significance identification is carried out to the picture, and cutting is carried out to the picture according to main body significance recognition result and target cutting size.The technical scheme of the embodiment of the present invention, it is possible to increase the cutting effect of picture, the drawbacks of overcoming in prior art because not carrying out content recognition or the not good improper caused picture cutting effect of recognizer to picture, lifts reading experience of the user to Web page picture.
Description
Technical field
The present embodiments relate to technical field of image processing, more particularly to the picture method of cutting out based on recognition of face and
Device.
Background technology
In webpage(Such as search results pages or products browse page)Middle insert pictures, in the mode that both pictures and texts are excellent as user's exhibition
Show web page resources, embody the future development trend of the Internet Map Reading Age.
Consider each picture to be shown in webpage, its shapes and sizes would generally difference, if not to these figures
Piece is processed through size and is directly shown, whole webpage can be caused to look especially mixed and disorderly, the reading experience of user is affected,
Very severe visual effect can be brought sometimes even.Therefore, in order that each picture in webpage is kept on pattern is represented
Unified, need to carry out picture rational cutting, such competence exertion goes out optimal to represent experience effect.
At present, traditional picture tailoring technique is typically:High figure crop bottom, wide figure cutting both sides, or cutting retain
Center picture part.But, these traditional cutting methods often cause the main part in picture to be truncated, so that net
The picture presented in page is looked and is most unseemly.For this purpose, prior art proposes a kind of picture tailoring technique, the technology is first
Main body identification is carried out to picture first, image cropping is carried out according to main body position then.But the algorithm of main body identification is complicated,
The precision of main body identification is nor very high, and sometimes main body position with character positions and mismatches in picture, therefore cuts out
Cut effect still not good.
Content of the invention
The embodiment of the present invention provides the picture method of cutting out and device based on recognition of face, is imitated with improving the cutting of picture
Really, overcome not good because not carrying out content recognition or the improper caused picture cutting effect of recognizer to picture in prior art
The drawbacks of, lift reading experience of the user to Web page picture.
In a first aspect, embodiments providing a kind of picture method of cutting out based on recognition of face, the method includes:
Recognition of face is carried out to picture;
If recognizing face, cutting out size according to face recognition result and target carries out cutting to the picture;
If unidentified carry out main body significance identification to face to the picture, according to main body significance recognition result
Cutting is carried out to the picture with target cutting size.
Second aspect, the embodiment of the present invention additionally provide a kind of picture Scissoring device based on recognition of face, the device bag
Include:
Face recognition module, for carrying out recognition of face to picture;
First cutting module, if recognizing face for the face recognition module, according to face recognition result and mesh
Mark cuts out size carries out cutting to the picture;
Second cutting module, if unidentified to face for the face recognition module, carries out main body to the picture
Significance identification, carries out cutting according to main body significance recognition result and target cutting size to the picture.
The technical scheme that the embodiment of the present invention is proposed, carries out recognition of face to picture, first in the unidentified feelings to face
Main body identification is carried out under condition, picture cutting is carried out according to face or main body recognition result then, so can ensure that in search knot
Fruit page or products browse page draw above chip size keep neat, and the core letter such as the face of key, the number of people or primary objects
Breath can be able to complete displaying as far as possible, will not bring severe visual effect, have very big lifting and side to image reading experience
Help.Compared to content recognition or recognizer improperly picture cutting scheme is not carried out in prior art to picture, more it is avoided that
Show indecency picture.
Description of the drawings
Fig. 1 is a kind of schematic flow sheet of picture method of cutting out based on recognition of face that the embodiment of the present invention one is provided;
Fig. 2 is a kind of display schematic diagram for treating cutting picture that the embodiment of the present invention one is provided;
Fig. 3 is a kind of schematic flow sheet of picture method of cutting out based on recognition of face that the embodiment of the present invention two is provided;
Fig. 4 A are the display schematic diagrams of picture to be presented on a kind of webpage of the offer of the embodiment of the present invention two;
Fig. 4 B are picture to be presented and corresponding initial crop frames on a kind of webpage of the offer of the embodiment of the present invention two
Display schematic diagram;
Fig. 4 C are picture to be presented, corresponding initial crop frame and people on a kind of webpage of the offer of the embodiment of the present invention two
The display schematic diagram of face identification region;
Fig. 4 D be picture to be presented on a kind of webpage that the embodiment of the present invention two is provided, the crop box after corresponding adjustment with
And the display schematic diagram in recognition of face region;
Fig. 5 is a kind of structural representation of picture Scissoring device based on recognition of face that the embodiment of the present invention three is provided.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment that states is used only for explaining the present invention, rather than limitation of the invention.It also should be noted that, in order to just
Part related to the present invention rather than entire infrastructure is illustrate only in description, accompanying drawing.
Embodiment one
Fig. 1 is a kind of schematic flow sheet of picture method of cutting out based on recognition of face that the embodiment of the present invention one is provided.
The present embodiment is applicable to the situation for carrying out cutting when dimension of picture is larger to picture, be particularly suitable for when search results pages or
In products browse page each dimension of picture disunity to be shown and larger when, these pictures are carried out with the such a applied field of cutting
Scape.The method can be executed by the picture Scissoring device based on recognition of face, and described device is realized by software and/or hardware,
Can be built in the electronic equipments such as smart mobile phone, panel computer, notebook computer, desktop computer or personal digital assistant.Referring to
Fig. 1, specifically includes following operation based on the picture method of cutting out of recognition of face:
110th, recognition of face is carried out to picture.
In the present embodiment, picture can be set or user input treats cutting picture.Face recognition process can profit
With 80 nodes or punctuate from low to high is distributed on face, carried out by measuring the spacing between eyes, cheekbone, chin etc.
The detection of face.Wherein, face recognition algorithms are including but not limited to:Based on the method for template matching, it is based on singular value features
Method, sub-space analysis method, locality preserving projections or PCA etc..A specific embodiment in the present embodiment
In, recognition of face is carried out to picture and be may particularly include:Face characteristic model is obtained according to corpus data set in advance training, its
In the corpus data be a large amount of people face feature;According to the face included in the face characteristic model inspection picture for obtaining.
If 120 recognize face, cutting out size according to face recognition result and target carries out cutting to picture.
Deposit in picture is recognized in the context of a person's face, can be further determined that in picture according to face recognition result first
Comprising the number of face, position and area, number then according to face, position and area, and target cuts out size,
Cutting is carried out to picture.Specifically, according to the number of the face included in picture, position and area, and tailoring ruler can be marked
Very little, determine the position of crop box, and target is cut out size as the size of crop box, crop box finally according to determined by
Cutting is carried out to picture.It should be noted that in embodiments of the present invention, the position of crop box refers to crop box and corresponds to
Position in picture.
Wherein, face area is the area in facial contour region determined by when recognition of face is carried out to picture.The wheel
Wide region can be the irregularly shaped region that can surround human face five-sense-organ, or other can surround the circle of human face five-sense-organ, square
The rule shape area such as shape.Preferably, determine the area of the face included in picture, may particularly include:Determine and can surround people
The minimum rectangular area of face face;Calculate rectangular area area, using result of calculation as face area.
Target cuts out size(That is the size of crop box)Can be set in advance, may also be according to the standard for setting
The original size of the size of picture and picture determines in real time.Wherein, the size of normal pictures is can determine picture cutting
Into which kind of size, so that the size of the picture after cutting is consistent with the size of normal pictures, or the picture after cutting
The consistent size of size and normal pictures after level specific pressure contracting.The present embodiment can describe size using width * height.Example
Such as, as 80*100, the original size of picture is 100*120 to the size of the normal pictures for setting, and now target is cut out size and can be
96*120,88*110 or 84*105.Obviously, the dimension scale of the normal pictures of setting is cut out dimension scale with target and is
0.8.
In the present embodiment, according to the face included in picture number, position and area, and target cuts out size
Come determine crop box position when, can by the location positioning of crop box in:In the premise that crop box meets target cutting size
Under, position when can draw a circle to approve position during all faces in picture, or can draw a circle to approve the maximum face of area in picture, or
Person can draw a circle to approve the face of groups of people in picture and position of other people face when not being truncated.Certainly, other can also be passed through
The position of crop box is for example set to the center of the maximum face of area in picture determining the position of crop box for mode
Place.
If 130 unidentified carry out main body significance identification to picture to face, according to main body significance recognition result
Cutting is carried out to picture with target cutting size.
Wherein, the identification of main body significance refers to the identification carried out by the significant characteristics of the main body in addition to face.Main
Body can be tables and chairs, flower, food or personage etc..Unidentified to face in the case of, set algorithm can be adopted to picture
Main body significance identification is carried out, for example:LAB colour space transformations are carried out to picture first;By to through colour space transformation
Picture afterwards carries out DCT(Discrete CosineTransform, discrete cosine transform)Process, remove low frequency therein into
Point;DCT results after low-frequency component is filtered are carried out DCT inverse transformations, so as to obtain being protected according to inverse transformation result
The body region that stays, that is, the result of main body significance identification.
After main body significance recognition result is obtained, can according to main body significance recognition result and target cutting size come
Determine the position of crop box, and target is cut out size as the size of crop box, crop box is to figure finally according to determined by
Piece carries out cutting.Wherein it is determined that the position process of crop box can be found in above-mentioned according to face recognition result and target cutting size
To determine the position process of crop box, as long as the face in will be above-mentioned replaces with main body.Will not be described here.
Preferably, if number, position according to the face included in picture or main body and area, and target cuts out
Size, determine crop box position fail when, can directly using the center of picture as crop box position.
In the size and position that determine crop box, namely after determining crop box, crop box pair according to determined by
Picture carries out cutting, so as to obtain the dimension scale identical picture with normal pictures, afterwards again to obtained cutting after
Picture carries out level specific pressure contracting and just can obtain being suitable for web displaying, the normal pictures that size is unified.For example, the normal pictures of setting
Size be 80*100, treat that the size of the picture of cutting is 100*120, the size of the picture after cutting out is 96*120, therefore need right
The picture pixels of the 96*120 sizes after cutting are compressed with 96/86 ratio, to obtain the normal pictures of 80*100 sizes.
The present embodiment is the display effect after ensureing picture cutting, first the content of picture is recognized, Zhi Hougen
Cutting is carried out to picture according to content recognition result.Specifically, because main body has a randomness, therefore the granularity of main body significance identification
Thicker relative to recognition of face granularity, therefore when content recognition is carried out to picture, initially with face recognition scheme, do not knowing
It is clipped in picture and deposits in the context of a person's face, then entity is carried out to picture and significantly recognizes.
The technical scheme that the present embodiment is proposed, it is ensured that in search results pages or products browse page draw above chip size
Keep neat, and the core information such as the face of key, the number of people or primary objects can be able to complete displaying as far as possible, will not band
Carry out severe visual effect, have very big lifting and help to image reading experience.Picture is not carried out compared in prior art
Content recognition or recognizer improperly picture cutting scheme, is more avoided that and shows indecency picture.
Fig. 2 is a kind of display schematic diagram for treating cutting picture that the embodiment of the present invention one is provided.Referring to Fig. 2, cutting figure is treated
Piece is a perpendicular figure(As tall and big in wide picture), main body personage correspondingly erects the vertical rectangular area 210 in figure, if not first
Carry out recognition of face to picture, but only do the identification of main body significance, then the main body that can only draw the figure is a vertical square
Shape region, it is not clear that the part of core in this main body(That is face)Position.If the perpendicular figure is cut into square
When face may be cropped.If first recognition of face is done to picture, determine the position of face, then can be by crop box
Position be set in and can draw a circle to approve at the position of face, so can ensure that the integrity of face after cutting.
Embodiment two
Fig. 3 is a kind of schematic flow sheet of picture method of cutting out based on recognition of face that the embodiment of the present invention two is provided.
Determination operation and the determination of crop box of the present embodiment on the basis of the various embodiments described above, preferably to target cutting size
Operation is done and is further optimized, so that the face and main body in the picture after cutting is not truncated as far as possible, lifts user to picture
Reading experience.Referring to Fig. 3, should be included based on the picture method of cutting out of recognition of face:
310th, according to the size and the original size of picture of the normal pictures for setting, determine that the cutting method of picture is horizontal
Cutting or vertical cutting;
320th, cutting method according to determined by, calculates the minimum length for needing to crop on the high or width of picture, determines
The target cutting size of picture;
330th, recognition of face is carried out to picture, judges whether to recognize face, if recognizing face, execute operation 340-
360, otherwise execute operation 370-380;
340th, number, position and the area of face included in picture are determined;
350th, according to face number, position and area, and target cutting size, position the first crop box center
To determine that crop box, wherein crop box meet following condition:Crop box can draw a circle to approve all faces in picture, the first crop box
Center is the center of all faces in picture;
If 360 positioning failures, the number, position and area according to face, and target cutting size, again fixed
At least one second crop box centers of position meet following condition to determine crop box, wherein crop box:Crop box can be enclosed
Determine the face of groups of people in picture, and the face that is not drawn a circle to approve in picture will not be blocked;Continue executing with operation 390;
370th, main body significance identification is carried out to picture;
380th, the body region included according to main body significance recognition result, and target cutting size, location cutting
Frame center meets following condition to determine crop box, wherein crop box:Crop box enclosed region and master firmly in picture
The intersecting area area of body region reaches the threshold value of setting, center of the crop box center for intersecting area;Continue to hold
Row operation 390;
390th, crop box according to determined by carries out cutting to picture.
The above-mentioned operation 310-320 cun is determined by target cutting ruler, enable to cropped fall picture minimum, protect
Face or main body during card cutting picture included in picture is not truncated as far as possible.Specifically, determine that target cuts out the mistake of size
Cheng Kewei:According to the size and the original size of picture of the normal pictures for setting, determine that the cutting method of picture is horizontal cutting
Or vertical cutting;Cutting method according to determined by, calculates the minimum length for needing to crop on the high or width of picture;According to
The minimum length for being calculated determines the target cutting size of picture;Wherein, the chi of target cutting dimension scale and normal pictures
Very little ratio is identical.
For example, if the width of normal pictures is high to be respectively W1 and H1, the original wide high of picture is respectively W2 and H2.Determining mesh
Mark is when cutting out size, can calculate first normal pictures aspect ratio value K1 (i.e. W1/H1) and picture original aspect ratio value K2 (i.e.
W2/H2);
If K1>K2, then judge using horizontal cutting method, calculate the minimum for needing to crop on the original high H2 of picture
Length is:H2-W2/K1, the target cutting size of picture is:The wide W of the picture after cutting is identical with original wide W2, after cutting
The high H of picture is W2*H1/W1;
If K1<K2, then judge using vertical cutting method, calculate the minimum length for needing to crop on the wide W2 of picture
For:W2-H2*K1, the target cutting size of picture is:The wide W of the picture after cutting be H2*W1/H1, the height of the picture after cutting
H is identical with original high H2.
For more clearly illustrating the picture method of cutting out based on recognition of face of the present embodiment proposition, now carry out illustrating
Bright.
Fig. 4 A are the display schematic diagrams of picture to be presented on a kind of webpage of the offer of the embodiment of the present invention two.Fig. 4 B are these
The display schematic diagram of picture to be presented and corresponding initial crop frame on a kind of webpage that bright embodiment two is provided.Fig. 4 C are these
The display of picture to be presented, corresponding initial crop frame and recognition of face region on a kind of webpage that inventive embodiments two are provided
Schematic diagram.Fig. 4 D be picture to be presented on a kind of webpage that the embodiment of the present invention two is provided, the crop box after corresponding adjustment with
And the display schematic diagram in recognition of face region.
Referring to Fig. 4 A, Fig. 4 B, Fig. 4 C and Fig. 4 D, as the size of normal pictures to be presented on webpage is 121*75, institute
121 be should be with target cutting dimension scale:75, initial crop frame 410 as shown in Figure 4 B, the initial crop frame 410 are illustrated
Cutting method is horizontal cutting, and target cutting dimension scale is 121:75.Rectangle frame 420 shown in Fig. 4 C is surrounded
Region is by the human face region that identifies.After face is recognized, according to face recognition result and target cutting size, will
Initial crop frame 410 slides into the position that can draw a circle to approve the human face region surrounded by rectangle frame 420, as shown in fig.4d.
The technical scheme that the present embodiment is provided, by carrying out recognition of face to image content, detects number, the position of face
Put and area, then rational cutting position is determined based on these information and target cutting size, cutting is carried out to picture, to ensure
The integrity of face;If not including face in picture, then carry out main body significance identification again to picture, and be directed to picture institute
Comprising body region and target cutting size determine rational cutting position, carry out picture cutting, to ensure that final picture is cut out
Cut the refined of effect.
On the basis of above-mentioned technical proposal, determine in the case where face is recognized after finishing crop box, also include:
If determined by crop box quantity be more than one, screen according to regular crop box to determined by is set;By filtered out
The center of all crop boxs is weighted and obtains new crop box center, to determine new crop box;
Wherein, setting rule includes following at least one:Meet center to be less than or equal to set with the distance at the top of picture
Fixed first threshold;The face number that can be drawn a circle to approve is more than or equal to the Second Threshold for setting;The maximum face of area can be drawn a circle to approve.
So so that after follow-up new crop box according to determined by carries out trimming operation to picture, more can guarantee that and search
On rope result page or products browse page, in picture, this core information of the larger face of area is able to as far as possible complete displaying.
Embodiment three
Fig. 5 is a kind of structural representation of picture Scissoring device based on recognition of face that the embodiment of the present invention three is provided.
The present embodiment is applicable to the situation for carrying out cutting when dimension of picture is larger to picture, is particularly suitable for when to be shown in webpage
Each dimension of picture disunity and larger when carry out the such a application scenarios of cutting to picture.Referring to Fig. 5, the device concrete
Structure includes:
Face recognition module 510, for carrying out recognition of face to picture;
First cutting module 520, if recognizing face for face recognition module 510, according to face recognition result and
Target is cut out size and carries out cutting to the picture;
Second cutting module 530, if unidentified to face for face recognition module, carry out main body and shows to the picture
The identification of work property, carries out cutting according to main body significance recognition result and target cutting size to the picture.
Further, the device also includes target cutting size determining module 500, in the first cutting module 520 or
Before second picture of cutting module 530 pairs carries out cutting:
According to the size and the original size of the picture of the normal pictures for setting, determine that the cutting method of the picture is
Laterally cutting or vertical cutting;
Cutting method according to determined by, calculates the minimum length for needing to crop on the high or width of the picture;
Minimum length according to being calculated determines the target cutting size of the picture;
Wherein, the target cutting dimension scale is identical with the dimension scale of the normal pictures.
Further, the first cutting module 520, including:
Face information determination sub-module 521, for determining number, the position dough-making powder of the face included in the picture
Product;
First picture cutting submodule 522, for the number according to the face, position and area, and target is cut out
Size, carries out cutting to the picture.
Further, face information determination sub-module 521, specifically for:Determine the minimum rectangle that can surround human face five-sense-organ
Region;Calculate the area of the rectangular area, using result of calculation as face area.
Further, the first picture cutting submodule 522, including:
First crop box determining unit 5220, for the number according to the face, position and area, and the target
Cutting size, positions the first crop box center to determine crop box;Wherein described crop box meets following condition:The sanction
Cut frame and can draw a circle to approve all faces in the picture;The first crop box center is all faces in the picture
Center;
Second crop box determining unit 5222, if for the positioning failure of the first crop box determining unit 4221, basis
The number of the face, position and area, and the target cutting size, reposition at least one the second crop box center
Position is determining crop box;Wherein described crop box meets following condition:The crop box can draw a circle to approve part in the picture
The face of people, and the face that is not drawn a circle to approve in the picture will not be blocked;
Picture cutting unit 5224, carries out cutting for crop box determined by basis to the picture.
Further, the first picture cutting submodule 522 also includes crop box screening unit 5223, in the first cutting
After frame determining unit 5220 or the determination of the second crop box determining unit 5222 finish crop box:
If determined by crop box quantity be more than one, screen according to regular crop box to determined by is set;Will
The center of all crop boxs for filtering out is weighted and obtains new crop box center, to determine new crop box;
Wherein, the rule that sets includes following at least one:
Meet center the first threshold for setting is less than or equal to the distance at the top of the picture;
The face number that can be drawn a circle to approve is more than or equal to the Second Threshold for setting;
The maximum face of area can be drawn a circle to approve.
Further, the second cutting module 530, including:
Main body significance recognition unit 5300, if unidentified to face for the face recognition module, to the figure
Piece carries out main body significance identification;
Crop box determining unit 5302, for the body region included according to main body significance recognition result, Yi Jisuo
State target cutting size, location cutting frame center is determining crop box;Wherein described crop box meets following condition:Described
Crop box intersecting area area of enclosed region firmly and the body region in the picture reaches the threshold value of setting;Described
Crop box center is the center of the intersecting area;
Picture cutting unit 5304, carries out cutting for crop box determined by basis to the picture.
The said goods can perform the method provided by any embodiment of the present invention, possess the corresponding functional module of execution method
And beneficial effect.
Note, above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that
The invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art various obvious changes,
Readjust and substitute without departing from protection scope of the present invention.Therefore, although the present invention is carried out by above example
It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also
Other Equivalent embodiments more can be included, and the scope of the present invention is determined by scope of the appended claims.
Claims (8)
1. a kind of picture method of cutting out based on recognition of face, it is characterised in that include:
Recognition of face is carried out to picture;
If recognizing face, cutting out size according to face recognition result and target carries out cutting to the picture;
If unidentified to face, main body significance identification is carried out to the picture, according to main body significance recognition result and mesh
Mark cutting size carries out cutting to the picture;
Wherein, cutting out size according to face recognition result and target and carry out cutting to the picture includes:
Determine number, position and the area of face included in the picture;
Number, position and area according to the face, and target cuts out size, carries out cutting to the picture;
Wherein, according to the face number, position and area, and target cutting size, carry out cutting to the picture, wrap
Include:
Number, position and area according to the face, and the target cutting size, position the first crop box center
To determine crop box;Wherein described crop box meets following condition:The crop box can draw a circle to approve everyone in the picture
Face;The first crop box center is the center of all faces in the picture;
If positioning failure, the number, position and area according to the face, and the target cutting size, again fixed
At least one second crop box centers of position are determining crop box;Wherein described crop box meets following condition:The cutting
Frame can draw a circle to approve the face of groups of people in the picture, and will not block the face that is not drawn a circle to approve in the picture;
According to determined by, crop box carries out cutting to the picture;
Wherein, after determination finishes crop box, also include:If determined by crop box quantity be more than one, according to set rule
Then to determined by, crop box is screened;The center of all crop boxs for filtering out is weighted and obtains new cutting
Frame center, to determine new crop box;
Wherein, the rule that sets includes following at least one:
Meet center the first threshold for setting is less than or equal to the distance at the top of the picture;
The face number that can be drawn a circle to approve is more than or equal to the Second Threshold for setting;
The maximum face of area can be drawn a circle to approve.
2. the picture method of cutting out based on recognition of face according to claim 1, it is characterised in that the picture is being entered
Before row cutting, also include:
According to the size and the original size of the picture of the normal pictures for setting, determine that the cutting method of the picture is horizontal
Cutting or vertical cutting;
Cutting method according to determined by, calculates the minimum length for needing to crop on the high or width of the picture;
Minimum length according to being calculated determines the target cutting size of the picture;
Wherein, the target cutting dimension scale is identical with the dimension scale of the normal pictures.
3. the picture method of cutting out based on recognition of face according to claim 1, it is characterised in that determine in the picture
Comprising face area, including:Determine the minimum rectangular area that can surround human face five-sense-organ;Calculate the face of the rectangular area
Product, using result of calculation as face area.
4. the picture method of cutting out based on recognition of face according to claim 1, it is characterised in that according to main body significance
Recognition result and target cutting size carry out cutting to the picture, including:
According to the body region included by main body significance recognition result, and the target cutting size, in location cutting frame
Heart position is determining crop box;Wherein described crop box meets following condition:The crop box in the picture enclosed firmly
The intersecting area area of region and the body region reaches the threshold value of setting;The crop box center is the intersection
The center in domain;
According to determined by, crop box carries out cutting to the picture.
5. a kind of picture Scissoring device based on recognition of face, it is characterised in that include:
Face recognition module, for carrying out recognition of face to picture;
First cutting module, if recognizing face for the face recognition module, cuts according to face recognition result and target
Tailor's measure cun carries out cutting to the picture;
Second cutting module, if unidentified to face for the face recognition module, carries out main body to the picture notable
Property identification, cutting is carried out to the picture according to main body significance recognition result and target cutting size;
Wherein, the first cutting module, including:
Face information determination sub-module, for determining number, position and the area of the face included in the picture;
First picture cutting submodule, for the number according to the face, position and area, and target cuts out size, right
The picture carries out cutting;
Wherein, the first picture cutting submodule, including:
First crop box determining unit, for the number according to the face, position and area, and the target cutting ruler
Very little, position the first crop box center to determine crop box;Wherein described crop box meets following condition:The crop box energy
All faces in the picture are enough drawn a circle to approve;The first crop box center is the centre bit of all faces in the picture
Put;
Second crop box determining unit, if for the first crop box determining unit positioning failure, according to the face
Number, position and area, and the target cutting size repositions at least one the second crop box center with true
Determine crop box;Wherein described crop box meets following condition:The crop box can draw a circle to approve the face of groups of people in the picture,
And the face that is not drawn a circle to approve in the picture will not be blocked;
Picture cutting unit, carries out cutting for crop box determined by basis to the picture;
Wherein, the first picture cutting submodule also includes crop box screening unit, for determining in first crop box
After unit or the determination of the second crop box determining unit finish crop box:
If determined by crop box quantity be more than one, screen according to regular crop box to determined by is set;Will screening
The center of all crop boxs for going out is weighted and obtains new crop box center, to determine new crop box;
Wherein, the rule that sets includes following at least one:
Meet center the first threshold for setting is less than or equal to the distance at the top of the picture;
The face number that can be drawn a circle to approve is more than or equal to the Second Threshold for setting;
The maximum face of area can be drawn a circle to approve.
6. the picture Scissoring device based on recognition of face according to claim 5, it is characterised in that also include target cutting
Size determining module, for before the first cutting module or the second cutting module carry out cutting to the picture:
According to the size and the original size of the picture of the normal pictures for setting, determine that the cutting method of the picture is horizontal
Cutting or vertical cutting;
Cutting method according to determined by, calculates the minimum length for needing to crop on the high or width of the picture;
Minimum length according to being calculated determines the target cutting size of the picture;
Wherein, the target cutting dimension scale is identical with the dimension scale of the normal pictures.
7. the picture Scissoring device based on recognition of face according to claim 5, it is characterised in that the face information is true
Stator modules, specifically for:Determine the minimum rectangular area that can surround human face five-sense-organ;The area of the rectangular area is calculated, will
Area of the result of calculation as face.
8. the picture Scissoring device based on recognition of face according to claim 5, it is characterised in that the second cutting mould
Block, including:
Main body significance recognition unit, if unidentified to face for the face recognition module, leads to the picture
Body significance is recognized;
Crop box determining unit, for the body region included according to main body significance recognition result, and the target is cut out
Cut size, location cutting frame center is determining crop box;Wherein described crop box meets following condition:The crop box exists
In the picture, the intersecting area area of enclosed region firmly and the body region reaches the threshold value of setting;In the crop box
Heart position is the center of the intersecting area;
Picture cutting unit, carries out cutting for crop box determined by basis to the picture.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410140768.9A CN103914689B (en) | 2014-04-09 | 2014-04-09 | Picture method of cutting out and device based on recognition of face |
PCT/CN2014/094231 WO2015154516A1 (en) | 2014-04-09 | 2014-12-18 | Face recognition-based picture cutting method, device and apparatus, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410140768.9A CN103914689B (en) | 2014-04-09 | 2014-04-09 | Picture method of cutting out and device based on recognition of face |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103914689A CN103914689A (en) | 2014-07-09 |
CN103914689B true CN103914689B (en) | 2017-03-15 |
Family
ID=51040358
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410140768.9A Active CN103914689B (en) | 2014-04-09 | 2014-04-09 | Picture method of cutting out and device based on recognition of face |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103914689B (en) |
WO (1) | WO2015154516A1 (en) |
Families Citing this family (66)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103914689B (en) * | 2014-04-09 | 2017-03-15 | 百度在线网络技术(北京)有限公司 | Picture method of cutting out and device based on recognition of face |
CN105335925A (en) * | 2014-07-30 | 2016-02-17 | 北京畅游天下网络技术有限公司 | Picture clipping method and browser device |
CN104952027A (en) * | 2014-10-11 | 2015-09-30 | 腾讯科技(北京)有限公司 | Face-information-contained picture cutting method and apparatus |
CN104392202A (en) * | 2014-10-11 | 2015-03-04 | 北京中搜网络技术股份有限公司 | Image-identification-based automatic cutting method |
CN104360854B (en) * | 2014-11-03 | 2018-08-10 | 联想(北京)有限公司 | A kind of information processing method and electronic equipment |
CN104484853A (en) * | 2014-12-24 | 2015-04-01 | 北京奇虎科技有限公司 | Method and device for clipping pictures containing graphical signs |
CN104484855B (en) * | 2014-12-24 | 2018-03-27 | 北京奇虎科技有限公司 | The method and apparatus that picture is cut |
CN104484854A (en) * | 2014-12-24 | 2015-04-01 | 北京奇虎科技有限公司 | Cropping method and device for people pictures |
WO2016101767A1 (en) * | 2014-12-24 | 2016-06-30 | 北京奇虎科技有限公司 | Picture cropping method and device and image detecting method and device |
CN104504649A (en) * | 2014-12-30 | 2015-04-08 | 百度在线网络技术(北京)有限公司 | Picture cutting method and device |
CN105825243A (en) * | 2015-01-07 | 2016-08-03 | 阿里巴巴集团控股有限公司 | Method and device for certificate image detection |
WO2016179808A1 (en) * | 2015-05-13 | 2016-11-17 | Xiaoou Tang | An apparatus and a method for face parts and face detection |
CN104866565B (en) * | 2015-05-21 | 2019-03-12 | 百度在线网络技术(北京)有限公司 | Image searching method and device |
CN106326823B (en) * | 2015-07-07 | 2020-06-30 | 北京神州泰岳软件股份有限公司 | Method and system for obtaining head portrait in picture |
CN105528786B (en) * | 2015-12-04 | 2019-10-01 | 小米科技有限责任公司 | Image processing method and device |
CN105469074A (en) * | 2015-12-23 | 2016-04-06 | 苏州汇莱斯信息科技有限公司 | Face recognition algorithm based on singular value decomposition |
CN106920141A (en) * | 2015-12-28 | 2017-07-04 | 阿里巴巴集团控股有限公司 | Page presentation content processing method and device |
CN105787869A (en) * | 2016-02-18 | 2016-07-20 | 王萌 | Face identification screenshot method |
CN105718439B (en) * | 2016-03-04 | 2018-10-26 | 广州微印信息科技有限公司 | A kind of photo automatic composing method based on recognition of face |
CN105761205B (en) * | 2016-03-17 | 2018-12-11 | 网易有道信息技术(北京)有限公司 | A kind of picture put-on method and device |
CN107437051A (en) * | 2016-05-26 | 2017-12-05 | 上海市公安局刑事侦查总队 | Image processing method and device |
CN106383707A (en) * | 2016-09-07 | 2017-02-08 | 努比亚技术有限公司 | Picture display method and system |
CN107009412B (en) * | 2017-04-12 | 2019-05-28 | 广东工业大学 | A kind of certificate photo automatic cutting method, apparatus and system |
CN107291342B (en) * | 2017-05-03 | 2020-01-31 | 广东小天才科技有限公司 | read-on-demand data copying and outlining method and device |
CN107240105A (en) * | 2017-06-05 | 2017-10-10 | 深圳市茁壮网络股份有限公司 | A kind of image cropping method and device |
CN107463914A (en) * | 2017-08-11 | 2017-12-12 | 环球智达科技(北京)有限公司 | Image cutting method |
CN107562877A (en) * | 2017-09-01 | 2018-01-09 | 北京搜狗科技发展有限公司 | Display methods, device and the device shown for view data of view data |
WO2019071386A1 (en) * | 2017-10-09 | 2019-04-18 | 深圳传音通讯有限公司 | Image data processing method and device |
CN109657526B (en) * | 2017-10-12 | 2020-12-01 | 飞狐信息技术(天津)有限公司 | Intelligent picture cutting method and system based on face recognition |
CN108062755B (en) * | 2017-11-02 | 2020-10-02 | 广东数相智能科技有限公司 | Intelligent picture clipping method and device |
CN108154515A (en) * | 2017-12-27 | 2018-06-12 | 三星电子(中国)研发中心 | Picture shows method and apparatus |
CN108364295A (en) * | 2018-01-08 | 2018-08-03 | 武汉斗鱼网络科技有限公司 | A kind of cropping method and system |
CN108597003A (en) * | 2018-04-20 | 2018-09-28 | 腾讯科技(深圳)有限公司 | A kind of article cover generation method, device, processing server and storage medium |
CN108647590A (en) * | 2018-04-25 | 2018-10-12 | 董志忠 | A kind of intelligence head portrait Processing Algorithm |
CN108776970B (en) * | 2018-06-12 | 2021-01-12 | 北京字节跳动网络技术有限公司 | Image processing method and device |
CN109448001B (en) * | 2018-10-26 | 2021-08-27 | 世纪开元智印互联科技集团股份有限公司 | Automatic picture clipping method |
CN109447072A (en) * | 2018-11-08 | 2019-03-08 | 北京金山安全软件有限公司 | Thumbnail clipping method and device, electronic equipment and readable storage medium |
CN109712164A (en) * | 2019-01-17 | 2019-05-03 | 上海携程国际旅行社有限公司 | Image intelligent cut-out method, system, equipment and storage medium |
CN110223301B (en) * | 2019-03-01 | 2021-08-03 | 华为技术有限公司 | Image clipping method and electronic equipment |
CN109919156B (en) * | 2019-03-13 | 2022-07-19 | 网易传媒科技(北京)有限公司 | Training method, medium and device of image cropping prediction model and computing equipment |
CN111652015B (en) * | 2019-03-27 | 2024-04-26 | 上海铼锶信息技术有限公司 | Method and system for selecting key faces in picture |
CN110297927B (en) * | 2019-05-17 | 2022-07-29 | 百度在线网络技术(北京)有限公司 | Article publishing method, device, equipment and storage medium |
CN110189378B (en) * | 2019-05-23 | 2022-03-04 | 北京奇艺世纪科技有限公司 | Video processing method and device and electronic equipment |
CN110264396B (en) * | 2019-06-27 | 2022-11-18 | 杨骥 | Video face replacement method, system and computer readable storage medium |
CN110349082B (en) * | 2019-06-28 | 2023-08-29 | 腾讯科技(深圳)有限公司 | Image area clipping method and device, storage medium and electronic device |
CN110334653A (en) * | 2019-07-08 | 2019-10-15 | 聚好看科技股份有限公司 | Image processing method, device and equipment in video communication |
CN110706150A (en) * | 2019-07-12 | 2020-01-17 | 北京达佳互联信息技术有限公司 | Image processing method, image processing device, electronic equipment and storage medium |
CN110782392B (en) * | 2019-07-12 | 2023-11-14 | 北京达佳互联信息技术有限公司 | Image processing method, device, electronic equipment and storage medium |
CN110580678B (en) * | 2019-09-10 | 2023-06-20 | 北京百度网讯科技有限公司 | Image processing method and device |
CN110807361B (en) * | 2019-09-19 | 2023-08-08 | 腾讯科技(深圳)有限公司 | Human body identification method, device, computer equipment and storage medium |
CN112541934B (en) * | 2019-09-20 | 2024-02-27 | 百度在线网络技术(北京)有限公司 | Image processing method and device |
CN110750664B (en) * | 2019-10-15 | 2023-03-28 | 腾讯科技(深圳)有限公司 | Picture display method and device |
CN111062279B (en) * | 2019-12-04 | 2023-06-06 | 深圳先进技术研究院 | Photo processing method and photo processing device |
CN111079662A (en) * | 2019-12-19 | 2020-04-28 | 江苏云从曦和人工智能有限公司 | Figure identification method and device, machine readable medium and equipment |
CN111125526B (en) * | 2019-12-24 | 2023-03-14 | 腾讯科技(深圳)有限公司 | Content pushing method and device based on artificial intelligence and electronic equipment |
CN113095119B (en) * | 2020-01-09 | 2023-11-21 | 北京君正集成电路股份有限公司 | Face recognition system for correcting face cutting frame |
CN111243061B (en) * | 2020-01-21 | 2022-12-20 | 苏宁云计算有限公司 | Commodity picture generation method, device and system |
CN111462121A (en) * | 2020-03-23 | 2020-07-28 | 上海携程商务有限公司 | Image cropping method, system, device and medium based on image semantic understanding |
CN111524145B (en) * | 2020-04-13 | 2024-06-04 | 北京智慧章鱼科技有限公司 | Intelligent picture cropping method, intelligent picture cropping system, computer equipment and storage medium |
CN113709354A (en) * | 2020-05-20 | 2021-11-26 | 华为技术有限公司 | Shooting method and electronic equipment |
CN114359301B (en) * | 2020-09-29 | 2024-05-28 | 合肥君正科技有限公司 | Face clipping optimization method of self-adaptive expansion coefficient |
CN112016548B (en) * | 2020-10-15 | 2021-02-09 | 腾讯科技(深圳)有限公司 | Cover picture display method and related device |
CN112927241A (en) * | 2021-03-08 | 2021-06-08 | 携程旅游网络技术(上海)有限公司 | Picture capturing and thumbnail generating method, system, equipment and storage medium |
CN113159026A (en) * | 2021-03-31 | 2021-07-23 | 北京百度网讯科技有限公司 | Image processing method, image processing apparatus, electronic device, and medium |
CN113763242A (en) * | 2021-05-17 | 2021-12-07 | 腾讯科技(深圳)有限公司 | Image processing method and device and computer readable storage medium |
CN116543004B (en) * | 2023-07-05 | 2024-04-19 | 荣耀终端有限公司 | Image cutting method, device, terminal equipment and computer readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101685620A (en) * | 2008-09-26 | 2010-03-31 | 鸿富锦精密工业(深圳)有限公司 | Display device capable of adjusting image and image adjusting method |
CN102063709A (en) * | 2011-01-12 | 2011-05-18 | 中山大学 | Method for improving picture composition effect of digital camera |
CN103369244A (en) * | 2012-04-10 | 2013-10-23 | 奥林巴斯映像株式会社 | Image synthesis apparatus and image synthesis method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103914689B (en) * | 2014-04-09 | 2017-03-15 | 百度在线网络技术(北京)有限公司 | Picture method of cutting out and device based on recognition of face |
-
2014
- 2014-04-09 CN CN201410140768.9A patent/CN103914689B/en active Active
- 2014-12-18 WO PCT/CN2014/094231 patent/WO2015154516A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101685620A (en) * | 2008-09-26 | 2010-03-31 | 鸿富锦精密工业(深圳)有限公司 | Display device capable of adjusting image and image adjusting method |
CN102063709A (en) * | 2011-01-12 | 2011-05-18 | 中山大学 | Method for improving picture composition effect of digital camera |
CN103369244A (en) * | 2012-04-10 | 2013-10-23 | 奥林巴斯映像株式会社 | Image synthesis apparatus and image synthesis method |
Also Published As
Publication number | Publication date |
---|---|
CN103914689A (en) | 2014-07-09 |
WO2015154516A1 (en) | 2015-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103914689B (en) | Picture method of cutting out and device based on recognition of face | |
CN106803067B (en) | Method and device for evaluating quality of face image | |
CN110930297B (en) | Style migration method and device for face image, electronic equipment and storage medium | |
CN110082135A (en) | Equipment fault recognition methods, device and terminal device | |
CN108921800A (en) | Non-local mean denoising method based on form adaptive search window | |
CN102890820B (en) | Based on shearlet conversion and the image de-noising method of Wiener filtering | |
CN103279936B (en) | Human face fake photo based on portrait is synthesized and modification method automatically | |
CN105184249A (en) | Method and device for processing face image | |
CN103208097B (en) | Filtering method is worked in coordination with in the principal component analysis of the multi-direction morphosis grouping of image | |
CN101615245A (en) | Expression recognition method based on AVR and enhancing LBP | |
CN103810490A (en) | Method and device for confirming attribute of face image | |
CN104933679B (en) | A kind of method and its correspondence system of enlarged drawing | |
CN103632672A (en) | Voice-changing system, voice-changing method, man-machine interaction system and man-machine interaction method | |
CN109712095B (en) | Face beautifying method with rapid edge preservation | |
CN107563974A (en) | Image de-noising method, device, electronic equipment and storage medium | |
CN104331683B (en) | A kind of facial expression recognizing method with noise robustness | |
CN106780582A (en) | Based on the image significance detection method that textural characteristics and color characteristic are merged | |
CN109325903A (en) | The method and device that image stylization is rebuild | |
CN107680057A (en) | The method and device of ultrasonoscopy enhancing | |
CN109829510A (en) | A kind of method, apparatus and equipment of product quality classification | |
CN109741273A (en) | A kind of mobile phone photograph low-quality images automatically process and methods of marking | |
CN105528616A (en) | Face recognition method and device | |
CN109669537B (en) | A kind of man-machine interactive system based on computer virtual interface | |
CN105678208B (en) | Method and device for extracting face texture | |
CN113177941B (en) | Steel coil edge crack identification method, system, medium and terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |