KR101701199B1 - System and method for virtual cosmetic surgery by using mesh warping - Google Patents

System and method for virtual cosmetic surgery by using mesh warping Download PDF

Info

Publication number
KR101701199B1
KR101701199B1 KR1020150074941A KR20150074941A KR101701199B1 KR 101701199 B1 KR101701199 B1 KR 101701199B1 KR 1020150074941 A KR1020150074941 A KR 1020150074941A KR 20150074941 A KR20150074941 A KR 20150074941A KR 101701199 B1 KR101701199 B1 KR 101701199B1
Authority
KR
South Korea
Prior art keywords
image
nose
mouth
jaw
mesh
Prior art date
Application number
KR1020150074941A
Other languages
Korean (ko)
Other versions
KR20160139657A (en
Inventor
양영주
Original Assignee
주식회사 위즈인앱
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 주식회사 위즈인앱 filed Critical 주식회사 위즈인앱
Priority to KR1020150074941A priority Critical patent/KR101701199B1/en
Priority to CN201610184654.3A priority patent/CN106204417A/en
Publication of KR20160139657A publication Critical patent/KR20160139657A/en
Application granted granted Critical
Publication of KR101701199B1 publication Critical patent/KR101701199B1/en

Links

Images

Classifications

    • G06T3/04
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/403D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Abstract

본 발명은 가상 성형수술의 방법 및 시스템에 관한 것으로서, 메시 워핑을 이용하여 이미지를 변형시켜 사용자가 원하는 부위를 자유롭게 성형할 수 있는 가상 성형수술의 방법 및 시스템에 관한 것이다.The present invention relates to a method and system for virtual cosmetic surgery, and more particularly, to a method and system for virtual cosmetic surgery that allows a user to freely shape a desired portion by deforming an image using mesh warping.

Description

메시 워핑을 이용한 가상 성형수술의 방법 및 시스템{SYSTEM AND METHOD FOR VIRTUAL COSMETIC SURGERY BY USING MESH WARPING}TECHNICAL FIELD [0001] The present invention relates to a method and system for virtual cosmetic surgery using mesh warping,

본 발명은 가상 성형수술의 방법 및 시스템에 관한 것으로서, 메시 워핑을 이용하여 이미지를 변형시켜 사용자가 원하는 부위를 자유롭게 성형할 수 있는 가상 성형수술의 방법 및 시스템에 관한 것이다.
The present invention relates to a method and system for virtual cosmetic surgery, and more particularly, to a method and system for virtual cosmetic surgery that allows a user to freely shape a desired portion by deforming an image using mesh warping.

오늘날 성형 수술은 콤플렉스 극복과 자신감 회복, 더 나아가 대인관계 및 사회성에 영향을 미칠 정도의 중요한 위치에 자리 잡게 되었는데, 성형은 절개 삽입 주입 등과 같은 다양한 시술방법이 존재하지만, 수술을 해야 한다는 문제점과 시술자가 환자의 원하는 수술의 요점을 파악하지 못해 성형에 실패할 수 있다는 문제점이 있고, 성형외과를 방문하여 상담을 하기 전에는 성형의 가능한 정도를 파악하지 못하는 사람 또는 자신이 원하는 성형 얼굴을 파악하지 못하고 있는 사람이 있어 성형외과 방문을 꺼려하는 문제점이 있다.Today, cosmetic surgery has become an important place to overcome complexity, recovery of self-confidence, and furthermore, to influence interpersonal and sociability. There are various procedures such as incision insertion, Is not able to grasp the point of the desired operation of the patient and can not be formed. There is a problem that a person who can not grasp the possible degree of molding before consulting a plastic surgeon and can not grasp the desired facial face There is a problem that people are reluctant to visit plastic surgery.

위와 같은 문제점을 해결하기 위해 스마트폰과 같은 단말기를 이용하여 가상으로 사용자가 원하는 형태로 가상의 성형수술을 시행하는 어플리케이션과 같은 프로그램이 개발되어왔다.In order to solve the above problems, a program such as an application for practicing a virtual cosmetic surgery in a form that a user has imagined using a terminal such as a smart phone has been developed.

대한민국 등록특허 제10-0764130호(선행문헌1)는 미리 사용자가 원하는 성형 스타일의 성형 필터를 제작하여 성형하는 특징을 가진다.Korean Patent No. 10-0764130 (prior art document 1) has a feature that a molding filter of a molding style desired by a user is manufactured in advance and molded.

하지만, 선행문헌1의 기술은 가상 성형 시 이미지의 일그러짐으로 인해 이질감을 느낄 수 있고, 성형 후 출력된 결과물에 대한 미(美)를 비교할 수 없다.
However, the technique of the prior art document 1 can feel the heterogeneity due to the distortion of the image during the virtual molding, and can not compare the beauty of the output after the molding.

선행문헌1: 대한민국 등록특허 제10-0764130호
Prior Art 1: Korean Patent No. 10-0764130

본 발명은 위와 같은 문제점을 해결하기 위해, 얼굴 이미지에서 자동으로 턱, 눈, 코 및 입의 윤곽선을 추출할 수 있는 가상성형 방법 및 시스템을 제공하기 위한 것이다.In order to solve the above problems, the present invention is to provide a virtual molding method and system capable of automatically extracting contours of jaws, eyes, nose, and mouth from a facial image.

또한, 본 발명은 위와 같은 문제점을 해결하기 위해, 메시 워핑을 이용하여 이미지를 변형시켰을 때 이질감을 느끼지 않는 출력물을 얻는 가성성형 방법 및 시스템을 제공하기 위한 것이다.Another object of the present invention is to provide a tentative molding method and system for obtaining an output product that does not feel a sense of heterogeneity when an image is deformed using mesh warping.

한편, 본 발명은 위와 같은 문제점을 해결하기 위해, 성형한 이미지를 미리 저장된 미인형 얼굴과 비교할 수 있는 가상성형 방법 및 시스템을 제공하기 위한 것이다.It is another object of the present invention to provide a virtual molding method and system capable of comparing a molded image with a previously stored beautiful face in order to solve the above problems.

더 나아가, 본 발명은 위와 같은 문제점을 해결하기 위해, 평면 이미지를 입체적으로 표현할 수 있는 가상성형 방법 및 시스템을 제공하기 위한 것이다.
The present invention further provides a virtual molding method and system capable of stereoscopically representing a planar image in order to solve the above problems.

상기 목적을 달성하기 위하여, 본 발명은 얼굴 촬영된 이미지에서 눈, 코, 입 및 턱의 윤곽선상에 위치하는 윤곽 좌표를 생성하는 단계, 상기 이미지에 상기 윤곽 좌표를 포함하고, 소정 간격 이격되어 배열되는 복수의 메시 포인트를 생성하는 단계, 상기 메시 포인트를 이용하여 메시 그룹을 생성하는 단계, 상기 메시 그룹에 메시 워핑을 이용하여 상기 이미지를 성형 하는 단계 및 상기 성형된 이미지를 출력하는 단계를 포함하는 가상 성형수술 방법을 제공 한다.
In order to attain the above object, the present invention provides a method for generating an image, comprising the steps of: generating outline coordinates located on an outline of an eye, nose, mouth, and jaw in a face photographed image; Creating a mesh group using the mesh point, shaping the image using mesh warping to the mesh group, and outputting the molded image. ≪ RTI ID = 0.0 > Provides a virtual cosmetic surgery method.

본 발명에 따르면, 얼굴 이미지에서 눈, 코, 입 및 턱의 윤곽선을 자동으로 추출하기 때문에 사용자가 수월하고 신속하게 가상성형을 할 수 있다.According to the present invention, since the outline of the eyes, nose, mouth and jaw is automatically extracted from the face image, the user can perform virtual molding easily and quickly.

또한, 본 발명에 따르면, 얼굴 이미지에서 눈, 코, 입 및 턱의 좌표 및 윤곽선을 미세조정하는 단계를 더 포함하기 때문에 보다 세밀하게 성형할 수 있다.Further, according to the present invention, it is possible to form more finely since it further includes fine adjustment of the coordinates and contour of the eyes, nose, mouth and jaw in the face image.

한편, 본 발명에 따르면, 얼굴 이미지에서 눈, 코, 입 및 턱의 좌표 및 윤곽선을 미세조정하는 단계를 더 포함하기 때문에 선명하지 못한 얼굴 이미지에서 추출한 좌표 및 윤곽선을 재조정할 수 있어 어떠한 이미지도 가상 성형을 할 수 있는 특징이 있다.According to the present invention, there is further included a step of finely adjusting coordinates and contours of the eyes, nose, mouth, and jaw in the face image, so that coordinates and contours extracted from the unclear face image can be readjusted, There is a characteristic that molding can be performed.

더 나아가, 본 발명에 따르면, 3 개의 메시 포인트로 이루어진 메시들의 집합으로 메시 워핑을 하기 때문에 보다 부드러운 이미지가 출력되고, 보다 미세한 성형을 할 수 있다는 특징이 있다.Furthermore, according to the present invention, since mesh warping is performed with a set of meshes of three mesh points, a smoother image is output and finer shaping can be performed.

더 나아가, 본 발명에 따르면 미인의 비율과 대조하며 성형하거나, 출력물을 미인의 비율과 대조할 수 있어 보다 수월하게 성형을 가이드할 수 있어 편리하다는 특징이 있다.Furthermore, according to the present invention, the molding can be easily guided because it can be matched with the ratio of the beautiful person, or the output can be compared with the ratio of the beautiful person.

더 나아가, 본 발명에 따르면 2D이미지를 3D화하여 입체로 출력할 수 있기 때문에 보다 세밀한 수정 및 결과를 확인할 수 있다.
Further, according to the present invention, a 2D image can be converted into a 3D image and outputted in a solid form, so that more detailed modifications and results can be confirmed.

도 1은 본 발명의 일 실시예에 따른 메시 워핑을 이용한 가상 성형수술의 시스템을 나타낸 구성도이다.
도 2는 본 발명의 일 실시예에 따른 메시 워핑을 이용한 가상 성형수술의 방법을 나타낸 블럭도이다.
도 3은 본 발명의 일 실시예에 따른 메시 워핑을 이용한 가상 성형수술의 방법의 윤곽 좌표를 생성하는 순서를 나타낸 블럭도이다.
도 4 내지 도 15는 본 발명의 일 실시예에 따른 메시 워핑을 이용한 가상 성형 수술 방법을 각 단계별로 나타낸 도면이다.
1 is a block diagram illustrating a virtual cosmetic surgery system using mesh warping according to an embodiment of the present invention.
2 is a block diagram illustrating a method of virtual cosmetic surgery using mesh warping according to an embodiment of the present invention.
3 is a block diagram illustrating a procedure for generating outline coordinates of a method of virtual cosmetic surgery using mesh warping according to an embodiment of the present invention.
FIGS. 4 to 15 are views showing steps of a virtual cosmetic surgery method using mesh warping according to an embodiment of the present invention.

이하, 첨부된 도면을 참조하여 본 발명에 따른 실시예를 상세히 설명한다. 이 과정에서 도면에 도시된 구성요소의 크기나 형상 등은 설명의 명료성과 편의상 과장되게 도시될 수 있다. 또한, 본 발명의 구성 및 작용을 고려하여 특별히 정의된 용어들은 사용자, 운용자의 의도 또는 관례에 따라 달라질 수 있다. 이러한 용어들에 대한 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 한다. 그리고 본 발명의 사상은 제시되는 실시예에 제한되지 아니하고 본 발명의 사상을 이해하는 당업자는 동일한 사상의 범위 내에서 다른 실시예를 용이하게 실시할 수 있을 것이나, 이 또한 본 발명의 범위 내에 속함은 물론이다.
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. The sizes and shapes of the components shown in the drawings may be exaggerated for clarity and convenience. In addition, terms defined in consideration of the configuration and operation of the present invention may be changed according to the intention or custom of the user, the operator. Definitions of these terms should be based on the content of this specification. It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the inventions. Of course.

도 2 및 도 3을 참고하면, 본 발명의 일 실시예에 따른 메시 워핑을 이용한 가상 성형수술의 방법 및 시스템은 크게, 얼굴 이미지에서 얼굴의 각 구성요소인 눈, 코, 입 및 턱의 윤곽을 추출하여 윤곽 좌표를 생성하는 단계(S100)와 윤곽 좌표를 이용하여 얼굴 이미지 상에 윤곽 좌표를 포함하고, 격자 형상으로 소정간격 이격되어 나열되는 메시 포인트를 생성하는 단계(110), 메시 포인트를 이용하여 메시 그룹을 생성하는 단계(S120), 메시 포인트를 이동시켜 이미지와 함께 왜곡시킴으로써 이미지를 변형시키는 메시 워핑 하는 단계(130) 및 변형된 이미지를 출력하는 단계로 이루어진다.Referring to FIGS. 2 and 3, the method and system for virtual cosmetic surgery using mesh warping according to an embodiment of the present invention roughly includes the steps of extracting the contours of the eyes, nose, mouth, and jaw, (S100) of generating outline coordinates by using the outline coordinates, generating (110) a mesh point including outline coordinates on the face image by using the outline coordinates and arranging them at a predetermined interval in a lattice shape, (S120) generating a mesh group, a mesh warping step (130) of deforming the image by moving the mesh point and distorting it with the image, and outputting the deformed image.

또한, 얼굴 이미지에서 눈, 코, 입 및 턱의 윤곽 좌표를 생성하는 단계(S100)는 이미지에서 페이스 디텍터(Face Detector)연산자를 이용하여 동공의 기준좌표를 추출하는 단계(S200), 추출된 동공의 기준좌표를 이용하여 코, 입 및 턱의 기준좌표를 추출하는 단계(S210), 추출된 동공, 코, 입 및 턱의 기준좌표를 기반으로 눈, 코, 입 및 턱의 윤곽선을 생성하는 단계(S230) 및 생성된 눈, 코, 입 및 턱의 윤곽선을 이용하여 윤곽선 상에 위치하는 적어도 하나 이상의 윤곽 좌표를 생성하는 단계(S240)를 포함할 수 있다. 이때, 보다 정확한 성형을 위해 각 단계에서 사용자가 직접 눈, 코, 입 및 턱의 위치가 실제 얼굴 이미지의 눈, 코, 입 및 턱의 위치와 일치하도록 미세 조정하는 단계(S220, S250)를 더 포함할 수 있다. 상세하게, 눈, 코, 입 및 턱의 기준좌표를 추출하는 단계(S210) 이후, 동공, 코, 입 및 턱의 기준좌표를 미세 조정하여 실제 이미지의 눈, 코, 입 및 턱의 위치와 일치하도록 미세 조정하는 단계(S220)를 더 포함할 수 있고, 눈, 코, 입 및 턱의 윤곽 좌표를 추출하는 단계(S240) 이후, 눈, 코, 입 및 턱의 윤곽 좌표가 얼굴 이미지의 실제 눈, 코, 입 및 턱의 위치에 오도록 미세 조정하는 단계(S250)를 더 포함할 수 있다.In addition, the step S100 of generating the outline coordinates of the eyes, nose, mouth, and jaw in the face image may include extracting reference coordinates of the pupil using a face detector operator in the image (S200) (S210) of extracting reference coordinates of the nose, mouth, and jaw using the reference coordinates of the eye, nose, mouth, and jaw based on the reference coordinates of the extracted pupil, nose, (S230), and generating (S240) at least one outline coordinate located on the contour using the outlines of the generated eyes, nose, mouth, and jaw. At this time, steps (S220, S250) for finely adjusting the positions of the eyes, nose, mouth and jaw such that the positions of the eyes, nose, mouth and jaw of the actual face image coincide with the positions of the eyes, nose, . In detail, the reference coordinates of the pupil, nose, mouth, and jaw are finely adjusted after extracting reference coordinates of the eyes, nose, mouth, and jaw (S210) (S240) after extracting the outline coordinates of the eyes, nose, mouth, and jaw, and the outline coordinates of the eyes, nose, mouth, , The nose, the mouth, and the jaw (step S250).

한편, 메시 포인트를 이용하여 메시 그룹을 생성하는 단계는 메시 포인트를 3개 연결하여 삼각형의 메시를 생성하고, 삼각형의 메시로 이루어진 메시 그룹을 생성하는 단계를 포함할 수 있다.On the other hand, creating a mesh group using a mesh point may include connecting three mesh points to create a triangular mesh, and creating a mesh group of triangular meshes.

그 다음, 메시 그룹에 메시 워핑을 이용하여 이미지를 성형하는 단계는 윤곽 좌표를 이동시켜 이동된 윤곽 좌표와 얼굴 이미지가 함께 이동됨으로써 이미지 왜곡되는 메시 워핑을 이용한다.The step of shaping the image using mesh warping to the mesh group then uses the mesh warping, in which the outline coordinates are shifted and the outline coordinates moved and the face image are moved together to distort the image.

또한, 메시 그룹에 메시 워핑을 이용하여 이미지를 성형하는 단계(S130)와 성형된 이미지를 출력하는 단계는 이미지의 눈, 코, 입 및 턱의 비율이 미인형 얼굴에서 추출된 황금 비율과 비교하여 보다 효과적인 가상 성형을 할 수 있도록 하는 단계(S150)를 포함할 수 있다.In addition, the step of forming an image using mesh warping on the mesh group (S130) and the step of outputting the formed image may be performed by comparing the ratio of the eyes, nose, mouth, and jaw of the image to the golden ratio extracted from the face (Step S150) so as to perform effective virtual molding.

한편, 메시 그룹에 메시 워핑을 이용하여 출력하는 단계는, 2D의 성형된 이미지를 3D화 하여 소정각도 회전 가능하도록 출력하는 입체 출력 단계(S170)를 포함할 수 있다.
The step of outputting the mesh group to the mesh group using the mesh warping may include a stereoscopic output step (S170) of converting the 2D formed image into a 3D image and outputting the 3D image so as to be rotatable by a predetermined angle.

도 1을 참고하면, 본 발명의 단말기(10)는 프로세서(11), 저장부(12), 출력부(13) 및 입력부(14)를 포함하고, 프로세서(11)는 각 단계를 실행하는 연산장치를 의미하며, 출력부(13) 및 입력부(14)는 각각 구비될 수 있으나, 스마트 단말기와 같이 터치스크린으로 구비될 수 있다.1, the terminal 10 of the present invention includes a processor 11, a storage unit 12, an output unit 13, and an input unit 14, and the processor 11 executes an operation Device, and the output unit 13 and the input unit 14 may be respectively provided, but they may be equipped with a touch screen like a smart terminal.

프로세서(11)는 얼굴 이미지에서 눈, 코, 입 및 턱의 윤곽선상에 위치하는 적어도 하나 이상의 윤곽 좌표를 생성하고, 얼굴 이미지에 윤곽 좌표를 포함하고, 소정간격 이격되어 배열되는 메시 포인트를 생성하며, 메시 포인트를 이용하여 메시 그룹을 생성하고, 메시 포인트에 메시 워핑을 이용하여 얼굴 이미지를 변형 시키고, 변형된 이미지를 출력부에 출력한다.The processor 11 generates at least one or more contour coordinates located on the contour lines of the eyes, nose, mouth, and jaw in the face image, includes contour coordinates in the face image, generates mesh points arranged at predetermined intervals , Generates a mesh group using the mesh point, modifies the face image using mesh warping on the mesh point, and outputs the deformed image to the output unit.

일 예로, 본 발명에 적용되는 프로세서(11)는 CPU, AP 및 GPU 등의 처리 장치일 수 있다.For example, the processor 11 according to the present invention may be a processing device such as a CPU, an AP, and a GPU.

출력부(13)는 프로세서(11)에서 출력한 이미지를 표시한다.The output unit 13 displays the image output from the processor 11. [

입력부(14)는 미세 조정값을 입력받는 수단으로서, 프로세서(11)는 입력받은 미세 조정 값을 기초로 미세 조정을 수행한다.The input unit 14 is means for receiving a fine adjustment value, and the processor 11 performs fine adjustment based on the input fine adjustment value.

저장부(12)는 각 단계를 실시하기 위해 필요한 정보가 저장되는데, 일례로, 추출된 동공의 기준좌표를 기반으로 코, 입 및 턱의 기준좌표를 생성하는 단계(S210)에서 사용되는 일반적인 사람의 동공, 코, 입 및 턱의 위치비율, 추출된 동공, 코, 입 및 턱의 기준좌표를 기반으로 눈, 코, 입 및 턱의 윤곽선을 생성하는 단계(S230)에서 사용되는 일반적인 사람의 동공, 코, 입 및 턱의 크기비율, 메시 그룹에 메시 워핑을 이용하여 이미지를 성형하는 단계(S130)와 성형된 이미지를 출력하는 단계 중 미(美)인형 얼굴의 눈, 코, 입 및 턱의 상대적 비율, 각도 및 좌표 및 성형된 이미지를 입체적으로 출력하는 입체출력 단계(S150)에서 사용되는 메시 포인트의 상하좌우의 각 방향에 대응하는 고유한 이동 가중치가 저장된다.The storage unit 12 stores information necessary for carrying out the respective steps. For example, the storage unit 12 may store the coordinates of the pupil, the mouth, and the jaw based on the reference coordinates of the extracted pupil. The pupil, the nose, the mouth, and the jaw of the pupil, the nose, the mouth, and the jaw, the reference pupil, the nose, the mouth, and the jaw, (S130) of shaping an image using mesh warping on the mesh group, and outputting the molded image. In the step of outputting the molded image, the eye, nose, mouth, and jaw of the face A unique moving weight corresponding to each direction of the mesh point, which is used in the stereoscopic output step (S150) for outputting the relative ratio, angle and coordinates and the formed image in three dimensions, is stored.

이때, 일반적인 사람의 위치비율, 크기비율, 미인형 얼굴의 상대적 비율, 각도 및 좌표 및 이동 가중치에 대한 정보는 단말기의 저장부에 미리 저장되어 사용되는 것을 일례를 들어 설명하지만, 반드시 단말기의 저장부에 저장되는 것에 한정하는 것은 아니며, 단말기에 통신부(15)가 더 구비되어 외부의 서버와 유/무선 통신을 통해 서버에 저장된 정보를 수집하여 각 단계를 진행할 수 있고, 이 또한 본 발명에 속함은 물론이다. 따라서, 통신부(15)는 서버에 미리 저장된 얼굴 이미지, 일반적인 동공, 코, 입 및 턱의 위치비율, 크기비율 및 미인형 얼굴의 눈, 코, 입 및 턱의 상대적 비율, 각도 및 좌표를 저장부(12)에 저장한다. 이하, 각 구성 및 단계별로 상세하게 설명하도록 한다.
At this time, the information about the position ratio, the size ratio, the relative ratio of the face of the general person, the angle and the coordinates, and the moving weight are stored in the storage unit of the terminal in advance, The terminal may be provided with a communication unit 15 so as to collect information stored in the server through wired / wireless communication with an external server and proceed with each step. Of course, to be. Accordingly, the communication unit 15 stores the ratio, angle, and coordinates of the face image, the pupil, the nose, the mouth, and the jaw position ratio, the size ratio, and the eye, nose, 12). Hereinafter, each configuration and step will be described in detail.

본 발명의 일 실시예에 따른 메시 워핑을 이용한 가상 성형수술의 방법은 먼저, 얼굴이 촬영된 이미지에서 눈, 코, 입 및 턱의 윤곽선상에 위치하는 윤곽 좌표를 생성하는 단계를 가진다. 이미지에서 눈, 코, 입 및 턱의 윤곽선상에 위치하는 윤곽 좌표를 생성하는 단계의 상세한 과정은 다음과 같다.A method of virtual cosmetic surgery using mesh warping according to an embodiment of the present invention includes a step of generating outline coordinates positioned on an outline of an eye, a nose, an mouth, and a jaw in an image in which a face is photographed. The detailed process of creating the outline coordinates located on the outline of the eyes, nose, mouth and jaw in the image is as follows.

먼저, 얼굴이 촬영된 이미지에서 동공의 기준좌표를 생성(S200)하는 단계, 생성된 동공의 기준좌표를 기반으로, 코, 입 및 턱의 기준좌표를 생성하는 단계(S210), 생성된 동공, 코, 입 및 턱의 기준좌표를 기반으로 눈, 코, 입 및 턱의 윤곽선을 생성하는 단계(S230) 및 눈, 코, 입 및 턱의 윤곽선 상에 위치하는 적어도 하나 이상의 윤곽 좌표(S240)를 생성하는 단계를 가진다. 각 단계별로 도면을 참고하여 상세하게 설명하자면 다음과 같다.
First, a reference coordinate of a pupil is generated (S200) in an image of a face, a reference coordinate of a nose, a mouth, and a jaw is generated (S210) based on the reference coordinates of the generated pupil (S210) (S230) of creating an outline of the eyes, nose, mouth and jaw based on the reference coordinates of the nose, mouth, and jaw, and at least one outline coordinate S240 located on the outline of the eyes, nose, . Each step will be described in detail with reference to the drawings.

도 5를 참고하면, 눈, 코, 입 및 턱의 윤곽 좌표를 생성하는 단계(S100)에 있어서, 먼저, 얼굴 이미지에서 동공의 기준좌표를 생성하는 단계(S200)를 가지는데, 상세하게는, 얼굴 이미지에서 페이스 디텍터(Face Detector)연산자를 이용하여 동공의 좌표를 추출하고, 추출된 동공의 좌표에 눈의 기준좌표를 생성하는데, 여기서 기준좌표란, 이후 단계에서 생성되는 윤곽선의 기준이 되는 위치좌표가 입력된 좌표를 뜻하는데, 구체적인 설명은 이후 단계에서 설명하기로 한다. 한편, 페이스 디텍터는 API(Application Programming interface)로서, API는 운영체에 및 응용프로그램 사이의 통신에 사용되는 언어나 메시지를 뜻한다. 상세하게, 페이스 디텍터는 구글(google)사에서 제공하는 안드로이드 플렛폼의 API에 내장된 클래스(class)로서, 이미지에서 동공을 인식하고 추출하는 기능을 갖는다. 페이스 디텍터 API의 소스코드의 일 예는 다음 표 1과 같다.
5, in step S100 of generating outline coordinates of eyes, nose, mouth, and jaw, a step S200 of creating reference coordinates of a pupil in a face image is firstly described. Specifically, In the face image, the coordinates of the pupil are extracted using a face detector operator, and reference coordinates of the eye are generated in the coordinates of the extracted pupil. Here, the reference coordinates are coordinates of a position The coordinates are input coordinates, and a detailed description will be described later. On the other hand, the Face Detector is an API (Application Programming Interface), and API is a language or a message used for communication between an operating system and an application program. In detail, Face Detector is a class embedded in API of Android platform provided by google, and has a function of recognizing and extracting a pupil from an image. An example of the source code of the Face Detector API is shown in Table 1 below.

Figure 112015051445346-pat00001
Figure 112015051445346-pat00001

여기서 private EyePose findEyeMidPoint(Bitmap face) 는 동공을 추출는 연산자이고, FaceDetector.Face[] faces = new FaceDetector.Face[1]; 는 최대 인식할 수 있는 얼굴의 수를 설정하는 명령어다. 또한, count = fd.findFaces(rgb565, faces); 는 얼굴 인식 기능을 실행하는 명령어이고, faces[i].getMidPoint(midpoint); 는 일 동공과 타 동공의 가운데 지점을 생성하는 명령어이며, eye.Distance = faces[i].eyesDistance(); 는 일 동공과 타 동공과 거리를 산출하는 명령어이다.
Here private EyePose findEyeMidPoint (Bitmap face) is the operator that extracts the pupil, and FaceDetector.Face [] faces = new FaceDetector.Face [1]; Is a command to set the maximum number of recognizable faces. Also count = fd.findFaces (rgb565, faces); Is a command for executing the face recognition function, faces [i] .getMidPoint (midpoint); Eye.Distance = faces [i] .eyesDistance (); is a command to create a point in the middle of one pupil and another. Is a command to calculate the distance between one pupil and another.

도 6를 참고하면, 위와 같이 페이스 디텍터를 이용하여 얼굴 이미지에서 동공의 좌표를 추출하여 동공의 기준좌표를 생성한 뒤, 동공의 기준좌표를 기반으로, 코, 입 및 턱의 기준좌표를 생성하는 단계(S210)를 가지게 되는데, 저장부에 미리 저장되거나, 서버에 저장된 일반사람들의 평균적인 동공, 코, 입 및 턱의 위치비율을 불러와 이를 동공의 기준좌표와 대조하여 얼굴 이미지에 일반사람들의 평균적인 동공, 코, 입 및 턱의 위치비율에 해당하는 위치에 코, 입 및 턱의 기준좌표를 생성한다. 따라서, 사용자가 미리 저장한 일반사람들의 평균적인 동공, 코, 입 및 턱의 위치비율과 비교하여 코, 입 및 턱의 기준좌표를 생성하기 때문에 얼굴 이미지의 실제 코, 입 및 턱의 위치와 상이한 좌표에 코, 입 및 턱의 기준좌표가 생성될 수 있다.
Referring to FIG. 6, the reference coordinates of the pupil are extracted from the face image using the face detector, and reference coordinates of the nose, mouth, and jaw are generated based on the reference coordinates of the pupil In step S210, the average pupil, nose, mouth, and jaw position ratios of the ordinary people stored in the storage unit or stored in the server are retrieved and compared with the reference coordinates of the pupil. The reference coordinates of the nose, mouth, and jaw are generated at positions corresponding to the average pupil, nose, mouth, and jaw position ratios. Therefore, since the reference coordinates of the nose, mouth, and jaw are generated by comparing the average pupil, nose, mouth, and jaw position ratios of the general people stored in advance by the user, the positions of the nose, Reference coordinates of nose, mouth, and jaw may be generated at coordinates.

도 7 및 도8을 참고하면, 그 후, 동공, 코, 입 및 턱의 기준좌표를 기반으로 눈, 코, 입 및 턱의 윤곽선을 생성(S230)하게 되는데, 그 전에, 생성된 기준좌표가 얼굴 이미지의 실제 눈, 코, 입 및 턱의 위치에 오도록 미세 조정하는 단계(S220)를 가질 수 있다. 상세하게는, 동공, 코, 입 및 턱의 기준좌표는 페이스 디텍터를 이용해 추출된 동공의 기준좌표를 기반으로 일반 사람들의 평균적인 코, 입 및 턱의 위치비율과 대조하여 코, 입 및 턱의 기준좌표를 생성하기 때문에, 저화질 이미지 또는 어두운 이미지로 인해 페이스 디텍터 연산자가 잘못된 동공을 추적할 수 있고, 또한, 얼굴 이미지의 코, 입 및 턱의 위치가 미리 저장된 평균적인 코, 입 및 턱의 위치와 상이할 수 있기 때문에, 이를 실제 얼굴 이미지의 눈, 코, 입 및 턱에 윤곽 좌표가 위치하도록 미세 조정하는 단계(S220)를 가질 수 있다. 따라서, 실제 이미지의 눈, 코, 입 및 턱이 눈, 코, 입 및 턱의 기준좌표와 일치하는 경우에는 위의 미세 조정 단계(S220)를 생략할 수 있음은 물론이다.Referring to FIGS. 7 and 8, the outline of the eyes, nose, mouth, and jaw is then generated (S230) based on the reference coordinates of the pupil, nose, mouth, and jaw (S230) (Step S220) of fine-tuning the face image so that it comes to the actual eye, nose, mouth, and jaw position. Specifically, the reference coordinates of the pupil, nose, mouth, and jaw are compared with the average nose, mouth, and jaw position ratios of the general people based on the reference coordinates of the pupil extracted using the face detector, Since the reference coordinates are generated, the face detector operator can track the wrong pupil due to the low-quality image or the dark image, and the position of the nose, mouth and jaw of the face image can be detected from the average nose, (Step S220) to fine-adjust the contour coordinates to the eyes, nose, mouth, and jaw of the actual face image. Therefore, it is needless to say that the fine adjustment step S220 may be omitted if the eye, nose, mouth, and jaw of the actual image coincide with the reference coordinates of the eyes, nose, mouth, and jaw.

기준좌표를 이동시키는 방법으로서, 트랙볼(Track ball)을 이용하여 기준좌표를 이동 및 입력시키는 것을 일례로 설명하지만, 드로그 앤 드롭(drag and drop) 또는 좌표를 직접 입력하는 등 다양한 이동 방법이 사용될 수 있으며 이 또한 본 발명에 속함은 물론이다.
As a method of moving the reference coordinates, an example is described in which a reference ball is moved and input using a track ball. However, various methods of movement such as drag and drop or direct input of coordinates are used And it goes without saying that the present invention also belongs to the present invention.

이 후, 도 9를 참고하면, 동공, 코, 입 및 턱의 기준좌표를 기반으로 눈, 코, 입 및 턱의 윤곽선을 생성하게 되는데, 추출된 동공, 코, 입 및 턱의 기준좌표에 단말기의 저장부 또는 서버에 미리 저장된 크기비율과 대조하여 눈, 코, 입 및 턱의 윤곽선을 생성하는 단계(S230)이다. 상세하게는, 미리 저장된 크기비율은 눈, 코, 입 및 턱이 가지는 각각의 크기 및 눈, 코, 입 및 턱 간의 거리에 대한 정보인 크기비율 정보가 저장되는데, 얼굴 이미지에 생성된 동공, 코, 입 및 턱의 기준좌표에 해당 크기비율을 대조하여 윤곽선을 생성한다. 보다 상세하게 일례를 들어 설명하자면, 두 눈에 위치되는 눈의 기준좌표가 두 간의 거리가 20인 경우, 두 눈 간의 거리가 10이고, 눈의 크기가 1로 저장된 크기비율 정보를 대조하여 대입하게 되면, 두 눈 간의 거리는 2배가 차이나기 때문에, 눈의 크기를 2배 곱연산 한다. 따라서, 눈의 크기는 2가 되기 때문에 2의 크기를 갖는 윤곽선이 생성되는 원리이다.
9, the outline of the eyes, nose, mouth, and jaw is generated based on the reference coordinates of the pupil, nose, mouth, and jaw. In the reference coordinates of the extracted pupil, nose, mouth, (S230) of creating contours of eyes, nose, mouth, and jaw in contrast with the ratio of sizes pre-stored in the storage unit of the server or the server. In detail, the pre-stored size ratio stores size ratio information, which is information on each size of eyes, nose, mouth, and jaw and distance between eyes, nose, mouth and jaws. , Contour lines are generated by comparing the size ratios to the reference coordinates of the mouth and jaw. More specifically, for example, when the distance between the two reference coordinates of the eyes located in the two eyes is 20, the distance between the two eyes is 10, and the size ratio information stored as 1 is collated , The distance between the two eyes is doubled, so the eye size is multiplied by two. Therefore, since the size of the eye is 2, a contour having a size of 2 is generated.

그 다음, 도 9를 참고하면, 위 과정을 통해 얼굴 이미지에 생성된 윤곽선을 기반으로 윤곽선 상에 위치하는 적어도 하나 이상의 윤곽 좌표를 생성(S240)하게 된다. 상세하게 설명하자면, 윤곽선 상에 위치하는 적어도 하나 이상의 윤곽 좌표는 후술하는 단계(S240)에서 윤곽 좌표를 이동시킴으로써 이미지가 왜곡(성형)하는 메시 워핑을 이용하기 위한 포인트로서, 윤곽 좌표는 윤곽선 상에 위치하게 된다. 또한, 윤곽선 상에 위치하는 윤곽 좌표는 사용자의 미리 저장된 설정 값에 의해 그 개수를 달리하여 생성할 수 있다. 일례를 들어 설명하자면, 사용자가 눈에 6개의 윤곽 좌표를 생성하고, 코에 10개의 윤곽 좌표를 생성하는 설정값을 입력하게 되면, 윤곽선의 일단과 끝단이 연결된 눈은 6등분 하여 6개의 윤곽 좌표가 생성되고, 10개의 윤곽 좌표가 입력된 코의 경우 윤곽선의 일단 및 타단에 1개의 윤곽 좌표가 각각 생성되고, 나머지 8개의 윤곽 좌표가 소정간격 이격되어 윤곽선 상에 위치되어 생성된다. 이때, 윤곽선 상에 위치하는 윤곽 좌표는 개수를 미리 입력하여 생성하는 것을 일례를 들어 설명하였지만, 개수 뿐만 아니라, 윤곽 좌표 간의 거리를 미리 설정하여 윤곽 좌표를 생성할 수 있고, 이 또한 본 발명에 속한다.Next, referring to FIG. 9, at least one outline coordinate located on a contour line is generated (S240) based on the contour line generated in the face image through the above process. More specifically, at least one outline coordinate located on the outline is a point for utilizing mesh warping in which the image is distorted (formed) by moving the outline coordinates in a step S240 described later, and the outline coordinates are formed on the outline . In addition, the outline coordinates located on the contour line can be generated by varying the number of the outline coordinates according to a preset value of the user. For example, if a user creates six outline coordinates in the eye and inputs a set value that creates 10 outline coordinates in the nose, the eye connected to one end of the outline is divided into six equal parts, One outline coordinate is generated at one end and the other end of the outline in the case of a nose into which 10 outline coordinates are inputted and the remaining eight outline coordinates are generated by being positioned on the outline at a predetermined interval. In this case, the outline coordinates located on the outline are generated by preliminarily inputting the number. However, the outline coordinates can be generated by presetting the distance between the outline coordinates as well as the number, and this also belongs to the present invention .

한편, 생성된 동공, 코, 입 및 턱의 기준좌표를 기반으로 눈, 코, 입 및 턱의 윤곽선을 생성하는 단계(S230) 및 눈, 코, 입 및 턱의 윤곽선 상에 위치하는 적어도 하나 이상의 윤곽 좌표를 생성하는 단계(S240)는 두 단계를 나누어 설명하였지만, 두 단계가 동시에 이루어질 수 있다. 즉, 윤곽선을 생성하는 과정 및 생성된 윤곽선 상에 위치하는 윤곽 좌표를 생성하는 과정이 동시에 진행될 수 있고, 이 또한 본 발명에 속함은 물론이다.
On the other hand, a step S230 of creating an eye, a nose, an mouth, and a jaw contour based on the reference coordinates of the generated pupil, nose, mouth, and jaw and a step S230 of creating at least one Although the step S240 of generating outline coordinates has been described by dividing the two steps, two steps can be simultaneously performed. That is, the process of generating the outline and the process of generating the outline coordinates located on the generated outline can be performed at the same time, and the present invention also belongs to the present invention.

도 10을 참고하면, 위와 같은 과정을 통해 눈, 코, 입 및 턱의 윤곽선 상에 위치하는 하나 이상의 윤곽 좌표를 생성(S240)한 뒤에, 윤곽 좌표가 이미지의 실제 눈, 코, 입 및 턱의 윤곽선 상에 위치하도록 미세 조정하는 과정(S250)을 더 거칠 수 있다. 상세하게는, 윤곽 좌표는 윤곽선 상에 위치하게 되는데, 윤곽선은 위의 과정에서 설명하였듯이 사용자에 의해 저장부에 미리 저장된 사람들의 평균적인 눈, 코, 입 및 턱의 크기비율을 토대로 대조 및 생성하기 때문에, 생성된 윤곽선이 얼굴 이미지의 실제 눈, 코, 입 및 턱의 윤곽선과 상이할 수 있는데, 이를 수정하기 위하여 윤곽선 및 윤곽 좌표를 이미지의 실제 눈, 코, 입 및 턱의 윤곽선 상에 위치하도록 하는 미세 조정 단계(S250)를 가진다. 또한, 윤곽 좌표를 미세 조정하는 단계에서, 위와 같이 생성된 윤곽 좌표 및 윤곽선이 얼굴 이미지의 실제 눈, 코, 입 및 턱의 윤곽선과 일치하는 경우에는 해당 미세 조정 단계를 생략할 수 있음은 물론이다.Referring to FIG. 10, after generating at least one outline coordinate located on the outline of the eyes, nose, mouth, and jaw through the above process (S240), the outline coordinates are calculated based on the actual eye, nose, (S250) for fine adjustment to be positioned on the contour line. In detail, the outline coordinates are located on the outline, and the outline is determined based on the average eye, nose, mouth, and jaw size ratios of people stored in advance in the storage unit by the user as described in the above process Thus, the generated contour may be different from the actual eye, nose, mouth, and jaw contour of the facial image. To correct this, the contour and contour coordinates may be located on the contour of the actual eye, nose, (S250). It is needless to say that, in the step of finely adjusting the outline coordinates, when the outline coordinates and contour lines generated as described above coincide with the actual eye, nose, mouth, and jaw contour of the face image, the fine adjustment step can be omitted .

이때, 윤곽 좌표를 이동시키는 방법으로서, 트랙볼(Track ball)을 이용하여 윤곽 좌표를 이동 및 입력시키는 것을 일례로 설명하지만, 드로그 앤 드롭(drag and drop) 또는 좌표를 직접 입력하는 등 다양한 이동 방법이 사용될 수 있으며 이 또한 본 발명에 속함은 물론이다.At this time, as an example of moving the outline coordinates, the outline coordinates are moved and input using a track ball as an example. However, various methods of movement such as drag and drop or direct input of coordinates And it goes without saying that the present invention also belongs to the present invention.

여기 까지 얼굴 이미지에서 눈, 코, 입 및 턱의 윤곽선 상에 위치하는 윤곽 좌표를 생성하는 단계에 대한 설명이다.
Here is an explanation of the step of generating outline coordinates located on the outline of the eyes, nose, mouth and jaw in the face image.

그 다음, 메시 워핑을 이용하여 이미지를 변형시키기 전의 메시 생성 및 메시 그룹 생성 단계는 프로세서가 실행하는 작업으로서, 별도의 인터페이스 및 화면을 사용자에게 출력하지 않으므로, 도면은 생략하기로 한다. Next, the mesh generation and mesh group generation step before the image is transformed using the mesh warping is a task executed by the processor, and does not output a separate interface and a screen to the user, and therefore, the drawing is omitted.

도 1을 참고하면, 위와 같은 과정을 통해 윤곽 좌표를 생성(S100)한 뒤, 얼굴 이미지에 윤곽 좌표를 포함하고, 소정 간격 이격되어 배열되는 복수의 메시 포인트를 생성하는 단계(S110)를 가진다. 상세하게, 메시 포인트는 후술하는 메시 워핑을 이용하여 이미지를 변형시키기 위해 필요한 메시 그룹을 생성하기 위한 단계를 위한 준비단계로서, 메시 포인트는 소정 간격 이격되는 점 격자 형상의 배열로 이루어지고, 메시 포인트는 윤곽 좌표를 포함하여 구비된다. 메시 포인트는 사용자의 의해 미리 설정된 값에 의해 생성될 수 있다. 즉, 사용자가 미리 설정한 거리, 개수 및 좌표 등에 의한 조건에 따라 생성될 수 있다.
Referring to FIG. 1, after generating outline coordinates (S100) through the above process, a step S110 of generating a plurality of mesh points including outline coordinates in a face image and arranged at predetermined intervals is performed. In detail, a mesh point is a preparation step for a step for creating a mesh group necessary for deforming an image by using a mesh warping which will be described later, the mesh point being composed of an array of point grid shape spaced apart by a predetermined distance, Is provided including outline coordinates. The mesh point can be generated by a preset value by the user. That is, it can be generated in accordance with conditions such as a distance, a number and a coordinate set in advance by the user.

그 다음, 생성된 메시 포인트를 이용하여 메시 그룹을 생성하는 단계(S120)를 가지는데, 메시 포인트를 이용하여 메시 그룹을 생성하는 단계(120)는 메시 포인트를 꼭지점으로 하는 메시를 생성하는 과정을 더 포함한다. 상세하게는, 메시는 메시 포인트를 3개 연결하여 생성하는 삼각형의 메시로 구비될 수 있다. 일반적인 메시 워핑에서 사용되는 메시 그룹은 사각형의 메시로 이루어진 메시 그룹으로 이루어지는데, 본 발명의 메시는 메시 포인트를 3개 연결하여 생성되는 삼각 메시로 구비된다. 본 발명은 메시가 3 개의 메시 포인트를 연결한 삼각형 메시로 생성되는 것을 일례를 들어 설명하지만, 반드시 3 개의 메시 포인트를 연결한 삼각형의 메시로 한정되는 것은 아니며, 4 개의 메시 포인트로 이루어진 사각형 메시, 5개의 메시 포인트로 이루어진 오각형 메시 등과 같이 다양한 형태의 메시의 집합으로 이루어질 수 있고, 이 또한 본 발명에 속함은 물론이다. 다만, 본 발명에서와 같이 3 개의 메시 포인트를 연결한 삼각형의 메시의 집합으로 생성할 시, 종래의 사각형의 메시보다 선명하고, 세밀한 조작이 가능하며, 부드러운 출력물을 얻을 수 있다는 특징이 있다.
Next, the step of creating a mesh group using the generated mesh point (S120), a step 120 of creating a mesh group using the mesh point includes a process of generating a mesh having the mesh point as a vertex . In detail, the mesh may be provided as a triangular mesh that is generated by connecting three mesh points. The mesh group used in general mesh warping is composed of a mesh group consisting of a square mesh. The mesh of the present invention is provided as a triangular mesh generated by connecting three mesh points. Although the invention is described by way of example in which a mesh is created as a triangular mesh connecting three mesh points, it is not necessarily limited to a triangular mesh with three mesh points connected, but a square mesh of four mesh points, A pentagonal mesh having five mesh points, and the like, and it goes without saying that the present invention also belongs to the present invention. However, as in the present invention, when the three mesh points are formed as a set of triangular meshes connected to each other, the mesh can be more clearly and finely manipulated than the conventional square mesh, and smooth output can be obtained.

그 다음, 도 11을 참고하면, 위 과정에서 생성된 메시 그룹에 메시 워핑을 이용하여 이미지를 변형시키는 단계(S130)를 가지는데, 상세하게 생성된 메시 그룹은 윤곽 좌표를 포함하는 메시 포인트로 생성되는데, 윤곽 좌표를 사용자가 원하는 좌표 만큼 이동시켜 이미지를 왜곡/변형 시키는 메시 워핑을 하는 단계이다. 본 발명에서는 삼각형의 메시로 이루어진 메시 그룹을 메시 워핑하기 때문에 종래의 사각형으로 이루어진 메시의 그룹을 메시 워핑했을 때 보다, 선명하고, 세밀한 조작이 가능하며, 부드러운 출력물을 얻을 수 있다는 특징이 있다. 특히 사람의 얼굴 이미지를 대상으로 메시 워핑을 하는 본 발명은 삼각형의 메시로 이루어진 메시 그룹을 메시 워핑 하였을 때, 사각형의 메시를 메시 워핑하는 것 보다 그 효과가 뛰어나다는 특징이 있다.Next, referring to FIG. 11, there is a step (S130) of transforming the image using mesh warping to the mesh group generated in the above process (S130). The mesh group generated in detail is generated as a mesh point including outline coordinates In this step, the image is distorted / deformed by shifting the outline coordinates by the coordinates desired by the user. According to the present invention, since the mesh group consisting of triangular meshes is mesh warped, sharp, detailed manipulation is possible and soft output can be obtained as compared with the conventional case of meshing a group of meshes made of a quadrangle. Particularly, the present invention of mesh-warping a face image of a person is characterized in that the effect is superior to mesh-warping of a square mesh when the mesh group consisting of a triangular mesh is meshed.

여기서, 메시 워핑이란 이미지에서 임의의 점을 제어점으로 선택하고 제어점을 이동시킨 새로운 이미지를 만들어 내는 것을 뜻한다. 초기 만원경에서 출력되는 왜곡된 영상을 해결하기 위해 개발된 기술로서, 영화 등과 같이 다양한 특수효과에 주로 사용되어 지는 기술이다. 상세하게, 메시 워핑은 이미지의 x 및 y의 좌표값에 위치하는 픽셀을 미리 지정된 위치변환함수 Ux(x, y) 및 Uy(x, y)에 의해 Image(Ux(x,y), Uy(x, y))로 이동되어 이미지를 변형시키는 원리이다. 다르게 설명하자면, 메시 워핑은 이미지에서 P 점을 제어점으로 선택하고 P' 점으로 이동시키면 이에 따라 이미지 A를 구성하는 메시의 모양이 변한다. P 제어점을 가진 원본 이미지 A의 각 메시를 어파인 변환하여 P`제어점을 가진 새로운 이미지 A`로 변환하는 것이다. 메시 워핑은 공지 기술인 바 자세한 설명은 생략하기로 한다.Here, the "mesh warping" means that a new point is selected as an arbitrary point in the image and a control point is moved to create a new image. It is a technology developed to solve distorted images output from the initial magnifying glass, and is a technique mainly used for various special effects such as movies. In detail, mesh warping is a process of converting a pixel located at coordinate values of x and y of an image into an image (Ux (x, y), Uy (x, y) x, y) to transform the image. In other words, mesh warping changes the shape of the mesh that makes up image A by selecting point P as the control point in the image and moving it to point P '. We transform each mesh of the original image A with P control points into an affine transform and transform it into a new image A 'with a control point. Since the mesh warping is a known technology, a detailed description will be omitted.

또한, 메시 워핑을 적용하는 방법에 있어서는, 윤곽 좌표를 이동시킴으로 메시 워핑되는데 윤과 좌표는, 트랙볼(Track ball)을 이용하여 이동 및 입력시키는 것을 일례로 설명하지만, 드로그 앤 드롭(drag and drop) 또는 좌표를 직접 입력하는 등 다양한 이동 방법이 사용될 수 있으며 이 또한 본 발명에 속함은 물론이다.In the method of applying mesh warping, mesh warping is performed by moving the outline coordinates. Although the movement and the input of the coordinates and the coordinates by using a track ball are described as an example, the drag and drop ) Or by directly inputting coordinates, and it goes without saying that the present invention also belongs to the present invention.

메시 워핑에 의해 변형된 이미지를 보간법을 통해 변형된 이미지에 대한 후처리 과정을 가질 수 있다. 이미지 보간법은 이선형 필터링으로서, 변형된 이미지의 화소(텍셀, texel)가 떨어져 이질적으로 느끼는 것을 해결하기 위한 것으로, 임의의 텍셀과 그와 4방향으로 인접한 텍셀들의 중점에 대하여 선형 보간법을 수행하여 이질감을 줄여 이미지를 부드럽게 보이는 것이다. 상세하게는, 텍스처를 씌운 도형을 생성/변환 할 때, 텍스처가 저장된 정보 그대로 출력되지 않는다. 텍스처를 확대 및 축소 시키거나 시점을 변환하면 텍스처 상의 화소(텍셀, texel)이 튀어 보이게 된다. 이선형 필터링은 텍스처 상의 임의의 텍셀, 텍셀의 4방향으로 인접한 텍셀들을 중점에 대하여 선형 보간법을 수행하여 텍스처가 어떤 경우라도 부드럽게 보일 수 있도록 하는 것이다.The image modified by the mesh warping may have a post-processing process on the image modified by the interpolation method. The image interpolation method is a linear filtering method to solve heterogeneous feeling of pixels (texels, texels) of a transformed image. By performing linear interpolation on arbitrary texels and the midpoints of texels adjacent to the texels in four directions, Reduce the image will look smooth. Specifically, when creating / transforming a texture-covered object, the texture is not output as it is stored. When you zoom in or out of a texture or convert a viewpoint, pixels on the texture (texel, texel) will pop out. Linear filtering performs linear interpolation on the center points of arbitrary texels in a texture and adjacent texels in four directions to make the texture look smooth in any case.

일례로 다음 방정식에서 uk 및 vk는 텍스처의 좌표이고, k는 점, k는 색을 나타낸다. 첨자가 없는 값은 픽셀의 점을 나타내며, 첨자 0, 1, 2 및 3을 가지는 값은 각각의 픽셀과 인접해 있는 상, 좌, 우 및 하의 텍셀을 나타내며, 텍스처가 정사각형 비트맵이라고 가정하면,
For example, in the following equation, uk and vk are the coordinates of the texture, k is the point, and k is the color. Values without subscripts represent points of pixels, values with subscripts 0, 1, 2, and 3 represent texels of the top, left, right, and bottom adjacent to each pixel, and assuming the texture is a square bitmap,

Figure 112015051445346-pat00002
Figure 112015051445346-pat00002

수학식 1의 식이 모두 참이 된다. 그 다음 식을 정의하면,
The equations in Equation (1) are true. By defining the following expression,

Figure 112015051445346-pat00003
Figure 112015051445346-pat00003

수학식 2와 같이 보간법 방정식은 단순화할 수 있다.
The interpolation equation can be simplified as shown in Equation (2).

Figure 112015051445346-pat00004
Figure 112015051445346-pat00004

그 다음, 수학식 3의 식을 결합시키면 다음 수학식 4와 같다.
Then, the equation (3) is combined to obtain the following equation (4).

Figure 112015051445346-pat00005
Figure 112015051445346-pat00005

또는, 다르게 표현하자면 수학식 5과 같다.
Alternatively, Equation (5) can be expressed differently.

Figure 112015051445346-pat00006
Figure 112015051445346-pat00006

한편, 도 11을 참고하면, 메시 워핑을 이용하여 얼굴 이미지를 변형시켜 성형하는 단계(S130)에서, 얼굴 이미지의 눈에 쌍커풀을 생성하는 단계를 더 가질 수 있다. 상세하게는, 눈의 윗부분의 쌍커풀이 위치하는 좌표에 쌍커풀 라인을 따라 선을 생성하는 단계를 더 가질 수 있다. 쌍커풀을 생성할 때 위와 같이 쌍커풀이 위치되는 좌표에 선을 생성하여 쌍커풀을 생성하는 것을 일례로 설명하지만, 쌍커풀이 위치하는 좌표에 메시 워핑을 이용하여 쌍커풀을 생성하는 방법도 있으며, 이 또한 본 발명에 속한다.Referring to FIG. 11, in step S130 of deforming and forming a facial image using mesh warping, the facial image may be further formed with a pair of eyes on the eye of the facial image. Specifically, it may further have a step of creating a line along the double-skinned line at the coordinates where the double skin of the upper part of the eye is located. As an example, when generating a double-skinned balloon, a line is generated at a coordinate at which the double-skinned balloon is positioned as described above. However, there is a method of generating a double-skinned balloon using mesh warping at the coordinates where the double- .

도 12를 참고하면, 위와 같은 과정을 통해 얼굴 이미지를 성형한 뒤, 단말기의 출력부를 통해 성형된 이미지를 출력하는 단계를 가지게 된다. 성형된 이미지를 출력하는 단계는 세 가지로 나누어 출력될 수 있는데, 성형된 이미지를 출력하는 세 가지 방법으로서, 성형된 이미지를 그대로 즉시 출력부로 출력하는 방법, 성형된 이미지를 입체적으로 출력하는 입체출력 방법(S160, S170) 및 성형된 이미지를 미인형 얼굴이 가지는 황금 비율과 함께 출력하여 비교하는 방법(S140, S150)이 있다. 다음 세 가지 출력 방법에 대하여 상세하게 설명하기로 한다.Referring to FIG. 12, the facial image is formed through the above-described process, and the formed image is outputted through the output unit of the terminal. The step of outputting the formed image can be divided into three types. Three methods of outputting the formed image include a method of immediately outputting the formed image to the output unit as it is, a method of outputting the molded image in three dimensions Methods (S160, S170), and a method (S140, S150) for outputting a molded image together with a golden ratio of a face for comparison. The following three output methods will be described in detail.

메시 워핑을 통해 이미지를 성형한 뒤 성형된 이미지는 기본적으로 출력부를 통해 별도의 가공 없이 출력 된다. 그 후, 사용자가 선택적으로 황금 비율과의 비교(S150)하거나, 입체적으로 출력하는 입체 출력 단계(S170)로 나누어질 수 있다.After shaping the image through mesh warping, the molded image is basically output through the output without additional processing. Thereafter, the user may be selectively divided into a comparison with the golden ratio (S150), or a stereoscopic output step (S170) in which the stereoscopic output is performed.

도 13을 참고하면, 황금 비율 단계는 성형된 이미지의 눈, 코, 입 및 턱의 윤곽선 또는 윤곽 좌표 간의 비율 및 좌표를 추출하여 출력하는 단계(S140) 및 추출된 비율 및 좌표에 황금 비율을 출력하여 비교하는 단계(S150)를 포함한다. 상세하게 설명하자면, 이미지의 눈, 코, 입 및 턱의 윤곽선 또는 윤곽 좌표간의 상대적 비율 및 좌표를 출력하는 단계(S140)는 성형된 이미지의 눈, 코, 입 및 턱 간에 거리 및 상대적 비율, 눈, 코, 입 및 턱의 상대적 비율 및 크기를 추출하여, 성형된 이미지 상에 수치 및 가이드 선을 출력(S150)하게 되는데, 이를 통해 성형된 이미지의 눈, 코, 입 및 턱의 상대적 비율 및 크기를 알 수 있다. 이때, 상대적 비율 및 크기를 측정하는데 기준이 되는 눈, 코, 입 및 턱의 윤곽선 또는 윤곽 좌표는 복수의 윤곽선 또는 윤곽 좌표 중 사용자에 의해 미리 선택되는 육곽선 또는 윤곽 좌표를 기준으로 상대적 비율 및 크기가 측정된다. 또한, 황금 비율은 저장부에 미리 저장된 미(美)인 형 얼굴의 눈, 코, 입 및 턱의 상대적 비율 및 좌표가 되고, 미인형 얼굴의 황금 비율도 성형된 이미지 상에 출력된다. 즉, 성형된 이미지 상에는 성형된 이미지의 눈, 코, 입 및 턱의 상대적 비율 및 좌표와 미인형 얼굴의 눈, 코, 입 및 턱의 상대적 비율 및 좌표가 함께 출력되기 때문에 사용자가 성형한 이미지를 미인형 얼굴과 대조/비교 해볼 수 있기 때문에 이미지를 수정하거나, 평가하는데 가이드 되고, 성형된 이미지와 미인형 얼굴과 차이점을 파악할 수 있다는 특징이 있다. 자신이 성형한 얼굴 이미지는 대게 콤플렉스를 가지고 있는데, 이를 타인 또는 전문가를 통해 평가하는 것이 아니라, 객관적인 미인형 얼굴과 비교해 스스로 비교/판단 할 수 있다는 장점이 있다. 이때, 미인형 얼굴의 눈, 코, 입 및 턱의 상대적 비율 및 좌표는 단말기의 저장부에 미리 저장되는 것을 일례를 들어 설명하였지만, 통신부(15)를 통해 서버에 저장되는 미인형 얼굴을 사용할 수 있고, 이 또한 본 발명에 속한다. 또한, 미인형 얼굴의 황금비율은 사용자에 의해 미리 저장된 미인형 얼굴의 황금비율인 것을 일례를 들어 설명하였지만, 사용자에 의해 선택된 얼굴 이미지일 수도 있다. 즉, 미인형 얼굴의 황금 비율과의 대조/비교 뿐 만 아니라, 사용자가 선택한 얼굴 이미지와 비교할 수 있다. 사용자가 선택한 얼굴 이미지는 성형된 얼굴 이미지의 눈, 코, 입 및 턱의 상대적 비율 및 좌표를 추출하는 방법과 동일한 방법으로 선택한 얼굴 이미지의 눈, 코, 입 및 턱의 상대적 비율 및 좌표를 추출하여 출력하는 것이 바람직하다. 위 과정에서 성형된 이미지의 상대적 비율 및 좌표와 미인형 얼굴의 황금비율이 갖는 상대적 비율 및 좌표는 동일한 기준으로 생성하는 것이 바람직하다.Referring to FIG. 13, the golden ratio step includes extracting and outputting a ratio and a coordinate between the outline or outline coordinates of the eye, nose, mouth, and jaw of the formed image and outputting the calculated ratio and outputting a golden ratio to the extracted ratio and coordinates (S150). In detail, the step S140 of outputting the relative ratios and coordinates between the outline of the eye, nose, mouth and jaw of the image or coordinates of the outline of the image may include a distance and a relative ratio between eyes, nose, mouth and jaw of the formed image, The relative ratio and size of the nose, mouth, and jaw are extracted and a numerical value and a guide line are output on the formed image (S150), whereby the relative ratio and size of the eyes, nose, . At this time, the outline or outline coordinates of the eyes, nose, mouth, and jaw, which are used for measuring the relative ratio and size, may be determined based on the relative ratio and size of the outline or contour coordinates, Is measured. In addition, the golden ratio is a relative ratio and coordinates of eye, nose, mouth, and jaw of a beautiful face stored in advance in the storage unit, and the golden ratio of the beauty face is also output on the formed image. That is, since the relative proportions of the eye, nose, mouth, and jaw of the formed image and the relative ratios and coordinates of the eye, nose, mouth, and jaw of the coordinate system and the beautiful face are output together on the formed image, Since it can be compared and compared with the face, it is guided to revise or evaluate the image, and it is characterized that it can grasp the difference between the formed image and the beauty face. The facial image of his or her own face usually has complexity, which is not evaluated by another person or an expert but is advantageous in that it can be compared / judged by comparing with an objective beauty face. At this time, although the relative ratios and coordinates of the eyes, nose, mouth, and jaw of the beauty face are previously stored in the storage unit of the terminal, the beauty face stored in the server can be used through the communication unit 15, This also belongs to the present invention. In addition, although the golden ratio of the beauty face is exemplified as being the golden ratio of the beauty face stored in advance by the user, it may be a face image selected by the user. In other words, it can be compared with the face ratio of the face image selected by the user as well as the comparison / comparison with the golden ratio of the face image. The face image selected by the user is extracted by extracting the relative ratios and coordinates of the eyes, nose, mouth, and jaw of the selected face image in the same manner as the method of extracting the relative ratios and coordinates of the eyes, nose, mouth, It is preferable to output it. In the above process, it is desirable that the relative ratio of the formed image and the relative ratio and coordinates of the coordinate of the golden face of the beautiful face are generated on the same basis.

또한, 성형된 이미지의 상대적 비율 및 좌표와 미인형 얼굴의 황금비율을 출력하여 비교/대조하는 단계는 이미지를 성형하는 메시 워핑 단계에서 이루어질 수 있다. 상세하게, 미인형 얼굴의 황금 비율을 메시 워핑을 이용하여 이미지를 성형할 때 미인형 얼굴이 갖는 황금 비율을 출력함으로써, 사용자가 메시 워핑을 이용하여 이미지를 성형할 때 실시간으로 미인형 얼굴과 비교하며 성형할 수 있어 보다 효과적인 성형 가이드를 할 수 있다.
Also, the step of outputting and comparing / comparing the relative ratio of the formed image and the golden ratio of the coordinate system and the beauty face may be performed in the mesh warping step of forming the image. In detail, when the image is formed by using the mesh ratio of the golden ratio of the beauty face, the golden ratio of the beauty face is output, so that when the user shapes the image using the mesh warping, So that a more effective forming guide can be made.

도 14 및 도 15를 참고하면, 성형된 이미지를 출력하는 단계 중 입체출력 단계(S160, S170)는 변형된 이미지의 메시 포인트마다 상하좌우의 각 방향에 대응되는 고유한 회전 가중치를 적용(S160)시켜 입체적으로 3D화 하여 출력(S170)한다. 이는 평면(2D)의 얼굴 이미지를 마치 입체(3D)로 보이는 것과 같은 착시효과를 주는 것으로서, 메시 워핑을 이용하여 각 메시 포인트를 미리 저장된 값에 의해 이동시켜 마치 입체(3D)로 회전되는 듯 하는 착시효과를 가져오게 되는데, 이때, 90˚로 회전되는 듯한 이미지를 출력시킬 수 있지만, 현실성을 위하여 15˚의 각도를 최대치로 3D화 하여 이미지를 출력되는 것으로 한다. 다만, 반드시 15˚ 의 각도에 한정되는 것은 아니며 다양한 각도로 출력될 수 있으며, 이 또한 본 발명에 속함은 물론이다. 메시 포인트 마다 상하좌우의 각 방향에 대응되는 고유한 회전 가중치를 적용시켜 입체적으로 출력하는 것에 대하여 상세하게 설명하기로 한다. 14 and 15, the stereoscopic output step (S160, S170) during the step of outputting the molded image applies a unique rotation weight corresponding to each direction of the upper, lower, left, and right for each mesh point of the deformed image (S160) And three-dimensionally 3Dized and outputted (S170). This gives an illusion effect as if a face image of a plane (2D) is viewed as a three-dimensional object (3D). By moving each mesh point by a previously stored value using mesh warping, In this case, it is possible to output an image that is rotated by 90 °. However, in order to realize realism, an image is output by 3Dizing the angle of 15 ° to the maximum value. However, it is not necessarily limited to the angle of 15 degrees, but may be output at various angles, and it goes without saying that the present invention also belongs to the present invention. A specific rotation weight corresponding to each direction of the upper, lower, left, and right sides is applied to each mesh point to output in three dimensions.

성형된 이미지 상에 위치하는 메시 포인트에 상하좌우의 각 방향 마다 미리 저장된 고유한 이동 가중치를 적용(S160)시켜 메시 포인트의 좌표가 이동되고, 이동된 메시 포인트들에 대하여 메시 워핑을 적용시켜 이미지를 변형(S170)시킨다. 위와 같은 과정을 거치게 되면, 2D의 이미지가 마치 3D로 보이는 듯한 착시효과를 가져온다. 보다 상세하게는, 사용자는 이미지를 좌측, 우측, 상측 및 하측 방향으로 회전시킬 수 있도록 하는 인터페이스가 구비되는데, 해당 인터페이스에 소정각도 회전시키는 명령을 입력을 하게 되면, 사용자가 지정한 방향과 사용자가 지정한 각도에 대응되는 미리 저장된 이동 가중치가 메시 포인트에 적용되어 메시 포인트가 해당 이동 가중치 값 만큼 이동되어 메시 워핑 된다.(S160), the coordinates of the mesh point are shifted, and mesh warping is applied to the moved mesh points to apply the image to the mesh points located on the formed image (S170). When the above process is performed, the 2D image brings an optical illusion that looks like 3D. More specifically, the user has an interface for rotating the image in the left, right, upper, and lower directions. When a command to rotate the image at a predetermined angle is input to the interface, A pre-stored moving weight corresponding to the angle is applied to the mesh point so that the mesh point is shifted by the corresponding moving weight value to mesh-warp.

사용자가 코를 성형한 뒤, 코의 옆면을 보기 위해 이미지를 우측으로 회전시키려고 하는 경우를 일례를 들어, 코에 해당하는 메시 포인트들이 코의 좌측 윤곽선에 대항하는 메시 포인트가 a1, 콧등의 메시포인트가 a2 및 코의 우측 윤곽선에 해당하는 메시포인트가 a3 으로 형성되고, 사용자가 이미지를 우측으로 15˚로 회전시켰을 때, a1, a2 및 a3는 미리 저장된 각자의 좌표 이동 가중치 값에 의해 이동되는데, a1는 우측으로 15˚ 회전에 대응하여 (0, 0)의 좌표 이동 가중치 값을 갖고, a2는 우측으로 15˚ 회전에 대응하여 (3, 0)의 좌표 이동 가중치 값을 갖지며, a3는 우측으로 15˚ 회전에 대응하여 (-1, 0)의 좌표 이동 가중치 값을 가진다고 가정하면, 해당 이미지를 우측으로 15˚ 회전하는 입력을 하였을 때, a1는 우측으로 15˚ 회전에 대응하여 (0, 0)의 좌표 이동 가중치 값을 가지기 때문에 해당 위치에 그대로 형성되고, a2는 (3, 0)의 좌표 이동 가중치 값을 가지기 때문에 (x+3, y+0)의 위치인 우측으로 이동되며, a3는 (-1, 0)의 좌표 이동 가중치 값에을 가지기 때문에 (x-1, y+0)의 위치인 좌측으로 이동된다. 그 후 이동된 a1, a2 및 a3의 좌표 값으로 이미지가 메시 워핑되어 이미지가 변형된다. 위와 같은 과정을 거치게 되면, 결과적으로, a1에서 a2 사이의 이미지는 늘어나는 변형 과정을 거치고, a2에서 a3 사이의 이미지는 줄어드는 변형 과정을 거쳐 좌측에서 실제 코를 쳐다보는 것과 같은 입체감을 가져 마치 입체 사진을 보는 것과 같은 착시효과를 가져올 수 있게 된다. 이때, 2D이미지가 입체 성형을 통해 보다 효과적인 3D화가 되는 것을 위해 얼굴 이미지의 가장자리에 형성되는 메시 포인트는 이동되지 않는 것이 바람직하다.
For example, when the user attempts to rotate the image to the right to see the side of the nose after shaping the nose, the mesh points corresponding to the nose are set such that the mesh point against the left contour of the nose is a1, A2 and a3 corresponding to the right contour line of the nose are formed as a3, and when the user rotates the image to 15 degrees to the right, a1, a2 and a3 are moved by the previously stored coordinate movement weight values, a1 has a coordinate shift weight value of (0, 0) corresponding to a rotation of 15 degrees to the right, a2 has a coordinate shift weight value of (3, 0) corresponding to a rotation of 15 degrees to the right, (0, 0) corresponding to the rotation of 15 degrees, when the image is rotated by 15 degrees to the right, a1 corresponds to the rotation of 15 degrees to the right (0, 0) coordinate movement A2 is shifted to the right side of (x + 3, y + 0) because it has the coordinate shift weight value of (3, 0) (X-1, y + 0) because it has the coordinate shift weight value of 0 (zero). The image is then warped to the coordinate values of the moved a1, a2 and a3, and the image is transformed. As a result, the image between a1 and a2 undergoes an elongated transformation process, and the image between a2 and a3 undergoes a deformation process, resulting in a stereoscopic effect such as looking at the actual nose from the left side, It is possible to obtain the same optical illusion effect as that of viewing. At this time, it is desirable that the mesh point formed at the edge of the face image is not moved so that the 2D image is more effectively 3Dized through stereoscopic molding.

본 발명은 본 발명의 요지와 필수적 특징을 벗어나지 않는 범위에서 다른 특정한 형태로 구체화될 수 있음은 당업자에게 자명하다.
It will be apparent to those skilled in the art that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.

10 : 단말기 11 : 프로세서
12 : 저장부 13 : 출력부
14 : 입력부 15 : 통신부
20 : 서버
10: Terminal 11: Processor
12: storage unit 13: output unit
14: input unit 15:
20: Server

Claims (19)

단말기에서 메시 워핑을 이용하여 가상의 얼굴을 성형하는 방법에 있어서,
얼굴 촬영된 이미지에서 눈, 코, 입 및 턱의 윤곽선상에 위치하는 윤곽 좌표를 생성하는 단계(S100);
상기 이미지에 상기 윤곽 좌표를 포함하고, 소정 간격 이격되어 배열되는 복수의 메시 포인트를 생성하는 단계(S110);
상기 메시 포인트를 이용하여 메시 그룹을 생성하는 단계(S120);
상기 메시 그룹에 메시 워핑을 이용하여 상기 이미지를 성형 하는 단계(S130); 및
상기 성형된 이미지를 출력하는 단계;를 포함하되,
상기 윤곽 좌표를 생성하는 단계(S100)는,
상기 이미지에서 동공의 기준좌표를 생성하는 단계(S200);
상기 생성된 동공의 기준좌표와 미리 저장된 일반적인 동공, 코, 입 및 턱의 위치비율을 대조하여 코, 입 및 턱의 기준좌표를 생성하는 단계(S210);
상기 동공, 코, 입 및 턱의 기준좌표가 상기 이미지의 동공, 코, 입 및 턱에 위치하도록 미세 조정하는 단계(S220);
상기 생성된 동공, 코, 입 및 턱의 기준좌표와 미리 저장된 일반적인 동공, 코, 입 및 턱의 크기비율과 대조하여 눈, 코, 입 및 턱의 윤곽선을 생성하는 단계(S230);
상기 눈, 코, 입 및 턱의 윤곽선 상에 위치하는 적어도 하나 이상의 윤곽 좌표를 생성하는 단계(S240); 및
상기 눈, 코, 입 및 턱의 윤곽 좌표가 상기 이미지의 눈, 코, 입 및 턱의 윤곽선 상에 위치하도록 미세 조정하는 단계(S250);를 포함하는 것을 특징으로 하는 메시 워핑을 이용한 가상 성형수술의 방법.
A method for forming a virtual face using mesh warping in a terminal,
(S100) generating outline coordinates located on the outline of the eyes, nose, mouth, and jaw in the face photographed image;
Generating (S110) a plurality of mesh points including the contour coordinates in the image and arranged at a predetermined spacing;
Creating a mesh group using the mesh point (S120);
Forming the image using mesh warping on the mesh group (S130); And
And outputting the molded image,
The step of generating the outline coordinates (SlOO)
Generating reference coordinates of the pupil in the image (S200);
(S210) generating reference coordinates of the nose, mouth, and jaw by comparing the reference pupil coordinates of the generated pupil with the previously stored common pupil, nose, mouth, and jaw ratio;
(S220) finely adjusting the reference coordinates of the pupil, nose, mouth, and jaw to be located in the pupil, nose, mouth, and jaw of the image;
(S230) a contour of eyes, nose, mouth, and jaw in accordance with a ratio of sizes of the pupil, nose, mouth, and jaw to the reference coordinates of the pupil, nose, mouth, and jaw;
Creating (S240) at least one contour coordinate located on the contour of the eyes, nose, mouth and jaw; And
(S250) fine-adjusting the outline coordinates of the eye, nose, mouth and jaw to be located on the contours of the eyes, nose, mouth and jaw of the image (S250) Gt;
삭제delete 삭제delete 삭제delete 제 1 항에 있어서,
상기 이미지에서 동공의 기준좌표를 생성하는 단계(S200)는
페이스 디텍터(Face Detector)연산자를 이용하여 상기 이미지에서 동공의 기준좌표를 생성하는 것을 특징으로 하는 메시 워핑을 이용한 가상 성형수술의 방법.
The method according to claim 1,
The step S200 of generating the reference coordinates of the pupil in the image
Wherein a reference coordinate of a pupil is generated in the image using a face detector operator.
삭제delete 삭제delete 제 1 항에 있어서,
상기 메시 포인트를 이용하여 메시 그룹을 생성하는 단계(S120)는,
상기 메시 포인트를 꼭지점으로 하는 메시를 생성하는 단계를 더 포함하고,
상기 메시는 상기 메시 포인트를 3개 연결하여 생성되는 삼각 메시의 집합인 것을 특징으로 하는 메시 워핑을 이용한 가상 성형수술의 방법.
The method according to claim 1,
The step (S120) of creating a mesh group using the mesh point,
Further comprising generating a mesh having the mesh point as an apex,
Wherein the mesh is a set of triangular meshes generated by connecting three mesh points.
제 1 항에 있어서,
상기 메시 그룹에 메시 워핑을 이용하여 상기 이미지를 성형 하는 단계(S130)는,
상기 윤곽 좌표를 이동시킴으로써 상기 메시 그룹이 메시 워핑되는 것을 특징으로 하는 메시 워핑을 이용한 가상 성형수술의 방법.
The method according to claim 1,
(S130) forming the image using mesh warping on the mesh group,
Wherein the mesh group is mesh warped by moving the outline coordinates. ≪ RTI ID = 0.0 > 11. < / RTI >
제 1 항에 있어서,
상기 메시 그룹에 메시 워핑을 이용하여 상기 이미지를 성형 하는 단계(S130)는,
상기 이미지의 눈, 코, 입 및 턱의 윤곽선 또는 윤곽 좌표 간의 비율 및 좌표를 추출하여 출력하는 단계(S140); 및
상기 추출된 비율 및 좌표에 황금비율을 출력하여 비교하는 단계(S150);를 더 포함하고,
상기 황금비율은 미리 저장된 미인형 얼굴의 눈, 코, 입 및 턱의 상대적 비율, 각도 및 좌표인 것을 특징으로 하는 메시 워핑을 이용한 가상 성형수술의 방법.
The method according to claim 1,
(S130) forming the image using mesh warping on the mesh group,
(S140) extracting and outputting a ratio and a coordinate between an outline of the eye, nose, mouth, and jaw of the image or outline coordinates; And
And outputting the golden ratio to the extracted ratio and coordinates and comparing (S150)
Wherein the golden ratio is a relative ratio, an angle, and a coordinate of eyes, nose, mouth, and jaw of a previously stored beautiful face.
제 1 항에 있어서,
상기 성형된 이미지를 출력하는 단계 이후,
상기 이미지의 눈, 코, 입 및 턱의 윤곽선 또는 윤곽 좌표 간의 비율 및 좌표를 추출하여 출력하는 단계(S140); 및
상기 추출된 비율 및 좌표에 황금비율을 출력하여 비교하는 단계(S150);를 더 포함하고,
상기 황금비율은 미리 저장된 미인형 얼굴의 눈, 코, 입 및 턱의 상대적 비율, 각도 및 좌표인 것을 특징으로 하는 메시 워핑을 이용한 가상 성형수술의 방법.
The method according to claim 1,
After outputting the molded image,
(S140) extracting and outputting a ratio and a coordinate between an outline of the eye, nose, mouth, and jaw of the image or outline coordinates; And
And outputting the golden ratio to the extracted ratio and coordinates and comparing (S150)
Wherein the golden ratio is a relative ratio, an angle, and a coordinate of eyes, nose, mouth, and jaw of a previously stored beautiful face.
제 1 항에 있어서,
상기 성형된 이미지를 출력하는 단계 이후,
상기 성형된 이미지를 입체적으로 출력하는 입체출력 단계(S170)를 더 포함하고,
상기 성형된 이미지를 입체적으로 출력하는 입체출력 단계는,
상기 성형된 이미지를 3D화 하여 소정 각도 회전 가능하도록 출력하는 것을 특징으로 하는 메시 워핑을 이용한 가상 성형수술의 방법.
The method according to claim 1,
After outputting the molded image,
And a stereoscopic output step (S 170) of stereoscopically outputting the formed image,
The stereoscopic output step of stereoscopically outputting the formed image includes:
Wherein the molded image is 3Dized and output so as to be rotatable by a predetermined angle.
제 12 항에 있어서,
상기 성형된 이미지를 입체적으로 출력하는 입체출력 단계는,
상기 성형된 이미지의 메시 포인트 마다 미리 저장된 상하좌우의 각 방향에 대응하는 고유한 이동 가중치를 적용시켜 메시 워핑하여 출력하는 것을 특징으로 하는 메시 워핑을 이용한 가상 성형수술의 방법.
13. The method of claim 12,
The stereoscopic output step of stereoscopically outputting the formed image includes:
And a unique moving weight corresponding to each direction of vertically, horizontally, and vertically stored in advance for each mesh point of the formed image is applied, and the mesh warping is output.
가상 성형수술을 구현하는 단말기(10)에 있어서,
얼굴 촬영된 이미지에서 눈, 코, 입 및 턱의 윤곽선상에 위치하는 윤곽 좌표를 생성하고, 상기 이미지에 상기 윤곽 좌표를 포함하고, 소정 간격 이격되어 배열되는 복수의 메시 포인트를 생성하고, 상기 메시 포인트를 이용하여 메시 그룹을 생성하고, 상기 메시 그룹에 메시 워핑을 이용하여 상기 이미지를 성형 하는 프로세서(11);
상기 성형된 이미지를 출력하는 출력부(13);
얼굴 이미지, 동공, 코, 입 및 턱의 위치비율, 크기비율 및 미인형 얼굴의 눈, 코, 입 및 턱의 상대적 비율, 각도 및 좌표 중 적어도 하나가 미리 저장되는 저장부(12); 및
미세 조정 값을 입력받는 입력부(14);를 포함하되,
상기 프로세서(11)는 상기 윤곽 좌표를 생성하는데 있어서,
상기 이미지에서 동공의 기준좌표를 생성하고,
상기 동공의 기준좌표와 상기 저장부에 저장된 동공, 코, 입 및 턱의 위치비율을 대조하여 코, 입 및 턱의 기준좌표를 생성하며,
상기 입력부(14)를 통하여 입력 받은 미세 조정 값에 기초하여, 상기 동공, 코, 입 및 턱의 기준좌표가 상기 이미지의 동공, 코, 입 및 턱에 위치하도록 미세 조정하고,
상기 생성된 동공, 코, 입 및 턱의 기준좌표와 상기 저장부에 저장된 동공, 코, 입 및 턱의 크기비율과 대조하여 눈, 코, 입 및 턱의 윤곽선을 생성하며,
상기 눈, 코, 입 및 턱의 윤곽선 상에 위치하는 적어도 하나 이상의 윤곽 좌표를 생성하고,
상기 입력부(14)를 통하여 입력 받은 미세 조정 값에 기초하여, 상기 눈, 코, 입 및 턱의 윤곽 좌표가 상기 이미지의 눈, 코, 입 및 턱의 윤곽선 상에 위치하도록 미세 조정하는 것을 특징으로 하는 메시 워핑을 이용한 가상 성형수술을 구현하는 단말기.

A terminal (10) for implementing virtual plastic surgery,
Creating a plurality of mesh points arranged at predetermined intervals, generating contour coordinates located on the contour lines of the eyes, nose, mouth and jaw in the facial photographing image, including the contour coordinates in the image, A processor (11) for creating a mesh group using points and shaping the image using mesh warping to the mesh group;
An output unit 13 for outputting the formed image;
A storage unit (12) in which at least one of a position ratio of a face image, a pupil, a nose, a mouth and a jaw, a size ratio and a relative ratio of an eye, a nose, a mouth and a jaw, And
And an input unit (14) for receiving the fine adjustment value,
The processor (11), in generating the contour coordinates,
Generating reference coordinates of the pupil in the image,
The reference coordinates of the pupil, the mouth, and the jaw are generated by collating the pupil, nose, mouth, and jaw position ratios stored in the storage unit with the reference coordinates of the pupil,
Adjusts the reference coordinates of the pupil, nose, mouth, and jaw to be located in the pupil, nose, mouth, and jaw of the image based on the fine adjustment value input through the input unit (14)
Wherein the controller compares the reference pupil, nose, mouth, and jaw reference coordinates of the generated pupil, nose, mouth, and jaw with the ratio of pupil, nose, mouth, and jaw sizes stored in the storage unit,
Generating at least one outline coordinate located on the contour of the eye, nose, mouth, and jaw,
The fine coordinates are adjusted so that the outline coordinates of the eyes, nose, mouth and jaw are located on the outline of the eyes, nose, mouth and jaw of the image based on the fine adjustment value inputted through the input unit 14. [ A terminal that implements virtual plastic surgery using mesh warping.

삭제delete 삭제delete 삭제delete 삭제delete 제 14 항에 있어서,
상기 출력부는 상기 이미지의 눈, 코, 입 및 턱의 윤곽선 또는 윤곽 좌표 간의 비율 및 좌표를 추출하여 출력하고, 상기 추출된 비율 및 좌표에 황금비율을 출력하고,
상기 황금비율은 상기 저장부에 저장된 미인형 얼굴의 눈, 코, 입 및 턱의 상대적 비율, 각도 및 좌표인 것을 특징으로 하는 메시 워핑을 이용한 가상 성형수술을 구현하는 단말기.

15. The method of claim 14,
The output unit extracts and outputs a ratio and a coordinate between an outline or an outline coordinate of an eye, nose, mouth, and jaw of the image, outputs a golden ratio to the extracted ratio and coordinates,
Wherein the golden ratio is a relative ratio, an angle, and a coordinate of eyes, nose, mouth, and jaw of the beauty face stored in the storage unit.

KR1020150074941A 2015-05-28 2015-05-28 System and method for virtual cosmetic surgery by using mesh warping KR101701199B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020150074941A KR101701199B1 (en) 2015-05-28 2015-05-28 System and method for virtual cosmetic surgery by using mesh warping
CN201610184654.3A CN106204417A (en) 2015-05-28 2016-03-28 Utilize the virtual cosmetic surgery method and system of distortion of the mesh

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020150074941A KR101701199B1 (en) 2015-05-28 2015-05-28 System and method for virtual cosmetic surgery by using mesh warping

Publications (2)

Publication Number Publication Date
KR20160139657A KR20160139657A (en) 2016-12-07
KR101701199B1 true KR101701199B1 (en) 2017-02-01

Family

ID=57453150

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020150074941A KR101701199B1 (en) 2015-05-28 2015-05-28 System and method for virtual cosmetic surgery by using mesh warping

Country Status (2)

Country Link
KR (1) KR101701199B1 (en)
CN (1) CN106204417A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101824360B1 (en) * 2017-04-14 2018-01-31 한국 한의학 연구원 Apparatus and method for anotating facial landmarks

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122727B (en) * 2017-04-20 2020-03-13 北京旷视科技有限公司 Method, device and system for face shaping

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100764130B1 (en) * 2005-03-29 2007-10-05 (주)제니텀 엔터테인먼트 컴퓨팅 Method of virtual face shaping based on automatic face extraction and apparatus thereof
KR101397476B1 (en) * 2012-11-28 2014-05-20 주식회사 에스하이텍 Virtual cosmetic surgery method by 3d virtual cosmetic surgery device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916454B (en) * 2010-04-08 2013-03-27 董洪伟 Method for reconstructing high-resolution human face based on grid deformation and continuous optimization
KR101291763B1 (en) * 2011-03-02 2013-08-01 정일봉 The system for providing information about facial diagnosis and imaginary face of next generation, based on the golden ratio in the face on smartphone application

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100764130B1 (en) * 2005-03-29 2007-10-05 (주)제니텀 엔터테인먼트 컴퓨팅 Method of virtual face shaping based on automatic face extraction and apparatus thereof
KR101397476B1 (en) * 2012-11-28 2014-05-20 주식회사 에스하이텍 Virtual cosmetic surgery method by 3d virtual cosmetic surgery device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101824360B1 (en) * 2017-04-14 2018-01-31 한국 한의학 연구원 Apparatus and method for anotating facial landmarks

Also Published As

Publication number Publication date
CN106204417A (en) 2016-12-07
KR20160139657A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
US11423556B2 (en) Methods and systems to modify two dimensional facial images in a video to generate, in real-time, facial images that appear three dimensional
CN105354876B (en) A kind of real-time volume fitting method based on mobile terminal
CN105938627B (en) Processing method and system for virtual shaping of human face
KR100327541B1 (en) 3D facial modeling system and modeling method
CN105913416A (en) Method for automatically segmenting three-dimensional human face model area
CN103208133A (en) Method for adjusting face plumpness in image
CN101777195B (en) Three-dimensional face model adjusting method
CN103065360B (en) A kind of hair shape effect map generalization method and system
CN103608846B (en) A kind of method and apparatus for 3-dimensional image model adjustment
US11941772B2 (en) Method and system for generating a 3D reconstruction of a human
CN106021550B (en) Hair style design method and system
CN106952336B (en) Feature-preserving human three-dimensional head portrait production method
JPH0962865A (en) Face picture processing method and face picture processor
CN109801380A (en) A kind of method, apparatus of virtual fitting, storage medium and computer equipment
KR20150113751A (en) Method and apparatus for acquiring three-dimensional face model using portable camera
CN106874861A (en) A kind of face antidote and system
CN110197462A (en) A kind of facial image beautifies in real time and texture synthesis method
CN109389682A (en) A kind of three-dimensional face model automatic adjusting method
KR20200107957A (en) Image processing method and device, electronic device and storage medium
CN104581119B (en) A kind of display methods of 3D rendering and a kind of helmet
CN107452049A (en) A kind of three-dimensional head modeling method and device
TWI750710B (en) Image processing method and apparatus, image processing device and storage medium
CN110378990A (en) Augmented reality scene shows method, apparatus and storage medium
CN110782528A (en) Free deformation human face shaping simulation method, system and storage medium
CN104574266A (en) Image deformation technology based on contour line

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant