CN104965654B - Head portrait adjusting method and system - Google Patents
Head portrait adjusting method and system Download PDFInfo
- Publication number
- CN104965654B CN104965654B CN201510330191.2A CN201510330191A CN104965654B CN 104965654 B CN104965654 B CN 104965654B CN 201510330191 A CN201510330191 A CN 201510330191A CN 104965654 B CN104965654 B CN 104965654B
- Authority
- CN
- China
- Prior art keywords
- head portrait
- offset
- adjusted
- mobile
- adjustment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 230000003321 amplification Effects 0.000 claims description 6
- 238000003199 nucleic acid amplification method Methods 0.000 claims description 6
- 210000003128 head Anatomy 0.000 description 74
- 238000010586 diagram Methods 0.000 description 12
- 210000005252 bulbus oculi Anatomy 0.000 description 11
- 230000000694 effects Effects 0.000 description 7
- 210000004279 orbit Anatomy 0.000 description 3
- 210000001508 eye Anatomy 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Landscapes
- Processing Or Creating Images (AREA)
Abstract
The invention discloses a method and a device for adjusting a head portrait. The method comprises the following steps: acquiring the positions of a starting point and an end point of sliding operation; calculating the offset of the end point relative to the starting point; and moving the position of the element to be adjusted in the head portrait according to the offset. Obtaining the positions of a starting point and an end point of the sliding operation; calculating the offset of the end point relative to the starting point; moving the position of an element to be adjusted in the head portrait according to the offset; the control precision in the process of adjusting the head portrait is improved, and the workload during image design is reduced.
Description
Technical field
The present invention relates to the method and systems that graphics process field more particularly to a kind of head portrait adjust.
Background technique
Currently when carrying out image design, if necessary to adjust head portrait, head portrait member is often portrayed in the form of segmentation
The position of element.Such as eyeball, when operation occurs in a certain preset section, eyeball is all shown in same position, and
Different sections use different eyeball pictures, there are Caton in operating process, when carrying out a large amount of fine image designs, need
Divide multiple sections and the relevant picture of the corresponding multiple head portrait elements of preparation.
Summary of the invention
The present invention provides a kind of method and systems of head portrait adjustment, pass through the beginning and end for obtaining slide
Position;Calculate offset of the terminal relative to starting point;According to the position of element to be adjusted in the mobile head portrait of the offset;It mentions
Manipulation precision during high head portrait adjustment, reduces workload when image design.
To realize above-mentioned design, the invention adopts the following technical scheme:
On the one hand using a kind of method of head portrait adjustment, comprising:
Obtain the position of the beginning and end of slide;
Calculate offset of the terminal relative to starting point;
According to the position of element to be adjusted in the mobile head portrait of the offset.
Wherein, before the position according to element to be adjusted in the mobile head portrait of the offset, further includes:
Confirm the offset without departing from default mobile threshold value.
Wherein, the position according to element to be adjusted in the mobile head portrait of the offset, comprising:
According to the offset it is scaled or amplification obtain amount of movement;
By the position of element to be adjusted in the mobile head portrait of the moving direction and moving distance of the amount of movement.
Wherein, after the position according to element to be adjusted in the mobile head portrait of the offset, further includes:
When the offset reaches preset range, the head portrait is switched to the corresponding head portrait undetermined of the preset range.
Wherein, before the position of the beginning and end for obtaining slide, further includes:
Initialize the head portrait and element to be adjusted.
On the other hand using a kind of device of head portrait adjustment, comprising:
Position acquisition unit, the position of the beginning and end for obtaining slide;
Offset computation unit, for calculating offset of the terminal relative to starting point;
Position adjustment unit, for the position according to element to be adjusted in the mobile head portrait of the offset.
Wherein, further includes:
Range determination unit, for confirming the offset without departing from default mobile threshold value.
Wherein, the position adjustment unit, comprising:
Scalable module, for scaled according to the offset or amplification to obtain amount of movement;
Position adjusting type modules, for element to be adjusted in the moving direction and the mobile head portrait of moving distance by the amount of movement
Position.
Wherein, further includes:
Head portrait switch unit, for when the offset reaches preset range, the head portrait to be switched to the preset range
Corresponding head portrait undetermined.
Wherein, further includes:
Initialization unit, for initializing the head portrait and element to be adjusted.
The invention has the benefit that passing through the position for the beginning and end for obtaining slide;Calculate the terminal phase
For the offset of starting point;According to the position of element to be adjusted in the mobile head portrait of the offset;Improve head portrait adjustment during
Manipulation precision, reduce workload when image design.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, institute in being described below to the embodiment of the present invention
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention
Example, for those of ordinary skill in the art, without creative efforts, can also implement according to the present invention
The content of example and these attached drawings obtain other attached drawings.
Fig. 1 is a kind of method stream of the first embodiment of the method for head portrait adjustment provided in the specific embodiment of the invention
Cheng Tu.
Fig. 2 is a kind of method stream of the second embodiment of the method for head portrait adjustment provided in the specific embodiment of the invention
Cheng Tu.
Fig. 3 is head portrait in a kind of second embodiment of the method for head portrait adjustment provided in the specific embodiment of the invention
Schematic diagram.
Fig. 4 is member to be adjusted in a kind of second embodiment of the method for head portrait adjustment provided in the specific embodiment of the invention
The schematic diagram of element.
Fig. 5 be provided in the specific embodiment of the invention a kind of head portrait adjustment method second embodiment in head portrait and
The schematic diagram of element initialization to be adjusted.
Fig. 6 is a kind of structure side of the first embodiment of the device of head portrait adjustment provided in the specific embodiment of the invention
Block diagram.
Fig. 7 is a kind of structure side of the second embodiment of the device of head portrait adjustment provided in the specific embodiment of the invention
Block diagram.
Specific embodiment
To keep the technical problems solved, the adopted technical scheme and the technical effect achieved by the invention clearer, below
It will the technical scheme of the embodiment of the invention will be described in further detail in conjunction with attached drawing, it is clear that described embodiment is only
It is a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those skilled in the art exist
Every other embodiment obtained under the premise of creative work is not made, shall fall within the protection scope of the present invention.
Referring to FIG. 1, it is a kind of the first implementation of the method for head portrait adjustment provided in the specific embodiment of the invention
The method flow diagram of example.As shown, this method, comprising:
Step S101: the position of the beginning and end of slide is obtained.
Slide is carried out on mobile terminal screen, obtains the position of the beginning and end of slide, it is specific sliding
The realization of dynamic operation has realization in the prior art, is not described further herein.
Step S102: offset of the terminal relative to starting point is calculated.
In the treatment process of slide, beginning and end is described by coordinate, can be counted according to corresponding coordinate value
Calculate offset of the terminal relative to starting point.Specific offset is divided into horizontal and vertical (coordinate system relative to system default) two
A direction, such as the offset of horizontal direction is dx, the offset of vertical direction is dy.
Step S103: according to the position of element to be adjusted in the mobile head portrait of the offset.
Element to be adjusted such as eyeball, nose, mouth in head portrait etc. it is arranged an anchor point, is positioned with the position of anchor point
The position of element to be adjusted treats and adjusts the adjustment of element namely to the adjustment of anchor point, such as the position of anchor point is p (x, y),
Position after being so adjusted according to offset above-mentioned is p (x+dx, y+dy).
In conclusion passing through the position for the beginning and end for obtaining slide;The terminal is calculated relative to starting point
Offset;According to the position of element to be adjusted in the mobile head portrait of the offset;The manipulation precision during head portrait adjustment is improved,
Reduce workload when image design.
Referring to FIG. 2, it is a kind of the second implementation of the method for head portrait adjustment provided in the specific embodiment of the invention
The method flow diagram of example.As shown, this method, comprising:
Step S201: the head portrait and element to be adjusted are initialized.
Please refer to Fig. 3, Fig. 4 and Fig. 5, be respectively the schematic diagram of head portrait, the schematic diagram of element to be adjusted and head portrait and to
The schematic diagram for adjusting element initialization needs to initialize head portrait and element to be adjusted, in the present embodiment before generating final image
In, the element to be adjusted of initialization is eyeball, and the head portrait of initialization is the image that head goes out except eyeball.In first display, eye
Pearl is arbitrarily set to the position of eye socket, and the subsequent specific location further to eyeball in eye socket is adjusted.
Step S202: the position of the beginning and end of slide is obtained.
During specific adjustment, is operated since any position of operation interface, be not necessarily intended to fall in starting point
Eyeball position, the track of slide is only projected to element to be adjusted by last adjustment, such as the eye in the present embodiment
Pearl.
Step S203: offset of the terminal relative to starting point is calculated.
Assuming that the position of the starting point obtained is p1 (x1, y1), the position of terminal is p2 (x2, y2), then corresponding offset
Horizontal offset is w=x2-x1;Offset of vertical amount is h=y2-y1.
Step S204: confirm the offset without departing from default mobile threshold value.
For between element to be adjusted and head portrait, there is relatively stringent relative position, element to be adjusted can only be set to head
Within a certain approximate region of picture.So needing to judge whether offset exceeds default mobile threshold value, that is, need to judge water
As soon as whether flat offset and offset of vertical amount have and have exceeded corresponding threshold value, if having one beyond illustrating that adjustment can not be real
It is existing.
Step S205: according to the offset it is scaled or amplification obtain amount of movement.
It, can be by way of zooming in or out in order to obtain accurate or quick adjustment during specific adjustment
Obtain amount of movement, such as slide 1cm, the mobile 0.5cm of element to be adjusted or slide 0.5cm, element movement 1cm to be adjusted.
Step S206: by the position of element to be adjusted in the mobile head portrait of the moving direction and moving distance of the amount of movement.
In the specific implementation process, a slide can be considered as the combination of multiple tiny slides, adjust treating
When element is adjusted, element to be adjusted can move in real time with terminal, and the effect of adjustment is more intuitive.
Step S207: when the offset reaches preset range, the head portrait be switched to the preset range it is corresponding to
Determine head portrait.
For it is different wait adjust element for, different modes of emplacement can generate different expression effects, can adjust at this time
Whole head portrait and current location matches obtain new image design effect.Such as eyeball often indicates sadness in eye socket lower part
Expression, the corners of the mouth is downward at this time;If eyeball moved up, the expression that do not consider worth doing is often indicated, the corners of the mouth is tilted to side at this time.
In two different eyeball positions, corresponding two different head portraits, being adjusted combination can be obtained design effect abundant.
In conclusion passing through the position for the beginning and end for obtaining slide;The terminal is calculated relative to starting point
Offset;According to the position of element to be adjusted in the mobile head portrait of the offset;The manipulation precision during head portrait adjustment is improved,
Reduce workload when image design.Meanwhile the processing mode zoomed in or out allows and just does the more arbitrarily variation of head portrait
Design effect more abundant can be generated.
The following are a kind of embodiment of the device of head portrait adjustment of this programme, the embodiment of the device of head portrait adjustment is based on head portrait
The embodiment of the method for adjustment realizes that the not most description in the embodiment of system please refers to the embodiment of method.
Referring to FIG. 6, it is a kind of the first implementation of the device of head portrait adjustment provided in the specific embodiment of the invention
The structural block diagram of example.As shown, the device, comprising:
Position acquisition unit 301, the position of the beginning and end for obtaining slide;
Offset computation unit 302, for calculating offset of the terminal relative to starting point;
Position adjustment unit 303, for the position according to element to be adjusted in the mobile head portrait of the offset.
In conclusion the collaborative work of above-mentioned each unit, the position of the beginning and end by obtaining slide;It calculates
Offset of the terminal relative to starting point;According to the position of element to be adjusted in the mobile head portrait of the offset;Improve head portrait
Manipulation precision during adjustment, reduces workload when image design.
Referring to FIG. 7, it is a kind of the second implementation of the device of head portrait adjustment provided in the specific embodiment of the invention
The structural block diagram of example.As shown, the device, comprising:
Position acquisition unit 310, the position of the beginning and end for obtaining slide;
Offset computation unit 320, for calculating offset of the terminal relative to starting point;
Position adjustment unit 330, for the position according to element to be adjusted in the mobile head portrait of the offset.
Wherein, further includes:
Range determination unit 340, for confirming the offset without departing from default mobile threshold value.
Wherein, the position adjustment unit 330, comprising:
Scalable module 331, for scaled according to the offset or amplification to obtain amount of movement;
Position adjusting type modules 332, for member to be adjusted in the moving direction and the mobile head portrait of moving distance by the amount of movement
The position of element.
Wherein, further includes:
Head portrait switch unit 350, for when the offset reaches preset range, the head portrait to be switched to the default model
Enclose corresponding head portrait undetermined.
Wherein, further includes:
Initialization unit 300, for initializing the head portrait and element to be adjusted.
In conclusion the collaborative work of above-mentioned each unit, the position of the beginning and end by obtaining slide;It calculates
Offset of the terminal relative to starting point;According to the position of element to be adjusted in the mobile head portrait of the offset;Improve head portrait
Manipulation precision during adjustment, reduces workload when image design.Meanwhile the processing mode zoomed in or out allows and just does
More arbitrarily, the variation of head portrait can also generate design effect more abundant.
The technical principle of the invention is described above in combination with a specific embodiment.These descriptions are intended merely to explain of the invention
Principle, and shall not be construed in any way as a limitation of the scope of protection of the invention.Based on the explanation herein, the technology of this field
Personnel can associate with other specific embodiments of the invention without creative labor, these modes are fallen within
Within protection scope of the present invention.
Claims (6)
1. a kind of method of head portrait adjustment characterized by comprising
Obtain the position of the beginning and end of slide;
Calculate offset of the terminal relative to starting point;
According to the position of element to be adjusted in the mobile head portrait of the offset;
When the offset reaches preset range, the head portrait is switched to the corresponding head portrait undetermined of the preset range;
The position according to element to be adjusted in the mobile head portrait of the offset, comprising:
, amplification scaled according to the offset constant obtains amount of movement;
By the position of element to be adjusted in the mobile head portrait of the moving direction and moving distance of the amount of movement.
2. the method according to claim 1, wherein described according to element to be adjusted in the mobile head portrait of the offset
Position before, further includes:
Confirm the offset without departing from default mobile threshold value.
3. the method according to claim 1, wherein it is described obtain slide beginning and end position it
Before, further includes:
Initialize the head portrait and element to be adjusted.
4. a kind of device of head portrait adjustment characterized by comprising
Position acquisition unit, the position of the beginning and end for obtaining slide;
Offset computation unit, for calculating offset of the terminal relative to starting point;
Position adjustment unit, for the position according to element to be adjusted in the mobile head portrait of the offset;
Head portrait switch unit, for when the offset reaches preset range, it is corresponding that the head portrait is switched to the preset range
Head portrait undetermined;
The position adjustment unit, comprising:
Scalable module for, amplification scaled according to the offset or constant obtains amount of movement;
Position adjusting type modules, the position for element to be adjusted in the moving direction and the mobile head portrait of moving distance by the amount of movement
It sets.
5. device according to claim 4, which is characterized in that further include:
Range determination unit, for confirming the offset without departing from default mobile threshold value.
6. device according to claim 4, which is characterized in that further include:
Initialization unit, for initializing the head portrait and element to be adjusted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510330191.2A CN104965654B (en) | 2015-06-15 | 2015-06-15 | Head portrait adjusting method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510330191.2A CN104965654B (en) | 2015-06-15 | 2015-06-15 | Head portrait adjusting method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104965654A CN104965654A (en) | 2015-10-07 |
CN104965654B true CN104965654B (en) | 2019-03-15 |
Family
ID=54219688
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510330191.2A Active CN104965654B (en) | 2015-06-15 | 2015-06-15 | Head portrait adjusting method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104965654B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107368296B (en) * | 2017-06-14 | 2020-09-04 | 广东小天才科技有限公司 | Sliding track-based picture adjusting method and electronic equipment |
CN113986105B (en) * | 2020-07-27 | 2024-05-31 | 北京达佳互联信息技术有限公司 | Face image deformation method and device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1955901A (en) * | 2005-10-26 | 2007-05-02 | 三星电子株式会社 | Apparatus and method of controlling three-dimensional motion of graphic object |
CN101866349A (en) * | 2009-04-20 | 2010-10-20 | 奥林巴斯映像株式会社 | Image collating device |
CN102681750A (en) * | 2011-03-14 | 2012-09-19 | 联想(北京)有限公司 | Method, display device and electronic device for movably displaying target |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6106973B2 (en) * | 2012-07-11 | 2017-04-05 | 富士ゼロックス株式会社 | Information processing apparatus and program |
CN103473804A (en) * | 2013-08-29 | 2013-12-25 | 小米科技有限责任公司 | Image processing method, device and terminal equipment |
-
2015
- 2015-06-15 CN CN201510330191.2A patent/CN104965654B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1955901A (en) * | 2005-10-26 | 2007-05-02 | 三星电子株式会社 | Apparatus and method of controlling three-dimensional motion of graphic object |
CN101866349A (en) * | 2009-04-20 | 2010-10-20 | 奥林巴斯映像株式会社 | Image collating device |
CN102681750A (en) * | 2011-03-14 | 2012-09-19 | 联想(北京)有限公司 | Method, display device and electronic device for movably displaying target |
Also Published As
Publication number | Publication date |
---|---|
CN104965654A (en) | 2015-10-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021092885A1 (en) | Method for controlling projection by projection module, device, and projection system | |
WO2015165181A1 (en) | Method and apparatus for controlling projection of wearable device, and wearable device | |
JP6330036B2 (en) | Image processing apparatus and image display apparatus | |
CN104954672B (en) | Manual focusing method of mobile terminal and mobile terminal | |
JP6486377B2 (en) | Video transmission | |
CN104618642A (en) | Photographing terminal and control method thereof | |
WO2015165209A1 (en) | Wearable projection device, and focusing method and projecting method therefor | |
CN105787884A (en) | Image processing method and electronic device | |
TW201500982A (en) | Computer system including mouse device with adjustable DPI based on screen size and operating method thereof | |
CN103327250A (en) | Method for controlling camera lens based on pattern recognition | |
EP3125092A3 (en) | Mobile terminal and method of controlling the same | |
US11695812B2 (en) | Sharing physical writing surfaces in videoconferencing | |
CN103686107A (en) | Processing method and device based on projected image | |
CN102270093A (en) | Video-image-resolution-based vision adaptive method | |
CN104965654B (en) | Head portrait adjusting method and system | |
CN104020925B (en) | Projecting method and device | |
TWI465984B (en) | Method and control apparatus for determining control output in control domain | |
CN104142730B (en) | A kind of method that gesture tracking result is mapped to mouse event | |
CN104793862B (en) | The scaling control method of wireless display photo | |
CN102707802A (en) | Method for controlling speed of mapping of gesture movement to interface | |
US9787891B2 (en) | Focus control apparatus and focus control method | |
US9392223B2 (en) | Method for controlling visual light source, terminal, and video conference system | |
CN105955688A (en) | Method and system for processing frame loss of PPT (power point) playing | |
CN107820087B (en) | Method for dynamically adjusting code rate according to mobile detection result | |
CN114845038A (en) | Shooting adjusting method and device of video shooting equipment and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |