The content of the invention
The invention provides a kind of acquisition methods of picture thumbnail and device, enabled users to for portrait picture this method
It is enough to check picture in thumbnail exactly, differentiate picture, retrieving image, the recall precision of picture is improved, and then lift user
Impression.
To achieve these goals, the present invention uses following technological means:
A kind of acquisition methods of picture thumbnail, including:
A width picture in mobile device is parsed and the Target Photo after parsing is obtained;
Recognition of face is carried out to the Target Photo, the area image of all human face regions of covering is obtained;
The image that the area image is included at least one face is used as target thumbnail.
It is preferred that, the area image is included to the target image of at least one face to be included as target thumbnail:
Target Photo is cut by default specification centered on the central point of the area image;
It regard the human face region after cutting as the target thumbnail.
It is preferred that, the area image is included to the target image of at least one face to be included as target thumbnail:
The area image cut and obtains target face picture;
The target face picture is extended or compression processing according to the specification of the target thumbnail;
It regard the target face picture after processing as the target thumbnail.
It is preferred that, the target face picture is extended or compressed processing bag according to the specification of the target thumbnail
Include:
When the target face picture specification is more than target thumbnail specification, the target face picture is compressed to target
Thumbnail specification;
When the target face picture specification is less than target thumbnail specification, the target face picture is extended to target
Thumbnail specification.
It is preferred that, it is determined that covering the area image of all human face regions;
Obtain the face quantity in the Target Photo;
When the face quantity is more than for the moment, union is taken to each human face region in the Target Photo, and by union area
Domain is used as area image;
When the face quantity is a period of time, the human face region in the Target Photo is regard as area image.
It is preferred that, also include:
When the face quantity is zero, by default specification to Target Photo centered on the central point of the Target Photo
Cut;
It regard the region after cutting as the target thumbnail.
It is preferred that, also include:
The target thumbnail is included to check picture APP target area.
A kind of acquisition device of picture thumbnail, including:
Resolution unit, for the Target Photo after parsing to be parsed and obtained to the width picture in mobile device;
Acquiring unit, for carrying out recognition of face to the Target Photo, it is determined that covering the administrative division map of all human face regions
Picture;
Determining unit, the image for the area image to be included at least one face is used as target thumbnail.
It is preferred that, acquiring unit includes:
First acquisition unit, for being more than when the face quantity for the moment, to each human face region in the Target Photo
Union is taken, and regard union refion as area image;
Second acquisition unit, for when the face quantity for for the moment, using the human face region in the Target Photo as
Area image.
It is preferred that, determining unit includes:
First determining unit, for being carried out centered on the central point of the area image by default specification to Target Photo
Cut, regard the human face region after cutting as the target thumbnail;
Second determining unit, target face picture is obtained for the area image cut;By the target person
Face picture is extended or compression processing according to the specification of the target thumbnail;It regard the target face picture after processing as institute
State target thumbnail.
The invention provides a kind of acquisition methods of picture thumbnail, face knowledge is carried out for Target Photo in this method
Not, area image, and just cover all human face regions area image the image for including at least one face as target
Thumbnail, relative to the acquisition methods of conventional pictures thumbnail, the present invention considers the position of face and face in Target Photo
Quantity, and thereby determine that target thumbnail so that thumbnail includes face information important in Target Photo.
The present invention, when obtaining thumbnail, is that centered on face, taking-up certain area is used as target from original image
Thumbnail, rather than purely using the size of picture as foundation, intercept square thumbnail.Therefore the present invention so that allow users to
Picture is checked in thumbnail exactly, picture, retrieving image is differentiated, the recall precision of picture is improved, and then lift user's sense
By.
Brief description of the drawings
Inventor has carried out research and analysis to correlation technique during the invention is implemented, and finds traditional
There is larger improvement space in the display methods of picture thumbnail, for example can zooming in and out the equal proportion of original picture, press
Fig. 3 mode is shown, and which does not cut artwork, so the information of artwork will not be lost.Due to picture ratio not
Together, there are a large amount of spaces during display between thumbnail, reduce the picture number that the same page can be shown, and layout is chaotic,
Certain interference can be caused to user search picture.Although artwork information completely can be shown, reduce and check retrieving image
Efficiency.Therefore the present invention proposes the display methods of new picture thumbnail, to solve the above problems in the lump.
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the schematic diagram of thumbnail display interface in the prior art;
Fig. 2 is the contrast schematic diagram of thumbnail and original picture in the prior art;
Fig. 3 is a kind of schematic diagram of thumbnail display interface disclosed by the invention;
Fig. 4 is the flow chart of the acquisition methods of picture thumbnail disclosed in the embodiment of the present invention;
Fig. 5 is the flow chart of the acquisition methods of another picture thumbnail disclosed in the embodiment of the present invention;
Fig. 6 is the flow chart of the acquisition methods of another picture thumbnail disclosed in the embodiment of the present invention;
Fig. 7 is the flow chart of the acquisition methods of another picture thumbnail disclosed in the embodiment of the present invention;
Fig. 8 is the schematic diagram of cutting original picture in the acquisition methods of picture thumbnail disclosed in the embodiment of the present invention;
Fig. 9 is the schematic diagram of cutting original picture in the acquisition methods of another picture thumbnail disclosed in the embodiment of the present invention;
Figure 10 is the structural representation of the acquisition device of picture thumbnail disclosed in the embodiment of the present invention;
Figure 11 is the structural representation of acquiring unit in the acquisition device of picture thumbnail disclosed in the embodiment of the present invention;
Figure 12 is the structural representation of determining unit in the acquisition device of picture thumbnail disclosed in the embodiment of the present invention;
Figure 13 is the structural representation of the acquisition device of another picture thumbnail disclosed in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
The invention provides a kind of acquisition methods of picture thumbnail, as shown in figure 4, comprising the following steps:
Step S101:A width picture in mobile device is parsed and the Target Photo after parsing is obtained;
A width picture is obtained from mobile device first, because the form that different mobile devices shoots obtained picture can
Can be it is different, for example:Jpg forms, it is follow-up for convenience that recognition of face is carried out to picture, picture is parsed first, it is right
The form of picture is unified, convenient that subsequently picture is handled, for example, unify as bitmap forms, by the picture after parsing
It is used as Target Photo.
Step S102:Recognition of face is carried out to the Target Photo, the area image of all human face regions of covering is obtained;
Nowadays face recognition technology is progressively molded, and face is carried out to picture according to the face recognition technology of prior art
Identification, obtains the face quantity in target face picture.Put and facilitated subsequent treatment, face quantity is divided into zero, one by us
It is individual or more than one, zero represents do not have face in Target Photo, and one represents in target comprising face, more than one table
Show and two and more than two faces are included in Target Photo.
It is preferred that, when the face quantity is a period of time, it regard the human face region in the Target Photo as area image.When
The face quantity is more than for the moment, takes union to each human face region in the Target Photo, and regard union refion as region
Image.
The main object of the present invention is available for the thumbnail of user search picture to provide, in order to which user can accurately examine
Rope face picture, it is necessary to it is as much as possible include picture in face information, therefore when in picture only have a face when, only with
Human face region is as area image, when having two or more than two human face regions in picture, in order that thumbnail can
Represent the true colours of picture, the present invention is used as area image using the union refion of two faces.
When there is no face in area image, without carrying out specially treated.
Step S103:The image that the area image is included at least one face is used as target thumbnail.
The invention provides a kind of acquisition methods of picture thumbnail, face knowledge is carried out for Target Photo in this method
Not, the image for including at least one face of area image of all human face regions will be covered as target thumbnail, relative to
The acquisition methods of conventional pictures thumbnail, the present invention considers the quantity of the position of face and face in Target Photo, and thus
Determine target thumbnail so that thumbnail includes face information important in Target Photo, and then allows users to exactly
Picture is checked in thumbnail, picture, retrieving image is differentiated, the recall precision of picture is improved, and then lift user's impression.
It is preferred that, present invention also offers a kind of embodiment, in the present embodiment, when the face quantity is zero, with institute
State and Target Photo is cut by default specification centered on the central point of Target Photo;It regard the region after cutting as the mesh
Mark thumbnail.
Step S103 can specifically be realized using following two modes in above-described embodiment:
As shown in figure 5, first way comprises the following steps:
Step S201:Target Photo is cut by default specification centered on the central point of the area image;
Step S202:It regard the human face region after cutting as the target thumbnail.
Obtained in the way of described in Fig. 4 after area image, in order to obtain in target thumbnail, the present embodiment, in target figure
On the basis of piece, centered on the central point of area image, Target Photo is cut by default specification, will be obtained after cutting
Human face region be used as target thumbnail, it is preferred that default specification is the specification of target thumbnail, specifically can for 200 ×
200 form.
For the display target thumbnail as much as possible in an interface, thumbnail preferably is rectangular area.Certainly
Square region is best form, had not only met the use habit of user but also can take less space and shows more picture.
Find that first way there are some drawbacks by inventor's research, for example:When in Target Photo include face quantity
Excessively, the specification of target thumbnail is unable to hold all faces, and at this moment occurring can not be comprising all in the target thumbnail of interception
Human face region situation.In other situations, in the case of the face in Target Photo is less, Target Photo is intercepted
Face in the target thumbnail obtained afterwards is smaller, and user can not clearly differentiate face, is to sum up obtained in first way
Also there is optimization space in target thumbnail, therefore present invention also offers second of implementation.
The second way is described below, as shown in fig. 6, comprising the following steps:
Step S301:The area image cut and obtains target face picture;
Cut on Target Photo according to the size of area image, using after cutting including human face region part as
Target face picture, it is to be understood that the specification of target face picture can be bigger than the specification of target thumbnail, can also compare
The specification of target thumbnail is small.
Step S302:By the target face picture according to the specification of the target thumbnail be extended or compression at
Reason;
It is preferred that, when the target face picture specification is more than target thumbnail specification, compress the target face figure
Piece is to target thumbnail specification;
When the target face picture specification is less than target thumbnail specification, the target face picture is extended to target
Thumbnail specification.
Step S303:It regard the target face picture after processing as the target thumbnail.
The target thumbnail that the second way is obtained can provide the user complete face information, and facilitate user to look into
See, improve user's impression.
The invention provides a kind of specific embodiment, as shown in fig. 7, comprises:
Step S401:Start photograph album, parse picture file;
Step S402:Recognition of face is carried out to picture file;
Step S403:Judge whether to recognize face, if unidentified enter step S404 to face, enter if recognizing face
Enter step S405;
Step S404:Thumbnail is cut centered on center picture, into step S407;
As shown in figure 8, the diagram to cut thumbnail.Point cuts thumbnail centered on center picture, and such as Fig. 8 sizes are
360x640 pictures, cut out 360x360 picture, are then reduced into 200x200 thumbnail.
Step S405:Obtain human face region;
Step S406:Thumbnail is cut centered on human face region;
As shown in figure 9, the diagram to be fond of thumbnail centered on human face region.
Step S407:Preserve thumbnail.
As shown in Figure 10, a kind of acquisition device of picture thumbnail, including:
Resolution unit 100, for the Target Photo after parsing to be parsed and obtained to the width picture in mobile device;
Acquiring unit 200, for carrying out recognition of face to the Target Photo, it is determined that covering the region of all human face regions
Image;
Determining unit 300, for determining target thumbnail according to the area image.
It is preferred that, as shown in figure 11, acquiring unit 200 includes:
First acquisition unit 201, for being more than when the face quantity for the moment, to the Target Photo Zhong Gezhang faces area
Domain takes union, and regard union refion as area image;
Second acquisition unit 202, for for the moment, the human face region in the Target Photo to be made when the face quantity
For area image.
It is preferred that, determining unit 300 includes:
First determining unit 301, for pressing default specification centered on the central point of the area image to Target Photo
Cut, regard the human face region after cutting as the target thumbnail;
Second determining unit 302, target face picture is obtained for the area image cut;By the target
Face picture is extended or compression processing according to the specification of the target thumbnail;Using the target face picture after processing as
The target thumbnail.
It is preferred that, as shown in figure 13, the acquisition device of picture thumbnail also includes:
Display unit 400, picture APP target area is checked for the target thumbnail to be shown.
If the function described in the present embodiment method is realized using in the form of SFU software functional unit and is used as independent product pin
Sell or in use, can be stored in a computing device read/write memory medium.Understood based on such, the embodiment of the present invention
The part contributed to prior art or the part of the technical scheme can be embodied in the form of software product, and this is soft
Part product is stored in a storage medium, including some instructions to cause a computing device (can be personal computer,
Server, mobile computing device or network equipment etc.) perform all or part of step of each of the invention embodiment methods described
Suddenly.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), deposit at random
Access to memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
The embodiment of each in this specification is described by the way of progressive, what each embodiment was stressed be with it is other
Between the difference of embodiment, each embodiment same or similar part mutually referring to.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or using the present invention.
A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention
The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one
The most wide scope caused.