

아래의 설명은 증강현실 기반의 입술 메이크업을 위한 이미지 처리 방법 및 시스템에 관한 것이다.The explanation below is about the 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, the prior art generally gives an unnatural feeling in terms of reflected light processing and texture compared to the actual expression of lipstick.
[선행문헌번호] [Prior document number]
한국공개특허 제2021-0091874호Korean Patent Publication No. 2021-0091874
증강현실 기반의 입술 메이크업에서 좀 더 사실적인 립스틱 발색과 반사광의 표현, 질감을 표현할 수 있는 이미지 처리 방법 및 시스템을 제공한다.We provide an image processing method and system that can express more realistic lipstick coloring, reflected light, and texture in augmented reality-based lip makeup.
적어도 하나의 프로세서를 포함하는 컴퓨터 장치에서 실행되는 이미지 처리 방법에 있어서, 상기 적어도 하나의 프로세서에 의해, 사람의 얼굴을 포함하는 입력 이미지의 입술 영역에 대한 휘도(luminance) 이미지를 생성하는 단계; 상기 적어도 하나의 프로세서에 의해, 립스틱 도표 영역을 조절하기 위한 립 마스크 이미지를 생성하는 단계; 상기 적어도 하나의 프로세서에 의해, 상기 입력 이미지에 상기 휘도 이미지의 휘도 값과 기설정된 임계값에 따라 서로 다른 밝기의 색상을 블렌딩하는 단계; 및 상기 적어도 하나의 프로세서에 의해, 상기 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 상기 립 마스크 이미지를 블렌딩하는 단계를 포함하는 이미지 처리 방법을 제공한다.An image processing method executing on a computer device including at least one processor, comprising: generating, by the at least one processor, a luminance image for a lip region 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 colors of different brightnesses into the input image according to a luminance value of the luminance image and a preset threshold, by the at least one processor; and blending, by the at least one processor, the input image in which colors of different brightnesses are blended and the lip mask image.
일측에 따르면, 상기 휘도 이미지를 생성하는 단계는, 상기 입력 이미지의 입술 영역에 대한 그레이 스케일(gray scale) 이미지를 생성하는 단계; 상기 그레이 스케일 이미지를 복제하여 제1 휘도 이미지 및 제2 휘도 이미지를 생성하는 단계; 상기 제1 휘도 이미지의 밝기를 제1 정도로 변경하고, 블러 효과를 적용하는 단계; 상기 제2 휘도 이미지의 밝기를 제2 정도로 변경하고, 블러 효과를 적용하는 단계; 및 상기 블러 효과가 적용된 제1 휘도 이미지 및 제2 휘도 이미지를 블렌딩하여 상기 휘도 이미지를 생성하는 단계를 포함하는 것을 특징으로 할 수 있다.According to one side, generating the luminance image includes generating a gray scale image for the lip area of the input image; generating a first luminance image and a second luminance image by duplicating the gray scale image; changing the brightness of the first luminance image to a first degree and applying a blur effect; changing the brightness of the second luminance image to a second degree and applying a blur effect; and generating the luminance image by blending the first luminance image and the second luminance image to which the blur effect is applied.
다른 측면에 따르면, 상기 제1 정도는 상기 제1 휘도 이미지의 밝기를 증감시키는 정도를 포함하고, 상기 제2 정도는 상기 제2 휘도 이미지의 밝기를 증감시키는 정도를 포함하고, 상기 제1 정도와 상기 제2 정도는 서로 상이한 것을 특징으로 할 수 있다.According to another aspect, the first degree includes a degree of increasing or decreasing the brightness of the first luminance image, and the second degree includes a degree of increasing or decreasing the brightness of the second luminance image, and the first degree and The second degrees 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 includes a first threshold, a second threshold, a third threshold, and a fourth threshold having sequentially larger values, and blends the colors of different brightnesses. The step of blending a color of first brightness into the input image based on the luminance value of the luminance image, the first threshold, and the second threshold; and blending a color of a second brightness into the input image based on the luminance value of the luminance image, the third threshold, and the fourth threshold.
또 다른 측면에 따르면, 상기 제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, when the luminance value of the first pixel in the luminance image is less than the first threshold, a second pixel corresponding to the first pixel in the input image. blending a color of the first brightness into pixels; and when the luminance value of the first pixel in the luminance image is within a range determined by the first threshold and the second threshold, the second pixel corresponding to the first pixel in the input image is A step of blending a color obtained by linearly interpolating first brightness, wherein the linearly interpolated first brightness is 100% as the luminance value of the first pixel approaches the first threshold, and the linearly interpolated first brightness increases to 100% as the luminance value of the first pixel approaches the first threshold. It may be characterized as being linearly interpolated so that the closer it is, the closer it becomes to 0%.
또 다른 측면에 따르면, 상기 제2 밝기의 색상을 블렌딩하는 단계는,According to another aspect, the step of blending the color of the second brightness includes:
상기 휘도 이미지에서 제1 픽셀의 휘도 값이 상기 제3 임계값 및 상기 제4 임계값에 의해 결정되는 범위에 포함되는 경우, 상기 입력 이미지에서 상기 제1 픽셀에 대응하는 제2 픽셀에 상기 제2 밝기를 선형 보간한 색상을 블렌딩하는 단계; 및 상기 휘도 이미지에서 상기 제1 픽셀의 휘도 값이 상기 제4 임계값을 초과하는 경우, 상기 입력 이미지에서 상기 제1 픽셀에 대응하는 제2 픽셀에 상기 제2 밝기의 색상을 블렌딩하는 단계를 포함하고, 상기 선형 보간된 제2 밝기는 상기 제1 픽셀의 휘도 값이 상기 제3 임계값에 가까울수록 0 퍼센트, 그리고 상기 제4 임계값에 가까울수록 100%가 되도록 선형 보간된 것을 특징으로 할 수 있다.If the luminance value of the first pixel in the luminance image is within a range determined by the third threshold and the fourth threshold, the second pixel corresponding to the first pixel in the input image Blending colors with linearly interpolated brightness; and blending a color of the second brightness into 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. And, the linearly interpolated second brightness may be linearly interpolated so that the luminance value of the first pixel becomes 0 percent as it approaches the third threshold, and becomes 100% as the luminance value of the first pixel approaches the fourth threshold. there is.
또 다른 측면에 따르면, 상기 립 마스크 이미지를 생성하는 단계는, 상기 입력 이미지에서 상기 입술 영역을 표시하도록 생성된 립 세그먼테이션 이미지와 상기 입력 이미지의 얼굴 랜드마크로부터 입 안쪽 영역을 표시하도록 생성된 입 안쪽 영역 마스크를 블렌딩하여 입 안쪽 영역을 포함하는 제1 립 마스크 이미지를 생성하는 단계; 상기 제1 립 마스크 이미지에 블러 효과를 적용하고, 밝기를 조정하여 제2 립 마스크 이미지를 생성하는 단계; 및 상기 립 세그먼테이션 이미지에 블러 효과를 적용하고 반전한 뒤, 상기 제2 마스크 이미지와 서브트랙트 블렌딩(subtract blending)하여 입 안쪽 영역이 다시 제거된 제3 립 마스크 이미지를 생성하는 단계를 포함하는 것을 특징으로 할 수 있다.According to another aspect, the step of generating the lip mask image includes a lip segmentation image generated to display the lip area in the input image, and a lip segmentation image generated to display the inner mouth area from facial landmarks in the input image. Blending the area mask to create a first lip mask image including an area inside the mouth; generating a second lip mask image by applying a blur effect to the first lip mask image and adjusting brightness; 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. You can do this.
또 다른 측면에 따르면, 상기 이미지 처리 방법은 상기 입술 영역으로부터 입술의 평균 색을 추출하는 단계; 및 상기 입력 이미지에 상기 추출된 입술의 평균 색을 블렌딩하는 단계를 더 포함하고, 상기 서로 다른 밝기의 색상을 블렌딩하는 단계는, 상기 입술의 평균 색이 블렌딩된 입력 이미지에 상기 서로 다른 밝기의 색상을 블렌딩하는 것을 특징으로 할 수 있다.According to another aspect, the image processing method includes extracting an average color of lips from the lip area; and blending the average color of the extracted lips into the input image, wherein the step of blending the colors of different brightness includes blending the average color of the lips into the blended input image with the color of the different brightness. It may be characterized by blending.
또 다른 측면에 따르면, 상기 이미지 처리 방법은 투명도 조절을 위해, 상기 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 원본의 입력 이미지를 블렌딩하는 단계를 더 포함하고, 상기 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 상기 립 마스크 이미지를 블렌딩하는 단계는, 상기 원본 입력 이미지와 블렌딩된 입력 이미지를 상기 립 마스크 이미지와 더 블렌딩하는 것을 특징으로 할 수 있다.According to another aspect, the image processing method further includes the step of blending the input image in which the colors of different brightness are blended and the original input image to adjust transparency, and wherein the colors in the different brightness are blended The step of blending the input image and the lip mask image may further include blending the original input image and the blended input image with the lip mask image.
또 다른 측면에 따르면, 상기 이미지 처리 방법은 상기 휘도 이미지에 콘트라스트 필터(contrast filter)를 적용하여 상기 휘도 이미지의 콘트라스트를 조절하는 단계를 더 포함하고, 상기 서로 다른 밝기의 색상을 블렌딩하는 단계는, 상기 콘트라스트가 조절된 휘도 이미지의 휘도 값을 이용하여 상기 서로 다른 밝기의 색상을 블렌딩하는 것을 특징으로 할 수 있다.According to another aspect, the image processing method further includes adjusting the contrast of the luminance image by applying a contrast filter to the luminance image, and the step of blending colors of different brightness includes, Colors of different brightnesses may be blended using the luminance value of the contrast-adjusted luminance image.
컴퓨터 장치와 결합되어 상기 방법을 컴퓨터 장치에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램을 제공한다.A computer program stored on a computer-readable recording medium is provided in conjunction with a computer device to execute the method on the computer device.
상기 방법을 컴퓨터 장치에 실행시키기 위한 프로그램이 기록되어 있는 컴퓨터 판독 가능한 기록매체를 제공한다.Provided is a computer-readable recording medium on which a program for executing the above method on a computer device is recorded.
컴퓨터에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서에 의해, 사람의 얼굴을 포함하는 입력 이미지의 입술 영역에 대한 휘도 이미지를 생성하고, 립스틱 도표 영역을 조절하기 위한 립 마스크 이미지를 생성하고, 상기 입력 이미지에 상기 휘도 이미지의 휘도 값과 기설정된 임계값에 따라 서로 다른 밝기의 색상을 블렌딩하고, 상기 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 상기 립 마스크 이미지를 블렌딩하는 것을 특징으로 하는 컴퓨터 장치를 제공한다.At least one processor configured to execute computer-readable instructions, wherein the at least one processor generates a luminance image for a lip region of an input image including a human face and adjusts the lipstick diagram region. Generate a lip mask image to create a lip mask image, blend colors of different brightness into the input image according to the luminance value of the luminance image and a preset threshold, and blend the input image with the colors of different brightness blended with the lip mask. A computer device characterized by image blending is provided.
증강현실 기반의 입술 메이크업에서 좀 더 사실적인 립스틱 발색과 반사광의 표현, 질감을 표현할 수 있다.In augmented reality-based lip makeup, more realistic lipstick coloring, reflected light, and texture can be expressed.
도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다.
도 2는 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다.
도 3은 본 발명의 일실시예에 따른 이미지 처리 방법의 예를 도시한 흐름도이다.
도 4는 본 발명의 일실시예에 있어서, 휘도 이미지를 생성하는 방법의 예를 도시한 흐름도이다.
도 5는 본 발명의 일실시예에 있어서, 휘도 이미지를 생성하는 과정의 예를 도시한 도면이다.
도 6은 본 발명의 일실시예에 있어서, 립 마스크 이미지를 생성하는 방법의 예를 도시한 흐름도이다.
도 7은 본 발명의 일실시예에 있어서, 립 마스크 이미지를 생성하는 과정의 예를 도시한 도면이다.
도 8은 본 발명의 일실시예에 있어서, 서로 다른 밝기의 색상을 블렌딩하는 방법의 예를 도시한 흐름도이다.
도 9는 본 발명의 일실시예에 있어서, 출력 이미지를 생성하는 과정의 예를 도시한 도면이다.1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
Figure 2 is a block diagram showing an example of a computer device according to an embodiment of the present invention.
Figure 3 is a flowchart showing an example of an image processing method according to an embodiment of the present invention.
Figure 4 is a flowchart showing an example of a method for generating a luminance image according to an embodiment of the present invention.
Figure 5 is a diagram illustrating an example of a process for generating a luminance image according to an embodiment of the present invention.
Figure 6 is a flowchart illustrating an example of a method for generating a lip mask image according to an embodiment of the present invention.
Figure 7 is a diagram illustrating an example of a process for generating a lip mask image according to an embodiment of the present invention.
Figure 8 is a flowchart showing an example of a method for blending colors of different brightness, according to an embodiment of the present invention.
Figure 9 is a diagram illustrating an example of a process for generating an output image according to an embodiment of the present invention.
이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.
본 발명의 실시예들에 따른 이미지 처리 시스템은 적어도 하나의 컴퓨터 장치에 의해 구현될 수 있다. 이때, 컴퓨터 장치에는 본 발명의 일실시예에 따른 컴퓨터 프로그램이 설치 및 구동될 수 있고, 컴퓨터 장치는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 실시예들에 따른 이미지 처리 방법을 수행할 수 있다. 상술한 컴퓨터 프로그램은 컴퓨터 장치와 결합되어 이미지 처리 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장될 수 있다.Image processing systems according to embodiments of the present invention may be implemented by at least one computer device. At this time, the computer program according to an embodiment of the present invention may be installed and driven in the computer device, and the computer device may perform the image processing method according to the embodiment of the present invention under the control of the driven computer program. . The above-described computer program can be combined with a computer device and stored in a computer-readable recording medium in order to cause the computer to execute the image processing method.
도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다. 도 1의 네트워크 환경은 복수의 전자 기기들(110, 120, 130, 140), 복수의 서버들(150, 160) 및 네트워크(170)를 포함하는 예를 나타내고 있다. 이러한 도 1은 발명의 설명을 위한 일례로 전자 기기의 수나 서버의 수가 도 1과 같이 한정되는 것은 아니다.1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention. The network environment in FIG. 1 shows an example including a plurality of
복수의 전자 기기들(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
통신 방식은 제한되지 않으며, 네트워크(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 utilizing communication networks that the
서버(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
도 2는 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다. 앞서 설명한 복수의 전자 기기들(110, 120, 130, 140) 각각이나 서버들(150, 160) 각각은 도 2를 통해 도시된 컴퓨터 장치(200)에 의해 구현될 수 있다.Figure 2 is a block diagram showing an example of a computer device according to an embodiment of the present invention. Each of the plurality of
이러한 컴퓨터 장치(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)에 로딩될 수 있다.As shown in FIG. 2, this
프로세서(220)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(210) 또는 통신 인터페이스(230)에 의해 프로세서(220)로 제공될 수 있다. 예를 들어 프로세서(220)는 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다.The
통신 인터페이스(230)는 네트워크(170)를 통해 컴퓨터 장치(200)가 다른 장치(일례로, 앞서 설명한 저장 장치들)와 서로 통신하기 위한 기능을 제공할 수 있다. 일례로, 컴퓨터 장치(200)의 프로세서(220)가 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청이나 명령, 데이터, 파일 등이 통신 인터페이스(230)의 제어에 따라 네트워크(170)를 통해 다른 장치들로 전달될 수 있다. 역으로, 다른 장치로부터의 신호나 명령, 데이터, 파일 등이 네트워크(170)를 거쳐 컴퓨터 장치(200)의 통신 인터페이스(230)를 통해 컴퓨터 장치(200)로 수신될 수 있다. 통신 인터페이스(230)를 통해 수신된 신호나 명령, 데이터 등은 프로세서(220)나 메모리(210)로 전달될 수 있고, 파일 등은 컴퓨터 장치(200)가 더 포함할 수 있는 저장 매체(상술한 영구 저장 장치)로 저장될 수 있다.The
입출력 인터페이스(240)는 입출력 장치(250)와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 입력 장치는 마이크, 키보드 또는 마우스 등의 장치를, 그리고 출력 장치는 디스플레이, 스피커와 같은 장치를 포함할 수 있다. 다른 예로 입출력 인터페이스(240)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수도 있다. 입출력 장치(250)는 컴퓨터 장치(200)와 하나의 장치로 구성될 수도 있다.The input/
또한, 다른 실시예들에서 컴퓨터 장치(200)는 도 2의 구성요소들보다 더 적은 혹은 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 컴퓨터 장치(200)는 상술한 입출력 장치(250) 중 적어도 일부를 포함하도록 구현되거나 또는 트랜시버(transceiver), 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수도 있다.Additionally, in other embodiments,
도 3은 본 발명의 일실시예에 따른 이미지 처리 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 이미지 처리 방법은 컴퓨터 장치(200)에 의해 수행될 수 있다. 이때, 컴퓨터 장치(200)의 프로세서(220)는 메모리(210)가 포함하는 운영체제의 코드나 적어도 하나의 컴퓨터 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(220)는 컴퓨터 장치(200)에 저장된 코드가 제공하는 제어 명령에 따라 컴퓨터 장치(200)가 도 3의 방법이 포함하는 단계들(310 내지 340)을 수행하도록 컴퓨터 장치(200)를 제어할 수 있다.Figure 3 is a flowchart showing an example of an image processing method according to an embodiment of the present invention. The image processing method according to this embodiment may be performed by the
단계(310)에서 컴퓨터 장치(200)는 사람의 얼굴을 포함하는 입력 이미지의 입술 영역에 대한 휘도(luminance) 이미지를 생성할 수 있다. 이러한 휘도 이미지는 립스틱 질감을 표현하기 위해 이용될 수 있다. 일례로, 컴퓨터 장치(200)는 휘도 이미지의 생성을 위해 서로 다른 밝기로 조절된 두 개의 휘도 이미지들에 각각 블러 효과를 적용할 수 있으며, 두 휘도 이미지들을 결합함으로써, 최종 휘도 이미지를 생성할 수 있다. 휘도 이미지를 생성하는 구체적인 방법에 대해서는 이후 도 4 및 도 5를 통해 더욱 자세히 설명한다.In step 310, the
단계(320)에서 컴퓨터 장치(200)는 립스틱 도표 영역을 조절하기 위한 립 마스크 이미지를 생성할 수 있다. 일례로, 컴퓨터 장치(200)는 입술 영역을 표시하도록 생성된 립 세그먼테이션(lip segmentation) 이미지와 얼굴 랜드마크로부터 입 안쪽 영역을 표시하도록 생성된 입 안쪽 영역 마스크를 이용하여 립스틱 도표 영역이 조절된 립 마스크 이미지를 생성할 수 있다. 립 마스크 이미지를 생성하기 위한 구체적인 방법에 대해서는 이후 도 6 및 도 7을 통해 더욱 자세히 설명한다.In step 320, the
단계(330)에서 컴퓨터 장치(200)는 입력 이미지에 휘도 이미지의 휘도 값과 기설정된 임계값에 따라 서로 다른 밝기의 색상을 블렌딩할 수 있다. 일례로, 컴퓨터 장치(200)는 휘도 이미지의 픽셀의 휘도 값과 기설정된 임계값에 따라 입력 이미지의 픽셀에 특정 밝기의 색상을 블렌딩할 수 있다. 이러한 색상의 블렌딩에 대해서는 이후 도 8을 통해 더욱 자세히 설명한다.In step 330, the
단계(340)에서 컴퓨터 장치(200)는 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 립 마스크 이미지를 블렌딩할 수 있다. 이때, 컴퓨터 장치(200)는 입력 이미지 전체가 아닌 립 마스크 이미지의 영역에 필터가 적용되도록 하기 위해, 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 립 마스크 이미지를 블렌딩할 수 있다. 일례로, 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 립 마스크 이미지는 알파 블렌드(alpha blend)를 통해 블렌딩될 수 있으나, 이에 한정되는 것은 아니다.In step 340, the
도 4는 본 발명의 일실시예에 있어서, 휘도 이미지를 생성하는 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 방법의 단계들(410 내지 450)은 앞서 도 3을 통해 설명한 단계(310)에 포함되어 컴퓨터 장치(200)에 의해 수행될 수 있다.Figure 4 is a flowchart showing 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 this embodiment may be included in step 310 described above with reference to FIG. 3 and performed by the
단계(410)에서 컴퓨터 장치(200)는 입력 이미지의 입술 영역에 대한 그레이 스케일(gray scale) 이미지를 생성할 수 있다. 이미지에 대한 그레이 스케일 이미지를 생성하는 방법은 잘 알려져 있기 때문에 구체적인 설명은 생략한다.In step 410, the
단계(420)에서 컴퓨터 장치(200)는 그레이 스케일 이미지를 복제하여 제1 휘도 이미지 및 제2 휘도 이미지를 생성할 수 있다. 일례로, 단계(410)에서 생성된 그레이 스케일 이미지가 제1 휘도 이미지가 될 수 있으며, 그레이 스케일 이미지를 복제한 이미지가 제2 휘도 이미지가 될 수 있다.In step 420, the
단계(430)에서 컴퓨터 장치(200)는 제1 휘도 이미지의 밝기를 제1 정도로 변경하고, 블러 효과를 적용할 수 있다. 일례로, 컴퓨터 장치(200)는 제1 휘도 이미지의 밝기를 제1 정도로 변경하기 위해, 제1 휘도 이미지에 톤 커브 에디팅(tone curve editing)을 적용한 후, 가우시안 블러(Gaussian blur)를 적용할 수 있다.In step 430, the
단계(440)에서 컴퓨터 장치(200)는 제2 휘도 이미지의 밝기를 제2 정도로 변경하고, 블러 효과를 적용할 수 있다. 이 경우, 컴퓨터 장치(200)는 제2 휘도 이미지의 밝기를 제2 정도로 변경하기 위해, 제2 휘도 이미지에 톤 커브 에디팅을 적용한 후, 가우시안 블러를 적용할 수 있다.In step 440, the
이상에서는 블러 효과의 적용을 위한 예시로 가우시안 블러의 사용을 설명하고 있으나, 블러 효과가 가우시안 블러로 한정되는 것은 아니다. 일례로, 레이디얼 블러(radial blur), 스마트 블러(smart blur) 등과 같이 이미 잘 알려진 다양한 블러 효과들 중 적어도 하나가 활용될 수 있다.In the above, the use of Gaussian blur is explained as an example for applying the blur effect, but the blur effect is not limited to Gaussian blur. For example, at least one of various well-known blur effects such as radial blur, smart blur, etc. may be used.
이때, 립스틱을 표현하는 모델을 정의할 때, 두 가지 서로 다른 톤 커브 에디팅의 속성이 정의될 수 있으며, 제1 정도는 제1 휘도 이미지의 밝기를 증감시키는 정도를, 제2 정도는 제2 휘도 이미지의 밝기를 증감시키는 정도를 각각 포함할 수 있으며, 제1 정도와 제2 정도는 서로 상이할 수 있다. 이 경우, 컴퓨터 장치(200)는 제1 휘도 이미지와 제2 휘도 이미지에 각각 서로 다른 톤 커브 에디팅을 적용함으로써, 제1 휘도 이미지의 밝기와 제2 휘도 이미지의 밝기를 제1 정도 및 제2 정도와 같이 각각 서로 다른 정도로 변경할 수 있다.At this time, when defining a model representing lipstick, two different tone curve editing properties can be defined, where the first degree is the degree to increase or decrease the brightness of the first luminance image, and the second degree is the degree to the second luminance. Each may include a degree of increasing or decreasing the brightness of the image, and the first degree and the second degree may be different from each other. In this case, the
단계(450)에서 컴퓨터 장치(200)는 블러 효과가 적용된 제1 휘도 이미지 및 제2 휘도 이미지를 블렌딩하여 휘도 이미지를 생성할 수 있다. 이때, 컴퓨터 장치(200)는 제1 휘도 이미지 및 제2 휘도 이미지를 애디티브 블렌드(additive blend)를 이용하여 블렌딩할 수 있으나 이에 한정되는 것은 아니다.In step 450, the
이처럼 두 휘도 이미지들을 블렌딩하여 최종 휘도 이미지를 생성함으로써, 2D 이미지를 3D 이미지와 같이 처리하여 스페큘러(specular) 영역과 디퓨즈(diffuse) 영역을 추출하고 각각에 대해 명암을 조절하고 흐릿함을 조절한 최종 휘도 이미지를 얻을 수 있다.By blending the two luminance images like this to create the final luminance image, the 2D image is processed like a 3D image to extract the specular area and the diffuse area, and adjust the contrast and blur for each to create a final luminance image. A luminance image can be obtained.
도 5는 본 발명의 일실시예에 있어서, 휘도 이미지를 생성하는 과정의 예를 도시한 도면이다. 컴퓨터 장치(200)는 입력 이미지(input image, 502), 입술의 크기에 대한 정보를 포함하는 립 익스텐트(lip extent, 504) 및 입술 영역을 표시하도록 생성된 립 세그먼테이션(lip segmentation, 506)을 입력으로 받을 수 있다. 컴퓨터 장치는 입력 이미지(502)의 얼굴 랜드마크에 대한 정보를 더 입력받을 수 있으나, 얼굴 랜드마크에 대해서는 이후 더욱 자세히 설명한다.Figure 5 is a diagram illustrating an example of a process for generating a luminance image according to an embodiment of the present invention. The
컴퓨터 장치(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
이후, 컴퓨터 장치(200)는 입술 POI 이미지(512)에 대한 그레이 스케일 이미지(gray scale image, 514)를 생성할 수 있으며, 생성된 그레이 스케일 이미지(514)를 복제하여 제1 휘도 이미지(미도시)와 제2 휘도 이미지(미도시)를 생성할 수 있다. 이때, 제1 휘도 이미지와 제2 휘도 이미지는 실질적으로 그레이 스케일 이미지(514)와 동일하기 때문에 별도로 도시하지 않았다.Thereafter, the
이때, 컴퓨터 장치(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
또한, 컴퓨터 장치(200)는 제1 톤 커브 조절 이미지(518) 및 제2 톤 커브 조절 이미지(518)에 각각 가우시안 블러를 적용하여 제1 가우시안 블러드 이미지(first Gaussian blurred image, 522)와 제2 가우시안 블러드 이미지(second Gaussian blurred image, 524)를 얻을 수 있다. 제1 톤 커브 조절 이미지(518) 및 제2 톤 커브 조절 이미지(518) 각각에 적용되는 가우시안 블러는 동일한 블러 효과가 적용될 수 있으나 실시예에 따라 서로 다른 블러 정도를 적용하는 것 역시 고려될 수 있다.In addition, the
이후, 컴퓨터 장치(200)는 제1 가우시안 블러드 이미지(522)와 제2 가우시안 블러드 이미지(524)를 애디티브 블렌딩함으로써, 애디티브 블렌디드 이미지(additive blended image, 526)를 휘도 이미지로서 얻을 수 있다.Thereafter, the
도 6은 본 발명의 일실시예에 있어서, 립 마스크 이미지를 생성하는 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 방법의 단계들(610 내지 630)은 앞서 도 3을 통해 설명한 단계(320)에 포함되어 컴퓨터 장치(200)에 의해 수행될 수 있다.Figure 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 this embodiment may be included in step 320 described above with reference to FIG. 3 and performed by the
단계(610)에서 컴퓨터 장치(200)는 입력 이미지에서 입술 영역을 표시하도록 생성된 립 세그먼테이션 이미지와 입력 이미지의 얼굴 랜드마크로부터 입 안쪽 영역을 표시하도록 생성된 입 안쪽 영역 마스크를 블렌딩하여 입 안쪽 영역을 포함하는 제1 립 마스크 이미지를 생성할 수 있다. 이때, 컴퓨터 장치(200)는 립 세그먼테이션 이미지와 입 안쪽 영역 마스크를 애디티브 블렌딩함으로써, 제1 립 마스크 이미지를 생성할 수 있다. 이때, 입 안쪽 영역 마스크는 얼굴 랜드마크를 이용하여 생성될 수 있다.In step 610, the
단계(620)에서 컴퓨터 장치(200)는 제1 립 마스크 이미지에 블러 효과를 적용하고, 밝기를 조정하여 제2 립 마스크 이미지를 생성할 수 있다. 일례로, 블러 효과의 적용은 앞서 설명한 가우시안 블러의 적용을 통해 이루어질 수 있으며, 밝기의 조절은 톤 커브 에디팅을 통해 이루어질 수 있다. 이때, 컴퓨터 장치(200)는 톤 커브 에디팅의 적용 전에 입술 영역이 효과적으로 줄어들 수 있도록 제1 립 마스크 이미지에 가우시안 블러를 먼저 적용할 수 있으며, 이후 가우시안 블러가 적용된 제1 립 마스크 이미지에 톤 커브 에디팅을 적용하여 가우시안 블러의 적용 분포를 조절하고 명도를 낮춰 입술 영역을 줄일 수 있다.In step 620, the
단계(630)에서 컴퓨터 장치(200)는 립 세그먼테이션 이미지에 블러 효과를 적용하고 반전한 뒤, 제2 마스크 이미지와 서브트랙트 블렌딩(subtract blending)하여 입 안쪽 영역이 다시 제거된 제3 립 마스크 이미지를 생성할 수 있다. 일례로, 립 세그먼테이션 이미지에 블러 효과를 적용한 이미지가 앞서 도 5를 통해 설명한 처리된 립 세그먼테이션(514)일 수 있으며, 컴퓨터 장치(200)는 이러한 처리된 립 세그먼테이션(514)을 반전하여 반전된 립 세그먼테이션을 얻을 수 있다. 이후, 컴퓨터 장치(200)는 이러한 반전된 립 세그먼테이션과 제2 마스크 이미지에 대한 서브트랙트 블렌딩을 통해 입 안쪽 영역이 다시 제거된 제3 립 마스크 이미지를 생성할 수 있다. 다시 말해, 블러 효과와 톤 커브 에디팅을 통해 입술 영역을 줄여 립스틱 도포 영역에 해당하는 립 마스크 이미지를 얻을 수 있게 된다.In step 630, the
도 7은 본 발명의 일실시예에 있어서, 립 마스크 이미지를 생성하는 과정의 예를 도시한 도면이다. 컴퓨터 장치(200)는 앞서 설명한 바와 같이 입력 이미지(일례로, 입력 이미지(502))에 포함된 얼굴에 대한 얼굴 랜드마크(face landmark, 702)를 입력으로 더 활용할 수 있다. 이때, 컴퓨터 장치(200)는 얼굴 랜드마크(702)로부터 입 안쪽 영역을 표시하도록 생성된 이너 립 마스크(inner lip mask, 704)를 생성할 수 있다.Figure 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
이후, 컴퓨터 장치(200)는 이너 립 마스크(704)와 립 세그먼테이션(506)을 애디티브 블렌딩하여 입 안쪽 영역을 포함하는 제1 립 마스크 이미지(미도시)를 생성할 수 있다. 도 7은 컴퓨터 장치(200)가 이러한 제1 립 마스크 이미지에 가우시안 블러를 적용함으로써, 블러드 마스크(blurred mask, 706)를 생성하는 예를 나타내고 있다. 또한, 컴퓨터 장치(200)는 블러드 마스크(706)에 톤 커브 에디팅을 적용하여 톤 커브 적용 마스크(tone curve adjusted mask, 708)를 생성할 수 있다.Thereafter, the
한편, 컴퓨터 장치(200)는 처리된 립 세그먼테이션(514)을 반전하여 반전된 립 세그먼테이션(710)을 생성할 수 있다. 이 경우, 컴퓨터 장치(200)는 반전된 립 세그먼테이션(710)과 톤 커브 적용 마스크(708)간의 서브트랙트 블렌딩을 통해 최종 립 마스크(720)를 얻을 수 있다. 이때, 최종 립 마스크(720)는 립스틱 도포 영역을 나타내는 필터의 역할을 할 수 있으며, 블러와 톤 커브 에디팅을 통해 립 세그먼테이션(506)이 보여주는 입술 영역보다 줄어든 립스틱 도포 영역이 얻어졌음을 알 수 있다. 컴퓨터 장치(200)는 블러와 톤 커브 에디팅의 정도를 통해 입술 영역에서 보다 다양하게 립스틱 도포 영역을 조절하여 얻을 수 있다.Meanwhile, the
도 8은 본 발명의 일실시예에 있어서, 서로 다른 밝기의 색상을 블렌딩하는 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 방법의 단계들(810 및 820)은 앞서 도 3을 통해 설명한 단계(330)에 포함되어 컴퓨터 장치(200)에 의해 수행될 수 있다. 이때, 단계(330)에서 설명한 기설정된 임계값은 순차적으로 더 큰 값을 갖는 제1 임계값(LowerDarkThreshold), 제2 임계값(UpperDarkThreshold), 제3 임계값(LowerLightThreshold) 및 제4 임계값(UpperLightThreshold)을 포함할 수 있다. 다시 말해, 제1 임계값보다 제2 임계값이, 제2 임계값보다 제3 임계값이, 제3 임계값보다 제4 임계값이 더 클 수 있다.Figure 8 is a flowchart showing 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 this embodiment may be included in step 330 described above with reference to FIG. 3 and performed by the
단계(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
단계(811)에서 컴퓨터 장치(200)는 휘도 이미지에서 제1 픽셀의 휘도 값이 제1 임계값 미만인 경우, 입력 이미지에서 제1 픽셀에 대응하는 제2 픽셀에 제1 밝기의 색상을 블렌딩할 수 있다. 여기서 색상은 입력 이미지에 적용하고자 하는 립스틱의 색상일 수 있으며, 휘도 값에 따라 서로 다른 밝기의 동일한 색상이 대응하는 픽셀에 블렌딩될 수 있다(100% partial multiply blend).In step 811, if the luminance value of the first pixel in the luminance image is less than the first threshold, the
단계(812)에서 컴퓨터 장치(200)는 휘도 이미지에서 제1 픽셀의 휘도 값이 제1 임계값 및 제2 임계값에 의해 결정되는 범위에 포함되는 경우, 입력 이미지에서 제1 픽셀에 대응하는 제2 픽셀에 제1 밝기를 선형 보간한 색상을 블렌딩할 수 있다. 이때, 선형 보간된 제1 밝기는 제1 픽셀의 휘도 값이 제1 임계값에 가까울수록 100 %, 그리고 제2 임계값에 가까울수록 0%가 되도록 선형 보간될 수 있다. 예를 들어, 제1 임계값 및 제2 임계값에 의해 결정되는 범위에 포함되는 휘도 값이 작을수록 제2 픽셀에 상대적으로 더 어두운 색상이 블렌딩될 수 있다. 또한, 제1 임계값 및 제2 임계값에 의해 결정되는 범위에 포함되는 휘도 값이 클수록 제2 픽셀에 상대적으로 더 밝은 색상이 블렌딩될 수 있다.In step 812, if the luminance value of the first pixel in the luminance image is within the range determined by the first threshold and the second threshold, the
한편, 휘도 이미지에서 제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, 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 밝기의 색상을 블렌딩할 수 있다. 이미 설명한 바와 같이 색상은 입력 이미지에 적용하고자 하는 립스틱의 색상일 수 있으며, 휘도 값에 따라 서로 다른 밝기의 동일한 색상이 대응하는 픽셀에 블렌딩될 수 있다.In step 820, the
단계(821)에서 컴퓨터 장치(200)는 휘도 이미지에서 제1 픽셀의 휘도 값이 제3 임계값 및 제4 임계값에 의해 결정되는 범위에 포함되는 경우, 입력 이미지에서 제1 픽셀에 대응하는 제2 픽셀에 제2 밝기를 선형 보간한 색상을 블렌딩할 수 있다. 이때, 선형 보간된 제2 밝기는 제1 픽셀의 휘도 값이 제3 임계값에 가까울수록 0 퍼센트, 그리고 제4 임계값에 가까울수록 100%가 되도록 선형 보간될 수 있다.In step 821, if the luminance value of the first pixel in the luminance image is within the range determined by the third threshold and the fourth threshold, the
단계(822)에서 컴퓨터 장치(200)는 휘도 이미지에서 제1 픽셀의 휘도 값이 제4 임계값을 초과하는 경우, 입력 이미지에서 제1 픽셀에 대응하는 제2 픽셀에 제2 밝기의 색상을 블렌딩할 수 있다(100% partial screen blend).In step 822, if the luminance value of the first pixel in the luminance image exceeds the fourth threshold, the
한편, 휘도 이미지에서 제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, 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)에서 입술의 평균 색이 블렌딩된 입력 이미지에 서로 다른 밝기의 색상을 블렌딩할 수 있다.Figure 9 is a diagram illustrating an example of a process for generating an output image according to an embodiment of the present invention. The
한편, 도 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, in FIG. 9, the
한편, 실시예에 따라 컴퓨터 장치(200)는 립 마스크 이미지를 블렌딩하기 전에, 투명도 조절을 위해, 서로 다른 밝기의 색상이 블렌딩된 입력 이미지와 원본의 입력 이미지를 블렌딩할 수 있다. 이 경우, 컴퓨터 장치(200)는 단계(340)에서 원본 입력 이미지와 블렌딩된 입력 이미지를 립 마스크 이미지와 더 블렌딩할 수 있다.Meanwhile, depending on the embodiment, the
또한, 실시예에 따라 컴퓨터 장치(200)는 휘도 이미지에 콘트라스트 필터(contrast filter)를 적용하여 휘도 이미지의 콘트라스트를 조절할 수 있다. 일례로, 컴퓨터 장치(200)는 아래 수학식 1과 같이 휘도 이미지의 콘트라스트를 조절할 수 있다.Additionally, depending on the embodiment, the
[수학식 1][Equation 1]
y = (x - 0.5) * luminanceContrast + 0.5y = (x - 0.5) * luminanceContrast + 0.5
여기서, x는 휘도 이미지의 콘트라스트 값을, luminanceContrast는 휘도 대비를 y는 조절된 휘도 이미지의 콘트라스트를 각각 의미할 수 있다.Here, x may mean the contrast value of the luminance image, luminanceContrast may mean the luminance contrast, and y may mean the contrast of the adjusted luminance image.
이 경우, 컴퓨터 장치(200)는 단계(330)에서 콘트라스트가 조절된 휘도 이미지의 휘도 값을 이용하여 서로 다른 밝기의 색상을 블렌딩할 수 있다. 이러한 휘도 이미지의 콘트라스트 조절은 조명 상황에 따라 적용하고자 하는 색상의 밝기가 너무 민감하게 반응하지 않도록 조절하는 효과를 제공할 수 있다.In this case, the
이처럼, 본 발명의 실시예들에 따르면, 증강현실 기반의 입술 메이크업에서 좀 더 사실적인 립스틱 발색과 반사광의 표현, 질감을 표현할 수 있다. 또한, 입술 영역의 휘도 이미지의 분리와 이미지에 대한 개별적인 이미지 프로세싱 적용으로, 기존 립스틱 그리기 대비 자연스러운 반사광 표현과 사실에 가까운 자연광 대응 표현을 구현할 수 있다. 또한, Partial Screen Blend, Partial Multiply Blend, 톤 커브, 가우시안 블러, 콘트라스트, 입술의 평균 색 등과 같이 립스틱의 질감을 표현하기 위한 다양한 조절값을 제공할 수 있다. 또한, 립스틱이 도포되는 영역을 조절할 수 있다. 또한, 일반적으로 통용되는 대다수의 모바일 단말에서도 1080p 해상도 기준 안정적인 FPS(Frame Per Second)를 보장하는 우수한 성능을 제공할 수 있다.As such, according to embodiments of the present invention, more realistic lipstick coloring, expression of reflected light, 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, it is possible to implement natural reflected light expression and realistic natural light response expression compared to existing lipstick drawings. Additionally, it can provide various adjustment values to express the texture of lipstick, such as Partial Screen Blend, Partial Multiply Blend, Tone Curve, Gaussian Blur, Contrast, and Average Lip Color. Additionally, you can control the area where the lipstick is applied. In addition, the majority of commonly used mobile terminals can provide excellent performance that guarantees stable FPS (Frame Per Second) based on 1080p resolution.
이상에서 설명된 시스템 또는 장치는 하드웨어 구성요소, 또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, 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 system or device described above may be implemented with hardware components or a combination of hardware components and software components. For example, devices and components described in embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), etc. , may be implemented using one or more general-purpose or special-purpose computers, such as a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. Additionally, a processing device may access, store, manipulate, process, and generate data in response to the execution of software. For ease of understanding, a single processing device may be described as being used; however, those skilled in the art will understand that a processing device includes multiple processing elements and/or multiple types of processing elements. It can be seen that it may include. For example, a processing device may include a plurality of processors or one processor and one controller. Additionally, other processing configurations, such as parallel processors, are possible.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록매체에 저장될 수 있다.Software may include a computer program, code, instructions, or a combination of one or more of these, which may configure a processing unit to operate as desired, or may be processed independently or collectively. You can command the device. Software and/or data may be used on any type of machine, component, physical device, virtual equipment, computer storage medium or device to be interpreted by or to provide instructions or data to a processing device. It can be embodied in . Software may be distributed over networked computer systems and stored or executed in a distributed manner. 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 instructions that can be executed through various computer means and recorded on a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc., singly or in combination. The medium may continuously store a computer-executable program, or may temporarily store it for execution or download. In addition, the medium may be a variety of recording or storage means in the form of a single or several pieces of hardware combined. It is not limited to a medium directly connected to a computer system and may be distributed over a network. Examples of media 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 there may be something configured to store program instructions, including ROM, RAM, flash memory, etc. Additionally, examples of other media include recording or storage media managed by app stores that distribute applications, sites or servers that supply or distribute various other software, etc. 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.
이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with limited examples and drawings, various modifications and variations can be made by those skilled in the art from the above description. For example, 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 other components are used. Alternatively, appropriate results may be achieved even if substituted or substituted by an equivalent.
그러므로, 다른 구현들, 다른 실시예들 및 청구범위와 균등한 것들도 후술하는 청구범위의 범위에 속한다.Therefore, other implementations, other embodiments and equivalents of the claims also fall within the scope of the following claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020220049248AKR102800992B1 (en) | 2022-04-21 | 2022-04-21 | Method and system for processing image for lip makeup based on augmented reality |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020220049248AKR102800992B1 (en) | 2022-04-21 | 2022-04-21 | Method and system for processing image for lip makeup based on augmented reality |
| Publication Number | Publication Date |
|---|---|
| KR20230149934Atrue KR20230149934A (en) | 2023-10-30 |
| KR102800992B1 KR102800992B1 (en) | 2025-04-29 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| KR1020220049248AActiveKR102800992B1 (en) | 2022-04-21 | 2022-04-21 | Method and system for processing image for lip makeup based on augmented reality |
| Country | Link |
|---|---|
| KR (1) | KR102800992B1 (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20180025775A (en)* | 2016-09-01 | 2018-03-09 | 스노우 주식회사 | Method and system for processing image using lookup table and layered mask |
| KR20180035863A (en)* | 2015-09-25 | 2018-04-06 | 센젠 차이나 스타 옵토일렉트로닉스 테크놀로지 컴퍼니 리미티드 | Image contrast enhancement method |
| KR20210018121A (en)* | 2019-08-06 | 2021-02-17 | 삼성전자주식회사 | Device and method for performing local histogram matching with global regularization and motion exclusion |
| KR20210118232A (en)* | 2019-02-18 | 2021-09-29 | 삼성전자주식회사 | Image data processing from composite images |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20180035863A (en)* | 2015-09-25 | 2018-04-06 | 센젠 차이나 스타 옵토일렉트로닉스 테크놀로지 컴퍼니 리미티드 | Image contrast enhancement method |
| KR20180025775A (en)* | 2016-09-01 | 2018-03-09 | 스노우 주식회사 | Method and system for processing image using lookup table and layered mask |
| KR20210118232A (en)* | 2019-02-18 | 2021-09-29 | 삼성전자주식회사 | Image data processing from composite images |
| KR20210018121A (en)* | 2019-08-06 | 2021-02-17 | 삼성전자주식회사 | Device and method for performing local histogram matching with global regularization and motion exclusion |
| Publication number | Publication date |
|---|---|
| KR102800992B1 (en) | 2025-04-29 |
| Publication | Publication Date | Title |
|---|---|---|
| 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 | |
| CN113240783B (en) | Stylized rendering method and device, readable storage medium and electronic equipment | |
| CN111742347A (en) | Dynamic illumination for objects in an image | |
| US10171785B2 (en) | Color balancing based on reference points | |
| US9697642B2 (en) | Image processing device and image processing method | |
| US10885697B1 (en) | Systems and methods for generating augmented-reality makeup effects | |
| 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 | |
| WO2023165369A1 (en) | Image processing method and apparatus | |
| US10891801B2 (en) | Method and system for generating a user-customized computer-generated animation | |
| CN116363288A (en) | Rendering method and device of target object, storage medium and computer equipment | |
| US12437464B2 (en) | Method and apparatus, electronic device, computer-readable storage medium, and computer program product for performing real-time image rendering of virtual objects | |
| CN115311395A (en) | Three-dimensional scene rendering method, device and equipment | |
| JP2017111719A (en) | Video processing device, video processing method and video processing program | |
| US20150071536A1 (en) | Saturation varying color space | |
| CN119107399B (en) | Shadow rendering method and device based on 2D image | |
| CN113947663A (en) | Method, device, storage medium and electronic device for generating vegetation model | |
| CN111462007B (en) | Image processing method, device, equipment and computer storage medium | |
| US8942476B1 (en) | Saturation varying and lighting independent color color control for computer graphics | |
| KR102800992B1 (en) | Method and system for processing image for lip makeup based on augmented reality | |
| 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 | |
| US12118653B2 (en) | Depth analyzer and shading rate controller | |
| Hackl et al. | Diminishing reality |
| 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 |