CN105894446A - Automatic face outline modification method for video - Google Patents

Automatic face outline modification method for video Download PDF

Info

Publication number
CN105894446A
CN105894446A CN201610301351.5A CN201610301351A CN105894446A CN 105894446 A CN105894446 A CN 105894446A CN 201610301351 A CN201610301351 A CN 201610301351A CN 105894446 A CN105894446 A CN 105894446A
Authority
CN
China
Prior art keywords
triangle
video
face
point
affine transformation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610301351.5A
Other languages
Chinese (zh)
Inventor
王进军
袁望
侯骐麒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Hippo energy Sports Technology Co., Ltd.
Original Assignee
Xi'an Brision Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Brision Information Technology Co Ltd filed Critical Xi'an Brision Information Technology Co Ltd
Priority to CN201610301351.5A priority Critical patent/CN105894446A/en
Publication of CN105894446A publication Critical patent/CN105894446A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/02Affine transformations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Human Computer Interaction (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses an automatic face outline modification method for a video. The method comprises the following steps: 1) detecting a face frame in the whole video to be processed, and detecting a bounding box and feature points of the face; 2) dividing a face area of interest into multiple triangles according to the positions of the bounding box and the feature points, and calculating a target feature point of each feature point; 3) calculating an affine transform matrix of each triangle having coordinates of three original feature points and target feature points obtained from the three original feature points in step 2) according to the coordinates of the six feature points, and performing affine transform on each point in the triangle formed by the three original feature points according to the affine transform matrix to generate a new face image; and 4) replacing the old face image with the new face image, thereby generating a result video. The method can be used for processing the face in the video, thereby achieving the face-lifting effect on the face in the video, namely realizing nonlinear edition of video contents.

Description

