CN104751405B - A kind of method and apparatus for being blurred to image - Google Patents

A kind of method and apparatus for being blurred to image Download PDF

Info

Publication number
CN104751405B
CN104751405B CN201510106567.1A CN201510106567A CN104751405B CN 104751405 B CN104751405 B CN 104751405B CN 201510106567 A CN201510106567 A CN 201510106567A CN 104751405 B CN104751405 B CN 104751405B
Authority
CN
China
Prior art keywords
piecemeal
image
region
personage
character contour
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
Application number
CN201510106567.1A
Other languages
Chinese (zh)
Other versions
CN104751405A (en
Inventor
齐飞
徐崴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201510106567.1A priority Critical patent/CN104751405B/en
Publication of CN104751405A publication Critical patent/CN104751405A/en
Application granted granted Critical
Publication of CN104751405B publication Critical patent/CN104751405B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The present invention provides a kind of methods for being blurred to image, wherein this approach includes the following steps:According to the character contour template that user selects, the character contour in the image that user specifies is determined;According to the character contour, personage region in described image, the transitional region between background area and personage region and background area are determined;By being blurred to the background area, and transition type virtualization is carried out to the transitional region, come the image after being blurred, wherein, the transition type virtualization indicates that the virtualization degree in the transitional region closer to the part in the personage region is more shallow, and the virtualization degree closer to the part of the background area is deeper.Scheme according to the present invention, the virtualization for capableing of image is more smooth, and the image after virtualization can bring better visual effect.

Description

A kind of method and apparatus for being blurred to image
Technical field
The present invention relates to field of computer technology more particularly to a kind of method and apparatus for being blurred to image.
Background technology
In the prior art, when being blurred to image, usually by the specified region blurred of user, and then using existing Image weakening method the specified region blurred of user is fixed the virtualization of virtualization degree.This makes in image Virtualization effect is poor, affects the visual effect of the image after virtualization.
Invention content
The object of the present invention is to provide a kind of method and apparatus for being blurred to image.
According to an aspect of the present invention, a kind of method for being blurred to image is provided, wherein this method includes Following steps:
According to the character contour template that user selects, the character contour in the image that user specifies is determined;
According to the character contour, personage region, background area and personage region and the background in described image are determined Transitional region between region;
Transition type virtualization is carried out by being blurred to the background area, and to the transitional region, to be blurred Image afterwards, wherein the transition type virtualization indicates the virtualization of the part in the transitional region closer to the personage region Degree is more shallow, and the virtualization degree closer to the part of the background area is deeper.
According to another aspect of the present invention, a kind of device for being blurred to image is additionally provided, wherein the dress It sets including following device:
Character contour template for being selected according to user, determines the device of the character contour in the image that user specifies;
For according to the character contour, determine the personage region in described image, background area and personage region and The device of transitional region between background area;
For carrying out transition type virtualization by being blurred to the background area, and to the transitional region, to obtain The device of image after virtualization, wherein the transition type virtualization indicates in the transitional region closer to the personage region Partial virtualization degree is more shallow, and the virtualization degree closer to the part of the background area is deeper.
Compared with prior art, the present invention has the following advantages:1) present invention has broken the inertia of those skilled in the art Thinking:By the way that image is divided into the two levels of figure and ground, to realize background blurring effect, and more subtly by image It is divided into personage region, transitional region and background area, and non-background area and transitional region are blurred respectively;2) to mistake The transition type for crossing region blurs so that it is 0 that the part that is connected with personage region of transitional region, which blurs degree, and and background area The virtualization degree for the part being connected is identical as the virtualization degree of background area, this makes the virtualization of image more smooth, virtualization Image afterwards can bring better visual effect;3) can divide an image into multiple piecemeals, and according in multiple piecemeals at least The piecemeal attribute of one point of each piecemeal in the block, to determine the character contour in image;4) by first identifying larger piecemeal Piecemeal attribute, can relatively rapid identify the piecemeal near character contour, also, can to the piecemeal near character contour into Row divides again, and is taken turns based on the sub-piecemeal attribute of the sub-piecemeal divided again to obtain personage more accurate and true to nature Exterior feature, therefore, it is possible to while improving character contour recognition speed, obtain more accurate character contour recognition effect;5) it uses Family can will identify oneself preferable character contour by computer equipment is used as character contour template and is uploaded to community network, to User in network shares personage's contour mould, alternatively, download personage's contour mould for take pictures or to image into It is used during row virtualization, to form benign cycle, provides more rich character contour template to the user;Also, personage Contour mould can be managed collectively in community network.
Description of the drawings
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, of the invention other Feature, objects and advantages will become more apparent upon:
Fig. 1 is the flow diagram of the method for being blurred to image of one embodiment of the invention;
Fig. 2 is the structural schematic diagram of the device for being blurred to image of one embodiment of the invention;
Fig. 3 is the schematic diagram of the image comprising personage of an example of the present invention;
Fig. 4 is the schematic diagram of two kinds of character contours of an example of the present invention;
Fig. 5 is the schematic diagram of the piecemeal near the part character contour of an example of the present invention.
Same or analogous reference numeral represents same or analogous component in attached drawing.
Specific implementation mode
Present invention is further described in detail below in conjunction with the accompanying drawings.
Fig. 1 is the flow diagram of the method for being blurred to image of one embodiment of the invention.
Wherein, the method for the present embodiment is mainly realized by computer equipment;The computer equipment includes that network is set Standby and user equipment;The network equipment includes but not limited to the service of single network server, multiple network servers composition Device group or the cloud being made of a large amount of computers or network server for being based on cloud computing (Cloud Computing), wherein cloud meter It is one kind of Distributed Calculation, a super virtual computer being made of the computer collection of a group loose couplings;The net Network residing for network equipment includes but not limited to internet, wide area network, Metropolitan Area Network (MAN), LAN, VPN network etc..
The user equipment includes but not limited to PC machine, tablet computer, smart mobile phone, PDA, digital camera etc..
It should be noted that the computer equipment is only for example, other computers that are existing or being likely to occur from now on Equipment is such as applicable to the present invention, should also be included within the scope of the present invention, and is incorporated herein by reference.
Method according to the present embodiment includes step S1, step S2 and step S3.
In step sl, the character contour template that computer equipment is selected according to user, determines in the image that user specifies Character contour.
Wherein, the character contour template is used to indicate character contour corresponding with personage's contour mould.
Wherein, the image that user specifies includes any image that can be used in computer equipment.Preferably, user refers to Fixed image includes but not limited to:(shooting of the camera of such as mobile device shows boundary to the image presented on shooting display interface The image etc. presented on face), user is in local image selected (such as in the photograph album of local).It should be noted that working as user Specified image is when shooting the image presented on display interface, and the computer equipment is usually user equipment.
Preferably, the image specified in user includes step in the case of shooting the image presented on display interface S1 further comprises step S11 and step S12.
In step s 11, the character contour template that computer equipment is selected according to user is presented on shooting display interface Corresponding character contour.
For example, user selects character contour template template1 in local personage's contour mould library, then computer equipment According to template1, the character contour corresponding to template1 is presented on the shooting display interface of camera.
In step s 12, computer equipment obtains image of the user based on the character contour shooting presented, and according to institute It states character contour template and determines character contour in the image of the shooting.
Specifically, computer equipment obtains image of the user based on the character contour shooting presented, and is taken turns according to personage The position of character contour shape and the character contour in character contour template in wide template, in the image for determining the shooting Character contour.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that any character contour template selected according to user, determines in the image that user specifies Character contour realization method, should be included in the scope of the present invention.
In step s 2, computer equipment determines personage region, background area and the people in image according to character contour Transitional region between object area and background area.
Specifically, computer equipment determines personage region, background area and the personage area in image according to character contour The realization method of transitional region between domain and background area includes but not limited to:
1) enclosed region that computer equipment is directly constituted character contour is outside by character contour as personage region The region between profile and character contour is formed by after extension preset width as transitional region, by personage region in image With the region other than transitional region as background area.
For example, preset width is 20 pixels.The enclosed region that computer equipment is directly constituted character contour as Character contour is extended to the outside the area between the profile and character contour being formed by after the width of 20 pixels by personage region Domain is as transitional region, using the region other than personage region and transitional region as background area.
2) step S2 further comprises step S21 and step S22.
In the step s 21, computer equipment determines personage region according to character contour.
Specifically, the enclosed region that computer equipment is constituted character contour is as personage region.
In step S22, computer equipment determines transition according to personage region and/or the image information of inhuman object area Region and background area.
Wherein, the inhuman object area includes transitional region and background area, that is, the inhuman object area includes people Any region other than object area.
Wherein, the image information of the personage region and/or inhuman object area includes any with personage region and/or inhuman The relevant information of the graphic feature of object area in the picture.Preferably, the image of the personage region and/or inhuman object area is believed Breath includes that any corresponding image-region is related in the picture with the image information of the personage region and/or inhuman object area Image information.Preferably, the image information of the personage region and/or inhuman object area includes but not limited to:
A) size in personage region.Wherein, much information can be used to indicate the size in personage region, as personage region exists Shared ratio, the size etc. in personage region in image.
B) size of inhuman object area.Wherein, much information can be used to indicate the size of inhuman object area, such as non-personage Region shared ratio, the size etc. of inhuman object area in the picture.
C) colouring information of the colouring information in personage region and/or inhuman object area.
Wherein, the colouring information in the personage region includes any and the personage region relevant information of color, such as personage The averaged color value of aberration, personage region between region and inhuman object area, the grey level histogram etc. in personage region.
Wherein, the colouring information of the inhuman object area includes any and the inhuman object area relevant information of color, such as The averaged color value of aberration, inhuman object area between personage region and inhuman object area, the grey level histogram of inhuman object area Deng.
Specifically, computer equipment determines transitional region according to personage region and/or the image information of inhuman object area Width, and character contour is extended to the outside into region that the width is formed by between profile and character contour as transitional region, And using personage region in image and the region other than transitional region as background area.Preferably, personage region is bigger, transition region Domain is wider;Inhuman object area is bigger, and transitional region is narrower;Color difference between personage region and inhuman object area is bigger, mistake It is wider to cross region;In personage region close to inhuman object area region, in inhuman object area close to personage region region it Between color difference it is bigger, transitional region is wider.
Wherein, computer equipment can be used various ways and determine and believed according to the image of personage region and/or inhuman object area Breath, determines the width of transitional region.
For example, being preset with the width corresponding to multiple aberration ranges in computer equipment, computer equipment is according to personage area The aberration in domain and inhuman object area, using the width corresponding to the aberration range that the aberration is fallen into as the width of transitional region.
In another example computer equipment is according to the size in personage region and the colouring information in personage region and/or non-personage The colouring information in region determines the width of transitional region.As an example, computer equipment is based on following formula, to determine The width of transitional region:
W=a*Size (Ifg)/Size(I)+b/|Avg(Ifg)-Avg(I-Ifg)|
Wherein, W is the width of transitional region;Size(Ifg) be people's object area size, Size (I) be image size, Size(Ifg)/Size (I) is people's object area shared ratio in the picture;Avg(Ifg) be people's object area averaged color value; Avg(I-Ifg) be inhuman object area averaged color value;|Avg(Ifg)-Avg(I-Ifg) | it is people's object area and inhuman object area Between aberration;A is size weight coefficient, and b is aberration weight coefficient, it is preferable that a and b is predetermined value.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System determines personage region in described image, background it should be appreciated by those skilled in the art that any according to the character contour The realization method of transitional region between region and personage region and background area, should be included in the scope of the present invention.
In step s3, computer equipment carries out transition by being blurred to background area, and to the transitional region Formula blurs, come the image after being blurred.
Wherein, a variety of image fuzzy algorithmic approaches can be used in computer equipment, such as Gaussian mode gelatinization (blurring) algorithm, PID (Proportion Integration Differentiation, proportional integral differential) algorithm etc. carries out background area empty Change, the transitional region after being blurred.For example, computer equipment, which is based on Gaussian mode, is gelatinized algorithm, Gaussian kernel (Gaussian is used Kernel convolution algorithm) is carried out with background area, to be blurred to background area.
Wherein, the transition type virtualization indicates that the virtualization degree of the transitional region is weaker than the virtualization journey of the background area Degree.Preferably, the transition type virtualization indicates that the virtualization degree in transitional region closer to the part in personage region is more shallow, more leans on The virtualization degree of the part of nearly background area is deeper.
Wherein, computer equipment includes but not limited to the realization method of transitional region progress transition type virtualization:
1) computer equipment is directly according to the corresponding image information of transitional region, to transition region from the edge in personage region Transitional region is carried out the virtualization of virtualization degree from low to high by the edge in domain.
Preferably, transitional region is carried out virtualization degree by 0 to predetermined extent virtualization by computer equipment.Wherein, described Predetermined extent is used to indicate scheduled virtualization degree;In this realization method, which is used to indicate transitional region, close The virtualization degree at the edge of background area;For example, predetermined extent is 20%, then computer equipment is directly corresponded to according to transitional region Image information transitional region is subjected to virtualization degree and is gradually increased by 0 to the edge of transitional region from the edge in personage region By force to 20% virtualization.
2) computer equipment blurs transitional region, the transitional region after being blurred;Then, computer equipment will Transitional region after virtualization is mixed with the transitional region not blurred, obtains the transitional region after transition type virtualization.Wherein, more Close to personage region, proportion of the transitional region not blurred in mixing is higher;Closer to the background area, the mistake after virtualization It is higher to cross proportion of the region in the mixing.
Wherein, the realization method that computer equipment blurs transitional region is with aforementioned computer equipment to background area The realization method blurred is same or similar, is not repeating herein.
Preferably, if computer equipment is based on Gaussian mode and is gelatinized algorithm, convolution fortune is carried out using Gaussian kernel and background area Calculate, to be blurred to background area, then this realization method 2) in, computer equipment use same size Gaussian kernel and mistake It crosses region and carries out convolution algorithm, to be blurred to transitional region, the transitional region after being blurred.
As an example, computer equipment based on following formula by after virtualization transitional region and the transition region that does not blur Domain is mixed, to obtain the transitional region after transition type virtualization:
Iout=alpha*Iclear+(1-alpha)*Iblurred
Wherein, IclearFor the transitional region not blurred, IblurredFor the transitional region after virtualization, IoutIt is mixed to get Transitional region after transition type virtualization.Wherein, alpha is mixing control parameter, which, which is used to indicate, does not blur Transitional region or virtualization after proportion of the transitional region in mixing, the value range of the mixing control parameter is [0,1];It is excellent Selection of land, alpha=d2/ (d1+d2), wherein d1 is that (pixel can be random in transitional region for a pixel in transitional region Or specific pixel) arrive the shortest distance in personage region, d2 is the shortest distance of the pixel to background area.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that it is any by being blurred to the background area, and the transitional region is carried out Transition type blurs, and come the realization method of the image after being blurred, should be included in the scope of the present invention.
As a preferred embodiment, step S3 can further comprise the steps:Computer equipment obtains what user determined Blur extent index;Computer equipment blurs background area according to acquired virtualization extent index, and to the mistake It crosses region and carries out transition type virtualization, come the image after being blurred.Wherein, the virtualization extent index, which is used to indicate, is blurred Degree.
For example, computer equipment obtains the virtualization extent index p that user determines, wherein p=40%;Then computer equipment Background area is subjected to the virtualization that virtualization degree is 40%, and to the edge of transitional region from the edge in personage region, incited somebody to action It crosses region and carries out virtualization degree and gradually increased from 0 to 40% virtualization, to the image after being blurred.
Wherein, computer equipment can be used various ways and obtain the virtualization extent index that user determines.For example, computer is set It is standby to directly acquire the virtualization extent index that user inputs in the computer equipment;In another example computer equipment according to user at this The selected virtualization extent index of user is determined to the selection operation of multiple optional virtualization extent index in computer equipment.
It should be noted that this preferred embodiment can be with the realization method 2 of above mentioned steps S3) it is combined, i.e.,:Computer equipment According to acquired virtualization extent index, transitional region is blurred, the transitional region after being blurred;Then, computer Equipment mixes the transitional region after virtualization with the transitional region not blurred, obtains the transitional region after transition type virtualization.
As a preferred embodiment, the method for the present embodiment further includes step S4, step S5 and step S6.
In step s 4, computer equipment obtains the image information of an image comprising personage.
Wherein, described image information includes any and the image relevant information of graphic feature;Preferably, described image Information includes but not limited to the average gray value etc. of the Aspect Ratio of image, the pixel of image, the resolution ratio of image, image.
Specifically, computer equipment can obtain the image information of the image comprising personage from local or other equipment.
In step s 5, computer equipment is determined according to the image information of the image comprising personage in the image Character contour.
For example, image information of the computer equipment according to the image comprising personage, and combine user signified on this image Fixed region determines the character contour in the image.
Preferably, the step S5 further comprises step S51, step S52 and step S53.
In step s 51, the image comprising personage is divided into multiple piecemeals by computer equipment.
For example, image shown in Fig. 3 is divided into multiple piecemeals by computer equipment.
Specifically, computer equipment can be used various ways and the image comprising personage be divided into multiple piecemeals.
For example, computer equipment divides the image into multiple piecemeals according to the Aspect Ratio of the image comprising personage;Such as Including the Aspect Ratio of the image of personage is 16:9, then computer equipment the image averaging is divided into k* (16*9) a piecemeal, Wherein, k is natural number.
In another example the image averaging comprising personage is divided into predetermined piecemeal quantity piecemeal by computer equipment;As made a reservation for Quantity is 64, and the image averaging comprising personage is directly divided into 8*8 piecemeal by computer equipment.
It should be noted that the piecemeal can have various shapes, such as rectangle, sector or other irregular shapes, Also, including the shape and/or size of multiple piecemeals that the image of personage is divided may be different.For example, meter Rectangular image uniform is divided into M*N piecemeal by calculation machine equipment, and (M is the piecemeal quantity in horizontal direction, and N is Vertical Square Upward piecemeal quantity), which is the identical rectangle piecemeal of size.In another example computer equipment schemes ellipse As being divided into M*N piecemeal, the piecemeal of the image edge location is sector, and the piecemeal in centre position is rectangle.
It should be noted that the multiple piecemeal may partly overlap.For example, the pixel of the image comprising personage is A*B (A is the length in pixels of image, and B is the pixel wide of image), in step sl, computer equipment divides the image into size Identical M*N piecemeal, wherein the pixel of each piecemeal be m*n (m is the length in pixels of piecemeal, n for piecemeal pixel Width);Then as the value of the theoretical length in pixels M*m of image length in pixels A actual more than image, the M*N piecemeal is in water Square it will appear and partly overlap upwards;As the value of the theoretical pixel wide N*n of image pixel wide B actual more than image, The M*N piecemeal will appear in vertical direction to partly overlap.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that any realization method that the image comprising personage is divided into multiple piecemeals, should all wrap Containing within the scope of the invention.
In step S52, computer equipment is according to each corresponding image of piecemeal at least one piecemeal of multiple piecemeals Information determines the piecemeal attribute of each piecemeal.
Wherein, the piecemeal attribute is used to indicate piecemeal and belongs to personage region or inhuman object area.For example, piecemeal attribute is Indicate that piecemeal belongs to personage region when " 0 ", instruction piecemeal belongs to inhuman object area when piecemeal attribute is " 1 ".Wherein, the personage The region that region is located at by the personage in image, the inhuman object area are the region other than personage region in image;For example, The region behaviour object area that personage shown in Fig. 3 is located at, the white space other than the people's object area are inhuman object area.
Wherein, the corresponding image information of piecemeal includes any and the piecemeal relevant information of graphic feature;Preferably, divide The corresponding image information of block includes the image information of the image-region corresponding to the piecemeal.Preferably, the corresponding image letter of piecemeal Breath include but not limited to the Aspect Ratio of piecemeal, the pixel of piecemeal of image-region corresponding to piecemeal, the resolution ratio of piecemeal, point The gray value etc. of block.
Specifically, computer equipment is believed according to the corresponding image of each piecemeal at least one piecemeal of multiple piecemeal Breath, determines that the realization method of the piecemeal attribute of each piecemeal includes but not limited to:
1) computer equipment is according to each corresponding image information of piecemeal at least one piecemeal of multiple piecemeal, and ties Predetermined recognition rule is closed, determines the piecemeal attribute of each piecemeal.
Wherein, the predetermined recognition rule include it is any it is scheduled, can determine piecemeal according to the image information of piecemeal Piecemeal attribute rule.
For example, the predetermined recognition rule includes image information and piecemeal based on piecemeal defined in person recognition technology Correlation rule between attribute;For described at least one point each piecemeal in the block, in conjunction with the correlation rule, computer equipment It can be according to the corresponding image information of the piecemeal, to determine the piecemeal attribute of the piecemeal.
2) computer equipment is made according to the corresponding image information of each piecemeal at least one piecemeal of the multiple piecemeal For the input of piecemeal attributive classification device, the piecemeal attribute of each piecemeal that the piecemeal attributive classification device exports, described is obtained.
Wherein, the piecemeal attributive classification device includes any piecemeal that piecemeal can be exported according to the image information of piecemeal The grader of attribute.Preferably, the piecemeal attributive classification device is two graders based on image block (patch);For example, piecemeal Attributive classification device is using the image information of piecemeal as input, using the piecemeal attribute of piecemeal as output, also, works as and exports as " 0 " When indicate that the piecemeal belongs to personage region, when output be " 1 " when indicate that the piecemeal belongs to inhuman object area.
Preferably, step S52 uses above-mentioned realization method 2) when, this preferred embodiment is further comprising the steps of:Computer is set It is standby to use multiple piecemeals for having determined that piecemeal attribute, piecemeal attributive classification device model is trained, the piecemeal attribute is obtained Grader.
For example, existing 1000 piecemeals, wherein the piecemeal attribute instruction piecemeal of 600 piecemeals belongs to personage region, other 400 piecemeals piecemeal attribute instruction piecemeal belong to inhuman object area.Computer equipment uses 1000 piecemeals, to piecemeal Attributive classification device model is trained, and obtains piecemeal attributive classification device, which can be according to the image of piecemeal Information exports the piecemeal attribute of piecemeal.Then in step s 51, computer equipment will be divided into multiple points comprising character image Block;In step S52, computer equipment is using the corresponding image information of each piecemeal in multiple piecemeal as the piecemeal attribute point The input of class device, to obtain the piecemeal attribute of piecemeal that the piecemeal attributive classification device exports, each.
Preferably, computer equipment can be based on machine learning techniques, such as deep neural network technology, to establish piecemeal attribute Sorter model.
It should be noted that those skilled in the art will be understood that in step S52, computer equipment may be needed only really The piecemeal attribute of fixed multiple points of part piecemeals in the block, the piecemeal attribute without multiple points of all piecemeals in the block of determination.Example When such as, due to shooting personage, often there are certain spatial context, (i.e. image top edge tends to belong at image top edge Inhuman object area), therefore, computer equipment can directly determine the piecemeal of such top edge belong to inhuman object area (or when top When the piecemeal at portion edge proportion in whole image is less than the piecemeal quantity of certain proportion or image higher than certain amount, Directly determine that the piecemeal of such top edge belongs to inhuman object area), execute step without the piecemeal to such top edge S52.In another example when computer equipment determines that multiple points of part piecemeals in the block are character face's image based on person recognition technology When, computer equipment can directly determine the piecemeal attribute of each piecemeal in the part piecemeal, the determined piecemeal attribute instruction Piecemeal belongs to personage region;Then in step S52, computer equipment can only near the part piecemeal it is a certain range of at least One piecemeal executes step S52 to determine the piecemeal attribute of each piecemeal at least one piecemeal, without to certain model It encloses outer piecemeal and executes step S52.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that each corresponding image of piecemeal in any at least one piecemeal according to multiple piecemeals Information determines the realization method of the piecemeal attribute of each piecemeal, should be included in the scope of the present invention.
In step S53, computer equipment determines that described includes personage according to the piecemeal attribute of at least one piecemeal Image in character contour.
Specifically, computer equipment determines the reality of the character contour in image according to the piecemeal attribute of at least one piecemeal Now mode includes but not limited to:
1) computer equipment determines the personage in image directly according to the piecemeal for belonging to personage region at least one piecemeal Profile.
Specifically, computer equipment determines directly according to the piecemeal for belonging to personage region at least one piecemeal in image The character contour being made of such piecemeal for belonging to personage region.
For example, computer equipment is calculated and is belonged at least one piecemeal based on the morphological operation in image processing techniques Multiple connected regions that the piecemeal in personage region is formed, and further calculate the maximum connected region of area in multiple connected region The profile in domain, and using the profile being calculated as the character contour in image.
Fig. 4 shows a part for two kinds of character contours in image;Wherein, Line1 is 1) institute is true using this realization method A part for fixed character contour.
2) computer equipment determines initial character contour according to the piecemeal attribute of at least one piecemeal;Also, computer is set It is standby that lines smoothing processing is carried out to initial character contour, determine character contour.
For example, schematic diagrames of the Fig. 4 for the character contour in the determination image of an example of the present invention.Computer equipment according to The piecemeal attribute of at least one piecemeal determines that initial character contour line character contour, the Line1 in Fig. 4 show initial personage A part for profile;Then, computer equipment carries out lines smoothing processing to the initial character contour line character contour, determines people Object profile, Line2 shown in Fig. 4 are a part of character contour for Line1 obtain after lines smoothing processing.
Wherein, computer equipment determines the realization method of the initial character contour in image, with aforementioned realization method 1) in Computer equipment directly according to the piecemeal for belonging to personage region at least one piecemeal, determines the realization of the character contour in image Mode is same or similar.
Wherein, computer equipment can be used a variety of curve smoothing algorithms, such as smothing filtering algorithm, remove crude algorithm, come Lines smoothing processing is carried out to initial character contour.
The realization method 2) determined by character contour compare realization method 1) it is more smooth, it is also more accurate.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that any piecemeal attribute according at least one piecemeal, determines the character contour in image Realization method, should be included in the scope of the present invention.
3) the step S53 further comprises step S53-1, step S53-2 and step S53-3.
In step S53-1, at least one point in multiple piecemeals of the computer equipment obtained by being divided to image The piecemeal attribute of block, determines the piecemeal near character contour.
Specifically, computer equipment determines that character contour is attached according to the piecemeal attribute of at least one piecemeal in multiple piecemeals The realization method of close piecemeal includes but not limited to:
A) for described at least one point each piecemeal in the block, when different adjacent of the piecemeal attribute for being present in the piecemeal When piecemeal, the piecemeal which is identified as near character contour.
For example, Fig. 5 is the schematic diagram of the piecemeal near the part character contour of an example of the present invention.For the sake of simplicity, The figure only shown in part piecemeal in image, wherein P1 and P2 is two adjacent piecemeals.In step S53-1, work as calculating When machine equipment determines that the piecemeal attribute of P1 and the piecemeal attribute of P2 differ, P1 and P2 are identified as character contour by computer equipment Neighbouring piecemeal.
B) computer equipment determines initial character contour according to the piecemeal attribute of at least one piecemeal;Computer equipment will Piecemeal near the initial character contour, as the piecemeal near the character contour.
Wherein, computer equipment determines the realization method of initial character contour according to the piecemeal attribute of at least one piecemeal With the realization method 1 of abovementioned steps S53) Computer equipment directly according to belong at least one piecemeal personage region point Block determines that the realization method of the character contour in image is same or similar, and details are not described herein.
For example, computer equipment determines initial character contour according to the piecemeal attribute of at least one piecemeal, wherein Fig. 5 institutes Show that solid line is a part for the initial character contour;Also, computer equipment is by the piecemeal near initial character contour, such as comprising With all dotted line frames of the equitant lines of solid line shown in Fig. 5, as the piecemeal near the character contour.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that any piecemeal attribute according at least one piecemeal, determines point near character contour The realization method of block, should be included in the scope of the present invention.
In step S53-2, for point each piecemeal in the block near character contour, computer equipment draws the piecemeal It is divided into multiple sub-piecemeals, and according to the corresponding image information of each sub-piecemeal in the multiple sub-piecemeal, determines each sub-piecemeal Sub-piecemeal attribute.Wherein, the sub-piecemeal attribute is used to indicate sub-piecemeal and belongs to personage region or inhuman object area.
For example, point each piecemeal pixel in the block near character contour is 40*40, for each piecemeal, calculate The piecemeal is averagely divided into 16 sub-piecemeals (pixel of each sub-piecemeal is 10*10) by machine equipment, and according to 16 sons point The corresponding image information of each sub-piecemeal in block, determines the sub-piecemeal attribute of each sub-piecemeal.
Wherein, computer equipment by piecemeal be divided into the realization methods of multiple sub-piecemeals in abovementioned steps S51 by image The realization method for being divided into multiple piecemeals is same or similar, and details are not described herein.
Wherein, computer equipment is determined according to the corresponding image information of each sub-piecemeal in multiple sub-piecemeals per height The realization method of the sub-piecemeal attribute of piecemeal, with abovementioned steps S52 Computers equipment according at least one point of multiple piecemeals The corresponding image information of each piecemeal in the block, determines that the realization method of the piecemeal attribute of each piecemeal is same or similar, This is repeated no more.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that any point each piecemeal in the block near character contour, which is divided For multiple sub-piecemeals, and according to the corresponding image information of each sub-piecemeal in the multiple sub-piecemeal, determine each sub-piecemeal The realization method of sub-piecemeal attribute, should be included in the scope of the present invention.
In step S53-3, the sub-piecemeal category for the sub-piecemeal that computer equipment includes according to the piecemeal near character contour Property, determine the character contour in image.
Specifically, the sub-piecemeal attribute for the sub-piecemeal that computer equipment includes according to the piecemeal near character contour determines The realization method of character contour in described image includes but not limited to:
A) son for the sub-piecemeal for belonging to personage region that computer equipment directly includes according to the piecemeal near character contour Piecemeal attribute determines the character contour in image.
For example, the sub-piecemeal attribute for the sub-piecemeal that computer equipment includes according to the piecemeal near character contour, based on figure Belong to the region that the sub-piecemeal in personage region constituted as treatment technology calculates, and using the profile in the region as the people in image Object profile.
B) the sub-piecemeal attribute for the sub-piecemeal that computer equipment includes according to the piecemeal near character contour determines roughly Character contour, and lines smoothing processing is carried out to the rough character contour, determine the character contour in image.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that the sub-piecemeal attribute for the sub-piecemeal that any piecemeal according near character contour includes, The realization method for determining the character contour in image, should be included in the scope of the present invention.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that any piecemeal attribute according at least one piecemeal, determines that described includes personage Image in character contour realization method, should be included in the scope of the present invention.
In step s 6, computer equipment generates character contour template according to determined character contour.Wherein, one Character contour template can indicate character contour corresponding with personage's contour mould.By this step, computer equipment can incite somebody to action Locally determining character contour generates a template, for subsequently using.
Preferably, this preferred embodiment is further comprising the steps of:Local character contour template is uploaded to by computer equipment In network;Preferably, the network is community network, such as mhkc, microblogging, wechat.By this step, computer equipment can incite somebody to action Local character contour template is shared with the public in network.
As a preferred embodiment, the scheme of the present embodiment is further comprising the steps of:Computer equipment is downloaded from network Character contour template.By this step, computer equipment can obtain the character contour template in network, to enrich local people Object contour mould.
In the prior art, when being blurred to image, usually by the specified region blurred of user, and then using existing Image weakening method the specified region blurred of user is fixed the virtualization of virtualization degree.This makes in image Virtualization effect is poor, affects the visual effect of the image after virtualization.
In addition, in the prior art, often only special camera, could by two objects or scene apart from each other, Directly to shoot the photo with virtualization effect.For example, if shooting picture includes a personage and has one with the personage The background environment of set a distance, then can be used special camera, directly shoot background blurring and personage clearly image.But it is existing General camera in technology simultaneously has above-mentioned function.Therefore, in order to enable the image of general camera shooting also can have background empty The effect of change, therefore produce image virtualization technology.However, since the idea of image virtualization comes from the bat of aforementioned special camera Camera shooting function, and why aforementioned special camera can realize aforementioned shooting function, be because having between figure and ground's environment There is certain distance, that is, under this shooting environmental, image is divided into two levels:Figure and ground (i.e. personage region and non- Personage region).Therefore, by this influence, those skilled in the art often have such inertial thinking:By the way that image is divided For the two levels of figure and ground, to realize background blurring effect.In addition, in such image virtualization technology, it is necessary to by User is come the image of clearly specifying needs to blur.
According to the scheme of the present embodiment, the above-mentioned inertial thinking of those skilled in the art is broken, more subtly by image It is divided into personage region, transitional region and background area, and background area and transitional region are blurred respectively;Also, it is right The virtualization degree that the transition type of transitional region blurs the part that transitional region is connected with personage region is 0, and and background The virtualization degree for the part that region is connected is identical as the virtualization degree of background area, this makes the virtualization of image more smooth, Image after virtualization can bring better visual effect.
In addition, according to the scheme of the present embodiment, computer equipment can divide an image into multiple piecemeals, and according to multiple points The piecemeal attribute of at least one point of each piecemeal in the block in block, to determine the character contour in image;Also, by first identifying The piecemeal attribute of larger piecemeal can relatively rapid identify the piecemeal near character contour, also, can be attached to character contour Close piecemeal is divided again, and is obtained more accurate and forced based on the sub-piecemeal attribute of the sub-piecemeal divided again Genuine character contour, therefore, it is possible to while improving character contour recognition speed, obtain more accurate character contour identification Effect;It is used as character contour template in addition, user can will identify oneself preferable character contour by computer equipment and is uploaded to society Area's network, to share personage's contour mould with the user in network, alternatively, downloading personage's contour mould for taking pictures Or used during being blurred to image, to form benign cycle, provide more rich character contour mould to the user Plate;Also, character contour template can be managed collectively in community network.
Fig. 3 is the structural schematic diagram of the device for being blurred to image of one embodiment of the invention.According to this reality The device (hereinafter referred to as " image virtualization device ") for being blurred to image for applying example includes for being selected according to user Character contour template, determine device (hereinafter referred to as " the first determining device of the character contour in the image that user specifies 1 ") it, is used to, according to the character contour, determine personage region, background area and personage region and the background in described image The device (hereinafter referred to as " the second determining device 2 ") of transitional region between region and for by the background area Domain is blurred, and carries out transition type virtualization to the transitional region, (hereinafter referred to as come the device of the image after being blurred " virtualization device 3 ").
The character contour template that first determining device 1 is selected according to user determines personage's wheel in the image that user specifies It is wide.
Wherein, the character contour template is used to indicate character contour corresponding with personage's contour mould.
Wherein, the image that user specifies includes any image that can be used in computer equipment.Preferably, user refers to Fixed image includes but not limited to:(shooting of the camera of such as mobile device shows boundary to the image presented on shooting display interface The image etc. presented on face), user is in local image selected (such as in the photograph album of local).It should be noted that working as user Specified image is when shooting the image presented on display interface, and the computer equipment is usually user equipment.
Preferably, the image specified in user includes in the case of shooting the image presented on display interface, and first determines Device 1 further comprises the character contour template for being selected according to user, and corresponding personage is presented on shooting display interface The device (hereinafter referred to as " device being presented ", not shown) of profile, and for obtaining user based on the character contour presented The image of shooting, and determine according to the character contour template device of character contour in the image of the shooting (hereinafter referred to as It is not shown for " the sub- determining device of third ").
The character contour template that device is selected according to user is presented, corresponding personage's wheel is presented on shooting display interface It is wide.
For example, user selects character contour template template1 in local personage's contour mould library, then device root is presented According to template1, the character contour corresponding to template1 is presented on the shooting display interface of camera.
The sub- determining device of third obtains image of the user based on the character contour shooting presented, and is taken turns according to the personage Wide template determines the character contour in the image of the shooting.
Specifically, the sub- determining device of third obtains image of the user based on the character contour shooting presented, and according to people The position of character contour shape and the character contour in character contour template in object contour mould, determines the figure of the shooting Character contour as in.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that any character contour template selected according to user, determines in the image that user specifies Character contour realization method, should be included in the scope of the present invention.
Second determining device 2 according to character contour, determine personage region, background area and personage region in image and Transitional region between background area.
Specifically, the second determining device 2 determines personage region, background area and the people in image according to character contour The realization method of transitional region between object area and background area includes but not limited to:
1) enclosed region that the second determining device 2 is directly constituted character contour is as personage region, by character contour The region being formed by after preset width between profile and character contour is extended to the outside as transitional region, by personage in image Region other than region and transitional region is as background area.
For example, preset width is 20 pixels.The enclosed region that second determining device 2 is directly constituted character contour is made For people's object area, character contour is extended to the outside between the profile and character contour being formed by after the width of 20 pixels Region is as transitional region, using the region other than personage region and transitional region as background area.
2) the second determining device 2 further comprises for according to the character contour, determining the device in the personage region (hereinafter referred to as " the first sub- determining device ", not shown) and for according to the personage region and/or inhuman object area Image information, determining the device of the transitional region and background area, (hereinafter referred to as " the second sub- determining device ", figure is not Show).
First sub- determining device determines personage region according to character contour.
Specifically, the enclosed region that the first sub- determining device is constituted character contour is as personage region.
Second sub- determining device according to personage region and/or the image information of inhuman object area, determine transitional region and Background area.
Wherein, the inhuman object area includes transitional region and background area, that is, the inhuman object area includes people Any region other than object area.
Wherein, the image information of the personage region and/or inhuman object area includes any with personage region and/or inhuman The relevant information of the graphic feature of object area in the picture.Preferably, the image of the personage region and/or inhuman object area is believed Breath includes that any corresponding image-region is related in the picture with the image information of the personage region and/or inhuman object area Image information.Preferably, the image information of the personage region and/or inhuman object area includes but not limited to:
A) size in personage region.Wherein, much information can be used to indicate the size in personage region, as personage region exists Shared ratio, the size etc. in personage region in image.
B) size of inhuman object area.Wherein, much information can be used to indicate the size of inhuman object area, such as non-personage Region shared ratio, the size etc. of inhuman object area in the picture.
C) colouring information of the colouring information in personage region and/or inhuman object area.
Wherein, the colouring information in the personage region includes any and the personage region relevant information of color, such as personage The averaged color value of aberration, personage region between region and inhuman object area, the grey level histogram etc. in personage region.
Wherein, the colouring information of the inhuman object area includes any and the inhuman object area relevant information of color, such as The averaged color value of aberration, inhuman object area between personage region and inhuman object area, the grey level histogram of inhuman object area Deng.
Specifically, the second sub- determining device determines transition region according to personage region and/or the image information of inhuman object area The width in domain, and character contour is extended to the outside into region that the width is formed by between profile and character contour as transition region Domain, and using personage region in image and the region other than transitional region as background area.Preferably, personage region is bigger, mistake It is wider to cross region;Inhuman object area is bigger, and transitional region is narrower;Color difference between personage region and inhuman object area is got over Greatly, transitional region is wider;Close to the region of inhuman object area in personage region, with the area close to personage region in inhuman object area Color difference between domain is bigger, and transitional region is wider.
Wherein, the second sub- determining device can be used various ways and determine according to personage region and/or the figure of inhuman object area As information, the width of transitional region is determined.
For example, being preset with the width corresponding to multiple aberration ranges in computer equipment, the second sub- determining device is according to people The aberration of object area and inhuman object area, using the width corresponding to the aberration range that the aberration is fallen into as the width of transitional region Degree.
In another example the second sub- determining device is according to the size in personage region and the colouring information in personage region and/or non- The colouring information in personage region determines the width of transitional region.As an example, the second sub- determining device is based on following public affairs Formula, to determine the width of transitional region:
W=a*Size (Ifg)/Size(I)+b/|Avg(Ifg)-Avg(I-Ifg)|
Wherein, W is the width of transitional region;Size(Ifg) be people's object area size, Size (I) be image size, Size(Ifg)/Size (I) is people's object area shared ratio in the picture;Avg(Ifg) be people's object area averaged color value; Avg(I-Ifg) be inhuman object area averaged color value;|Avg(Ifg)-Avg(I-Ifg) | it is people's object area and inhuman object area Between aberration;A is size weight coefficient, and b is aberration weight coefficient, it is preferable that a and b is predetermined value.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System determines personage region in described image, background it should be appreciated by those skilled in the art that any according to the character contour The realization method of transitional region between region and personage region and background area, should be included in the scope of the present invention.
Device 3 is blurred by being blurred to background area, and transition type virtualization is carried out to the transitional region, to obtain Image after virtualization.
Wherein, a variety of image fuzzy algorithmic approaches can be used in virtualization device 3, such as Gaussian mode gelatinization (blurring) algorithm, PID (Proportion Integration Differentiation, proportional integral differential) algorithm etc. carries out background area empty Change, the transitional region after being blurred.For example, virtualization device 3, which is based on Gaussian mode, is gelatinized algorithm, Gaussian kernel (Gaussian is used Kernel convolution algorithm) is carried out with background area, to be blurred to background area.
Wherein, the transition type virtualization indicates that the virtualization degree of the transitional region is weaker than the virtualization journey of the background area Degree.Preferably, the transition type virtualization indicates that the virtualization degree in transitional region closer to the part in personage region is more shallow, more leans on The virtualization degree of the part of nearly background area is deeper.
Wherein, virtualization device 3 includes but not limited to the realization method of transitional region progress transition type virtualization:
1) virtualization device 3 is directly according to the corresponding image information of transitional region, to transition region from the edge in personage region Transitional region is carried out the virtualization of virtualization degree from low to high by the edge in domain.
Preferably, transitional region is carried out virtualization degree by 0 to predetermined extent virtualization by virtualization device 3.Wherein, described pre- Determine degree and is used to indicate scheduled virtualization degree;In this realization method, which is used to indicate transitional region, the close back of the body The virtualization degree at the edge of scene area;For example, predetermined extent is 20%, then it is directly corresponding according to transitional region to blur device 3 Transitional region is carried out virtualization degree and is gradually increased by 0 by image information to the edge of transitional region from the edge in personage region To 20% virtualization.
2) virtualization device 3 blurs transitional region, the transitional region after being blurred;Then, virtualization device 3 will be empty Transitional region after change is mixed with the transitional region not blurred, obtains the transitional region after transition type virtualization.Wherein, it more leans on Person of modern times's object area, proportion of the transitional region not blurred in mixing are higher;Closer to the background area, the transition after virtualization Proportion of the region in the mixing is higher.
Wherein, the realization method that virtualization device 3 blurs transitional region and aforementioned virtualization device 3 to background area into The realization method of row virtualization is same or similar, is not repeating herein.
Preferably, if virtualization device 3, which is based on Gaussian mode, is gelatinized algorithm, convolution fortune is carried out using Gaussian kernel and background area Calculate, to be blurred to background area, then this realization method 2) in, virtualization device 3 using same size Gaussian kernel and mistake It crosses region and carries out convolution algorithm, to be blurred to transitional region, the transitional region after being blurred.
As an example, virtualization device 3 based on following formula by after virtualization transitional region and the transition region that does not blur Domain is mixed, to obtain the transitional region after transition type virtualization:
Iout=alpha*Iclear+(1-alpha)*Iblurred
Wherein, IclearFor the transitional region not blurred, IblurredFor the transitional region after virtualization, IoutIt is mixed to get Transitional region after transition type virtualization.Wherein, alpha is mixing control parameter, which, which is used to indicate, does not blur Transitional region or virtualization after proportion of the transitional region in mixing, the value range of the mixing control parameter is [0,1];It is excellent Selection of land, alpha=d2/ (d1+d2), wherein d1 is that (pixel can be random in transitional region for a pixel in transitional region Or specific pixel) arrive the shortest distance in personage region, d2 is the shortest distance of the pixel to background area.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that it is any by being blurred to the background area, and the transitional region is carried out Transition type blurs, and come the realization method of the image after being blurred, should be included in the scope of the present invention.
As a preferred embodiment, virtualization device 3 can further comprise the virtualization extent index for obtaining user's determination Device (hereinafter referred to as " the first acquisition device ", not shown) and for according to acquired virtualization extent index, to the back of the body Scene area is blurred, and carries out transition type virtualization to the transitional region, (following simple come the device of the image after blur Referred to as " fictitious makeup is set ", not shown).Wherein, the virtualization extent index is used to indicate the degree blurred.
For example, the first acquisition device obtains the virtualization extent index p that user determines, wherein p=40%;Then fictitious makeup It sets and background area is subjected to the virtualization that virtualization degree is 40%, and to the edge of transitional region from the edge in personage region, it will Transitional region carries out virtualization degree and is gradually increased from 0 to 40% virtualization, to the image after being blurred.
Wherein, the first acquisition device can be used various ways and obtain the virtualization extent index that user determines.For example, first obtains Device is taken to directly acquire the virtualization extent index that user inputs in the computer equipment;In another example the first acquisition device according to Family determines that the selected virtualization degree of user is joined in the computer equipment to the selection operation of multiple optional virtualization extent index Number.
It should be noted that this preferred embodiment can be with the realization method 2 of aforementioned virtualization device 3) it is combined, i.e.,:Computer Equipment blurs transitional region according to acquired virtualization extent index, the transitional region after being blurred;Then, it counts It calculates machine equipment to mix the transitional region after virtualization with the transitional region not blurred, obtains the transition region after transition type virtualization Domain.
As a preferred embodiment, the image virtualization device of the present embodiment further includes for obtaining a figure for including personage The device (hereinafter referred to as " the second acquisition device ", not shown) of the image information of picture, the figure for including personage according to The image information of picture, determine the character contour in the image device (hereinafter referred to as " third determining device ", not shown), with And for according to determined character contour, (hereinafter referred to as " generating means ", figure to be not for the device of generation character contour template Show).
Second acquisition device obtains the image information of an image comprising personage.
Wherein, described image information includes any and the image relevant information of graphic feature;Preferably, described image Information includes but not limited to the average gray value etc. of the Aspect Ratio of image, the pixel of image, the resolution ratio of image, image.
Specifically, the second acquisition device can obtain the image information of the image comprising personage from local or other equipment.
Third determining device determines the character contour in the image according to the image information of the image comprising personage.
For example, image information of the third determining device according to the image comprising personage, and combine user institute on this image Specified region determines the character contour in the image.
Preferably, third determining device further comprises for the image comprising personage to be divided into multiple piecemeals Device (hereinafter referred to as " divide device ", not shown), for each dividing at least one piecemeal according to the multiple piecemeal The corresponding image information of block, determine the piecemeal attribute of each piecemeal device (hereinafter referred to as " the 4th sub- determining device ", It is not shown) and for the piecemeal attribute according at least one piecemeal, determine the personage in the image comprising personage The device (hereinafter referred to as " the 5th sub- determining device ", not shown) of profile.
It divides device and the image comprising personage is divided into multiple piecemeals.
For example, divide device is divided into multiple piecemeals by image shown in Fig. 3.
Specifically, division device can be used various ways and the image comprising personage be divided into multiple piecemeals.
For example, divide device divides the image into multiple piecemeals according to the Aspect Ratio of the image comprising personage;Such as packet The Aspect Ratio of image containing personage is 16:9, then it divides device and the image averaging is divided into k* (16*9) a piecemeal, wherein K is natural number.
In another example divide device is divided into predetermined piecemeal quantity piecemeal by the image averaging comprising personage;Such as predetermined number Amount is 64, divides device and the image averaging comprising personage is directly divided into 8*8 piecemeal.
It should be noted that the piecemeal can have various shapes, such as rectangle, sector or other irregular shapes, Also, including the shape and/or size of multiple piecemeals that the image of personage is divided may be different.For example, meter Rectangular image uniform is divided into M*N piecemeal by calculation machine equipment, and (M is the piecemeal quantity in horizontal direction, and N is Vertical Square Upward piecemeal quantity), which is the identical rectangle piecemeal of size.In another example computer equipment schemes ellipse As being divided into M*N piecemeal, the piecemeal of the image edge location is sector, and the piecemeal in centre position is rectangle.
It should be noted that the multiple piecemeal may partly overlap.For example, the pixel of the image comprising personage is A*B (A is the length in pixels of image, and B is the pixel wide of image), divides device and divides the image into a point of the identical M*N of size Block, wherein the pixel of each piecemeal be m*n (m is the length in pixels of piecemeal, n for piecemeal pixel wide);Then work as image The value of theoretical length in pixels M*m when being more than the actual length in pixels A of image, which will appear in the horizontal direction It partly overlaps;As the value of the theoretical pixel wide N*n of image pixel wide B actual more than image, which is hanging down Histogram will appear upwards to partly overlap.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that any realization method that the image comprising personage is divided into multiple piecemeals, should all wrap Containing within the scope of the invention.
4th sub- determining device is determined according to each corresponding image information of piecemeal at least one piecemeal of multiple piecemeals The piecemeal attribute of each piecemeal.
Wherein, the piecemeal attribute is used to indicate piecemeal and belongs to personage region or inhuman object area.For example, piecemeal attribute is Indicate that piecemeal belongs to personage region when " 0 ", instruction piecemeal belongs to inhuman object area when piecemeal attribute is " 1 ".Wherein, the personage The region that region is located at by the personage in image, the inhuman object area are the region other than personage region in image;For example, The region behaviour object area that personage shown in Fig. 3 is located at, the white space other than the people's object area are inhuman object area.
Wherein, the corresponding image information of piecemeal includes any and the piecemeal relevant information of graphic feature;Preferably, divide The corresponding image information of block includes the image information of the image-region corresponding to the piecemeal.Preferably, the corresponding image letter of piecemeal Breath include but not limited to the Aspect Ratio of piecemeal, the pixel of piecemeal of image-region corresponding to piecemeal, the resolution ratio of piecemeal, point The gray value etc. of block.
Specifically, the 4th sub- determining device is according to each corresponding image of piecemeal at least one piecemeal of multiple piecemeal Information determines that the realization method of the piecemeal attribute of each piecemeal includes but not limited to:
1) the 4th sub- determining device is according to each corresponding image information of piecemeal at least one piecemeal of multiple piecemeal, And predetermined recognition rule is combined, determine the piecemeal attribute of each piecemeal.
Wherein, the predetermined recognition rule include it is any it is scheduled, can determine piecemeal according to the image information of piecemeal Piecemeal attribute rule.
For example, the predetermined recognition rule includes image information and piecemeal based on piecemeal defined in person recognition technology Correlation rule between attribute;For described at least one point each piecemeal in the block, in conjunction with the correlation rule, the 4th son determines Device can be according to the corresponding image information of the piecemeal, to determine the piecemeal attribute of the piecemeal.
2) the 4th sub- determining device is believed according to the corresponding image of each piecemeal at least one piecemeal of the multiple piecemeal The input as piecemeal attributive classification device is ceased, the piecemeal attribute of each piecemeal that the piecemeal attributive classification device exports, described is obtained.
Wherein, the piecemeal attributive classification device includes any piecemeal that piecemeal can be exported according to the image information of piecemeal The grader of attribute.Preferably, the piecemeal attributive classification device is two graders based on image block (patch);For example, piecemeal Attributive classification device is using the image information of piecemeal as input, using the piecemeal attribute of piecemeal as output, also, works as and exports as " 0 " When indicate that the piecemeal belongs to personage region, when output be " 1 " when indicate that the piecemeal belongs to inhuman object area.
Preferably, the 4th sub- determining device uses above-mentioned realization method 2) when, this preferred embodiment further includes following operation:The Four sub- determining devices use multiple piecemeals for having determined that piecemeal attribute, are trained to piecemeal attributive classification device model, obtain institute State piecemeal attributive classification device.
For example, existing 1000 piecemeals, wherein the piecemeal attribute instruction piecemeal of 600 piecemeals belongs to personage region, other 400 piecemeals piecemeal attribute instruction piecemeal belong to inhuman object area.4th sub- determining device uses 1000 piecemeals, right Piecemeal attributive classification device model is trained, and obtains piecemeal attributive classification device, which can be according to piecemeal Image information exports the piecemeal attribute of piecemeal.Multiple piecemeals will be divided into comprising character image by then dividing device;4th son is really Determining device, the corresponding image information of each piecemeal is as the input of the piecemeal attributive classification device using in multiple piecemeal, to be somebody's turn to do The piecemeal attribute of the output of piecemeal attributive classification device, each piecemeal.
Preferably, the 4th sub- determining device can be based on machine learning techniques, such as deep neural network technology, to establish piecemeal Attributive classification device model.
It should be noted that those skilled in the art will be understood that the 4th sub- determining device may only need to determine multiple points The piecemeal attribute of part piecemeal in the block, the piecemeal attribute without multiple points of all piecemeals in the block of determination.For example, due to clapping When taking the photograph personage, often there are certain spatial context, (i.e. image top edge tends to belong to non-personage area at image top edge Domain), therefore, computer equipment can directly determine that the piecemeal of such top edge belongs to inhuman object area (or when top edge When piecemeal proportion in whole image is less than the piecemeal quantity of certain proportion or image higher than certain amount, directly determine The piecemeal of such top edge belongs to inhuman object area), and the 4th sub- determining device is without holding the piecemeal of such top edge Row operation.In another example when computer equipment determines that multiple points of part piecemeals in the block are character face based on person recognition technology When image, computer equipment can directly determine the piecemeal attribute of each piecemeal in the part piecemeal, the determined piecemeal attribute Instruction piecemeal belongs to personage region;Then the 4th sub- determining device can be only to a certain range of at least one near the part piecemeal Piecemeal executes operation and determines the piecemeal attribute of each piecemeal at least one piecemeal, without dividing outside to a certain range Block executes operation.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that each corresponding image of piecemeal in any at least one piecemeal according to multiple piecemeals Information determines the realization method of the piecemeal attribute of each piecemeal, should be included in the scope of the present invention.
5th sub- determining device is determined according to the piecemeal attribute of at least one piecemeal in the image comprising personage Character contour.
Specifically, the 5th sub- determining device determines the character contour in image according to the piecemeal attribute of at least one piecemeal Realization method include but not limited to:
1) the 5th sub- determining device determines directly according to the piecemeal for belonging to personage region at least one piecemeal in image Character contour.
Specifically, the 5th sub- determining device determines figure directly according to the piecemeal for belonging to personage region at least one piecemeal The character contour being made of such piecemeal for belonging to personage region as in.
For example, the 5th sub- determining device is calculated based on the morphological operation in image processing techniques at least one piecemeal Belong to multiple connected regions that the piecemeal in personage region is formed, and further calculates the maximum company of area in multiple connected region The profile in logical region, and using the profile being calculated as the character contour in image.
Fig. 4 shows a part for two kinds of character contours in image;Wherein, Line1 is 1) institute is true using this realization method A part for fixed character contour.
2) the 5th sub- determining device determines initial character contour according to the piecemeal attribute of at least one piecemeal;Also, the 5th Sub- determining device carries out lines smoothing processing to initial character contour, determines character contour.
For example, schematic diagrames of the Fig. 4 for the character contour in the determination image of an example of the present invention.5th sub- determining device According to the piecemeal attribute of at least one piecemeal, determine that initial character contour line character contour, the Line1 in Fig. 4 are shown initially A part for character contour;Then, the 5th sub- determining device smoothly locates initial character contour line character contour progress lines Reason, determines character contour, and Line2 shown in Fig. 4 is a part of character contour for Line1 obtain after lines smoothing processing.
Wherein, the 5th sub- determining device determines the realization method of the initial character contour in image, with aforementioned realization method 1) the 5th sub- determining device determines personage's wheel in image directly according to the piecemeal for belonging to personage region at least one piecemeal in Wide realization method is same or similar.
Wherein, a variety of curve smoothing algorithms can be used in the 5th sub- determining device, and such as smothing filtering algorithm removes crude algorithm Deng to initial character contour progress lines smoothing processing.
The realization method 2) determined by character contour compare realization method 1) it is more smooth, it is also more accurate.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that any piecemeal attribute according at least one piecemeal, determines the character contour in image Realization method, should be included in the scope of the present invention.
3) the 5th sub- determining device is further used for, according to the piecemeal attribute of at least one piecemeal, determining character contour The device (hereinafter referred to as " the 6th sub- determining device ", not shown) of neighbouring piecemeal is used near for the character contour Point each piecemeal in the block, which is divided into multiple sub-piecemeals, and according to each sub-piecemeal in the multiple sub-piecemeal Corresponding image information determines device (hereinafter referred to as " the 7th sub- determining device ", the figure of the sub-piecemeal attribute of each sub-piecemeal Do not show) and sub-piecemeal for including according to the piecemeal near the character contour sub-piecemeal attribute, determine described image In character contour device (hereinafter referred to as " the 8th sub- determining device ", not shown).
The piecemeal category of at least one piecemeal in multiple piecemeals of the 6th sub- determining device obtained by being divided to image Property, determine the piecemeal near character contour.
Specifically, the 6th sub- determining device determines that personage takes turns according to the piecemeal attribute of at least one piecemeal in multiple piecemeals The realization method of piecemeal near exterior feature includes but not limited to:
A) for described at least one point each piecemeal in the block, when different adjacent of the piecemeal attribute for being present in the piecemeal When piecemeal, the piecemeal which is identified as near character contour.
For example, Fig. 5 is the schematic diagram of the piecemeal near the part character contour of an example of the present invention.For the sake of simplicity, The figure only shown in part piecemeal in image, wherein P1 and P2 is two adjacent piecemeals.When determine the piecemeal attribute of P1 with When the piecemeal attribute of P2 differs, P1 and P2 are identified as the piecemeal near character contour by the 6th sub- determining device.
B) the 6th sub- determining device determines initial character contour according to the piecemeal attribute of at least one piecemeal;6th son is really Device is determined by the piecemeal near the initial character contour, as the piecemeal near the character contour.
Wherein, the 6th sub- determining device determines the realization of initial character contour according to the piecemeal attribute of at least one piecemeal The realization method 1 of mode and aforementioned 5th sub- determining device) in the 5th sub- determining device directly belong to according at least one piecemeal Piecemeal in personage region determines that the realization method of the character contour in image is same or similar, and details are not described herein.
For example, piecemeal attribute of the 6th sub- determining device according at least one piecemeal, determines initial character contour, wherein Solid line shown in Fig. 5 is a part for the initial character contour;Also, the 6th sub- determining device by near initial character contour point Block, all dotted line frames included the equitant lines of solid line as shown in Fig. 5, as the piecemeal near the character contour.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that any piecemeal attribute according at least one piecemeal, determines point near character contour The realization method of block, should be included in the scope of the present invention.
For point each piecemeal in the block near character contour, which is divided into multiple sons by the 7th sub- determining device Piecemeal, and according to the corresponding image information of each sub-piecemeal in the multiple sub-piecemeal, determine the sub-piecemeal category of each sub-piecemeal Property.Wherein, the sub-piecemeal attribute is used to indicate sub-piecemeal and belongs to personage region or inhuman object area.
For example, point each piecemeal pixel in the block near character contour is 40*40, for each piecemeal, the 7th The piecemeal is averagely divided into 16 sub-piecemeals (pixel of each sub-piecemeal is 10*10) by sub- determining device, and according to this 16 The corresponding image information of each sub-piecemeal in sub-piecemeal, determines the sub-piecemeal attribute of each sub-piecemeal.
Wherein, piecemeal is divided into the realization method of multiple sub-piecemeals and aforementioned division device and will schemed by the 7th sub- determining device The realization method that picture is divided into multiple piecemeals is same or similar, and details are not described herein.
Wherein, the 7th sub- determining device determines every according to the corresponding image information of each sub-piecemeal in multiple sub-piecemeals The realization method of the sub-piecemeal attribute of a sub-piecemeal, with aforementioned 4th sub- determining device according at least one piecemeal of multiple piecemeals In the corresponding image information of each piecemeal, determine that the realization method of the piecemeal attribute of each piecemeal is same or similar, herein It repeats no more.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that any point each piecemeal in the block near character contour, which is divided For multiple sub-piecemeals, and according to the corresponding image information of each sub-piecemeal in the multiple sub-piecemeal, determine each sub-piecemeal The realization method of sub-piecemeal attribute, should be included in the scope of the present invention.
The sub-piecemeal attribute for the sub-piecemeal that 8th sub- determining device includes according to the piecemeal near character contour, determines image In character contour.
Specifically, the sub-piecemeal attribute for the sub-piecemeal that the 8th sub- determining device includes according to the piecemeal near character contour, Determine that the realization method of the character contour in described image includes but not limited to:
A) sub-piecemeal for belonging to personage region that the 8th sub- determining device directly includes according to the piecemeal near character contour Sub-piecemeal attribute, determine the character contour in image.
For example, the sub-piecemeal attribute for the sub-piecemeal that the 8th sub- determining device includes according to the piecemeal near character contour, base The region for belonging to the sub-piecemeal in personage region and being constituted is calculated in image processing techniques, and using the profile in the region as in image Character contour.
B) the sub-piecemeal attribute for the sub-piecemeal that the 8th sub- determining device includes according to the piecemeal near character contour determines thick Character contour slightly, and lines smoothing processing is carried out to the rough character contour, determine the character contour in image.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that the sub-piecemeal attribute for the sub-piecemeal that any piecemeal according near character contour includes, The realization method for determining the character contour in image, should be included in the scope of the present invention.
It should be noted that the above-mentioned examples are merely illustrative of the technical solutions of the present invention, rather than to the limit of the present invention System, it should be appreciated by those skilled in the art that any piecemeal attribute according at least one piecemeal, determines that described includes personage Image in character contour realization method, should be included in the scope of the present invention.
Generating means generate character contour template according to determined character contour.Wherein, personage's contour mould energy It is enough to indicate character contour corresponding with personage's contour mould.By generating means, computer equipment can be by locally determining people Object profile generates a template, for subsequently using.
Preferably, this preferred embodiment further includes following operation:Local character contour template is uploaded to by computer equipment In network;Preferably, the network is community network, such as mhkc, microblogging, wechat.By this operation, computer equipment can incite somebody to action Local character contour template is shared with the public in network.
As a preferred embodiment, the scheme of the present embodiment further includes the dress for downloading character contour template from network It sets (hereinafter referred to as " download apparatus ", not shown).By download apparatus, computer equipment can obtain the wheel of the personage in network Wide template, to enrich local character contour template.
In the prior art, when being blurred to image, usually by the specified region blurred of user, and then using existing Image weakening method the specified region blurred of user is fixed the virtualization of virtualization degree.This makes in image Virtualization effect is poor, affects the visual effect of the image after virtualization.
In addition, in the prior art, often only special camera, could by two objects or scene apart from each other, Directly to shoot the photo with virtualization effect.For example, if shooting picture includes a personage and has one with the personage The background environment of set a distance, then can be used special camera, directly shoot background blurring and personage clearly image.But it is existing General camera in technology simultaneously has above-mentioned function.Therefore, in order to enable the image of general camera shooting also can have background empty The effect of change, therefore produce image virtualization technology.However, since the idea of image virtualization comes from the bat of aforementioned special camera Camera shooting function, and why aforementioned special camera can realize aforementioned shooting function, be because having between figure and ground's environment There is certain distance, that is, under this shooting environmental, image is divided into two levels:Figure and ground (i.e. personage region and non- Personage region).Therefore, by this influence, those skilled in the art often have such inertial thinking:By the way that image is divided For the two levels of figure and ground, to realize background blurring effect.In addition, in such image virtualization technology, it is necessary to by User is come the image of clearly specifying needs to blur.
According to the scheme of the present embodiment, the above-mentioned inertial thinking of those skilled in the art is broken, more subtly by image It is divided into personage region, transitional region and background area, and background area and transitional region are blurred respectively;Also, it is right The virtualization degree that the transition type of transitional region blurs the part that transitional region is connected with personage region is 0, and and background The virtualization degree for the part that region is connected is identical as the virtualization degree of background area, this makes the virtualization of image more smooth, Image after virtualization can bring better visual effect.
In addition, according to the scheme of the present embodiment, computer equipment can divide an image into multiple piecemeals, and according to multiple points The piecemeal attribute of at least one point of each piecemeal in the block in block, to determine the character contour in image;Also, by first identifying The piecemeal attribute of larger piecemeal can relatively rapid identify the piecemeal near character contour, also, can be attached to character contour Close piecemeal is divided again, and is obtained more accurate and forced based on the sub-piecemeal attribute of the sub-piecemeal divided again Genuine character contour, therefore, it is possible to while improving character contour recognition speed, obtain more accurate character contour identification Effect;It is used as character contour template in addition, user can will identify oneself preferable character contour by computer equipment and is uploaded to society Area's network, to share personage's contour mould with the user in network, alternatively, downloading personage's contour mould for taking pictures Or used during being blurred to image, to form benign cycle, provide more rich character contour mould to the user Plate;Also, character contour template can be managed collectively in community network.
It should be noted that the present invention can be carried out in the assembly of software and/or software and hardware, for example, this hair Application-specific integrated circuit (ASIC) can be used in bright device or any other is realized similar to hardware device.In one embodiment, The software program of the present invention can be executed by processor to realize steps described above or function.Similarly, of the invention soft Part program (including relevant data structure) can be stored in computer readable recording medium storing program for performing, for example, RAM memory, magnetic Or CD-ROM driver or floppy disc and similar devices.In addition, hardware can be used to realize in some steps or function of the present invention, example Such as, coordinate to execute the circuit of each step or function as with processor.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie In the case of without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power Profit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent requirements of the claims Variation includes within the present invention.Any reference signs in the claims should not be construed as limiting the involved claims.This Outside, it is clear that one word of " comprising " is not excluded for other units or step, and odd number is not excluded for plural number.That is stated in system claims is multiple Unit or device can also be realized by a unit or device by software or hardware.The first, the second equal words are used for table Show title, and does not represent any particular order.

Claims (18)

1. a kind of method for being blurred to image, wherein this approach includes the following steps:
According to the shape of the character contour in the character contour template of user's selection and the character contour in the character contour Position in template determines the character contour in the image that user specifies;
Character contour in the image specified according to the user, determine personage region in described image, background area and Transitional region between personage region and background area;
Transition type virtualization is carried out by being blurred to the background area, and to the transitional region, after being blurred Image, wherein the transition type virtualization indicates the virtualization degree of the part in the transitional region closer to the personage region More shallow, the virtualization degree closer to the part of the background area is deeper;
Wherein, the character contour in the image specified according to the user determines personage region in described image, background The step of transitional region between region and personage region and background area includes:
According to the character contour, the personage region is determined;
According to the personage region and/or the image information of inhuman object area, the width of the transitional region is determined, and by personage Profile extends to the outside region that the width is formed by between profile and the character contour as transitional region, and will be in image Region other than the personage region and the transitional region is as background area, wherein the inhuman object area includes described Transitional region and the background area.
2. according to the method described in claim 1, wherein, the image information of the personage region and/or inhuman object area includes At least one of below:
The size in the personage region;
The size of the inhuman object area;
The colouring information of the colouring information in the personage region and/or the inhuman object area.
3. method according to claim 1 or 2, wherein include to the step of transitional region progress transition type virtualization:
The transitional region is blurred, the transitional region after being blurred;
Transitional region after virtualization is mixed with the transitional region not blurred, obtains the transitional region after transition type virtualization;
Wherein, closer to the personage region, proportion of the transitional region not blurred in the mixing is higher;Closer to The background area, proportion of the transitional region in the mixing after the virtualization are higher.
4. method according to claim 1 or 2, wherein by being blurred to the background area, and to the transition Region carries out transition type virtualization, includes come the step of image after being blurred:
Obtain the virtualization extent index that user determines;
According to the virtualization extent index, the background area is blurred, and it is empty to carry out transition type to the transitional region Change, come the image after being blurred.
5. method according to claim 1 or 2, wherein the image that the user specifies, which includes on shooting display interface, is in Existing image, the character contour template selected according to user, the step of determining the character contour in the image that user specifies Including:
According to the character contour template that user selects, corresponding character contour is presented on shooting display interface;
Image of the user based on the character contour shooting presented is obtained, and the shooting is determined according to the character contour template Character contour in image.
6. method according to claim 1 or 2, wherein this method is further comprising the steps of:
Obtain the image information of an image comprising personage;
According to the image information of the image comprising personage, the character contour in the image is determined;
According to determined character contour, character contour template is generated.
7. according to the method described in claim 6, wherein, the basis should include the image information of the image of personage, determining should The step of character contour in image includes:
The image comprising personage is divided into multiple piecemeals;
According to each corresponding image information of piecemeal at least one piecemeal of the multiple piecemeal, each piecemeal is determined Piecemeal attribute, wherein the piecemeal attribute is used to indicate piecemeal and belongs to personage region or inhuman object area;
According to the piecemeal attribute of at least one piecemeal, the character contour in the image comprising personage is determined.
8. according to the method described in claim 7, wherein, according to the piecemeal attribute of at least one piecemeal, determining the figure As in character contour the step of include:
According to the piecemeal attribute of at least one piecemeal, the piecemeal near character contour is determined;
For point each piecemeal in the block near the character contour, which is divided into multiple sub-piecemeals, and according to institute The corresponding image information of each sub-piecemeal in multiple sub-piecemeals is stated, determines the sub-piecemeal attribute of each sub-piecemeal, wherein the son Piecemeal attribute is used to indicate sub-piecemeal and belongs to personage region or inhuman object area;
According to the sub-piecemeal attribute for the sub-piecemeal that the piecemeal near the character contour includes, personage's wheel in described image is determined It is wide.
9. according to the method described in claim 1, wherein, this method is further comprising the steps of:
The manned object contour mould above and below network.
10. a kind of device for being blurred to image, wherein the device includes following device:
The shape of the character contour in character contour template for being selected according to user and the character contour are in the personage Position in contour mould determines the device of the character contour in the image that user specifies;
The character contour in image for being specified according to the user determines personage region, background area in described image And the device of the transitional region between personage region and background area;
For carrying out transition type virtualization by being blurred to the background area, and to the transitional region, to be blurred The device of image afterwards, wherein the transition type virtualization indicates the part in the transitional region closer to the personage region Virtualization degree it is more shallow, the virtualization degree closer to the part of the background area is deeper;
Wherein, be used for according to the character contour, determine personage region, background area and personage region in described image and The device of transitional region between background area includes:
For according to the character contour, determining the device in the personage region;
For the image information according to the personage region and/or inhuman object area, the width of the transitional region is determined, and will Character contour extends to the outside region that the width is formed by between profile and the character contour as transitional region, and will figure The device of the personage region as described in and the region other than the transitional region as background area, wherein the non-personage area Domain includes the transitional region and the background area.
11. device according to claim 10, wherein the image information packet of the personage region and/or inhuman object area It includes at least one of following:
The size in the personage region;
The size of the inhuman object area;
The colouring information of the colouring information in the personage region and/or the inhuman object area.
12. the device according to claim 10 or 11, wherein carry out the operation packet of transition type virtualization to the transitional region It includes:
The transitional region is blurred, the transitional region after being blurred;
Transitional region after virtualization is mixed with the transitional region not blurred, obtains the transitional region after transition type virtualization;
Wherein, closer to the personage region, proportion of the transitional region not blurred in the mixing is higher;Closer to The background area, proportion of the transitional region in the mixing after the virtualization are higher.
13. the device according to claim 10 or 11, wherein for by being blurred to the background area, and it is right The transitional region carries out transition type virtualization, and the device come the image after being blurred includes:
Device for the virtualization extent index for obtaining user's determination;
Transition is carried out for according to the virtualization extent index, being blurred to the background area, and to the transitional region Formula blurs, come the device of the image after being blurred.
14. the device according to claim 10 or 11, wherein the image that the user specifies includes on shooting display interface The image of presentation, the character contour template for being selected according to user, determines the dress of the character contour in the image that user specifies Set including:
The device of corresponding character contour is presented in character contour template for being selected according to user on shooting display interface;
For obtaining image of the user based on the character contour shooting presented, and the bat is determined according to the character contour template The device of character contour in the image taken the photograph.
15. the device according to claim 10 or 11, wherein the device further includes following device:
Device for the image information for obtaining an image comprising personage;
For the image information according to the image comprising personage, the device of the character contour in the image is determined;
For according to determined character contour, generating the device of character contour template.
16. device according to claim 15, wherein the image information of the image of personage should be included for the basis, Determine that the device of the character contour in the image includes:
Device for the image comprising personage to be divided into multiple piecemeals;
For each corresponding image information of piecemeal at least one piecemeal according to the multiple piecemeal, described each point is determined The device of the piecemeal attribute of block, wherein the piecemeal attribute is used to indicate piecemeal and belongs to personage region or inhuman object area;
For the piecemeal attribute according at least one piecemeal, the dress of the character contour in the image comprising personage is determined It sets.
17. device according to claim 16, wherein for the piecemeal attribute according at least one piecemeal, determine The device of character contour in described image includes:
For the piecemeal attribute according at least one piecemeal, the device of the piecemeal near character contour is determined;
For for point each piecemeal in the block near the character contour, which to be divided into multiple sub-piecemeals, and root According to each corresponding image information of sub-piecemeal in the multiple sub-piecemeal, the device of the sub-piecemeal attribute of each sub-piecemeal is determined, Wherein, the sub-piecemeal attribute is used to indicate sub-piecemeal and belongs to personage region or inhuman object area;
The sub-piecemeal attribute of sub-piecemeal for including according to the piecemeal near the character contour, determines the people in described image The device of object profile.
18. device according to claim 10, wherein the device further includes following device:
Device for the manned object contour mould above and below network.
CN201510106567.1A 2015-03-11 2015-03-11 A kind of method and apparatus for being blurred to image Active CN104751405B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510106567.1A CN104751405B (en) 2015-03-11 2015-03-11 A kind of method and apparatus for being blurred to image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510106567.1A CN104751405B (en) 2015-03-11 2015-03-11 A kind of method and apparatus for being blurred to image

Publications (2)

Publication Number Publication Date
CN104751405A CN104751405A (en) 2015-07-01
CN104751405B true CN104751405B (en) 2018-11-13

Family

ID=53591028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510106567.1A Active CN104751405B (en) 2015-03-11 2015-03-11 A kind of method and apparatus for being blurred to image

Country Status (1)

Country Link
CN (1) CN104751405B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105389801B (en) * 2015-10-20 2018-09-21 厦门美图之家科技有限公司 Character contour setting method, character image weakening method, system and camera terminal
CN105516586A (en) * 2015-12-01 2016-04-20 小米科技有限责任公司 Picture shooting method, device and system
CN105979165B (en) * 2016-06-02 2019-02-05 Oppo广东移动通信有限公司 Blur photograph generation method, device and mobile terminal
CN107395965B (en) * 2017-07-14 2019-11-29 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN109146767A (en) * 2017-09-04 2019-01-04 成都通甲优博科技有限责任公司 Image weakening method and device based on depth map
CN107566723B (en) * 2017-09-13 2019-11-19 维沃移动通信有限公司 A kind of image pickup method, mobile terminal and computer readable storage medium
CN107682629B (en) * 2017-09-29 2020-08-11 惠州Tcl移动通信有限公司 Correction method of photographing interface, storage medium and mobile terminal
CN107864336B (en) * 2017-11-24 2019-07-26 维沃移动通信有限公司 A kind of image processing method, mobile terminal
CN107945105B (en) * 2017-11-30 2021-05-25 Oppo广东移动通信有限公司 Background blurring processing method, device and equipment
CN110009555B (en) * 2018-01-05 2020-08-14 Oppo广东移动通信有限公司 Image blurring method and device, storage medium and electronic equipment
CN108495030A (en) * 2018-03-16 2018-09-04 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN110490029B (en) * 2018-05-15 2022-04-15 瑞昱半导体股份有限公司 Image processing method capable of performing differentiation processing on face data
WO2021102704A1 (en) * 2019-11-26 2021-06-03 深圳市大疆创新科技有限公司 Image processing method and apparatus
CN112313700A (en) * 2019-11-26 2021-02-02 深圳市大疆创新科技有限公司 Image processing method and device
CN113129241B (en) * 2019-12-31 2023-02-07 RealMe重庆移动通信有限公司 Image processing method and device, computer readable medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101276409A (en) * 2007-03-27 2008-10-01 三洋电机株式会社 Image processing apparatus
CN101339612A (en) * 2008-08-19 2009-01-07 陈建峰 Face contour checking and classification method
CN101350889A (en) * 2007-07-18 2009-01-21 株式会社理光 Image pickup device and control method thereof
CN103297697A (en) * 2013-05-30 2013-09-11 北京小米科技有限责任公司 Method and device for displaying template pictures during photographing
CN103778436A (en) * 2014-01-20 2014-05-07 电子科技大学 Pedestrian gesture inspecting method based on image processing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
IES20060564A2 (en) * 2006-05-03 2006-11-01 Fotonation Vision Ltd Improved foreground / background separation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101276409A (en) * 2007-03-27 2008-10-01 三洋电机株式会社 Image processing apparatus
CN101350889A (en) * 2007-07-18 2009-01-21 株式会社理光 Image pickup device and control method thereof
CN101339612A (en) * 2008-08-19 2009-01-07 陈建峰 Face contour checking and classification method
CN103297697A (en) * 2013-05-30 2013-09-11 北京小米科技有限责任公司 Method and device for displaying template pictures during photographing
CN103778436A (en) * 2014-01-20 2014-05-07 电子科技大学 Pedestrian gesture inspecting method based on image processing

Also Published As

Publication number Publication date
CN104751405A (en) 2015-07-01

Similar Documents

Publication Publication Date Title
CN104751405B (en) A kind of method and apparatus for being blurred to image
CN104751407B (en) A kind of method and apparatus for being blurred to image
CN104751406B (en) A kind of method and apparatus for being blurred to image
CN104572804B (en) A kind of method and its system of video object retrieval
CN109325988A (en) A kind of facial expression synthetic method, device and electronic equipment
CN101098241A (en) Method and system for implementing virtual image
CN110427932A (en) The method and device of multiple document fields in a kind of identification image
US9892542B2 (en) Creating bump and normal maps from images with multi-scale control
CN103971361B (en) Image processing device and method
CN112991377A (en) Keying algorithm based on opencv and shader fusion technology
CN108416722A (en) A kind of method for displaying image, storage medium and terminal device
CN108537868A (en) Information processing equipment and information processing method
CN114845158B (en) Video cover generation method, video release method and related equipment
CN113144613B (en) Model-based method for generating volume cloud
CN105872516A (en) Method and device for obtaining parallax parameters of three-dimensional film source
US10186073B2 (en) Image processing device, image processing method, and data structure of image file
Ji et al. An automatic 2D to 3D conversion algorithm using multi-depth cues
CN102955947B (en) A kind of device and method thereof for being used to determine image definition
CN104751454B (en) A kind of method and apparatus for being used to determine the character contour in image
CN112884074B (en) Image design method, equipment, storage medium and device based on decision tree
Kovács et al. Painterly rendering controlled by multiscale image features
US11468658B2 (en) Systems and methods for generating typographical images or videos
CN113792671A (en) Method and device for detecting face synthetic image, electronic equipment and medium
Hermosilla et al. Uncertainty Visualization of Brain Fibers.
Várkonyi-Kóczy New advances in digital image processing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant