CN109919867A - A kind of filter method and device - Google Patents
A kind of filter method and device Download PDFInfo
- Publication number
- CN109919867A CN109919867A CN201910140583.0A CN201910140583A CN109919867A CN 109919867 A CN109919867 A CN 109919867A CN 201910140583 A CN201910140583 A CN 201910140583A CN 109919867 A CN109919867 A CN 109919867A
- Authority
- CN
- China
- Prior art keywords
- filter
- picture
- face
- carried out
- unit
- 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.)
- Pending
Links
Abstract
The present invention discloses a kind of filter method and system, comprising: obtains to filter picture;Face datection is carried out to filter picture to described;If carrying out filter to filter picture to described using preset portrait filter function described to detect face in filter picture;If carrying out filter to filter picture to described using preset landscape filter function described to which face is not detected in filter picture.Technical solution provided by the invention can use different filter methods to different pictures automatically, to improve filtering effects.
Description
Technical field
The present invention relates to technical field of image processing more particularly to a kind of filter method and devices.
Background technique
On software, picture filtering effects have continued to use the function of camera filter, by the picture of input according to certain algorithm
It is handled, exports the picture with special-effect.In the prior art, the processing mode of this filter is often fixed.I.e.
Which type of, no matter picture inputted, can all be handled and exported according to identical filter algorithm.This, which results in some pictures, makes
It is fine with a kind of filtering effects, but some pictures use filtering effects of the same race with regard to bad phenomenon.
Therefore, it is necessary to a kind of smart filter methods to solve the above problems.
Summary of the invention
The present invention is intended to provide a kind of filter method and device, can use different filter sides to different pictures automatically
Method, to improve filtering effects.
In order to achieve the above objectives, The technical solution adopted by the invention is as follows:
A kind of filter method, comprising: obtain to filter picture;Face datection is carried out to filter picture to described;If institute
It states to detect face in filter picture, filter is carried out to filter picture to described using preset portrait filter function;If
It is described to which face is not detected in filter picture, using preset landscape filter function to it is described to filter picture carry out filter.
Further, described to after detecting face in filter picture, further includes: obtain face location information;Root
According to the face location information, focusing adjustment is carried out to face, obtains Deep Canvas figure;Using the preset portrait filter function
Filter can be carried out to the Deep Canvas figure.
Preferably, described to be obtained to filter picture by camera or camera APP shooting.
A kind of filtering lens unit, comprising: picture acquiring unit, for obtaining to filter picture;Face datection unit, for pair
It is described to carry out Face datection to filter picture;Portrait filter unit, for when described when detecting face in filter picture,
Filter is carried out to filter picture to described using preset portrait filter function;Landscape filter unit, for when described to be filtered
When face is not detected in mirror picture, filter is carried out to filter picture to described using preset landscape filter function.
Further, the Face datection unit is also used to obtain face location information;Further include: Focussing unit,
For carrying out focusing adjustment to face, obtaining Deep Canvas figure according to the face location information;The portrait filter unit is also
For carrying out filter to the Deep Canvas figure using the preset portrait filter function.
Filter method provided in an embodiment of the present invention and device carry out Face datection by treating filter picture, can be automatic
Portrait filter is carried out to the picture comprising face, and landscape filter is carried out to the picture for not including face, that is, is directed to different type
Picture carry out different filter processing, compared with the existing mode that all pictures are all carried out with identical filter processing, this
Invention can greatly improve the filtering effects of picture.In addition, also being carried out to the Deep Canvas of face before carrying out portrait filter
Adjustment, further improves the final bandwagon effect of picture.
Detailed description of the invention
Fig. 1 is the method flow diagram of the embodiment of the present invention one;
Fig. 2 is the method flow diagram of the embodiment of the present invention two;
Fig. 3 is the system construction drawing of the embodiment of the present invention one;
Fig. 4 is the system construction drawing of the embodiment of the present invention two;
Fig. 5 is the landscape figure of the camera shooting equipped with apparatus of the present invention;
Fig. 6 is the landscape figure with the same place Fig. 3 of general camera shooting.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing, to the present invention into
Row is further described.
Fig. 1 is the method flow diagram of the embodiment of the present invention one, comprising:
Step 101, it obtains to filter picture;
Step 102, Face datection is carried out to filter picture to described;
Face datection or face recognition technology are a kind of biology knowledges for carrying out identification based on facial feature information of people
Other technology.Image or video flowing containing face, and automatic detection and tracking people in the picture are acquired with video camera or camera
Face, and then a series of the relevant technologies of face recognition are carried out to the face detected, usually also referred to as Identification of Images, face are known
Not.
Step 103, if described to detect face in filter picture, using preset portrait filter function to it is described to
Filter picture carries out filter, the picture after exporting filter;
If described to which face is not detected in filter picture, using preset landscape filter function to described to filter figure
Piece carries out filter, the picture after exporting filter.
In order to further increase picture processing quality, the final bandwagon effect of picture is improved, the present invention also provides implementations
Example two, as shown in Fig. 2, i.e. described to after detecting face in filter picture, further includes: obtain face location information;Root
According to the face location information, focusing adjustment is carried out to face, obtains Deep Canvas figure;Using the preset portrait filter function
Filter can be carried out to the Deep Canvas figure.
In embodiment two, the face location information is the face frame location information detected, carries out focusing tune to face
Whole is substantially to carry out focusing adjustment to face frame, to form Deep Canvas.Preferably, it is described to filter picture by camera or
Camera APP shooting obtains.
Invention additionally discloses a kind of filtering lens units, as shown in Figure 3, comprising: picture acquiring unit, for obtaining to filter figure
Piece;Face datection unit, for carrying out Face datection to filter picture to described;Portrait filter unit, for when it is described to
When detecting face in filter picture, filter is carried out to filter picture to described using preset portrait filter function, and export
Picture after filter;Landscape filter unit, for when described when face is not detected in filter picture, using preset wind
Scape filter function carries out filter to filter picture to described, and exports the picture after filter.
Further, the Face datection unit is also used to obtain face location information;As shown in Figure 4, further includes: focal length
Adjustment unit, for carrying out focusing adjustment to face, obtaining Deep Canvas figure according to the face location information;The portrait
Filter unit is also used to carry out filter to the Deep Canvas figure using the preset portrait filter function.
In device provided by embodiment two, when described when filter picture is shot by camera and obtained, Face datection unit
Obtain the face key point in view-finder first, then calculate face frame and account for the ratio of the view-finder, to the left side of face,
Right, top carries out Focussing, makes one the shape of face into Deep Canvas.
Fig. 5 is the landscape figure of the camera shooting equipped with apparatus of the present invention, and Fig. 6 is the same with Fig. 5 of general camera shooting
The landscape figure in place, also, Fig. 5 is identical as the shooting condition of Fig. 6.It can be seen that the color and light levels of Fig. 5 are apparently higher than
Fig. 6 uses technical solution of the present invention, can significantly improve the filtering effects of picture.
Filter method provided in an embodiment of the present invention and device carry out Face datection by treating filter picture, can be automatic
Portrait filter is carried out to the picture comprising face, and landscape filter is carried out to the picture for not including face, that is, is directed to different type
Picture carry out different filter processing, compared with the existing mode that all pictures are all carried out with identical filter processing, this
Invention can greatly improve the filtering effects of picture.In addition, also being carried out to the Deep Canvas of face before carrying out portrait filter
Adjustment, further improves the final bandwagon effect of picture.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.
Claims (5)
1. a kind of filter method characterized by comprising
It obtains to filter picture;
Face datection is carried out to filter picture to described;
If being carried out to described to filter picture described to detect face in filter picture using preset portrait filter function
Filter;
If described to which face is not detected in filter picture, using preset landscape filter function to it is described to filter picture into
Row filter.
2. filter method according to claim 1, which is characterized in that it is described described to detect face in filter picture
Later, further includes:
Obtain face location information;
According to the face location information, focusing adjustment is carried out to face, obtains Deep Canvas figure;
Filter is carried out to the Deep Canvas figure using the preset portrait filter function.
3. filter method according to claim 1 or 2, which is characterized in that it is described to filter picture by camera or camera APP
Shooting obtains.
4. a kind of filtering lens unit characterized by comprising
Picture acquiring unit, for obtaining to filter picture;
Face datection unit, for carrying out Face datection to filter picture to described;
Portrait filter unit, for when described when detecting face in filter picture, using preset portrait filter function
Filter is carried out to filter picture to described;
Landscape filter unit, for when described when face is not detected in filter picture, using preset landscape filter function
Filter can be carried out to filter picture to described.
5. filtering lens unit according to claim 4, which is characterized in that the Face datection unit is also used to obtain face position
Confidence breath;Further include: Focussing unit, for carrying out focusing adjustment to face, obtaining scape according to the face location information
Deep effect picture;
The portrait filter unit is also used to carry out filter to the Deep Canvas figure using the preset portrait filter function.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910140583.0A CN109919867A (en) | 2019-02-21 | 2019-02-21 | A kind of filter method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910140583.0A CN109919867A (en) | 2019-02-21 | 2019-02-21 | A kind of filter method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109919867A true CN109919867A (en) | 2019-06-21 |
Family
ID=66962349
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910140583.0A Pending CN109919867A (en) | 2019-02-21 | 2019-02-21 | A kind of filter method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109919867A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103002212A (en) * | 2011-09-15 | 2013-03-27 | 索尼公司 | Image processor, image processing method, and computer readable medium |
CN104253939A (en) * | 2013-06-27 | 2014-12-31 | 聚晶半导体股份有限公司 | Focusing position adjusting method and electronic device |
CN107231524A (en) * | 2017-05-31 | 2017-10-03 | 珠海市魅族科技有限公司 | Image pickup method and device, computer installation and computer-readable recording medium |
CN107454332A (en) * | 2017-08-28 | 2017-12-08 | 厦门美图之家科技有限公司 | Image processing method, device and electronic equipment |
CN109191371A (en) * | 2018-08-15 | 2019-01-11 | 广州二元科技有限公司 | A method of it judging automatically scenery type and carries out image filters processing |
-
2019
- 2019-02-21 CN CN201910140583.0A patent/CN109919867A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103002212A (en) * | 2011-09-15 | 2013-03-27 | 索尼公司 | Image processor, image processing method, and computer readable medium |
CN104253939A (en) * | 2013-06-27 | 2014-12-31 | 聚晶半导体股份有限公司 | Focusing position adjusting method and electronic device |
CN107231524A (en) * | 2017-05-31 | 2017-10-03 | 珠海市魅族科技有限公司 | Image pickup method and device, computer installation and computer-readable recording medium |
CN107454332A (en) * | 2017-08-28 | 2017-12-08 | 厦门美图之家科技有限公司 | Image processing method, device and electronic equipment |
CN109191371A (en) * | 2018-08-15 | 2019-01-11 | 广州二元科技有限公司 | A method of it judging automatically scenery type and carries out image filters processing |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108288027B (en) | Image quality detection method, device and equipment | |
US11132771B2 (en) | Bright spot removal using a neural network | |
CN107886484B (en) | Beautifying method, beautifying device, computer-readable storage medium and electronic equipment | |
CN109714519B (en) | Method and system for automatically adjusting image frame | |
CN113766125B (en) | Focusing method and device, electronic equipment and computer readable storage medium | |
CN110149482A (en) | Focusing method, device, electronic equipment and computer readable storage medium | |
EP3236391B1 (en) | Object detection and recognition under out of focus conditions | |
CN108111749B (en) | Image processing method and device | |
CN107862663A (en) | Image processing method, device, readable storage medium storing program for executing and computer equipment | |
CN108009999A (en) | Image processing method, device, computer-readable recording medium and electronic equipment | |
CN107368806B (en) | Image rectification method, image rectification device, computer-readable storage medium and computer equipment | |
CN107833197A (en) | Method, apparatus, computer-readable recording medium and the electronic equipment of image procossing | |
CN107945107A (en) | Image processing method, device, computer-readable recording medium and electronic equipment | |
CN107800965B (en) | Image processing method, device, computer readable storage medium and computer equipment | |
CN107993209B (en) | Image processing method, image processing device, computer-readable storage medium and electronic equipment | |
CN109242794B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN107844764B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN107743200A (en) | Method, apparatus, computer-readable recording medium and the electronic equipment taken pictures | |
CN108717530A (en) | Image processing method, device, computer readable storage medium and electronic equipment | |
CN110769148A (en) | Camera automatic control method and device based on face recognition | |
CN102622740B (en) | Anti-eye closing portrait system and method | |
CN108093170B (en) | User photographing method, device and equipment | |
CN107578372B (en) | Image processing method, image processing device, computer-readable storage medium and electronic equipment | |
CN110062150A (en) | A kind of Atomatic focusing method and device | |
CN109598195B (en) | Method and device for processing clear face image based on monitoring video |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190621 |
|
RJ01 | Rejection of invention patent application after publication |