CN107767326A - Objects in images transform process method, device and computing device - Google Patents
Objects in images transform process method, device and computing device Download PDFInfo
- Publication number
- CN107767326A CN107767326A CN201710896416.XA CN201710896416A CN107767326A CN 107767326 A CN107767326 A CN 107767326A CN 201710896416 A CN201710896416 A CN 201710896416A CN 107767326 A CN107767326 A CN 107767326A
- Authority
- CN
- China
- Prior art keywords
- image
- curve
- coordinate system
- destination object
- crucial
- 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
- 238000000034 method Methods 0.000 title claims abstract description 103
- 230000008569 process Effects 0.000 title claims abstract description 60
- 238000012545 processing Methods 0.000 claims abstract description 54
- 238000013507 mapping Methods 0.000 claims description 18
- 238000004891 communication Methods 0.000 claims description 17
- 238000000605 extraction Methods 0.000 claims description 10
- 230000007704 transition Effects 0.000 claims description 6
- 230000009466 transformation Effects 0.000 abstract description 47
- 230000000694 effects Effects 0.000 abstract description 18
- 230000001960 triggered effect Effects 0.000 abstract description 9
- 239000000284 extract Substances 0.000 description 10
- 238000006243 chemical reaction Methods 0.000 description 9
- 241000406668 Loxodonta cyclotis Species 0.000 description 5
- 238000012937 correction Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 238000003672 processing method Methods 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 230000026676 system process Effects 0.000 description 2
- 238000013519 translation Methods 0.000 description 2
- 241001465754 Metazoa Species 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000001035 drying Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 239000004744 fabric Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012163 sequencing technique 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
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
- G06T2207/30201—Face
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a kind of objects in images transform process method, device and computing device, method includes:Obtain pending the first image comprising source object;Obtain the second image for including destination object;The first key message of source object is extracted from the first image, and the second key message of destination object is extracted from the second image;Coordinate system is established, is fitted the crucial curve for handling the crucial curve and destination object that obtain source object in a coordinate system respectively according to the first key message and the second key message;According to the crucial curve of the crucial curve and destination object of source object, amplitude adjustment curve is calculated;Curve is adjusted according to amplitude to be adjusted the first image, obtain the 3rd image, the shooting triggered according to user instructs, preserve the 3rd image, it can realize and smooth transformation is kept during object transformation, so as to after object transformation processing terminates, ensure the 3rd resulting image more naturally, object transformation treatment effect is more fine.
Description
Technical field
The present invention relates to image processing field, and in particular to a kind of objects in images transform process method, device, calculating are set
Standby and computer-readable storage medium.
Background technology
With the development of science and technology, the technology of image capture device also increasingly improves.The image collected becomes apparent from, differentiated
Rate, display effect also greatly improve.But existing image possibly can not meet the needs of user, and user is wished to pair in image
As carrying out conversion process.When carrying out conversion process using existing object transformation processing method, pixel is simply simply carried out
The mapping of point, it is not smooth transformation during conversion process, therefore, the edge of image is easy to folding line occur, and the inside of image
It can deform upon, and cause the problem of unnatural, the display effect of image is bad.
The content of the invention
In view of the above problems, it is proposed that the present invention so as to provide one kind overcome above mentioned problem or at least in part solve on
State objects in images transform process method, device, computing device and the computer-readable storage medium of problem.
According to an aspect of the invention, there is provided a kind of objects in images transform process method, it includes:
Obtain pending the first image comprising source object;
Obtain the second image for including destination object;
The first key message of source object is extracted from the first image, and destination object is extracted from the second image
The second key message;
Coordinate system is established, is fitted handles in a coordinate system respectively according to the first key message and the second key message
To the crucial curve of the crucial curve and destination object of source object;
According to the crucial curve of the crucial curve and destination object of source object, amplitude adjustment curve is calculated;
Curve is adjusted according to amplitude to be adjusted the first image, obtains the 3rd image.
Alternatively, first key message includes the positional information of at least one first key point, and described second is crucial
Positional information of the packet containing at least one second key point.
Alternatively, the coordinate system of establishing further comprises:Establish polar coordinate system;
It is described to be fitted respectively in the coordinate system according to first key message and second key message
The crucial curve for handling the crucial curve and destination object that obtain source object further comprises:
The positional information of the central point of the source object is extracted in the first image, the central point of the source object is reflected
The limit as polar coordinate system is penetrated, according to relative between at least one first key point and the central point of the source object
Position, at least one first key point is mapped in the polar coordinate system, according at least one first key point
Mapping result in the polar coordinate system process of fitting treatment obtain the crucial curve of source object;
The positional information of the central point of the destination object is extracted in the second image, by the center of the destination object
Limit of the point mapping as polar coordinate system, according between at least one second key point and the central point of the destination object
Relative position, at least one second key point is mapped in the polar coordinate system, according to described at least one second
The mapping result of key point process of fitting treatment in the polar coordinate system obtains the crucial curve of destination object.
Alternatively, the crucial curve of the crucial curve and destination object according to source object, amplitude adjustment curve is calculated
Further comprise:
According to the polar diameter of any point on the crucial curve of source object, and there is with the point destination object of identical polar angle
Crucial curve on point polar diameter, calculate corresponding with polar angle regulation coefficient, obtain between polar angle and regulation coefficient
The amplitude adjustment curve of relation.
Alternatively, before polar coordinate system is established, methods described also includes:
According to the positional information of the central point of the source object, the positional information of at least one first key point is entered
Row correction process;And the positional information of the central point according to the destination object, at least one second key point
Positional information is corrected processing.
Alternatively, methods described also includes:Show the 3rd image.
Alternatively, pending the first image comprising source object of the acquisition further comprises:
The first image comprising source object that real-time image acquisition collecting device is caught.
Alternatively, methods described also includes:The shooting triggered according to user instructs, and preserves the 3rd image.
Alternatively, methods described also includes:The record command triggered according to user, is preserved by the 3rd image as frame
The video of image composition.
According to another aspect of the present invention, there is provided a kind of objects in images transition processing device, it includes:
First acquisition module, suitable for obtaining pending the first image comprising source object;
Second acquisition module, suitable for obtaining the second image for including destination object;
Extraction module, suitable for extracting the first key message of source object from the first image, and from the second image
Extract the second key message of destination object;
Establishment of coordinate system module, is adapted to set up coordinate system;
Process of fitting treatment module, suitable for being fitted in a coordinate system respectively according to the first key message and the second key message
Processing obtains the crucial curve of the crucial curve and destination object of source object;
Computing module, suitable for the crucial curve of crucial curve and destination object according to source object, it is bent to calculate amplitude adjustment
Line;
Adjusting module, the first image is adjusted suitable for adjusting curve according to amplitude, obtains the 3rd image.
Alternatively, first key message includes the positional information of at least one first key point, and described second is crucial
Positional information of the packet containing at least one second key point.
Alternatively, the establishment of coordinate system module is further adapted for:Establish polar coordinate system;
The process of fitting treatment module is further adapted for:The position of the central point of the source object is extracted in the first image
Information, the limit using the mapping of the central point of the source object as polar coordinate system, according at least one first key point and
Relative position between the central point of the source object, at least one first key point is mapped to the polar coordinate system
In, according to the mapping result of at least one first key point, process of fitting treatment obtains the pass of source object in the polar coordinate system
Key curve;
The positional information of the central point of the destination object is extracted in the second image, by the center of the destination object
Limit of the point mapping as polar coordinate system, according between at least one second key point and the central point of the destination object
Relative position, at least one second key point is mapped in the polar coordinate system, according to described at least one second
The mapping result of key point process of fitting treatment in the polar coordinate system obtains the crucial curve of destination object.
Alternatively, the computing module is further adapted for:According to the polar diameter of any point on the crucial curve of source object, with
And have with the point identical polar angle destination object crucial curve on point polar diameter, calculate it is corresponding with polar angle adjust be
Number, obtain adjusting curve on the amplitude of the relation between polar angle and regulation coefficient.
Alternatively, described device also includes:Correction process module, the position suitable for the central point according to the source object are believed
Breath, processing is corrected to the positional information of at least one first key point;And the center according to the destination object
The positional information of point, processing is corrected to the positional information of at least one second key point.
Alternatively, described device also includes:Display module, suitable for showing the 3rd image.
Alternatively, first acquisition module is further adapted for:What real-time image acquisition collecting device was caught includes source pair
The first image of elephant.
Alternatively, described device also includes:First preserving module, suitable for the shooting instruction triggered according to user, preserve institute
State the 3rd image.
Alternatively, described device also includes:Second preserving module, suitable for the record command triggered according to user, preserve by
3rd image as group of picture into video.
According to another aspect of the invention, there is provided a kind of computing device, including:Processor, memory, communication interface and
Communication bus, processor, memory and communication interface complete mutual communication by communication bus;
Memory is used to deposit an at least executable instruction, and executable instruction becomes the above-mentioned objects in images of computing device
Change and operated corresponding to processing method.
In accordance with a further aspect of the present invention, there is provided a kind of computer-readable storage medium, be stored with least one in storage medium
Executable instruction, executable instruction make computing device be operated as corresponding to above-mentioned objects in images transform process method.
According to scheme provided by the invention, the first key message of source object is extracted from the first image, and from
The second key message of destination object is extracted in two images, according to the first key message and the second key message respectively in coordinate
The crucial curve that processing obtains the crucial curve and destination object of source object is fitted in system, according to the crucial curve of source object
With the crucial curve of destination object, amplitude adjustment curve is calculated, adjust curve according to amplitude is adjusted to the first image, can
Realization keeps smooth transformation during object transformation, so as to the obtained by after object transformation processing terminates, ensureing
Three images overcome the edge occurred after object transformation in the prior art more naturally, object transformation treatment effect is more fine
Phenomenon creasy, and make image internal distortions without it is natural the problem of.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,
And can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature and advantage can
Become apparent, below especially exemplified by the embodiment of the present invention.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this area
Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention
Limitation.And in whole accompanying drawing, identical part is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 shows the schematic flow sheet of objects in images transform process method according to an embodiment of the invention;
Fig. 2 shows the schematic flow sheet of objects in images transform process method in accordance with another embodiment of the present invention;
Fig. 3 shows the shape of face figure of source object;
Fig. 4 shows the shape of face figure of destination object;
Fig. 5 shows the structural representation of objects in images transition processing device according to an embodiment of the invention;
Fig. 6 shows the structural representation of objects in images transition processing device in accordance with another embodiment of the present invention;
Fig. 7 shows a kind of structural representation of computing device according to an embodiment of the invention.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in accompanying drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
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.
Object can be any objects such as face in image, animal in the present invention, enter in embodiment by taking face as an example
Row explanation, but face is not limited only to, for example, it is also possible to for carrying out conversion process to whole human body in image.
Fig. 1 shows the schematic flow sheet of objects in images transform process method according to an embodiment of the invention.Such as
Shown in Fig. 1, this method comprises the following steps:
Step S100, obtain pending the first image comprising source object.
In embodiments of the present invention, pending the first image comprising source object can be that user is set using IMAQ
It is standby being caught or according to selected operation of the user to image in photograph album come what is determined, can also be what user uploaded,
Here it is not specifically limited;Wherein, source object can be face, can also be cute pet etc. certainly, be become using the objects in images
Conversion process can be carried out to any object by changing treatment technology, and those skilled in the art can select processing pair according to being actually needed
As source object.
Step S101, obtain the second image for including destination object.
Destination object define the standard of wanting to reach comprising the second image of destination object can be according to
Selected operation of the family to image in photograph album determines, for example, storing the image of user star of interest, user in photograph album
An image can therefrom be selected, can also be user upload or from network download.Wish its shape of face being transformed into user A
Exemplified by certain star B shape of face, user A face is source object, and the face of the star B is destination object.
Step S102, extracts the first key message of source object from the first image, and is extracted from the second image
Go out the second key message of destination object.
For convenience of object transformation processing, it is necessary to extract the first key message of source object, Yi Jicong from the first image
The second key message of destination object is extracted in second image, for example, when needing to enter line translation to shape of face, extraction
First key message mainly includes face's outline information of source object, such as the tail of the eye, chin;Second key message of extraction
The main face's outline information for including destination object, such as the tail of the eye, chin.Object transformation can be improved using key message
Processing speed and efficiency, meanwhile, key message is easy to extract, and extract it is accurate, it is more square when carrying out object transformation processing
Just.
Step S103, establishes coordinate system, is carried out in a coordinate system respectively according to the first key message and the second key message
Process of fitting treatment obtains the crucial curve of the crucial curve and destination object of source object.
In embodiments of the present invention, process of fitting treatment is exactly that a series of first key message in plane is smooth with one
Curve is connected, and a series of second key message in plane is connected with a smooth curve.With face
Exemplified by, it is fitted processing in a coordinate system according to the first key message and obtains the crucial curve of source object similar to source object
Face contour;It is fitted processing in a coordinate system according to the second key message and obtains the crucial curve of destination object and is similar to mesh
The face contour of object is marked, is merely illustrative of here, without any restriction effect.
Step S104, according to the crucial curve of the crucial curve and destination object of source object, calculate amplitude adjustment curve.
Although having obtained the crucial curve of the crucial curve and destination object of source object in step s 103, the present invention is real
It is not simply to adjust the crucial curve of source object to the crucial curve of destination object to apply example, if simply simply by source
The crucial curve of object is adjusted to the crucial curve of destination object, is easy for object transformation back edge phenomenon creasy occur,
But also image internal distortions can be made without naturally, therefore, obtaining the key song of the crucial curve and destination object of source object
After line, it is also necessary to according to the crucial curve of the crucial curve and destination object of source object, amplitude adjustment curve is calculated, to utilize
The amplitude being calculated adjusts curve to be adjusted to the first image.
Step S105, curve is adjusted according to amplitude the first image is adjusted, obtain the 3rd image.
After amplitude adjustment curve is calculated, curve can be adjusted according to amplitude and the first image is adjusted, here
It is that all pixels point of the first image is all adjusted, so as to keep smooth during object transformation, overcomes object change
The edge phenomenon creasy occurred after changing, and make image internal distortions without it is natural the problem of.
The method provided according to the above embodiment of the present invention, the first crucial letter of source object is extracted from the first image
Cease, and the second key message of destination object is extracted from the second image, believe according to the first key message and second are crucial
Breath is fitted the crucial curve that processing obtains the crucial curve and destination object of source object in a coordinate system respectively, according to source pair
The crucial curve of the crucial curve and destination object of elephant, calculates amplitude adjustment curve, and curve is adjusted to the first image according to amplitude
It is adjusted, can realizes and smooth transformation is kept during object transformation, so as to after object transformation processing terminates, protects
The 3rd image obtained by card has beautified image display effect, overcome more naturally, object transformation treatment effect is more fine
The edge phenomenon creasy occurred in the prior art after object transformation, and make image internal distortions without it is natural the problem of,
Image after can also easily and quickly being handled, improves image processing efficiency, optimizes image procossing mode.
Fig. 2 shows the schematic flow sheet of objects in images transform process method in accordance with another embodiment of the present invention.
As shown in Fig. 2 this method comprises the following steps:
Step S200, the first image comprising source object that real-time image acquisition collecting device is caught.
Image capture device illustrates by taking mobile terminal as an example in the present embodiment.Get mobile terminal camera in real time
The first image captured, wherein, the first image contains source object, such as face, human body, is merely illustrative of, does not have here
There is any restriction effect, will illustrate object transformation processing method by taking the shape of face for converting face as an example below.
Step S201, obtain the second image for including destination object.
Destination object define the standard of wanting to reach comprising the second image of destination object can be according to
Selected operation of the family to image in photograph album determines, for example, storing the image of user star of interest, user in photograph album
An image can therefrom be selected, can also be user upload or from network download.Wish its shape of face being transformed into user A
Exemplified by certain star B shape of face, user A face is source object, and the face of the star B is destination object.
Step S202, extracts the first key message of source object from the first image, and is extracted from the second image
Go out the second key message of destination object.
Wherein, the first key message includes the positional information of at least one first key point, and the positional information indicates
Position of one key point in face;Second key message includes the positional information of at least one second key point, position letter
Breath indicates position of second key point in face.
Specifically, source object can be identified from the first image:User A face part, therefrom extracts at least one
The positional information of individual first key point, the positional information of P1 as shown in Figure 3 point-P8 points;Target is identified from the second image
Object:Star B face part, therefrom extracts the positional information of at least one first key point, and P1 as shown in Figure 4 point-
The positional information of P8 points, is merely just schematically illustrated, without any restriction effect.
Step S203, according to the positional information of the central point of source object, to the positional information of at least one first key point
It is corrected processing.
In embodiments of the present invention, the first image comprising source object is probably the side face image of Zhang Yuan's object, or
It is the image that a process zooms in or out processing, for this kind of image, if without any processing directly carry out object transformation
Processing, it is easy to cause object transformation to handle inaccurate, cause object transformation effect poor, therefore, carried from the first image
The first key message for taking out source object postpones, can be according to the positional information of the central point of source object, at least one first
The positional information of key point is corrected processing, continues here so that shape of face converts as an example, and the central point of source object, which can select, does two
Eye midpoint, by least one first key point along source object central point expansion and it is symmetrical, then carry out image scaling
Processing so that face changes to the size position of a standard of comparison, is easy to subsequent object conversion process.
Step S204, according to the positional information of the central point of destination object, the position of at least one second key point is believed
Breath is corrected processing.
In embodiments of the present invention, the second image comprising destination object is probably the side face image of a destination object,
Either a process zooms in or out the image of processing, for this kind of image, if without any processing directly use it to
Carry out object transformation processing, it is easy to cause object transformation handle it is inaccurate, cause object transformation effect poor, therefore, from
The second key message that destination object is extracted in second image postpones, and can be believed according to the position of the central point of destination object
Breath, is corrected processing to the positional information of at least one second key point, continues here so that shape of face converts as an example, destination object
Central point can select and do the midpoint of two, central point of at least one second key point along destination object is deployed and symmetrically divided
Cloth, then carry out image scaling processing so that face changes to the size position of a standard of comparison, is easy to subsequent object to convert
Processing.
Step S205, establishes polar coordinate system, and the positional information of the central point of source object is extracted in the first image, by source
The central point of object maps the limit as polar coordinate system, according between at least one first key point and the central point of source object
Relative position, at least one first key point is mapped in polar coordinate system, according to the mapping of at least one first key point
As a result process of fitting treatment obtains the crucial curve of source object in polar coordinate system.
So that shape of face converts as an example, the midpoint that people is two can be considered the central point of source object in the first image, in the first image
In extract source object central point positional information, using the midpoint mapping of people two as the limit of polar coordinate system, establish pole
Coordinate system, in order to fit the crucial curve of source object exactly, and source pair is embodied as far as possible under polar coordinate system
The shape of face of elephant, it is thus necessary to determine that the relative position between at least one first key point and central point, including angle and distance, so
Afterwards, at least one first key point is reflected according to the relative position between at least one first key point and the central point of source object
It is mapped in polar coordinate system, according to the mapping result of at least one first key point, process of fitting treatment obtains source object in polar coordinate system
Crucial curve, in embodiments of the present invention, process of fitting treatment is exactly that a series of at least one first key point in plane is used
One smooth curve connects.Specifically, after coordinate system is established, can be carried out using least square curve fitting method
Process of fitting treatment, so that the shape of face of source object is square face as an example, after extraction obtains the first key message, according to the first key message
Processing is fitted in a coordinate system using least square curve fitting method, obtains face's outline with the square face of source object
The crucial curve of approximate source object, as shown in figure 3, being merely illustrative of here, without any restriction effect.
Step S206, the positional information of the central point of destination object is extracted in the second image, by destination object
Heart point maps the limit as polar coordinate system, according to relative between at least one second key point and the central point of destination object
Position, at least one second key point is mapped in polar coordinate system, existed according to the mapping result of at least one second key point
Process of fitting treatment obtains the crucial curve of destination object in polar coordinate system.
So that shape of face converts as an example, the midpoint that people is two can be considered the central point of destination object in the second image, in the second figure
The positional information of the central point of destination object is extracted as in, the people midpoint of two is mapped into the limit as polar coordinate system, built
Vertical polar coordinate system, in order to fit the crucial curve of destination object exactly, and as far as possible in polar coordinate system lower body
The shape of face of existing destination object, it is thus necessary to determine that the relative position between at least one second key point and central point, including angle and
Distance, then, according to the relative position between at least one second key point and the central point of destination object by least one
Two key points are mapped in polar coordinate system, according to the mapping result of at least one second key point in polar coordinate system process of fitting treatment
The crucial curve of destination object is obtained, in embodiments of the present invention, process of fitting treatment is exactly a series of at least one in plane
Second key point is connected with a smooth curve.Specifically, after coordinate system is established, least square curve can be utilized
Fitting process is handled to be fitted, so that the shape of face of destination object is heart-shaped face as an example, after extraction obtains the first key message, and root
Processing is fitted in a coordinate system using least square curve fitting method according to the first key message, obtains the heart with destination object
The crucial curve of the approximate destination object of face's outline of shape face, as shown in figure 4, be merely illustrative of here, without appointing
What restriction effect.
Step S207, there is identical polar angle according to the polar diameter of any point on the crucial curve of source object, and with the point
Destination object crucial curve on point polar diameter, calculate corresponding with polar angle regulation coefficient, obtain on polar angle with adjusting
The amplitude adjustment curve of relation between coefficient.
Although having obtained the crucial curve of the crucial curve and destination object of source object in step S206, the present invention is real
It is not simply to adjust the crucial curve of source object to the crucial curve of destination object to apply example, if simply simply by source
The crucial curve of object is adjusted to the crucial curve of destination object, is easy for object transformation back edge phenomenon creasy occur,
But also image internal distortions can be made without naturally, therefore, obtaining the key song of the crucial curve and destination object of source object
After line, it is also necessary to according to the crucial curve of the crucial curve and destination object of source object, amplitude adjustment curve is calculated, to utilize
The amplitude being calculated adjusts curve to be adjusted to the first image.
Specifically, any point on the crucial curve of source object is chosen, determines the polar diameter of the point, and finds and has with the point
Point on the crucial curve of the destination object of identical polar angle, the polar diameter of the point on the crucial curve of destination object is determined, according to source
The polar diameter of point on the crucial curve of object and the polar diameter of the point on the crucial curve of destination object calculate regulation coefficient, so as to
Curve is adjusted to the amplitude on the relation between polar angle and regulation coefficient.
Step S208, curve is adjusted according to amplitude the first image is adjusted, obtain the 3rd image.
After amplitude adjustment curve is calculated, curve can be adjusted according to amplitude and the first image is adjusted, here
It is that all pixels point of the first image is all adjusted, so as to keep smooth during object transformation, overcomes object change
The edge phenomenon creasy occurred after changing, and make image internal distortions without it is natural the problem of.
The objects in images transform process method of the present invention can be also used for entering human body line translation, and central point can select
Navel position, specifically transform process method no longer describe in detail here.
Step S209, show the 3rd image.
The 3rd obtained image is shown in real time, user can directly be seen that to obtained after the first image procossing
Three images.After the 3rd image is obtained, the first image caught is replaced using the 3rd image at once and is shown, typically 1/24
It is replaced within second, for a user, relatively short due to replacing the time, human eye is not discovered significantly, equivalent to real-time
The image of display the 3rd.
Step S210, the shooting triggered according to user instruct, and preserve the 3rd image.
After the 3rd image is shown, the shooting that can also be triggered according to user instructs, and preserves the 3rd image.As user clicks on
The shooting push button of camera, triggering shooting instruction, the 3rd image of display is preserved.
Step S211, according to user trigger record command, preserve by the 3rd image as group of picture into video.
When showing three images, can also be preserved according to the record command of user's triggering by the 3rd image as frame figure
As the video of composition.As user clicks on the recording button of camera, triggering record command, using the 3rd image of display as in video
Two field picture preserved, so as to preserve multiple 3rd images as group of picture into video.
Step S210 and step S211 is the optional step of the present embodiment, and in the absence of perform sequencing, according to
The different instruction selection of family triggering performs corresponding step.
The method provided according to the above embodiment of the present invention, the first key point to extracting source object from the first image
Positional information be corrected processing, and the second key point positional information to extracting destination object from the second image is entered
Row correction process, subsequent object conversion process can be made more accurate, improve object transformation effect, according to the first key message
It is fitted the key that processing obtains the crucial curve and destination object of source object in a coordinate system respectively with the second key message
Curve, according to the crucial curve of the crucial curve and destination object of source object, amplitude adjustment curve is calculated, is adjusted according to amplitude bent
Line is adjusted to the first image, can realize and smooth transformation is kept during object transformation, so as in object transformation
After processing terminates, the 3rd image obtained by ensureing overcomes existing skill more naturally, object transformation treatment effect is more fine
The edge phenomenon creasy occurred in art after object transformation, and make image internal distortions without it is natural the problem of.The present invention
User's technical merit is not limited, it is not necessary to which user carries out extra process to image, saves user time, can also be anti-in real time
Image after feedback processing, facilitates user to check.
Fig. 5 shows the structural representation of objects in images transition processing device according to an embodiment of the invention.Such as
Shown in Fig. 5, the device includes:First acquisition module 500, the second acquisition module 501, extraction module 502, establishment of coordinate system module
503rd, process of fitting treatment module 504, computing module 505, adjusting module 506.
First acquisition module 500, suitable for obtaining pending the first image comprising source object.
Second acquisition module 501, suitable for obtaining the second image for including destination object.
Extraction module 502, suitable for extracting the first key message of source object from the first image, and from the second image
In extract the second key message of destination object.
Establishment of coordinate system module 503, is adapted to set up coordinate system.
Process of fitting treatment module 504, suitable for being carried out in a coordinate system respectively according to the first key message and the second key message
Process of fitting treatment obtains the crucial curve of the crucial curve and destination object of source object.
Computing module 505, suitable for the crucial curve of crucial curve and destination object according to source object, calculate amplitude adjustment
Curve.
Adjusting module 506, the first image is adjusted suitable for adjusting curve according to amplitude, obtains the 3rd image.
The device provided according to the above embodiment of the present invention, the first crucial letter of source object is extracted from the first image
Cease, and the second key message of destination object is extracted from the second image, believe according to the first key message and second are crucial
Breath is fitted the crucial curve that processing obtains the crucial curve and destination object of source object in a coordinate system respectively, according to source pair
The crucial curve of the crucial curve and destination object of elephant, calculates amplitude adjustment curve, and curve is adjusted to the first image according to amplitude
It is adjusted, can realizes and smooth transformation is kept during object transformation, so as to after object transformation processing terminates, protects
The 3rd image obtained by card overcomes object transformation in the prior art more naturally, object transformation treatment effect is more fine
The edge phenomenon creasy occurred afterwards, and make image internal distortions without it is natural the problem of.
Fig. 6 shows the structural representation of objects in images transition processing device in accordance with another embodiment of the present invention.
As shown in fig. 6, the device includes:First acquisition module 600, the second acquisition module 601, extraction module 602, establishment of coordinate system mould
Block 603, process of fitting treatment module 604, computing module 605, adjusting module 606.
First acquisition module 600, the first image comprising source object caught suitable for real-time image acquisition collecting device.
Second acquisition module 601, suitable for obtaining the second image for including destination object.
Extraction module 602, suitable for extracting the first key message of source object from the first image, and from the second image
In extract the second key message of destination object.
Wherein, the first key message includes the positional information of at least one first key point, and the second key message includes extremely
The positional information of few second key point.
Correction process module 607, suitable for the positional information of the central point according to source object, at least one first key point
Positional information be corrected processing;And the positional information of the central point according to destination object, it is crucial at least one second
The positional information of point is corrected processing.
Establishment of coordinate system module 603, is adapted to set up polar coordinate system.
Process of fitting treatment module 604, the positional information of the central point suitable for extracting source object in the first image, by source pair
The central point of elephant maps the limit as polar coordinate system, according between at least one first key point and the central point of source object
Relative position, at least one first key point is mapped in polar coordinate system, according to the mapping knot of at least one first key point
Fruit process of fitting treatment in polar coordinate system obtains the crucial curve of source object;And extract destination object in the second image
The positional information of central point, using the central point mapping of destination object as the limit of polar coordinate system, closed according at least one second
Relative position between key point and the central point of destination object, at least one second key point is mapped in polar coordinate system, root
According to the mapping result of at least one second key point, process of fitting treatment obtains the crucial curve of destination object in polar coordinate system.
Computing module 605, there is phase suitable for the polar diameter of any point on the crucial curve according to source object, and with the point
With the polar diameter of the point on the crucial curve of the destination object of polar angle, regulation coefficient corresponding with polar angle is calculated, is obtained on polar angle
The amplitude adjustment curve of relation between regulation coefficient.
Adjusting module 606, the first image is adjusted suitable for adjusting curve according to amplitude, obtains the 3rd image.
Display module 608, suitable for showing the 3rd image.
First preserving module 609, suitable for the shooting instruction triggered according to user, preserve the 3rd image.
Second preserving module 610, suitable for the record command triggered according to user, preserve by the 3rd image as group of picture
Into video.
The device provided according to the above embodiment of the present invention, the first key point to extracting source object from the first image
Positional information be corrected processing, and the second key point positional information to extracting destination object from the second image is entered
Row correction process, subsequent object conversion process can be made more accurate, improve object transformation effect, according to the first key message
It is fitted the key that processing obtains the crucial curve and destination object of source object in a coordinate system respectively with the second key message
Curve, according to the crucial curve of the crucial curve and destination object of source object, amplitude adjustment curve is calculated, is adjusted according to amplitude bent
Line is adjusted to the first image, can realize and smooth transformation is kept during object transformation, so as in object transformation
After processing terminates, the 3rd image obtained by ensureing overcomes existing skill more naturally, object transformation treatment effect is more fine
The edge phenomenon creasy occurred in art after object transformation, and make image internal distortions without it is natural the problem of.The present invention
User's technical merit is not limited, it is not necessary to which user carries out extra process to image, saves user time, can also be anti-in real time
Image after feedback processing, facilitates user to check.
Present invention also provides a kind of nonvolatile computer storage media, the computer-readable storage medium is stored with least
One executable instruction, the image capture device data that the computer executable instructions can perform in above-mentioned any means embodiment are real
When processing method.
Fig. 7 shows a kind of structural representation of computing device according to an embodiment of the invention, of the invention specific real
Specific implementation of the example not to computing device is applied to limit.
As shown in fig. 7, the computing device can include:Processor (processor) 702, communication interface
(Communications Interface) 704, memory (memory) 706 and communication bus 708.
Wherein:
Processor 702, communication interface 704 and memory 706 complete mutual communication by communication bus 708.
Communication interface 704, for being communicated with the network element of miscellaneous equipment such as client or other servers etc..
Processor 702, for configuration processor 710, it can specifically perform above-mentioned image capture device generating date side
Correlation step in method embodiment.
Specifically, program 710 can include program code, and the program code includes computer-managed instruction.
Processor 702 is probably central processor CPU, or specific integrated circuit ASIC (Application
Specific Integrated Circuit), or it is arranged to implement the integrated electricity of one or more of the embodiment of the present invention
Road.The one or more processors that computing device 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 706, for depositing program 710.Memory 706 may include high-speed RAM memory, it is also possible to also include
Nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.
Program 710 specifically can be used for causing processor 702 to perform the method in Fig. 1 and embodiment illustrated in fig. 2.
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, required by constructing 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 it 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 specification that this place provides, 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 in the case of these no details.In some instances, known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand one or more of each inventive aspect,
Above in the description to the 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:I.e. required guarantor
The application claims of shield features more more than the feature being expressly recited in each claim.It is more precisely, such as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following embodiment are expressly incorporated in the embodiment, wherein each claim is in itself
Separate embodiments all as the present invention.
Those skilled in the art, which are appreciated that, to be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more equipment different from the embodiment.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.In addition at least some in such feature and/or process or unit exclude each other, it can use any
Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and accompanying 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, summary and accompanying drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation
Replace.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included some features rather than further 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 realized with hardware, or to be run on one or more processor
Software module realize, or realized with combinations thereof.It will be understood by those of skill in the art that it can use in practice
Microprocessor or digital signal processor (DSP) realize objects in images conversion process equipment according to embodiments of the present invention
In some or all parts some or all functions.The present invention is also implemented as described herein for performing
The some or all equipment or program of device (for example, computer program and computer program product) of method.So
Realization the present invention program can store on a computer-readable medium, or can have one or more signal shape
Formula.Such signal can be downloaded from internet website and obtained, and either be provided or with any other shape on carrier signal
Formula provides.
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 symbol 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 some different elements and being come by means of properly programmed computer real
It is existing.In if the unit claim of equipment for drying is listed, several in these devices can be by same hardware branch
To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame
Claim.
Claims (10)
1. a kind of objects in images transform process method, it includes:
Obtain pending the first image comprising source object;
Obtain the second image for including destination object;
The first key message of the source object is extracted from described first image, and is extracted from second image
Second key message of the destination object;
Coordinate system is established, is intended respectively in the coordinate system according to first key message and second key message
Conjunction handles to obtain the crucial curve of the crucial curve and destination object of source object;
According to the crucial curve of the crucial curve and destination object of source object, amplitude adjustment curve is calculated;
Curve is adjusted according to the amplitude to be adjusted described first image, obtains the 3rd image.
2. according to the method for claim 1, wherein, first key message includes the position of at least one first key point
Confidence ceases, and second key message includes the positional information of at least one second key point.
3. method according to claim 1 or 2, wherein, the coordinate system of establishing further comprises:Establish polar coordinate system;
It is described that processing is fitted in the coordinate system according to first key message and second key message respectively
The crucial curve for obtaining the crucial curve and destination object of source object further comprises:
The positional information of the central point of the source object is extracted in the first image, the central point of the source object is mapped and made
For the limit of polar coordinate system, according to the relative position between at least one first key point and the central point of the source object
Put, at least one first key point is mapped in the polar coordinate system, according at least one first key point
Mapping result process of fitting treatment in the polar coordinate system obtains the crucial curve of source object;
The positional information of the central point of the destination object is extracted in the second image, the central point of the destination object is reflected
The limit as polar coordinate system is penetrated, according to the phase between at least one second key point and the central point of the destination object
To position, at least one second key point is mapped in the polar coordinate system, it is crucial according to described at least one second
The mapping result of point process of fitting treatment in the polar coordinate system obtains the crucial curve of destination object.
4. according to the method described in claim any one of 1-3, wherein, the crucial curve and destination object according to source object
Crucial curve, calculating amplitude adjustment curve further comprise:
According to the polar diameter of any point on the crucial curve of source object, and there is with the point pass of the destination object of identical polar angle
The polar diameter of point on key curve, regulation coefficient corresponding with polar angle is calculated, is obtained on the relation between polar angle and regulation coefficient
Amplitude adjustment curve.
5. according to the method described in claim any one of 1-4, wherein, before polar coordinate system is established, methods described also includes:
According to the positional information of the central point of the source object, school is carried out to the positional information of at least one first key point
Positive processing;And the positional information of the central point according to the destination object, to the position of at least one second key point
Information is corrected processing.
6. according to the method described in claim any one of 1-5, wherein, methods described also includes:Show the 3rd image.
7. according to the method described in claim any one of 1-6, wherein, it is described to obtain pending the first figure comprising source object
As further comprising:
The first image comprising source object that real-time image acquisition collecting device is caught.
8. a kind of objects in images transition processing device, it includes:
First acquisition module, suitable for obtaining pending the first image comprising source object;
Second acquisition module, suitable for obtaining the second image for including destination object;
Extraction module, suitable for extracting the first key message of the source object from described first image, and from described
The second key message of the destination object is extracted in two images;
Establishment of coordinate system module, is adapted to set up coordinate system;
Process of fitting treatment module, suitable for according to first key message and second key message respectively in the coordinate system
It is fitted the crucial curve that processing obtains the crucial curve and destination object of source object;
Computing module, suitable for the crucial curve of crucial curve and destination object according to source object, calculate amplitude adjustment curve;
Adjusting module, described first image is adjusted suitable for adjusting curve according to the amplitude, obtains the 3rd image.
9. a kind of computing device, 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 is used to deposit an at least executable instruction, and the executable instruction makes the computing device such as right will
Ask and operated corresponding to the objects in images transform process method any one of 1-7.
10. a kind of computer-readable storage medium, an at least executable instruction, the executable instruction are stored with the storage medium
Make operation corresponding to objects in images transform process method of the computing device as any one of claim 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710896416.XA CN107767326B (en) | 2017-09-28 | 2017-09-28 | Method and device for processing object transformation in image and computing equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710896416.XA CN107767326B (en) | 2017-09-28 | 2017-09-28 | Method and device for processing object transformation in image and computing equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107767326A true CN107767326A (en) | 2018-03-06 |
CN107767326B CN107767326B (en) | 2021-11-02 |
Family
ID=61266264
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710896416.XA Active CN107767326B (en) | 2017-09-28 | 2017-09-28 | Method and device for processing object transformation in image and computing equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107767326B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110119722A (en) * | 2019-05-17 | 2019-08-13 | 北京字节跳动网络技术有限公司 | Method and apparatus for generating information |
CN110263772A (en) * | 2019-07-30 | 2019-09-20 | 天津艾思科尔科技有限公司 | A kind of face characteristic identifying system based on face key point |
CN113409382A (en) * | 2018-10-11 | 2021-09-17 | 百度在线网络技术(北京)有限公司 | Method and device for measuring damaged area of vehicle |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050152597A1 (en) * | 2004-01-14 | 2005-07-14 | Eastman Kodak Company | Constructing extended color gamut digital images from limited color gamut digital images |
CN101853523A (en) * | 2010-05-18 | 2010-10-06 | 南京大学 | Method for adopting rough drawings to establish three-dimensional human face molds |
CN102656605A (en) * | 2009-10-20 | 2012-09-05 | 乐天株式会社 | Image processing device, image processing method, image processing program, and recording medium |
CN105139438A (en) * | 2014-09-19 | 2015-12-09 | 电子科技大学 | Video face cartoon animation generation method |
CN106651775A (en) * | 2016-12-16 | 2017-05-10 | 西安汇明光电技术有限公司 | Optimization method for log-polar coordinate transformation based on digital image processing |
WO2017098832A1 (en) * | 2015-12-09 | 2017-06-15 | Eizo株式会社 | Image processing apparatus and program |
-
2017
- 2017-09-28 CN CN201710896416.XA patent/CN107767326B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050152597A1 (en) * | 2004-01-14 | 2005-07-14 | Eastman Kodak Company | Constructing extended color gamut digital images from limited color gamut digital images |
CN102656605A (en) * | 2009-10-20 | 2012-09-05 | 乐天株式会社 | Image processing device, image processing method, image processing program, and recording medium |
CN101853523A (en) * | 2010-05-18 | 2010-10-06 | 南京大学 | Method for adopting rough drawings to establish three-dimensional human face molds |
CN105139438A (en) * | 2014-09-19 | 2015-12-09 | 电子科技大学 | Video face cartoon animation generation method |
WO2017098832A1 (en) * | 2015-12-09 | 2017-06-15 | Eizo株式会社 | Image processing apparatus and program |
CN106651775A (en) * | 2016-12-16 | 2017-05-10 | 西安汇明光电技术有限公司 | Optimization method for log-polar coordinate transformation based on digital image processing |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113409382A (en) * | 2018-10-11 | 2021-09-17 | 百度在线网络技术(北京)有限公司 | Method and device for measuring damaged area of vehicle |
CN110119722A (en) * | 2019-05-17 | 2019-08-13 | 北京字节跳动网络技术有限公司 | Method and apparatus for generating information |
CN110263772A (en) * | 2019-07-30 | 2019-09-20 | 天津艾思科尔科技有限公司 | A kind of face characteristic identifying system based on face key point |
CN110263772B (en) * | 2019-07-30 | 2024-05-10 | 天津艾思科尔科技有限公司 | Face feature recognition system based on face key points |
Also Published As
Publication number | Publication date |
---|---|
CN107767326B (en) | 2021-11-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107301620B (en) | Method for panoramic imaging based on camera array | |
CN109509226B (en) | Three-dimensional point cloud data registration method, device and equipment and readable storage medium | |
US11763540B2 (en) | Automatic data enhancement expansion method, recognition method and system for deep learning | |
CN107277615B (en) | Live broadcast stylization processing method and device, computing device and storage medium | |
CN107767326A (en) | Objects in images transform process method, device and computing device | |
CN109474780B (en) | Method and device for image processing | |
CN107734207A (en) | Object video transform process method, device and computing device | |
CN107820027A (en) | Video personage dresss up method, apparatus, computing device and computer-readable storage medium | |
CN107277391B (en) | Image conversion network processing method, server, computing device and storage medium | |
CN107483892A (en) | Video data real-time processing method and device, computing device | |
CN107590811B (en) | Scene segmentation based landscape image processing method and device and computing equipment | |
RU2697928C1 (en) | Superresolution of an image imitating high detail based on an optical system, performed on a mobile device having limited resources, and a mobile device which implements | |
CN111062362B (en) | Face living body detection model, method, device, equipment and storage medium | |
CN110326287A (en) | Image pickup method and device | |
CN107766803B (en) | Video character decorating method and device based on scene segmentation and computing equipment | |
CN113902851A (en) | Face three-dimensional reconstruction method and device, electronic equipment and storage medium | |
KR101259550B1 (en) | Method And Apparatus Contrasting Image Through Perspective Distortion Correction | |
CN112528978B (en) | Face key point detection method and device, electronic equipment and storage medium | |
CN107492068A (en) | Object video conversion real-time processing method, device and computing device | |
CN113902853A (en) | Face three-dimensional reconstruction method and device, electronic equipment and storage medium | |
CN113902852A (en) | Face three-dimensional reconstruction method and device, electronic equipment and storage medium | |
CN111213179A (en) | Image data processing method, device and system | |
CN114758055A (en) | Three-dimensional model generation method, XR device and storage medium | |
CN107767391A (en) | Landscape image processing method, device, computing device and computer-readable storage medium | |
CN107633547A (en) | Realize the view data real-time processing method and device, computing device of scene rendering |
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 |