[go: up one dir, main page]

KR102800992B1 - Method and system for processing image for lip makeup based on augmented reality - Google Patents

Method and system for processing image for lip makeup based on augmented reality Download PDF

Info

Publication number
KR102800992B1
KR102800992B1 KR1020220049248A KR20220049248A KR102800992B1 KR 102800992 B1 KR102800992 B1 KR 102800992B1 KR 1020220049248 A KR1020220049248 A KR 1020220049248A KR 20220049248 A KR20220049248 A KR 20220049248A KR 102800992 B1 KR102800992 B1 KR 102800992B1
Authority
KR
South Korea
Prior art keywords
image
brightness
blending
lip
threshold value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
KR1020220049248A
Other languages
Korean (ko)
Other versions
KR20230149934A (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 KR1020220049248A priority Critical patent/KR102800992B1/en
Publication of KR20230149934A publication Critical patent/KR20230149934A/en
Application granted granted Critical
Publication of KR102800992B1 publication Critical patent/KR102800992B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Architecture (AREA)
  • Image Processing (AREA)

Abstract

증강현실 기반의 입술 메이크업을 위한 이미지 처리 방법 및 시스템을 개시한다. 일실시예에 따른 이미지 처리 방법은 사람의 얼굴을 포함하는 입력 이미지의 입술 영역에 대한 휘도(luminance) 이미지를 생성하는 단계, 립스틱 도표 영역을 조절하기 위한 립 마스크 이미지를 생성하는 단계, 상기 입력 이미지에 상기 휘도 이미지의 휘도 값과 기설정된 임계값에 따라 서로 다른 밝기의 색상을 블렌딩하는 단계 및 상기 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 상기 립 마스크 이미지를 블렌딩하는 단계를 포함할 수 있다.Disclosed are an image processing method and system for augmented reality-based lip makeup. An image processing method according to one embodiment may include a step of generating a luminance image for a lip area of an input image including a human face, a step of generating a lip mask image for adjusting a lipstick diagram area, a step of blending colors of different brightness in the input image according to a luminance value of the luminance image and a preset threshold value, and a step of blending the input image in which colors of different brightness are blended and the lip mask image.

Description

증강현실 기반의 입술 메이크업을 위한 이미지 처리 방법 및 시스템{METHOD AND SYSTEM FOR PROCESSING IMAGE FOR LIP MAKEUP BASED ON AUGMENTED REALITY}{METHOD AND SYSTEM FOR PROCESSING IMAGE FOR LIP MAKEUP BASED ON AUGMENTED REALITY}

아래의 설명은 증강현실 기반의 입술 메이크업을 위한 이미지 처리 방법 및 시스템에 관한 것이다.The following description relates to an image processing method and system for augmented reality-based lip makeup.

얼굴인식을 이용하여 입술 위치를 찾아낸 후, 해당 위치에 립스틱을 가상으로 그려주는 증강현실 가상 메이크업 기술이 존재한다. 그러나, 종래기술은 실제 립스틱의 표현 대비 반사광 처리 및 질감에 있어 부자연스러운 느낌을 주는 것이 일반적이다.There is an augmented reality virtual makeup technology that uses facial recognition to find the location of the lips and then virtually draws lipstick on that location. However, conventional technologies generally give an unnatural feeling in terms of reflection processing and texture compared to the expression of actual lipstick.

[선행문헌번호][Prior literature number]

한국공개특허 제2021-0091874호Korean Patent Publication No. 2021-0091874

증강현실 기반의 입술 메이크업에서 좀 더 사실적인 립스틱 발색과 반사광의 표현, 질감을 표현할 수 있는 이미지 처리 방법 및 시스템을 제공한다.The present invention provides an image processing method and system capable of expressing more realistic lipstick coloration, reflected light, and texture in augmented reality-based lip makeup.

적어도 하나의 프로세서를 포함하는 컴퓨터 장치에서 실행되는 이미지 처리 방법에 있어서, 상기 적어도 하나의 프로세서에 의해, 사람의 얼굴을 포함하는 입력 이미지의 입술 영역에 대한 휘도(luminance) 이미지를 생성하는 단계; 상기 적어도 하나의 프로세서에 의해, 립스틱 도표 영역을 조절하기 위한 립 마스크 이미지를 생성하는 단계; 상기 적어도 하나의 프로세서에 의해, 상기 입력 이미지에 상기 휘도 이미지의 휘도 값과 기설정된 임계값에 따라 서로 다른 밝기의 색상을 블렌딩하는 단계; 및 상기 적어도 하나의 프로세서에 의해, 상기 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 상기 립 마스크 이미지를 블렌딩하는 단계를 포함하는 이미지 처리 방법을 제공한다.An image processing method executed in a computer device including at least one processor, the method comprising: generating, by the at least one processor, a luminance image for a lip area of an input image including a human face; generating, by the at least one processor, a lip mask image for adjusting a lipstick diagram area; blending, by the at least one processor, colors of different brightness in the input image according to a luminance value of the luminance image and a preset threshold value; and blending, by the at least one processor, the input image in which colors of different brightness are blended and the lip mask image.

일측에 따르면, 상기 휘도 이미지를 생성하는 단계는, 상기 입력 이미지의 입술 영역에 대한 그레이 스케일(gray scale) 이미지를 생성하는 단계; 상기 그레이 스케일 이미지를 복제하여 제1 휘도 이미지 및 제2 휘도 이미지를 생성하는 단계; 상기 제1 휘도 이미지의 밝기를 제1 정도로 변경하고, 블러 효과를 적용하는 단계; 상기 제2 휘도 이미지의 밝기를 제2 정도로 변경하고, 블러 효과를 적용하는 단계; 및 상기 블러 효과가 적용된 제1 휘도 이미지 및 제2 휘도 이미지를 블렌딩하여 상기 휘도 이미지를 생성하는 단계를 포함하는 것을 특징으로 할 수 있다.According to one aspect, the step of generating the luminance image may include: a step of generating a gray scale image for a lip area of the input image; a step of duplicating the gray scale image to generate a first luminance image and a second luminance image; a step of changing the brightness of the first luminance image to a first degree and applying a blur effect; a step of changing the brightness of the second luminance image to a second degree and applying a blur effect; and a step of blending the first luminance image and the second luminance image to which the blur effect is applied to generate the luminance image.

다른 측면에 따르면, 상기 제1 정도는 상기 제1 휘도 이미지의 밝기를 증감시키는 정도를 포함하고, 상기 제2 정도는 상기 제2 휘도 이미지의 밝기를 증감시키는 정도를 포함하고, 상기 제1 정도와 상기 제2 정도는 서로 상이한 것을 특징으로 할 수 있다.According to another aspect, the first degree may include a degree of increasing or decreasing the brightness of the first luminance image, the second degree may include a degree of increasing or decreasing the brightness of the second luminance image, and the first degree and the second degree may be characterized as being different from each other.

또 다른 측면에 따르면, 상기 기설정된 임계값은 순차적으로 더 큰 값을 갖는 제1 임계값, 제2 임계값, 제3 임계값 및 제4 임계값을 포함하고, 상기 서로 다른 밝기의 색상을 블렌딩하는 단계는, 상기 휘도 이미지의 휘도 값, 상기 제1 임계값 및 상기 제2 임계값에 기반하여 상기 입력 이미지에 제1 밝기의 색상을 블렌딩하는 단계; 및 상기 휘도 이미지의 휘도 값, 상기 제3 임계값 및 상기 제4 임계값에 기반하여 상기 입력 이미지에 제2 밝기의 색상을 블렌딩하는 단계를 포함하는 것을 특징으로 할 수 있다.According to another aspect, the preset threshold values may include a first threshold value, a second threshold value, a third threshold value, and a fourth threshold value having sequentially larger values, and the step of blending colors of different brightnesses may include a step of blending a color of a first brightness to the input image based on a brightness value of the brightness image, the first threshold value, and the second threshold value; and a step of blending a color of a second brightness to the input image based on a brightness value of the brightness image, the third threshold value, and the fourth threshold value.

또 다른 측면에 따르면, 상기 제1 밝기의 색상을 블렌딩하는 단계는, 상기 휘도 이미지에서 제1 픽셀의 휘도 값이 상기 제1 임계값 미만인 경우, 상기 입력 이미지에서 상기 제1 픽셀에 대응하는 제2 픽셀에 상기 제1 밝기의 색상을 블렌딩하는 단계; 및 상기 휘도 이미지에서 상기 제1 픽셀의 휘도 값이 상기 제1 임계값 및 상기 제2 임계값에 의해 결정되는 범위에 포함되는 경우, 상기 입력 이미지에서 상기 제1 픽셀에 대응하는 제2 픽셀에 상기 제1 밝기를 선형 보간한 색상을 블렌딩하는 단계를 포함하고, 상기 선형 보간된 제1 밝기는 상기 제1 픽셀의 휘도 값이 상기 제1 임계값에 가까울수록 100 %, 그리고 상기 제2 임계값에 가까울수록 0%가 되도록 선형 보간된 것을 특징으로 할 수 있다.According to another aspect, the step of blending the color of the first brightness may include: a step of blending the color of the first brightness to a second pixel corresponding to the first pixel in the input image when the brightness value of the first pixel in the brightness image is less than the first threshold value; and a step of blending a color obtained by linearly interpolating the first brightness to a second pixel corresponding to the first pixel in the input image when the brightness value of the first pixel in the brightness image is included in a range determined by the first threshold value and the second threshold value, wherein the linearly interpolated first brightness may be characterized in that it is linearly interpolated such that the brightness value of the first pixel becomes 100% as it gets closer to the first threshold value, and becomes 0% as it gets closer to the second threshold value.

또 다른 측면에 따르면, 상기 제2 밝기의 색상을 블렌딩하는 단계는,According to another aspect, the step of blending the color of the second brightness is,

상기 휘도 이미지에서 제1 픽셀의 휘도 값이 상기 제3 임계값 및 상기 제4 임계값에 의해 결정되는 범위에 포함되는 경우, 상기 입력 이미지에서 상기 제1 픽셀에 대응하는 제2 픽셀에 상기 제2 밝기를 선형 보간한 색상을 블렌딩하는 단계; 및 상기 휘도 이미지에서 상기 제1 픽셀의 휘도 값이 상기 제4 임계값을 초과하는 경우, 상기 입력 이미지에서 상기 제1 픽셀에 대응하는 제2 픽셀에 상기 제2 밝기의 색상을 블렌딩하는 단계를 포함하고, 상기 선형 보간된 제2 밝기는 상기 제1 픽셀의 휘도 값이 상기 제3 임계값에 가까울수록 0 퍼센트, 그리고 상기 제4 임계값에 가까울수록 100%가 되도록 선형 보간된 것을 특징으로 할 수 있다.A method for producing a luminance image comprising: a step of blending a color obtained by linearly interpolating the second brightness to a second pixel corresponding to the first pixel in the input image when the luminance value of the first pixel in the luminance image is within a range determined by the third threshold value and the fourth threshold value; and a step of blending a color obtained by linearly interpolating the second brightness to a second pixel corresponding to the first pixel in the input image when the luminance value of the first pixel in the luminance image exceeds the fourth threshold value. The linearly interpolated second brightness may be characterized in that it is linearly interpolated such that the luminance value of the first pixel becomes 0 percent as it gets closer to the third threshold value, and becomes 100% as it gets closer to the fourth threshold value.

또 다른 측면에 따르면, 상기 립 마스크 이미지를 생성하는 단계는, 상기 입력 이미지에서 상기 입술 영역을 표시하도록 생성된 립 세그먼테이션 이미지와 상기 입력 이미지의 얼굴 랜드마크로부터 입 안쪽 영역을 표시하도록 생성된 입 안쪽 영역 마스크를 블렌딩하여 입 안쪽 영역을 포함하는 제1 립 마스크 이미지를 생성하는 단계; 상기 제1 립 마스크 이미지에 블러 효과를 적용하고, 밝기를 조정하여 제2 립 마스크 이미지를 생성하는 단계; 및 상기 립 세그먼테이션 이미지에 블러 효과를 적용하고 반전한 뒤, 상기 제2 마스크 이미지와 서브트랙트 블렌딩(subtract blending)하여 입 안쪽 영역이 다시 제거된 제3 립 마스크 이미지를 생성하는 단계를 포함하는 것을 특징으로 할 수 있다.According to another aspect, the step of generating the lip mask image may include the steps of: generating a first lip mask image including an inner mouth area by blending a lip segmentation image generated to represent the lip area in the input image and an inner mouth area mask generated to represent an inner mouth area from facial landmarks of the input image; applying a blur effect to the first lip mask image and adjusting brightness to generate a second lip mask image; and applying a blur effect to the lip segmentation image, inverting it, and then performing subtract blending with the second mask image to generate a third lip mask image from which the inner mouth area is removed again.

또 다른 측면에 따르면, 상기 이미지 처리 방법은 상기 입술 영역으로부터 입술의 평균 색을 추출하는 단계; 및 상기 입력 이미지에 상기 추출된 입술의 평균 색을 블렌딩하는 단계를 더 포함하고, 상기 서로 다른 밝기의 색상을 블렌딩하는 단계는, 상기 입술의 평균 색이 블렌딩된 입력 이미지에 상기 서로 다른 밝기의 색상을 블렌딩하는 것을 특징으로 할 수 있다.According to another aspect, the image processing method further includes a step of extracting an average color of lips from the lip area; and a step of blending the extracted average color of lips with the input image, wherein the step of blending colors of different brightness may be characterized by blending colors of different brightness with the input image in which the average color of the lips is blended.

또 다른 측면에 따르면, 상기 이미지 처리 방법은 투명도 조절을 위해, 상기 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 원본의 입력 이미지를 블렌딩하는 단계를 더 포함하고, 상기 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 상기 립 마스크 이미지를 블렌딩하는 단계는, 상기 원본 입력 이미지와 블렌딩된 입력 이미지를 상기 립 마스크 이미지와 더 블렌딩하는 것을 특징으로 할 수 있다.According to another aspect, the image processing method may further include a step of blending the input image in which colors of different brightnesses are blended with the original input image for transparency adjustment, and the step of blending the input image in which colors of different brightnesses are blended with the lip mask image may be characterized in that the input image blended with the original input image is further blended with the lip mask image.

또 다른 측면에 따르면, 상기 이미지 처리 방법은 상기 휘도 이미지에 콘트라스트 필터(contrast filter)를 적용하여 상기 휘도 이미지의 콘트라스트를 조절하는 단계를 더 포함하고, 상기 서로 다른 밝기의 색상을 블렌딩하는 단계는, 상기 콘트라스트가 조절된 휘도 이미지의 휘도 값을 이용하여 상기 서로 다른 밝기의 색상을 블렌딩하는 것을 특징으로 할 수 있다.According to another aspect, the image processing method may further include a step of adjusting contrast of the luminance image by applying a contrast filter to the luminance image, and the step of blending colors of different brightness may be characterized in that the colors of different brightness are blended using luminance values of the luminance image whose contrast is adjusted.

컴퓨터 장치와 결합되어 상기 방법을 컴퓨터 장치에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램을 제공한다.A computer program stored on a computer-readable recording medium is provided for executing the above method on the computer device by being combined with a computer device.

상기 방법을 컴퓨터 장치에 실행시키기 위한 프로그램이 기록되어 있는 컴퓨터 판독 가능한 기록매체를 제공한다.A computer-readable recording medium having recorded thereon a program for executing the above method on a computer device is provided.

컴퓨터에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서에 의해, 사람의 얼굴을 포함하는 입력 이미지의 입술 영역에 대한 휘도 이미지를 생성하고, 립스틱 도표 영역을 조절하기 위한 립 마스크 이미지를 생성하고, 상기 입력 이미지에 상기 휘도 이미지의 휘도 값과 기설정된 임계값에 따라 서로 다른 밝기의 색상을 블렌딩하고, 상기 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 상기 립 마스크 이미지를 블렌딩하는 것을 특징으로 하는 컴퓨터 장치를 제공한다.A computer device is provided, comprising at least one processor implemented to execute computer-readable instructions, characterized in that the computer device generates a luminance image for a lip area of an input image including a human face, generates a lip mask image for adjusting a lipstick diagram area, blends colors of different brightness in the input image according to luminance values of the luminance image and a preset threshold value, and blends the input image in which the colors of different brightness are blended and the lip mask image.

증강현실 기반의 입술 메이크업에서 좀 더 사실적인 립스틱 발색과 반사광의 표현, 질감을 표현할 수 있다.Augmented reality-based lip makeup can express more realistic lipstick color, reflection, and texture.

도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다.
도 2는 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다.
도 3은 본 발명의 일실시예에 따른 이미지 처리 방법의 예를 도시한 흐름도이다.
도 4는 본 발명의 일실시예에 있어서, 휘도 이미지를 생성하는 방법의 예를 도시한 흐름도이다.
도 5는 본 발명의 일실시예에 있어서, 휘도 이미지를 생성하는 과정의 예를 도시한 도면이다.
도 6은 본 발명의 일실시예에 있어서, 립 마스크 이미지를 생성하는 방법의 예를 도시한 흐름도이다.
도 7은 본 발명의 일실시예에 있어서, 립 마스크 이미지를 생성하는 과정의 예를 도시한 도면이다.
도 8은 본 발명의 일실시예에 있어서, 서로 다른 밝기의 색상을 블렌딩하는 방법의 예를 도시한 흐름도이다.
도 9는 본 발명의 일실시예에 있어서, 출력 이미지를 생성하는 과정의 예를 도시한 도면이다.
FIG. 1 is a diagram illustrating an example of a network environment according to one embodiment of the present invention.
FIG. 2 is a block diagram illustrating an example of a computer device according to one embodiment of the present invention.
FIG. 3 is a flowchart illustrating an example of an image processing method according to one embodiment of the present invention.
FIG. 4 is a flowchart illustrating an example of a method for generating a luminance image according to one embodiment of the present invention.
FIG. 5 is a drawing illustrating an example of a process for generating a luminance image according to one embodiment of the present invention.
FIG. 6 is a flowchart illustrating an example of a method for generating a lip mask image according to one embodiment of the present invention.
FIG. 7 is a drawing illustrating an example of a process for generating a lip mask image according to one embodiment of the present invention.
FIG. 8 is a flowchart illustrating an example of a method for blending colors of different brightness according to one embodiment of the present invention.
FIG. 9 is a diagram illustrating an example of a process for generating an output image according to one embodiment of the present invention.

이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, the present invention will be described in detail with reference to the attached drawings.

본 발명의 실시예들에 따른 이미지 처리 시스템은 적어도 하나의 컴퓨터 장치에 의해 구현될 수 있다. 이때, 컴퓨터 장치에는 본 발명의 일실시예에 따른 컴퓨터 프로그램이 설치 및 구동될 수 있고, 컴퓨터 장치는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 실시예들에 따른 이미지 처리 방법을 수행할 수 있다. 상술한 컴퓨터 프로그램은 컴퓨터 장치와 결합되어 이미지 처리 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장될 수 있다.The image processing system according to embodiments of the present invention may be implemented by at least one computer device. At this time, the computer device may have a computer program according to an embodiment of the present invention installed and run, and the computer device may perform the image processing method according to embodiments of the present invention under the control of the run computer program. The above-described computer program may be stored in a computer-readable recording medium so as to be combined with the computer device and cause the computer to execute the image processing method.

도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다. 도 1의 네트워크 환경은 복수의 전자 기기들(110, 120, 130, 140), 복수의 서버들(150, 160) 및 네트워크(170)를 포함하는 예를 나타내고 있다. 이러한 도 1은 발명의 설명을 위한 일례로 전자 기기의 수나 서버의 수가 도 1과 같이 한정되는 것은 아니다.FIG. 1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention. The network environment of FIG. 1 represents an example including a plurality of electronic devices (110, 120, 130, 140), a plurality of servers (150, 160), and a network (170). This FIG. 1 is an example for explaining the invention, and the number of electronic devices or servers is not limited to that of FIG. 1.

복수의 전자 기기들(110, 120, 130, 140)은 컴퓨터 시스템으로 구현되는 고정형 단말이거나 이동형 단말일 수 있다. 복수의 전자 기기들(110, 120, 130, 140)의 예를 들면, 스마트폰(smart phone), 휴대폰, 내비게이션, 컴퓨터, 노트북, 디지털방송용 단말, PDA(Personal Digital Assistants), PMP(Portable Multimedia Player), 태블릿 PC, 게임 콘솔(game console), 웨어러블 디바이스(wearable device), IoT(internet of things) 디바이스, VR(virtual reality) 디바이스, AR(augmented reality) 디바이스 등이 있다. 일례로 도 1에서는 전자 기기(110)의 예로 스마트폰의 형상을 나타내고 있으나, 본 발명의 실시예들에서 전자 기기(110)는 실질적으로 무선 또는 유선 통신 방식을 이용하여 네트워크(170)를 통해 다른 전자 기기들(120, 130, 140) 및/또는 서버(150, 160)와 통신할 수 있는 다양한 물리적인 컴퓨터 시스템들 중 하나를 의미할 수 있다.The plurality of electronic devices (110, 120, 130, 140) may be fixed terminals or mobile terminals implemented as a computer system. Examples of the plurality of electronic devices (110, 120, 130, 140) include smart phones, mobile phones, navigation devices, computers, laptops, digital broadcasting terminals, PDAs (Personal Digital Assistants), PMPs (Portable Multimedia Players), tablet PCs, game consoles, wearable devices, IoT (Internet of Things) devices, VR (Virtual Reality) devices, AR (Augmented Reality) devices, etc. For example, in FIG. 1, the electronic device (110) is shown in the shape of a smartphone, but in embodiments of the present invention, the electronic device (110) may actually mean one of various physical computer systems that can communicate with other electronic devices (120, 130, 140) and/or servers (150, 160) through a network (170) using a wireless or wired communication method.

통신 방식은 제한되지 않으며, 네트워크(170)가 포함할 수 있는 통신망(일례로, 이동통신망, 유선 인터넷, 무선 인터넷, 방송망, 위성망 등)을 활용하는 통신 방식뿐만 아니라 기기들간의 근거리 무선 통신 역시 포함될 수 있다. 예를 들어, 네트워크(170)는, PAN(personal area network), LAN(local area network), CAN(campus area network), MAN(metropolitan area network), WAN(wide area network), BBN(broadband network), 인터넷 등의 네트워크 중 하나 이상의 임의의 네트워크를 포함할 수 있다. 또한, 네트워크(170)는 버스 네트워크, 스타 네트워크, 링 네트워크, 메쉬 네트워크, 스타-버스 네트워크, 트리 또는 계층적(hierarchical) 네트워크 등을 포함하는 네트워크 토폴로지 중 임의의 하나 이상을 포함할 수 있으나, 이에 제한되지 않는다.The communication method is not limited, and may include not only a communication method that utilizes a communication network (for example, a mobile communication network, a wired Internet, a wireless Internet, a broadcasting network, a satellite network, etc.) that the network (170) may include, but also a short-range wireless communication between devices. For example, the network (170) may include any one or more of a network such as a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), a broadband network (BBN), and the Internet. In addition, the network (170) may include any one or more of a network topology including, but not limited to, a bus network, a star network, a ring network, a mesh network, a star-bus network, a tree, or a hierarchical network.

서버(150, 160) 각각은 복수의 전자 기기들(110, 120, 130, 140)과 네트워크(170)를 통해 통신하여 명령, 코드, 파일, 콘텐츠, 서비스 등을 제공하는 컴퓨터 장치 또는 복수의 컴퓨터 장치들로 구현될 수 있다. 예를 들어, 서버(150)는 네트워크(170)를 통해 접속한 복수의 전자 기기들(110, 120, 130, 140)로 제1 서비스를 제공하는 시스템일 수 있으며, 서버(160) 역시 네트워크(170)를 통해 접속한 복수의 전자 기기들(110, 120, 130, 140)로 제2 서비스를 제공하는 시스템일 수 있다. 보다 구체적인 예로, 서버(150)는 복수의 전자 기기들(110, 120, 130, 140)에 설치되어 구동되는 컴퓨터 프로그램으로서의 어플리케이션을 통해, 해당 어플리케이션이 목적하는 서비스(일례로, 동영상 서비스 등)를 제1 서비스로서 복수의 전자 기기들(110, 120, 130, 140)로 제공할 수 있다. 다른 예로, 서버(160)는 상술한 어플리케이션의 설치 및 구동을 위한 파일을 복수의 전자 기기들(110, 120, 130, 140)로 배포하는 서비스를 제2 서비스로서 제공할 수 있다.Each of the servers (150, 160) may be implemented as a computer device or multiple computer devices that communicate with multiple electronic devices (110, 120, 130, 140) through a network (170) to provide commands, codes, files, contents, services, etc. For example, the server (150) may be a system that provides a first service to multiple electronic devices (110, 120, 130, 140) connected through a network (170), and the server (160) may also be a system that provides a second service to multiple electronic devices (110, 120, 130, 140) connected through a network (170). As a more specific example, the server (150) may provide a service (e.g., a video service, etc.) intended by the application as a first service to the plurality of electronic devices (110, 120, 130, 140) through an application as a computer program installed and operated on the plurality of electronic devices (110, 120, 130, 140). As another example, the server (160) may provide a service of distributing a file for installing and operating the above-described application to the plurality of electronic devices (110, 120, 130, 140) as a second service.

도 2는 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다. 앞서 설명한 복수의 전자 기기들(110, 120, 130, 140) 각각이나 서버들(150, 160) 각각은 도 2를 통해 도시된 컴퓨터 장치(200)에 의해 구현될 수 있다.FIG. 2 is a block diagram illustrating an example of a computer device according to an embodiment of the present invention. Each of the plurality of electronic devices (110, 120, 130, 140) or servers (150, 160) described above can be implemented by the computer device (200) illustrated in FIG. 2.

이러한 컴퓨터 장치(200)는 도 2에 도시된 바와 같이, 메모리(210), 프로세서(220), 통신 인터페이스(230) 그리고 입출력 인터페이스(240)를 포함할 수 있다. 메모리(210)는 컴퓨터에서 판독 가능한 기록매체로서, RAM(random access memory), ROM(read only memory) 및 디스크 드라이브와 같은 비소멸성 대용량 기록장치(permanent mass storage device)를 포함할 수 있다. 여기서 ROM과 디스크 드라이브와 같은 비소멸성 대용량 기록장치는 메모리(210)와는 구분되는 별도의 영구 저장 장치로서 컴퓨터 장치(200)에 포함될 수도 있다. 또한, 메모리(210)에는 운영체제와 적어도 하나의 프로그램 코드가 저장될 수 있다. 이러한 소프트웨어 구성요소들은 메모리(210)와는 별도의 컴퓨터에서 판독 가능한 기록매체로부터 메모리(210)로 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독 가능한 기록매체는 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독 가능한 기록매체를 포함할 수 있다. 다른 실시예에서 소프트웨어 구성요소들은 컴퓨터에서 판독 가능한 기록매체가 아닌 통신 인터페이스(230)를 통해 메모리(210)에 로딩될 수도 있다. 예를 들어, 소프트웨어 구성요소들은 네트워크(170)를 통해 수신되는 파일들에 의해 설치되는 컴퓨터 프로그램에 기반하여 컴퓨터 장치(200)의 메모리(210)에 로딩될 수 있다.The computer device (200) may include a memory (210), a processor (220), a communication interface (230), and an input/output interface (240), as illustrated in FIG. 2. The memory (210) may be a computer-readable storage medium, and may include a random access memory (RAM), a read only memory (ROM), and a permanent mass storage device such as a disk drive. Here, the permanent mass storage devices such as the ROM and the disk drive may be included in the computer device (200) as a separate permanent storage device distinct from the memory (210). In addition, the memory (210) may store an operating system and at least one program code. These software components may be loaded into the memory (210) from a computer-readable storage medium separate from the memory (210). The separate computer-readable storage medium may include a computer-readable storage medium such as a floppy drive, a disk, a tape, a DVD/CD-ROM drive, a memory card, etc. In another embodiment, the software components may be loaded into the memory (210) via a communication interface (230) other than a computer-readable recording medium. For example, the software components may be loaded into the memory (210) of the computer device (200) based on a computer program that is installed by files received over a network (170).

프로세서(220)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(210) 또는 통신 인터페이스(230)에 의해 프로세서(220)로 제공될 수 있다. 예를 들어 프로세서(220)는 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다.The processor (220) may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input/output operations. The instructions may be provided to the processor (220) by the memory (210) or the communication interface (230). For example, the processor (220) may be configured to execute instructions received according to program code stored in a storage device such as the memory (210).

통신 인터페이스(230)는 네트워크(170)를 통해 컴퓨터 장치(200)가 다른 장치(일례로, 앞서 설명한 저장 장치들)와 서로 통신하기 위한 기능을 제공할 수 있다. 일례로, 컴퓨터 장치(200)의 프로세서(220)가 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청이나 명령, 데이터, 파일 등이 통신 인터페이스(230)의 제어에 따라 네트워크(170)를 통해 다른 장치들로 전달될 수 있다. 역으로, 다른 장치로부터의 신호나 명령, 데이터, 파일 등이 네트워크(170)를 거쳐 컴퓨터 장치(200)의 통신 인터페이스(230)를 통해 컴퓨터 장치(200)로 수신될 수 있다. 통신 인터페이스(230)를 통해 수신된 신호나 명령, 데이터 등은 프로세서(220)나 메모리(210)로 전달될 수 있고, 파일 등은 컴퓨터 장치(200)가 더 포함할 수 있는 저장 매체(상술한 영구 저장 장치)로 저장될 수 있다.The communication interface (230) may provide a function for the computer device (200) to communicate with other devices (for example, the storage devices described above) via the network (170). For example, requests, commands, data, files, etc. generated by the processor (220) of the computer device (200) according to program codes stored in a recording device such as the memory (210) may be transmitted to other devices via the network (170) under the control of the communication interface (230). Conversely, signals, commands, data, files, etc. from other devices may be received by the computer device (200) via the communication interface (230) of the computer device (200) via the network (170). Signals, commands, data, etc. received via the communication interface (230) may be transmitted to the processor (220) or the memory (210), and files, etc. may be stored in a storage medium (the permanent storage device described above) that the computer device (200) may further include.

입출력 인터페이스(240)는 입출력 장치(250)와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 입력 장치는 마이크, 키보드 또는 마우스 등의 장치를, 그리고 출력 장치는 디스플레이, 스피커와 같은 장치를 포함할 수 있다. 다른 예로 입출력 인터페이스(240)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수도 있다. 입출력 장치(250)는 컴퓨터 장치(200)와 하나의 장치로 구성될 수도 있다.The input/output interface (240) may be a means for interfacing with an input/output device (250). For example, the input device may include a device such as a microphone, a keyboard, or a mouse, and the output device may include a device such as a display or a speaker. As another example, the input/output interface (240) may be a means for interfacing with a device that integrates input and output functions into one, such as a touch screen. The input/output device (250) may be configured as a single device with the computer device (200).

또한, 다른 실시예들에서 컴퓨터 장치(200)는 도 2의 구성요소들보다 더 적은 혹은 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 컴퓨터 장치(200)는 상술한 입출력 장치(250) 중 적어도 일부를 포함하도록 구현되거나 또는 트랜시버(transceiver), 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수도 있다.Also, in other embodiments, the computer device (200) may include fewer or more components than the components of FIG. 2. However, it is not necessary to explicitly illustrate most of the conventional components. For example, the computer device (200) may be implemented to include at least some of the input/output devices (250) described above, or may further include other components such as a transceiver, a database, etc.

도 3은 본 발명의 일실시예에 따른 이미지 처리 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 이미지 처리 방법은 컴퓨터 장치(200)에 의해 수행될 수 있다. 이때, 컴퓨터 장치(200)의 프로세서(220)는 메모리(210)가 포함하는 운영체제의 코드나 적어도 하나의 컴퓨터 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(220)는 컴퓨터 장치(200)에 저장된 코드가 제공하는 제어 명령에 따라 컴퓨터 장치(200)가 도 3의 방법이 포함하는 단계들(310 내지 340)을 수행하도록 컴퓨터 장치(200)를 제어할 수 있다.FIG. 3 is a flowchart illustrating an example of an image processing method according to an embodiment of the present invention. The image processing method according to the present embodiment may be performed by a computer device (200). At this time, the processor (220) of the computer device (200) may be implemented to execute a control instruction according to a code of an operating system included in the memory (210) or a code of at least one computer program. Here, the processor (220) may control the computer device (200) to perform steps (310 to 340) included in the method of FIG. 3 according to a control instruction provided by a code stored in the computer device (200).

단계(310)에서 컴퓨터 장치(200)는 사람의 얼굴을 포함하는 입력 이미지의 입술 영역에 대한 휘도(luminance) 이미지를 생성할 수 있다. 이러한 휘도 이미지는 립스틱 질감을 표현하기 위해 이용될 수 있다. 일례로, 컴퓨터 장치(200)는 휘도 이미지의 생성을 위해 서로 다른 밝기로 조절된 두 개의 휘도 이미지들에 각각 블러 효과를 적용할 수 있으며, 두 휘도 이미지들을 결합함으로써, 최종 휘도 이미지를 생성할 수 있다. 휘도 이미지를 생성하는 구체적인 방법에 대해서는 이후 도 4 및 도 5를 통해 더욱 자세히 설명한다.In step (310), the computer device (200) can generate a luminance image for a lip area of an input image including a human face. This luminance image can be used to express a lipstick texture. For example, the computer device (200) can apply a blur effect to two luminance images adjusted to different brightnesses to generate a luminance image, and can generate a final luminance image by combining the two luminance images. A specific method for generating a luminance image will be described in more detail later with reference to FIGS. 4 and 5.

단계(320)에서 컴퓨터 장치(200)는 립스틱 도표 영역을 조절하기 위한 립 마스크 이미지를 생성할 수 있다. 일례로, 컴퓨터 장치(200)는 입술 영역을 표시하도록 생성된 립 세그먼테이션(lip segmentation) 이미지와 얼굴 랜드마크로부터 입 안쪽 영역을 표시하도록 생성된 입 안쪽 영역 마스크를 이용하여 립스틱 도표 영역이 조절된 립 마스크 이미지를 생성할 수 있다. 립 마스크 이미지를 생성하기 위한 구체적인 방법에 대해서는 이후 도 6 및 도 7을 통해 더욱 자세히 설명한다. In step (320), the computer device (200) can generate a lip mask image for adjusting a lipstick diagram area. For example, the computer device (200) can generate a lip mask image with an adjusted lipstick diagram area by using a lip segmentation image generated to indicate a lip area and an inner mouth area mask generated to indicate an inner mouth area from a facial landmark. A specific method for generating a lip mask image will be described in more detail later with reference to FIGS. 6 and 7.

단계(330)에서 컴퓨터 장치(200)는 입력 이미지에 휘도 이미지의 휘도 값과 기설정된 임계값에 따라 서로 다른 밝기의 색상을 블렌딩할 수 있다. 일례로, 컴퓨터 장치(200)는 휘도 이미지의 픽셀의 휘도 값과 기설정된 임계값에 따라 입력 이미지의 픽셀에 특정 밝기의 색상을 블렌딩할 수 있다. 이러한 색상의 블렌딩에 대해서는 이후 도 8을 통해 더욱 자세히 설명한다.In step (330), the computer device (200) can blend colors of different brightnesses in the input image according to the brightness value of the brightness image and a preset threshold value. For example, the computer device (200) can blend a color of a specific brightness in the pixels of the input image according to the brightness value of the pixels of the brightness image and a preset threshold value. Such color blending will be described in more detail later with reference to FIG. 8.

단계(340)에서 컴퓨터 장치(200)는 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 립 마스크 이미지를 블렌딩할 수 있다. 이때, 컴퓨터 장치(200)는 입력 이미지 전체가 아닌 립 마스크 이미지의 영역에 필터가 적용되도록 하기 위해, 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 립 마스크 이미지를 블렌딩할 수 있다. 일례로, 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 립 마스크 이미지는 알파 블렌드(alpha blend)를 통해 블렌딩될 수 있으나, 이에 한정되는 것은 아니다.In step (340), the computer device (200) may blend the input image in which colors of different brightnesses are blended and the lip mask image. At this time, the computer device (200) may blend the input image in which colors of different brightnesses are blended and the lip mask image so that the filter is applied to an area of the lip mask image rather than the entire input image. For example, the input image in which colors of different brightnesses are blended and the lip mask image may be blended through alpha blend, but is not limited thereto.

도 4는 본 발명의 일실시예에 있어서, 휘도 이미지를 생성하는 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 방법의 단계들(410 내지 450)은 앞서 도 3을 통해 설명한 단계(310)에 포함되어 컴퓨터 장치(200)에 의해 수행될 수 있다.FIG. 4 is a flowchart illustrating an example of a method for generating a luminance image according to an embodiment of the present invention. Steps (410 to 450) of the method according to the present embodiment may be included in step (310) described above with reference to FIG. 3 and may be performed by a computer device (200).

단계(410)에서 컴퓨터 장치(200)는 입력 이미지의 입술 영역에 대한 그레이 스케일(gray scale) 이미지를 생성할 수 있다. 이미지에 대한 그레이 스케일 이미지를 생성하는 방법은 잘 알려져 있기 때문에 구체적인 설명은 생략한다.In step (410), the computer device (200) can generate a gray scale image for the lip area of the input image. Since the method for generating a gray scale image for an image is well known, a detailed description is omitted.

단계(420)에서 컴퓨터 장치(200)는 그레이 스케일 이미지를 복제하여 제1 휘도 이미지 및 제2 휘도 이미지를 생성할 수 있다. 일례로, 단계(410)에서 생성된 그레이 스케일 이미지가 제1 휘도 이미지가 될 수 있으며, 그레이 스케일 이미지를 복제한 이미지가 제2 휘도 이미지가 될 수 있다.In step (420), the computer device (200) can generate a first luminance image and a second luminance image by replicating the gray scale image. For example, the gray scale image generated in step (410) can become the first luminance image, and an image that is a replica of the gray scale image can become the second luminance image.

단계(430)에서 컴퓨터 장치(200)는 제1 휘도 이미지의 밝기를 제1 정도로 변경하고, 블러 효과를 적용할 수 있다. 일례로, 컴퓨터 장치(200)는 제1 휘도 이미지의 밝기를 제1 정도로 변경하기 위해, 제1 휘도 이미지에 톤 커브 에디팅(tone curve editing)을 적용한 후, 가우시안 블러(Gaussian blur)를 적용할 수 있다.In step (430), the computer device (200) may change the brightness of the first luminance image to the first degree and apply a blur effect. For example, the computer device (200) may apply tone curve editing to the first luminance image and then apply Gaussian blur to change the brightness of the first luminance image to the first degree.

단계(440)에서 컴퓨터 장치(200)는 제2 휘도 이미지의 밝기를 제2 정도로 변경하고, 블러 효과를 적용할 수 있다. 이 경우, 컴퓨터 장치(200)는 제2 휘도 이미지의 밝기를 제2 정도로 변경하기 위해, 제2 휘도 이미지에 톤 커브 에디팅을 적용한 후, 가우시안 블러를 적용할 수 있다.In step (440), the computer device (200) may change the brightness of the second luminance image to the second degree and apply a blur effect. In this case, the computer device (200) may apply tone curve editing to the second luminance image and then apply Gaussian blur to change the brightness of the second luminance image to the second degree.

이상에서는 블러 효과의 적용을 위한 예시로 가우시안 블러의 사용을 설명하고 있으나, 블러 효과가 가우시안 블러로 한정되는 것은 아니다. 일례로, 레이디얼 블러(radial blur), 스마트 블러(smart blur) 등과 같이 이미 잘 알려진 다양한 블러 효과들 중 적어도 하나가 활용될 수 있다.The above illustrates the use of Gaussian blur as an example for applying a blur effect, but the blur effect is not limited to Gaussian blur. For example, at least one of the various blur effects that are already well known, such as radial blur and smart blur, can be utilized.

이때, 립스틱을 표현하는 모델을 정의할 때, 두 가지 서로 다른 톤 커브 에디팅의 속성이 정의될 수 있으며, 제1 정도는 제1 휘도 이미지의 밝기를 증감시키는 정도를, 제2 정도는 제2 휘도 이미지의 밝기를 증감시키는 정도를 각각 포함할 수 있으며, 제1 정도와 제2 정도는 서로 상이할 수 있다. 이 경우, 컴퓨터 장치(200)는 제1 휘도 이미지와 제2 휘도 이미지에 각각 서로 다른 톤 커브 에디팅을 적용함으로써, 제1 휘도 이미지의 밝기와 제2 휘도 이미지의 밝기를 제1 정도 및 제2 정도와 같이 각각 서로 다른 정도로 변경할 수 있다.At this time, when defining a model expressing a lipstick, two different properties of tone curve editing can be defined, and the first degree can include a degree to which the brightness of the first luminance image is increased or decreased, and the second degree can include a degree to which the brightness of the second luminance image is increased or decreased, respectively, and the first degree and the second degree can be different from each other. In this case, the computer device (200) can change the brightness of the first luminance image and the brightness of the second luminance image to different degrees, such as the first degree and the second degree, respectively, by applying different tone curve editing to the first luminance image and the second luminance image, respectively.

단계(450)에서 컴퓨터 장치(200)는 블러 효과가 적용된 제1 휘도 이미지 및 제2 휘도 이미지를 블렌딩하여 휘도 이미지를 생성할 수 있다. 이때, 컴퓨터 장치(200)는 제1 휘도 이미지 및 제2 휘도 이미지를 애디티브 블렌드(additive blend)를 이용하여 블렌딩할 수 있으나 이에 한정되는 것은 아니다.In step (450), the computer device (200) can generate a luminance image by blending the first luminance image and the second luminance image to which the blur effect is applied. At this time, the computer device (200) can blend the first luminance image and the second luminance image using additive blending, but is not limited thereto.

이처럼 두 휘도 이미지들을 블렌딩하여 최종 휘도 이미지를 생성함으로써, 2D 이미지를 3D 이미지와 같이 처리하여 스페큘러(specular) 영역과 디퓨즈(diffuse) 영역을 추출하고 각각에 대해 명암을 조절하고 흐릿함을 조절한 최종 휘도 이미지를 얻을 수 있다.By blending two luminance images in this way to generate a final luminance image, the 2D image can be processed like a 3D image, extracting the specular area and the diffuse area, and adjusting the brightness and blur for each area to obtain a final luminance image.

도 5는 본 발명의 일실시예에 있어서, 휘도 이미지를 생성하는 과정의 예를 도시한 도면이다. 컴퓨터 장치(200)는 입력 이미지(input image, 502), 입술의 크기에 대한 정보를 포함하는 립 익스텐트(lip extent, 504) 및 입술 영역을 표시하도록 생성된 립 세그먼테이션(lip segmentation, 506)을 입력으로 받을 수 있다. 컴퓨터 장치는 입력 이미지(502)의 얼굴 랜드마크에 대한 정보를 더 입력받을 수 있으나, 얼굴 랜드마크에 대해서는 이후 더욱 자세히 설명한다.FIG. 5 is a diagram illustrating an example of a process for generating a luminance image according to an embodiment of the present invention. A computer device (200) may receive as input an input image (502), a lip extent (504) including information about the size of lips, and a lip segmentation (506) generated to indicate a lip area. The computer device may further receive information about facial landmarks of the input image (502), but the facial landmarks will be described in more detail later.

컴퓨터 장치(200)는 먼저 입력 이미지(502)에 스킨 스무스 파라미터(skin smooth parameter, 508)를 적용하여 스킨 스무스 이미지(skin smooth image, 510)를 생성할 수 있다. 이후, 컴퓨터 장치(200)는 입력 이미지(502)와 스킨 스무스 이미지(510)를 이용하여 입술 POI 이미지(lip POI(Point Of Interest) image, 512)를 생성할 수 있다. 이때, 입술 POI 이미지(512)의 생성을 위해, 립 익스텐트(504)와 처리된 립 세그먼테이션(processed lip segmentation, 514)가 더 이용될 수 있다. 처리된 립 세그먼테이션(514)은 립 세그먼테이션(506)에 대한 블러 처리를 통해 얻어질 수 있다.The computer device (200) can first apply a skin smooth parameter (skin smooth parameter, 508) to the input image (502) to generate a skin smooth image (skin smooth image, 510). Thereafter, the computer device (200) can generate a lip POI image (lip POI (Point Of Interest) image, 512) using the input image (502) and the skin smooth image (510). At this time, for generating the lip POI image (512), a lip extent (504) and a processed lip segmentation (processed lip segmentation, 514) can be further used. The processed lip segmentation (514) can be obtained through blur processing on the lip segmentation (506).

이후, 컴퓨터 장치(200)는 입술 POI 이미지(512)에 대한 그레이 스케일 이미지(gray scale image, 514)를 생성할 수 있으며, 생성된 그레이 스케일 이미지(514)를 복제하여 제1 휘도 이미지(미도시)와 제2 휘도 이미지(미도시)를 생성할 수 있다. 이때, 제1 휘도 이미지와 제2 휘도 이미지는 실질적으로 그레이 스케일 이미지(514)와 동일하기 때문에 별도로 도시하지 않았다.Thereafter, the computer device (200) can generate a gray scale image (514) for the lip POI image (512), and can duplicate the generated gray scale image (514) to generate a first luminance image (not shown) and a second luminance image (not shown). At this time, the first luminance image and the second luminance image are not shown separately because they are substantially the same as the gray scale image (514).

이때, 컴퓨터 장치(200)는 제1 휘도 이미지와 제2 휘도 이미지에 각각 톤 커브 에디팅을 적용하여 제1 톤 커브 조절 이미지(first tone curve adjusted image, 518) 및 제2 톤 커브 조절 이미지(second tone curve adjusted image, 520)를 얻을 수 있다. 이미 설명한 바와 같이 제1 휘도 이미지와 제2 휘도 이미지는 각각 서로 다른 톤 커브 에디팅이 적용되어 밝기가 서로 다르게 조절될 수 있다. 일례로, 컴퓨터 장치(200)는 제1 휘도 이미지의 밝기를 더 어둡게 조절하여 제1 톤 커브 조절 이미지(518)를 생성할 수 있으며, 제2 휘도 이미지의 밝기를 더 밝게 조절하여 제2 톤 커브 조절 이미지(518)를 생성할 수 있다.At this time, the computer device (200) can apply tone curve editing to the first luminance image and the second luminance image, respectively, to obtain a first tone curve adjusted image (first tone curve adjusted image, 518) and a second tone curve adjusted image (second tone curve adjusted image, 520). As described above, the first luminance image and the second luminance image can have different brightnesses adjusted by applying different tone curve editing to each other. For example, the computer device (200) can generate the first tone curve adjusted image (518) by adjusting the brightness of the first luminance image to be darker, and can generate the second tone curve adjusted image (518) by adjusting the brightness of the second luminance image to be brighter.

또한, 컴퓨터 장치(200)는 제1 톤 커브 조절 이미지(518) 및 제2 톤 커브 조절 이미지(518)에 각각 가우시안 블러를 적용하여 제1 가우시안 블러드 이미지(first Gaussian blurred image, 522)와 제2 가우시안 블러드 이미지(second Gaussian blurred image, 524)를 얻을 수 있다. 제1 톤 커브 조절 이미지(518) 및 제2 톤 커브 조절 이미지(518) 각각에 적용되는 가우시안 블러는 동일한 블러 효과가 적용될 수 있으나 실시예에 따라 서로 다른 블러 정도를 적용하는 것 역시 고려될 수 있다.In addition, the computer device (200) can apply Gaussian blur to the first tone curve adjustment image (518) and the second tone curve adjustment image (518), respectively, to obtain a first Gaussian blurred image (522) and a second Gaussian blurred image (524). The Gaussian blur applied to each of the first tone curve adjustment image (518) and the second tone curve adjustment image (518) may have the same blur effect, but applying different blur degrees may also be considered depending on the embodiment.

이후, 컴퓨터 장치(200)는 제1 가우시안 블러드 이미지(522)와 제2 가우시안 블러드 이미지(524)를 애디티브 블렌딩함으로써, 애디티브 블렌디드 이미지(additive blended image, 526)를 휘도 이미지로서 얻을 수 있다.Thereafter, the computer device (200) can obtain an additive blended image (526) as a luminance image by additively blending the first Gaussian blood image (522) and the second Gaussian blood image (524).

도 6은 본 발명의 일실시예에 있어서, 립 마스크 이미지를 생성하는 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 방법의 단계들(610 내지 630)은 앞서 도 3을 통해 설명한 단계(320)에 포함되어 컴퓨터 장치(200)에 의해 수행될 수 있다.FIG. 6 is a flowchart illustrating an example of a method for generating a lip mask image according to an embodiment of the present invention. Steps (610 to 630) of the method according to the present embodiment may be included in step (320) described above through FIG. 3 and may be performed by a computer device (200).

단계(610)에서 컴퓨터 장치(200)는 입력 이미지에서 입술 영역을 표시하도록 생성된 립 세그먼테이션 이미지와 입력 이미지의 얼굴 랜드마크로부터 입 안쪽 영역을 표시하도록 생성된 입 안쪽 영역 마스크를 블렌딩하여 입 안쪽 영역을 포함하는 제1 립 마스크 이미지를 생성할 수 있다. 이때, 컴퓨터 장치(200)는 립 세그먼테이션 이미지와 입 안쪽 영역 마스크를 애디티브 블렌딩함으로써, 제1 립 마스크 이미지를 생성할 수 있다. 이때, 입 안쪽 영역 마스크는 얼굴 랜드마크를 이용하여 생성될 수 있다.In step (610), the computer device (200) can generate a first lip mask image including the inside of the mouth area by blending a lip segmentation image generated to indicate a lip area in the input image and an inner mouth area mask generated to indicate an inner mouth area from facial landmarks of the input image. At this time, the computer device (200) can generate the first lip mask image by additively blending the lip segmentation image and the inner mouth area mask. At this time, the inner mouth area mask can be generated using facial landmarks.

단계(620)에서 컴퓨터 장치(200)는 제1 립 마스크 이미지에 블러 효과를 적용하고, 밝기를 조정하여 제2 립 마스크 이미지를 생성할 수 있다. 일례로, 블러 효과의 적용은 앞서 설명한 가우시안 블러의 적용을 통해 이루어질 수 있으며, 밝기의 조절은 톤 커브 에디팅을 통해 이루어질 수 있다. 이때, 컴퓨터 장치(200)는 톤 커브 에디팅의 적용 전에 입술 영역이 효과적으로 줄어들 수 있도록 제1 립 마스크 이미지에 가우시안 블러를 먼저 적용할 수 있으며, 이후 가우시안 블러가 적용된 제1 립 마스크 이미지에 톤 커브 에디팅을 적용하여 가우시안 블러의 적용 분포를 조절하고 명도를 낮춰 입술 영역을 줄일 수 있다. In step (620), the computer device (200) can apply a blur effect to the first lip mask image and adjust brightness to generate a second lip mask image. For example, the application of the blur effect can be accomplished by applying the Gaussian blur described above, and the adjustment of brightness can be accomplished by tone curve editing. At this time, the computer device (200) can first apply Gaussian blur to the first lip mask image so that the lip area can be effectively reduced before applying the tone curve editing, and then apply tone curve editing to the first lip mask image to which the Gaussian blur has been applied to adjust the application distribution of the Gaussian blur and lower the brightness to reduce the lip area.

단계(630)에서 컴퓨터 장치(200)는 립 세그먼테이션 이미지에 블러 효과를 적용하고 반전한 뒤, 제2 마스크 이미지와 서브트랙트 블렌딩(subtract blending)하여 입 안쪽 영역이 다시 제거된 제3 립 마스크 이미지를 생성할 수 있다. 일례로, 립 세그먼테이션 이미지에 블러 효과를 적용한 이미지가 앞서 도 5를 통해 설명한 처리된 립 세그먼테이션(514)일 수 있으며, 컴퓨터 장치(200)는 이러한 처리된 립 세그먼테이션(514)을 반전하여 반전된 립 세그먼테이션을 얻을 수 있다. 이후, 컴퓨터 장치(200)는 이러한 반전된 립 세그먼테이션과 제2 마스크 이미지에 대한 서브트랙트 블렌딩을 통해 입 안쪽 영역이 다시 제거된 제3 립 마스크 이미지를 생성할 수 있다. 다시 말해, 블러 효과와 톤 커브 에디팅을 통해 입술 영역을 줄여 립스틱 도포 영역에 해당하는 립 마스크 이미지를 얻을 수 있게 된다.In step (630), the computer device (200) can apply a blur effect to the lip segmentation image, invert it, and then perform subtract blending with the second mask image to generate a third lip mask image from which the inner mouth area has been removed again. For example, the image to which the blur effect has been applied to the lip segmentation image may be the processed lip segmentation (514) described above with reference to FIG. 5, and the computer device (200) can invert the processed lip segmentation (514) to obtain an inverted lip segmentation. Thereafter, the computer device (200) can generate a third lip mask image from which the inner mouth area has been removed again through subtract blending with the inverted lip segmentation and the second mask image. In other words, the lip area can be reduced through the blur effect and tone curve editing to obtain a lip mask image corresponding to the lipstick application area.

도 7은 본 발명의 일실시예에 있어서, 립 마스크 이미지를 생성하는 과정의 예를 도시한 도면이다. 컴퓨터 장치(200)는 앞서 설명한 바와 같이 입력 이미지(일례로, 입력 이미지(502))에 포함된 얼굴에 대한 얼굴 랜드마크(face landmark, 702)를 입력으로 더 활용할 수 있다. 이때, 컴퓨터 장치(200)는 얼굴 랜드마크(702)로부터 입 안쪽 영역을 표시하도록 생성된 이너 립 마스크(inner lip mask, 704)를 생성할 수 있다.FIG. 7 is a diagram illustrating an example of a process for generating a lip mask image according to an embodiment of the present invention. As described above, the computer device (200) may further utilize a face landmark (702) for a face included in an input image (for example, an input image (502)) as an input. At this time, the computer device (200) may generate an inner lip mask (704) generated to indicate an inner area of the mouth from the face landmark (702).

이후, 컴퓨터 장치(200)는 이너 립 마스크(704)와 립 세그먼테이션(506)을 애디티브 블렌딩하여 입 안쪽 영역을 포함하는 제1 립 마스크 이미지(미도시)를 생성할 수 있다. 도 7은 컴퓨터 장치(200)가 이러한 제1 립 마스크 이미지에 가우시안 블러를 적용함으로써, 블러드 마스크(blurred mask, 706)를 생성하는 예를 나타내고 있다. 또한, 컴퓨터 장치(200)는 블러드 마스크(706)에 톤 커브 에디팅을 적용하여 톤 커브 적용 마스크(tone curve adjusted mask, 708)를 생성할 수 있다.Thereafter, the computer device (200) can generate a first lip mask image (not shown) including an inner mouth area by additively blending the inner lip mask (704) and the lip segmentation (506). FIG. 7 shows an example in which the computer device (200) generates a blurred mask (706) by applying a Gaussian blur to the first lip mask image. In addition, the computer device (200) can generate a tone curve adjusted mask (708) by applying tone curve editing to the blurred mask (706).

한편, 컴퓨터 장치(200)는 처리된 립 세그먼테이션(514)을 반전하여 반전된 립 세그먼테이션(710)을 생성할 수 있다. 이 경우, 컴퓨터 장치(200)는 반전된 립 세그먼테이션(710)과 톤 커브 적용 마스크(708)간의 서브트랙트 블렌딩을 통해 최종 립 마스크(720)를 얻을 수 있다. 이때, 최종 립 마스크(720)는 립스틱 도포 영역을 나타내는 필터의 역할을 할 수 있으며, 블러와 톤 커브 에디팅을 통해 립 세그먼테이션(506)이 보여주는 입술 영역보다 줄어든 립스틱 도포 영역이 얻어졌음을 알 수 있다. 컴퓨터 장치(200)는 블러와 톤 커브 에디팅의 정도를 통해 입술 영역에서 보다 다양하게 립스틱 도포 영역을 조절하여 얻을 수 있다.Meanwhile, the computer device (200) can invert the processed lip segmentation (514) to generate an inverted lip segmentation (710). In this case, the computer device (200) can obtain a final lip mask (720) through subtract blending between the inverted lip segmentation (710) and the tone curve application mask (708). At this time, the final lip mask (720) can act as a filter indicating a lipstick application area, and it can be seen that a lipstick application area that is reduced compared to the lip area shown by the lip segmentation (506) is obtained through blur and tone curve editing. The computer device (200) can obtain a more diverse lipstick application area in the lip area by adjusting the degree of blur and tone curve editing.

도 8은 본 발명의 일실시예에 있어서, 서로 다른 밝기의 색상을 블렌딩하는 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 방법의 단계들(810 및 820)은 앞서 도 3을 통해 설명한 단계(330)에 포함되어 컴퓨터 장치(200)에 의해 수행될 수 있다. 이때, 단계(330)에서 설명한 기설정된 임계값은 순차적으로 더 큰 값을 갖는 제1 임계값(LowerDarkThreshold), 제2 임계값(UpperDarkThreshold), 제3 임계값(LowerLightThreshold) 및 제4 임계값(UpperLightThreshold)을 포함할 수 있다. 다시 말해, 제1 임계값보다 제2 임계값이, 제2 임계값보다 제3 임계값이, 제3 임계값보다 제4 임계값이 더 클 수 있다.FIG. 8 is a flowchart illustrating an example of a method for blending colors of different brightness according to an embodiment of the present invention. Steps (810 and 820) of the method according to the present embodiment may be included in step (330) described above with reference to FIG. 3 and performed by the computer device (200). At this time, the preset threshold values described in step (330) may include a first threshold value (LowerDarkThreshold), a second threshold value (UpperDarkThreshold), a third threshold value (LowerLightThreshold), and a fourth threshold value (UpperLightThreshold) that sequentially have larger values. In other words, the second threshold value may be larger than the first threshold value, the third threshold value may be larger than the second threshold value, and the fourth threshold value may be larger than the third threshold value.

단계(810)에서 컴퓨터 장치(200)는 휘도 이미지의 휘도 값, 제1 임계값 및 제2 임계값에 기반하여 입력 이미지에 제1 밝기의 색상을 블렌딩할 수 있다. 여기서 색상은 입력 이미지에 적용하고자 하는 립스틱의 색상일 수 있으며, 휘도 값에 따라 서로 다른 밝기의 동일한 색상이 대응하는 픽셀에 블렌딩될 수 있다. 이때, 제1 밝기는 이후 설명될 제2 밝기보다 상대적으로 어두운 밝기일 수 있다. 제1 밝기의 색상을 다크 컬러(dark color)로 표현할 수 있으며, 다크 컬러는 이후 단계(811) 및 단계(812)를 통해 설명되는 블렌드 방식(partial multiply blend)을 통해 블렌딩될 수 있다. 또한, 제2 밝기의 색상은 라이트 컬러(light color)로 표현할 수 있으며, 라이트 컬러는 이후 단계(820)이 포함하는 단계들(821 및 822)를 통해 설명되는 블렌드 방식(partial screen blend)을 통해 블렌딩 될 수 있다.In step (810), the computer device (200) may blend a color of a first brightness to the input image based on a brightness value of the brightness image, a first threshold value, and a second threshold value. Here, the color may be a color of a lipstick to be applied to the input image, and the same color of different brightness may be blended to corresponding pixels according to the brightness value. At this time, the first brightness may be a brightness that is relatively darker than the second brightness, which will be described later. The color of the first brightness may be expressed as a dark color, and the dark color may be blended through a blending method (partial multiply blend) described later through steps (811) and (812). In addition, the color of the second brightness may be expressed as a light color, and the light color may be blended through a blending method (partial screen blend) described later through steps (821 and 822) included in step (820).

단계(811)에서 컴퓨터 장치(200)는 휘도 이미지에서 제1 픽셀의 휘도 값이 제1 임계값 미만인 경우, 입력 이미지에서 제1 픽셀에 대응하는 제2 픽셀에 제1 밝기의 색상을 블렌딩할 수 있다. 여기서 색상은 입력 이미지에 적용하고자 하는 립스틱의 색상일 수 있으며, 휘도 값에 따라 서로 다른 밝기의 동일한 색상이 대응하는 픽셀에 블렌딩될 수 있다(100% partial multiply blend).In step (811), the computer device (200) may blend a color of a first brightness to a second pixel corresponding to the first pixel in the input image if the brightness value of the first pixel in the brightness image is less than a first threshold value. Here, the color may be a color of a lipstick to be applied to the input image, and the same color of different brightness may be blended to the corresponding pixel according to the brightness value (100% partial multiply blend).

단계(812)에서 컴퓨터 장치(200)는 휘도 이미지에서 제1 픽셀의 휘도 값이 제1 임계값 및 제2 임계값에 의해 결정되는 범위에 포함되는 경우, 입력 이미지에서 제1 픽셀에 대응하는 제2 픽셀에 제1 밝기를 선형 보간한 색상을 블렌딩할 수 있다. 이때, 선형 보간된 제1 밝기는 제1 픽셀의 휘도 값이 제1 임계값에 가까울수록 100 %, 그리고 제2 임계값에 가까울수록 0%가 되도록 선형 보간될 수 있다. 예를 들어, 제1 임계값 및 제2 임계값에 의해 결정되는 범위에 포함되는 휘도 값이 작을수록 제2 픽셀에 상대적으로 더 어두운 색상이 블렌딩될 수 있다. 또한, 제1 임계값 및 제2 임계값에 의해 결정되는 범위에 포함되는 휘도 값이 클수록 제2 픽셀에 상대적으로 더 밝은 색상이 블렌딩될 수 있다.In step (812), the computer device (200) may blend a color obtained by linearly interpolating the first brightness to a second pixel corresponding to the first pixel in the input image when the brightness value of the first pixel in the brightness image is included in a range determined by the first threshold value and the second threshold value. At this time, the linearly interpolated first brightness may be linearly interpolated so that the brightness value of the first pixel becomes 100% as it gets closer to the first threshold value, and becomes 0% as it gets closer to the second threshold value. For example, a relatively darker color may be blended to the second pixel as a brightness value included in the range determined by the first threshold value and the second threshold value becomes smaller. Additionally, a relatively brighter color may be blended to the second pixel as a brightness value included in the range determined by the first threshold value and the second threshold value becomes larger.

한편, 휘도 이미지에서 제1 픽셀의 휘도 값이 제2 임계값보다 큰 경우에는 입력 이미지에서 제1 픽셀에 대응하는 제2 픽셀에 색상의 블렌딩이 이루어지지 않을 수 있다(0% partial multiply blend).Meanwhile, if the luminance value of the first pixel in the luminance image is greater than the second threshold value, color blending may not occur in the second pixel corresponding to the first pixel in the input image (0% partial multiply blend).

단계(820)에서 컴퓨터 장치(200)는 휘도 이미지의 휘도 값, 제3 임계값 및 제4 임계값에 기반하여 입력 이미지에 제2 밝기의 색상을 블렌딩할 수 있다. 이미 설명한 바와 같이 색상은 입력 이미지에 적용하고자 하는 립스틱의 색상일 수 있으며, 휘도 값에 따라 서로 다른 밝기의 동일한 색상이 대응하는 픽셀에 블렌딩될 수 있다.At step (820), the computer device (200) can blend a color of second brightness to the input image based on the brightness value of the brightness image, the third threshold value, and the fourth threshold value. As described above, the color can be the color of lipstick to be applied to the input image, and the same color of different brightness can be blended to corresponding pixels according to the brightness value.

단계(821)에서 컴퓨터 장치(200)는 휘도 이미지에서 제1 픽셀의 휘도 값이 제3 임계값 및 제4 임계값에 의해 결정되는 범위에 포함되는 경우, 입력 이미지에서 제1 픽셀에 대응하는 제2 픽셀에 제2 밝기를 선형 보간한 색상을 블렌딩할 수 있다. 이때, 선형 보간된 제2 밝기는 제1 픽셀의 휘도 값이 제3 임계값에 가까울수록 0 퍼센트, 그리고 제4 임계값에 가까울수록 100%가 되도록 선형 보간될 수 있다.In step (821), the computer device (200) may blend a color obtained by linearly interpolating a second brightness to a second pixel corresponding to the first pixel in the input image when the brightness value of the first pixel in the brightness image is included in a range determined by a third threshold value and a fourth threshold value. At this time, the linearly interpolated second brightness may be linearly interpolated so that the brightness value of the first pixel becomes 0 percent as it gets closer to the third threshold value, and becomes 100% as it gets closer to the fourth threshold value.

단계(822)에서 컴퓨터 장치(200)는 휘도 이미지에서 제1 픽셀의 휘도 값이 제4 임계값을 초과하는 경우, 입력 이미지에서 제1 픽셀에 대응하는 제2 픽셀에 제2 밝기의 색상을 블렌딩할 수 있다(100% partial screen blend).In step (822), the computer device (200) can blend a color of a second brightness to a second pixel corresponding to the first pixel in the input image if the brightness value of the first pixel in the brightness image exceeds a fourth threshold value (100% partial screen blend).

한편, 휘도 이미지에서 제1 픽셀의 휘도 값이 제3 임계값보다 작은 경우에는 입력 이미지에서 제1 픽셀에 대응하는 제2 픽셀에 색상의 블렌딩이 이루어지지 않을 수 있다(0% partial screen blend).Meanwhile, if the luminance value of the first pixel in the luminance image is less than the third threshold value, color blending may not occur in the second pixel corresponding to the first pixel in the input image (0% partial screen blend).

도 9는 본 발명의 일실시예에 있어서, 출력 이미지를 생성하는 과정의 예를 도시한 도면이다. 컴퓨터 장치(200)는 도 5를 통해 설명한 립 POI 이미지(512)와 처리된 립 세그먼테이션(514)을 이용하여 립 평균 컬러(lip average color, 902)를 생성할 수 있다. 이를 위해, 컴퓨터 장치(200)는 입술 영역으로부터 입술의 평균 색을 추출하고, 입력 이미지에 추출된 입술의 평균 색을 블렌딩할 수 있다. 여기서 입술의 평균 색이 립 평균 컬러(902)에 대응할 수 있다. 이 경우, 컴퓨터 장치(200)는 앞서 도 3의 단계(330)에서 입술의 평균 색이 블렌딩된 입력 이미지에 서로 다른 밝기의 색상을 블렌딩할 수 있다.FIG. 9 is a diagram illustrating an example of a process for generating an output image according to an embodiment of the present invention. The computer device (200) can generate a lip average color (lip average color, 902) using the lip POI image (512) and the processed lip segmentation (514) described through FIG. 5. To this end, the computer device (200) can extract an average color of the lips from the lip area and blend the extracted average color of the lips with the input image. Here, the average color of the lips can correspond to the lip average color (902). In this case, the computer device (200) can blend colors of different brightness with the input image to which the average color of the lips is blended in step (330) of FIG. 3.

한편, 도 9에서는 컴퓨터 장치(200)가 앞서 도 5에서 얻어진 휘도 이미지로서의 애디티브 블렌디드 이미지(526)와 립 마스크 이미지로서의 최종 립 마스크(720)를 이용하여 최종 립 ROI 이미지(final lip POI image, 904)를 얻는 예를 나타내고 있다. 또한, 도 9에서는 최종 립 ROI 이미지(904), 립 익스텐트(504) 및 입력 이미지(502)를 통해 출력 이미지(906)를 얻는 예를 나타내고 있다. 이때, 출력 이미지(906)가 포함하는 얼굴의 입술 영역에는 본 발명의 실시예들에 따른 이미지 처리 방법을 통해 얻어진 립스틱 효과가 적용될 수 있다. 예를 들어, 컴퓨터 장치(200)는 애디티브 블렌디드 이미지(526)의 휘도 값과 기설정된 임계값(일례로, 제1 임계값, 제2 임계값, 제3 임계값 및 제4 임계값)에 따라 서로 다른 밝기의 색상을 입력 이미지에 블렌딩할 수 있다. 또한, 컴퓨터 장치(200)는 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 립 마스크 이미지(최종 립 마스크(720))를 블렌딩(일례로, alpha blending)하여 립 마스크 이미지에 필터가 적용되도록 할 수 있다.Meanwhile, FIG. 9 shows an example in which a computer device (200) obtains a final lip ROI image (904) by using the additive blended image (526) as a luminance image obtained in FIG. 5 and the final lip mask (720) as a lip mask image. In addition, FIG. 9 shows an example in which an output image (906) is obtained through the final lip ROI image (904), the lip extent (504), and the input image (502). At this time, a lipstick effect obtained through an image processing method according to embodiments of the present invention may be applied to a lip area of a face included in the output image (906). For example, the computer device (200) may blend colors of different brightness into the input image according to a luminance value of the additive blended image (526) and a preset threshold value (for example, a first threshold value, a second threshold value, a third threshold value, and a fourth threshold value). Additionally, the computer device (200) may blend (e.g., alpha blending) an input image in which colors of different brightnesses are blended with a lip mask image (final lip mask (720)) to apply a filter to the lip mask image.

한편, 실시예에 따라 컴퓨터 장치(200)는 립 마스크 이미지를 블렌딩하기 전에, 투명도 조절을 위해, 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 원본의 입력 이미지를 블렌딩할 수 있다. 이 경우, 컴퓨터 장치(200)는 단계(340)에서 원본 입력 이미지와 블렌딩된 입력 이미지를 립 마스크 이미지와 더 블렌딩할 수 있다.Meanwhile, according to an embodiment, the computer device (200) may blend an input image in which colors of different brightnesses are blended with the original input image to adjust transparency before blending the lip mask image. In this case, the computer device (200) may further blend the original input image and the blended input image with the lip mask image in step (340).

또한, 실시예에 따라 컴퓨터 장치(200)는 휘도 이미지에 콘트라스트 필터(contrast filter)를 적용하여 휘도 이미지의 콘트라스트를 조절할 수 있다. 일례로, 컴퓨터 장치(200)는 아래 수학식 1과 같이 휘도 이미지의 콘트라스트를 조절할 수 있다.In addition, according to an embodiment, the computer device (200) can adjust the contrast of the luminance image by applying a contrast filter to the luminance image. For example, the computer device (200) can adjust the contrast of the luminance image as in the following mathematical expression 1.

[수학식 1][Mathematical Formula 1]

y = (x - 0.5) * luminanceContrast + 0.5y = (x - 0.5) * luminanceContrast + 0.5

여기서, x는 휘도 이미지의 콘트라스트 값을, luminanceContrast는 휘도 대비를 y는 조절된 휘도 이미지의 콘트라스트를 각각 의미할 수 있다.Here, x can mean the contrast value of the luminance image, luminanceContrast can mean the luminance contrast, and y can mean the contrast of the adjusted luminance image.

이 경우, 컴퓨터 장치(200)는 단계(330)에서 콘트라스트가 조절된 휘도 이미지의 휘도 값을 이용하여 서로 다른 밝기의 색상을 블렌딩할 수 있다. 이러한 휘도 이미지의 콘트라스트 조절은 조명 상황에 따라 적용하고자 하는 색상의 밝기가 너무 민감하게 반응하지 않도록 조절하는 효과를 제공할 수 있다.In this case, the computer device (200) can blend colors of different brightness using the brightness value of the brightness image whose contrast is adjusted in step (330). This contrast adjustment of the brightness image can provide the effect of adjusting the brightness of the color to be applied so that it does not react too sensitively depending on the lighting situation.

이처럼, 본 발명의 실시예들에 따르면, 증강현실 기반의 입술 메이크업에서 좀 더 사실적인 립스틱 발색과 반사광의 표현, 질감을 표현할 수 있다. 또한, 입술 영역의 휘도 이미지의 분리와 이미지에 대한 개별적인 이미지 프로세싱 적용으로, 기존 립스틱 그리기 대비 자연스러운 반사광 표현과 사실에 가까운 자연광 대응 표현을 구현할 수 있다. 또한, Partial Screen Blend, Partial Multiply Blend, 톤 커브, 가우시안 블러, 콘트라스트, 입술의 평균 색 등과 같이 립스틱의 질감을 표현하기 위한 다양한 조절값을 제공할 수 있다. 또한, 립스틱이 도포되는 영역을 조절할 수 있다. 또한, 일반적으로 통용되는 대다수의 모바일 단말에서도 1080p 해상도 기준 안정적인 FPS(Frame Per Second)를 보장하는 우수한 성능을 제공할 수 있다.In this way, according to embodiments of the present invention, more realistic lipstick coloration, reflection expression, and texture can be expressed in augmented reality-based lip makeup. In addition, by separating the luminance image of the lip area and applying individual image processing to the image, natural reflection expression and realistic natural light response expression can be implemented compared to existing lipstick drawing. In addition, various adjustment values for expressing the texture of lipstick, such as Partial Screen Blend, Partial Multiply Blend, tone curve, Gaussian blur, contrast, and average color of the lips, can be provided. In addition, the area where the lipstick is applied can be adjusted. In addition, excellent performance can be provided that guarantees stable FPS (Frame Per Second) based on 1080p resolution even in most commonly used mobile terminals.

이상에서 설명된 시스템 또는 장치는 하드웨어 구성요소, 또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 어플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The systems or devices described above may be implemented as hardware components, or a combination of hardware components and software components. For example, the devices and components described in the embodiments may be implemented using one or more general-purpose computers or special-purpose computers, such as, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a programmable logic unit (PLU), a microprocessor, or any other device capable of executing instructions and responding to them. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. In addition, the processing device may access, store, manipulate, process, and generate data in response to the execution of the software. For ease of understanding, the processing device is sometimes described as being used alone, but those skilled in the art will appreciate that the processing device may include multiple processing elements and/or multiple types of processing elements. For example, the processing device may include multiple processors, or a processor and a controller. Other processing configurations, such as parallel processors, are also possible.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of these, which may configure a processing device to perform a desired operation or may, independently or collectively, command the processing device. The software and/or data may be embodied in any type of machine, component, physical device, virtual equipment, computer storage medium, or device for interpretation by the processing device or for providing instructions or data to the processing device. The software may be distributed over network-connected computer systems and stored or executed in a distributed manner. The software and data may be stored on one or more computer-readable recording media.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 매체는 컴퓨터로 실행 가능한 프로그램을 계속 저장하거나, 실행 또는 다운로드를 위해 임시 저장하는 것일 수도 있다. 또한, 매체는 단일 또는 수개 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있는데, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 매체의 예시로는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등을 포함하여 프로그램 명령어가 저장되도록 구성된 것이 있을 수 있다. 또한, 다른 매체의 예시로, 애플리케이션을 유통하는 앱 스토어나 기타 다양한 소프트웨어를 공급 내지 유통하는 사이트, 서버 등에서 관리하는 기록매체 내지 저장매체도 들 수 있다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.The method according to the embodiment may be implemented in the form of program commands that can be executed through various computer means and recorded on a computer-readable medium. The computer-readable medium may include program commands, data files, data structures, etc. alone or in combination. The medium may be a means for continuously storing a computer-executable program or temporarily storing it for execution or downloading. In addition, the medium may be various recording means or storage means in the form of a single or multiple hardware combinations, and is not limited to a medium directly connected to a computer system, and may be distributed on a network. Examples of the medium may include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and ROMs, RAMs, flash memories, etc., configured to store program commands. In addition, examples of other media may include recording media or storage media managed by app stores that distribute applications or other sites, servers, etc. that supply or distribute various software. Examples of program instructions include machine language code, such as that produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter, etc.

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.Although the embodiments have been described above by way of limited examples and drawings, those skilled in the art can make various modifications and variations from the above description. For example, appropriate results can be achieved even if the described techniques are performed in a different order than the described method, and/or components of the described system, structure, device, circuit, etc. are combined or combined in a different form than the described method, or are replaced or substituted by other components or equivalents.

그러므로, 다른 구현들, 다른 실시예들 및 청구범위와 균등한 것들도 후술하는 청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are also included within the scope of the claims.

Claims (15)

적어도 하나의 프로세서를 포함하는 컴퓨터 장치에서 실행되는 이미지 처리 방법에 있어서,
상기 적어도 하나의 프로세서에 의해, 사람의 얼굴을 포함하는 입력 이미지의 입술 영역에 대한 휘도(luminance) 이미지를 생성하는 단계;
상기 적어도 하나의 프로세서에 의해, 립스틱 도포 영역을 조절하기 위한 립 마스크 이미지를 생성하는 단계;
상기 적어도 하나의 프로세서에 의해, 상기 입력 이미지에 상기 휘도 이미지의 휘도 값과 기설정된 임계값에 따라 서로 다른 밝기의 색상을 블렌딩하는 단계; 및
상기 적어도 하나의 프로세서에 의해, 상기 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 상기 립 마스크 이미지를 블렌딩하는 단계
를 포함하는 이미지 처리 방법.
An image processing method executed on a computer device including at least one processor,
A step of generating a luminance image for a lip area of an input image including a human face by at least one processor;
A step of generating a lip mask image for controlling a lipstick application area by at least one processor;
A step of blending colors of different brightness in the input image according to a luminance value of the luminance image and a preset threshold value by at least one processor; and
A step of blending the input image in which colors of different brightnesses are blended and the lip mask image by at least one processor.
An image processing method comprising:
제1항에 있어서,
상기 휘도 이미지를 생성하는 단계는,
상기 입력 이미지의 입술 영역에 대한 그레이 스케일(gray scale) 이미지를 생성하는 단계;
상기 그레이 스케일 이미지를 복제하여 제1 휘도 이미지 및 제2 휘도 이미지를 생성하는 단계;
상기 제1 휘도 이미지의 밝기를 제1 정도로 변경하고, 블러 효과를 적용하는 단계;
상기 제2 휘도 이미지의 밝기를 제2 정도로 변경하고, 블러 효과를 적용하는 단계; 및
상기 블러 효과가 적용된 제1 휘도 이미지 및 제2 휘도 이미지를 블렌딩하여 상기 휘도 이미지를 생성하는 단계
를 포함하는 것을 특징으로 하는 이미지 처리 방법.
In the first paragraph,
The step of generating the above luminance image is:
A step of generating a gray scale image for the lip area of the above input image;
A step of generating a first luminance image and a second luminance image by replicating the above gray scale image;
A step of changing the brightness of the first luminance image to a first degree and applying a blur effect;
A step of changing the brightness of the second luminance image to a second degree and applying a blur effect; and
A step of generating the luminance image by blending the first luminance image and the second luminance image to which the blur effect is applied.
An image processing method comprising:
제2항에 있어서,
상기 제1 정도는 상기 제1 휘도 이미지의 밝기를 증감시키는 정도를 포함하고,
상기 제2 정도는 상기 제2 휘도 이미지의 밝기를 증감시키는 정도를 포함하고,
상기 제1 정도와 상기 제2 정도는 서로 상이한 것
을 특징으로 하는 이미지 처리 방법.
In the second paragraph,
The above first degree includes a degree of increasing or decreasing the brightness of the above first luminance image,
The second degree includes the degree to which the brightness of the second luminance image is increased or decreased,
The above first degree and the above second degree are different from each other
An image processing method characterized by:
제1항에 있어서,
상기 기설정된 임계값은 순차적으로 더 큰 값을 갖는 제1 임계값, 제2 임계값, 제3 임계값 및 제4 임계값을 포함하고,
상기 서로 다른 밝기의 색상을 블렌딩하는 단계는,
상기 휘도 이미지의 휘도 값, 상기 제1 임계값 및 상기 제2 임계값에 기반하여 상기 입력 이미지에 제1 밝기의 색상을 블렌딩하는 단계; 및
상기 휘도 이미지의 휘도 값, 상기 제3 임계값 및 상기 제4 임계값에 기반하여 상기 입력 이미지에 제2 밝기의 색상을 블렌딩하는 단계
를 포함하는 것을 특징으로 하는 이미지 처리 방법.
In the first paragraph,
The above preset threshold values include a first threshold value, a second threshold value, a third threshold value and a fourth threshold value, each having a sequentially larger value.
The step of blending the colors of different brightness above is,
A step of blending a color of first brightness into the input image based on the brightness value of the brightness image, the first threshold value, and the second threshold value; and
A step of blending a color of second brightness into the input image based on the brightness value of the brightness image, the third threshold value, and the fourth threshold value.
An image processing method comprising:
제4항에 있어서,
상기 제1 밝기의 색상을 블렌딩하는 단계는,
상기 휘도 이미지에서 제1 픽셀의 휘도 값이 상기 제1 임계값 미만인 경우, 상기 입력 이미지에서 상기 제1 픽셀에 대응하는 제2 픽셀에 상기 제1 밝기의 색상을 블렌딩하는 단계; 및
상기 휘도 이미지에서 상기 제1 픽셀의 휘도 값이 상기 제1 임계값 및 상기 제2 임계값에 의해 결정되는 범위에 포함되는 경우, 상기 입력 이미지에서 상기 제1 픽셀에 대응하는 제2 픽셀에 상기 제1 밝기를 선형 보간한 색상을 블렌딩하는 단계
를 포함하고,
상기 선형 보간된 제1 밝기는 상기 제1 픽셀의 휘도 값이 상기 제1 임계값에 가까울수록 100 %, 그리고 상기 제2 임계값에 가까울수록 0%가 되도록 선형 보간된 것을 특징으로 하는 이미지 처리 방법.
In paragraph 4,
The step of blending the color of the first brightness is:
When the luminance value of the first pixel in the luminance image is less than the first threshold value, a step of blending the color of the first brightness to the second pixel corresponding to the first pixel in the input image; and
A step of blending a color obtained by linearly interpolating the first brightness to a second pixel corresponding to the first pixel in the input image, when the brightness value of the first pixel in the luminance image is within a range determined by the first threshold value and the second threshold value.
Including,
An image processing method, characterized in that the linearly interpolated first brightness is linearly interpolated so that the luminance value of the first pixel becomes 100% as it gets closer to the first threshold value, and becomes 0% as it gets closer to the second threshold value.
제4항에 있어서,
상기 제2 밝기의 색상을 블렌딩하는 단계는,
상기 휘도 이미지에서 제1 픽셀의 휘도 값이 상기 제3 임계값 및 상기 제4 임계값에 의해 결정되는 범위에 포함되는 경우, 상기 입력 이미지에서 상기 제1 픽셀에 대응하는 제2 픽셀에 상기 제2 밝기를 선형 보간한 색상을 블렌딩하는 단계; 및
상기 휘도 이미지에서 상기 제1 픽셀의 휘도 값이 상기 제4 임계값을 초과하는 경우, 상기 입력 이미지에서 상기 제1 픽셀에 대응하는 제2 픽셀에 상기 제2 밝기의 색상을 블렌딩하는 단계
를 포함하고,
상기 선형 보간된 제2 밝기는 상기 제1 픽셀의 휘도 값이 상기 제3 임계값에 가까울수록 0 퍼센트, 그리고 상기 제4 임계값에 가까울수록 100%가 되도록 선형 보간된 것을 특징으로 하는 이미지 처리 방법.
In paragraph 4,
The step of blending the colors of the second brightness is as follows:
A step of blending a color obtained by linearly interpolating the second brightness to a second pixel corresponding to the first pixel in the input image, when the brightness value of the first pixel in the brightness image is within a range determined by the third threshold value and the fourth threshold value; and
A step of blending a color of the second brightness to a second pixel corresponding to the first pixel in the input image when the brightness value of the first pixel in the luminance image exceeds the fourth threshold value.
Including,
An image processing method, characterized in that the linearly interpolated second brightness is linearly interpolated so that the luminance value of the first pixel becomes 0 percent as it approaches the third threshold value, and becomes 100% as it approaches the fourth threshold value.
제1항에 있어서,
상기 립 마스크 이미지를 생성하는 단계는,
상기 입력 이미지에서 상기 입술 영역을 표시하도록 생성된 립 세그먼테이션 이미지와 상기 입력 이미지의 얼굴 랜드마크로부터 입 안쪽 영역을 표시하도록 생성된 입 안쪽 영역 마스크를 블렌딩하여 입 안쪽 영역을 포함하는 제1 립 마스크 이미지를 생성하는 단계;
상기 제1 립 마스크 이미지에 블러 효과를 적용하고, 밝기를 조정하여 제2 립 마스크 이미지를 생성하는 단계; 및
상기 립 세그먼테이션 이미지에 블러 효과를 적용하고 반전한 뒤, 상기 제2 립 마스크 이미지와 서브트랙트 블렌딩(subtract blending)하여 입 안쪽 영역이 다시 제거된 제3 립 마스크 이미지를 생성하는 단계
를 포함하는 것을 특징으로 하는 이미지 처리 방법.
In the first paragraph,
The steps for generating the above lip mask image are:
A step of generating a first lip mask image including an inner mouth area by blending a lip segmentation image generated to indicate the lip area in the input image and an inner mouth area mask generated to indicate the inner mouth area from facial landmarks of the input image;
A step of applying a blur effect to the first lip mask image and adjusting brightness to generate a second lip mask image; and
A step of applying a blur effect to the above lip segmentation image, inverting it, and then performing subtract blending with the second lip mask image to generate a third lip mask image with the inner mouth area removed again.
An image processing method comprising:
제1항에 있어서,
상기 입술 영역으로부터 입술의 평균 색을 추출하는 단계; 및
상기 입력 이미지에 상기 추출된 입술의 평균 색을 블렌딩하는 단계
를 더 포함하고,
상기 서로 다른 밝기의 색상을 블렌딩하는 단계는,
상기 입술의 평균 색이 블렌딩된 입력 이미지에 상기 서로 다른 밝기의 색상을 블렌딩하는 것
을 특징으로 하는 이미지 처리 방법.
In the first paragraph,
A step of extracting an average color of the lips from the above lip area; and
A step of blending the average color of the extracted lips into the input image.
Including more,
The step of blending the colors of different brightness above is,
Blending the colors of different brightness into the input image blended with the average color of the lips above.
An image processing method characterized by:
제1항에 있어서,
투명도 조절을 위해, 상기 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 원본의 입력 이미지를 블렌딩하는 단계
를 더 포함하고,
상기 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 상기 립 마스크 이미지를 블렌딩하는 단계는,
상기 원본 입력 이미지와 블렌딩된 입력 이미지를 상기 립 마스크 이미지와 더 블렌딩하는 것
을 특징으로 하는 이미지 처리 방법.
In the first paragraph,
To adjust transparency, a step of blending the input image with the original input image blended with colors of different brightnesses.
Including more,
The step of blending the input image with the color of different brightness and the lip mask image is as follows.
Further blending the input image blended with the original input image with the lip mask image.
An image processing method characterized by:
제1항에 있어서,
상기 휘도 이미지에 콘트라스트 필터(contrast filter)를 적용하여 상기 휘도 이미지의 콘트라스트를 조절하는 단계
를 더 포함하고,
상기 서로 다른 밝기의 색상을 블렌딩하는 단계는,
상기 콘트라스트가 조절된 휘도 이미지의 휘도 값을 이용하여 상기 서로 다른 밝기의 색상을 블렌딩하는 것
을 특징으로 하는 이미지 처리 방법.
In the first paragraph,
A step of adjusting the contrast of the luminance image by applying a contrast filter to the luminance image.
Including more,
The step of blending the colors of different brightness above is,
Blending colors of different brightness using the brightness value of the brightness image with the above contrast adjusted
An image processing method characterized by:
제1항 내지 제10항 중 어느 한 항의 방법을 상기 컴퓨터 장치에 실행시키기 위해 컴퓨터 판독가능한 기록 매체에 저장되는 컴퓨터 프로그램.A computer program stored in a computer-readable recording medium for executing the method of any one of claims 1 to 10 on the computer device. 컴퓨터에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서
를 포함하고,
상기 적어도 하나의 프로세서에 의해,
사람의 얼굴을 포함하는 입력 이미지의 입술 영역에 대한 휘도 이미지를 생성하고,
립스틱 도포 영역을 조절하기 위한 립 마스크 이미지를 생성하고,
상기 입력 이미지에 상기 휘도 이미지의 휘도 값과 기설정된 임계값에 따라 서로 다른 밝기의 색상을 블렌딩하고,
상기 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 상기 립 마스크 이미지를 블렌딩하는 것
을 특징으로 하는 컴퓨터 장치.
At least one processor implemented to execute computer-readable instructions
Including,
By at least one processor,
Generate a luminance image for the lip region of an input image containing a human face,
Create a lip mask image to control the lipstick application area,
Blending colors of different brightness in the input image according to the luminance value of the luminance image and a preset threshold value,
Blending the input image with the color of different brightness blended with the lip mask image.
A computer device characterized by:
제12항에 있어서,
상기 휘도 이미지를 생성하기 위해, 상기 적어도 하나의 프로세서에 의해,
상기 입력 이미지의 입술 영역에 대한 그레이 스케일(gray scale) 이미지를 생성하고,
상기 그레이 스케일 이미지를 복제하여 제1 휘도 이미지 및 제2 휘도 이미지를 생성하고,
상기 제1 휘도 이미지의 밝기를 제1 정도로 변경하고, 블러 효과를 적용하고,
상기 제2 휘도 이미지의 밝기를 제2 정도로 변경하고, 블러 효과를 적용하고,
상기 블러 효과가 적용된 제1 휘도 이미지 및 제2 휘도 이미지를 블렌딩하여 상기 휘도 이미지를 생성하는 것
을 특징으로 하는 컴퓨터 장치.
In Article 12,
To generate the above luminance image, by said at least one processor,
Generate a gray scale image of the lip area of the above input image,
By duplicating the above gray scale image, a first luminance image and a second luminance image are generated,
Change the brightness of the first luminance image to the first degree and apply a blur effect,
Change the brightness of the second luminance image to the second level and apply a blur effect,
Generating the luminance image by blending the first luminance image and the second luminance image to which the blur effect is applied
A computer device characterized by:
제12항에 있어서,
상기 기설정된 임계값은 순차적으로 더 큰 값을 갖는 제1 임계값, 제2 임계값, 제3 임계값 및 제4 임계값을 포함하고,
상기 서로 다른 밝기의 색상을 블렌딩하기 위해, 상기 적어도 하나의 프로세서에 의해,
상기 휘도 이미지의 휘도 값, 상기 제1 임계값 및 상기 제2 임계값에 기반하여 상기 입력 이미지에 제1 밝기의 색상을 블렌딩하고,
상기 휘도 이미지의 휘도 값, 상기 제3 임계값 및 상기 제4 임계값에 기반하여 상기 입력 이미지에 제2 밝기의 색상을 블렌딩하는 것
을 특징으로 하는 컴퓨터 장치.
In Article 12,
The above preset threshold values include a first threshold value, a second threshold value, a third threshold value and a fourth threshold value, each having a sequentially larger value.
To blend the colors of different brightness, by at least one processor,
Blending a color of first brightness into the input image based on the brightness value of the above brightness image, the first threshold value, and the second threshold value,
Blending a color of second brightness into the input image based on the brightness value of the above brightness image, the third threshold value, and the fourth threshold value.
A computer device characterized by:
제12항에 있어서,
상기 립 마스크 이미지를 생성하기 위해, 상기 적어도 하나의 프로세서에 의해,
상기 입력 이미지에서 상기 입술 영역을 표시하도록 생성된 립 세그먼테이션 이미지와 상기 입력 이미지의 얼굴 랜드마크로부터 입 안쪽 영역을 표시하도록 생성된 입 안쪽 영역 마스크를 블렌딩하여 입 안쪽 영역을 포함하는 제1 립 마스크 이미지를 생성하고,
상기 제1 립 마스크 이미지에 블러 효과를 적용하고, 밝기를 조정하여 제2 립 마스크 이미지를 생성하고,
상기 립 세그먼테이션 이미지에 블러 효과를 적용하고 반전한 뒤, 상기 제2 립 마스크 이미지와 서브트랙트 블렌딩(subtract blending)하여 입 안쪽 영역이 다시 제거된 제3 립 마스크 이미지를 생성하는 것
을 특징으로 하는 컴퓨터 장치.
In Article 12,
To generate the above lip mask image, by the at least one processor,
A first lip mask image including an inner mouth area is generated by blending a lip segmentation image generated to indicate the lip area in the input image and an inner mouth area mask generated to indicate the inner mouth area from facial landmarks in the input image,
Applying a blur effect to the first lip mask image and adjusting the brightness to generate a second lip mask image,
Applying a blur effect to the above lip segmentation image, inverting it, and then performing subtract blending with the second lip mask image to generate a third lip mask image with the inner mouth area removed again.
A computer device characterized by:
KR1020220049248A 2022-04-21 2022-04-21 Method and system for processing image for lip makeup based on augmented reality Active KR102800992B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020220049248A KR102800992B1 (en) 2022-04-21 2022-04-21 Method and system for processing image for lip makeup based on augmented reality

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020220049248A KR102800992B1 (en) 2022-04-21 2022-04-21 Method and system for processing image for lip makeup based on augmented reality

Publications (2)

Publication Number Publication Date
KR20230149934A KR20230149934A (en) 2023-10-30
KR102800992B1 true KR102800992B1 (en) 2025-04-29

Family

ID=88557994

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220049248A Active KR102800992B1 (en) 2022-04-21 2022-04-21 Method and system for processing image for lip makeup based on augmented reality

Country Status (1)

Country Link
KR (1) KR102800992B1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105184754B (en) * 2015-09-25 2018-03-06 深圳市华星光电技术有限公司 Method for enhancing picture contrast
KR101899685B1 (en) * 2016-09-01 2018-10-04 스노우 주식회사 Method and system for processing image using lookup table and layered mask
US10949959B2 (en) * 2019-02-18 2021-03-16 Samsung Electronics Co., Ltd. Processing image data in a composite image
KR102776442B1 (en) * 2019-08-06 2025-03-07 삼성전자주식회사 Device and method for performing local histogram matching with global regularization and motion exclusion

Also Published As

Publication number Publication date
KR20230149934A (en) 2023-10-30

Similar Documents

Publication Publication Date Title
US11210838B2 (en) Fusing, texturing, and rendering views of dynamic three-dimensional models
CN109771951B (en) Game map generation method, device, storage medium and electronic equipment
Howse OpenCV computer vision with python
CN109151540B (en) Interactive processing method and device for video image
US9245358B2 (en) Systems and methods for generating refined, high fidelity normal maps for 2D and 3D textures
CN111742347A (en) Dynamic illumination for objects in an image
CN112053370A (en) Augmented reality-based display method, device and storage medium
US10171785B2 (en) Color balancing based on reference points
CN106447756B (en) Method and system for generating user-customized computer-generated animations
CN112034984B (en) Virtual model processing method and device, electronic equipment and storage medium
CN114359081B (en) Liquid material dissolving method and device, electronic equipment and storage medium
CN116958344A (en) Animation generation method and device for virtual image, computer equipment and storage medium
KR102696467B1 (en) Apparatus and method for generating moving viewpoint motion picture
CN116363288A (en) Rendering method and device of target object, storage medium and computer equipment
CN116712727A (en) Same-screen picture rendering method and device and electronic equipment
CN119107399B (en) Shadow rendering method and device based on 2D image
KR102800992B1 (en) Method and system for processing image for lip makeup based on augmented reality
CN115311397B (en) Method, apparatus, device and storage medium for image rendering
CN115970275A (en) Projection processing method and device for virtual object, storage medium and electronic equipment
CN114332316A (en) Virtual character processing method and device, electronic equipment and storage medium
Hackl et al. Diminishing reality
KR102791172B1 (en) Method, computer device, and computer program for compositing images to create natural face
US12118653B2 (en) Depth analyzer and shading rate controller
RU2810701C2 (en) Hybrid rendering
CN116630509A (en) Image processing method, image processing apparatus, computer-readable storage medium, and electronic apparatus

Legal Events

Date Code Title Description
PA0109 Patent application

Patent event code: PA01091R01D

Comment text: Patent Application

Patent event date: 20220421

PA0201 Request for examination
PG1501 Laying open of application
E902 Notification of reason for refusal
PE0902 Notice of grounds for rejection

Comment text: Notification of reason for refusal

Patent event date: 20241025

Patent event code: PE09021S01D

E701 Decision to grant or registration of patent right
PE0701 Decision of registration

Patent event code: PE07011S01D

Comment text: Decision to Grant Registration

Patent event date: 20250403

GRNT Written decision to grant
PR0701 Registration of establishment

Comment text: Registration of Establishment

Patent event date: 20250422

Patent event code: PR07011E01D

PR1002 Payment of registration fee

Payment date: 20250423

End annual number: 3

Start annual number: 1

PG1601 Publication of registration