A kind of automatic face profile method of modifying in video
Technical field:
The invention belongs to video, technical field of image processing, the automatic face wheel being specifically related in a kind of video Wide method of modifying.
Background technology:
Universal along with social networks and smart mobile phone, people increasingly get used to the life of videograph oneself Live, such as have a meal, travel or concert etc..People can first compare when social networks issues photo Sheet carries out landscaping treatment, and is impossible when people want the process being similar to video when.Existing Some video editing methods are all the linear editings to video, are difficult to meet popular requirement, thus propose one The non-linear editing method to video content of planting seems the most necessary.
Summary of the invention:
It is an object of the invention to overcome the deficiencies in the prior art, it is provided that the automatic face wheel in a kind of video Wide method of modifying, its face being able to ensure that in the video after processing by the method can have as U.S. figure software Thinning face effect, thus meet the popular process requirement that video is shot the video particularly certainly.
For reaching above-mentioned purpose, the present invention adopts the following technical scheme that and is achieved:
Automatic face profile method of modifying in a kind of video, comprises the following steps:
1) there is the frame of face in detecting whole pending video, detect bounding box and the feature of face Point;
2) according to bounding box and characteristic point position, human face region interested is divided into multiple triangle, And calculate the target characteristic point of each characteristic point;
3) to each triangle, there are the coordinate of three former characteristic points and the former characteristic point of these three in step 2) In the target characteristic point that obtains, calculate the affine transformation square of this triangle according to the coordinate of these six characteristic points Battle array, does affine transformation according to each point in the triangle that three former characteristic points are formed by affine transformation matrix, Produce the facial image made new advances;
4) replace old facial image with new facial image, i.e. generate result video.
The present invention is further improved by, step 1) in, the characteristic point of face refer to face profile, eyes, Characteristic point on nose and lip.
The present invention is further improved by, step 2) in, human face region interested is face profile peripheral region Territory.
The present invention is further improved by, step 3) in, characterize with R matrix and rotate and scaling, L matrix Characterize translation, to a triangle, have:
R = r 00 r 01 r 10 r 11
L = l 00 l 01
(x, y) is certain apex coordinate before affine transformation, after (x ', y ') is affine transformation on diabolo three summits The position of representative points, has:
x ′ y ′ = r 00 x + r 01 y + l 00 r 10 x + r 11 y + l 01
6 amounts characterizing affine transformation in this R matrix and L matrix are calculated by these three summit, according to The coordinate of these six characteristic points calculates the affine transformation matrix of this triangle.
The present invention is further improved by, step 3) in, every according in affine transformation matrix diabolo Before one point does affine transformation, first to a triangle ABC, utilize s=CB × AB and W=(MA × MB) & (MB × MC) & (MC × MA) judges that a some M is whether in triangle;
As s > 0 time, represent triangle ABC order be counterclockwise, at this moment w > 0 represent some M three In dihedral;As s, < when 0, representing that the order of triangle ABC is clockwise, at this moment w < 0 represents some M In triangle;
I.e. to arbitrary M point in triangle, diabolo ABC, have:
((MA × MB) & (MB × MC) & (MC × MA)) (CB × AB) > 0
These points are done affine by all of point in finding out triangle according to above-mentioned formula according to affine transformation matrix Conversion, the image after being converted, it is and produces the facial image made new advances.
Compared with prior art, the invention has the beneficial effects as follows: the face mask district of face in amendment frame of video Territory is by being only divided into little delta-shaped region by face mask region interested, then to each triangle Region carries out affine transformation and obtains new face image to modify the face in video.
Video editing of the present invention refers to editor rather than the row again of simple frame of video of the picture to video Row.
Wherein, existing video editing method, simply from one section of video, editing goes out a bit of or by several sections The frame of video rearranging method of one video of Video Composition.Editor described in the present invention refers to video pictures Editor, respond well, advantages.Further, traditional video editing method cannot meet popular right The requirement of video editing, this invention have employed the method for video content editing, it is ensured that video editing effective Property.
Accompanying drawing illustrates:
Fig. 1 is the explanation schematic diagram of the present invention.
Fig. 2 is for calculating target characteristic point process schematic diagram;Wherein, Fig. 2 (a) is face's central point and feature Point moving direction schematic diagram, Fig. 2 (b) is characterized the schematic diagram of D in displacement 4%*D.
Fig. 3 is for calculating radiation matrix process schematic;Wherein, Fig. 3 (a) is three before calculating affine transformation Angular domain, Fig. 3 (b) is the delta-shaped region after calculating affine transformation.
Fig. 4 is to judge a little the whether method schematic diagram in triangle;Wherein, Fig. 4 (a) is to work as triangle Whether summit order judges when be counterclockwise a little at the method schematic diagram of triangle interior, and Fig. 4 (b) is ought three Whether angled peak order judges when being clockwise a little at the method schematic diagram of triangle interior.
Fig. 5 is the flow chart of the present invention.
Detailed description of the invention:
The present invention is described in more detail with embodiment below in conjunction with the accompanying drawings.
Automatic face profile method of modifying in a kind of video of the present invention, is achieved by the steps of:
1. calculate target characteristic point
Seeing accompanying drawing 2, the effect of thinning face to be obtained, the characteristic point position of the labelling face mask after thinning face is inevitable Change.Before calculating these target characteristic point positions, first find face's central point.Face's central point On one line being scheduled on the point in the middle of two eyes and the point in the middle of face, we select the conduct of 4 points here Alternative, they distances to face centre and the distance to eye center are 10:0 than successively, 8:2,6:4 and x:y, Wherein last point is taken at the position of nose.Experiment display, selects second point as the result of central point The most natural.
The target characteristic point of face mask is on face's central point line with face mask point, simply length Being reduced to original 96%, the point obtained is exactly the position of target characteristic point.
2. calculate affine transformation matrix
See accompanying drawing 3, region interested around face mask is divided into multiple little delta-shaped region, for often One little delta-shaped region calculates affine transformation matrix.What affine transformation matrix represented is the connection between two width figures System, generally represents with the matrix of 2*3, refers to that a width figure obtains the second width by rotation, zooming and panning Figure.One arbitrary affine transformation can be expressed as being multiplied by a matrix and then add a vector, this Matrix can by the characteristic point on each three summit of delta-shaped region and corresponding target characteristic point 6 Know and a little try to achieve.
Characterizing with R matrix and rotate and scaling, L matrix characterizes translation, to a triangle, has:
R = r 00 r 01 r 10 r 11
L = l 00 l 01
(x, y) is certain apex coordinate before affine transformation, after (x ', y ') is affine transformation on diabolo three summits The position of representative points, has:
x &prime; y &prime; = r 00 x + r 01 y + l 00 r 10 x + r 11 y + l 01
These 6 amounts characterizing affine transformation can be calculated by such three opposite vertexes.
3. do a little affine transformation in pair each triangle
See accompanying drawing 4, to a triangle ABC, utilize s=CB × AB and W=(MA × MB) & (MB × MC) & (MC × MA) judges that a some M is whether in triangle.
As s > 0 time, represent triangle ABC order be counterclockwise, at this moment w > 0 represent some M three In dihedral;As s, < when 0, representing that the order of triangle ABC is clockwise, at this moment w < 0 represents some M In triangle.I.e. to arbitrary M point in triangle, diabolo ABC, have:
((MA × MB) & (MB × MC) & (MC × MA)) (CB × AB) > 0
To sum up, all of point in can finding out triangle, to these o'clocks according to the 2 affine transformation squares calculated Battle array does affine transformation, the image after i.e. can being converted, it is simply that the image after thinning face, like this single-frame images Interior implementation process, as it is shown in figure 1, replace original image with the image after thinning face again, has just obtained thin Video after face editor, to the specific implementation process of whole video as shown in Figure 5.

Claims (5)

1. the automatic face profile method of modifying in a video, it is characterised in that comprise the following steps:
1) there is the frame of face in detecting whole pending video, detect bounding box and the feature of face Point;
2) according to bounding box and characteristic point position, human face region interested is divided into multiple triangle, And calculate the target characteristic point of each characteristic point;
3) to each triangle, there are the coordinate of three former characteristic points and the former characteristic point of these three in step 2) In the target characteristic point that obtains, calculate the affine transformation square of this triangle according to the coordinate of these six characteristic points Battle array, does affine transformation according to each point in the triangle that three former characteristic points are formed by affine transformation matrix, Produce the facial image made new advances;
4) replace old facial image with new facial image, i.e. generate result video.
Automatic face profile method of modifying in a kind of video the most according to claim 1, its feature exists In, step 1) in, the characteristic point of face refers to the characteristic point on face profile, eyes, nose and lip.
Automatic face profile method of modifying in a kind of video the most according to claim 1, its feature exists In, step 2) in, human face region interested is face profile peripheral region.
Automatic face profile method of modifying in a kind of video the most according to claim 1, its feature exists In, step 3) in, characterizing with R matrix and rotate and scaling, L matrix characterizes translation, to a triangle, Have:
R = r 00 r 01 r 10 r 11
L = l 00 l 01
(x, y) is certain apex coordinate before affine transformation, after (x ', y ') is affine transformation on diabolo three summits The position of representative points, has:
x &prime; y &prime; = r 00 x + r 01 y + l 00 r 10 x + r 11 y + l 01
6 amounts characterizing affine transformation in this R matrix and L matrix are calculated by these three summit, according to The coordinate of these six characteristic points calculates the affine transformation matrix of this triangle.
Automatic face profile method of modifying in a kind of video the most according to claim 1, its feature exists In, step 3) in, before doing affine transformation according to each point in affine transformation matrix diabolo, first To a triangle ABC, s=CB × AB and w=(MA × MB) & (MB × MC) & (MC × MA) is utilized to judge a point Whether M is in triangle;
As s > 0 time, represent triangle ABC order be counterclockwise, at this moment w > 0 represent some M three In dihedral;As s, < when 0, representing that the order of triangle ABC is clockwise, at this moment w < 0 represents some M In triangle;
I.e. to arbitrary M point in triangle, diabolo ABC, have:
((MA × MB) & (MB × MC) & (MC × MA)) (CB × AB) > 0
These points are done affine by all of point in finding out triangle according to above-mentioned formula according to affine transformation matrix Conversion, the image after being converted, it is and produces the facial image made new advances.
CN201610301351.5A 2016-05-09 2016-05-09 Automatic face outline modification method for video Pending CN105894446A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610301351.5A CN105894446A (en) 2016-05-09 2016-05-09 Automatic face outline modification method for video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610301351.5A CN105894446A (en) 2016-05-09 2016-05-09 Automatic face outline modification method for video

Publications (1)

Publication Number Publication Date
CN105894446A true CN105894446A (en) 2016-08-24

Family

ID=56702391

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610301351.5A Pending CN105894446A (en) 2016-05-09 2016-05-09 Automatic face outline modification method for video

Country Status (1)

Country Link
CN (1) CN105894446A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106952221A (en) * 2017-03-15 2017-07-14 中山大学 A kind of three-dimensional automatic Beijing Opera facial mask making-up method
CN107657590A (en) * 2017-09-01 2018-02-02 北京小米移动软件有限公司 Image processing method and device
CN109359618A (en) * 2018-10-30 2019-02-19 北京市商汤科技开发有限公司 A kind of image processing method and its device, equipment and storage medium
CN109410138A (en) * 2018-10-16 2019-03-01 北京旷视科技有限公司 Modify jowled methods, devices and systems
CN109472753A (en) * 2018-10-30 2019-03-15 北京市商汤科技开发有限公司 A kind of image processing method, device, computer equipment and computer storage medium
CN110555796A (en) * 2019-07-24 2019-12-10 广州视源电子科技股份有限公司 image adjusting method, device, storage medium and equipment
CN110555812A (en) * 2019-07-24 2019-12-10 广州视源电子科技股份有限公司 image adjusting method and device and computer equipment
CN110992407A (en) * 2019-11-07 2020-04-10 武汉多谱多勒科技有限公司 Infrared and visible light image matching method
CN112257594A (en) * 2020-10-22 2021-01-22 广州繁星互娱信息科技有限公司 Multimedia data display method and device, computer equipment and storage medium
CN118447428A (en) * 2024-03-26 2024-08-06 首都体育学院 Video processing method, device, electronic equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163330A (en) * 2011-04-02 2011-08-24 西安电子科技大学 Multi-view face synthesis method based on tensor resolution and Delaunay triangulation
CN102999929A (en) * 2012-11-08 2013-03-27 大连理工大学 Triangular gridding based human image face-lift processing method
CN103337085A (en) * 2013-06-17 2013-10-02 大连理工大学 Efficient portrait face distortion method
CN105184735A (en) * 2014-06-19 2015-12-23 腾讯科技(深圳)有限公司 Portrait deformation method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163330A (en) * 2011-04-02 2011-08-24 西安电子科技大学 Multi-view face synthesis method based on tensor resolution and Delaunay triangulation
CN102999929A (en) * 2012-11-08 2013-03-27 大连理工大学 Triangular gridding based human image face-lift processing method
CN103337085A (en) * 2013-06-17 2013-10-02 大连理工大学 Efficient portrait face distortion method
CN105184735A (en) * 2014-06-19 2015-12-23 腾讯科技(深圳)有限公司 Portrait deformation method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
廖文鑫: "基于数据驱动的人脸美化技术及应用开发", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106952221A (en) * 2017-03-15 2017-07-14 中山大学 A kind of three-dimensional automatic Beijing Opera facial mask making-up method
CN106952221B (en) * 2017-03-15 2019-12-31 中山大学 Three-dimensional Beijing opera facial makeup automatic making-up method
CN107657590A (en) * 2017-09-01 2018-02-02 北京小米移动软件有限公司 Image processing method and device
CN107657590B (en) * 2017-09-01 2021-01-15 北京小米移动软件有限公司 Picture processing method and device and storage medium
CN109410138A (en) * 2018-10-16 2019-03-01 北京旷视科技有限公司 Modify jowled methods, devices and systems
CN109410138B (en) * 2018-10-16 2021-10-01 北京旷视科技有限公司 Method, device and system for modifying double chin
CN109359618A (en) * 2018-10-30 2019-02-19 北京市商汤科技开发有限公司 A kind of image processing method and its device, equipment and storage medium
CN109472753A (en) * 2018-10-30 2019-03-15 北京市商汤科技开发有限公司 A kind of image processing method, device, computer equipment and computer storage medium
CN109359618B (en) * 2018-10-30 2022-02-22 北京市商汤科技开发有限公司 Image processing method and device, equipment and storage medium thereof
JP2021529605A (en) * 2018-10-30 2021-11-04 ベイジン センスタイム テクノロジー デベロップメント カンパニー, リミテッド Image processing methods and devices, computer devices and computer storage media
CN110555796B (en) * 2019-07-24 2021-07-06 广州视源电子科技股份有限公司 Image adjusting method, device, storage medium and equipment
WO2021012599A1 (en) * 2019-07-24 2021-01-28 广州视源电子科技股份有限公司 Image adjustment method, apparatus, and computer device
CN110555812A (en) * 2019-07-24 2019-12-10 广州视源电子科技股份有限公司 image adjusting method and device and computer equipment
CN110555796A (en) * 2019-07-24 2019-12-10 广州视源电子科技股份有限公司 image adjusting method, device, storage medium and equipment
CN110992407A (en) * 2019-11-07 2020-04-10 武汉多谱多勒科技有限公司 Infrared and visible light image matching method
CN110992407B (en) * 2019-11-07 2023-10-27 武汉多谱多勒科技有限公司 Infrared and visible light image matching method
CN112257594A (en) * 2020-10-22 2021-01-22 广州繁星互娱信息科技有限公司 Multimedia data display method and device, computer equipment and storage medium
CN118447428A (en) * 2024-03-26 2024-08-06 首都体育学院 Video processing method, device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN105894446A (en) Automatic face outline modification method for video
CN103974126B (en) A kind of method and device of product placement in video
CN106023063A (en) Video transplantation face changing method
CN101866497A (en) Binocular stereo vision based intelligent three-dimensional human face rebuilding method and system
CN106952221B (en) Three-dimensional Beijing opera facial makeup automatic making-up method
US8494254B2 (en) Methods and apparatus for image rectification for stereo display
US8743119B2 (en) Model-based face image super-resolution
CN101726855A (en) Correction method of fisheye image distortion on basis of cubic projection
TWI683569B (en) Panorama video compression method and device
CN105678687A (en) Stereo image stitching method based on content of images
CN110264396B (en) Video face replacement method, system and computer readable storage medium
CN103927727A (en) Method for converting scalar image into vector image
US10269155B1 (en) Image artifact masking
CN104200468B (en) Method for obtaining correction parameter of spherical perspective projection model
CN102236785A (en) Method for pedestrian matching between viewpoints of non-overlapped cameras
CN104822030A (en) Irregular video rectangularization correction method based on image deformation
Huang et al. Robust simultaneous localization and mapping in low‐light environment
Liang et al. Multi-scale and multi-patch transformer for sandstorm image enhancement
CN114757834A (en) Panoramic image processing method and panoramic image processing device
Zheng et al. Study on image retrieval based on image texture and color statistical projection
CN103970432B (en) A kind of method and apparatus of simulating real page turning effect
CN111652807B (en) Eye adjusting and live broadcasting method and device, electronic equipment and storage medium
Yoon et al. Shadow detection and removal from photo-realistic synthetic urban image using deep learning
CN108055500B (en) Continuous display method for two panoramic display areas in infrared panoramic monitoring
CN107833198A (en) A kind of Outdoor Scene weight illumination method decomposed based on large scale

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20180112

Address after: 100022 building 3, building 88, building 7-10, Jianguo Road, Beijing, Chaoyang District, 305

Applicant after: Beijing Hippo energy Sports Technology Co., Ltd.

Address before: 710075 Shaanxi city of Xi'an province high tech Zone Feng Hui Road No. 18 sigma building room 10201-224-26

Applicant before: Xi'an Brision Information Technology Co., Ltd.

TA01 Transfer of patent application right
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160824

WD01 Invention patent application deemed withdrawn after publication