CN108399599A - Image processing method, device and electronic equipment - Google Patents
Image processing method, device and electronic equipment Download PDFInfo
- Publication number
- CN108399599A CN108399599A CN201810229288.8A CN201810229288A CN108399599A CN 108399599 A CN108399599 A CN 108399599A CN 201810229288 A CN201810229288 A CN 201810229288A CN 108399599 A CN108399599 A CN 108399599A
- Authority
- CN
- China
- Prior art keywords
- target
- pixel
- oval
- image
- circle
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 20
- 238000000034 method Methods 0.000 claims abstract description 108
- 230000008569 process Effects 0.000 claims abstract description 79
- 238000001514 detection method Methods 0.000 claims abstract description 20
- 238000012545 processing Methods 0.000 claims description 133
- 230000007613 environmental effect Effects 0.000 claims description 74
- 238000004891 communication Methods 0.000 claims description 17
- 238000013507 mapping Methods 0.000 description 34
- 230000001815 facial effect Effects 0.000 description 26
- 230000000694 effects Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 238000007493 shaping process Methods 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 7
- 230000006835 compression Effects 0.000 description 6
- 238000007906 compression Methods 0.000 description 6
- 210000004709 eyebrow Anatomy 0.000 description 5
- 238000013519 translation Methods 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 230000007704 transition Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 210000004209 hair Anatomy 0.000 description 2
- 230000003321 amplification Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 230000000149 penetrating effect Effects 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/04—Context-preserving transformations, e.g. by using an importance map
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a kind of image processing method, device and electronic equipments, wherein method includes:Multiple key points corresponding to process object in detection image;Pending area corresponding with process object in image is determined according to multiple key points;For each pixel in image, judge whether the pixel belongs to pending area;If judging, the pixel belongs to pending area, is handled the pixel according to preset object handles rule.It follows that the solution of the present invention determines corresponding pending area according to the process object in image so that pending area can be more bonded with the profile of process object or range;Secondly, which is handled only for the pixel in pending area without handling all pixels point in image, can reduce operand, promote the speed of image procossing, ensure the real-time of image procossing.
Description
Technical field
The present invention relates to technical field of image processing, and in particular to a kind of image processing method, device and electronic equipment.
Background technology
With the development of computer image processing technology, image beautification become it is increasingly easier with it is universal.Such as to face
Image carries out micro-shaping special effect processing, including thin face, amplifies eyes, draw high the bridge of the nose, reduce the wing of nose etc. technological means, will be above-mentioned
Technology is applied in the scenes such as image post-processing, net cast, recorded video, can promote interesting and image U.S.
Sense, therefore, the micro-shaping special effect processing technology in image beautification are even more to have obtained people widely concern and favor.
But inventor is in the implementation of the present invention, it is found that it is as follows aforesaid way in the prior art at least exists
Problem:Micro-shaping special effect processing is often handled all pixels point in image, without considering actual deformed region,
Cause to increase many additional operands, reduce the real-time of micro-shaping special effect processing, such as the processing of above-mentioned amplification eyes,
Actually the pixel in ocular in facial image need to only be handled, other pixels are then not required in facial image
It is handled.In conclusion often being counted by way of traversing pixel all in image and carrying out micro-shaping special effect processing
Calculation amount is larger, in the prior art still without a kind of technical solution that can well solve the above problem.
Invention content
In view of the above problems, it is proposed that the present invention overcoming the above problem in order to provide one kind or solves at least partly
State the image processing method, device and electronic equipment of problem.
According to an aspect of the invention, there is provided a kind of image processing method, including:Process object in detection image
Corresponding multiple key points;It is determined according to the multiple key point and corresponding with the process object in described image waits locating
Manage region;For each pixel in described image, judge whether the pixel belongs to the pending area;If so, pressing
The pixel is handled according to preset object handles rule.
Optionally, the pending area is oval pending area, and the oval pending area pass through it is ellipse
The round heart, oval horizontal axis and the oval longitudinal axis determine.
Optionally, each pixel in described image, judges whether the pixel belongs to described pending
The step of region, specifically includes:
For each pixel in described image, judge whether the distance between the pixel and the oval center of circle are big
In the length of the oval horizontal axis;
If it is not, determining that the pixel belongs to the pending area.
Optionally, the pending area further comprises:Target treatment and environmental treatment region;Then described
Determine that include in described image has with the step of process object corresponding pending area according to the multiple key point
Body includes:
Target corresponding with the process object processing for including in described image is determined according to the multiple key point
Region;
It is determined positioned at the environmental treatment region of target treatment periphery according to the target treatment;
Also, the object handles rule further comprises:Target processing rule and environmental treatment rule;And it described presses
The step of being handled the pixel according to preset object handles rule specifically includes:
Judge whether the pixel belongs to the target treatment;If so, handling rule to the picture according to the target
Vegetarian refreshments is handled;If it is not, being handled the pixel according to the environmental treatment rule.
Optionally, the target treatment is elliptical object processing region, and the environmental treatment region is positioned at institute
State the oval ring-type environmental treatment region of elliptical object processing region periphery;
It is described that the target corresponding with the process object for including in described image is determined according to the multiple key point
The step of processing region, specifically includes:
The target center of circle is determined according to the multiple key point and by the target horizontal axis and/or target in the target center of circle
The longitudinal axis determines the ellipse according to the target center of circle and by the target horizontal axis and/or the target longitudinal axis in the target center of circle
Shape target treatment;
It is described to be determined positioned at the environmental treatment region of target treatment periphery according to the target treatment
Step specifically includes:
The target center of circle is determined as the oval center of circle, institute is determined according to the target horizontal axis and/or the target longitudinal axis
Oval horizontal axis and/or the oval longitudinal axis are stated, determines that the ellipse waits for according to the oval center of circle, oval horizontal axis and the oval longitudinal axis
Processing region;It is determined according to the oval pending area and the elliptical object processing region and is located at the ellipse
The oval ring-type environmental treatment region of target treatment periphery.
Optionally, the elliptical object processing region is circular target processing region, and at the oval ring-type environment
It is circular environmental treatment region to manage region;Wherein, the length of the target horizontal axis is identical as the length of the target longitudinal axis, and
The length of the ellipse horizontal axis is identical as the oval length of the longitudinal axis.
Optionally, described to judge that the step of whether pixel belongs to the target treatment specifically includes:
Judge whether the distance between the pixel and the target center of circle are more than the length of the target horizontal axis;If it is not,
Determine that the pixel belongs to the target treatment.
Optionally, the length of the oval horizontal axis is the first preset multiple of the length of the target horizontal axis and/or described
The length of the oval longitudinal axis is the second preset multiple of the length of the target longitudinal axis;Wherein, first preset multiple and/or
Two preset multiples are not less than 1.
Optionally, the method further includes:
It predefines when the distance of pixel to the target center of circle is not more than the length of target horizontal axis, the deformation system of pixel
Number at a distance from the pixel to the target center of circle between the first mapping relations, and target processing is regular first is reflected according to this
Penetrate relationship determination;
It predefines when the distance of pixel to the target center of circle is more than the length of target horizontal axis, the deformation coefficient of pixel
The second mapping relations between at a distance from the pixel to the target center of circle, and the environmental treatment rule is according to second mapping
Relationship determines.
Optionally, the object handles rule includes:Translate type processing rule, rotation type processing rule, with
And the processing rule of compression type.
Optionally, the process object includes:Facial area, face contour and/or face position;Wherein, the face
Position includes at least one of the following:Eyes, nose, eyebrow, face and ear.
Optionally, when the process object is facial area, multiple passes corresponding to process object in detection image
The step of key point, further comprises:Detect face center key point, the chin center key point in the facial area;
Then the target center of circle is determined according to face center key point, and the target longitudinal axis is according in the face
Heart key point is determining to the distance between chin center key point.
Optionally, the method is realized by graphics processor.
According to another aspect of the present invention, a kind of image processing apparatus is provided, including:Critical point detection module, is suitable for
Multiple key points corresponding to process object in detection image;Pending area determining module is suitable for according to the multiple pass
Key point determines pending area corresponding with the process object in described image;Judgment module is suitable for being directed to described image
In each pixel, judge whether the pixel belongs to the pending area;Processing module, if suitable for judging the pixel
Point belongs to the pending area, is handled the pixel according to preset object handles rule.
Optionally, the pending area is oval pending area, and the oval pending area pass through it is ellipse
The round heart, oval horizontal axis and the oval longitudinal axis determine.
Optionally, the judgment module is further adapted for:
For each pixel in described image, judge whether the distance between the pixel and the oval center of circle are big
In the length of the oval horizontal axis;
If it is not, determining that the pixel belongs to the pending area.
Optionally, the pending area further comprises:Target treatment and environmental treatment region;It is then described to wait for
Processing region determining module is further adapted for:
Target corresponding with the process object processing for including in described image is determined according to the multiple key point
Region;
It is determined positioned at the environmental treatment region of target treatment periphery according to the target treatment;
Also, the object handles rule further comprises:Target processing rule and environmental treatment rule;And processing mould
Block is further adapted for:
Judge whether the pixel belongs to the target treatment;If so, handling rule to the picture according to the target
Vegetarian refreshments is handled;If it is not, being handled the pixel according to the environmental treatment rule.
Optionally, the target treatment is elliptical object processing region, and the environmental treatment region is positioned at institute
State the oval ring-type environmental treatment region of elliptical object processing region periphery;
The pending area determining module is further adapted for:
The target center of circle is determined according to the multiple key point and by the target horizontal axis and/or target in the target center of circle
The longitudinal axis determines the ellipse according to the target center of circle and by the target horizontal axis and/or the target longitudinal axis in the target center of circle
Shape target treatment;
The pending area determining module is further adapted for:
The target center of circle is determined as the oval center of circle, institute is determined according to the target horizontal axis and/or the target longitudinal axis
Oval horizontal axis and/or the oval longitudinal axis are stated, determines that the ellipse waits for according to the oval center of circle, oval horizontal axis and the oval longitudinal axis
Processing region;It is determined according to the oval pending area and the elliptical object processing region and is located at the ellipse
The oval ring-type environmental treatment region of target treatment periphery.
Optionally, the elliptical object processing region is circular target processing region, and at the oval ring-type environment
It is circular environmental treatment region to manage region;Wherein, the length of the target horizontal axis is identical as the length of the target longitudinal axis, and
The length of the ellipse horizontal axis is identical as the oval length of the longitudinal axis.
Optionally, the judgment module is further adapted for:
Judge whether the distance between the pixel and the target center of circle are more than the length of the target horizontal axis;If it is not,
Determine that the pixel belongs to the target treatment.
Optionally, the length of the oval horizontal axis is the first preset multiple of the length of the target horizontal axis and/or described
The length of the oval longitudinal axis is the second preset multiple of the length of the target longitudinal axis;Wherein, first preset multiple and/or
Two preset multiples are not less than 1.
Optionally, described device further comprises:
Mapping relations determining module is suitable for predefining the distance when pixel to the target center of circle no more than target horizontal axis
When length, the deformation coefficient of pixel at a distance from the pixel to the target center of circle between the first mapping relations, and the mesh
Mark processing rule is determined according to first mapping relations;
The mapping relations determining module is further adapted for:It predefines when the distance of pixel to the target center of circle is more than mesh
Mark horizontal axis length when, the deformation coefficient of pixel at a distance from the pixel to the target center of circle between the second mapping relations,
And the environmental treatment rule is determined according to second mapping relations.
Optionally, the object handles rule includes:Translate type processing rule, rotation type processing rule, with
And the processing rule of compression type.
Optionally, the process object includes:Facial area, face contour and/or face position;Wherein, the face
Position includes at least one of the following:Eyes, nose, eyebrow, face and ear.
Optionally, the critical point detection module is further adapted for:
When the process object is facial area, face center key point in the facial area, lower Palestine and China are detected
Heart key point;
Then the target center of circle is determined according to face center key point, and the target longitudinal axis is according in the face
Heart key point is determining to the distance between chin center key point.
According to another aspect of the invention, a kind of electronic equipment is provided, including:Processor, memory, communication interface and
Communication bus, the processor, the memory and the communication interface complete mutual communication by the communication bus;
For the memory for storing an at least executable instruction, it is above-mentioned that the executable instruction makes the processor execute
The corresponding operation of image processing method.
In accordance with a further aspect of the present invention, provide a kind of computer storage media, be stored in the storage medium to
A few executable instruction, the executable instruction make processor execute such as the corresponding operation of above-mentioned image processing method.
In image processing method provided by the invention, device and electronic equipment, the process object first in detection image
Corresponding multiple key points;Pending area corresponding with process object in image is determined according to multiple key points;For
Each pixel in image, judges whether the pixel belongs to pending area;If judging, the pixel belongs to pending
Region is handled the pixel according to preset object handles rule.It can be seen which is according to the processing in image
Object determines pending area so that pending area can be more bonded with the profile of process object or range;Secondly, should
Mode is handled only for the pixel in pending area, can be subtracted without handling all pixels point in image
Small operand promotes the speed of image procossing, ensures the real-time of image procossing.
Above description is only the general introduction of technical solution of the present invention, in order to better understand the technical means of the present invention,
And can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can
It is clearer and more comprehensible, below the special specific implementation mode for lifting the present invention.
Description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantages and benefit are common for this field
Technical staff will become clear.Attached drawing only for the purpose of illustrating preferred embodiments, and is not considered as to the present invention
Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows the flow diagram of image processing method according to an embodiment of the invention;
Fig. 2 shows the flow diagrams of image processing method in accordance with another embodiment of the present invention;
Fig. 3 shows the structural schematic diagram of the image processing apparatus according to another embodiment of the invention;
Fig. 4 shows the structural schematic diagram of electronic equipment according to the ... of the embodiment of the present invention;
Fig. 5 shows the schematic diagram of a form of look-up table.
Specific implementation mode
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Completely it is communicated to those skilled in the art.
Fig. 1 shows the flow diagram of image processing method according to an embodiment of the invention.As shown in Figure 1, should
Method includes the following steps:
Step S110, multiple key points corresponding to process object in detection image.
Wherein, image can be video camera shooting photo, can also be shooting video flowing in picture frame, processing pair
As that can be facial area in image, face etc., this is not limited by the present invention.For the process object in image, inspection
The multiple key points for surveying process object in practical application, can preset the process object in image, i.e., only needle in processing procedure
Preset multiple process objects are handled;Or user also can the voluntarily processing pair in selected digital image in processing procedure
As that can be directed to the process object that user selectes in real time that is, in processing procedure and be adjusted, this is not limited by the present invention.
For example, in the application scenarios handled facial image, process object can be face or face position,
Key point can be characteristic point corresponding with facial face and/or face contour, can specifically refer to institute on face contour position
Corresponding characteristic point in characteristic point and the other positions of face corresponding in corresponding characteristic point, facial face position.It needs
It is noted that the present invention is not construed as limiting the mode for detecting key point.
Step S120 determines pending area corresponding with process object in image according to multiple key points.
According to the key point of the process object detected, pending area corresponding with process object in image is determined,
Region shape, region contour and regional extent of pending area etc. can carry out true according to each key point of process object
It is fixed.Such as, however, it is determined that it deals with objects as eyes, the then multiple key points determination for the eyes that basis detects and eyes
Corresponding pending area.
Step S130 judges whether the pixel belongs to pending area for each pixel in image.
It is determined that pending area corresponding with process object, the pixel in pending area are according to step S120
It is the pixel handled, in concrete application, coordinate system can be established in the picture, calculates each pixel in image and exist
Coordinate value in the coordinate system judges whether the pixel belongs to pending area according to the coordinate value of pixel, or according to
The distance between the center of pixel and pending area judges whether the pixel belongs to pending area.
Step S140, if judging, the pixel belongs to pending area, according to preset object handles rule to the picture
Vegetarian refreshments is handled.
In practical application, micro-shaping special effect processing is carried out to image and often only needs to handle the partial pixel point in image,
Without traversing pixel all in image, the pixel handled is determined with specific reference to obtained pending area is divided
Point, therefore, if judging in this step, the pixel belongs to pending area, according to preset object handles rule to the picture
Vegetarian refreshments is handled, and object handles rule can be the processing rule of translation type, i.e., according to the coordinate value of pixel to pixel
Point carries out translation processing or the processing of rotation type rule, i.e., is rotated to the pixel according to the coordinate value of pixel
Processing.
The image processing method provided according to the present embodiment, multiple keys corresponding to process object in detection image
Point;Pending area corresponding with process object in image is determined according to multiple key points;For each pixel in image
Point, judges whether the pixel belongs to pending area;If judging, the pixel belongs to pending area, according to preset right
As processing rule handles the pixel.It follows which determines pending district according to the process object in image
Domain so that pending area can be more bonded with the profile of process object or range;Secondly, which is not necessarily to in image
All pixels point is handled, and is handled only for the pixel in pending area, and operand can be reduced, and promotes image
The speed of processing ensures the real-time of image procossing.
Fig. 2 shows the streams of image processing method in accordance with another embodiment of the present invention to illustrate journey figure, wherein this implementation
The method of example can realize that, it is, of course, also possible to realize by other means, this is not limited by the present invention by graphics processor.
As shown in Fig. 2, this approach includes the following steps:
Step S210, multiple key points corresponding to process object in detection image.
Wherein, image can be video camera shooting photo, can also be shooting video flowing in picture frame, the present invention
This is not construed as limiting.For the process object in image, multiple key points of detection process object, in practical application, system can
Process object in preselect image, i.e., only for it is fixed some handled, also can be by user according to reality
Border needs the process object in voluntarily selected digital image, and this is not limited by the present invention.
In the application scenarios handled facial image, process object includes:Facial area, face contour and/or
Face position;Wherein, face position includes at least one of the following:Eyes, nose, eyebrow, face and ear, then locate
Multiple key points corresponding to reason object include facial area, the corresponding characteristic point of face contour and/or face position, specifically
Corresponding characteristic point and the other portions of face in characteristic point, facial face position corresponding to can referring on face contour position
Corresponding characteristic point, the present invention are not restricted the number of key point, distributing position and detection mode on position, every energy
The mode of enough detection key points should be all included within the scope of the present invention.
Step S220 determines pending area corresponding with process object in image, wherein wait for according to multiple key points
Processing region is oval pending area, and oval pending area passes through the oval center of circle, oval horizontal axis and the oval longitudinal axis
It determines.
In existing micro-shaping special effect processing technology, generally require to handle all pixels point in image, for figure
Each pixel as in is handled, and micro-shaping special effect processing technology is at subregion in image
Reason, for example, carrying out micro-shaping special effect processing for an image comprising face, it is thus only necessary to the pixel in human face region
It is handled, the pixel outside human face region need not then carry out handling or only doing the adjustment of adaptability, therefore, in order to reduce
Operand, improves the speed of graphics process, and the method for the present embodiment determines pending area according to the key point of process object.
In a kind of application scenarios handled facial image, pending area is oval pending area, then
The oval center of circle, oval horizontal axis and the oval longitudinal axis are determined according to the key point of process object, further according to the oval center of circle, ellipse
Horizontal axis and the oval longitudinal axis determine the ellipse processing region.Since the profile of face and face position is similar to ellipse
Shape, setting pending area to oval processing region can make pending area more be bonded face or face position
Profile, and include the pixel that need not be handled as few as possible in pending area, to reduce operand, promoted
The speed of processing.Wherein, oval horizontal axis is orthogonal with the oval longitudinal axis, but the present invention is vertical to oval horizontal axis and ellipse
The specific orientation of axis is not construed as limiting, and those skilled in the art can be adjusted according to actual needs.It should be noted that this implementation
Oval pending area in example and the unequal ellipse of length for not merely referring to the length of oval horizontal axis and the ellipse longitudinal axis
Pending area, since circle is a kind of special ellipse, oval pending area can also refer to oval horizontal axis
The round pending area of length and the equal length of the oval longitudinal axis is specific to need determines according to actual conditions.
Optionally, pending area further comprises:Target treatment and environmental treatment region;Then according to multiple passes
Key point determines that include in image specifically includes with the step of dealing with objects corresponding pending area:According to multiple key points
Determine the target treatment corresponding with process object for including in image;It is determined and is located at target according to target treatment
Manage the environmental treatment region of area periphery.
In practical application, the pixel in some region in image is handled and to the pixel except the region
In the case that point keeps reset condition, the image that may result in after treatment seems unnatural, and variation trace is apparent, therefore
It is also required to do corresponding processing to the partial pixel point except the region.
Therefore, pending area is further divided into target treatment and environmental treatment area by the method for the present embodiment
Domain, since target treatment is determined according to multiple key points of process object, target treatment is to fit well on
The region of process object will be determined as environmental treatment region positioned at the subregion of target treatment periphery, then is directed to target
The pixel in pixel and environmental treatment region in processing region can take different processing rules, to weaken variation trace
Mark.
Further, target treatment is elliptical object processing region, and environmental treatment region is positioned at oval mesh
Mark the oval ring-type environmental treatment region of processing region periphery.It follows that pending area includes elliptical object treatment region
Domain and oval ring-type environmental treatment region.
Then determined according to multiple key points include in image with deal with objects corresponding target treatment the step of
It specifically includes:The target center of circle is determined according to multiple key points and passes through the target horizontal axis and/or the target longitudinal axis in the target center of circle, root
Elliptical object processing region is determined according to the target center of circle and by the target horizontal axis and/or the target longitudinal axis in the target center of circle.
It is determined according to target treatment and is specifically included positioned at the step of environmental treatment region of target treatment periphery:
The target center of circle is determined as the oval center of circle, oval horizontal axis and/or the oval longitudinal axis are determined according to target horizontal axis and/or the target longitudinal axis,
Oval pending area is determined according to the oval center of circle, oval horizontal axis and the oval longitudinal axis;According to oval pending area with
And elliptical object processing region is determined positioned at the oval ring-type environmental treatment region of elliptical object processing region periphery.Its
In, the length of oval horizontal axis is the first preset multiple of the length of target horizontal axis, and/or the length of the oval longitudinal axis is the target longitudinal axis
Length the second preset multiple;Wherein, the first preset multiple and/or the second preset multiple are not less than 1.
According to the corresponding multiple key points of process object, it is first determined the target center of circle, the target center of circle are target treatment region
Then the center in domain according to the position relationship and distance between the target center of circle and each key point, determines the position of target horizontal axis
Set the locality and length of direction and length and the target longitudinal axis.For example, when process object is eyes, it is determined that eyes
Center key point is the target center of circle, determines that the straight line of connection eye center key point to the canthus key point of the eyes either side is
The straight line of target horizontal axis, the upside or downside boundary key point that determine connection eye center key point and the eyes is vertical for target
Axis.Finally, elliptical object processing region is determined according to the center of circle, target horizontal axis and the target longitudinal axis.
Then, oval pending area, as shown in the above, ellipse are determined according to elliptical object processing region
Target treatment is concentration ellipse shape with oval pending area, can specifically make target horizontal axis mutually be overlapped with oval horizontal axis
Close and the target longitudinal axis coincide with the ellipse longitudinal axis, and set the length of oval horizontal axis to target horizontal axis length first
Preset multiple, and the oval longitudinal axis length be set as the target longitudinal axis length the second preset multiple, wherein first default times
Number may be the same or different with the second preset multiple, but at least one in the numerical value of the two cannot less than 1, that is,
It says, the regional extent of oval pending area is more than the regional extent of target treatment.Further wait locating according to ellipse
It manages region and elliptical object processing region determines at the elliptical annular environment of elliptical object processing region periphery
Manage region, that is to say, that elliptical annular environmental area is to be located at elliptical object processing region and oval pending area
Between region.
In concrete application, when process object is facial area, multiple passes corresponding to process object in detection image
The step of key point, further comprises:Detect face center key point, the chin center key point in facial area;The then target center of circle
It is determined according to face center key point, and target horizontal axis is according to the distance between face center key point to chin center key point
It determines.
When process object is facial area, it is determined that face center key point is the target center of circle, is determined in connection face
The straight line of heart key point and chin center key point is the target longitudinal axis, optionally it is determined that connection face center key point with it is any
The straight line of the temple key point of side is target horizontal axis.
In another embodiment, pending area can be also provided in round to pending area, and can be further
Pending area is divided into target treatment and environmental treatment region, specifically, above-mentioned elliptical object processing region is circle
Shape target treatment, and above-mentioned oval ring-type environmental treatment region is circular environmental treatment region;Wherein, target horizontal axis
Length is identical as the length of the target longitudinal axis, and the length of oval horizontal axis is identical as the oval length of the longitudinal axis.That is, in the present embodiment
Oval pending area and not merely refer to the length of oval horizontal axis and the unequal ellipse of length of oval horizontal axis waits locating
Region is managed, since circle is a kind of special ellipse, oval pending area can also be the length of oval horizontal axis
It is specific to need determines according to actual conditions with the round pending area of the equal length of the oval longitudinal axis.
Whether step S230 judges the distance between the pixel and the oval center of circle for each pixel in image
More than the length of oval horizontal axis, if it is not, thening follow the steps S240;If so, this method terminates.
Specifically, coordinate system can be established in the picture, and each pixel and ellipse in image are calculated according to the coordinate system
The coordinate value in the center of circle calculates the distance between the pixel and the oval center of circle according to coordinate value, alternatively, being original with the oval center of circle
Point establishes coordinate system according to oval horizontal axis and the oval longitudinal axis, the coordinate of each pixel in image is calculated under the coordinate system
Value further calculates the distance between pixel and the oval center of circle, whether judges the distance between the pixel and the oval center of circle
More than the length of oval horizontal axis.
Step S240 determines that the pixel belongs to pending area, according to preset object handles rule to the pixel
It is handled.
If judging the length of the distance between the pixel and the oval center of circle no more than oval horizontal axis, it is determined that the pixel
Point belongs to pending area;If judging, the distance between the pixel and the oval center of circle are more than the length of oval horizontal axis, table
The bright pixel is not belonging to pending area, and without handling the pixel, this method terminates.
Wherein, object handles rule includes:Translate the processing rule of type, the processing rule of rotation type and compression
The processing rule of type.The processing rule of translation type can be the coordinate value according to pixel, be carried out at translation to pixel
The rule of reason;The processing rule of rotation type can carry out the rule of rotation processing to pixel according to the coordinate value of pixel
Then;The processing rule of compression type can be the area to pending area according to the boundary of the coordinate of pixel and process object
Domain range carries out the rule of compression processing.The present invention is not construed as limiting object handles rule, and those skilled in the art can be according to reality
Border needs to be configured.
Described in the above, in order to weaken the trace of image variation, the method for the present embodiment is by pending district
Domain is further divided into target treatment and environmental treatment region, for the picture in target treatment and environmental treatment region
Vegetarian refreshments takes different processing rules to be handled respectively, therefore, after judging that pixel belongs to pending area, needs
Further determine which processing region the pixel particularly belongs to.It correspondingly, can for the pixel in different disposal region
Corresponding object handles rule is respectively set, then object handles rule further comprises:Target processing rule and environmental treatment
Rule;The step of then being handled the pixel according to preset object handles rule specifically includes:
Judge whether the pixel belongs to target treatment;The pixel is clicked through if so, handling rule according to target
Row processing;If it is not, being handled the pixel according to environmental treatment rule.
If that is, judging the length of the distance between the pixel and the oval center of circle no more than oval horizontal axis, i.e.,
The pixel belongs to pending area, then further judges whether the pixel belongs to target treatment, specifically judge the picture
Whether the distance between vegetarian refreshments and the target center of circle are not more than the length of target horizontal axis, if so, determining that the pixel belongs at target
Region is managed, then handling rule according to preset target handles the pixel;If not, it is determined that the pixel belongs to environment
Processing region is then handled the pixel according to preset environmental treatment rule.
Wherein, target processing rule and environmental treatment rule can determine in the following manner:
It predefines when the distance of pixel to the target center of circle is not more than the length of target horizontal axis, the deformation system of pixel
The first mapping relations between counting at a distance from the pixel to the target center of circle, and target processing rule is closed according to first mapping
System determines;It predefines when the distance of pixel to the target center of circle is more than the length of target horizontal axis, the deformation coefficient of pixel
The second mapping relations between at a distance from the pixel to the target center of circle, and environmental treatment rule is according to second mapping relations
It determines.
Wherein, the first mapping relations can be determined according to the first look-up table, and the horizontal axis of the first look-up table represents pixel
The distance between to the target center of circle, the longitudinal axis represents the deformation coefficient of pixel, and the mapping principle of the first mapping relations is as follows:
When the distance of pixel to the target center of circle be not more than target horizontal axis length when, at a distance from pixel is between the target center of circle by
It is small become larger during, the deformation coefficient of pixel is first maintained at a fixed value, is then gradually reduced from the fixed value, thus
It can ensure that there is smooth transition between untreated region and treated region.
Second mapping relations can be determined according to second look-up table, and the horizontal axis of second look-up table represents pixel to target
The distance between center of circle, the longitudinal axis represents the deformation coefficient of pixel, and the mapping principle of the second mapping relations is as follows:Work as pixel
When the distance in point to the target center of circle is not more than oval horizontal axis and is more than target horizontal axis, at a distance from pixel is between the target center of circle
During changing from small to big, the deformation coefficient of pixel is gradually reduced from a fixed value, can be ensured through the above way not
There is smooth transition between treated region and treated region.In addition, the method for the present embodiment passes through setting
The corresponding object handles rule in different disposal region, can weaken the change trace of image, promote the aesthetic feeling of image.For the ease of
Understanding, Fig. 5 shows the schematic diagram of a form of look-up table, as shown in figure 5, for the pixel in pending area,
During equivalent circumferential distance between pixel and the target center of circle changes from small to big, the rotation angle of pixel is first maintained at one
A fixed value, then zero is gradually decreased as by the fixed value, wherein R can specifically refer to oval pending area the oval longitudinal axis or
The length of oval horizontal axis.In addition, it will be appreciated to those of skill in the art that target, which is arranged, in the present invention handles rule and environment
The purpose of processing rule is:Target treatment and environmental treatment region are distinguished and treated, so as to be better achieved
Smooth transition, therefore, the present invention does not limit target processing rule and the particular content of environmental treatment rule, and (i.e. first reflects
Penetrating the concrete form of relationship and the second mapping relations can be adjusted flexibly).
In addition, inventor has found in the implementation of the present invention:The deformation coefficient of pixel in target treatment
There is the first mapping relations, and the deformation of the pixel in environmental treatment region between at a distance from the pixel to the target center of circle
Coefficient at a distance from the pixel to the target center of circle between have the second mapping relations.Also, the first mapping relations are different from the
Two mapping relations are based on this, pending area are further divided into target treatment and environmental treatment in the present embodiment
Region, and target processing rule and environmental treatment rule is respectively set, thus, it is possible to be directed to actual process object and place
The neighboring area of reason object executes different processing respectively, to further promote treatment effect.In addition, when the present invention passes through
When GPU is realized, treatment effeciency can be promoted using the parallel characteristics of GPU.
Specifically illustrate the method for the present invention, ability in the present embodiment by taking pending area is oval pending area as an example
Field technique personnel are not it is understood that the present invention limits the region shape of pending area, in practical application, specifically
It is determined according to the corresponding multiple key points of process object.The image processing method provided according to the present embodiment, detection image
In process object corresponding to multiple key points;It is determined according to multiple key points and corresponding with process object in image waits locating
Manage region, wherein pending area is oval pending area, and oval pending area passes through the oval center of circle, ellipse
Horizontal axis and the oval longitudinal axis determine;For each pixel in image, judge that the distance between the pixel and the oval center of circle are
The no length for being more than oval horizontal axis;If it is not, determine that the pixel belongs to pending area, it is right according to preset object handles rule
The pixel is handled.It follows which determines pending area according to the process object in image, and will be pending
Region is shaped to ellipse so that pending area can be more bonded with the profile of process object or range;Its
Secondary, which is handled, energy without handling all pixels point in image only for the pixel in pending area
Enough reduce operand, promote the speed of image procossing, ensures the real-time of image procossing;In addition, pending area is divided into mesh
Processing region and environmental treatment region are marked, different object handles rules is taken for the pixel in different disposal region, is had
Conducive to the variation trace of image is weakened, the aesthetic feeling of image is promoted.
Fig. 3 shows the structural schematic diagram of the image processing apparatus according to another embodiment of the invention, as shown in figure 3,
The device includes:
Critical point detection module 31 is adapted to detect for multiple key points corresponding to the process object in image;
Pending area determining module 32, suitable for determining corresponding with process object in image wait for according to multiple key points
Processing region;
Judgment module 33 is suitable for, for each pixel in image, judging whether the pixel belongs to pending area;
Processing module 34, if suitable for judging that the pixel belongs to pending area, according to preset object handles rule
The pixel is handled.
Optionally, pending area is oval pending area, and oval pending area passes through the oval center of circle, ellipse
Circle horizontal axis and the oval longitudinal axis determine.
Optionally, judgment module 33 is further adapted for:
For each pixel in image, it is oval horizontal to judge whether the distance between the pixel and the oval center of circle are more than
The length of axis;
If it is not, determining that the pixel belongs to pending area.
Optionally, pending area further comprises:Target treatment and environmental treatment region;Then pending area
Determining module 32 is further adapted for:
The target treatment corresponding with process object for including in image is determined according to multiple key points;
It is determined positioned at the environmental treatment region of target treatment periphery according to target treatment;
Also, object handles rule further comprises:Target processing rule and environmental treatment rule;And processing module 34
It is further adapted for:
Judge whether the pixel belongs to target treatment;The pixel is carried out if so, handling rule according to target
Processing;If it is not, being handled the pixel according to environmental treatment rule.
Optionally, target treatment is elliptical object processing region, and environmental treatment region is positioned at elliptical object
The oval ring-type environmental treatment region of processing region periphery;
Pending area determining module 32 is further adapted for:
The target center of circle is determined according to multiple key points and passes through the target horizontal axis and/or the target longitudinal axis in the target center of circle, root
Elliptical object processing region is determined according to the target center of circle and by the target horizontal axis and/or the target longitudinal axis in the target center of circle;
Pending area determining module 32 is further adapted for:
The target center of circle is determined as the oval center of circle, oval horizontal axis and/or ellipse is determined according to target horizontal axis and/or the target longitudinal axis
The circle longitudinal axis determines oval pending area according to the oval center of circle, oval horizontal axis and the oval longitudinal axis;It is pending according to ellipse
Region and elliptical object processing region are determined positioned at the oval ring-type environmental treatment area of elliptical object processing region periphery
Domain.
Optionally, elliptical object processing region is circular target processing region, and oval ring-type environmental treatment region is
Circular environmental treatment region;Wherein, the length of target horizontal axis is identical as the length of the target longitudinal axis, and the length of oval horizontal axis with
The length of the oval longitudinal axis is identical.
Optionally, judgment module 33 is further adapted for:
Judge whether the distance between the pixel and the target center of circle are more than the length of target horizontal axis;If it is not, determining the picture
Vegetarian refreshments belongs to target treatment.
Optionally, the length of oval horizontal axis is the first preset multiple of the length of target horizontal axis, and/or the length of the oval longitudinal axis
Degree is the second preset multiple of the length of the target longitudinal axis;Wherein, the first preset multiple and/or the second preset multiple are not less than 1.
Optionally, above-mentioned apparatus further comprises:
Mapping relations determining module 35 is suitable for predefining when the distance of pixel to the target center of circle is not more than target horizontal axis
Length when, the deformation coefficient of pixel at a distance from the pixel to the target center of circle between the first mapping relations, and target
Processing rule is determined according to first mapping relations;
Mapping relations determining module 35 is further adapted for:It predefines when the distance of pixel to the target center of circle is more than target
When the length of horizontal axis, the deformation coefficient of pixel at a distance from the pixel to the target center of circle between the second mapping relations, and
Environmental treatment rule is determined according to second mapping relations.
Optionally, object handles rule includes:Translate the processing rule of type, the processing rule of rotation type and pressure
The processing rule of contracting type.
Optionally, process object includes:Facial area, face contour and/or face position;Wherein, face position includes
At least one of the following:Eyes, nose, eyebrow, face and ear.
Optionally, critical point detection module 31 is further adapted for:
When process object is facial area, face center key point, the chin center key point in facial area are detected;
Then the target center of circle is determined according to face center key point, and target aspect axis is according to face center key point to chin
The distance between center key point determines.
The concrete structure and operation principle of above-mentioned modules can refer to the description of corresponding steps in embodiment of the method, herein
It repeats no more.
The another embodiment of the application provides a kind of nonvolatile computer storage media, and the computer storage media is deposited
An at least executable instruction is contained, which can perform the image processing method in above-mentioned any means embodiment
Method.
Fig. 4 shows the structural schematic diagram of a kind of electronic equipment according to the ... of the embodiment of the present invention, the specific embodiment of the invention
The specific implementation of electronic equipment is not limited.
As shown in figure 4, the electronic equipment may include:Processor (processor) 402, communication interface
(Communications Interface) 404, memory (memory) 406 and communication bus 408.
Wherein:
Processor 402, communication interface 404 and memory 406 complete mutual communication by communication bus 408.
Communication interface 404, for being communicated with the network element of miscellaneous equipment such as client or other servers etc..
Processor 402 can specifically execute the correlation in above-mentioned image processing method embodiment for executing program 410
Step.
Specifically, program 410 may include program code, which includes computer-managed instruction.
Processor 402 may be central processor CPU or specific integrated circuit ASIC (Application
Specific Integrated Circuit), or be arranged to implement the integrated electricity of one or more of the embodiment of the present invention
Road.The one or more processors that electronic equipment includes can be same type of processor, such as one or more CPU;Also may be used
To be different types of processor, such as one or more CPU and one or more ASIC.
Memory 406, for storing program 410.Memory 406 may include high-speed RAM memory, it is also possible to further include
Nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.
Program 410 specifically can be used for so that processor 402 executes following operation:Process object institute in detection image is right
The multiple key points answered;Pending area corresponding with process object in image is determined according to multiple key points;For image
In each pixel, judge whether the pixel belongs to pending area;If so, according to preset object handles rule to this
Pixel is handled.
In a kind of optional mode, pending area is oval pending area, and oval pending area is logical
The oval center of circle, oval horizontal axis and the oval longitudinal axis is crossed to determine.
Program 410 specifically can be also used for so that processor 402 executes following operation:For each pixel in image
Point, judges whether the distance between the pixel and the oval center of circle are more than the length of oval horizontal axis;If it is not, determining the pixel category
In pending area.
In a kind of optional mode, pending area further comprises:Target treatment and environmental treatment region,
Then program 410 specifically can be also used for so that processor 402 executes following operation:It is determined in image according to multiple key points and includes
With deal with objects corresponding pending area the step of specifically include:Determined according to multiple key points include in image with
Deal with objects corresponding target treatment;It is determined at the environment of target treatment periphery according to target treatment
Manage region;
Also, object handles rule further comprises:Target processing rule and environmental treatment are regular, then program 410 has
Body can be also used for so that processor 402 executes following operation:Judge whether the pixel belongs to target treatment;If so,
Rule is handled according to target to handle the pixel;If it is not, being handled the pixel according to environmental treatment rule.
In a kind of optional mode, target treatment is elliptical object processing region, and environmental treatment region is position
Oval ring-type environmental treatment region in elliptical object processing region periphery, then program 410 specifically can be also used for so that locating
Reason device 402 executes following operation:According to multiple key points determine the target center of circle and by the target center of circle target horizontal axis and/or
The target longitudinal axis is determined according to the target center of circle and by the target horizontal axis and/or the target longitudinal axis in the target center of circle at elliptical object
Manage region;
Program 410 specifically can be also used for so that processor 402 executes following operation:The target center of circle is determined as oval circle
The heart determines oval horizontal axis and/or the oval longitudinal axis according to target horizontal axis and/or the target longitudinal axis, according to the oval center of circle, oval horizontal axis with
And the oval longitudinal axis determines oval pending area;It is determined according to oval pending area and elliptical object processing region
Oval ring-type environmental treatment region positioned at elliptical object processing region periphery.
In a kind of optional mode, elliptical object processing region is circular target processing region, and oval ring-type ring
Border processing region is circular environmental treatment region;Wherein, the length of target horizontal axis is identical as the length of the target longitudinal axis, and oval
The length of horizontal axis is identical as the oval length of the longitudinal axis.
In a kind of optional mode, program 410 specifically can be also used for so that processor 402 executes following operation:Sentence
Whether disconnected the distance between the pixel and the target center of circle are more than the length of target horizontal axis;If it is not, determining that the pixel belongs to mesh
Mark processing region.
In a kind of optional mode, the length of oval horizontal axis is the first preset multiple of the length of target horizontal axis, and/or
The length of the oval longitudinal axis is the second preset multiple of the length of the target longitudinal axis;Wherein, the first preset multiple and/or second default times
Number is not less than 1.
In a kind of optional mode, program 410 specifically can be also used for so that processor 402 executes following operation:In advance
It first determines when the distance of pixel to the target center of circle is not more than the length of target horizontal axis, the deformation coefficient of pixel and the pixel
Point is to the first mapping relations between the distance in the target center of circle, and target processing rule is determined according to first mapping relations;
It predefines when the distance of pixel to the target center of circle is more than the length of target horizontal axis, the deformation coefficient of pixel
The second mapping relations between at a distance from the pixel to the target center of circle, and environmental treatment rule is according to second mapping relations
It determines.
In a kind of optional mode, object handles rule includes:Translate the processing of the processing rule, rotation type of type
The processing rule of rule and compression type.
In a kind of optional mode, process object includes:Facial area, face contour and/or face position;Wherein,
Face position includes at least one of the following:Eyes, nose, eyebrow, face and ear.
In a kind of optional mode, program 410 specifically can be also used for so that processor 402 executes following operation:When
When process object is facial area, face center key point, the chin center key point in facial area are detected;
Then the target center of circle is determined according to face center key point, and target aspect axis is according to face center key point to chin
The distance between center key point determines.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein.
Various general-purpose systems can also be used together with teaching based on this.As described above, it constructs required by this kind of system
Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that can utilize various
Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention
Example can be put into practice without these specific details.In some instances, well known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of each inventive aspect,
Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:It is i.e. required to protect
Shield the present invention claims the more features of feature than being expressly recited in each claim.More precisely, as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following specific implementation mode are expressly incorporated in the specific implementation mode, wherein each claim itself
All as a separate embodiment of the present invention.
Those skilled in the art, which are appreciated that, to carry out adaptively the module in the equipment in embodiment
Change and they are arranged in the one or more equipment different from the embodiment.It can be the module or list in embodiment
Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it may be used any
Combination is disclosed to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so to appoint
Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power
Profit requires, abstract and attached drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation
It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
One of meaning mode can use in any combination.
The all parts embodiment of the present invention can be with hardware realization, or to run on one or more processors
Software module realize, or realized with combination thereof.It will be understood by those of skill in the art that can use in practice
Microprocessor or digital signal processor (DSP) come realize in image processing apparatus according to the ... of the embodiment of the present invention some or
The some or all functions of person's whole component.The present invention is also implemented as one for executing method as described herein
Divide either whole equipment or program of device (for example, computer program and computer program product).Such this hair of realization
Bright program can may be stored on the computer-readable medium, or can be with the form of one or more signal.It is such
Signal can be downloaded from internet website and be obtained, and either provided on carrier signal or provided in any other forms.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference mark between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real
It is existing.In the unit claims listing several devices, several in these devices can be by the same hardware branch
To embody.The use of word first, second, and third does not indicate that any sequence.These words can be explained and be run after fame
Claim.
Claims (10)
1. a kind of image processing method, including:
Multiple key points corresponding to process object in detection image;
Pending area corresponding with the process object in described image is determined according to the multiple key point;
For each pixel in described image, judge whether the pixel belongs to the pending area;If so, according to pre-
If object handles rule the pixel is handled.
2. according to the method described in claim 1, wherein, the pending area is oval pending area, and described ellipse
Round pending area is determined by the oval center of circle, oval horizontal axis and the oval longitudinal axis.
3. according to the method described in claim 2, wherein, each pixel in described image judges the pixel
The step of whether point belongs to the pending area specifically includes:
For each pixel in described image, judge whether the distance between the pixel and the oval center of circle are more than institute
State the length of oval horizontal axis;
If it is not, determining that the pixel belongs to the pending area.
4. according to any methods of claim 2-3, wherein the pending area further comprises:Target treatment region
Domain and environmental treatment region;Then it is described determined according to the multiple key point it is including in described image with the process object
The step of corresponding pending area, specifically includes:
The target treatment corresponding with the process object for including in described image is determined according to the multiple key point;
It is determined positioned at the environmental treatment region of target treatment periphery according to the target treatment;
Also, the object handles rule further comprises:Target processing rule and environmental treatment rule;And it is described according to pre-
If the object handles rule the step of pixel is handled specifically include:
Judge whether the pixel belongs to the target treatment;If so, handling rule to the pixel according to the target
It is handled;If it is not, being handled the pixel according to the environmental treatment rule.
5. according to the method described in claim 4, wherein, the target treatment is elliptical object processing region, described
Environmental treatment region is positioned at the oval ring-type environmental treatment region of the elliptical object processing region periphery;
It is described that target corresponding with the process object processing for including in described image is determined according to the multiple key point
The step of region, specifically includes:
The target center of circle is determined according to the multiple key point and is indulged by the target horizontal axis and/or target in the target center of circle
Axis determines the ellipse according to the target center of circle and by the target horizontal axis and/or the target longitudinal axis in the target center of circle
Target treatment;
Described the step of being determined positioned at the environmental treatment region of target treatment periphery according to the target treatment
It specifically includes:
The target center of circle is determined as the oval center of circle, is determined according to the target horizontal axis and/or the target longitudinal axis described ellipse
Circle horizontal axis and/or the oval longitudinal axis determine that the ellipse is pending according to the oval center of circle, oval horizontal axis and the oval longitudinal axis
Region;It is determined according to the oval pending area and the elliptical object processing region and is located at the elliptical object
The oval ring-type environmental treatment region of processing region periphery.
6. according to the method described in claim 5, wherein, the elliptical object processing region is circular target processing region,
And oval ring-type environmental treatment region is circular environmental treatment region;Wherein, the length of the target horizontal axis with it is described
The length of the target longitudinal axis is identical, and the length of the oval horizontal axis is identical as the oval length of the longitudinal axis.
7. method according to claim 5 or 6, wherein described to judge whether the pixel belongs to the target treatment region
The step of domain, specifically includes:
Judge whether the distance between the pixel and the target center of circle are more than the length of the target horizontal axis;If it is not, determining
The pixel belongs to the target treatment.
8. a kind of image processing apparatus, including:
Critical point detection module is adapted to detect for multiple key points corresponding to the process object in image;
Pending area determining module, it is opposite with the process object in described image suitable for being determined according to the multiple key point
The pending area answered;
Judgment module is suitable for, for each pixel in described image, judging whether the pixel belongs to the pending district
Domain;
Processing module, if suitable for judging that the pixel belongs to the pending area, it is right according to preset object handles rule
The pixel is handled.
9. a kind of electronic equipment, including:Processor, memory, communication interface and communication bus, the processor, the storage
Device and the communication interface complete mutual communication by the communication bus;
The memory makes the processor execute as right is wanted for storing an at least executable instruction, the executable instruction
Ask the corresponding operation of the image processing method described in any one of 1-7.
10. a kind of computer storage media, an at least executable instruction, the executable instruction are stored in the storage medium
Processor is set to execute the corresponding operation of image processing method as described in any one of claim 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810229288.8A CN108399599B (en) | 2018-03-20 | 2018-03-20 | Image processing method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810229288.8A CN108399599B (en) | 2018-03-20 | 2018-03-20 | Image processing method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108399599A true CN108399599A (en) | 2018-08-14 |
CN108399599B CN108399599B (en) | 2021-11-26 |
Family
ID=63092649
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810229288.8A Active CN108399599B (en) | 2018-03-20 | 2018-03-20 | Image processing method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108399599B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109241921A (en) * | 2018-09-17 | 2019-01-18 | 北京字节跳动网络技术有限公司 | Method and apparatus for detecting face key point |
CN111507896A (en) * | 2020-04-27 | 2020-08-07 | 北京字节跳动网络技术有限公司 | Image liquefaction processing method, device, equipment and storage medium |
US10785456B1 (en) | 2019-09-25 | 2020-09-22 | Haier Us Appliance Solutions, Inc. | Methods for viewing and tracking stored items |
CN113781295A (en) * | 2021-09-14 | 2021-12-10 | 网易(杭州)网络有限公司 | Image processing method, device, equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104899905A (en) * | 2015-06-08 | 2015-09-09 | 深圳市诺比邻科技有限公司 | Face image processing method and apparatus |
US20150279073A1 (en) * | 2014-03-26 | 2015-10-01 | Sony Corporation | Image processing device, image processing method, and storage medium |
US20170076174A1 (en) * | 2014-05-06 | 2017-03-16 | Nant Holdings Ip, Llc | Image-based feature detection using edge vectors |
CN107395958A (en) * | 2017-06-30 | 2017-11-24 | 北京金山安全软件有限公司 | Image processing method and device, electronic equipment and storage medium |
CN107578380A (en) * | 2017-08-07 | 2018-01-12 | 北京金山安全软件有限公司 | Image processing method and device, electronic equipment and storage medium |
CN107730465A (en) * | 2017-10-09 | 2018-02-23 | 武汉斗鱼网络科技有限公司 | Face U.S. face method and device in a kind of image |
-
2018
- 2018-03-20 CN CN201810229288.8A patent/CN108399599B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150279073A1 (en) * | 2014-03-26 | 2015-10-01 | Sony Corporation | Image processing device, image processing method, and storage medium |
US20170076174A1 (en) * | 2014-05-06 | 2017-03-16 | Nant Holdings Ip, Llc | Image-based feature detection using edge vectors |
CN104899905A (en) * | 2015-06-08 | 2015-09-09 | 深圳市诺比邻科技有限公司 | Face image processing method and apparatus |
CN107395958A (en) * | 2017-06-30 | 2017-11-24 | 北京金山安全软件有限公司 | Image processing method and device, electronic equipment and storage medium |
CN107578380A (en) * | 2017-08-07 | 2018-01-12 | 北京金山安全软件有限公司 | Image processing method and device, electronic equipment and storage medium |
CN107730465A (en) * | 2017-10-09 | 2018-02-23 | 武汉斗鱼网络科技有限公司 | Face U.S. face method and device in a kind of image |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109241921A (en) * | 2018-09-17 | 2019-01-18 | 北京字节跳动网络技术有限公司 | Method and apparatus for detecting face key point |
US10785456B1 (en) | 2019-09-25 | 2020-09-22 | Haier Us Appliance Solutions, Inc. | Methods for viewing and tracking stored items |
CN111507896A (en) * | 2020-04-27 | 2020-08-07 | 北京字节跳动网络技术有限公司 | Image liquefaction processing method, device, equipment and storage medium |
CN111507896B (en) * | 2020-04-27 | 2023-09-05 | 抖音视界有限公司 | Image liquefaction processing method, device, equipment and storage medium |
CN113781295A (en) * | 2021-09-14 | 2021-12-10 | 网易(杭州)网络有限公司 | Image processing method, device, equipment and storage medium |
CN113781295B (en) * | 2021-09-14 | 2024-02-27 | 网易(杭州)网络有限公司 | Image processing method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108399599B (en) | 2021-11-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108389155A (en) | Image processing method, device and electronic equipment | |
CN108399599A (en) | Image processing method, device and electronic equipment | |
CN108364254A (en) | Image processing method, device and electronic equipment | |
CN110874594B (en) | Human body appearance damage detection method and related equipment based on semantic segmentation network | |
CN108346130A (en) | Image processing method, device and electronic equipment | |
CN111340008B (en) | Method and system for generation of counterpatch, training of detection model and defense of counterpatch | |
CN107395958B (en) | Image processing method and device, electronic equipment and storage medium | |
CN109840883B (en) | Method and device for training object recognition neural network and computing equipment | |
CN110175980A (en) | Image definition recognition methods, image definition identification device and terminal device | |
CN108229331A (en) | Face false-proof detection method and system, electronic equipment, program and medium | |
WO2020125319A1 (en) | Glaucoma image recognition method and device and screening system | |
TWI692729B (en) | Method and device for determining pupil position | |
CN108447023A (en) | Image processing method, device and electronic equipment | |
CN108416902A (en) | Real-time object identification method based on difference identification and device | |
WO2020125318A1 (en) | Glaucoma image recognition method and device and diagnosis system | |
CN111444555A (en) | Temperature measurement information display method and device and terminal equipment | |
CN110033424A (en) | Method, apparatus, electronic equipment and the computer readable storage medium of image procossing | |
CN111222379A (en) | Hand detection method and device | |
CN107851309A (en) | A kind of image enchancing method and device | |
US20210390667A1 (en) | Model generation | |
Leavline et al. | On teaching digital image processing with MATLAB | |
CN116051631A (en) | Light spot labeling method and system | |
CN112396050A (en) | Image processing method, device and storage medium | |
CN110032941B (en) | Face image detection method, face image detection device and terminal equipment | |
CN110188640A (en) | Face identification method, device, server and computer-readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |