KR20180109217A - Method for enhancing face image and electronic device for the same - Google Patents

Method for enhancing face image and electronic device for the same Download PDF

Info

Publication number
KR20180109217A
KR20180109217A KR1020170038482A KR20170038482A KR20180109217A KR 20180109217 A KR20180109217 A KR 20180109217A KR 1020170038482 A KR1020170038482 A KR 1020170038482A KR 20170038482 A KR20170038482 A KR 20170038482A KR 20180109217 A KR20180109217 A KR 20180109217A
Authority
KR
South Korea
Prior art keywords
correction
face
region
processor
image
Prior art date
Application number
KR1020170038482A
Other languages
Korean (ko)
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 KR1020170038482A priority Critical patent/KR20180109217A/en
Publication of KR20180109217A publication Critical patent/KR20180109217A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/001
    • G06K9/00268
    • G06K9/00604
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/18Eye characteristics, e.g. of the iris
    • G06V40/19Sensors therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Ophthalmology & Optometry (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present invention provides an electronic device capable of globally or locally correcting a face. The electronic device of various embodiments includes a memory, a display, and a processor operably connected to the memory or the display. The processor recognizes a face region based on a feature point extracted from an image, sets one or more objects in the face region, sets a reference line in the face region using the objects, divides the face region based on the reference line, calculates a correction ratio for each of the divided face regions, corrects the face regions according to the calculated correction ratio, and displays the corrected image on the display. Other embodiments are also possible.

Description

얼굴 영상 보정 방법 및 이를 구현한 전자 장치{METHOD FOR ENHANCING FACE IMAGE AND ELECTRONIC DEVICE FOR THE SAME}Technical Field [0001] The present invention relates to a facial image correcting method,

다양한 실시예는 얼굴 영상 보정 방법 및 장치에 관한 것이다.Various embodiments relate to a method and apparatus for facial image correction.

최근 디지털 기술의 발달과 함께 이동통신 단말기, PDA(personal digital assistant), 전자수첩, 스마트 폰, 태블릿 PC(personal computer), 웨어러블 디바이스(wearable device) 등과 같은 다양한 유형의 전자 장치가 널리 사용되고 있다. 이러한, 전자 장치는 기능 지지 및 증대를 위해, 전자 장치의 하드웨어적인 부분 및/또는 소프트웨어적인 부분이 지속적으로 개량되고 있다.2. Description of the Related Art Various types of electronic devices such as a mobile communication terminal, a personal digital assistant (PDA), an electronic organizer, a smart phone, a personal computer, a wearable device, and the like have been widely used. Such electronic devices are continuously being improved in hardware and / or software portions of electronic devices for function support and enhancement.

한편, 전자 장치에 카메라가 포함되면서, 카메라 촬영 기능에 대한 다양한 기능을 제공함과 동시에, 촬영 시 또는 촬영된 영상에 대한 보정 기능도 발전하고 있다. 예를 들어, 인물 사진(예: 셀피(selfie))의 경우, 전자 장치는 얼굴을 환하고 선명하게 보정해주는 뷰티 기능을 제공하고 있다. 뷰티 기능은 얼굴 피부를 매끈하게 만들어주는 스무딩(smoothing) 기능, 얼굴의 밝기를 밝게 해주는 밝기(brightening) 기능, 얼굴을 갸름하게 만들어주는 슬리머(slimmer) 기능, 눈을 크게 만들어주는 눈 확대(eye enlargement) 기능을 포함할 수 있다.On the other hand, while a camera is included in an electronic device, a variety of functions for a camera photographing function are provided, and a correction function for a photographing or photographed image is also developed. For example, for portraits (such as selfie), the electronic device provides a beauty feature that brightens and brightens the face. Beauty features include smoothing to smooth the facial skin, brightening to brighten the face's brightness, slimmer to make the face slimmer, eye enlargement ) Function.

종래의 얼굴 보정 방법은 얼굴 영역에 전부 동일한 효과를 적용하기 때문에, 눈, 코, 입 등의 영역에 블러 현상이 발생하거나, 경계선이 생기는 등의 문제점이 발생할 수 있다. 또한, 종래에는 얼굴의 기울기(예: 회전 각도)와 상관없이 얼굴을 좌, 우 대칭으로만 보정하기 때문에, 부자연스럽게 얼굴이 보정될 수 있다.Since the conventional face correction method applies the same effect to the entire face area, blurring may occur in areas such as the eyes, nose, mouth, and the like, or a border line may be generated. Further, since the face is corrected only in the left and right symmetry irrespective of the inclination (e.g., rotation angle) of the face in the past, the face can be corrected unnaturally.

다양한 실시예들은 얼굴 내 특징점에 기반하여 얼굴 기울기(또는 오브젝트 방향)를 결정하고, 결정된 얼굴 기울기에 기반하여 전체적으로 또는 지역적으로 얼굴을 보정할 수 있다.Various embodiments can determine a face slope (or object orientation) based on feature points in a face and correct the face globally or locally based on the determined face slope.

다양한 실시예들에 따른 전자 장치는 메모리, 디스플레이, 카메라 및 상기 메모리, 상기 디스플레이 또는 카메라와 기능적으로 연결된 프로세서를 포함하고, 상기 프로세서는, 이미지로부터 추출된 특징점에 적어도 기반하여 얼굴 영역을 인식하고, 상기 얼굴 영역 내 하나 이상의 오브젝트들을 설정하고, 상기 하나 이상의 오브젝트들을 이용하여 상기 얼굴 영역 내 기준선을 설정하고, 상기 기준선을 기준으로 상기 얼굴 영역을 분할하고, 상기 분할된 얼굴 영역별 보정 비율을 계산하고, 계산된 보정 비율에 적어도 기반하여 상기 얼굴 영역을 보정하고, 상기 보정된 이미지를 상기 디스플레이 표시하도록 설정될 수 있다.An electronic device according to various embodiments includes a memory, a display, a camera and a processor operatively associated with the memory, the display, or the camera, the processor recognizing the face region based at least on feature points extracted from the image, Setting one or more objects in the face area, setting a reference line in the face area using the one or more objects, dividing the face area based on the reference line, calculating a correction ratio for each of the divided face areas , Correct the face region based on at least the calculated correction ratio, and display the corrected image on the display.

다양한 실시예들에 따른 전자 장치는 카메라, 및 프로세서를 포함하고, 상기 프로세서는, 상기 카메라를 이용하여, 얼굴이 포함된 이미지를 획득하고, 상기 얼굴에 대한 검출 방법에 적어도 기반하여, 상기 얼굴과 관련된 복수의 가이드 마스크들을 생성하고, 상기 복수의 가이드 마스크들의 적어도 일부와 상기 얼굴 중 피부에 해당될 확률에 적어도 기반하여, 상기 피부에 대한 이미지 처리 방법을 결정하고, 및 상기 결정된 이미지 처리 방법에 적어도 기반하여, 상기 피부의 적어도 일부를 보정하도록 설정될 수 있다.According to various embodiments, an electronic device includes a camera and a processor, wherein the processor is configured to use the camera to obtain an image containing a face, and based on at least the detection method for the face, Determining a method of image processing for the skin based at least on a probability of being at least part of the plurality of guide masks and skin of the face; Based on at least a portion of the skin.

다양한 실시예들에 따른 전자 장치의 동작 방법은 이미지로부터 추출된 특징점에 적어도 기반하여 얼굴 영역을 인식하는 동작, 상기 얼굴 영역 내 하나 이상의 오브젝트들을 설정하는 동작, 상기 하나 이상의 오브젝트들을 이용하여 상기 얼굴 영역 내 기준선을 설정하는 동작, 상기 기준선을 기준으로 상기 얼굴 영역을 분할하는 동작, 상기 분할된 얼굴 영역별 보정 비율을 계산하는 동작, 상기 계산된 보정 비율에 적어도 기반하여 상기 얼굴 영역을 보정하는 동작, 및 상기 보정된 이미지를 표시하는 동작을 포함할 수 있다.According to various embodiments, an operating method of an electronic device includes: recognizing a face region based at least on feature points extracted from the image; setting one or more objects within the face region; Calculating a correction ratio for each of the divided face regions, correcting the face region based on the calculated correction ratio at least based on the calculated correction ratio, performing an operation of setting an inner reference line, dividing the face region based on the reference line, And displaying the corrected image.

다양한 실시예들에 따르면, 얼굴 내 특징점에 기반하여 얼굴 기울기(또는 오브젝트 방향)를 결정하고, 결정된 얼굴 기울기에 기반하여 얼굴을 보정할 수 있다.According to various embodiments, the face tilt (or object orientation) may be determined based on the feature points in the face, and the face may be corrected based on the determined face tilt.

다양한 실시예들에 따르면, 얼굴 특성에 기반하여 다양한 얼굴 보정 마스크를 마련하고, 얼굴 보정에 필요한 상황에 따라 얼굴 보정 마스크의 보정 비율을 달리하여 보다 효과적으로 얼굴을 보정할 수 있다.According to various embodiments, various face correction masks may be provided based on the face characteristics, and the face may be corrected more effectively by changing the correction ratio of the face correction mask according to the situation required for the face correction.

다양한 실시예들에 따르면, 얼굴을 전체적으로 보정하고, 얼굴 내 특징점에 기반하여 지역적으로 얼굴을 보정함으로써, 보다 자연스럽게 얼굴 영상을 보정할 수 있다.According to various embodiments, the face image can be corrected more naturally by correcting the face as a whole and correcting the face locally based on the feature points in the face.

다양한 실시예들에 따르면, 얼굴 특징점을 기준으로 얼굴 영역을 분할하고, 분할된 영역에 각각 다른 보정 비율을 적용하여 얼굴을 보정함으로써, 전체적인 얼굴 비율을 고려하여 얼굴을 보정할 수 있다.According to various embodiments, the face can be corrected by dividing the face region based on the facial feature point and correcting the face by applying different correction ratios to the divided regions, thereby taking into account the overall face ratio.

도 1은 다양한 실시예들에 따른 네트워크 환경 내의 전자 장치를 도시한 도면이다.
도 2는 다양한 실시예들에 따른 전자 장치의 구성을 도시한 블록도이다.
도 3은 다양한 실시예들에 따른 프로그램 모듈을 도시한 블록도이다.
도 4는 다양한 실시예들에 따른 전자 장치의 동작 방법을 도시한 흐름도이다.
도 5는 다양한 실시예들에 따른 얼굴 형상 보정 방법을 도시한 흐름도이다.
도 6은 다양한 실시예들에 따른 이미지로부터 특징점을 추출하는 일례를 도시한 도면이다.
도 7은 다양한 실시예들에 따른 얼굴의 기준선을 결정하는 일례를 도시한 도면이다.
도 8은 다양한 실시예들에 따른 얼굴 영역별 보정 비율을 계산하는 일례를 도시한 도면이다.
도 9는 다양한 실시예들에 따른 눈 영역 보정 방법을 도시한 흐름도이다.
도 10a 내지 도 10c는 다양한 실시예들에 따른 기준선 기울기에 기반하여 눈 영역을 보정하는 일례를 도시한 도면들이다.
도 11은 다양한 실시예들에 따른 가이드 마스크를 이용한 보정 방법을 도시한 흐름도이다.
도 12a는 다양한 실시예들에 따른 가이드 마스크 및 보정 마스크를 생성하는 일례를 도시한 도면이다.
도 12b는 다양한 실시예들에 따른 캡쳐 이미지 보정 마스크를 생성하는 일례를 도시한 도면이다.
도 12c는 다양한 실시예들에 따른 프리뷰 이미지 보정 마스크를 생성하는 일례를 도시한 도면이다.
도 12d는 다양한 실시예들에 따른 밝기 보정 마스크를 생성하는 일례를 도시한 도면이다.
도 13은 다양한 실시예들에 따른 보정 파라미터를 이용하여 얼굴 영역을 보정하는 방법을 도시한 흐름도이다.
도 14는 다양한 실시예들에 따른 보정 파라미터를 결정하는 일례를 도시한 도면이다.
도 15는 다양한 실시예들에 따른 보정 파라미터를 이용하여 지역적으로 얼굴 영역을 보정하는 일례를 도시한 도면이다.
도 16은 다양한 실시예들에 따른 전역적 또는 지역적으로 얼굴 영역을 보정하는 일례를 도시한 도면이다.
도 17은 다양한 실시예들에 따른 얼굴 영역 보정 방법을 도시한 흐름도이다.
1 is a diagram illustrating an electronic device in a network environment in accordance with various embodiments.
2 is a block diagram illustrating the configuration of an electronic device according to various embodiments.
3 is a block diagram illustrating a program module in accordance with various embodiments.
4 is a flow chart illustrating a method of operation of an electronic device according to various embodiments.
5 is a flowchart illustrating a face shape correction method according to various embodiments.
6 is a diagram illustrating an example of extracting feature points from an image according to various embodiments.
7 is a diagram illustrating an example of determining a reference line of a face according to various embodiments.
8 is a diagram illustrating an example of calculating a correction ratio for each face region according to various embodiments.
9 is a flow chart illustrating an eye area correction method in accordance with various embodiments.
FIGS. 10A through 10C are diagrams illustrating an example of correcting an eye region based on a baseline slope in accordance with various embodiments.
11 is a flowchart illustrating a correction method using a guide mask according to various embodiments.
12A is a diagram illustrating an example of generating a guide mask and a correction mask according to various embodiments.
12B is a diagram illustrating an example of generating a captured image correction mask according to various embodiments.
12C is a diagram showing an example of generating a preview image correction mask according to various embodiments.
12D is a diagram showing an example of generating a brightness correction mask according to various embodiments.
13 is a flow chart illustrating a method of correcting a face region using correction parameters according to various embodiments.
14 is a diagram illustrating an example of determining correction parameters in accordance with various embodiments.
15 is a diagram showing an example of correcting a face region locally using correction parameters according to various embodiments.
16 is a diagram showing an example of correcting a face area globally or locally according to various embodiments.
17 is a flowchart illustrating a face area correction method according to various embodiments.

이하, 본 문서의 다양한 실시예들이 첨부된 도면을 참조하여 기재된다. 실시예 및 이에 사용된 용어들은 본 문서에 기재된 기술을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 해당 실시예의 다양한 변경, 균등물, 및/또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함할 수 있다. 본 문서에서, "A 또는 B" 또는 "A 및/또는 B 중 적어도 하나" 등의 표현은 함께 나열된 항목들의 모든 가능한 조합을 포함할 수 있다. "제1," "제2," "첫째," 또는 "둘째,"등의 표현들은 해당 구성요소들을, 순서 또는 중요도에 상관없이 수식할 수 있고, 한 구성요소를 다른 구성요소와 구분하기 위해 사용될 뿐 해당 구성요소들을 한정하지 않는다. 어떤(예: 제1) 구성요소가 다른(예: 제2) 구성요소에 "(기능적으로 또는 통신적으로) 연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로 연결되거나, 다른 구성요소(예: 제 3 구성요소)를 통하여 연결될 수 있다.Hereinafter, various embodiments of the present document will be described with reference to the accompanying drawings. It is to be understood that the embodiments and terminologies used herein are not intended to limit the invention to the particular embodiments described, but to include various modifications, equivalents, and / or alternatives of the embodiments. In connection with the description of the drawings, like reference numerals may be used for similar components. The singular expressions may include plural expressions unless the context clearly dictates otherwise. In this document, the expressions "A or B" or "at least one of A and / or B" and the like may include all possible combinations of the items listed together. Expressions such as " first, "" second," " first, "or" second, " But is not limited to those components. When it is mentioned that some (e.g., first) component is "(functionally or communicatively) connected" or "connected" to another (second) component, May be connected directly to the component, or may be connected through another component (e.g., a third component).

본 문서에서, "~하도록 구성된(또는 설정된)(configured to)"은 상황에 따라, 예를 들면, 하드웨어적 또는 소프트웨어적으로 "~에 적합한," "~하는 능력을 가지는," "~하도록 변경된," "~하도록 만들어진," "~를 할 수 있는," 또는 "~하도록 설계된"과 상호 호환적으로(interchangeably) 사용될 수 있다. 어떤 상황에서는, "~하도록 구성된 장치"라는 표현은, 그 장치가 다른 장치 또는 부품들과 함께 "~할 수 있는" 것을 의미할 수 있다. 예를 들면, 문구 "A, B, 및 C를 수행하도록 구성된(또는 설정된) 프로세서"는 해당 동작을 수행하기 위한 전용 프로세서(예: 임베디드 프로세서), 또는 메모리 장치에 저장된 하나 이상의 소프트웨어 프로그램들을 실행함으로써, 해당 동작들을 수행할 수 있는 범용 프로세서(예: CPU 또는 application processor)를 의미할 수 있다. In this document, the term " configured to (or configured) to "as used herein is intended to encompass all types of hardware, software, , "" Made to "," can do ", or" designed to ". In some situations, the expression "a device configured to" may mean that the device can "do " with other devices or components. For example, a processor configured (or configured) to perform the phrases "A, B, and C" may be implemented by executing one or more software programs stored in a memory device or a dedicated processor (e.g., an embedded processor) , And a general purpose processor (e.g., a CPU or an application processor) capable of performing the corresponding operations.

본 문서의 다양한 실시예들에 따른 전자 장치는, 예를 들면, 스마트폰, 태블릿 PC, 이동 전화기, 영상 전화기, 전자책 리더기, 데스크탑 PC, 랩탑 PC, 넷북 컴퓨터, 워크스테이션, 서버, PDA, PMP(portable multimedia player), MP3 플레이어, 의료기기, 카메라, 또는 웨어러블 장치 중 적어도 하나를 포함할 수 있다. 웨어러블 장치는 액세서리형(예: 시계, 반지, 팔찌, 발찌, 목걸이, 안경, 콘택트 렌즈, 또는 머리 착용형 장치(head-mounted-device(HMD)), 직물 또는 의류 일체형(예: 전자 의복), 신체 부착형(예: 스킨 패드 또는 문신), 또는 생체 이식형 회로 중 적어도 하나를 포함할 수 있다. 어떤 실시예들에서, 전자 장치는, 예를 들면, 텔레비전, DVD(digital video disk) 플레이어, 오디오, 냉장고, 에어컨, 청소기, 오븐, 전자레인지, 세탁기, 공기 청정기, 셋톱 박스, 홈 오토매이션 컨트롤 패널, 보안 컨트롤 패널, 미디어 박스(예: 삼성 HomeSyncTM, 애플TVTM, 또는 구글 TVTM), 게임 콘솔(예: XboxTM, PlayStationTM), 전자 사전, 전자 키, 캠코더, 또는 전자 액자 중 적어도 하나를 포함할 수 있다.Electronic devices in accordance with various embodiments of the present document may be used in various applications such as, for example, smart phones, tablet PCs, mobile phones, videophones, electronic book readers, desktop PCs, laptop PCs, netbook computers, workstations, a portable multimedia player, an MP3 player, a medical device, a camera, or a wearable device. Wearable devices may be of the type of accessories (eg, watches, rings, bracelets, braces, necklaces, glasses, contact lenses or head-mounted-devices (HMD) (E.g., a skin pad or tattoo), or a bio-implantable circuit. In some embodiments, the electronic device may be, for example, a television, a digital video disk (Such as Samsung HomeSync TM , Apple TV TM , or Google TV TM ), which are used in home appliances such as home appliances, audio, refrigerators, air conditioners, vacuum cleaners, ovens, microwave ovens, washing machines, air cleaners, set top boxes, home automation control panels, , A game console (e.g., Xbox TM , PlayStation TM ), an electronic dictionary, an electronic key, a camcorder, or an electronic photo frame.

다른 실시예에서, 전자 장치는, 각종 의료기기(예: 각종 휴대용 의료측정기기(혈당 측정기, 심박 측정기, 혈압 측정기, 또는 체온 측정기 등), MRA(magnetic resonance angiography), MRI(magnetic resonance imaging), CT(computed tomography), 촬영기, 또는 초음파기 등), 네비게이션 장치, 위성 항법 시스템(GNSS(global navigation satellite system)), EDR(event data recorder), FDR(flight data recorder), 자동차 인포테인먼트 장치, 선박용 전자 장비(예: 선박용 항법 장치, 자이로 콤파스 등), 항공 전자기기(avionics), 보안 기기, 차량용 헤드 유닛(head unit), 산업용 또는 가정용 로봇, 드론(drone), 금융 기관의 ATM, 상점의 POS(point of sales), 또는 사물 인터넷 장치 (예: 전구, 각종 센서, 스프링클러 장치, 화재 경보기, 온도조절기, 가로등, 토스터, 운동기구, 온수탱크, 히터, 보일러 등) 중 적어도 하나를 포함할 수 있다. In an alternative embodiment, the electronic device may be any of a variety of medical devices (e.g., various portable medical measurement devices such as a blood glucose meter, a heart rate meter, a blood pressure meter, or a body temperature meter), magnetic resonance angiography (MRA) A navigation system, a global navigation satellite system (GNSS), an event data recorder (EDR), a flight data recorder (FDR), an automobile infotainment device, a marine electronic equipment (For example, marine navigation systems, gyro compasses, etc.), avionics, security devices, head units for vehicles, industrial or domestic robots, drones, ATMs at financial institutions, of at least one of the following types of devices: a light bulb, a fire detector, a fire alarm, a thermostat, a streetlight, a toaster, a fitness device, a hot water tank, a heater, a boiler, .

어떤 실시예에 따르면, 전자 장치는 가구, 건물/구조물 또는 자동차의 일부, 전자 보드(electronic board), 전자 사인 수신 장치(electronic signature receiving device), 프로젝터, 또는 각종 계측 기기(예: 수도, 전기, 가스, 또는 전파 계측 기기 등) 중 적어도 하나를 포함할 수 있다. 다양한 실시예에서, 전자 장치는 플렉서블하거나, 또는 전술한 다양한 장치들 중 둘 이상의 조합일 수 있다. 본 문서의 실시예에 따른 전자 장치는 전술한 기기들에 한정되지 않는다. 본 문서에서, 사용자라는 용어는 전자 장치를 사용하는 사람 또는 전자 장치를 사용하는 장치(예: 인공지능 전자 장치)를 지칭할 수 있다. According to some embodiments, the electronic device may be a piece of furniture, a building / structure or part of an automobile, an electronic board, an electronic signature receiving device, a projector, or various measuring devices (e.g., Gas, or radio wave measuring instruments, etc.). In various embodiments, the electronic device is flexible or may be a combination of two or more of the various devices described above. The electronic device according to the embodiment of the present document is not limited to the above-described devices. In this document, the term user may refer to a person using an electronic device or a device using an electronic device (e.g., an artificial intelligence electronic device).

도 1은 다양한 실시예들에 따른 네트워크 환경(100) 내의 전자 장치(101)를 도시한 도면이다.1 is a diagram illustrating an electronic device 101 in a network environment 100 in accordance with various embodiments.

도 1을 참조하면, 전자 장치(101)는 버스(110), 프로세서(120), 메모리(130), 입출력 인터페이스(150), 디스플레이(160), 및 통신 인터페이스(170)를 포함할 수 있다. 어떤 실시예에서는, 전자 장치(101)는, 구성요소들 중 적어도 하나를 생략하거나 다른 구성요소를 추가적으로 구비할 수 있다. 1, an electronic device 101 may include a bus 110, a processor 120, a memory 130, an input / output interface 150, a display 160, and a communication interface 170. In some embodiments, the electronic device 101 may omit at least one of the components or additionally include other components.

버스(110)는 구성요소들(110-170)을 서로 연결하고, 구성요소들 간의 통신(예: 제어 메시지 또는 데이터)을 전달하는 회로를 포함할 수 있다. The bus 110 may include circuitry to connect the components 110-170 to one another and to communicate communications (e.g., control messages or data) between the components.

프로세서(120)는, 중앙처리장치(central processing unit(CPU)), 어플리케이션 프로세서(application processor(AP)), 또는 커뮤니케이션 프로세서(communication processor(CP)) 중 하나 또는 그 이상을 포함할 수 있다. 프로세서(120)는, 예를 들면, 전자 장치(101)의 적어도 하나의 다른 구성요소들의 제어 및/또는 통신에 관한 연산이나 데이터 처리를 실행할 수 있다. The processor 120 may include one or more of a central processing unit (CPU), an application processor (AP), or a communication processor (CP). The processor 120 may perform computations or data processing related to, for example, control and / or communication of at least one other component of the electronic device 101.

메모리(130)는, 휘발성 및/또는 비휘발성 메모리를 포함할 수 있다. 메모리(130)는, 예를 들면, 전자 장치(101)의 적어도 하나의 다른 구성요소에 관계된 명령 또는 데이터를 저장할 수 있다. 한 실시예에 따르면, 메모리(130)는 소프트웨어 및/또는 프로그램(140)을 저장할 수 있다. 프로그램(140)은, 예를 들면, 커널(141), 미들웨어(143), 어플리케이션 프로그래밍 인터페이스(API)(145), 및/또는 어플리케이션 프로그램(또는 "어플리케이션")(147) 등을 포함할 수 있다. 커널(141), 미들웨어(143), 또는 API(145)의 적어도 일부는, 운영 시스템으로 지칭될 수 있다. 커널(141)은, 예를 들면, 다른 프로그램들(예: 미들웨어(143), API(145), 또는 어플리케이션 프로그램(147))에 구현된 동작 또는 기능을 실행하는 데 사용되는 시스템 리소스들(예: 버스(110), 프로세서(120), 또는 메모리(130) 등)을 제어 또는 관리할 수 있다. 또한, 커널(141)은 미들웨어(143), API(145), 또는 어플리케이션 프로그램(147)에서 전자 장치(101)의 개별 구성요소에 접근함으로써, 시스템 리소스들을 제어 또는 관리할 수 있는 인터페이스를 제공할 수 있다. Memory 130 may include volatile and / or non-volatile memory. Memory 130 may store instructions or data related to at least one other component of electronic device 101, for example. According to one embodiment, the memory 130 may store software and / or programs 140. The program 140 may include, for example, a kernel 141, a middleware 143, an application programming interface (API) 145, and / or an application program . At least some of the kernel 141, middleware 143, or API 145 may be referred to as an operating system. The kernel 141 may include system resources used to execute an operation or function implemented in other programs (e.g., middleware 143, API 145, or application program 147) (E.g., bus 110, processor 120, or memory 130). The kernel 141 also provides an interface to control or manage system resources by accessing individual components of the electronic device 101 in the middleware 143, API 145, or application program 147 .

미들웨어(143)는, 예를 들면, API(145) 또는 어플리케이션 프로그램(147)이 커널(141)과 통신하여 데이터를 주고받을 수 있도록 중개 역할을 수행할 수 있다. 또한, 미들웨어(143)는 어플리케이션 프로그램(147)으로부터 수신된 하나 이상의 작업 요청들을 우선 순위에 따라 처리할 수 있다. 예를 들면, 미들웨어(143)는 어플리케이션 프로그램(147) 중 적어도 하나에 전자 장치(101)의 시스템 리소스(예: 버스(110), 프로세서(120), 또는 메모리(130) 등)를 사용할 수 있는 우선 순위를 부여하고, 상기 하나 이상의 작업 요청들을 처리할 수 있다. API(145)는 어플리케이션(147)이 커널(141) 또는 미들웨어(143)에서 제공되는 기능을 제어하기 위한 인터페이스로, 예를 들면, 파일 제어, 창 제어, 영상 처리, 또는 문자 제어 등을 위한 적어도 하나의 인터페이스 또는 함수(예: 명령어)를 포함할 수 있다. The middleware 143 can perform an intermediary role such that the API 145 or the application program 147 can communicate with the kernel 141 to exchange data. In addition, the middleware 143 may process one or more task requests received from the application program 147 according to the priority order. For example, middleware 143 may use system resources (e.g., bus 110, processor 120, or memory 130, etc.) of electronic device 101 in at least one of application programs 147 Prioritize, and process the one or more task requests. The API 145 is an interface for the application 147 to control the functions provided by the kernel 141 or the middleware 143. The API 145 is an interface for controlling the functions provided by the application 141. For example, An interface or a function (e.g., a command).

입출력 인터페이스(150)는, 예를 들면, 사용자 또는 다른 외부 기기로부터 입력된 명령 또는 데이터를 전자 장치(101)의 다른 구성요소(들)에 전달하거나, 또는 전자 장치(101)의 다른 구성요소(들)로부터 수신된 명령 또는 데이터를 사용자 또는 다른 외부 기기로 출력할 수 있다. Output interface 150 may be configured to communicate commands or data entered from a user or other external device to another component (s) of the electronic device 101, or to another component (s) of the electronic device 101 ) To the user or other external device.

디스플레이(160)는, 예를 들면, 액정 디스플레이(LCD), 발광 다이오드(LED) 디스플레이, 유기 발광 다이오드(OLED) 디스플레이, 또는 마이크로 전자기계 시스템 (MEMS) 디스플레이, 또는 전자종이(electronic paper) 디스플레이를 포함할 수 있다. 디스플레이(160)는, 예를 들면, 사용자에게 각종 콘텐츠(예: 텍스트, 이미지, 비디오, 아이콘, 및/또는 심볼 등)을 표시할 수 있다. 디스플레이(160)는, 터치 스크린을 포함할 수 있으며, 예를 들면, 전자 펜 또는 사용자의 신체의 일부를 이용한 터치, 제스쳐, 근접, 또는 호버링 입력을 수신할 수 있다. The display 160 may include a display such as, for example, a liquid crystal display (LCD), a light emitting diode (LED) display, an organic light emitting diode (OLED) display, or a microelectromechanical system (MEMS) display, or an electronic paper display . Display 160 may display various content (e.g., text, images, video, icons, and / or symbols, etc.) to a user, for example. Display 160 may include a touch screen and may receive a touch, gesture, proximity, or hovering input using, for example, an electronic pen or a portion of the user's body.

통신 인터페이스(170)는, 예를 들면, 전자 장치(101)와 외부 장치(예: 제1 외부 전자 장치(102), 제2 외부 전자 장치(104), 또는 서버(106)) 간의 통신을 설정할 수 있다. 예를 들면, 통신 인터페이스(170)는 무선 통신 또는 유선 통신을 통해서 네트워크(162)에 연결되어 외부 장치(예: 제2 외부 전자 장치(104) 또는 서버(106))와 통신할 수 있다. 무선 통신은, 예를 들면, LTE, LTE-A(LTE advance), CDMA(code division multiple access), WCDMA(wideband CDMA), UMTS(universal mobile telecommunications system), WiBro(wireless broadband), 또는 GSM(global system for mobile communications) 등 중 적어도 하나를 사용하는 셀룰러 통신을 포함할 수 있다. 한 실시예에 따르면, 무선 통신은, 예를 들면, 도 1의 근거리 통신(164)으로 예시된 바와 같이, WiFi(wireless fidelity), LiFi(light fidelity), 블루투스, 블루투스 저전력(BLE: bluetooth low energy), 지그비(Zigbee), NFC(near field communication), 자력 시큐어 트랜스미션(magnetic secure transmission), 라디오 프리퀀시(RF), 또는 보디 에어리어 네트워크(BAN) 중 적어도 하나를 포함할 수 있다. The communication interface 170 establishes communication between the electronic device 101 and an external device (e.g., the first external electronic device 102, the second external electronic device 104, or the server 106) . For example, communication interface 170 may be connected to network 162 via wireless or wired communication to communicate with an external device (e.g., second external electronic device 104 or server 106). The wireless communication may be, for example, LTE, LTE advance, code division multiple access (CDMA), wideband CDMA (WCDMA), universal mobile telecommunications system (UMTS), wireless broadband (WiBro) system for mobile communications, and the like. According to one embodiment, the wireless communication may include wireless fidelity (WiFi), light fidelity (LiFi), bluetooth, bluetooth low energy (BLE), as illustrated in, for example, , Zigbee, near field communication (NFC), magnetic secure transmission, radio frequency (RF), or body area network (BAN).

한실시예에 따르면, 무선 통신은 GNSS를 포함할 수 있다. GNSS는, 예를 들면, GPS(global positioning system), Glonass(global navigation satellite system), beidou navigation satellite system(이하 "Beidou") 또는 galileo, the european global satellite-based navigation system일 수 있다. 이하, 본 문서에서는, "GPS"는 "GNSS"와 상호 호환적으로 사용될 수 있다. 유선 통신은, 예를 들면, USB(universal serial bus), HDMI(high definition multimedia interface), RS-232(recommended standard232), 전력선 통신, 또는 POTS(plain old telephone service) 등 중 적어도 하나를 포함할 수 있다. 네트워크(162)는 텔레커뮤니케이션 네트워크, 예를 들면, 컴퓨터 네트워크(예: LAN 또는 WAN), 인터넷, 또는 텔레폰 네트워크 중 적어도 하나를 포함할 수 있다.According to one example, wireless communication may include GNSS. GNSS may be, for example, a global positioning system (GPS), a global navigation satellite system (Glonass), a beidou navigation satellite system (hereinafter "Beidou") or a galileo, the european global satellite-based navigation system. Hereinafter, in this document, "GPS" can be used interchangeably with "GNSS ". The wired communication may include, for example, at least one of a universal serial bus (USB), a high definition multimedia interface (HDMI), a recommended standard 232 (RS-232), a power line communication or a plain old telephone service have. Network 162 may include at least one of a telecommunications network, e.g., a computer network (e.g., LAN or WAN), the Internet, or a telephone network.

제1 및 제2 외부 전자 장치(102, 104) 각각은 전자 장치(101)와 동일한 또는 다른 종류의 장치일 수 있다. 다양한 실시예에 따르면, 전자 장치(101)에서 실행되는 동작들의 전부 또는 일부는 다른 하나 또는 복수의 전자 장치(예: 전자 장치(102,104), 또는 서버(106)에서 실행될 수 있다. 한 실시예에 따르면, 전자 장치(101)가 어떤 기능이나 서비스를 자동으로 또는 요청에 의하여 수행해야 할 경우에, 전자 장치(101)는 기능 또는 서비스를 자체적으로 실행시키는 대신에 또는 추가적으로, 그와 연관된 적어도 일부 기능을 다른 장치(예: 전자 장치(102, 104), 또는 서버(106))에게 요청할 수 있다. 다른 전자 장치(예: 전자 장치(102, 104), 또는 서버(106))는 요청된 기능 또는 추가 기능을 실행하고, 그 결과를 전자 장치(101)로 전달할 수 있다. 전자 장치(101)는 수신된 결과를 그대로 또는 추가적으로 처리하여 요청된 기능이나 서비스를 제공할 수 있다. 이를 위하여, 예를 들면, 클라우드 컴퓨팅, 분산 컴퓨팅, 또는 클라이언트-서버 컴퓨팅 기술이 이용될 수 있다.Each of the first and second external electronic devices 102, 104 may be the same or a different kind of device as the electronic device 101. According to various embodiments, all or a portion of the operations performed in the electronic device 101 may be performed in one or more other electronic devices (e.g., electronic devices 102, 104, or server 106). According to the present invention, when electronic device 101 is to perform a function or service automatically or on demand, electronic device 101 may perform at least some functions associated therewith instead of, or in addition to, (E.g., electronic device 102, 104, or server 106) may request the other device (e.g., electronic device 102, 104, or server 106) Perform additional functions, and forward the results to the electronic device 101. The electronic device 101 may process the received results as is or additionally to provide the requested functionality or services. For example, Cloud computing, distributed computing, or client-server computing techniques can be used.

도 2는 다양한 실시예에 따른 전자 장치(201)의 구성을 도시한 블록도이다.2 is a block diagram illustrating the configuration of an electronic device 201 according to various embodiments.

도 2를 참조하면, 전자 장치(201)는, 예를 들면, 도 1에 도시된 전자 장치(101)의 전체 또는 일부를 포함할 수 있다. 전자 장치(201)는 하나 이상의 프로세서(예: AP)(210), 통신 모듈(220), 메모리(230), 센서 모듈(240), 입력 장치(250), 디스플레이(260), 인터페이스(270), 오디오 모듈(280), 카메라 모듈(291), 전력 관리 모듈(295), 배터리(296), 인디케이터(297), 및 모터(298) 를 포함할 수 있다. Referring to FIG. 2, the electronic device 201 may include all or part of the electronic device 101 shown in FIG. 1, for example. The electronic device 201 includes one or more processors (e.g., AP) 210, a communication module 220, a memory 230, a sensor module 240, an input device 250, a display 260, an interface 270, An audio module 280, a camera module 291, a power management module 295, a battery 296, an indicator 297, and a motor 298.

프로세서(210)는, 예를 들면, 운영 체제 또는 응용 프로그램을 구동하여 프로세서(210)에 연결된 다수의 하드웨어 또는 소프트웨어 구성요소들을 제어할 수 있고, 각종 데이터 처리 및 연산을 수행할 수 있다. 프로세서(210)는, 예를 들면, SoC(system on chip) 로 구현될 수 있다. 한 실시예에 따르면, 프로세서(210)는 GPU(graphic processing unit) 및/또는 이미지 신호 프로세서를 더 포함할 수 있다. 프로세서(210)는 도 2에 도시된 구성요소들 중 적어도 일부(예: 셀룰러 모듈(221))를 포함할 수도 있다. 프로세서(210) 는 다른 구성요소들(예: 비휘발성 메모리) 중 적어도 하나로부터 수신된 명령 또는 데이터를 휘발성 메모리에 로드)하여 처리하고, 결과 데이터를 비휘발성 메모리에 저장할 수 있다.The processor 210 may control a plurality of hardware or software components connected to the processor 210, for example, by driving an operating system or an application program, and may perform various data processing and calculations. The processor 210 may be implemented with, for example, a system on chip (SoC). According to one embodiment, the processor 210 may further include a graphics processing unit (GPU) and / or an image signal processor. Processor 210 may include at least some of the components shown in FIG. 2 (e.g., cellular module 221). Processor 210 may load instructions and / or data received from at least one of the other components (e.g., non-volatile memory) into volatile memory) and process the resultant data in non-volatile memory.

다양한 실시예들에 따른 프로세서(210)는 이미지로부터 추출된 특징점에 기반하여 얼굴 영역을 인식하고, 상기 얼굴 영역 내 적어도 하나의 오브젝트를 설정하고, 상기 적어도 하나의 오브젝트를 이용하여 상기 얼굴 영역 내 기준선을 설정하고, 상기 기준선을 기준으로 상기 얼굴 영역을 분할하고, 상기 분할된 영역별 보정 비율을 계산하고, 계산된 보정 비율에 따라 상기 얼굴 영역을 보정하고, 상기 보정된 이미지를 디스플레이(260) 표시하도록 설정될 수 있다.The processor 210 in accordance with various embodiments may recognize a face region based on feature points extracted from the image, set at least one object within the face region, and use the at least one object to determine the in- The face area is divided based on the reference line, the correction ratio for each divided area is calculated, the face area is corrected according to the calculated correction ratio, and the corrected image is displayed on the display 260 . ≪ / RTI >

통신 모듈(220)은 도 1의 통신 인터페이스(170)와 동일 또는 유사한 구성을 가질 수 있다. 통신 모듈(220)은, 예를 들면, 셀룰러 모듈(221), WiFi 모듈(223), 블루투스 모듈(225), GNSS 모듈(227), NFC 모듈(228) 및 RF 모듈(229)를 포함할 수 있다. 셀룰러 모듈(221)은, 예를 들면, 통신망을 통해서 음성 통화, 영상 통화, 문자 서비스, 또는 인터넷 서비스 등을 제공할 수 있다. 한 실시예에 따르면, 셀룰러 모듈(221)은 가입자 식별 모듈(예: SIM 카드)(224)을 이용하여 통신 네트워크 내에서 전자 장치(201)의 구별 및 인증을 수행할 수 있다. 한 실시예에 따르면, 셀룰러 모듈(221)은 프로세서(210)가 제공할 수 있는 기능 중 적어도 일부 기능을 수행할 수 있다. 한 실시예에 따르면, 셀룰러 모듈(221)은 커뮤니케이션 프로세서(CP)를 포함할 수 있다. The communication module 220 may have the same or similar configuration as the communication interface 170 of FIG. The communication module 220 may include, for example, a cellular module 221, a WiFi module 223, a Bluetooth module 225, a GNSS module 227, an NFC module 228 and an RF module 229 have. The cellular module 221 can provide voice calls, video calls, text services, or Internet services, for example, over a communication network. According to one embodiment, the cellular module 221 may utilize a subscriber identity module (e.g., a SIM card) 224 to perform the identification and authentication of the electronic device 201 within the communication network. According to one embodiment, the cellular module 221 may perform at least some of the functions that the processor 210 may provide. According to one embodiment, the cellular module 221 may comprise a communications processor (CP).

어떤 실시예에 따르면, 셀룰러 모듈(221), WiFi 모듈(223), 블루투스 모듈(225), GNSS 모듈(227) 또는 NFC 모듈(228) 중 적어도 일부(예: 두 개 이상)는 하나의 integrated chip(IC) 또는 IC 패키지 내에 포함될 수 있다. RF 모듈(229)은, 예를 들면, 통신 신호(예: RF 신호)를 송수신할 수 있다. RF 모듈(229)은, 예를 들면, 트랜시버, PAM(power amp module), 주파수 필터, LNA(low noise amplifier), 또는 안테나 등을 포함할 수 있다. 다른 실시예에 따르면, 셀룰러 모듈(221), WiFi 모듈(223), 블루투스 모듈(225), GNSS 모듈(227) 또는 NFC 모듈(228) 중 적어도 하나는 별개의 RF 모듈을 통하여 RF 신호를 송수신할 수 있다. 가입자 식별 모듈(224)은, 예를 들면, 가입자 식별 모듈을 포함하는 카드 또는 임베디드 SIM을 포함할 수 있으며, 고유한 식별 정보(예: ICCID(integrated circuit card identifier)) 또는 가입자 정보(예: IMSI(international mobile subscriber identity))를 포함할 수 있다. At least some (e.g., two or more) of the cellular module 221, the WiFi module 223, the Bluetooth module 225, the GNSS module 227, or the NFC module 228, according to some embodiments, (IC) or an IC package. The RF module 229 can, for example, send and receive communication signals (e.g., RF signals). The RF module 229 may include, for example, a transceiver, a power amplifier module (PAM), a frequency filter, a low noise amplifier (LNA), or an antenna. According to another embodiment, at least one of the cellular module 221, the WiFi module 223, the Bluetooth module 225, the GNSS module 227, or the NFC module 228 transmits / receives an RF signal through a separate RF module . The subscriber identification module 224 may include, for example, a card or an embedded SIM containing a subscriber identity module, and may include unique identification information (e.g., ICCID) or subscriber information (e.g., IMSI (international mobile subscriber identity).

메모리(230)(예: 메모리(130))는, 예를 들면, 내장 메모리(232) 또는 외장 메모리(234)를 포함할 수 있다. 내장 메모리(232)는, 예를 들면, 휘발성 메모리(예: DRAM, SRAM, 또는 SDRAM 등), 비휘발성 메모리(예: OTPROM(one time programmable ROM), PROM, EPROM, EEPROM, mask ROM, flash ROM, 플래시 메모리, 하드 드라이브, 또는 솔리드 스테이트 드라이브 (SSD) 중 적어도 하나를 포함할 수 있다. 외장 메모리(234)는 플래시 드라이브(flash drive), 예를 들면, CF(compact flash), SD(secure digital), Micro-SD, Mini-SD, xD(extreme digital), MMC(multi-media card) 또는 메모리 스틱 등을 포함할 수 있다. 외장 메모리(234)는 다양한 인터페이스를 통하여 전자 장치(201)와 기능적으로 또는 물리적으로 연결될 수 있다.Memory 230 (e.g., memory 130) may include, for example, internal memory 232 or external memory 234. Volatile memory (e.g., a DRAM, an SRAM, or an SDRAM), a non-volatile memory (e.g., an OTPROM, a PROM, an EPROM, an EEPROM, a mask ROM, a flash ROM , A flash memory, a hard drive, or a solid state drive (SSD). The external memory 234 may be a flash drive, for example, a compact flash (CF) ), Micro-SD, Mini-SD, extreme digital (xD), multi-media card (MMC), or memory stick, etc. External memory 234 may communicate with electronic device 201, Or may be physically connected.

센서 모듈(240)은, 예를 들면, 물리량을 계측하거나 전자 장치(201)의 작동 상태를 감지하여, 계측 또는 감지된 정보를 전기 신호로 변환할 수 있다. 센서 모듈(240)은, 예를 들면, 제스처 센서(240A), 자이로 센서(240B), 기압 센서(240C), 마그네틱 센서(240D), 가속도 센서(240E), 그립 센서(240F), 근접 센서(240G), 컬러(color) 센서(240H)(예: RGB(red, green, blue) 센서), 생체 센서(240I), 온/습도 센서(240J), 조도 센서(240K), 또는 UV(ultra violet) 센서(240M) 중의 적어도 하나를 포함할 수 있다. 추가적으로 또는 대체적으로, 센서 모듈(240)은, 예를 들면, 후각(e-nose) 센서, 일렉트로마이오그라피(EMG) 센서, 일렉트로엔씨팔로그램(EEG) 센서, 일렉트로카디오그램(ECG) 센서, IR(infrared) 센서, 홍채 센서 및/또는 지문 센서를 포함할 수 있다. 센서 모듈(240)은 그 안에 속한 적어도 하나 이상의 센서들을 제어하기 위한 제어 회로를 더 포함할 수 있다. 어떤 실시예에서는, 전자 장치(201)는 프로세서(210)의 일부로서 또는 별도로, 센서 모듈(240)을 제어하도록 구성된 프로세서를 더 포함하여, 프로세서(210)가 슬립(sleep) 상태에 있는 동안, 센서 모듈(240)을 제어할 수 있다.The sensor module 240 may, for example, measure a physical quantity or sense the operating state of the electronic device 201 to convert the measured or sensed information into an electrical signal. The sensor module 240 includes a gesture sensor 240A, a gyro sensor 240B, an air pressure sensor 240C, a magnetic sensor 240D, an acceleration sensor 240E, a grip sensor 240F, A temperature sensor 240G, a UV sensor 240G, a color sensor 240H (e.g., an RGB (red, green, blue) sensor), a living body sensor 240I, And a sensor 240M. Additionally or alternatively, the sensor module 240 may be configured to perform various functions such as, for example, an e-nose sensor, an electromyography (EMG) sensor, an electroencephalograph (EEG) sensor, an electrocardiogram An infrared (IR) sensor, an iris sensor, and / or a fingerprint sensor. The sensor module 240 may further include a control circuit for controlling at least one or more sensors belonging to the sensor module 240. In some embodiments, the electronic device 201 further includes a processor configured to control the sensor module 240, either as part of the processor 210 or separately, so that while the processor 210 is in a sleep state, The sensor module 240 can be controlled.

입력 장치(250)는, 예를 들면, 터치 패널(252), (디지털) 펜 센서(254), 키(256), 또는 초음파 입력 장치(258)를 포함할 수 있다. 터치 패널(252)은, 예를 들면, 정전식, 감압식, 적외선 방식, 또는 초음파 방식 중 적어도 하나의 방식을 사용할 수 있다. 또한, 터치 패널(252)은 제어 회로를 더 포함할 수도 있다. 터치 패널(252)은 택타일 레이어(tactile layer)를 더 포함하여, 사용자에게 촉각 반응을 제공할 수 있다. (디지털) 펜 센서(254)는, 예를 들면, 터치 패널의 일부이거나, 별도의 인식용 쉬트를 포함할 수 있다. 키(256)는, 예를 들면, 물리적인 버튼, 광학식 키, 또는 키패드를 포함할 수 있다. 초음파 입력 장치(258)는 마이크(예: 마이크(288))를 통해, 입력 도구에서 발생된 초음파를 감지하여, 상기 감지된 초음파에 대응하는 데이터를 확인할 수 있다.The input device 250 may include, for example, a touch panel 252, a (digital) pen sensor 254, a key 256, or an ultrasonic input device 258. As the touch panel 252, for example, at least one of an electrostatic type, a pressure sensitive type, an infrared type, and an ultrasonic type can be used. Further, the touch panel 252 may further include a control circuit. The touch panel 252 may further include a tactile layer to provide a tactile response to the user. (Digital) pen sensor 254 may be part of, for example, a touch panel or may include a separate recognition sheet. Key 256 may include, for example, a physical button, an optical key, or a keypad. The ultrasonic input device 258 can sense the ultrasonic wave generated by the input tool through the microphone (e.g., the microphone 288) and confirm the data corresponding to the ultrasonic wave detected.

디스플레이(260)(예: 디스플레이(160))는 패널(262), 홀로그램 장치(264), 프로젝터(266), 및/또는 이들을 제어하기 위한 제어 회로를 포함할 수 있다. 패널(262)은, 예를 들면, 유연하게, 투명하게, 또는 착용할 수 있게 구현될 수 있다. 패널(262)은 터치 패널(252)과 하나 이상의 모듈로 구성될 수 있다. 한 실시예에 따르면, 패널(262)은 사용자의 터치에 대한 압력의 세기를 측정할 수 있는 압력 센서(또는 포스 센서)를 포함할 수 있다. 상기 압력 센서는 터치 패널(252)과 일체형으로 구현되거나, 또는 터치 패널(252)과는 별도의 하나 이상의 센서로 구현될 수 있다. Display 260 (e.g., display 160) may include panel 262, hologram device 264, projector 266, and / or control circuitry for controlling them. The panel 262 may be embodied, for example, flexibly, transparently, or wearably. The panel 262 may comprise a touch panel 252 and one or more modules. According to one embodiment, the panel 262 may include a pressure sensor (or force sensor) capable of measuring the intensity of the pressure on the user's touch. The pressure sensor may be integrated with the touch panel 252 or may be implemented by one or more sensors separate from the touch panel 252.

홀로그램 장치(264)는 빛의 간섭을 이용하여 입체 영상을 허공에 보여줄 수 있다. 프로젝터(266)는 스크린에 빛을 투사하여 영상을 표시할 수 있다. 스크린은, 예를 들면, 전자 장치(201)의 내부 또는 외부에 위치할 수 있다. 인터페이스(270)는, 예를 들면, HDMI(272), USB(274), 광 인터페이스(optical interface)(276), 또는 D-sub(D-subminiature)(278)를 포함할 수 있다. 인터페이스(270)는, 예를 들면, 도 1에 도시된 통신 인터페이스(170)에 포함될 수 있다. 추가적으로 또는 대체적으로, 인터페이스(270)는, 예를 들면, MHL(mobile high-definition link) 인터페이스, SD카드/MMC(multi-media card) 인터페이스, 또는 IrDA(infrared data association) 규격 인터페이스를 포함할 수 있다. The hologram device 264 can display a stereoscopic image in the air using interference of light. The projector 266 can display an image by projecting light onto a screen. The screen may be located, for example, inside or outside the electronic device 201. The interface 270 may include, for example, an HDMI 272, a USB 274, an optical interface 276, or a D-sub (D-subminiature) 278. The interface 270 may, for example, be included in the communication interface 170 shown in FIG. Additionally or alternatively, the interface 270 may include, for example, a mobile high-definition link (MHL) interface, an SD card / multi-media card (MMC) interface, or an infrared data association have.

오디오 모듈(280)은, 예를 들면, 소리와 전기 신호를 쌍방향으로 변환시킬 수 있다. 오디오 모듈(280)의 적어도 일부 구성요소는, 예를 들면, 도 1 에 도시된 입출력 인터페이스(145)에 포함될 수 있다. 오디오 모듈(280)은, 예를 들면, 스피커(282), 리시버(284), 이어폰(286), 또는 마이크(288) 등을 통해 입력 또는 출력되는 소리 정보를 처리할 수 있다. 카메라 모듈(291)은, 예를 들면, 정지 영상 및 동영상을 촬영할 수 있는 장치로서, 한 실시예에 따르면, 하나 이상의 이미지 센서(예: 전면 센서 또는 후면 센서), 렌즈, 이미지 시그널 프로세서(ISP), 또는 플래시(예: LED 또는 xenon lamp 등)를 포함할 수 있다. The audio module 280 can, for example, convert sound and electrical signals in both directions. At least some of the components of the audio module 280 may be included, for example, in the input / output interface 145 shown in FIG. The audio module 280 may process sound information input or output through, for example, a speaker 282, a receiver 284, an earphone 286, a microphone 288, or the like. The camera module 291 is, for example, a device capable of capturing still images and moving images, and according to one embodiment, one or more image sensors (e.g., a front sensor or a rear sensor), a lens, an image signal processor (ISP) , Or flash (e.g., an LED or xenon lamp, etc.).

전력 관리 모듈(295)은, 예를 들면, 전자 장치(201)의 전력을 관리할 수 있다. 한 실시예에 따르면, 전력 관리 모듈(295)은 PMIC(power management integrated circuit), 충전 IC, 또는 배터리 또는 연료 게이지를 포함할 수 있다. PMIC는, 유선 및/또는 무선 충전 방식을 가질 수 있다. 무선 충전 방식은, 예를 들면, 자기공명 방식, 자기유도 방식 또는 전자기파 방식 등을 포함하며, 무선 충전을 위한 부가적인 회로, 예를 들면, 코일 루프, 공진 회로, 또는 정류기 등을 더 포함할 수 있다. 배터리 게이지는, 예를 들면, 배터리(296)의 잔량, 충전 중 전압, 전류, 또는 온도를 측정할 수 있다. 배터리(296)는, 예를 들면, 충전식 전지 및/또는 태양 전지를 포함할 수 있다. The power management module 295 can, for example, manage the power of the electronic device 201. [ According to one embodiment, the power management module 295 may include a power management integrated circuit (PMIC), a charging IC, or a battery or fuel gauge. The PMIC may have a wired and / or wireless charging scheme. The wireless charging scheme may include, for example, a magnetic resonance scheme, a magnetic induction scheme, or an electromagnetic wave scheme, and may further include an additional circuit for wireless charging, for example, a coil loop, a resonant circuit, have. The battery gauge can measure, for example, the remaining amount of the battery 296, the voltage during charging, the current, or the temperature. The battery 296 may include, for example, a rechargeable battery and / or a solar cell.

인디케이터(297)는 전자 장치(201) 또는 그 일부(예: 프로세서(210))의 특정 상태, 예를 들면, 부팅 상태, 메시지 상태 또는 충전 상태 등을 표시할 수 있다. 모터(298)는 전기적 신호를 기계적 진동으로 변환할 수 있고, 진동, 또는 햅틱 효과 등을 발생시킬 수 있다. 전자 장치(201)는, 예를 들면, DMB(digital multimedia broadcasting), DVB(digital video broadcasting), 또는 미디어플로(mediaFloTM) 등의 규격에 따른 미디어 데이터를 처리할 수 있는 모바일 TV 지원 장치(예: GPU)를 포함할 수 있다. 본 문서에서 기술된 구성요소들 각각은 하나 또는 그 이상의 부품(component)으로 구성될 수 있으며, 해당 구성요소의 명칭은 전자 장치의 종류에 따라서 달라질 수 있다. 다양한 실시예에서, 전자 장치(예: 전자 장치(201))는 일부 구성요소가 생략되거나, 추가적인 구성요소를 더 포함하거나, 또는, 구성요소들 중 일부가 결합되어 하나의 개체로 구성되되, 결합 이전의 해당 구성요소들의 기능을 동일하게 수행할 수 있다.The indicator 297 may indicate a particular state of the electronic device 201 or a portion thereof (e.g., processor 210), e.g., a boot state, a message state, or a state of charge. The motor 298 can convert the electrical signal to mechanical vibration, and can generate vibration, haptic effects, and the like. Electronic device 201 is, for example, DMB Mobile TV-enabled devices capable of handling media data in accordance with standards such as (digital multimedia broadcasting), DVB (digital video broadcasting), or MediaFLO (mediaFlo TM) (for example, : GPU). Each of the components described in this document may be composed of one or more components, and the name of the component may be changed according to the type of the electronic device. In various embodiments, an electronic device (e. G., Electronic device 201) may have some components omitted, further include additional components, or some of the components may be combined into one entity, The functions of the preceding components can be performed in the same manner.

도 3은 다양한 실시예에 따른 프로그램 모듈의 블록도이다. 3 is a block diagram of a program module according to various embodiments.

한 실시예에 따르면, 프로그램 모듈(310)(예: 프로그램(140))은 전자 장치(예: 전자 장치(101))에 관련된 자원을 제어하는 운영 체제 및/또는 운영 체제 상에서 구동되는 다양한 어플리케이션(예: 어플리케이션 프로그램(147))을 포함할 수 있다. 운영 체제는, 예를 들면, AndroidTM, iOSTM, WindowsTM, SymbianTM, TizenTM, 또는 BadaTM를 포함할 수 있다. 도 3을 참조하면, 프로그램 모듈(310)은 커널(320)(예: 커널(141)), 미들웨어(330)(예: 미들웨어(143)), (API(360)(예: API(145)), 및/또는 어플리케이션(370)(예: 어플리케이션 프로그램(147))을 포함할 수 있다. 프로그램 모듈(310)의 적어도 일부는 전자 장치 상에 프리로드 되거나, 외부 전자 장치(예: 전자 장치(102, 104), 서버(106) 등)로부터 다운로드 가능하다.According to one embodiment, program module 310 (e.g., program 140) includes an operating system that controls resources associated with an electronic device (e.g., electronic device 101) and / E.g., an application program 147). The operating system may include, for example, Android TM , iOS TM , Windows TM , Symbian TM , Tizen TM , or Bada TM . 3, program module 310 includes a kernel 320 (e.g., kernel 141), middleware 330 (e.g., middleware 143), API 360 (e.g., API 145) ), And / or an application 370 (e.g., an application program 147). At least a portion of the program module 310 may be preloaded on an electronic device, 102 and 104, a server 106, and the like).

커널(320)은, 예를 들면, 시스템 리소스 매니저(321) 및/또는 디바이스 드라이버(323)를 포함할 수 있다. 시스템 리소스 매니저(321)는 시스템 리소스의 제어, 할당, 또는 회수를 수행할 수 있다. 한 실시예에 따르면, 시스템 리소스 매니저(321)는 프로세스 관리부, 메모리 관리부, 또는 파일 시스템 관리부를 포함할 수 있다. 디바이스 드라이버(323)는, 예를 들면, 디스플레이 드라이버, 카메라 드라이버, 블루투스 드라이버, 공유 메모리 드라이버, USB 드라이버, 키패드 드라이버, WiFi 드라이버, 오디오 드라이버, 또는 IPC(inter-process communication) 드라이버를 포함할 수 있다. The kernel 320 may include, for example, a system resource manager 321 and / or a device driver 323. The system resource manager 321 can perform control, allocation, or recovery of system resources. According to one embodiment, the system resource manager 321 may include a process manager, a memory manager, or a file system manager. The device driver 323 may include, for example, a display driver, a camera driver, a Bluetooth driver, a shared memory driver, a USB driver, a keypad driver, a WiFi driver, an audio driver, or an inter-process communication .

미들웨어(330)는, 예를 들면, 어플리케이션(370)이 공통적으로 필요로 하는 기능을 제공하거나, 어플리케이션(370)이 전자 장치 내부의 제한된 시스템 자원을 사용할 수 있도록 API(360)를 통해 다양한 기능들을 어플리케이션(370)으로 제공할 수 있다. 한 실시예에 따르면, 미들웨어(330) 는 런타임 라이브러리(335), 어플리케이션 매니저(341), 윈도우 매니저(342), 멀티미디어 매니저(343), 리소스 매니저(344), 파워 매니저(345), 데이터베이스 매니저(346), 패키지 매니저(347), 커넥티비티 매니저(348), 노티피케이션 매니저(349), 로케이션 매니저(350), 그래픽 매니저(351), 또는 시큐리티 매니저(352) 중 적어도 하나를 포함할 수 있다.The middleware 330 may provide various functions through the API 360, for example, to provide functions that are commonly needed by the application 370 or allow the application 370 to use limited system resources within the electronic device. Application 370 as shown in FIG. According to one embodiment, the middleware 330 includes a runtime library 335, an application manager 341, a window manager 342, a multimedia manager 343, a resource manager 344, a power manager 345, a database manager The location manager 350, the graphic manager 351, or the security manager 352. In this case, the service manager 341 may be a service manager, a service manager, a service manager, a package manager 346, a package manager 347, a connectivity manager 348, a notification manager 349,

런타임 라이브러리(335)는, 예를 들면, 어플리케이션(370)이 실행되는 동안에 프로그래밍 언어를 통해 새로운 기능을 추가하기 위해 컴파일러가 사용하는 라이브러리 모듈을 포함할 수 있다. 런타임 라이브러리(335)는 입출력 관리, 메모리 관리, 또는 산술 함수 처리를 수행할 수 있다. 어플리케이션 매니저(341)는, 예를 들면, 어플리케이션(370)의 생명 주기를 관리할 수 있다. 윈도우 매니저(342)는 화면에서 사용되는 GUI 자원을 관리할 수 있다. 멀티미디어 매니저(343)는 미디어 파일들의 재생에 필요한 포맷을 파악하고, 해당 포맷에 맞는 코덱을 이용하여 미디어 파일의 인코딩 또는 디코딩을 수행할 수 있다. The runtime library 335 may include, for example, a library module that the compiler uses to add new functionality via a programming language while the application 370 is executing. The runtime library 335 may perform input / output management, memory management, or arithmetic function processing. The application manager 341 can manage the life cycle of the application 370, for example. The window manager 342 can manage GUI resources used in the screen. The multimedia manager 343 can recognize the format required for reproducing the media files and can perform encoding or decoding of the media file using a codec according to the format.

리소스 매니저(344)는 어플리케이션(370)의 소스 코드 또는 메모리의 공간을 관리할 수 있다. 파워 매니저(345)는, 예를 들면, 배터리의 용량 또는 전원을 관리하고, 전자 장치의 동작에 필요한 전력 정보를 제공할 수 있다. 한 실시예에 따르면, 파워 매니저(345)는 바이오스(BIOS: basic input/output system)와 연동할 수 있다. 데이터베이스 매니저(346)는, 예를 들면, 어플리케이션(370)에서 사용될 데이터베이스를 생성, 검색, 또는 변경할 수 있다. 패키지 매니저(347)는 패키지 파일의 형태로 배포되는 어플리케이션의 설치 또는 갱신을 관리할 수 있다. The resource manager 344 can manage the source code of the application 370 or the space of the memory. The power manager 345 may, for example, manage the capacity or power of the battery and provide the power information necessary for operation of the electronic device. According to one embodiment, the power manager 345 may interoperate with a basic input / output system (BIOS). The database manager 346 may create, retrieve, or modify the database to be used in the application 370, for example. The package manager 347 can manage installation or update of an application distributed in the form of a package file.

커넥티비티 매니저(348)는, 예를 들면, 무선 연결을 관리할 수 있다. 노티피케이션 매니저(349)는, 예를 들면, 도착 메시지, 약속, 근접성 알림 등의 이벤트를 사용자에게 제공할 수 있다. 로케이션 매니저(350)는, 예를 들면, 전자 장치의 위치 정보를 관리할 수 있다. 그래픽 매니저(351)는, 예를 들면, 사용자에게 제공될 그래픽 효과 또는 이와 관련된 사용자 인터페이스를 관리할 수 있다. 보안 매니저(352)는, 예를 들면, 시스템 보안 또는 사용자 인증을 제공할 수 있다. The connectivity manager 348 may, for example, manage the wireless connection. The notification manager 349 may provide the user with an event such as, for example, an arrival message, an appointment, a proximity notification, and the like. The location manager 350 can manage the location information of the electronic device, for example. The graphic manager 351 may, for example, manage the graphical effects to be presented to the user or a user interface associated therewith. Security manager 352 may provide, for example, system security or user authentication.

한 실시예에 따르면, 미들웨어(330)는 전자 장치의 음성 또는 영상 통화 기능을 관리하기 위한 통화(telephony) 매니저 또는 전술된 구성요소들의 기능들의 조합을 형성할 수 있는 하는 미들웨어 모듈을 포함할 수 있다. 한 실시예에 따르면, 미들웨어(330)는 운영 체제의 종류 별로 특화된 모듈을 제공할 수 있다. 미들웨어(330)는 동적으로 기존의 구성요소를 일부 삭제하거나 새로운 구성요소들을 추가할 수 있다. API(360)는, 예를 들면, API 프로그래밍 함수들의 집합으로, 운영 체제에 따라 다른 구성으로 제공될 수 있다. 예를 들면, 안드로이드 또는 iOS의 경우, 플랫폼 별로 하나의 API 셋을 제공할 수 있으며, 타이젠의 경우, 플랫폼 별로 두 개 이상의 API 셋을 제공할 수 있다.According to one embodiment, the middleware 330 may include a telephony manager for managing the voice or video call function of the electronic device, or a middleware module capable of forming a combination of the functions of the above-described components . According to one embodiment, the middleware 330 may provide a module specialized for each type of operating system. Middleware 330 may dynamically delete some existing components or add new ones. The API 360 may be provided in a different configuration depending on the operating system, for example, as a set of API programming functions. For example, for Android or iOS, you can provide a single API set for each platform, and for Tizen, you can provide two or more API sets for each platform.

어플리케이션(370)은, 예를 들면, 홈(371), 다이얼러(372), SMS/MMS(373), IM(instant message)(374), 브라우저(375), 카메라(376), 알람(377), 컨택트(378), 음성 다이얼(379), 이메일(380), 달력(381), 미디어 플레이어(382), 앨범(383), 와치(384), 헬스 케어(예: 운동량 또는 혈당 등을 측정), 또는 환경 정보(예: 기압, 습도, 또는 온도 정보) 제공 어플리케이션을 포함할 수 있다. 한 실시예에 따르면, 어플리케이션(370)은 전자 장치와 외부 전자 장치 사이의 정보 교환을 지원할 수 있는 정보 교환 어플리케이션을 포함할 수 있다. 정보 교환 어플리케이션은, 예를 들면, 외부 전자 장치에 특정 정보를 전달하기 위한 노티피케이션 릴레이 어플리케이션, 또는 외부 전자 장치를 관리하기 위한 장치 관리 어플리케이션을 포함할 수 있다. The application 370 may include a home 371, a dialer 372, an SMS / MMS 373, an instant message 374, a browser 375, a camera 376, an alarm 377, Contact 378, voice dial 379, email 380, calendar 381, media player 382, album 383, watch 384, healthcare (e.g., measuring exercise or blood glucose) , Or environmental information (e.g., air pressure, humidity, or temperature information) application. According to one embodiment, the application 370 may include an information exchange application capable of supporting the exchange of information between the electronic device and the external electronic device. The information exchange application may include, for example, a notification relay application for communicating specific information to an external electronic device, or a device management application for managing an external electronic device.

예를 들면, 알림 전달 어플리케이션은 전자 장치의 다른 어플리케이션에서 발생된 알림 정보를 외부 전자 장치로 전달하거나, 또는 외부 전자 장치로부터 알림 정보를 수신하여 사용자에게 제공할 수 있다. 장치 관리 어플리케이션은, 예를 들면, 전자 장치와 통신하는 외부 전자 장치의 기능(예: 외부 전자 장치 자체(또는, 일부 구성 부품)의 턴-온/턴-오프 또는 디스플레이의 밝기(또는, 해상도) 조절), 또는 외부 전자 장치에서 동작하는 어플리케이션을 설치, 삭제, 또는 갱신할 수 있다. 한 실시예에 따르면, 어플리케이션(370)은 외부 전자 장치의 속성에 따라 지정된 어플리케이션(예: 모바일 의료 기기의 건강 관리 어플리케이션)을 포함할 수 있다. 한 실시예에 따르면, 어플리케이션(370)은 외부 전자 장치로부터 수신된 어플리케이션을 포함할 수 있다. 프로그램 모듈(310)의 적어도 일부는 소프트웨어, 펌웨어, 하드웨어(예: 프로세서(210)), 또는 이들 중 적어도 둘 이상의 조합으로 구현(예: 실행)될 수 있으며, 하나 이상의 기능을 수행하기 위한 모듈, 프로그램, 루틴, 명령어 세트 또는 프로세스를 포함할 수 있다.For example, the notification delivery application can transmit notification information generated in another application of the electronic device to the external electronic device, or receive notification information from the external electronic device and provide the notification information to the user. The device management application may, for example, control the turn-on / turn-off or brightness (or resolution) of an external electronic device in communication with the electronic device (e.g., the external electronic device itself Control), or install, delete, or update an application running on an external electronic device. According to one embodiment, the application 370 may include an application (e.g., a healthcare application of a mobile medical device) designated according to the attributes of the external electronic device. According to one embodiment, the application 370 may include an application received from an external electronic device. At least some of the program modules 310 may be implemented (e.g., executed) in software, firmware, hardware (e.g., processor 210), or a combination of at least two of the same, Program, routine, instruction set or process.

본 문서에서 사용된 용어 "모듈"은 하드웨어, 소프트웨어 또는 펌웨어로 구성된 유닛을 포함하며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로 등의 용어와 상호 호환적으로 사용될 수 있다. "모듈"은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는 최소 단위 또는 그 일부가 될 수 있다. "모듈"은 기계적으로 또는 전자적으로 구현될 수 있으며, 예를 들면, 어떤 동작들을 수행하는, 알려졌거나 앞으로 개발될, ASIC(application-specific integrated circuit) 칩, FPGAs(field-programmable gate arrays), 또는 프로그램 가능 논리 장치를 포함할 수 있다. 다양한 실시예에 따른 장치(예: 모듈들 또는 그 기능들) 또는 방법(예: 동작들)의 적어도 일부는 프로그램 모듈의 형태로 컴퓨터로 판독 가능한 저장 매체(예: 메모리(130))에 저장된 명령어로 구현될 수 있다. 상기 명령어가 프로세서(예: 프로세서(120))에 의해 실행될 경우, 프로세서가 상기 명령어에 해당하는 기능을 수행할 수 있다. As used herein, the term "module " includes units comprised of hardware, software, or firmware and may be used interchangeably with terms such as, for example, logic, logic blocks, components, or circuits. A "module" may be an integrally constructed component or a minimum unit or part thereof that performs one or more functions. "Module" may be implemented either mechanically or electronically, for example, by application-specific integrated circuit (ASIC) chips, field-programmable gate arrays (FPGAs) And may include programmable logic devices. At least some of the devices (e.g., modules or functions thereof) or methods (e.g., operations) according to various embodiments may be stored in a computer readable storage medium (e.g., memory 130) . ≪ / RTI > When the instruction is executed by a processor (e.g., processor 120), the processor may perform a function corresponding to the instruction.

다양한 실시예들에 따른 전자 장치(201)는 메모리(230), 디스플레이(260), 및 상기 메모리(230) 또는 상기 디스플레이(260)와 기능적으로 연결된 프로세서(210)를 포함하고, 상기 프로세서는, 이미지로부터 추출된 특징점에 기반하여 얼굴 영역을 인식하고, 상기 얼굴 영역 내 하나 이상의 오브젝트들을 설정하고, 상기 하나 이상의 오브젝트들을 이용하여 상기 얼굴 영역 내 기준선을 설정하고, 상기 기준선을 기준으로 상기 얼굴 영역을 분할하고, 상기 분할된 얼굴 영역별 보정 비율을 계산하고, 계산된 보정 비율에 따라 상기 얼굴 영역을 보정하고, 상기 보정된 이미지를 상기 디스플레이(260) 표시하도록 설정될 수 있다.An electronic device 201 in accordance with various embodiments includes a memory 230, a display 260 and a processor 210 that is operatively coupled to the memory 230 or the display 260, Recognizing a face region based on feature points extracted from the image, setting one or more objects in the face region, setting a reference line in the face region using the one or more objects, Calculate the correction ratio for each of the divided face regions, correct the face region according to the calculated correction ratio, and display the corrected image on the display (260).

상기 얼굴 영역은 타원형으로 인식되고, 상기 기준선은 상기 타원형 내 장축을 잇는 선으로 설정되고, 상기 프로세서(210)는, 상기 기준선에 적어도 기반하여 상기 얼굴 영역의 기울기를 판단하도록 설정될 수 있다.The face region is recognized as an ellipse, the reference line is set as a line connecting the elliptical inner axis, and the processor 210 may be configured to determine a slope of the face region based at least on the reference line.

상기 프로세서(210)는, 상기 얼굴 영역의 기울기에 적어도 기반하여 상기 얼굴 영역의 장축 방향으로 보정 비율을 계산하고, 상기 얼굴 영역의 기울기에 적어도 기반하여 상기 얼굴 영역의 단축 방향으로 보정 비율을 계산하도록 설정될 수 있다.The processor 210 calculates a correction ratio in a major axis direction of the face region based at least on a slope of the face region and calculates a correction ratio in a direction of a short axis of the face region based at least on a slope of the face region Can be set.

상기 프로세서(210)는, 상기 얼굴 영역의 전체 비율에 적어도 기반하여 상기 분할된 얼굴 영역별 보정 비율을 차등적으로 계산하도록 설정될 수 있다.The processor 210 may be configured to variably calculate the correction ratio of the divided face regions based on at least the total ratio of the face regions.

상기 프로세서(210)는, 상기 하나 이상의 오브젝트들 중에서 눈 오브젝트에 대응하여 타원 영역을 형성하고, 상기 타원 영역의 기울기에 적어도 기반하여 확대 비율을 계산하고, 계산된 확대 비율에 적어도 기반하여 상기 타원 영역을 확대하도록 설정될 수 있다.The processor 210 forms an elliptical region corresponding to the eye object among the one or more objects, calculates an enlargement ratio based on the gradient of the elliptical region at least based on the calculated enlargement ratio, As shown in FIG.

상기 프로세서(210)는, 상기 타원 영역의 장축을 잇는 기준선을 설정하고, 설정된 기준선의 기울기를 판단하고, 상기 기준선의 기울기에 적어도 기반하여 확대 비율을 계산하도록 설정될 수 있다.The processor 210 may be configured to set a reference line connecting the long axes of the elliptical region, determine a slope of the set reference line, and calculate an enlargement ratio based at least on the slope of the reference line.

상기 프로세서(210)는, 상기 타원 영역 내 눈동자 영역을 검출하고, 상기 눈동자 영역의 크기, 기울기 방향, 또는 위치에 적어도 기반하여 눈동자 영역에 대한 확대 비율을 계산하도록 설정될 수 있다.The processor 210 may be configured to detect a pupil region in the ellipse region and to calculate an enlargement ratio for the pupil region based at least on the size, tilt direction, or position of the pupil region.

상기 프로세서(210)는, 상기 타원 영역에 대한 확대 비율과 상기 눈동자 영역에 대한 확대 비율을 서로 다르게 적용하여 상기 눈 오브젝트를 보정하도록 설정될 수 있다.The processor 210 may be configured to correct the eye object by applying different magnification ratios to the ellipse region and the pupil region.

상기 프로세서(210)는, 상기 이미지와 연관된 정보를 이용하여 보정 파라미터를 설정하고, 설정된 보정 파라미터에 기반하여 보정 우선 순위를 결정하고, 상기 보정 우선 순위에 기반하여 전역적 보정 또는 지역적 보정에 대한 처리를 수행하도록 설정될 수 있다.The processor (210) is configured to set a correction parameter using information associated with the image, determine a correction priority based on the set correction parameter, and perform a global correction or a local correction based on the correction priority As shown in FIG.

상기 프로세서(210)는, 상기 보정 파라미터에 적어도 기반하여 상기 전역적 보정 또는 상기 지역적 보정 중 어느 하나를 이용하여 상기 얼굴 영역에 대한 보정에 대한 제1 처리를 수행하고, 상기 전역적 보정 또는 상기 지역적 보정 중 나머지 하나를 이용하여 상기 제1 처리된 얼굴 영역에 대한 보정에 대한 제2 처리를 수행하도록 설정될 수 있다.Wherein the processor (210) performs a first process for the correction for the face region using at least one of the global correction or the local correction based at least on the correction parameter, and wherein the global correction or the regional And to perform a second process for the correction on the first processed face area using the remaining one of the correction.

상기 프로세서(210)는, 상기 이미지의 얼굴 영역에 반사광이 검출되는 경우, 상기 전역적 보정에 대한 처리를 수행한 후에 상기 지역적 보정에 대한 처리를 수행하도록 설정될 수 있다.The processor 210 may be configured to perform processing for the global correction when the reflected light is detected in the face region of the image.

다양한 실시예들에 따른 전자 장치(201)는 카메라(예: 카메라 모듈(291)), 및 프로세서(210)를 포함하고, 상기 프로세서(210)는, 상기 카메라(291)를 이용하여, 얼굴이 포함된 이미지를 획득하고, 상기 얼굴에 대한 검출 방법에 적어도 기반하여, 상기 얼굴과 관련된 복수의 가이드 마스크들을 생성하고, 상기 복수의 가이드 마스크들의 적어도 일부와 상기 얼굴 중 피부에 해당될 확률에 적어도 기반하여, 상기 피부에 대한 이미지 처리 방법을 결정하고, 및 상기 결정된 이미지 처리 방법에 적어도 기반하여, 상기 피부의 일부를 보정하도록 설정될 수 있다.An electronic device 201 in accordance with various embodiments includes a camera (e.g., a camera module 291) and a processor 210 that uses the camera 291 to create a face Generating a plurality of guide masks associated with the face based at least in part on a detection method for the face and obtaining at least an image based on at least a portion of the plurality of guide masks, To determine an image processing method for the skin, and to at least partially correct the skin based on the determined image processing method.

상기 프로세서(210)는, 상기 이미지 중 상기 피부의 적어도 일부가 보정된 얼굴에 대응하는 영역 중 상기 얼굴을 구성하는 복수의 오브젝트들에 대응하는 영역에 대해 윤곽선 검출을 위한 가이드 마스크를 이용하여 상기 복수의 오브젝트들의 윤곽선들을 포함하는 피부 영역을 인식하도록 설정될 수 있다.The processor 210 may use the guide mask for contour detection for an area corresponding to a plurality of objects constituting the face among at least a part of the image corresponding to the corrected face, The skin area including contours of the objects of the subject.

상기 프로세서(210)는, 상기 이미지 중 상기 피부의 적어도 일부가 보정된 얼굴에 대응하는 영역 중 상기 얼굴을 구성하는 복수의 오브젝트들에 대응하는 영역에 대해 필터를 이용하여 상기 복수의 오브젝트들의 윤곽선들에 해당될 확률이 낮은 피부 영역을 인식하도록 설정될 수 있다.Wherein the processor (210) is further configured to determine a contour of the plurality of objects by using a filter for an area corresponding to a plurality of objects constituting the face among at least a part of the image corresponding to the corrected face May be set to recognize a skin area having a low probability of being corresponding to the skin area.

상기 프로세서(210)는, 상기 이미지에 대한 보정 타입에 적어도 기반하여 상기 복수의 가이드 마스크들의 조합 법칙을 변경하고, 상기 변경된 조합 법칙에 적어도 기반하여 상기 얼굴을 구성하는 복수의 오브젝트들에 해당될 확률들을 결정하고, 및 상기 결정된 확률에 적어도 기반하여, 상기 피부에 대한 이미지 처리 방법을 결정하도록 설정될 수 있다.The processor 210 may change the combination rule of the plurality of guide masks based on at least the correction type for the image, and change the probability of corresponding to a plurality of objects constituting the face based at least on the changed combination rule And to determine an image processing method for the skin, based at least in part on the determined probability.

도 4는 다양한 실시예들에 따른 전자 장치의 동작 방법을 도시한 흐름도이다.4 is a flow chart illustrating a method of operation of an electronic device according to various embodiments.

도 4를 참조하면, 동작(401)에서, 전자 장치(201)(예: 프로세서(210))는 이미지(또는 영상)를 획득할 수 있다. 상기 이미지는 전자 장치(201)의 카메라 모듈(예: 카메라 모듈(291))로부터 실시간으로 획득되는 프리뷰 이미지이거나, 메모리(예: 메모리(230))에 저장된 이미지일 수 있다. 예를 들어, 프로세서(210)는 사용자의 선택에 따라 카메라 어플리케이션을 실행하고, 실행된 카메라 어플리케이션에 의해 카메라 모듈(291)로부터 이미지를 획득하여 전자 장치(201)의 디스플레이(예: 디스플레이(260))에 표시할 수 있다. 또는, 프로세서(210)는 상기 사용자의 선택에 따라 갤러리 어플리케이션(예: 사진 어플리케이션)을 실행하고, 실행된 갤러리 어플리케이션을 통해 표시되는 이미지 목록에서 상기 사용자로부터 적어도 하나의 이미지를 선택받아 디스플레이(260)에 표시할 수 있다. 4, at operation 401, electronic device 201 (e.g., processor 210) may obtain an image (or image). The image may be a preview image obtained in real time from a camera module (e.g., camera module 291) of the electronic device 201 or an image stored in a memory (e.g., memory 230). For example, the processor 210 may execute a camera application at the user's choice, acquire an image from the camera module 291 by the executed camera application and display it on the display (e.g., display 260) of the electronic device 201, ). ≪ / RTI > Alternatively, the processor 210 executes a gallery application (e.g., a photo application) according to the user's selection, selects at least one image from the user in the image list displayed through the executed gallery application, Can be displayed.

상기 이미지를 획득하는 동작은 디스플레이(260)에 이미지를 표시하는 동작을 포함할 수 있다. 여기서, 상기 획득된 이미지는 얼굴을 포함하는 인물 사진에 해당하는 것일 수 있다. 상기 인물 사진은 얼굴, 얼굴과 목 또는 상반신(예: 얼굴에서부터 허리 위까지 부분) 중 적어도 하나를 포함할 수 있다. 다양한 실시예들에 따르면, 사용자는 이미지 획득 동작을 수행할 때, 표시된 이미지에 대한 보정 타입을 선택할 수 있다. 상기 보정 타입은 이미지를 어떠한 속성(예: 밝기, 색상 반전, 또는 색상 변경)으로 보정할 것인지 선택하는 것일 수 있다.The act of acquiring the image may include displaying the image on the display 260. Here, the obtained image may correspond to a portrait including a face. The portrait may include at least one of a face, a face and neck, or an upper body (e.g., a portion from the face to the waist). According to various embodiments, the user may select a correction type for the displayed image when performing an image acquisition operation. The type of correction may be to select which properties (e.g., brightness, color reversal, or color change) the image should be corrected for.

동작(403)에서, 전자 장치(201)(예: 프로세서(210))는 상기 이미지로부터 특징점을 추출할 수 있다. 상기 특징점은 영어로 'feature point', 'key point', 'interesting point'라 칭할 수 있다. 상기 특징점은 물체를 추적하거나 인식할 때 사용하는 방법일 수 있다. 프로세서(210)는 상기 획득된 이미지로부터 얼굴 영역을 인식하거나, 얼굴 영역 내 오브젝트(예: 눈, 코, 입, 얼굴 윤곽)를 분석하기 위해 상기 획득된 이미지로부터 특징점을 추출할 수 있다. 이미지로부터 특징점을 추출하는 방법은 종래기술에 해당하므로 자세한 설명을 생략할 수 있다.At operation 403, electronic device 201 (e.g., processor 210) may extract feature points from the image. The minutiae can be called 'feature point', 'key point', and 'interesting point' in English. The feature point may be a method used for tracking or recognizing an object. The processor 210 may recognize the face region from the acquired image or extract feature points from the acquired image to analyze objects in the face region (e.g., eye, nose, mouth, face contour). Since the method of extracting feature points from an image corresponds to the conventional art, a detailed description can be omitted.

동작(405)에서, 전자 장치(201)(예: 프로세서(210))는 상기 추출된 특징점에 기반하여 얼굴 영역을 인식할 수 있다. 예를 들어, 프로세서(210)는 상기 추출된 특징점들을 이용하여 타원 영역을 형성하고, 형성된 타원 영역 중 큰 타원 영역에 해당하는 부분을 얼굴 영역으로 인식할 수 있다. 즉, 프로세서(210)는 상기 얼굴 영역을 타원형으로 인식할 수 있다. 예를 들어, 프로세서(210)는 상기 추출된 특징점들 중에서 가장 중심에 위치하는 특징점(예: 코 특징점)으로부터 가장 먼 거리에 위치하는 특징점들을 하나의 선으로 이어 큰 타원 영역을 형성할 수 있다. 또는, 프로세서(210)는 상기 추출된 특징점들 중에서 작은 타원 영역에 해당하는 영역을 눈 영역 또는 입 영역으로 인식할 수도 있다. 프로세서(210)는 인식된 얼굴 영역 내에서만 이미지 보정 처리 동작을 수행할 수 있다.At operation 405, the electronic device 201 (e.g., processor 210) may recognize the face region based on the extracted feature points. For example, the processor 210 forms an ellipse region using the extracted feature points, and recognizes a portion corresponding to a large ellipse region of the formed ellipse region as a face region. That is, the processor 210 may recognize the face area as an ellipse. For example, the processor 210 may form a large elliptical region by connecting a plurality of minutiae located at the greatest distance from a minutiae located at the very center of the extracted minutiae (e.g., nose minutiae) to one line. Alternatively, the processor 210 may recognize an area corresponding to a small elliptical area among the extracted minutiae as an eye area or a mouth area. The processor 210 may perform an image correction processing operation only within the recognized face area.

동작(407)에서, 전자 장치(201)(예: 프로세서(210))는 상기 인식된 얼굴 영역 내 오브젝트를 설정(또는 결정)할 수 있다. 상기 오브젝트는 얼굴을 구성하는 요소를 의미하는 것으로, 예를 들어, 눈썹, 눈, 코, 또는 입 중 적어도 하나일 수 있다. 프로세서(210)는 얼굴을 구성하는 요소의 특성을 이용하여 얼굴 영역 내 오브젝트를 설정할 수 있다. 프로세서(210)는 얼굴 영역 내 위치하는 특징점들을 이용하여 오브젝트의 속성(예: 눈썹, 눈, 코, 입), 형태(예: 모양) 또는 위치 중 적어도 하나를 분석할 수 있다.At operation 407, the electronic device 201 (e.g., processor 210) may set (or determine) an object in the recognized face area. The object refers to an element constituting a face, and may be at least one of eyebrow, eye, nose, or mouth, for example. The processor 210 can set an object in the face region using the characteristics of the elements constituting the face. Processor 210 may analyze at least one of the attributes (e.g., eyebrows, eyes, nose, mouth), shape (e.g., shape), or position of the object using feature points located within the face region.

예를 들어, 프로세서(210)는 상기 추출된 특징점들을 이용하여 얼굴 영역 내 나란히 위치하는 두 개의 형태 또는 영역을 눈썹 오브젝트로 설정할 수 있다. 또는, 프로세서(210)는 상기 추출된 특징점들을 이용하여 얼굴 영역 내 나란히 위치하는 두 개의 타원 영역을 각각 눈 오브젝트로 설정할 수 있다. 얼굴이 어느 한쪽으로 기울어진 경우, 상기 눈 오브젝트는 동일한 수평 방향에 나란히 위치하지 않을 수 있다. 프로세서(210)는 얼굴 영역 내 두 개의 작은 타원 영역이 감지되면, 특징점들을 이용하여 각 타원 영역에 대해 각각 눈 오브젝트를 설정할 수 있다. 또는, 프로세서(210)는 눈 오브젝트의 아래, 두 눈 오브젝트 사이에 위치하는 막대기 형태를 이루는 특징점들을 이용하여 코 오브젝트를 설정할 수 있다. 또는, 프로세서(210)는 눈과 코 오브젝트 하단에 위치하고, 일정한 영역을 형성하는 특징점들을 이용하여 입 오브젝트를 설정할 수 있다. For example, the processor 210 may set two types or regions, which are located side by side in the face region, as browse objects using the extracted feature points. Alternatively, the processor 210 may set the two elliptical regions, which are located side by side in the face region, as eye objects using the extracted feature points. If the face is inclined to either side, the eye objects may not be positioned side by side in the same horizontal direction. When two small elliptical regions in the face region are detected, the processor 210 can set eye objects for each elliptical region using the feature points. Alternatively, the processor 210 may set the nose object using feature points in the form of a bar located between the two eye objects below the eye object. Alternatively, the processor 210 may set the mouth object using the minutiae which are located at the lower end of the eyes and nose objects and form a certain region.

동작(409)에서, 전자 장치(201)(예: 프로세서(210))는 상기 설정된 오브젝트를 이용하여 얼굴 영역을 보정할 수 있다. 다양한 실시예들에 따른 프로세서(210)는 가이드 마스크를 이용한 보정 영역 검출 방법, 기울기를 이용한 얼굴 형상 보정 방법, 영역을 이용한 얼굴 영역 보정 방법 중 적어도 하나를 수행할 수 있다. 예를 들어, 상기 보정 영역(예: 피부 영역) 검출 방법은 얼굴 영역을 보정하기 위한 전처리 과정으로, 예를 들어, 보정할 영역(또는 범위)를 검출하는 것일 수 있다. 동작(405)에서 얼굴 영역을 인식하였지만, 프로세서(210)는 상기 보정 영역 검출 방법을 이용하여 얼굴 영역을 조금 더 정확하게 검출할 수 있다. 또는, 프로세서(210)는 상기 보정 영역 검출 방법을 이용하여 얼굴 영역 이외에 보정이 필요한 부분(예: 목)이 더 있는지 여부를 판단할 수 있다. 보정이 필요한 부분은 사용자의 피부에 해당하는 것일 수 있다.In operation 409, the electronic device 201 (e.g., processor 210) may correct the face area using the set object. The processor 210 according to various embodiments may perform at least one of a correction region detection method using a guide mask, a face shape correction method using a gradient, and a face region correction method using an area. For example, the correction region (e.g., skin region) detection method may be a preprocessing process for correcting the face region, for example, to detect an area (or range) to be corrected. Although the face region is recognized at operation 405, the processor 210 may more accurately detect the face region using the correction region detection method. Alternatively, the processor 210 may determine whether there is a portion (e.g., a neck) that needs correction in addition to the face region using the correction region detection method. The part that needs to be corrected may correspond to the skin of the user.

다양한 실시예들에 따른 프로세서(210)는 상기 보정 영역 검출 방법을 수행한 후, 상기 얼굴 형상 보정 방법 및/또는 상기 얼굴 영역 보정 방법을 수행할 수 있다. 예를 들어, 프로세서(210)는 상기 검출된 보정 영역에서 기울기가 검출되는 경우, 상기 얼굴 형상 보정 방법을 이용하여 얼굴 형상을 보정할 수 있다. 또는, 프로세서(210)는 상기 검출된 보정 영역에서 기울기가 검출되는 경우, 상기 얼굴 형상을 보정한 후, 상기 얼굴 영역 보정 방법을 수행할 수 있다. 또는, 프로세서(210)는 상기 검출된 보정 영역에서 기울기가 검출되지 않는 경우, 상기 얼굴 형상 보정 방법을 수행하지 않고, 상기 얼굴 영역 보정 방법을 수행할 수 있다.The processor 210 according to various embodiments may perform the face shape correction method and / or the face area correction method after performing the correction region detection method. For example, when the inclination is detected in the detected correction region, the processor 210 may correct the face shape using the face shape correction method. Alternatively, when the inclination is detected in the detected correction region, the processor 210 may perform the face region correction method after correcting the face shape. Alternatively, the processor 210 may perform the face area correction method without performing the face shape correction method when the inclination is not detected in the detected correction area.

동작(411)에서, 전자 장치(201)(예: 프로세서(210))는 보정된 이미지를 표시할 수 있다. 프로세서(120)는 동작(403) 내지 동작(409)을 수행하여 동작(401)에서 획득된 이미지를 보정한 후, 보정된 이미지를 디스플레이(260)에 표시할 수 있다. 사용자는 디스플레이(260)을 통해 표시된 이미지를 확인하고, 선택적으로 표시된 이미지를 저장할 수 있다. 프로세서(210)는 상기 사용자로부터 저장 요청(예: 저장 버튼 선택)이 있는 경우, 표시된 이미지를 메모리(230)에 저장할 수 있다.At operation 411, the electronic device 201 (e.g., processor 210) may display the corrected image. The processor 120 may perform operations 403 to 409 to correct the image obtained in operation 401 and then display the corrected image on the display 260. [ The user can view the displayed image via the display 260 and optionally store the displayed image. The processor 210 may store the displayed image in the memory 230 if there is a storage request (e.g., a save button selection) from the user.

도 5는 다양한 실시예들에 따른 얼굴 형상 보정 방법을 도시한 흐름도이다. 도 5의 흐름도는 도 4의 동작(409)을 상세히 설명한 것이다.5 is a flowchart illustrating a face shape correction method according to various embodiments. The flow chart of FIG. 5 details operation 409 of FIG.

도 5를 참조하면, 동작(501)에서, 전자 장치(201)(예: 프로세서(210))는 기준 오브젝트를 결정할 수 있다. 프로세서(210)는 얼굴의 기울기 또는 회전 각도를 판단하기 위해 기준이 되는 오브젝트를 기준 오브젝트로 결정할 수 있다. 상기 기준 오브젝트는 얼굴을 구성하는 적어도 하나의 오브젝트이거나, 상기 오브젝트를 이용하여 생성된 것일 수 있다. 예를 들어, 상기 기준 오브젝트는 두 눈썹 사이의 중앙점(예: 미간)과 코일 수 있다. 또는, 상기 기준 오브젝트는 두 눈 사이의 중앙점과 입의 중앙점일 수 있다. 프로세서(210)는 얼굴의 기울기를 판단하기 위하여 얼굴 영역 내 다양한 지점을 기준 오브젝트로 결정할 수 있다.Referring to FIG. 5, at operation 501, the electronic device 201 (e.g., processor 210) may determine a reference object. The processor 210 may determine a reference object as a reference object in order to determine a tilt or a rotation angle of a face. The reference object may be at least one object constituting a face, or may be generated using the object. For example, the reference object may be a center point between two eyebrows (e.g., the tail) and a coil. Alternatively, the reference object may be a center point between the eyes and a center point of the mouth. The processor 210 may determine various points in the face region as reference objects to determine the inclination of the face.

동작(503)에서, 전자 장치(201)(예: 프로세서(210))는 기준 오브젝트들을 잇는 기준선을 설정할 수 있다. 사람의 얼굴은 타원형이므로, 프로세서(210)는 상기 얼굴 영역을 타원형으로 인식할 수 있다. 프로세서(210)는 상기 얼굴 영역인 타원형에서 장축을 잇는 선을 기준선으로 설정할 수 있다. 상기 장축은 타원의 양 끝점을 잇는 선분 중에서 긴 축에 해당할 수 있다. 예를 들어, 사람의 얼굴형에서 장축은 이마에서부터 턱으로 내려가는 수직 방향 또는 세로 방향을 의미할 수 있다. 예를 들어, 상기 기준선은 이마부터 눈썹 사이의 중앙점 및 코끝까지 이어지는 선일 수 있다. 또는, 상기 기준선은 이마부터 눈썹 사이의 중앙점 및 입의 중앙점까지 이어지는 선일 수 있다. At operation 503, the electronic device 201 (e.g., processor 210) may establish a baseline connecting the reference objects. Since the human face is elliptical, the processor 210 can recognize the face area as an ellipse. The processor 210 may set a line connecting the long axis in the ellipse which is the face area as a reference line. The long axis may correspond to a long axis among the line segments connecting both end points of the ellipse. For example, in a human face, the long axis may mean a vertical or vertical direction from the forehead to the jaw. For example, the baseline may be a line extending from the forehead to the middle point between the eyebrows and the tip of the nose. Alternatively, the baseline may be a line extending from the forehead to the midpoint between the eyebrows and the midpoint of the mouth.

만약, 사람의 얼굴이 지평선과 직각이 되는 수직 방향이 아니라, 왼쪽 또는 오른쪽으로 기울어져 있는 경우, 상기 기준선은 지평선과 직각이 되는 수직선을 기준으로 일정한 각도를 갖는 기울기를 갖을 수 있다. 다양한 실시예들에 따른 프로세서(210)는 얼굴 기울기를 판단하기 위하여 다양한 방법으로 적어도 두 개의 기준 오브젝트들을 잇는 기준선을 설정할 수 있다. 대부분의 상기 사람의 얼굴은 타원형으로 형성되는데, 타원형이 아닌 다른 형태(예: 사각형)로 인식할 경우, 사각형(예: 턱 주변 부분) 내에 얼굴이 아닌 영역이 포함될 수 있다. 따라서, 프로세서(210)는 이미지 내 특징점들을 이용하여 얼굴 영역을 타원형으로 인식할 수 있다.If the face of the person is inclined to the left or right rather than the vertical direction perpendicular to the horizon, the reference line may have a slope having a constant angle with respect to a vertical line perpendicular to the horizon. The processor 210 according to various embodiments may set a baseline connecting at least two reference objects in various ways to determine facial tilt. Most of the face of the person is formed in an elliptical shape. When recognizing it as a shape other than an elliptical shape (e.g., a rectangle), a non-face area may be included in a rectangle (e.g. Thus, the processor 210 may recognize the face region as an ellipse using feature points in the image.

동작(505)에서, 전자 장치(201)(예: 프로세서(210))는 상기 설정된 기준선을 기준으로 얼굴 영역을 분할할 수 있다. 예를 들어, 프로세서(210)는 기준선을 기준으로 얼굴의 위(예: 이마)에서부터 아래(예: 턱) 방향으로 얼굴 영역을 분할할 수 있다. 프로세서(210)는 이마 및 눈을 포함하는 제1 영역, 코 및 입을 포함하는 제2 영역, 턱 부분을 포함하는 제3 영역으로 얼굴 영역을 분할할 수 있다. 또는, 프로세서(210)는 이마를 포함하는 제1 영역, 눈을 포함하는 제2 영역, 코를 포함하는 제3 영역, 입을 포함하는 제4 영역, 턱 부분을 포함하는 제5 영역으로 얼굴 영역을 분할할 수 있다. 영역을 분할하는 방법은 실시예에 따라 다양하게 구현될 수 있으며, 이하 설명에 의해 본 발명이 제한되는 것은 아니다.At operation 505, the electronic device 201 (e.g., the processor 210) may partition the face area based on the set baseline. For example, the processor 210 may segment the face region from a location above the face (e.g., forehead) to below (e.g., jaw) relative to a baseline. The processor 210 may divide the face region into a first region including a forehead and eye, a second region including a nose and mouth, and a third region including a jaw portion. Alternatively, the processor 210 may include a first region including the forehead, a second region including the eye, a third region including the nose, a fourth region including the mouth, and a fifth region including the jaw portion Can be divided. The method of dividing the area can be variously implemented according to the embodiment, and the present invention is not limited by the following description.

동작(507)에서, 전자 장치(201)(예: 프로세서(210))는 상기 분할된 영역별 보정 비율을 계산할 수 있다. 얼굴 형상 보정은 얼굴의 윤곽을 축소 보정하는 것을 의미할 수 있다. 프로세서(210)는 얼굴 전체적인 비율을 고려하여 얼굴의 윤곽을 축소하는 보정을 수행할 수 있다. 예를 들어, 프로세서(210)는 얼굴 영역을 장축 방향으로 3개의 영역(예: 이마 및 눈을 포함하는 제1 영역, 코 및 입을 포함하는 제2 영역, 턱 부분을 포함하는 제3 영역)으로 분할한 경우, 제1 영역에 대한 보정 비율과, 제2 영역에 대한 보정 비율, 제3 영역에 대한 보정 비율을 각각 계산할 수 있다. 예를 들어, 프로세서(210)는 머리 부분에 대해서는 축소 보정하지 않기 때문에, 자연스런 보정을 위해 이마 및 눈을 포함하는 제1 영역에 대해서는 이마에서부터 눈까지 완만하게 축소 보정되도록 보정 비율을 계산할 수 있다. 예를 들어, 프로세서(210)는 이마 부분에 대한 보정 비율이 작도록(예: 0.9), 눈 끝 부분으로 갈수록 보정 비율이 크도록(예: 0.5) 계산할 수 있다.At operation 507, the electronic device 201 (e.g., processor 210) may calculate the segmented per-region correction rate. The face shape correction may mean reducing the contour of the face. The processor 210 may perform correction to reduce the contour of the face in consideration of the overall face ratio. For example, the processor 210 may convert the face region into three regions in the major axis direction (e.g., a first region including forehead and eye, a second region including nose and mouth, a third region including a jaw portion) In the case of division, the correction ratio for the first area, the correction ratio for the second area, and the correction ratio for the third area can be respectively calculated. For example, since the processor 210 does not perform the zoom correction on the head portion, the correction ratio can be calculated so that the first region including the forehead and the eye is smoothly reduced from the forehead to the eye for natural correction. For example, processor 210 may calculate such that the correction ratio for the forehead portion is small (e.g., 0.9), and the correction ratio is increased toward the end of the eye (e.g., 0.5).

또한, 프로세서(210)는 눈 부분부터는 축소 보정했기 때문에 코 및 입을 포함하는 제2 영역에 대해서는 일률적으로 보정 비율(예: 0.5)을 계산할 수 있다. 또는, 프로세서(210)는 제2 영역에 대해서는 코 부분을 포함하는 영역과 입 부분을 포함하는 영역으로 나누어, 각 영역에 대해서 서로 다른 보정 비율을 갖도록 계산할 수 있다. 예를 들어, 프로세서(210)는 코 부분을 포함하는 영역에 대한 보정 비율을 0.5으로 하고, 입 부분을 포함하는 영역에 대한 보정 비율을 0.6으로 계산할 수 있다. 또한, 프로세서(210)는 턱 아래 부분에 대해서는 축소 보정하지 않기 대문에, 턱 부분을 포함하는 제3 영역에 대해서는 아래 방향으로 완만하게 보정 비율을 계산할 수 있다. 예를 들어, 프로세서(210)는 입 아래 부분은 보정 비율을 크도록(예: 0.5), 턱 끝으로 갈수록 보정 비율이 작도록(예: 0.9) 계산할 수 있다. 다양한 실시예들에 따른 프로세서(210)는 장축 방향의 얼굴 윤곽에 모두 동일한 비율로 축소 보정하지 않고, 영역별로 구분하여 서로 다른 보정 비율을 적용함으로써, 보다 자연스럽게 얼굴 윤곽을 보정할 수 있다.In addition, since the processor 210 reduces the amount of correction from the eye portion, the correction ratio (e.g., 0.5) can be uniformly calculated for the second region including the nose and mouth. Alternatively, the processor 210 may calculate the second region so as to have a different correction ratio for each region, by dividing the region including the nose portion and the region including the mouth portion. For example, the processor 210 may calculate a correction ratio for the region including the nose portion to 0.5 and a correction ratio for the region including the mouth portion to 0.6. In addition, since the processor 210 does not perform the reduction correction for the lower jaw portion, the correction ratio can be gently calculated in the downward direction for the third region including the jaw portion. For example, the processor 210 may calculate the correction rate to be smaller (e.g., 0.9) toward the tip of the jaw such that the lower portion of the mouth has a larger correction ratio (e.g., 0.5). The processor 210 according to various embodiments can correct face contours more naturally by applying different correction ratios by dividing the facial contours in the major axis direction by the same ratio without dividing the same.

다양한 실시예들에 따른 프로세서(210)는 얼굴 기울기(또는 회전 각도)를 고려하여 얼굴의 상/하(예: 장축 방향), 좌/우(예: 단축 방향)에 대해서 비율적으로 얼굴 윤곽을 보정할 수 있다. 상기 단축은 타원의 양 끝점을 잇는 선분 중에서 짧은 축에 해당할 수 있다. 사람의 얼굴형에서 단축은 왼쪽 눈(또는 오른쪽 눈)에서 오른쪽 눈(또는 왼쪽 눈)으로 이어지는 수평 방향 또는 가로 방향을 의미할 수 있다. 예를 들어, 프로세서(210)는 타원형인 사람의 얼굴 형상을 고려하여 타원의 장축 방향으로 보정 비율을 계산하고, 타원의 단축 방향으로 보정 비율을 각각 계산할 수 있다. 종래에는 단축 방향으로만 얼굴 윤곽을 축소 보정하였다면, 본 실시예에서는 장축 방향으로도 얼굴 윤곽을 축소 보정함으로써, 보정으로 인해 얼굴이 길어보이는 단점을 해결할 수 있다. 다양한 실시예들에 따른 프로세서(210)는 사람의 얼굴이 타원형인 점을 고려하여 장축 방향 보정 비율을 단축 방향 보정 비율의 0.2배로 설정할 수 있다. 즉, 프로세서(210)는 단축 방향 보정 비율을 계산한 후, 단축 방향 보정 비율에 0.2를 곱하여 장축 방향 보정 비율을 계산할 수 있다. 다양한 실시예들에 따른 프로세서(210)는 사용자의 얼굴 비율을 고려하여 장축 방향 보정 비율을 단축 방향 보정 비율의 몇 배로 설정한 것인지 결정할 수 있다. 예를 들어, 얼굴이 긴 사람의 경우, 0.2배보다 높게 설정될 수 있으며, 얼굴이 동그란 사람의 경우, 0.2배보다 낮게 설정될 수 있다. 이는, 발명의 이해를 돕기 위한 실시예일뿐, 실시예에 의해 본 발명이 제한되는 것은 아니다.The processor 210 according to various embodiments may calculate the face contour proportionally to the top / bottom (e.g., major axis direction) and left / right (e.g., minor axis direction) of the face in consideration of the face tilt Can be corrected. The short axis may correspond to a short axis among the line segments connecting both end points of the ellipse. The short axis in a person's face shape may mean a horizontal direction or a horizontal direction leading from the left eye (or right eye) to the right eye (or left eye). For example, the processor 210 may calculate the correction ratio in the major axis direction of the ellipse in consideration of the face shape of the elliptical person, and calculate the correction ratio in the minor axis direction of the ellipse. Conventionally, if the facial contour is corrected to be reduced only in the short axis direction, the present embodiment can solve the disadvantage that the face is lengthened due to the correction by correcting the contour of the face even in the long axis direction. The processor 210 according to various embodiments may set the long axis direction correction ratio to 0.2 times the short axis direction correction ratio in consideration of the fact that the face of the person is elliptical. That is, the processor 210 may calculate the short axis direction correction ratio and then multiply the short axis direction correction ratio by 0.2 to calculate the long axis direction correction ratio. The processor 210 according to various embodiments can determine whether the long axis direction correction ratio is set to several times the short axis direction correction ratio in consideration of the face ratio of the user. For example, in the case of a person with a long face, it may be set to be higher than 0.2 times, and in the case of a person whose face is round, it may be set to be lower than 0.2 times. It is to be understood that the present invention is not limited thereto.

다양한 실시예들에 따른 프로세서(210)는 얼굴형의 타입에 따라 보정 비율을 결정할 수 있다. 예를 들어, 얼굴형이 가로로 넓은 타입인 경우, 프로세서(210)는 단축 방향 보정 비율을 단축 방향 평균 보정 비율보다 높일 수 있다. 또는, 얼굴형이 세로로 긴 타입인 경우, 프로세서(210)는 장축 방향 보정 비율을 장축 방향 평균 보정 비율보다 높일 수 있다. 이러한, 프로세서(210)는 사람들이 선호하는 비율을 학습하거나, 빅 데이터를 이용하여 보정 비율을 결정할 수 있다. 또는, 프로세서(210)는 전자 장치(201)의 사용자 특성을 고려하여 상기 보정 비율을 결정할 수 있다. 프로세서(210)는 상기 사용자 특성을 고려하여 사용자의 얼굴형에 대응하는 타입을 분석하고, 분석된 타입에 해당하는 보정 비율을 계산할 수 있다.The processor 210 according to various embodiments may determine the correction rate according to the type of face type. For example, if the face type is a horizontally wide type, the processor 210 may increase the short axis direction correction ratio to the short axis direction average correction ratio. Alternatively, when the face type is a vertically long type, the processor 210 may increase the long axis direction correction ratio to be higher than the long axis direction average correction ratio. This enables the processor 210 to learn the percentage of people preferred or to use the big data to determine the correction rate. Alternatively, the processor 210 may determine the correction factor in consideration of the user characteristics of the electronic device 201. [ The processor 210 may analyze the type corresponding to the face type of the user in consideration of the user characteristics and calculate a correction ratio corresponding to the analyzed type.

동작(509)에서, 전자 장치(201)(예: 프로세서(210))는 상기 계산된 보정 비율에 따라 얼굴 형상을 보정할 수 있다. 프로세서(210)는 분할된 영역별 보정 비율을 각각 다르게 적용하여 얼굴 형상을 보정할 수 있다. 또는, 프로세서(210)는 분할된 영역별 장축 방향 보정 비율과 단축 방향 보정 비율을 각각 적용하여 얼굴 형상을 보정할 수 있다. 프로세서(210)는 상기 보정 비율에 맞춰 해당하는 픽셀을 이동시켜 얼굴 형상을 보정할 수 있다. 예를 들어, 프로세서(210)는 얼굴을 좌, 우로 축소할 경우, 축소된 부분만큼 얼굴 영역의 외부 픽셀로 채울 수 있다. 또는, 프로세서(210)는 얼굴을 좌, 우로 확대하고, 위쪽으로 축소할 경우, 확대된 부분만큼 얼굴 경계 부분을 얼굴 영역에 포함된 픽셀로 채우고, 축소된 부분만큼 얼굴 영역의 외부 픽셀로 채울 수 있다. In operation 509, the electronic device 201 (e.g., processor 210) may correct the face shape according to the calculated correction ratio. The processor 210 can correct the face shape by applying different correction ratios for each divided region. Alternatively, the processor 210 may correct the face shape by applying the long axis direction correction ratio and the short axis direction correction ratio for each divided region, respectively. The processor 210 may correct the face shape by moving the corresponding pixel in accordance with the correction ratio. For example, the processor 210 may fill in the external pixels of the face region by the reduced portion when reducing the face to left and right. Alternatively, the processor 210 may enlarge the face to the left and right and, when zooming up, fill the face boundary with pixels included in the face region by the enlarged portion and fill it with the external pixels of the face region by the reduced portion have.

도 6은 다양한 실시예들에 따른 이미지로부터 특징점을 추출하는 일례를 도시한 도면이다.6 is a diagram illustrating an example of extracting feature points from an image according to various embodiments.

도 6을 참조하면, 전자 장치(201)(예: 프로세서(210))는 이미지로부터 특징점들을 추출할 수 있다. 프로세서(210)는 이미지를 작게 분할하고, 분할된 각 영역의 경계값을 이용하여 특징점들을 추출할 수 있다. 예를 들어, 프로세서(120)는 분할된 영역 들 중에서 인접한 영역과 차이가 나는 영역을 특징점들로 추출할 수 있다. 프로세서(210)는 추출된 특징점들 중에서 얼굴 윤곽에 해당하는 특징점들을 이어서 얼굴 영역(601)을 인식할 수 있다. 프로세서(210)는 얼굴 영역(601) 내에서 눈, 코, 입에 대응하는 영역을 예측하고, 예측된 영역에서 추출된 특징점들을 이용하여 오브젝트를 결정할 수 있다. 여기서, 오브젝트는 눈썹, 좌 눈(603-1), 우 눈(603-2), 코(605) 및 입(607)을 포함할 수 있다. 이렇게, 프로세서(210)는 얼굴 영역(601) 내 위치하는 특징점들을 이용하여 오브젝트의 속성(예: 눈썹, 눈, 코, 입), 형태(예: 모양) 또는 위치 중 적어도 하나를 획득할 수 있다.Referring to FIG. 6, an electronic device 201 (e.g., processor 210) may extract feature points from an image. The processor 210 may divide the image into small portions and extract the feature points using the boundary values of the divided regions. For example, the processor 120 may extract, as minutiae, regions that differ from neighboring regions of the divided regions. The processor 210 can recognize the face region 601 following the feature points corresponding to the face outline among the extracted feature points. The processor 210 can predict an area corresponding to the eyes, nose, and mouth in the face area 601 and determine the object using the extracted feature points in the predicted area. Here, the object may include eyebrows, left eye 603-1, right eye 603-2, nose 605, and mouth 607. [ Thus, the processor 210 may obtain at least one of the attributes (e.g., eyebrows, eyes, nose, mouth), shape (e.g., shape) or position of the object using the feature points located in the face region 601 .

도 7은 다양한 실시예들에 따른 얼굴의 기준선을 결정하는 일례를 도시한 도면이다.7 is a diagram illustrating an example of determining a reference line of a face according to various embodiments.

도 7을 참조하면, 제1 기준선(710)은 얼굴 영역의 위에서부터 아래 방향으로 선분을 그어 결정된 것일 수 있다. 제1 기준선(710)은 얼굴 영역의 기울기(예: 회전 각도)에 상관없이 이미지의 수직 방향으로 결정된 것이기 때문에, 제1 기준선(710)을 기준으로 좌, 우가 대칭이 되도록 얼굴 윤곽을 축소 보정할 경우, 얼굴의 양 쪽 비율이 맞지 않아 얼굴이 부자연스러워 보일 수 있다. 예를 들어, 제1 기준선(710)을 기준으로 얼굴 윤곽을 축소 보정할 경우, 얼굴의 오른쪽 윤곽이 왼쪽 윤곽보다 많이 보정되게 되어 얼굴이 좌우 대칭적으로 보이지 않을 수 있다. 제1 기준선(710)을 기준으로 얼굴을 보정하는 방법은 종래기술에 해당할 수 있다.Referring to FIG. 7, the first reference line 710 may be determined by segmenting a line segment from the top to the bottom of the face region. Since the first reference line 710 is determined in the vertical direction of the image irrespective of the inclination (e.g., the rotation angle) of the face region, the face contour is reduced and corrected so that the left and right sides are symmetrical with respect to the first reference line 710 If the ratio of both sides of the face does not match, the face may look unnatural. For example, if the face contour is corrected by reducing the first contour line based on the first reference line 710, the right contour of the face may be corrected more than the left contour, so that the face may not be symmetrically viewed. The method of correcting the face based on the first reference line 710 may correspond to the prior art.

다양한 실시예들에 따른 전자 장치(201)(예: 프로세서(210))는 얼굴 영역 내 특징점들을 이용하여 제2 기준선(720), 제3 기준선(730) 또는 제4 기준선(740)을 결정할 수 있다.Electronic device 201 (e.g., processor 210) in accordance with various embodiments may determine a second reference line 720, a third reference line 730, or a fourth reference line 740 using feature points in the face region. have.

제2 기준선(720)은 제1 기준선(710)과 마찬가지로 얼굴 영역의 위에서부터 아래 방향으로 선분을 그어 결정된 것일 수 있다. 그러나, 제2 기준선(720)은 얼굴 영역을 좌, 우 대칭으로 분할하게 되어, 제2 기준선(720)을 기준으로 좌, 우가 대칭이 되도록 얼굴 윤곽을 축소 보정할 경우, 얼굴의 양 쪽 비율이 동일하게 축소 보정될 수 있다. 즉, 프로세서(210)는 제2 기준선(720)과 수직이 되는 수평 방향으로 좌, 우의 얼굴 윤곽을 보정할 수 있다. 또한, 프로세서(210)는 좌, 우 대칭적으로 얼굴 윤곽을 축소 보정함과 동시에 좌/우 보정 비율에 기반하여 상/하 보정 비율을 계산할 수 있다. 예를 들어, 프로세서(210)는 좌/우 대칭적으로 얼굴 윤곽을 축소 보정할 경우 얼굴이 길어보일 수 있기 때문에, 턱 아래 부분을 축소 보정함으로써, 전체적인 얼굴 윤곽을 축소 보정할 수 있다. 즉, 프로세서(210)는 좌/우 수평 방향으로 얼굴 윤곽을 축소 보정함과 동시에 상기 좌/우 수평 방향과 직각이 되는 위쪽 방향(예: 위쪽 방향 화살표)으로 턱 아래 부분을 축소 보정할 수 있다.The second reference line 720 may be determined by segmenting the line segment from the top to the bottom of the face area in the same manner as the first reference line 710. However, the second reference line 720 divides the face area in left and right symmetry. When the contour of the face is corrected so that the left and right sides are symmetrical with respect to the second reference line 720, Can be similarly reduced and corrected. That is, the processor 210 can correct the left and right face contours in the horizontal direction perpendicular to the second reference line 720. In addition, the processor 210 may correct the contour of the face symmetrically left and right, and calculate the up / down correction ratio based on the left / right correction ratio. For example, since the face 210 can be seen to be long when the face contour is corrected in the left / right symmetrical manner, the processor 210 can correct the contour of the entire face by reducing the contour of the lower jaw. In other words, the processor 210 can reduce and correct the contour of the face in the left / right horizontal direction and reduce the lower jaw portion in the upward direction (e.g., the upward direction arrow) perpendicular to the left / right horizontal direction .

제3 기준선(730)은 얼굴 영역의 좌, 우 대칭이 되도록 얼굴 영역의 위에서부터 아래 방향으로 선분을 그어 결정된 것일 수 있다. 즉, 프로세서(210)는 얼굴 영역의 기준 오브젝트들을 이용하여 얼굴 영역의 좌, 우 대칭이 되도록 제3 기준선(730)을 설정(결정)할 수 있다. 다양한 실시예들에 따른 프로세서(210)는 제3 기준선(730)을 기준으로 좌/우 수평 방향으로 얼굴 윤곽을 보정할 수 있다. 또한, 프로세서(210)는 좌/우 수평 방향으로 얼굴 윤곽을 축소 보정함과 동시에 좌/우 수평 방향의 보정 비율에 기반하여 상기 좌/우 수평 방향과 직각이 되는 상/하 방향의 보정 비율을 계산할 수 있다. 프로세서(210)는 좌/우 수평 방향으로 얼굴 윤곽을 축소 보정함과 동시에 상기 좌/우 수평 방향과 직각이 되는 위쪽 방향(예: 위쪽 방향 화살표)으로 턱 아래 부분을 축소 보정할 수 있다.The third reference line 730 may be determined by drawing a line segment from the top to the bottom of the face area so as to be symmetrical to the left and right of the face area. That is, the processor 210 may set (determine) the third reference line 730 so as to be symmetric with respect to the face area using the reference objects of the face area. The processor 210 according to various embodiments may correct the contour of the face in the left / right horizontal direction with respect to the third reference line 730. In addition, the processor 210 corrects the contour of the face in the left / right horizontal direction and corrects the correction ratio in the up / down direction perpendicular to the left / right horizontal direction based on the correction ratio in the left / Can be calculated. The processor 210 corrects the contour of the face in the left / right horizontal direction and corrects the lower jaw portion in an upward direction (e.g., an upward direction arrow) perpendicular to the left / right horizontal direction.

제4 기준선(740)은 얼굴 영역의 좌, 우 대칭이 되도록 얼굴 영역의 위에서부터 아래 방향으로 선분을 그어 결정된 것일 수 있다. 다양한 실시예들에 따른 프로세서(210)는 제4 기준선(740)과 수직이 되는 방향으로 좌, 우의 얼굴 윤곽을 보정할 수 있다. 이 경우, 프로세서(210)가 얼굴 윤곽을 보정할 경우, 좌, 우 대칭적으로 얼굴 윤곽이 보정될 수 있다. 또한, 프로세서(210)는 제4 기준선(740)과 수직이 되는 방향으로 얼굴 윤곽을 축소 보정함과 동시에 제4 기준선(740)과 수직이 되는 방향의 보정 비율에 기반하여 상/하 보정 비율을 계산할 수 있다. 프로세서(210)는 제4 기준선(740)과 수직이 되는 방향으로 얼굴 윤곽을 축소 보정함과 동시에 제4 기준선(740)과 동일한 기울기(또는 각도)의 위쪽 방향(예: 제4 기준선(740)과 동일한 각도의 위쪽 방향 화살표)으로 턱 아래 부분을 축소 보정할 수 있다.The fourth reference line 740 may be determined by drawing a line segment from the top to the bottom of the face area so as to be symmetrical to the left and right of the face area. The processor 210 according to various embodiments may correct left and right facial contours in a direction perpendicular to the fourth reference line 740. [ In this case, when the processor 210 corrects the facial contour, the facial contour may be corrected left and right symmetrically. In addition, the processor 210 corrects the contour of the face in the direction perpendicular to the fourth reference line 740 and corrects the upper / lower correction ratio based on the correction ratio in the direction perpendicular to the fourth reference line 740 Can be calculated. The processor 210 corrects the contour of the face in the direction perpendicular to the fourth reference line 740 and corrects the face contour in the upward direction (e.g., the fourth reference line 740) at the same slope (or angle) as the fourth reference line 740, And the lower jaw portion can be narrowed down by the upward direction arrow at the same angle as that of the lower jaw.

도 8은 다양한 실시예들에 따른 얼굴 영역별 보정 비율을 계산하는 일례를 도시한 도면이다.8 is a diagram illustrating an example of calculating a correction ratio for each face region according to various embodiments.

도 8을 참조하면, 전자 장치(201)(예: 프로세서(210))는 얼굴 영역(810)을 눈썹 및 눈을 포함하는 제1 영역(811), 코 및 입을 포함하는 제2 영역(813), 및 턱 부분을 포함하는 제3 영역(815)으로 분할할 수 있다. 이때, 전자 장치(201)(예: 프로세서(210))는 기준선(817)과 수직이 되는 수평 방향으로 얼굴 영역(810)을 분할함으로써, 얼굴 영역(810)이 좌, 우가 대칭적이 되도록 제1 영역(811), 제2 영역(813) 및 제3 영역(817)을 분할할 수 있다. 다양한 실시예들에 따른 프로세서(210)는 얼굴 전체적인 비율을 고려하여 얼굴의 윤곽을 축소하는 보정을 수행할 수 있다. 예를 들어, 프로세서(210)는 머리 부분에 대해서는 축소 보정을 하지 않기 때문에, 자연스런 보정을 위해 제1 영역(811)에 대해서는 아래 방향으로 완만하게 축소 보정되도록 제1 보정 비율(831)을 계산할 수 있다. 또한, 프로세서(210)는 눈 부분부터는 축소 보정했기 때문에 제2 영역(813)에 대해서는 일정한 축소 비율을 갖도록 제2 보정 비율(833)을 계산할 수 있다. 또한, 프로세서(210)는 턱 아래 부분에 대해서는 축소 보정하지 않기 대문에, 제3 영역(815)에 대해서는 아래 방향으로 완만하게 제3 보정 비율(835)을 계산할 수 있다 8, the electronic device 201 (e.g., processor 210) includes a face region 810 with a first region 811 including eyebrows and eyes, a second region 813 including noses and mouths, And a third region 815 including a jaw portion. At this time, the electronic device 201 (for example, the processor 210) divides the face area 810 in the horizontal direction perpendicular to the reference line 817, so that the face area 810 is divided into the first The region 811, the second region 813, and the third region 817 can be divided. The processor 210 according to various embodiments may perform correction to reduce the contour of the face in consideration of the overall face ratio. For example, since the processor 210 does not perform the reduction correction on the head portion, it is possible to calculate the first correction ratio 831 such that the first region 811 is smoothly reduced in the downward direction for natural correction have. In addition, the processor 210 can calculate the second correction ratio 833 so as to have a constant reduction ratio with respect to the second region 813 since the reduction processing is performed from the eye portion. In addition, the processor 210 can calculate the third correction ratio 835 gently in the downward direction with respect to the third region 815, since it does not perform the reduction correction on the lower jaw portion

단축 방향의 보정 그래프(830)를 참고하면, 0에 가까울수록 보정 비율이 높고, 1에 가까울수록 보정 비율이 낮은 것을 의미할 수 있다. 보정 비율이 높을수록 얼굴 윤곽을 많이 축소하게 되므로, 전체적인 얼굴 비율에 영향을 줄 수 있다. 이러한 점을 고려하여, 프로세서(210)는 0과 1 사이에 보정 비율의 최대값(예: 0.3)을 정하고, 1과 최대값 사이로 영역별 보정 비율을 계산할 수 있다. 프로세서(210)는 제1 영역(811) 및 제3 영역(815)에 대해서는 선형적으로 보정 비율을 계산할 수 있다. 즉, 프로세서(210)는 제1 영역(811)에 대한 제1 보정 비율(831), 제2 영역(813)에 대한 제2 보정 비율(833), 제3 영역(815)에 대한 제3 보정 비율(835)을 각각 다르게 결정할 수 있다. Referring to the correction curve 830 in the minor axis direction, it can be said that the closer to 0, the higher the correction ratio, and the closer to 1, the lower the correction rate. The higher the correction rate, the more the face contour is reduced, which can affect the overall face ratio. In light of this, the processor 210 may determine a maximum value (e.g., 0.3) of the correction ratio between 0 and 1, and calculate a correction ratio for each region between 1 and the maximum value. The processor 210 may calculate the correction ratio linearly for the first area 811 and the third area 815. [ That is, the processor 210 determines whether the first correction ratio 831 for the first area 811, the second correction ratio 833 for the second area 813, the third correction for the third area 815, The ratio 835 can be determined differently.

얼굴 윤곽에 대해 좌, 우로만 축소 보정하게 되면, 얼굴이 길어보일 수 있으므로, 프로세서(210)는 기준선(817)과 동일한 기울기로 얼굴 영역(810)을 아래쪽에서 위쪽 방향으로 축소 보정할 수 있다. 기준선(817)과 동일한 기울기의 축소 방향은 장축 방향일 수 있다. 다양한 실시예들에 따른 프로세서(210)는 사람의 얼굴이 타원형인 점을 고려하여 장축 방향의 보정 비율을 단축 방향 보정 비율의 0.2배로 설정할 수 있다. 예를 들어, 프로세서(210)는 단축 방향의 보정 그래프(830)를 참고하여 제1 보정 비율(831) 내지 제3 보정 비율(835)을 결정한 후, 제1 보정 비율(831) 내지 제3 보정 비율(835)에 0.2를 곱하여 장축 방향 보정 비율(예: 제4 영역(821), 제5 영역(825) 및 제6 영역(825))을 계산할 수 있다.The processor 210 may reduce the face area 810 from the lower side to the upper side with the same slope as the reference line 817 because the face may be seen to be long. The reduction direction of the same slope as the reference line 817 may be the major axis direction. The processor 210 according to various embodiments may set the correction ratio in the major axis direction to 0.2 times the minor axis correction ratio in consideration of the point that the face of the person is elliptical. For example, the processor 210 determines the first to third correction ratios 831 to 835 with reference to the correction curve 830 in the short axis direction, and then determines the first to third correction ratios 831 to 835, The fourth region 821, the fifth region 825, and the sixth region 825) by multiplying the ratio 835 by 0.2.

장축 방향의 보정 그래프(820)를 참고하면, 0에 가까울수록 보정 비율이 높고, 1에 가까울수록 보정 비율이 낮은 것을 의미할 수 있다. 프로세서(210)는 0과 1 사이에 보정 비율의 최대값(예: 0.3)을 정하고, 1과 최대값 사이로 영역별 보정 비율을 계산할 수 있다. 프로세서(210)는 얼굴 영역(810)의 위쪽 방향으로 갈수록 보정 비율이 작도록 하고, 아래 방향으로 갈수록 보정 비율을 크게 계산할 수 있다. 예를 들어, 프로세서(210)는 제4 영역(821) 및 제6 영역(825)에 대해서는 선형적으로 보정 비율을 계산할 수 있다. 프로세서(210)는 제1 영역(811)에 대한 제4 보정 비율(821), 제2 영역(813)에 대한 제5 보정 비율(823), 제3 영역(815)에 대한 제6 보정 비율(825)을 각각 다르게 결정할 수 있다. Referring to the correction graph 820 in the long axis direction, the closer to 0, the higher the correction ratio, and the closer to 1, the lower the correction rate. Processor 210 may determine a maximum value (e.g., 0.3) of the correction ratio between 0 and 1, and calculate a regional correction ratio between 1 and the maximum value. The processor 210 may make the correction ratio smaller toward the upper direction of the face area 810 and may calculate the correction rate higher toward the lower direction. For example, the processor 210 may calculate the correction ratio linearly for the fourth region 821 and the sixth region 825. [ The processor 210 determines a fourth correction ratio 821 for the first region 811, a fifth correction ratio 823 for the second region 813, and a sixth correction ratio 812 for the third region 815 825 may be determined differently.

도 9는 다양한 실시예들에 따른 눈 영역 보정 방법을 도시한 흐름도이다. 도 9의 흐름도는 도 4의 동작(409)을 상세히 설명한 것이다. 도 9의 동작은 도 5의 동작과 동시에 수행되거나, 도 5의 동작 이후 또는 이전에 수행될 수 있다.9 is a flow chart illustrating an eye area correction method in accordance with various embodiments. The flowchart of FIG. 9 details operation 409 of FIG. The operation of FIG. 9 may be performed simultaneously with the operation of FIG. 5, or may be performed after or before the operation of FIG.

도 9를 참조하면, 동작(901)에서, 전자 장치(201)(예: 프로세서(210))는 눈의 타원 영역을 결정할 수 있다. 사람의 얼굴에서 눈은 두 개가 나란히(예: 수평적으로) 위치할 수 있다. 이러한 점을 고려하여, 프로세서(210)는 얼굴 영역에 포함된 특징점들을 이용하여 내 나란히 위치하는 두 개의 영역을 각각 타원 영역으로 형성할 수 있다. 9, at operation 901, electronic device 201 (e.g., processor 210) may determine an elliptical region of the eye. In the face of a person, two eyes can be placed side by side (eg, horizontally). In consideration of this point, the processor 210 may form two elliptical regions, each of which is positioned in parallel with the feature points included in the face region.

동작(903)에서, 전자 장치(201)(예: 프로세서(210))는 타원 영역의 장축을 잇는 기준선을 설정할 수 있다. 여기서, 상기 장축은 타원의 양 끝점을 잇는 선분 중에서 긴 축에 해당하는 것으로, 예를 들어, 정면에서 사람의 눈을 바라봤을 때, 눈의 중앙점을 지나는 수평선을 의미할 수 있다. At operation 903, the electronic device 201 (e.g., processor 210) may establish a reference line connecting the major axis of the elliptical region. Here, the long axis corresponds to a long axis among the line segments connecting the two end points of the ellipse. For example, the long axis may mean a horizontal line passing through the center point of the eye when the human eye is viewed from the front.

동작(905)에서, 전자 장치(201)(예: 프로세서(210))는 상기 설정된 기준선의 기울기를 판단할 수 있다. 만약, 이미지 내에 사람의 얼굴이 지평선과 직각이 되는 수직 방향에 배치되는 경우, 눈의 수평선을 의미하는 상기 기준선의 기울기가 검출되지 않을 수 있다. 그러나, 이미지 내에 사람의 얼굴이 왼쪽 또는 오른쪽으로 기울어져(치우쳐져) 있는 경우, 눈의 수평선도 기울어지기 때문에, 상기 기준선의 기울기가 검출될 수 있다. 프로세서(210)는 상기 기준선의 기울기가 상기 수평선을 기준으로 일정한 각도를 갖고 있는 경우, 기울기를 검출할 수 있다. 프로세서(210)는 상기 기준선의 기울기에 해당하는 회전 각도를 검출할 수 있다.At operation 905, the electronic device 201 (e.g., processor 210) may determine the slope of the set baseline. If the face of the person is placed in the vertical direction perpendicular to the horizon, the slope of the reference line, which means the horizontal line of the eye, may not be detected. However, when the face of a person is inclined leftward or rightward (biased) in the image, the slope of the reference line can be detected because the horizontal line of the eye is also inclined. The processor 210 may detect a slope when the slope of the reference line has a predetermined angle with respect to the horizontal line. The processor 210 may detect a rotation angle corresponding to the slope of the reference line.

동작(907)에서, 전자 장치(201)(예: 프로세서(210))는 상기 기준선 기울기에 따라 확대 비율을 계산할 수 있다. 눈 보정은 눈의 영역을 확대 보정하는 것을 의미할 수 있다. 프로세서(210)는 눈의 기울기를 고려하여 눈의 영역 확대 방향을 결정하고, 확대 방향에 따른 확대 비율을 계산할 수 있다. 종래에는 사람의 얼굴이 한쪽으로 기울어져, 눈의 방향도 한쪽으로 기울어졌음에도 불구하고, 지평선을 기준으로 눈의 영역을 보정함으로써, 눈의 확대 보정이 부자연스러워 보인다는 단점이 있었다. 즉, 종래에는 눈의 기울어진 방향과 상관없이 눈을 확대 보정함으로써, 실제 눈의 위치와 보정된 눈의 위치에 차이가 있을 수 있다. 프로세서(210)는 상기 기준선의 기울기에 따라 눈에 해당하는 타원 영역에 서로 다른 확대 비율을 적용할 수 있다.At operation 907, the electronic device 201 (e.g., processor 210) may calculate the magnification ratio according to the baseline slope. The eye correction may mean enlarging and correcting the area of the eye. The processor 210 can determine the enlargement direction of the eye region in consideration of the inclination of the eye and calculate the enlargement ratio according to the enlargement direction. Conventionally, even though the face of the person is inclined to one side and the direction of the eyes is also inclined to one side, there is a disadvantage that the enlargement correction of the eyes looks unnatural by correcting the area of the eyes based on the horizon. That is, conventionally, there is a difference between the position of the actual eye and the position of the corrected eye by enlarging and correcting the eye irrespective of the tilted direction of the eye. The processor 210 may apply different magnification ratios to the elliptical region corresponding to the eyes according to the slope of the reference line.

다양한 실시예들에 따른 프로세서(210)는 눈동자(pupil)(또는 검은 눈동자(dark brown eyes))의 크기, 기울기 방향, 또는 위치 중 적어도 하나에 기반하여 확대 비율을 계산할 수 있다. 상기 타원 영역에는 눈의 바탕(또는 배경)에 해당하는 흰색 부분과 눈의 중심에 해당하는 눈동자가 포함될 수 있다. 여기서, 상기 타원 영역은 눈의 바탕에 해당하는 흰색 영역을 의미할 수 있다. 눈의 타원 영역(예: 흰색 부분)을 기준으로 눈을 확대 보정할 경우, 눈동자의 크기, 기울기 방향 또는 위치 중 적어도 하나가 부자연스럽게 보정될 수 있다. 이에, 프로세서(210)는 눈의 타원 영역 내 눈동자의 크기, 기울기 방향, 또는 위치 중 적어도 하나에 기반하여 눈동자 영역의 확대 비율을 계산하고, 계산된 확대 비율을 눈동자 영역을 확대하는데 적용할 수 있다. 참고로, 눈은 타원형인데 반하여, 눈동자는 원형이므로, 눈의 전체 영역(예: 타원 영역 및 눈동자 영역)에 대하여 동일한 비율로 확대 적용할 경우 눈동자가 부자연스러워 보일 수 있다. 다양한 실시예들에 따른 프로세서(210)는 눈동자 영역의 확대 비율과 타원 영역(예: 흰색 부분)의 확대 비율을 다르게 계산할 수 있다. 프로세서(210)는 기준선의 기울기, 눈동자의 크기 및 눈동자의 위치에 기반하여 눈동자 영역의 확대 비율을 계산할 수 있다. 프로세서(210)는 기준선의 기울기 및 타원 영역의 크기에 기반하여 타원 영역의 확대 비율을 계산할 수 있다. The processor 210 according to various embodiments may calculate the magnification ratio based on at least one of a magnitude, a gradient direction, or a position of a pupil (or dark brown eyes). The ellipse region may include a white portion corresponding to the background of the eye and a pupil corresponding to the center of the eye. Here, the elliptical region may mean a white region corresponding to the background of the eye. When the eye is enlarged and corrected based on the elliptical region (e.g., a white portion) of the eye, at least one of the size, tilt direction, or position of the pupil can be unnaturally corrected. Thus, the processor 210 may calculate the magnification ratio of the pupil region based on at least one of the magnitude, slope direction, or position of the pupil in the elliptical region of the eye, and apply the magnification ratio to enlarge the pupil region . For reference, the eye is oval, whereas the pupil is circular, so the pupil may look unnatural when the entire area of the eye (for example, the elliptical region and the pupil region) is enlarged at the same ratio. The processor 210 according to various embodiments may calculate the enlargement ratio of the pupil area and the enlargement ratio of the ellipse area (e.g., white part) differently. The processor 210 may calculate the enlargement ratio of the pupil area based on the slope of the reference line, the size of the pupil, and the position of the pupil. The processor 210 may calculate the enlargement ratio of the elliptical region based on the slope of the reference line and the size of the elliptical region.

동작(909)에서, 전자 장치(201)(예: 프로세서(210))는 상기 계산된 확대 비율에 기반하여 타원 영역을 확대할 수 있다. 프로세서(210)는 타원 영역의 경계로부터 일정한 확대 비율로 타원 영역이 커지도록 보정할 수 있다. 또한, 프로세서(210)는 눈동자 영역의 경계로부터 일정한 확대 비율로 눈동자 영역이 커지도록 보정할 수 있다. 예를 들어, 프로세서(210)는 타원 영역을 확대할 경우, 타원 영역의 외부 픽셀(예: 피부 영역)을 상기 타원 영역에 포함된 픽셀(예: 흰자 영역)로 채울 수 있다. 또는, 프로세서(210)는 눈동자 영역을 확대할 경우, 상기 타원 영역에 포함된 픽셀(예: 흰자 영역)을 눈동자 영역에 포함된 픽셀(예: 검은색, 갈색, 초록색, 파란색)로 채울 수 있다. At operation 909, the electronic device 201 (e.g., processor 210) may magnify the elliptical region based on the calculated magnification ratio. The processor 210 can correct the elliptical area to be larger at a constant enlargement ratio from the boundary of the elliptical area. In addition, the processor 210 can correct the pupil area so that the pupil area is enlarged at a constant enlargement ratio from the boundary of the pupil area. For example, processor 210 may fill an elliptical region of an external pixel (e.g., a skin region) with pixels (e.g., an egg white region) included in the elliptical region when enlarging the elliptical region. Alternatively, when enlarging the pupil region, the processor 210 may fill the pixels (e.g., the whiten region) included in the ellipse region with pixels (e.g., black, brown, green, or blue) included in the pupil region .

다양한 실시예들에 따른 프로세서(210)는 타원 영역에 대한 확대 비율과 눈동자 영역에 대한 확대 비율을 서로 다르게 적용하여 눈 오브젝트를 보정할 수 있다. 프로세서(210)는 눈동자의 크기, 기울기 방향, 또는 위치 중 적어도 하나에 기반하여 눈동자 영역을 확대할 수 있다. 예를 들어, 눈동자가 타원 영역에서 왼쪽 또는 오른쪽으로 치우쳐 있는 경우, 프로세서(210)는 치우친 방향(예: 기울기 방향)을 기준으로 눈동자 영역을 확대할 수 있다.The processor 210 according to various embodiments may correct the eye object by applying different magnification ratios to the elliptical region and the pupil region. The processor 210 may magnify the pupil region based on at least one of a size, a gradient direction, or a position of the pupil. For example, if the pupil is biased left or right in the ellipse region, the processor 210 may magnify the pupil region with respect to the biased direction (e.g., tilting direction).

다양한 실시예들에 따른 프로세서(210)는 눈동자의 위치에 기반하여 눈동자 영역이 항상 타원 영역 중앙에 위치하도록 눈동자 영역을 보정할 수 있다. 눈을 확대 보정할 경우, 눈의 흰색 부분도 커지지만, 눈동자도 커지게 될 수 있다. 프로세서(210)는 눈동자의 위치가 항상 중앙에 위치하도록 함으로써, 사용자의 눈이 정면을 향하도록 눈을 보정할 수 있다.The processor 210 in accordance with various embodiments may correct the pupil region so that the pupil region is always centered in the ellipse region, based on the location of the pupil. When the eye is enlarged and corrected, the white portion of the eye also becomes large, but the pupil can also become large. The processor 210 can always correct the eyes such that the eyes of the user are directed to the front by allowing the position of the eyes to always be located at the center.

도 10a 내지 도 10c는 다양한 실시예들에 따른 기준선 기울기에 기반하여 눈 영역을 보정하는 일례를 도시한 도면들이다.FIGS. 10A through 10C are diagrams illustrating an example of correcting an eye region based on a baseline slope in accordance with various embodiments.

도 10a는 종래기술에 따라 기준선 기울기에 상관없이 눈 영역을 보정하는 일례를 도시한 도면이다. 10A is a diagram showing an example of correcting the eye region regardless of the slope of the reference line according to the related art.

도 10a를 참조하면, 얼굴 영역 상에 눈 영역(1010)은 기준선(1018)을 기준으로 일정 각도를 가지도록 기울어진 상태일 수 있다. 종래에는 얼굴 영역 내에 추출된 특징점들 중에서 제1 특징점(1011), 제2 특징점(1012), 제3 특징점(1013), 또는 제4 특징점(1014)을 이용하여 실제 눈의 타원 영역(1015)을 형성할 수 있다. 또한, 종래에는 실제 눈의 타원 영역(1015) 내에 포함된 중심점(1017)을 기준으로 지평선과 평행이 되는 선을 눈의 기준선(1018)으로 결정할 수 있다. 이 결과, 눈 보정에 이용되는 눈의 타원 영역(1015-1)은 기준선(1018)을 기준으로 특징점과 무관하게 결정될 수 있다. 즉, 종래에는 실제 눈의 타원 영역(1015)의 제2 특징점(1012) 및 제4 특징점(1014)을 연결한 선을 기준선으로 설정하지 않고, 눈의 중심점(1017)을 지나는 평행선을 기준선(1018)으로 설정함으로써, 눈의 기울기를 고려하지 않고 눈을 확대 보정할 수 있다. Referring to FIG. 10A, the eye region 1010 may be inclined at an angle with respect to the reference line 1018 on the face region. Conventionally, the elliptical region 1015 of the actual eye is extracted using the first feature point 1011, the second feature point 1012, the third feature point 1013, or the fourth feature point 1014 among the extracted feature points in the face region. . Further, conventionally, a line that is parallel to the horizon line with respect to the center point 1017 included in the elliptical region 1015 of the actual eye can be determined as the reference line 1018 of the eye. As a result, the ellipse region 1015-1 of the eye used for eye correction can be determined on the basis of the reference line 1018 regardless of the feature point. That is, conventionally, a line connecting the second feature point 1012 and the fourth feature point 1014 of the actual eye ellipse region 1015 is not set as a reference line, and a parallel line passing through the eye center point 1017 is set as a reference line 1018 ), It is possible to enlarge and correct the eyes without considering the inclination of the eyes.

이 결과, 종래에는 눈의 중심점(1017) 및 기준선(1018)을 기준으로 눈의 타원 영역(1015-1)에 확대 비율을 적용하면, 확대된 타원 영역(1015-2)을 얻을 수 있다. 확대 비율 그래프(1020)를 참고하면, 눈의 타원 영역(1015-1)에 일정한 확대 비율(1023)을 적용하고, 눈의 타원 영역(1015-1)의 장축 양끝에서부터 완만한 확대 비율(1021, 1025)을 적용할 수 있다. 그 결과, 확대된 타원 영역(1015-2)은 실제 눈의 영역(1015)과는 그 위치나 모양에서 차이가 있을 수 있다. 또한, 확대된 눈동자 영역(1016-1)은 실제 눈의 눈동자 영역(1016)과는 그 위치나 모양에 차이가 있을 수 있다.As a result, an enlarged elliptical area 1015-2 can be obtained by applying the enlargement ratio to the elliptical area 1015-1 of the eye based on the center point 1017 and the reference line 1018 of the eye. Referring to the enlargement ratio graph 1020, a constant enlargement ratio 1023 is applied to the elliptical region 1015-1 of the eye, and smooth enlargement ratios 1021, 1025) can be applied. As a result, the enlarged elliptical region 1015-2 may be different from the actual eye region 1015 in its position and shape. In addition, the enlarged pupil region 1016-1 may differ from the actual pupil region 1016 in its position and shape.

도 10b는 본 발명에 따라 눈에 기울기가 없을 때 눈 영역을 보정하는 일례를 도시한 것일 수 있다.FIG. 10B shows an example of correcting the eye region when there is no inclination of the eyes according to the present invention.

도 10b를 참조하면, 전자 장치(201)(예: 프로세서(210))는 얼굴 영역 내에 추출된 특징점들 중에서 제1 특징점(1031), 제2 특징점(1032), 제3 특징점(1033), 또는 제4 특징점(1034)을 이용하여 눈 오브젝트(1030)를 검출할 수 있다. 프로세서(210)는 제1 특징점(1031), 제2 특징점(1032), 제3 특징점(1033), 또는 제4 특징점(1034)을 이용하여 눈 오브젝트(1030)에 해당하는 타원 영역(1035)을 형성할 수 있다. 프로세서(210)는 제2 특징점(1032)과 제4 특징점(1034)을 선으로 이어 타원 영역(1035)의 장축을 잇는 기준선(1038)을 설정할 수 있다. 예를 들어, 프로세서(210)는 하나의 특징점(예: 제2 특징점(1032))에서 중앙점(1037)을 지나 다른 하나의 특징점(예: 제4 특징점(1034))으로 이어지는 선을 기준선(1038)으로 결정할 수 있다. 10B, the electronic device 201 (e.g., the processor 210) may include a first feature point 1031, a second feature point 1032, a third feature point 1033, The eye object 1030 can be detected using the fourth feature point 1034. [ The processor 210 uses the first feature point 1031, the second feature point 1032, the third feature point 1033 or the fourth feature point 1034 to calculate the elliptical region 1035 corresponding to the eye object 1030 . The processor 210 may set the reference line 1038 connecting the second feature point 1032 and the fourth feature point 1034 to the long axis of the elliptical region 1035 with a line. For example, the processor 210 may convert a line from one feature point (e.g., second feature point 1032) past the midpoint 1037 to another feature point (e.g., the fourth feature point 1034) 1038).

프로세서(210)는 기준선(1038)이 지평선과 평행한지 여부에 기반하여 기준선(1038)의 기울기를 판단할 수 있다. 프로세서(210)는 기준선(1038)에서 기울기가 검출되지 않으면, 눈 영역이 지평선과 평행하다고 판단하고 타원 영역(1035)을 보정할 수 있다. 예를 들어, 확대 비율 그래프(1040)를 참고하면, 프로세서(210)는 타원 영역(1035)에 일정한 확대 비율(1043)을 적용하고, 타원 영역(1035)의 장축 양끝에서부터 완만한 확대 비율(1041, 1045)을 적용할 수 있다. 그 결과, 확대된 타원 영역(1035-2)은 실제 눈의 타원 영역(1035)과는 그 위치나 모양이 유사하고 크기만 크게 보정될 수 있다. 또한, 프로세서(210)는 타원 영역(1035)에 포함된 눈동자 영역(1036)에 일정한 확대 비율(1043)을 적용할 수 있다. 이 경우, 확대된 눈동자 영역(1036-1)은 실제 눈의 눈동자 영역(1036)과는 그 위치나 모양이 유사하고, 크기만 크게 보정될 수 있다.The processor 210 may determine the slope of the reference line 1038 based on whether the reference line 1038 is parallel to the horizon. The processor 210 may determine that the eye region is parallel to the horizon and correct the elliptical region 1035 if no tilt is detected at the reference line 1038. [ For example, referring to the enlargement ratio graph 1040, the processor 210 applies a constant enlargement ratio 1043 to the elliptical region 1035 and calculates a smooth enlargement ratio 1041 from the both ends of the long axis of the elliptical region 1035 , 1045) can be applied. As a result, the enlarged elliptical region 1035-2 is similar in position and shape to the elliptical region 1035 of the actual eye, and can be largely corrected in size. In addition, the processor 210 may apply a constant magnification ratio 1043 to the pupil region 1036 included in the elliptical region 1035. In this case, the enlarged pupil region 1036-1 is similar in position and shape to the pupil region 1036 of the actual eye, and can be largely corrected only in size.

도 10c는 본 발명에 따라 눈에 기울기가 있을 때 눈 영역을 보정하는 일례를 도시한 것일 수 있다.FIG. 10C shows an example of correcting the eye region when there is an inclination of the eye according to the present invention.

도 10c를 참조하면, 전자 장치(201)(예: 프로세서(210))는 얼굴 영역 내에 추출된 특징점들 중에서 제1 특징점(1051), 제2 특징점(1052), 제3 특징점(1053), 또는 제4 특징점(1054)을 이용하여 눈 오브젝트(1050)를 검출할 수 있다. 프로세서(210)는 제1 특징점(1051), 제2 특징점(1052), 제3 특징점(1053), 또는 제4 특징점(1054)을 이용하여 눈 오브젝트(1050)에 해당하는 타원 영역(1055)을 형성할 수 있다. 프로세서(210)는 제2 특징점(1052)과 제4 특징점(1054)을 선으로 이어 타원 영역(1055)의 장축을 잇는 기준선(1058)을 설정할 수 있다. 예를 들어, 프로세서(210)는 하나의 특징점(예: 제2 특징점(1052))에서 중앙점(1057)을 지나 다른 하나의 특징점(예: 제4 특징점(1054))으로 이어지는 선을 기준선(1058)으로 결정할 수 있다. 10C, the electronic device 201 (e.g., the processor 210) may include a first feature point 1051, a second feature point 1052, a third feature point 1053, The eye object 1050 can be detected using the fourth feature point 1054. [ The processor 210 uses the first feature point 1051, the second feature point 1052, the third feature point 1053 or the fourth feature point 1054 to calculate the elliptical region 1055 corresponding to the eye object 1050 . The processor 210 can set a reference line 1058 connecting the second feature point 1052 and the fourth feature point 1054 to the long axis of the elliptical region 1055 with a line. For example, the processor 210 may generate a line extending from a feature point (e.g., second feature point 1052) through a central point 1057 to another feature point (e.g., fourth feature point 1054) 1058).

프로세서(210)는 기준선(1058)이 지평선과 평행한지 여부에 기반하여 기준선(1058)의 기울기를 판단할 수 있다. 프로세서(210)는 기준선(1058)에서 기울기가 검출되면, 기준선(1058)의 기울기에 기반하여 타원 영역(1055)을 보정할 수 있다. 예를 들어, 확대 비율 그래프(1060)를 참고하면, 프로세서(210)는 기준선(1058)의 기울기에 대응하는 타원 영역(1055)에 일정한 확대 비율(1063)을 적용하고, 타원 영역(1055)의 장축 양끝에서부터 완만한 확대 비율(1061, 1065)을 적용할 수 있다. 그 결과, 확대된 타원 영역(1055-2)은 실제 눈의 타원 영역(1055)과는 그 위치나 모양이 유사하고 크기만 크게 보정될 수 있다. 또한, 프로세서(210)는 타원 영역(1055)에 포함된 눈동자 영역(1056)에 일정한 확대 비율(1053)을 적용할 수 있다. 이 경우, 확대된 눈동자 영역(1056-1)은 실제 눈의 눈동자 영역(1056)과는 그 위치나 모양이 유사하고, 크기만 크게 보정될 수 있다.The processor 210 may determine the slope of the reference line 1058 based on whether the reference line 1058 is parallel to the horizon. The processor 210 may correct the elliptical region 1055 based on the slope of the reference line 1058 when a tilt is detected at the reference line 1058. [ For example, referring to the magnification ratio graph 1060, the processor 210 applies a constant magnification ratio 1063 to the elliptical region 1055 corresponding to the slope of the reference line 1058, Gentle expansion ratios 1061 and 1065 can be applied from both ends of the major axis. As a result, the enlarged elliptical region 1055-2 is similar in position and shape to the elliptical region 1055 of the actual eye, and can be largely corrected only in size. The processor 210 may also apply a constant magnification ratio 1053 to the pupil region 1056 included in the elliptical region 1055. [ In this case, the enlarged pupil region 1056-1 is similar in position and shape to the pupil region 1056 of the actual eye, and can be largely corrected only in size.

도 10a 및 도 10c를 비교해 보면, 실제 눈의 타원 영역과 보정된 눈의 타원 영역의 위치, 모양 또는 크기가 차이가 있는 것을 알 수 있다.10A and 10C, it can be seen that there is a difference in position, shape, or size between the elliptical region of the actual eye and the elliptical region of the corrected eye.

도 11은 다양한 실시예들에 따른 가이드 마스크를 이용한 보정 영역 검출 방법을 도시한 흐름도이다. 도 11의 흐름도는 도 5 및 도 9의 동작 이전에 수행될 수 있다. 11 is a flowchart illustrating a correction area detection method using a guide mask according to various embodiments. The flowchart of Fig. 11 can be performed before the operations of Figs. 5 and 9. Fig.

도 11을 참조하면, 동작(1101)에서, 전자 장치(201)(예: 프로세서(210))는 적어도 하나의 가이드 마스크를 생성할 수 있다. 예를 들어, 프로세서(210)는 얼굴 영역 내 특징점을 이용하여 오브젝트를 검출하기 위한 오브젝트 가이드 마스크를 생성할 수 있다. 프로세서(210)는 얼굴 영역 내 특징점을 이용하여 얼굴 형상을 검출하기 위한 형상 가이드 마스크를 생성할 수 있다. 프로세서(210)는 얼굴 영역 내 특징점을 이용하여 주변 영역과 구별되는 영역을 검출하기 위한 엣지 가이드 마스크를 생성할 수 있다. 프로세서(210)는 이미지를 구성하는 색상 정보에 기반하여 이미지의 배경을 검출하기 위한 배경 가이드 마스크를 생성할 수 있다. 프로세서(210)는 얼굴의 피부에 해당하는 색상 정보에 기반하여 얼굴 영역 내 피부를 검출하기 위한 피부 가이드 마스크를 생성할 수 있다. 이 밖에도, 프로세서(210)는 다양한 검출 기법을 이용하여 다양한 가이드 마스크를 생성할 수 있다.Referring to FIG. 11, at operation 1101, electronic device 201 (e.g., processor 210) may generate at least one guide mask. For example, the processor 210 may generate an object guide mask for detecting an object using feature points in the face region. The processor 210 may generate a shape guide mask for detecting a face shape using feature points in the face region. The processor 210 may generate an edge guide mask for detecting an area distinguished from the surrounding area by using the feature points in the face area. The processor 210 may generate a background guide mask for detecting the background of the image based on the color information constituting the image. The processor 210 may generate a skin guide mask for detecting skin in the face region based on color information corresponding to the skin of the face. In addition, the processor 210 may generate various guide masks using various detection techniques.

동작(1103)에서, 전자 장치(201)(예: 프로세서(210))는 보정 타입을 결정할 수 있다. 상기 보정 타입은 보정할 이미지의 속성이 무엇인지 또는 보정 속성이 무엇인지에 따라 결정될 수 있다. 예를 들어, 동작(401)에서 획득한 이미지가 전자 장치(201)의 카메라 모듈(예: 카메라 모듈(291))로부터 실시간으로 획득되는 프리뷰 이미지인지, 이미 촬영되어 메모리(예: 메모리(230))에 저장된 이미지인지에 따라 보정 타입이 결정될 수 있다. 또한, 사용자가 이미지 보정 요청 시, 보정을 원하는 속성을 무엇으로 선택했는지 여부에 따라 다를 수 있다. 예를 들어, 사용자가 '밝기'를 위주로 이미지를 보정할 것으로 선택했는지, '색상 반전(예: 흑백, 갈색)'을 위주로 이미지를 보정할 것을 선택했는지, 또는 '색상 변경(예: 푸른색 계열, 따뜻한 계열)'을 위주로 이미지를 보정할 것인지 선택했는지 여부에 따라 다를 수 있다.At operation 1103, the electronic device 201 (e.g., processor 210) may determine the type of correction. The correction type may be determined depending on what is the attribute of the image to be corrected or what the correction attribute is. For example, if the image acquired in operation 401 is a preview image obtained in real time from a camera module (e.g., camera module 291) of electronic device 201, The correction type can be determined according to whether the image is stored in the memory unit. In addition, when the user requests the image correction, it may be different depending on what the attribute that is desired to be corrected is selected. For example, if you choose to compensate the image for 'brightness', choose to compensate the image for 'color reversal' (eg, black and white, brown) , Warm series) ', depending on whether or not the image is corrected.

동작(1105)에서, 전자 장치(201)(예: 프로세서(210))는 보정 타입에 기반하여 가이드 마스크의 조합 법칙을 결정(또는 설정)할 수 있다. 예를 들어, 프로세서(210)는 보정 타입에 따라 동작(1101)에서 생성된 다섯 가지의 가이드 마스크를 이용하여 각 픽셀별 서로 다른 보정값을 가지도록 결정할 수 있다. 예를 들어, 이미지 내 각 픽셀값은 '0 ~ 1' 사이의 값을 가질 수 있고, 프로세서(210)는 복수의 가이드 마스크들을 이미지에 적용할 경우, 가이드 마스크별로 각각 다른 값이 검출될 수 있다. 프로세서(210)는 이미지에 가이드 마스크를 적용하여, 검출된 값이 '1'에 가까운 영역(예: 픽셀)에 대해서는 보정 영역으로 판단(또는 검출)하고, 검출된 값이 '0'에 가까운 영역에 대해서는 보정 영역으로 판단하지 않을 수 있다. 여기서, 보정 영역으로 판단하지 않는다는 것은 해당 영역에 대해서는 보정하지 않고, 원본 그대로 유지하는 것을 의미할 수 있다. At operation 1105, the electronic device 201 (e.g., processor 210) may determine (or set) the combination law of the guide mask based on the correction type. For example, the processor 210 may determine to have different correction values for each pixel using the five guide masks generated in operation 1101 according to the correction type. For example, each pixel value in an image may have a value between 0 and 1, and when the processor 210 applies a plurality of guide masks to an image, a different value may be detected for each guide mask . The processor 210 applies a guide mask to an image to determine (or detect) a detected region as a correction region for a region (e.g., a pixel) close to '1' It may not be judged as a correction region. Here, not judging as the correction region means that the region is not corrected but remains as it is in the original.

예를 들어, 사용자가 이미 촬영된 이미지에 대하여 보정을 요청한 경우(이하, '캡쳐 이미지 보정'), 프로세서(210)는 배경 가이드 마스크, 피부 가이드 마스크, 오브젝트가이드 마스크를 적용하여 각 픽셀에 대한 값을 검출할 수 있다. 이미지에서 사람의 얼굴 영역은 피부 색상에 가까우므로, 피부 가이드 마스크의 값은 '1'에 가까운 값을 가진다. 반대로 배경 가이드 마스크의 값은 '0'에 가까운 값을 가진다. 즉, 동일한 영역(예: 피부 영역)에 대해서 어떤 가이드 마스크를 적용하느냐에 따라 서로 다른 값이 검출될 수 있다. 프로세서(210)은 배경 가이드 마스크와 피부 가이드 마스크의 차이를 이용하여 보정 마스크 값을 정의한다. 예를 들어, 프로세서(210)는 상기 배경 가이드 마스크를 적용한 값(예: 0.3)이 제2 임계치(예: 0.3) 이하이고, 상기 피부 가이드 마스크를 적용한 값(예: 0.9)이 제1 임계치(예: 0.7)를 초과한 이미지 내 영역에 대해서는 보정 영역으로 판단할 수 있다. 상기 보정 영역으로 판단된 피부 영역에 대해서는 보정 마스크의 값이 '1.0'이 되어, 프로세서(210)가 피부 영역을 보정할 수 있다. For example, when a user requests correction for an image that has already been captured (hereinafter referred to as 'captured image correction'), the processor 210 applies a background guide mask, a skin guide mask, Can be detected. Since the human face region is close to the skin color in the image, the value of the skin guide mask has a value close to " 1 ". In contrast, the value of the background guide mask has a value close to '0'. That is, different values can be detected depending on which guide mask is applied to the same area (e.g., skin area). The processor 210 defines a correction mask value using the difference between the background guide mask and the skin guide mask. For example, the processor 210 may determine that the value (e.g., 0.3) to which the background guide mask is applied is less than or equal to a second threshold value (e.g., 0.3) For example, 0.7), it can be determined as a correction region. The value of the correction mask is set to '1.0' for the skin region determined as the correction region, and the processor 210 can correct the skin region.

여기서, 각 가이드 마스크를 적용한 값 또는 임계치는 이미지에 따라 달라질 수 있고, 조절 가능할 수 있다. 각 가이드 마스크를 적용한 값 또는 임계치에 대해 기재한 수치는 발명의 이해를 돕기 위해 기재하였을 뿐, 기재된 수치로 인해 발명이 제한되는 것은 아니다.Here, the value or the threshold value to which each guide mask is applied may vary depending on the image, and may be adjustable. The numerical values or threshold values applied with the respective guide masks are described for the purpose of helping understanding of the invention, but the invention is not limited by the numerical values described.

또한, 프로세서(210)는 오브젝트 가이드 마스크를 적용하여 눈, 눈썹, 입술 등의 영역에 대하여 각각 다른 값을 갖도록 제한 할 수 있다. 상기 피부 가이드 마스크와 배경 가이드 마스크를 이용하여 정의한 보정 마스크의 값에 대해서 오브젝트 가이드 마스크를 적용하여 재정의 한다. 프로세서(210)는 촬영된 이미지에 대하여 보정할 때는 눈썹 영역에 대한 값을 '0'으로 결정(또는 제한)할 수 있다. 이 경우, 눈썹 영역에 대한 보정 마스크의 값이 '0'이 되어, 프로세서(210)가 눈썹 영역에 대해서는 보정하지 않을 수 있다. 또한, 프로세서(210)는 촬영된 이미지에 대하여 보정할 때는 입술 영역에 대한 보정 마스크의 값을 '0.35'로 결정(또는 제한)할 수 있다. 입술 영역에 대한 보정값을 '0.35' 이상을 갖도록 결정(제한)할 수 있다. 이 경우, 프로세서(210)는 입술 영역에 대해서 조금(예: 0.35 만큼) 보정할 수 있다. In addition, the processor 210 may apply an object guide mask so as to have different values for areas such as eyes, eyebrows, and lips. The object guide mask is applied to the values of the correction mask defined using the skin guide mask and the background guide mask to redefine them. The processor 210 may determine (or limit) the value for the eyebrow area to '0' when correcting for the photographed image. In this case, the value of the correction mask for the eyebrow area becomes '0', and the processor 210 may not correct the eyebrow area. In addition, the processor 210 may determine (or limit) the value of the correction mask for the lip region to 0.35 when correcting for the photographed image. It is possible to determine (limit) the correction value for the lip region to have a value of 0.35 or more. In this case, the processor 210 can correct a little (e.g., by 0.35) for the lip region.

또한, 사용자가 프리뷰 이미지에 대하여 보정을 요청한 경우(이하, '프리뷰 이미지 보정'), 프로세서(210)는 피부 가이드 마스크, 형상 가이드 마스크, 엣지 가이드 마스크, 오브젝트 가이드 마스크를 적용하여 각 픽셀에 대한 값을 검출할 수 있다. 프로세서(210)는 피부 가이드 마스크를 기본으로 하여, 형상 가이드 마스크를 적용한 값 이하의 값을 갖도록 제한 할 수 있다. 또한, 프로세서(210)는 상기 이미지 내 얼굴 영역에 엣지 가이드 마스크를 적용하여, 엣지(예: 경계 부분, 윤곽선) 영역에 해당하는 값을 검출할 수 있다. 프로세서(210)는 검출된 값(예: 0.9)이 제3 임계치(예: 0.4) 이상이면, 상기 엣지 영역에 해당하는 값을 '0.35'으로 결정(제한)할 수 있다. 이 경우, 엣지 영역에 해당하는 보정 마스크의 값은 '0.35'가 되어, 프로세서(210)는 엣지 영역에 대해서 조금(예: 0.35 만큼) 보정할 수 있다. 또한, 프로세서(210)는 상기 얼굴 영역에 오브젝트 가이드 마스크를 적용하여 눈 및 눈썹 영역에 해당하는 값을 검출하고, 검출된 값을 '0.35'이하로 결정(또는 제한)하고, 코 및 입 영역에 해당하는 값을 검출하고, 검출된 값을 '0.5' 이하로 결정(제한)할 수 있다. When the user requests the correction of the preview image (hereinafter referred to as 'preview image correction'), the processor 210 applies a skin guide mask, a shape guide mask, an edge guide mask, and an object guide mask to obtain values Can be detected. The processor 210 may limit, based on the skin guide mask, a value that is less than or equal to the value to which the shape guide mask is applied. In addition, the processor 210 may detect a value corresponding to an edge (e.g., boundary portion, contour) region by applying an edge guide mask to the face region in the image. The processor 210 may determine (limit) a value corresponding to the edge region to 0.35 if the detected value (e.g., 0.9) is equal to or greater than the third threshold (e.g., 0.4). In this case, the value of the correction mask corresponding to the edge area becomes 0.35, and the processor 210 can correct a bit (e.g., 0.35) of the edge area. In addition, the processor 210 detects a value corresponding to the eye and eyebrow area by applying an object guide mask to the face area, determines (or restricts) the detected value to be 0.35 or less, The corresponding value can be detected, and the detected value can be determined (limited) to be less than or equal to '0.5'.

또한, 사용자가 이미지의 밝기 보정을 요청한 경우(이하, '밝기 보정'), 프로세서(210)는 배경 가이드 마스크, 피부 가이드 마스크, 형상 가이드 마스크, 오브젝트 가이드 마스크를 적용하여 각 픽셀에 대한 값을 검출할 수 있다. 캡쳐 이미지 보정 마스크와 동일하게 피부 가이드 마스크 배경 가이드 마스크를 이용하여 구한 보정 마스크 값이 제4 임계치를 초과하면 보정 마스크의 값을 1로 결정하고, 제4 임계치 미만이면, 밝기 보정 마스크의 값을 0으로 결정할 수 있다. 또한, 프로세서(210)는 오브젝트 가이드 마스크를 이용하여 눈, 눈썹, 코, 입 영역에 해당하는 값을 '0.7' 이상으로 결정할 수 있다.When the user requests brightness correction of the image (hereinafter referred to as brightness correction), the processor 210 detects a value for each pixel by applying a background guide mask, a skin guide mask, a shape guide mask, and an object guide mask can do. If the correction mask value obtained by using the skin guide mask background guide mask exceeds the fourth threshold value, the value of the correction mask is determined as 1. If it is less than the fourth threshold value, the value of the brightness correction mask is set to 0 . In addition, the processor 210 may determine a value corresponding to the eye, eyebrow, nose, and mouth area to be 0.7 or more by using the object guide mask.

또한, 사용자가 이미지에 대한 색상 변경을 요청한 경우(이하, '색상 변경'), 프로세서(210)는 배경 가이드 마스크, 피부 가이드 마스크, 형상 가이드 마스크, 오브젝트 가이드 마스크를 적용하여 각 픽셀에 대한 값을 검출할 수 있다. 프로세서(210)는 캡쳐 이미지 보정 마스크를 기반으로 형상 가이드 마스크의 값 이하로 제한하고, 오브젝트 가이드 마스크의 눈 영역에 해당하는 값을 '0'으로 결정하고, 눈썹, 코, 입 영역에 해당하는 값을 '0.5' 이상으로 결정할 수 있다.In addition, when the user requests a color change for an image (hereinafter, referred to as 'color change'), the processor 210 applies a background guide mask, a skin guide mask, a shape guide mask, Can be detected. The processor 210 limits the value to be less than or equal to the value of the shape guide mask based on the captured image correction mask, determines a value corresponding to the eye area of the object guide mask as '0' Can be determined to be 0.5 or more.

동작(1107)에서, 전자 장치(201)(예: 프로세서(210))는 상기 하나 이상의 가이드 마스크를 이용하여 결정된 영역별 값(예: 보정값)을 갖는 보정 마스크를 생성할 수 있다. 상기 값(또는 보정값)이 '1'이면 보정하고, '0'이면 보정하지 않을 수 있다. 예를 들어, 사용자가 이미 촬영된 이미지에 대하여 보정을 요청한 경우, 프로세서(210)는 피부 영역에 해당하는 픽셀의 값(예: 보정값)은 '1', 눈썹 영역에 대한 값은 ''0, 입술 영역에 대한 값은 '0.35'이상으로 정의한 캡쳐 이미지 보정 마스크를 생성할 수 있다. At operation 1107, the electronic device 201 (e.g., processor 210) may generate a correction mask having a determined area-specific value (e.g., correction value) using the one or more guide masks. If the value (or the correction value) is '1', it is corrected, and if it is '0', it is not corrected. For example, if the user requests correction for an already photographed image, the processor 210 determines whether the value of the pixel corresponding to the skin region (e.g., correction value) is' 1 'and the value for the eyebrow region is' , And a value for the lip region is 0.35 or more.

또한, 사용자가 프리뷰 이미지에 대하여 보정을 요청한 경우, 프로세서(210)는 얼굴 영역 내 엣지 영역에 해당하는 값은 '0.35'이하, 눈 및 눈썹 영역에 해당하는 값은 '0.35' 이하, 코 및 입 영역에 해당하는 값은 '0.5' 이하로 정의된 프리뷰 이미지 보정마스크를 생성할 수 있다. 또한, 사용자가 이미지의 밝기 보정을 요청한 경우, 프로세서(210)는 캡쳐 이미지 보정 마스크를 기반으로 형상 가이드 마스크 및 오브젝트 가이드 마스크를 적용하여 밝기 보정 마스크를 생성할 수 있다. 또한, 사용자가 이미지에 대한 색상 변경을 요청한 경우, 프로세서(210)는 캡쳐 이미지 보정 마스크를 기반으로 이미지에 형상 가이드 마스크 및 오브젝트 가이드 마스크를 적용한 값을 검출하여 색상 보정 마스크를 생성할 수 있다.In addition, when the user requests correction for the preview image, the processor 210 determines that the value corresponding to the edge area in the face area is 0.35 or less, the value corresponding to the eye and eyebrow area is 0.35 or less, A value corresponding to the area can be generated as a preview image correction mask defined as ' 0.5 '. In addition, when the user requests the brightness correction of the image, the processor 210 may generate the brightness correction mask by applying the shape guide mask and the object guide mask based on the captured image correction mask. In addition, when the user requests the color change for the image, the processor 210 may generate a color correction mask by detecting a value obtained by applying the shape guide mask and the object guide mask to the image based on the captured image correction mask.

다양한 실시예들에 따른 프로세서(210)는 상기 복수의 가이드 마스크들의 적어도 일부와 상기 얼굴 영역 중 피부 영역에 해당될 확률에 적어도 기반하여, 상기 피부 영역에 대한 이미지 처리 방법을 결정할 수 있다. 상기 피부 영역에 해당될 확률은 상기 이미지에 상기 피부 가이드 마스크를 적용하여 검출된 값이 임계치(예: 0.7) 이상인 영역을 피부 영역에 해당될 확률이 높은 것으로 판단할 수 있다. 만약, 상기 이미지에 상기 피부 가이드 마스크를 적용하여 검출된 값이 임계치(예: 0.7) 미만인 영역을 피부 영역에 해당될 확률이 낮은 것으로 판단할 수 있다. 상기 이미지 처리 방법은 상기 보정 마스크를 의미할 수 있다.The processor 210 according to various embodiments may determine an image processing method for the skin region based at least on a probability that the skin region is at least part of the plurality of guide masks and the face region. The probability that the skin region corresponds to the skin region may be determined by applying a skin guide mask to the image and determining that a region having a threshold value (e.g., 0.7) or more is highly likely to be included in the skin region. If the skin guide mask is applied to the image, it is possible to determine that a region having a value less than a threshold value (e.g., 0.7) is less likely to be included in the skin region. The image processing method may mean the correction mask.

동작(1109)에서, 전자 장치(201)(예: 프로세서(210))는 보정 마스크에 기반하여 보정 영역을 검출할 수 있다. 여기에서, 보정 영역은 보정이 필요한 영역을 의미할 수 있다. 예를 들어, 상기 보정 영역은 얼굴 영역 또는 상기 얼굴 영역을 포함하는 피부 영역일 수 있다. 상기 피부 영역은 사용자의 얼굴 이외에 목, 손 등 피부 보정이 필요한 영역을 포함할 수 있다.In operation 1109, electronic device 201 (e.g., processor 210) may detect a correction area based on a correction mask. Here, the correction area may mean an area requiring correction. For example, the correction region may be a face region or a skin region including the face region. The skin area may include areas that require correction of the skin, such as the neck, hands, etc., in addition to the face of the user.

다양한 실시예들에 따른 전자 장치(201)(예: 프로세서(210))는 보정 영역 검출의 성능을 높이기 위해 반사광 검출 방법을 수행할 수 있다. 빛에 의해 나타나는 반사광 영역의 경우, 일반적인 피부 영역의 색상 및 밝기의 범위에 들어가지 않을 수 있다. 따라서, 반사광 영역의 경우 보정 영역 검출에서 제외되거나 확률이 낮게 나올 수 있다. 프로세서(210)는 이미지로부터 반사광 영역을 검출하여 피부 영역에 추가할 수 있다. 일반적으로, 반사광 영역에 해당하는 픽셀의 밝기는 255에 가까운 값을 가질 수 있고, 반사광 영역에 해당하는 픽셀의 색상은 약 128에 근접한 값을 가지게 된다. 프로세서(210)는 이미지 내 평균 밝기와 평균 색상 또는 이미지 내 얼굴 영역 내 평균 밝기와 평균 색상을 이용하여 반사광 영역을 검출할 수 있다.Electronic device 201 (e.g., processor 210) in accordance with various embodiments may perform a reflected light detection method to enhance the performance of correction region detection. In the case of a reflected light region represented by light, it may not fall within the range of the color and brightness of a general skin region. Therefore, in the case of the reflected light region, it may be excluded from the detection of the correction region or it may become low probability. The processor 210 may detect a reflected light region from the image and add it to the skin region. Generally, the brightness of a pixel corresponding to a reflected light region can have a value close to 255, and the color of a pixel corresponding to a reflected light region has a value close to about 128. The processor 210 may detect the reflected light region using the average brightness in the image and the average brightness in the face region in the average color or the image.

예를 들어, 프로세서(210)는 이미지 내 픽셀당 밝기가 고정된 상수값에 곱해진 이미지의 평균 밝기보다 높은 영역이 검출되면, 검출된 영역을 반사광 영역으로 검출할 수 있다. 이는, 다음과 같은 수학식 1로 나타낼 수 있다.For example, the processor 210 may detect the detected region as a reflected light region if an area higher than the average brightness of the image multiplied by a constant value of brightness per pixel in the image is detected. This can be expressed by the following equation (1).

Figure pat00001
Figure pat00001

Y는 이미지 내 픽셀당 밝기이고, k는 1.1보다 큰 상수값일 수 있다.Y is the brightness per pixel in the image, and k can be a constant value greater than 1.1.

예를 들어, 프로세서(210)는 이미지 내 픽셀당 색상값의 범위를 고려하여 반사광 영역으로 검출할 수 있다. 이때, 프로세서(210)는 평균 색상값에 오차 범위를 반영하여 반사광 영역을 검출할 수 있다. 이는, 다음과 같은 수학식 3으로 나타낼 수 있다.For example, the processor 210 may detect a reflected light region in consideration of a range of color values per pixel in an image. At this time, the processor 210 may detect the reflected light region by reflecting the error range to the average color value. This can be expressed by the following equation (3).

Figure pat00002
Figure pat00002

Margin은 오차 범위를 나타낼 수 있다.Margin can indicate the error range.

프로세서(210)는 이미지 내 평균 색상값이 128을 초과하는 경우, 픽셀당 색상값 128 이상이고, 오차 범위를 적용한 평균 색상값보다 작은 영역이 검출되면, 반사광 영역으로 검출할 수 있다. 프로세서(210)는 이미지 내 평균 색상값이 128 이하인 경우, 오차 범위를 고려한 평균 색상값 이상이고, 오차 범위를 적용한 128보다 작은 영역이 검출되면, 반사광 영역으로 검출할 수 있다. 다양한 실시예들에 따른 프로세서(210)는 수학식 1 및 수학식 2에서 모두 반사광 영역으로 검출된 영역을 반사광 영역으로 검출할 수 있다.The processor 210 can detect the area as a reflected light area when an area having a color value 128 or more per pixel is detected when the average color value in the image exceeds 128 and an area smaller than the average color value with the error area is detected. When the average color value in the image is less than or equal to 128, the processor 210 can detect the region as a reflected light region when an area smaller than 128 is detected that is equal to or larger than the average color value in consideration of the error range. The processor 210 according to various embodiments can detect the area detected as the reflected light area as a reflected light area in both Equations (1) and (2).

다양한 실시예들에 따른 프로세서(210)는 얼굴 영역 중에서 한정된 영역에 대해서는 반사광이 검출되는지 여부를 판단할 수 있다. 예를 들어, 프로세서(210)는 가이드 마스크를 이용하여 검출된 얼굴 영역에 대하여 이마 및 코 영역에 대해서만 반사광이 있는지 검출할 수 있다.The processor 210 according to various embodiments may determine whether reflected light is detected for a limited area in the face area. For example, the processor 210 can detect whether there is reflected light only for the forehead and nose regions with respect to the detected face region using the guide mask.

다양한 실시예들에 따른 프로세서(210)는 상기 이미지 처리 방법을 이용하여, 상기 피부의 적어도 일부를 보정하도록 설정될 수 있다. 예를 들어, 프로세서(210)는, 상기 이미지 중 상기 피부의 적어도 일부가 보정된 얼굴에 대응하는 영역 중 상기 얼굴을 구성하는 복수의 오브젝트들에 대응하는 영역에 대해 윤곽선 검출을 위한 가이드 마스크(예: 형상 가이드 마스크)를 이용하여 상기 복수의 오브젝트들의 윤곽선들을 포함하는 피부 영역을 인식할 수 있다. 예를 들어, 프로세서(210)는 상기 이미지에 상기 형상 가이드 마스크를 적용하여 검출된 값이 임계치(예: 0.3) 이상인 영역을 피부 영역으로 인식할 수 있다.The processor 210 according to various embodiments may be configured to correct at least a portion of the skin using the image processing method. For example, the processor 210 may determine whether or not a guide mask (e.g., a mask) for contour detection is applied to an area corresponding to a plurality of objects constituting the face among the areas corresponding to the corrected face, : Shape guide mask) can be used to recognize a skin area including contours of the plurality of objects. For example, the processor 210 may apply the shape guide mask to the image and recognize an area having a detected value equal to or greater than a threshold (e.g., 0.3) as a skin area.

다양한 실시예들에 따른 프로세서(210)는 상기 이미지 중 상기 피부의 적어도 일부가 보정된 얼굴에 대응하는 영역 중 상기 얼굴을 구성하는 복수의 오브젝트들에 대응하는 영역에 대해 필터를 이용하여 상기 복수의 오브젝트들의 윤곽선들에 해당될 확률이 낮은 피부 영역을 인식할 수 있다. 예를 들어, 프로세서(210)는 프리뷰 이미지 보정을 처리할 경우, 보정 시간이 얼마 없기 때문에, 단순 필터를 이용하여 빠른 시간 내에 보정 마스크를 생성할 수 있다. 이 경우, 프로세서(210)는 단순 필터를 이용하여 얼굴 윤곽선에 해당될 확률이 낮은 피부 영역을 인식하고, 윤곽선에 해당될 확률이 높은 피부 영역(예: 경계 부분, 얼굴 윤곽)이 희미하게 처리되지 않도록 제어할 수 있다. 예를 들어, 윤곽선에 해당될 확률이 낮은 피부 영역은 눈, 눈썹, 코, 입, 피부이고, 윤곽선에 해당될 확률이 높은 피부 영역은 얼굴 윤곽에 해당할 수 있다.The processor 210 in accordance with various embodiments may use a filter to filter an area corresponding to a plurality of objects constituting the face among at least a portion of the image corresponding to the corrected face, It is possible to recognize a skin region having a low probability of being associated with the contours of the objects. For example, when the processor 210 processes the preview image correction, since the correction time is short, the correction mask can be generated in a short time using the simple filter. In this case, the processor 210 recognizes a skin region having a low probability of being facial contour using a simple filter, and a skin region (e.g., a boundary portion, a face contour) . For example, a skin area with a low probability of being a contour may be an eye, an eyebrow, a nose, a mouth, a skin, and a skin area likely to correspond to a contour may correspond to a face contour.

다양한 실시예들에 따른 프로세서(210)는 상기 이미지에 대한 보정 타입에 적어도 기반하여 상기 복수의 가이드 마스크들의 조합 법칙을 변경하고, 상기 변경된 조합 법칙에 적어도 기반하여 상기 얼굴을 구성하는 복수의 오브젝트들에 해당될 확률들을 결정하고, 상기 결정된 확률에 적어도 기반하여, 상기 피부에 대한 이미지 처리 방법을 결정할 수 있다. 예를 들어, 상기 보정 타입이 캡쳐된 이미지인 경우, 프로세서(210)는 배경 가이드 마스크, 피부 가이드 마스크, 오브젝트가이드 마스크를 이용하여 상기 얼굴을 구성하는 복수의 오브젝트들에 해당될 확률들을 결정하고, 상기 결정된 확률에 적어도 기반하여, 상기 피부에 대한 이미지 처리 방법을 결정할 수 있다.The processor 210 in accordance with various embodiments may change the combination rule of the plurality of guide masks based at least in part on the correction type for the image and may include a plurality of objects And determine an image processing method for the skin based at least on the determined probability. For example, if the correction type is a captured image, the processor 210 determines the probabilities corresponding to the plurality of objects constituting the face using a background guide mask, a skin guide mask, and an object guide mask, Based on the determined probability, at least the image processing method for the skin can be determined.

도 12a는 다양한 실시예들에 따른 가이드 마스크 및 보정 마스크를 생성하는 일례를 도시한 도면이다.12A is a diagram illustrating an example of generating a guide mask and a correction mask according to various embodiments.

도 12a를 참조하면, 전자 장치(201)(예: 프로세서(210))는 이미지(1210)로부터 오브젝트 가이드 마스크(1211), 형상 가이드 마스크(1213), 엣지 가이드 마스크(1215), 배경 가이드 마스크(1217) 또는 피부 가이드 마스크(1219)를 생성할 수 있다. 프로세서(210)는 오브젝트 가이드 마스크(1211), 형상 가이드 마스크(1213), 엣지 가이드 마스크(1215), 배경 가이드 마스크(1217) 또는 피부 가이드 마스크(1219)에 차등적으로 보정값을 주어 제1 보정 마스크(1220), 제2 보정 마스크(1230) 및 제3 보정 마스크(1240)를 생성할 수 있다. 제1 보정 마스크(1220)는 캡쳐된 이미지를 보정할 때 사용되는 것일 수 있다. 제2 보정 마스크(1230)는 프리뷰 이미지를 보정할 때 사용되는 것일 수 있다. 제3 보정 마스크(1240)는 이미지에 대한 밝기를 보정할 때 사용되는 것일 수 있다.12A, an electronic device 201 (e.g., processor 210) receives an object guide mask 1211, a shape guide mask 1213, an edge guide mask 1215, a background guide mask 1217 < / RTI > or a skin guide mask 1219 can be created. The processor 210 may provide a correction value differentially to the object guide mask 1211, the shape guide mask 1213, the edge guide mask 1215, the background guide mask 1217 or the skin guide mask 1219, A mask 1220, a second correction mask 1230, and a third correction mask 1240. [ The first correction mask 1220 may be used to correct the captured image. The second correction mask 1230 may be one used to correct the preview image. The third correction mask 1240 may be used to correct the brightness for the image.

도 12b는 다양한 실시예들에 따른 캡쳐 이미지 보정 마스크를 생성하는 일례를 도시한 도면이다.12B is a diagram illustrating an example of generating a captured image correction mask according to various embodiments.

도 12b를 참조하면, 프로세서(210)는 오브젝트 가이드 마스크(1211), 배경 가이드 마스크(1217) 및 피부 가이드 마스크(1219)를 이용하여 제1 보정 마스크(1220)를 생성할 수 있다. 캡쳐된 이미지는 이미지를 많이 전처리 하지 않아도 이미지를 보정하는 시간이 프리뷰 이미지보다 많을 수 있다. 따라서, 프로세서(210)는 캡쳐된 이미지에 대해서는 간소하게 이미지 전처리 과정을 수행할 수 있다. 예를 들어, 프로세서(210)는 얼굴 영역 내 피부에 해당하는 영역(1221)에 대해서는 배경 가이드 마스크(1217)에 의해 검출된 값을 '0.3'으로 결정하고, 피부 가이드 마스크(1219)에 의해 검출된 값을 '0.9'로 결정할 수 있다. 이 경우, 임시 보정 마스크(1220-1)를 보면, 영역(1222)에 해당하는 값(예: 보정값)은 '1.0'이 되어, 프로세서(210)가 영역(1222)을 보정할 수 있다. Referring to FIG. 12B, the processor 210 may generate a first correction mask 1220 using an object guide mask 1211, a background guide mask 1217, and a skin guide mask 1219. The captured image may have more time to correct the image than the preview image, even if the image is not much preprocessed. Thus, the processor 210 can perform a simple image preprocessing process on the captured image. For example, the processor 210 determines that the value detected by the background guide mask 1217 is '0.3' for the area 1221 corresponding to the skin in the face area, and detects it by the skin guide mask 1219 Can be determined as " 0.9 ". In this case, when the temporary correction mask 1220-1 is viewed, the value (e.g., correction value) corresponding to the area 1222 becomes '1.0', and the processor 210 can correct the area 1222. [

또한, 프로세서(210)는 눈썹 영역(1223)에 대해서 임시 보정 마스크(1220-1)의 값이 0.9를 가진 경우, 오브젝트 가이드 마스크(1211)를 이용하여 눈썹 영역(1223)에 대응하는 값을 0으로 결정할 수 있다. 이 경우, 제1 보정 마스크(1220)에서는, 눈썹 영역(1225)의 보정값은 '0'이 되어, 눈썹 영역(1225)은 보정되지 않을 수 있다. 또한, 프로세서(210)는 입술 영역(1224)에 대해서 임시 보정 마스크(1220-1)의 값이 0.1를 가진 경우, 오브젝트 가이드 마스크(1211)를 이용하여 입술 영역(1224)에 대응하는 값을 '0.35' 이상이 되도록 결정(제한)할 수 있다. 이 경우, 제1 보정 마스크(1220)에서는, 입술 영역(1226)의 보정값은 '0.35'가 되어, 입술 영역(1226)은 조금 보정될 수 있다.The processor 210 also sets the value corresponding to the eyebrow area 1223 to 0 (zero) using the object guide mask 1211 when the value of the provisional correction mask 1220-1 is 0.9 for the eyebrow area 1223, . In this case, in the first correction mask 1220, the correction value of the eyebrow area 1225 becomes '0', and the eyebrow area 1225 may not be corrected. The processor 210 may also use the object guide mask 1211 to set the value corresponding to the lip region 1224 to a value of " 0 ", if the temporary correction mask 1220-1 has a value of 0.1 for the lip region 1224, (Limited) to be 0.35 'or more. In this case, in the first correction mask 1220, the correction value of the lip region 1226 becomes '0.35', and the lip region 1226 can be slightly corrected.

도 12c는 다양한 실시예들에 따른 프리뷰 이미지 보정 마스크를 생성하는 일례를 도시한 도면이다.12C is a diagram showing an example of generating a preview image correction mask according to various embodiments.

도 12c를 참조하면, 프로세서(210)는 사용자가 프리뷰 이미지에 대하여 보정을 요청한 경우, 제2 보정 마스크(1230)를 생성할 수 있다. 제2 보정 마스크(1230)는 오브젝트 가이드 마스크(1211), 형상 가이드 마스크(1213), 엣지 가이드 마스크(1215), 및 피부 가이드 마스크(1219)를 이용하여 생성된 것일 수 있다. 프리뷰 이미지는 사용자에게 실시간으로 보정된 이미지를 제공하기 위해서 이미지를 보정하는데 걸리는 시간이 캡쳐된 이미지보다 짧을 수 있다. 다만, 얼굴 이미지에 대한 보정은 기본적으로 얼굴을 구성하는 눈, 코, 입은 선명하게 하고, 피부는 깨끗하고 매끄럽게 수행하는 것이므로, 프로세서(210)는 피부 가이드 마스크(1219)를 기본으로 하여 에지 영역(1231)에 대응하여 형상 가이드 마스크(1215)를 적용하여 검출된 값을 '0.35' 이하로 결정할 수 있다. 예를 들어, 프로세서(210)는 에지 영역(1231)에 형상 가이드 마스크(1215)를 적용하여 검출된 값(예: 0.9)이 제3 임계치(예: 0.4) 이상이면, 에지 영역(1231)에 대응하는 값을 '0.35'로 결정(제한)할 수 있다. 이 경우, 제2 보정 마스크(1230)에서는, 엣지 영역(1233)의 보정값은 '0.35'가 되어, 엣지 영역(1233)은 조금 보정될 수 있다. 또한, 프로세서(210)는 오브젝트 가이드 마스크(1211)를 적용하여 눈 및 눈썹 영역에 대응하는 값을 '0.35' 이하로 결정(또는 제한)하고, 코 및 입 영역에 대응하는 값을 '0.5' 이하로 결정(제한)할 수 있다. Referring to FIG. 12C, the processor 210 may generate a second correction mask 1230 if the user has requested correction for the preview image. The second correction mask 1230 may be created using an object guide mask 1211, a shape guide mask 1213, an edge guide mask 1215, and a skin guide mask 1219. The preview image may take less time to correct the image to provide the user with a corrected image in real time than the captured image. However, since the correction for the face image is basically to make the eyes, nose, and mouth of the face sharp and the skin clean and smooth, the processor 210 can not perform the edge area The shape guide mask 1215 may be applied in correspondence with the shape information 1231 to determine the detected value to be 0.35 or less. For example, the processor 210 may apply a shape guide mask 1215 to the edge region 1231 to determine if the detected value (e.g., 0.9) is greater than or equal to a third threshold (e.g., 0.4) The corresponding value can be determined (limited) to '0.35'. In this case, in the second correction mask 1230, the correction value of the edge area 1233 becomes 0.35, and the edge area 1233 can be slightly corrected. In addition, the processor 210 determines (or restricts) a value corresponding to the eye and eyebrow area to be 0.35 or less by applying the object guide mask 1211, and sets the value corresponding to the nose and mouth area to 0.5 (Limited).

도 12d는 다양한 실시예들에 따른 밝기 보정 마스크를 생성하는 일례를 도시한 도면이다.12D is a diagram showing an example of generating a brightness correction mask according to various embodiments.

도 12d를 참조하면, 프로세서(210)는 사용자가 이미지에 대하여 밝기 보정을 요청한 경우, 제3 보정 마스크(1240)를 생성할 수 있다. 제3 보정 마스크(1240)는 제1 보정 마스크(1220)를 기반으로 형상 가이드 마스크(1213)를 적용하여 생성된 것일 수 있다. 밝기 보정은 캡쳐된 이미지 또는 프리뷰 이미지에 대해서 밝기 보정을 위주로 보정할 것을 요청한 것일 수 있다. 밝기 보정의 경우, 피부뿐 아니라 눈, 코 입도 밝게 표현될 수 있다. 따라서, 프로세서(210)는 밝기 보정을 요청한 이미지에 대해서 제1 보정 마스크(1220)의 값이 제4 임계치를 초과하면, 제3 보정 마스크(1240)의 값을 '1'로 결정하고, 제4 임계치 미만이면, 제3 보정 마스크(1240)의 값을 '0'으로 결정할 수 있다. 예를 들어, 프로세서(210)는 상기 이미지에 각 가이드 마스크를 적용하여 제1 보정 마스크(1220)를 생성하고, 제1 보정 마스크(1220)의 값이 상기 이미지에 형상 가이드 마스크(1213)를 적용하여 검출된 값보다 크면, 제3 보정 마스크(1240)의 값을 형상 가이드 마스크(1213)의 값으로 변경할 수 있다. 예를 들어, 제1 보정 마스크(1220) 및 형상 가이드 마스크(1213)에서 배경 영역(1242)에 해당하는 값은 '0'이 되므로, 제3 보정 마스크(1240)의 값도 '0'이 될 수 있다. 또한, 제1 보정 마스크(1220) 및 형상 가이드 마스크(1213)에서 눈 영역(1241)에 해당하는 값은 '0.3'이 되어, 제3 보정 마스크(1240)의 값도 '0.3'이 될 수 있다.Referring to FIG. 12D, the processor 210 may generate a third correction mask 1240 if the user requested brightness correction for the image. The third correction mask 1240 may be generated by applying a shape guide mask 1213 based on the first correction mask 1220. [ The brightness correction may be a request to correct the brightness correction mainly for the captured image or the preview image. In the case of brightness correction, not only the skin but also the eyes and nose can be expressed brightly. Accordingly, the processor 210 determines the value of the third correction mask 1240 as '1' if the value of the first correction mask 1220 exceeds the fourth threshold value for the image that requested the brightness correction, If it is less than the threshold value, the value of the third correction mask 1240 can be determined as " 0 ". For example, the processor 210 may apply a respective guide mask to the image to create a first correction mask 1220, and if the value of the first correction mask 1220 applies a shape guide mask 1213 to the image The value of the third correction mask 1240 may be changed to the value of the shape guide mask 1213. In this case, For example, since the value corresponding to the background area 1242 in the first correction mask 1220 and the shape guide mask 1213 becomes '0', the value of the third correction mask 1240 also becomes '0' . In the first correction mask 1220 and the shape guide mask 1213, the value corresponding to the eye region 1241 may be '0.3', and the value of the third correction mask 1240 may also be '0.3' .

이밖에도, 전자 장치(201)(예: 프로세서(210))는 이미지별 오브젝트 가이드 마스크(1211), 형상 가이드 마스크(1213), 엣지 가이드 마스크(1215), 배경 가이드 마스크(1217) 또는 피부 가이드 마스크(1219)를 생성하고, 오브젝트 가이드 마스크(1211), 형상 가이드 마스크(1213), 엣지 가이드 마스크(1215), 배경 가이드 마스크(1217) 또는 피부 가이드 마스크(1219)를 이용하여 다양한 형태의 보정 마스크를 생성할 수 있다.In addition, the electronic device 201 (e.g., the processor 210) may include an image-specific object guide mask 1211, a shape guide mask 1213, an edge guide mask 1215, a background guide mask 1217, 1219) and various types of correction masks are generated using the object guide mask 1211, the shape guide mask 1213, the edge guide mask 1215, the background guide mask 1217 or the skin guide mask 1219 can do.

도 13은 다양한 실시예들에 따른 보정 파라미터를 이용하여 얼굴 영역을 보정하는 방법을 도시한 흐름도이다. 도 13의 흐름도는 도 4의 동작(409)을 상세히 설명한 것이다. 도 13의 동작은 도 5 및 도 9의 동작과 동시에 수행되거나, 도 5 및 도 9의 동작 이후 또는 이전에 수행될 수 있다.13 is a flow chart illustrating a method of correcting a face region using correction parameters according to various embodiments. The flowchart of FIG. 13 describes operation 409 of FIG. 4 in detail. The operation of Fig. 13 may be performed simultaneously with the operations of Figs. 5 and 9, or may be performed after or before the operations of Fig. 5 and Fig.

도 13을 참조하면, 동작(1301)에서, 전자 장치(201)(예: 프로세서(210))는 이미지와 연관된 정보를 획득할 수 있다. 상기 이미지와 연관된 정보는 카메라 하드웨어 정보, 특징점 정보 및 보정 영역 정보를 포함할 수 있다. 상기 카메라 하드웨어 정보는 상기 이미지 촬영 시, 카메라(예: 카메라 모듈(291))로부터 획득된 정보일 수 있다. 예를 들어, 상기 카메라 하드웨어 정보는 감도 레벨(ISO level), 휘도(luminance), 조도(illumination), 셔터 속도 중 적어도 하나를 포함할 수 있다. 상기 특징점 정보는 이미지로부터 추출되는 특징점에 대한 정보로서, 예를 들어, 도 4의 동작(403)에서 획득된 것일 수 있다. 상기 보정 영역 정보는 도 11에 의해 검출된 보정 영역에 대한 정보를 의미할 수 있다. 13, at operation 1301, an electronic device 201 (e.g., processor 210) may obtain information associated with an image. The information associated with the image may include camera hardware information, feature point information, and correction region information. The camera hardware information may be information obtained from the camera (e.g., camera module 291) during the image photographing. For example, the camera hardware information may include at least one of an ISO level, a luminance, an illumination, and a shutter speed. The minutia information may be information about the minutiae extracted from the image, for example, obtained in the operation 403 of Fig. The correction region information may refer to information on the correction region detected by FIG.

동작(1303)에서, 전자 장치(201)(예: 프로세서(210))는 정보에 기반하여 보정 파라미터를 설정할 수 있다. 상기 보정 파라미터는 이미지 보정 정도, 피부 영역 설정, 브라이트닝 보정 정도 조절 또는 눈 보정 영역 설정 중 적어도 하나를 포함할 수 있다. 예를 들어, 프로세서(210)는 카메라 하드웨어 정보(예: ISO level)를 이용하여 스무딩(smoothing)에서 노이즈 제거 정도를 설정할 수 있다. 상기 노이즈 제거 정도는 이미지 보정 정도를 의미할 수 있다. 프로세서(210)는 얼굴 크기를 이용하여 얼굴 영역 내의 스무딩 커널(smoothing kernel) 크기를 설정할 수 있다. 여기서, 상기 스무딩 커널 크기 설정이 피부 영역 설정을 의미할 수 있다. 프로세서(210)는 카메라 하드웨어 정보(예: 카메라 조도)를 이용하여 브라이트닝 보정 정도 조절할 수 있다. 프로세서(210)는 얼굴 특징점을 이용하여 눈 영역을 추정하고, 눈 영역에 눈 전용 보정 알고리즘을 적용할 수 있다.In operation 1303, the electronic device 201 (e.g., processor 210) may set correction parameters based on the information. The correction parameter may include at least one of an image correction degree, a skin area setting, a brightness correction degree adjustment, or an eye correction area setting. For example, the processor 210 may set the degree of noise reduction in smoothing using camera hardware information (e.g., ISO level). The degree of noise reduction may mean the degree of image correction. The processor 210 may set the size of the smoothing kernel in the face area using the face size. Here, the smoothing kernel size setting may mean skin area setting. Processor 210 may adjust the degree of brightness correction using camera hardware information (e.g., camera illumination). The processor 210 may estimate the eye region using facial feature points and apply an eye-only correction algorithm to the eye region.

다양한 실시예들에 따른 프로세서(210)는 사용자 특성을 분석하고, 분석된 사용자 특정을 보정 파라미터 설정에 이용할 수 있다. 예를 들어, 프로세서(210)는 얼굴 영역에서 성별, 연령대, 피부색 등의 사용자 특성을 분석할 수 있다. 성별 또는 연령대에 따라 선호도가 다를 수 있고, 보정 정도, 보정할 범위 또는 영역이 다를 수 있다. 피부색은 백인, 황인, 흑인에 따라 다를 수 있기 때문에, 피부색 검출 방법이나 보정 방법이 다를 수 있다. 프로세서(210)는 사용자 특정을 이용하여 보정 파라미터를 설정할 수 있다.The processor 210 in accordance with various embodiments may analyze user characteristics and utilize the analyzed user characteristics for calibration parameter settings. For example, processor 210 may analyze user characteristics such as sex, age, skin color, and the like in the face region. The preferences may vary depending on gender or age range, and the degree of correction, range or area to be corrected may be different. Since the skin color may be different depending on the white, yellow and black people, the skin color detection method and correction method may be different. Processor 210 may set calibration parameters using a user specification.

동작(1305)에서, 전자 장치(201)(예: 프로세서(210))는 상기 설정된 보정 파라미터에 기반하여 보정 우선 순위를 결정할 수 있다. 프로세서(210)는 상기 보정 파라미터에 따라 전역적 보정을 먼저 수행할 지, 지역적 보정을 먼저 수행할지 여부를 결정할 수 있다. 예를 들어, 상기 전역적 보정은 얼굴 영역에 대하여 전체적인 보정을 수행하는 것을 의미하고, 상기 지역적 보정은 얼굴 영역에 대하여 일정 영역(예: 눈, 피부)에 대해서만 보정을 수행하는 것을 의미할 수 있다. 상기 보정 파라미터에는 사용자의 선호도, 특성 또는 보정 요청 사항 중 적어도 하나가 포함되어 있기 때문에, 프로세서(210)는 보정 파라미터에 따라 전역적 보정과 지역적 보정의 우선 순위를 결정함으로써, 보정 효과를 증대시킬 수 있다. In operation 1305, the electronic device 201 (e.g., processor 210) may determine a correction priority based on the set correction parameters. The processor 210 may determine whether to perform the global correction first or the local correction first according to the correction parameter. For example, the global correction means performing a global correction on the face region, and the local correction may mean performing correction on a certain region (e.g., eye, skin) with respect to the face region . Because the correction parameters include at least one of a user's preference, characteristics, or correction requests, the processor 210 determines the priorities of global correction and local correction according to the correction parameters, have.

동작(1305)에서, 전자 장치(201)(예: 프로세서(210))는 상기 결정된 보정 우선 순위가 전역적 보정인지 여부를 판단할 수 있다. 프로세서(210)는 전역적 보정을 먼저 수행하는 경우 동작(1309)를 수행하고, 지역적 보정을 먼저 수행하는 경우 동작(1321)을 수행할 수 있다.At operation 1305, the electronic device 201 (e.g., processor 210) may determine whether the determined correction priority is a global correction. The processor 210 may perform an operation 1309 when performing the global correction first and an operation 1321 when performing the local correction first.

전역적 보정을 먼저 수행하는 경우, 동작(1305)에서, 전자 장치(201)(예: 프로세서(210))는 얼굴 영역에 대한 전역적 보정을 수행할 수 있다. 프로세서(210)는 상기 얼굴 영역에 대한 스무딩, 브라이트닝, 피부톤 변경 중 적어도 하나를 수행할 수 있다. 예를 들어, 프로세서(210)는 상기 얼굴 영역 전체적으로 피부를 매끄럽게 보이도록 보정하고(예: 스무딩), 밝게 처리하며(예: 브라이트닝), 피부톤을 변경(예: 핑크빛)할 수 있다.If the global correction is performed first, at operation 1305, the electronic device 201 (e.g., processor 210) may perform a global correction on the face region. The processor 210 may perform at least one of smoothing, brightening, and changing skin tone for the face area. For example, the processor 210 may calibrate (e.g., smoothing), brighten (e.g., brighten), and change skin tone (e.g., pink) to make the skin look smooth throughout the face area.

동작(1305)의 전역적 보정이 완료되면, 동작(1311)에서, 전자 장치(201)(예: 프로세서(210))는 상기 얼굴 영역에 대한 지역적 보정을 수행할 수 있다. 상기 지역적 보정은 반사광 보정, 스팟 컨실링(spot concealing), 또렷한 눈 보정, 또는 영상 선명도 증가를 위한 엣지 향상 보정 중 적어도 하나를 포함할 수 있다. 예를 들어, 프로세서(210)는 얼굴 영역을 각각 보정이 필요한 영역으로 분할하고, 분할된 영역에 대하여 서로 다른 보정 방법으로 적절하게 보정을 수행할 수 있다. 예를 들어, 프로세서(210)는 특징점을 이용하여 검출되는 눈 영역에 대하여 차이 향상(contrast enhancement) 알고리즘 또는 선명화(sharpening) 알고리즘을 적용하여 눈이 또렷하게 보이도록 보정할 수 있다. 프로세서(210)는 얼굴 영역 중 피부 영역에 대하여 다크 스팟이 검출되는지 판단하고, 다크 스팟이 검출된 영역에 대하여 다크 스팟이 검출된 영역의 주변 픽셀값으로 상기 다크 스팟이 검출된 영역을 채워주는 스팟 컨실링(spot concealing) 알고리즘을 적용하여 전역적 스무딩에서 제거되지 않는 잡티를 제거할 수 있다.Once the global correction of operation 1305 is complete, at operation 1311, the electronic device 201 (e.g., processor 210) may perform local correction for the face region. The local correction may include at least one of reflected light correction, spot concealing, sharp eye correction, or edge enhancement correction for increasing image sharpness. For example, the processor 210 may divide the face region into regions that need to be corrected, respectively, and may perform correction for the divided regions appropriately by different correction methods. For example, the processor 210 may apply a contrast enhancement algorithm or a sharpening algorithm to the eye region detected using the feature points to correct the eyes to look crisp. The processor 210 determines whether a dark spot is detected with respect to the skin region of the face region, and determines whether the dark spot is detected with the surrounding pixel value of the dark spot detected region, A spot concealing algorithm can be applied to remove any artifacts that are not removed from global smoothing.

다양한 실시예들에 따른 프로세서(210)는 이미지에서 반사광이 검출되는 경우, 전역적 보정 이후에 지역적 보정을 수행할 수 있다. 예를 들어, 프로세서(210)는 반사광 검출 영역에 대하여 스킨 브라이트닝 또는 컬러 변경과 같은 전역적 보정 처리로 인해 채도(saturation)가 변경될 수 있다. 이러한 단점을 보완하기 위하여, 프로세서(210)는 이미지에서 반사광이 검출되는 경우, 전역적 보정 이후에 지역적 보정으로 '반사광 보정 처리'를 수행할 수 있다.The processor 210 in accordance with various embodiments may perform local correction after global correction when reflected light is detected in the image. For example, the processor 210 may change the saturation due to a global correction process such as skin brightening or color change for the reflected light detection area. To compensate for this disadvantage, the processor 210 may perform 'reflected light correction processing' with local correction after global correction if reflected light is detected in the image.

다양한 실시예들에 따른 프로세서(210)는 상기 전역적 보정을 이용하여 상기 얼굴 영역에 대한 보정에 대한 제1 처리를 수행하고, 상기 지역적 보정을 이용하여 상기 제1 처리된 얼굴 영역에 대한 보정에 대한 제2 처리를 수행할 수 있다.The processor 210 in accordance with various embodiments may perform a first process for the correction for the face region using the global correction and a correction for the first processed face region using the local correction The second process can be performed.

지역적 보정을 먼저 수행하는 경우 동작(1321)에서, 전자 장치(201)(예: 프로세서(210))는 상기 얼굴 영역에 대한 지역적 보정을 수행할 수 있다. 상기 지역적 보정에 대한 설명은 동작(1311)과 유사 또는 동일하므로, 자세한 설명을 생략할 수 있다. 동작(1321)의 지역적 보정이 완료되면, 동작(1323)에서, 전자 장치(201)(예: 프로세서(210))는 상기 얼굴 영역에 대한 전역적 보정을 수행할 수 있다. 지역적 보정에 대한 설명은 동작(1309)과 유사 또는 동일하므로, 자세한 설명을 생략할 수 있다. 다양한 실시예들에 따른 프로세서(210)는 다크 스팟 컨실링과 눈 확대 보정에 대해서는 자연스러운 보정을 위해 전역적 보정 전에 수행할 수 있다. 예를 들어, 프로세서(210)는 다크 스팟 컨실링과 눈 확대 보정에 대한 전역적 보정이 완료되면, 스킨 스무딩과 같은 전역적 보정을 수행할 수 있다. 다양한 실시예들에 따른 프로세서(210)는 상기 지역적 보정을 이용하여 상기 얼굴 영역에 대한 보정에 대한 제1 처리를 수행하고, 상기 전역적 보정을 이용하여 상기 제1 처리된 얼굴 영역에 대한 보정에 대한 제2 처리를 수행할 수 있다.In operation 1321, where electronic localization is first performed, electronic device 201 (e.g., processor 210) may perform local correction for the face region. The description of the regional correction is similar to or the same as the operation 1311, so that detailed description may be omitted. Once the local correction of operation 1321 is complete, at operation 1323, electronic device 201 (e.g., processor 210) may perform a global correction of the face region. The description of the local correction is similar to or the same as the operation 1309, so detailed description can be omitted. The processor 210 in accordance with various embodiments may perform prior to global correction for natural correction for dark-spot convolution and eye magnification correction. For example, processor 210 may perform global correction, such as skin smoothing, upon completion of global spot correction for dark spot confinement and eye enlargement correction. The processor 210 in accordance with various embodiments may perform a first process for the correction for the face region using the local correction and a correction for the first processed face region using the global correction The second process can be performed.

도 14는 다양한 실시예들에 따른 보정 파라미터를 결정하는 일례를 도시한 도면이다.14 is a diagram illustrating an example of determining correction parameters in accordance with various embodiments.

도 14를 참조하면, 전자 장치(201)(예: 프로세서(210))는 이미지(1410)로부터 이미지와 연관된 정보(1420)를 획득할 수 있다. 이미지와 연관된 정보(1420)는 카메라 하드웨어(H/W) 정보(1421), 특징점 정보(1243) 및 보정 영역 정보(1425)를 포함할 수 있다. 프로세서(210)는 이미지와 연관된 정보(1420)를 이용하여 이미지 보정 처리(1430)를 수행할 수 있다. 이미지 보정 처리(1430)는 전역적 보정(1440)과 지역적 보정(1450)으로 구분할 수 있다. 전역적 보정(1440)은 스킨 스무딩(skin smoothing, 1441), 스킨 브라이트닝(skin brightening, 1443) 및 스킨 컬러 변경(skin color changing, 1445)을 포함할 수 있다. 지역적 보정(1450)은 반사광 보상(reflection compensation, 1451), 스팟 컨실러(dark spot concealer, 1453), 눈 확대(eye enhancement, 1455) 및 엣지 보존(edge preserving, 1457)을 포함할 수 있다. 프로세서(210)는 전역적 보정(1440)과 지역적 보정(1450)을 종합 처리(1460)하여 이미지를 보정할 수 있다. 프로세서(210)는 보정된 이미지(1470)를 디스플레이(예: 디스플레이(260))에 표시할 수 있다.14, an electronic device 201 (e.g., processor 210) may obtain information 1420 associated with an image from an image 1410. For example, The information 1420 associated with the image may include camera hardware (H / W) information 1421, minutia information 1243, and correction area information 1425. Processor 210 may perform image correction processing 1430 using information 1420 associated with the image. The image correction process 1430 can be divided into global correction 1440 and local correction 1450. Global correction 1440 may include skin smoothing 1441, skin brightening 1443, and skin color changing 1445. The local correction 1450 may include reflection compensation 1451, a dark spot concealer 1453, eye enhancement 1455, and edge preserving 1457. The processor 210 may integrate 1460 the global correction 1440 and the local correction 1450 to correct the image. Processor 210 may display the calibrated image 1470 on a display (e.g., display 260).

도 15는 다양한 실시예들에 따른 보정 파라미터를 이용하여 지역적으로 얼굴 영역을 보정하는 일례를 도시한 도면이다.15 is a diagram showing an example of correcting a face region locally using correction parameters according to various embodiments.

도 15를 참조하면, 전자 장치(201)(예: 프로세서(210))는 이미지 내 지역적 영역(1510)에 대해서 지역적 영역 카테고리(1520)를 구분할 수 있다. 예를 들어, 프로세서(210)는 보정 파라미터(1540)를 이용하여 지역적 영역 카테고리(1520)를 구분할 수 있다. 지역적 영역 카테고리(1520)는 비 피부 영역(1521) 및 피부 영역(1524)을 포함할 수 있다. 비 피부 영역(1524)은 눈 영역(1522)을 포함하고, 피부 영역(1524)은 엣지 영역(1523), 반사광 영역(1525) 및 다크 스팟 영역(1526)으로 구분할 수 있다. 프로세서(210)는 보정 파라미터(1540) 및 지역적 영역 카테고리(1520)에 기반하여 지역적 보정 처리(1530)를 수행할 수 있다. 예를 들어, 프로세서(210)는 눈 영역(1522)에 대하여 차이 향상(1531)을 적용하여 눈을 크게 확대 보정할 수 있다. 프로세서(210)는 엣지 영역(1523)에 대하여 차이 향상(1531) 및 엣지 보전(1533)을 적용하여 엣지 부분을 선명하게 하면서 자연스럽게 보이도록 보정할 수 있다. 프로세서(210)는 반사광 영역(1525)에 대하여 반사광 조절 알고리즘(1535)을 적용하여 보정 처리할 수 있다. 프로세서(210)는 다크 스팟 영역(1526)에 대하여 스팟 컨실링 알고리즘(1537)을 적용하여 보정 처리할 수 있다. Referring to FIG. 15, an electronic device 201 (e.g., processor 210) may identify a regional area category 1520 for a local area 1510 in an image. For example, the processor 210 may use the correction parameters 1540 to identify the regional area category 1520. [ The regional region category 1520 may include a non-skin region 1521 and a skin region 1524. The non-skin region 1524 includes an eye region 1522 and the skin region 1524 can be divided into an edge region 1523, a reflected light region 1525, and a dark spot region 1526. Processor 210 may perform local correction processing 1530 based on correction parameter 1540 and local area category 1520. [ For example, the processor 210 may apply magnitude enhancement 1531 to the eye region 1522 to significantly magnify the eye. The processor 210 may apply a difference enhancement 1531 and an edge preservation 1533 to the edge region 1523 to correct the edge portion to appear smooth and natural. The processor 210 may apply a reflected light adjustment algorithm 1535 to the reflected light region 1525 to perform correction processing. Processor 210 may apply a spot concealment algorithm 1537 to the dark spot region 1526 for correction processing.

도 16은 다양한 실시예들에 따른 전역적 또는 지역적으로 얼굴 영역을 보정하는 일례를 도시한 도면이다. 16 is a diagram showing an example of correcting a face area globally or locally according to various embodiments.

도 16을 참조하면, 전자 장치(201)(예: 프로세서(210))는 얼굴 영역(1610)으로부터 지역적 보정이 필요한 영역을 검출할 수 있다. 프로세서(210)는 전역적 보정이 완료된 후 또는 전역적 보정 전에 얼굴 영역(1610)으로부터 지역적 보정이 필요한 영역을 검출할 수 있다. 프로세서(210)는 얼굴 영역(1610)에서 눈 영역(1611) 및 다크 스팟 영역(1613)을 지역적 보정이 필요한 영역으로 검출할 수 있다. 프로세서(210)는 눈 영역(1611)에 차이 향상 알고리즘을 적용할 수 있다. 보정된 눈 영역(1621)은 눈을 크고 선명하게 보이도록 보정된 것일 수 있다. 프로세서(210)는 다크 스팟 영역(1613)에 스팟 컨실링 알고리즘을 적용할 수 있다. 보정된 다크 스팟 영역(1623)은 다크 스팟을 블러 처리하여 희미하게 보이도록 보정된 것일 수 있다. 프로세서(210)는 보정된 이미지(1620)를 디스플레이(예: 디스플레이(260))에 표시할 수 있다.16, electronic device 201 (e.g., processor 210) may detect an area requiring local correction from face area 1610. [ Processor 210 may detect areas that require local correction from face area 1610 after global correction is complete or prior to global correction. The processor 210 can detect the eye area 1611 and the dark spot area 1613 in the face area 1610 as areas requiring local correction. The processor 210 may apply a difference enhancement algorithm to the eye region 1611. [ The corrected eye region 1621 may be one that has been corrected to make the eye look louder and clearer. The processor 210 may apply the spot concealment algorithm to the dark spot region 1613. [ The corrected dark spot region 1623 may be corrected to blur the dark spots to look faint. Processor 210 may display the calibrated image 1620 on a display (e.g., display 260).

도 17은 다양한 실시예들에 따른 얼굴 영역 보정 방법을 도시한 흐름도이다.17 is a flowchart illustrating a face area correction method according to various embodiments.

도 17을 참조하면, 동작(1701)에서, 전자 장치(201)(예: 프로세서(210))는 이미지로부터 추출된 특징점에 적어도 기반하여 얼굴 영역을 인식할 수 있다. 상기 이미지는 전자 장치(201)의 카메라 모듈(예: 카메라 모듈(291))로부터 실시간으로 획득되는 프리뷰 이미지이거나, 메모리(예: 메모리(230))에 저장된 이미지일 수 있다. 프로세서(210)는 상기 이미지로부터 특징점을 추출하고, 추출된 특징점들을 이용하여 타원 영역을 형성하고, 형성된 타원 영역 중 큰 타원 영역에 해당하는 부분을 얼굴 영역으로 인식할 수 있다. 예를 들어, 프로세서(210)는 상기 추출된 특징점들 중에서 가장 중심에 위치하는 특징점(예: 코 특징점)으로부터 가장 먼 거리에 위치하는 특징점들을 하나의 선으로 이어 큰 타원 영역을 형성할 수 있다.17, at operation 1701, electronic device 201 (e.g., processor 210) may recognize a face region based at least on feature points extracted from the image. The image may be a preview image obtained in real time from a camera module (e.g., camera module 291) of the electronic device 201 or an image stored in a memory (e.g., memory 230). The processor 210 extracts feature points from the image, forms an ellipse region using the extracted feature points, and recognizes a portion corresponding to a large ellipse region of the formed ellipse region as a face region. For example, the processor 210 may form a large elliptical region by connecting a plurality of minutiae located at the greatest distance from a minutiae located at the very center of the extracted minutiae (e.g., nose minutiae) to one line.

동작(1703)에서, 전자 장치(201)(예: 프로세서(210))는 상기 얼굴 영역 내 하나 이상의 오브젝트들을 설정할 수 있다. 상기 오브젝트는 얼굴을 구성하는 요소를 의미하는 것으로, 예를 들어, 눈썹, 눈, 코, 또는 입 중 적어도 하나일 수 있다. 프로세서(210)는 얼굴을 구성하는 요소의 특성을 이용하여 얼굴 영역 내 오브젝트를 설정할 수 있다. 프로세서(210)는 얼굴 영역 내 위치하는 특징점들을 이용하여 오브젝트의 속성(예: 눈썹, 눈, 코, 입), 형태(예: 모양) 또는 위치 중 적어도 하나를 분석할 수 있다. 동작(1703)은 도 4의 동작(407)과 동일 또는 유사하므로, 자세한 설명을 생략할 수 있다.At operation 1703, the electronic device 201 (e.g., processor 210) may set one or more objects within the face area. The object refers to an element constituting a face, and may be at least one of eyebrow, eye, nose, or mouth, for example. The processor 210 can set an object in the face region using the characteristics of the elements constituting the face. Processor 210 may analyze at least one of the attributes (e.g., eyebrows, eyes, nose, mouth), shape (e.g., shape), or position of the object using feature points located within the face region. The operation 1703 is the same as or similar to the operation 407 of FIG. 4, and therefore detailed description may be omitted.

동작(1705)에서, 전자 장치(201)(예: 프로세서(210))는 상기 하나 이상의 오브젝트들을 이용하여 상기 얼굴 영역 내 기준선을 설정할 수 있다. 사람의 얼굴은 타원형이므로, 프로세서(210)는 타원형에서 장축을 잇는 선을 기준선으로 설정할 수 있다. 예를 들어, 사람의 얼굴형에서 장축은 이마에서부터 턱으로 내려가는 수직 방향 또는 세로 방향을 의미할 수 있다. 예를 들어, 상기 기준선은 이마부터 눈썹 사이의 중앙점 및 코끝까지 이어지는 선일 수 있다. 또는, 상기 기준선은 이마부터 눈썹 사이의 중앙점 및 입의 중앙점까지 이어지는 선일 수 있다. 동작(1705)은 도 5의 동작(503)과 동일 또는 유사하므로 자세한 설명을 생략할 수 있다.In operation 1705, the electronic device 201 (e.g., processor 210) may set the baseline in the face area using the one or more objects. Since the face of a person is elliptical, the processor 210 can set a line connecting an ellipse and a major axis as a reference line. For example, in a human face, the long axis may mean a vertical or vertical direction from the forehead to the jaw. For example, the baseline may be a line extending from the forehead to the middle point between the eyebrows and the tip of the nose. Alternatively, the baseline may be a line extending from the forehead to the midpoint between the eyebrows and the midpoint of the mouth. The operation 1705 is the same as or similar to the operation 503 of FIG. 5, and therefore detailed description may be omitted.

동작(1707)에서, 전자 장치(201)(예: 프로세서(210))는 상기 기준선을 기준으로 상기 얼굴 영역을 분할할 수 있다. 예를 들어, 프로세서(210)는 기준선을 기준으로 얼굴의 위(예: 이마)에서부터 아래(예: 턱) 방향으로 얼굴 영역을 분할할 수 있다. 프로세서(210)는 이마 및 눈을 포함하는 제1 영역, 코 및 입을 포함하는 제2 영역, 턱 부분을 포함하는 제3 영역으로 얼굴 영역을 분할할 수 있다. 영역을 분할하는 방법은 실시예에 따라 다양하게 구현될 수 있으며, 이하 설명에 의해 본 발명이 제한되는 것은 아니다.In operation 1707, the electronic device 201 (e.g., processor 210) may segment the face region based on the baseline. For example, the processor 210 may segment the face region from a location above the face (e.g., forehead) to below (e.g., jaw) relative to a baseline. The processor 210 may divide the face region into a first region including a forehead and eye, a second region including a nose and mouth, and a third region including a jaw portion. The method of dividing the area can be variously implemented according to the embodiment, and the present invention is not limited by the following description.

동작(1709)에서, 전자 장치(201)(예: 프로세서(210))는 상기 분할된 얼굴 영역별 보정 비율을 계산할 수 있다. 얼굴 형상(또는 영역) 보정은 얼굴의 윤곽을 축소 보정하는 것을 의미할 수 있다. 프로세서(210)는 얼굴 전체적인 비율을 고려하여 얼굴의 윤곽을 축소하는 보정을 수행할 수 있다. 예를 들어, 프로세서(210)는 얼굴 영역을 이마 및 눈을 포함하는 제1 영역, 코 및 입을 포함하는 제2 영역, 턱 부분을 포함하는 제3 영역으로 분할한 경우, 제1 영역에 대한 보정 비율과, 제2 영역에 대한 보정 비율, 제3 영역에 대한 보정 비율을 각각 계산할 수 있다.In operation 1709, the electronic device 201 (e.g., processor 210) may calculate the correction ratio for each of the divided face regions. The face shape (or area) correction may mean to reduce the contour of the face. The processor 210 may perform correction to reduce the contour of the face in consideration of the overall face ratio. For example, when the processor 210 divides the face region into a first region including the forehead and eye, a second region including the nose and mouth, and a third region including the jaw portion, the correction for the first region The correction ratio for the second area, and the correction ratio for the third area, respectively.

동작(1711)에서, 전자 장치(201)(예: 프로세서(210))는 상기 계산된 보정 비율에 적어도 기반하여 상기 얼굴 영역을 보정할 수 있다. 프로세서(210)는 분할된 영역별 보정 비율을 각각 다르게 적용하여 얼굴 영역을 보정할 수 있다. 또는, 프로세서(210)는 분할된 영역별 장축 방향 보정 비율과 단축 방향 보정 비율을 각각 적용하여 얼굴 영역을 보정할 수 있다. 프로세서(210)는 상기 보정 비율에 맞춰 해당하는 픽셀을 이동시켜 얼굴 영역을 보정할 수 있다. 예를 들어, 프로세서(210)는 얼굴을 좌, 우로 축소할 경우, 축소된 부분만큼 얼굴 영역의 외부 픽셀로 채울 수 있다. 또는, 프로세서(210)는 얼굴을 좌, 우로 확대하고, 위쪽으로 축소할 경우, 확대된 부분만큼 얼굴 경계 부분을 얼굴 영역에 포함된 픽셀로 채우고, 축소된 부분만큼 얼굴 영역의 외부 픽셀로 채울 수 있다.At operation 1711, the electronic device 201 (e.g., processor 210) may correct the face region based at least on the calculated correction ratio. The processor 210 may correct the face area by applying different correction ratios for each divided area. Alternatively, the processor 210 may correct the face region by applying the long axis direction correction ratio and the short axis direction correction ratio for each divided region. The processor 210 may correct the face region by moving the corresponding pixel according to the correction ratio. For example, the processor 210 may fill in the external pixels of the face region by the reduced portion when reducing the face to left and right. Alternatively, the processor 210 may enlarge the face to the left and right and, when zooming up, fill the face boundary with pixels included in the face region by the enlarged portion and fill it with the external pixels of the face region by the reduced portion have.

동작(1713)에서, 전자 장치(201)(예: 프로세서(210))는 상기 보정된 이미지를 표시할 수 있다. 프로세서(120)는 동작(1701) 내지 동작(1711)을 수행하여 이미지를 보정한 후, 보정된 이미지를 디스플레이(260)에 표시할 수 있다. 사용자는 디스플레이(260)을 통해 표시된 이미지를 확인하고, 선택적으로 표시된 이미지를 저장할 수 있다. 프로세서(210)는 상기 사용자로부터 저장 요청(예: 저장 버튼 선택)이 있는 경우, 표시된 이미지를 메모리(230)에 저장할 수 있다.At operation 1713, the electronic device 201 (e.g., processor 210) may display the corrected image. Processor 120 may perform operations 1701 through 1711 to correct the image and then display the corrected image on display 260. [ The user can view the displayed image via the display 260 and optionally store the displayed image. The processor 210 may store the displayed image in the memory 230 if there is a storage request (e.g., a save button selection) from the user.

다양한 실시예들에 따른 전자 장치의 동작 방법은 이미지로부터 추출된 특징점에 적어도 기반하여 얼굴 영역을 인식하는 동작, 상기 얼굴 영역 내 하나 이상의 오브젝트들을 설정하는 동작, 상기 하나 이상의 오브젝트들을 이용하여 상기 얼굴 영역 내 기준선을 설정하는 동작, 상기 기준선을 기준으로 상기 얼굴 영역을 분할하는 동작, 상기 분할된 얼굴 영역별 보정 비율을 계산하는 동작, 상기 계산된 보정 비율에 적어도 기반하여 얼굴 영역을 보정하는 동작, 및 상기 보정된 이미지를 표시하는 동작을 포함할 수 있다.According to various embodiments, an operating method of an electronic device includes: recognizing a face region based at least on feature points extracted from the image; setting one or more objects within the face region; An operation of dividing the face area based on the reference line, an operation of calculating a correction ratio for each divided face area, an operation of correcting the face area based at least on the calculated correction ratio, And displaying the corrected image.

상기 얼굴 영역은 타원형으로 인식되고, 상기 기준선은 상기 타원형 내 장축을 잇는 선으로 설정되고, 상기 방법은 상기 기준선을 이용하여 상기 얼굴 영역의 기울기를 판단하는 동작을 더 포함할 수 있다.The face region is recognized as an ellipse, the reference line is set as a line connecting the elliptical inner longitudinal axis, and the method may further include determining an inclination of the face region using the reference line.

상기 계산하는 동작은, 상기 얼굴 영역의 기울기에 적어도 기반하여 상기 얼굴 영역의 장축 방향으로 보정 비율을 계산하는 동작, 및 상기 얼굴 영역의 기울기에 적어도 기반하여 상기 얼굴 영역의 단축 방향으로 보정 비율을 계산하는 동작을 포함할 수 있다.Calculating the correction ratio in the major axis direction of the face region based at least on the slope of the face region and calculating the correction ratio in the minor axis direction of the face region based at least on the slope of the face region . ≪ / RTI >

상기 확대 비율을 계산하는 동작은, 상기 얼굴 영역의 전체 비율에 적어도 기반하여 상기 분할된 얼굴 영역별 보정 비율을 차등적으로 계산하는 동작을 포함할 수 있다.The operation of calculating the enlargement ratio may include an operation of variably calculating the correction ratio of the divided face regions based on at least the total ratio of the face regions.

상기 방법은 상기 하나 이상의 오브젝트들 중에서 눈 오브젝트에 대응하여 타원 영역을 형성하는 동작, 상기 타원 영역의 장축을 잇는 기준선을 설정하는 동작, 상기 설정된 기준선의 기울기에 적어도 기반하여 확대 비율을 계산하는 동작, 및 상기 계산된 확대 비율에 적어도 기반하여 상기 타원 영역을 확대하는 동작을 더 포함할 수 있다.The method includes: forming an ellipse region corresponding to an eye object among the at least one object; setting a reference line connecting the major axis of the ellipse region; calculating an enlargement ratio based on the slope of the set reference line; And enlarging the ellipse region based on at least the calculated enlargement ratio.

상기 확대 비율을 계산하는 동작은, 상기 타원 영역 내 눈동자 영역을 검출하는 동작, 및 상기 눈동자 영역의 크기, 기울기 방향, 또는 위치 중 적어도 하나에 기반하여 눈동자 영역에 대한 확대 비율을 계산하는 동작을 포함할 수 있다.Wherein the operation of calculating the magnification ratio includes an operation of detecting a pupil region in the elliptical region and an operation of calculating an enlargement ratio with respect to the pupil region based on at least one of the size, the gradient direction, or the position of the pupil region can do.

상기 방법은, 상기 타원 영역에 대한 확대 비율과 상기 눈동자 영역에 대한 확대 비율을 서로 다르게 적용하여 상기 눈 오브젝트를 보정하는 동작을 포함할 수 있다.The method may include correcting the eye object by applying different magnification ratios to the elliptical region and the pupil region.

상기 방법은, 상기 이미지를 이용하여 적어도 하나의 가이드 마스크를 생성하는 동작, 상기 이미지의 보정 타입에 기반하여 상기 적어도 하나의 가이드 마스크의 적용 비율을 결정하는 동작, 결정된 적용 비율에 기반하여 보정 마스크를 생성하는 동작, 및 상기 보정 마스크에 기반하여 상기 얼굴 영역을 포함하는 보정 영역을 검출하는 동작을 더 포함할 수 있다.The method includes: generating at least one guide mask using the image; determining an application ratio of the at least one guide mask based on the correction type of the image; determining a correction mask based on the determined application ratio And detecting a correction region including the face region based on the correction mask.

상기 보정 영역을 검출하는 동작은, 상기 이미지 내 평균 밝기와 평균 색상 또는 상기 얼굴 영역 내 평균 밝기와 평균 색상을 이용하여 반사광 영역을 검출하는 동작, 및 상기 검출된 반사광 영역을 상기 보정 영역에 포함하는 동작을 포함할 수 있다.Wherein the operation of detecting the correction region includes the steps of detecting a reflected light region using the average brightness in the image and the average color or the average brightness in the face region and the average color, Operation.

상기 보정 마스크를 생성하는 동작은, 상기 이미지의 보정 타입에 기반하여 상기 적어도 하나의 가이드 마스크에 차등적으로 적용 비율을 결정하는 동작, 상기 적용 비율을 상기 적어도 하나의 가이드 마스크에 적용시켜 상기 이미지의 보정 타입에 따라 서로 다른 상기 보정 마스크를 생성하는 동작을 포함할 수 있다.Wherein the act of generating the correction mask comprises: determining a different application ratio to the at least one guide mask based on a correction type of the image; applying the application rate to the at least one guide mask, And generating the different correction mask according to the correction type.

상기 방법은, 상기 이미지와 연관된 정보를 이용하여 보정 파라미터를 설정하는 동작, 상기 설정된 보정 파라미터에 기반하여 보정 우선 순위를 결정하는 동작, 및 상기 보정 우선 순위에 기반하여 전역적 보정 또는 지역적 보정에 대한 처리를 수행하는 동작을 더 포함할 수 있다.The method comprising: setting a correction parameter using information associated with the image, determining a correction priority based on the set correction parameter, and determining a global correction based on the correction priority, And may further include an operation of performing processing.

상기 수행하는 동작은, 상기 보정 파라미터에 적어도 기반하여 상기 전역적 보정 또는 상기 지역적 보정 중 어느 하나를 이용하여 상기 얼굴 영역에 대한 보정에 대한 제1 처리를 수행하는 동작, 및 상기 전역적 보정 또는 상기 지역적 보정 중 나머지 하나를 이용하여 상기 제1 처리된 얼굴 영역에 대한 보정에 대한 제2 처리를 수행하는 동작을 포함할 수 있다.Wherein the performing comprises performing a first process for a correction for the face region using either the global correction or the local correction based at least in part on the correction parameter, And performing a second process for correction of the first processed face region using the other of the local correction.

상기 수행하는 동작은, 상기 이미지의 얼굴 영역에 반사광이 검출되는 경우, 상기 전역적 보정 이후에 상기 지역적 보정을 수행하는 동작을 포함할 수 있다.The performing may include performing the local correction after the global correction when reflected light is detected in a face region of the image.

다양한 실시예들에 따른 컴퓨터로 판독 가능한 기록 매체는 이미지로부터 추출된 특징점에 기반하여 얼굴 영역을 인식하는 동작, 상기 얼굴 영역 내 하나 이상의 오브젝트들을 설정하는 동작, 상기 하나 이상의 오브젝트들을 이용하여 상기 얼굴 영역 내 기준선을 설정하는 동작, 상기 기준선을 기준으로 상기 얼굴 영역을 분할하는 동작, 상기 분할된 얼굴 영역별 보정 비율을 계산하는 동작, 상기 계산된 보정 비율에 따라 상기 얼굴 영역을 보정하는 동작, 및 상기 보정된 이미지를 표시하는 동작을 실행하기 위한 프로그램을 포함할 수 있다.According to various embodiments, a computer-readable medium having computer-executable instructions for performing the steps of: recognizing a face region based on feature points extracted from the image; setting one or more objects within the face region; An operation of dividing the face region based on the reference line, an operation of calculating a correction ratio for each of the divided face regions, an operation of correcting the face region in accordance with the calculated correction ratio, And a program for executing an operation of displaying the corrected image.

컴퓨터로 판독 가능한 기록 매체는, 하드디스크, 플로피디스크, 마그네틱 매체(예: 자기테이프), 광기록 매체(예: CD-ROM, DVD, 자기-광 매체 (예: 플롭티컬 디스크), 내장 메모리 등을 포함할 수 있다. 명령어는 컴파일러에 의해 만들어지는 코드 또는 인터프리터에 의해 실행될 수 있는 코드를 포함할 수 있다. 다양한 실시예에 따른 모듈 또는 프로그램 모듈은 전술한 구성요소들 중 적어도 하나 이상을 포함하거나, 일부가 생략되거나, 또는 다른 구성요소를 더 포함할 수 있다. 다양한 실시예에 따른, 모듈, 프로그램 모듈 또는 다른 구성요소에 의해 수행되는 동작들은 순차적, 병렬적, 반복적 또는 휴리스틱하게 실행되거나, 적어도 일부 동작이 다른 순서로 실행되거나, 생략되거나, 또는 다른 동작이 추가될 수 있다.The computer-readable recording medium may be a hard disk, a floppy disk, a magnetic medium such as a magnetic tape, an optical recording medium such as a CD-ROM, a DVD, a magnetic-optical medium such as a floppy disk, The instructions may include code that is generated by the compiler or code that may be executed by the interpreter. Modules or program modules according to various embodiments may include at least one or more of the components described above Operations that are performed by modules, program modules, or other components, in accordance with various embodiments, may be performed in a sequential, parallel, iterative, or heuristic manner, or at least in part Some operations may be executed in a different order, omitted, or other operations may be added.

그리고 본 명세서와 도면에 개시된 실시 예들은 본 발명의 내용을 쉽게 설명하고, 이해를 돕기 위해 특정 예를 제시한 것일 뿐이며, 본 발명의 범위를 한정하고자 하는 것은 아니다. 따라서 본 발명의 범위는 여기에 개시된 실시 예들 이외에도 본 발명의 기술적 사상을 바탕으로 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.It is to be understood that both the foregoing general description and the following detailed description of the present invention are exemplary and explanatory and are intended to provide further explanation of the invention as claimed. Accordingly, the scope of the present invention should be construed as being included in the scope of the present invention, all changes or modifications derived from the technical idea of the present invention.

101: 전자 장치
110: 버스 120: 프로세서
130: 메모리 140: 프로그램
150: 입출력 인터페이스 160: 디스플레이
170: 통신 인터페이스
101: Electronic device
110: bus 120: processor
130: memory 140: program
150: input / output interface 160: display
170: Communication interface

Claims (20)

전자 장치에 있어서,
메모리;
디스플레이;
카메라; 및
상기 메모리, 상기 디스플레이 또는 상기 카메라와 기능적으로 연결된 프로세서를 포함하고, 상기 프로세서는,
이미지로부터 추출된 특징점에 적어도 기반하여 얼굴 영역을 인식하고, 상기 얼굴 영역 내 하나 이상의 오브젝트들을 설정하고, 상기 하나의 이상의 오브젝트들을 이용하여 상기 얼굴 영역 내 기준선을 설정하고, 상기 기준선을 기준으로 상기 얼굴 영역을 분할하고, 상기 분할된 얼굴 영역별 보정 비율을 계산하고, 계산된 보정 비율에 적어도 기반하여 상기 얼굴 영역을 보정하고, 상기 보정된 이미지를 상기 디스플레이 표시하도록 설정된 전자 장치.
In an electronic device,
Memory;
display;
camera; And
And a processor operably coupled to the memory, the display, or the camera,
Recognizing the face region based on at least the feature points extracted from the image, setting one or more objects in the face region, setting the in-face reference line using the one or more objects, To calculate a correction ratio for each of the divided face areas, to correct the face area based at least on the calculated correction ratio, and to display the corrected image on the display.
제1항에 있어서,
상기 얼굴 영역은, 타원형으로 인식되고,
상기 기준선은, 상기 타원형 내 장축을 잇는 선으로 설정되고,
상기 프로세서는, 상기 기준선에 적어도 기반하여 상기 얼굴 영역의 기울기를 판단하도록 설정된 전자 장치.
The method according to claim 1,
The face region is recognized as an ellipse,
The reference line is set as a line connecting the elliptical inner longitudinal axis,
Wherein the processor is configured to determine a slope of the face region based at least on the baseline.
제2항에 있어서, 상기 프로세서는,
상기 얼굴 영역의 기울기에 적어도 기반하여 상기 얼굴 영역의 장축 방향으로 보정 비율을 계산하고, 상기 얼굴 영역의 기울기에 적어도 기반하여 상기 얼굴 영역의 단축 방향으로 보정 비율을 계산하도록 설정된 전자 장치.
3. The apparatus of claim 2,
Calculate a correction ratio in a major axis direction of the face region based at least on a slope of the face region, and calculate a correction ratio in a direction of a short axis of the face region based at least on a slope of the face region.
제1항에 있어서, 상기 프로세서는,
상기 얼굴 영역의 전체 비율에 적어도 기반하여, 상기 분할된 얼굴 영역별 보정 비율을 차등적으로 계산하도록 설정된 전자 장치.
2. The apparatus of claim 1,
And to calculate the correction ratios of the divided face regions based on at least the total ratio of the face regions.
제1항에 있어서, 상기 프로세서는,
상기 하나 이상의 오브젝트들 중에서 눈 오브젝트에 대응하여 타원 영역을 형성하고, 상기 타원 영역의 기울기에 적어도 기반하여 확대 비율을 계산하고, 계산된 확대 비율에 적어도 기반하여 상기 타원 영역을 확대하도록 설정된 전자 장치.
2. The apparatus of claim 1,
An elliptical region corresponding to the eye object among the at least one object is calculated, an enlargement ratio is calculated based on at least the slope of the elliptical region, and the elliptical region is enlarged based on the calculated enlargement ratio.
제5항에 있어서, 상기 프로세서는,
상기 타원 영역의 장축을 잇는 기준선을 설정하고, 설정된 기준선의 기울기를 판단하고, 상기 기준선의 기울기에 적어도 기반하여 확대 비율을 계산하도록 설정된 전자 장치.
6. The apparatus of claim 5,
The reference line connecting the major axis of the elliptical region is set, the slope of the set reference line is determined, and the magnification ratio is calculated based at least on the slope of the reference line.
제5항에 있어서, 상기 프로세서는,
상기 타원 영역 내 눈동자 영역을 검출하고, 상기 눈동자 영역의 크기, 기울기 방향, 또는 위치에 적어도 기반하여 눈동자 영역에 대한 확대 비율을 계산하도록 설정된 전자 장치.
6. The apparatus of claim 5,
Detect a pupil region in the elliptical region, and calculate an enlargement ratio for the pupil region based at least on the size, tilt direction, or position of the pupil region.
제7항에 있어서, 상기 프로세서는,
상기 타원 영역에 대한 확대 비율과 상기 눈동자 영역에 대한 확대 비율을 서로 다르게 적용하여 상기 눈 오브젝트를 보정하도록 설정된 전자 장치.
8. The apparatus of claim 7,
And the eye object is corrected by applying different magnification ratios to the ellipse region and the pupil region.
제1항에 있어서, 상기 프로세서는,
상기 이미지와 연관된 정보를 이용하여 보정 파라미터를 설정하고, 설정된 보정 파라미터에 적어도 기반하여 보정 우선 순위를 결정하고, 상기 보정 우선 순위에 적어도 기반하여 상기 얼굴 영역에 대한 전역적 보정 또는 지역적 보정에 대한 처리를 수행하도록 설정된 전자 장치.
2. The apparatus of claim 1,
Setting a correction parameter using information associated with the image, determining a correction priority based at least on a set correction parameter, and performing a global correction or local correction on the face region based at least on the correction priority . ≪ / RTI >
제9항에 있어서, 상기 프로세서는,
상기 보정 파라미터에 적어도 기반하여,
상기 전역적 보정 또는 상기 지역적 보정 중 어느 하나를 이용하여 상기 얼굴 영역에 대한 보정에 대한 제1 처리를 수행하고,
상기 전역적 보정 또는 상기 지역적 보정 중 나머지 하나를 이용하여 상기 제1 처리된 얼굴 영역에 대한 보정에 대한 제2 처리를 수행하도록 설정된 전자 장치.
10. The apparatus of claim 9,
Based on at least the correction parameter,
Performing a first process for the correction on the face area using either the global correction or the local correction,
And perform a second process for the correction for the first processed face region using the other one of the global correction or the local correction.
제9항에 있어서, 상기 프로세서는,
상기 이미지의 얼굴 영역에 반사광이 검출되는 경우, 상기 전역적 보정에 대한 처리를 수행한 후에 상기 지역적 보정에 대한 처리를 수행하도록 설정된 전자 장치.
10. The apparatus of claim 9,
And configured to perform processing for the global correction after performing processing for the global correction when reflected light is detected in the face region of the image.
전자 장치에 있어서,
카메라; 및
프로세서를 포함하고, 상기 프로세서는,
상기 카메라를 이용하여, 얼굴이 포함된 이미지를 획득하고;
상기 얼굴에 대한 검출 방법에 적어도 기반하여, 상기 얼굴과 관련된 복수의 가이드 마스크들을 생성하고;
상기 복수의 가이드 마스크들의 적어도 일부와 상기 얼굴 중 피부에 해당될 확률에 적어도 기반하여, 상기 피부에 대한 이미지 처리 방법을 결정하고; 및
상기 결정된 이미지 처리 방법에 적어도 기반하여, 상기 피부의 일부를 보정하도록 설정된 전자 장치.
In an electronic device,
camera; And
The processor comprising:
Using the camera to obtain an image including a face;
Generate a plurality of guide masks associated with the face, based at least in part on a detection method for the face;
Determine an image processing method for the skin based at least on a probability that at least a portion of the plurality of guide masks and skin of the face corresponds to the skin; And
And to adjust a portion of the skin based at least in part on the determined image processing method.
제12항에 있어서, 상기 프로세서는,
상기 이미지 중 상기 피부의 적어도 일부가 보정된 얼굴에 대응하는 영역 중, 상기 얼굴을 구성하는 복수의 오브젝트들에 대응하는 영역에 대해 윤곽선 검출을 위한 가이드 마스크를 이용하여, 상기 복수의 오브젝트들의 윤곽선들을 포함하는 피부 영역을 인식하도록 설정된 전자 장치.
13. The system of claim 12,
Using a guide mask for contour detection for an area corresponding to a plurality of objects constituting the face among the areas corresponding to the corrected face of at least a part of the skin of the skin, Wherein the electronic device is configured to recognize a skin area that includes the skin.
제12항에 있어서, 상기 프로세서는,
상기 이미지 중 상기 피부의 적어도 일부가 보정된 얼굴에 대응하는 영역 중, 상기 얼굴을 구성하는 복수의 오브젝트들에 대응하는 영역에 대해 필터를 이용하여, 상기 복수의 오브젝트들의 윤곽선들에 해당될 확률이 낮은 피부 영역을 인식하도록 설정된 전자 장치.
13. The system of claim 12,
A probability that a probability corresponding to the contours of the plurality of objects is equal to or greater than a predetermined threshold value is obtained by using a filter for an area corresponding to a plurality of objects constituting the face, An electronic device set to recognize a low skin area.
제12항에 있어서, 상기 프로세서는,
상기 이미지에 대한 보정 타입에 적어도 기반하여 상기 복수의 가이드 마스크들의 조합 법칙을 변경하고,
상기 변경된 조합 법칙에 적어도 기반하여 상기 얼굴을 구성하는 복수의 오브젝트들에 해당될 확률들을 결정하고, 및
상기 결정된 확률에 적어도 기반하여, 상기 피부에 대한 이미지 처리 방법을 결정하도록 설정된 전자 장치.
13. The system of claim 12,
Modifying a combination law of the plurality of guide masks based at least on a correction type for the image,
Determine probabilities corresponding to a plurality of objects constituting the face based at least on the changed combination rule, and
And determine, based at least in part on the determined probability, an image processing method for the skin.
전자 장치의 동작 방법에 있어서,
이미지로부터 추출된 특징점에 적어도 기반하여 얼굴 영역을 인식하는 동작;
상기 얼굴 영역 내 하나 이상의 오브젝트들을 설정하는 동작;
상기 하나 이상의 오브젝트들을 이용하여 상기 얼굴 영역 내 기준선을 설정하는 동작;
상기 기준선을 기준으로 상기 얼굴 영역을 분할하는 동작;
상기 분할된 얼굴 영역별 보정 비율을 계산하는 동작;
상기 계산된 보정 비율에 적어도 기반하여 상기 얼굴 영역을 보정하는 동작; 및
상기 보정된 이미지를 표시하는 동작을 포함하는 방법.
A method of operating an electronic device,
Recognizing a face region based at least on feature points extracted from the image;
Setting one or more objects in the face area;
Setting the in-face area baseline using the one or more objects;
Dividing the face region based on the reference line;
Calculating a correction ratio for each of the divided face regions;
Correcting the face region based at least on the calculated correction ratio; And
And displaying the corrected image.
제16항에 있어서,
상기 얼굴 영역은, 타원형으로 인식되고,
상기 기준선은, 상기 타원형 내 장축을 잇는 선으로 설정되고,
상기 기준선을 이용하여 상기 얼굴 영역의 기울기를 판단하는 동작을 더 포함하는 방법.
17. The method of claim 16,
The face region is recognized as an ellipse,
The reference line is set as a line connecting the elliptical inner longitudinal axis,
Further comprising determining the slope of the face region using the baseline.
제17항에 있어서, 상기 계산하는 동작은,
상기 얼굴 영역의 기울기에 적어도 기반하여 상기 얼굴 영역의 장축 방향으로 보정 비율을 계산하는 동작; 및
상기 얼굴 영역의 기울기에 적어도 기반하여 상기 얼굴 영역의 단축 방향으로 보정 비율을 계산하는 동작을 포함하는 방법.
18. The method of claim 17,
Calculating a correction ratio in a major axis direction of the face region based at least on a slope of the face region; And
And calculating a correction ratio in the direction of the short axis of the face region based at least on the slope of the face region.
제16항에 있어서,
상기 적어도 하나의 오브젝트 중에서 눈 오브젝트에 대응하여 타원 영역을 형성하는 동작;
상기 타원 영역의 장축을 잇는 기준선을 설정하는 동작;
상기 설정된 기준선의 기울기에 따라 확대 비율을 계산하는 동작; 및
상기 계산된 확대 비율에 기반하여 타원 영역을 확대하는 동작을 더 포함하는 방법.
17. The method of claim 16,
Forming an elliptical region corresponding to a snow object among the at least one object;
Setting a reference line connecting the major axis of the elliptical region;
Calculating an enlargement ratio according to the slope of the set reference line; And
And enlarging the elliptical region based on the calculated enlargement ratio.
제19항에 있어서, 상기 확대 비율을 계산하는 동작은,
상기 타원 영역 내 눈동자 영역을 검출하는 동작; 및
상기 눈동자 영역의 크기, 기울기 방향, 또는 위치 중 적어도 하나에 기반하여 눈동자 영역에 대한 확대 비율을 계산하는 동작을 포함하는 방법.
20. The method of claim 19,
Detecting a pupil region in the elliptical region; And
Calculating an enlargement ratio for the pupil region based on at least one of a magnitude, a gradient direction, or a position of the pupil region.
KR1020170038482A 2017-03-27 2017-03-27 Method for enhancing face image and electronic device for the same KR20180109217A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170038482A KR20180109217A (en) 2017-03-27 2017-03-27 Method for enhancing face image and electronic device for the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170038482A KR20180109217A (en) 2017-03-27 2017-03-27 Method for enhancing face image and electronic device for the same

Publications (1)

Publication Number Publication Date
KR20180109217A true KR20180109217A (en) 2018-10-08

Family

ID=63864573

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170038482A KR20180109217A (en) 2017-03-27 2017-03-27 Method for enhancing face image and electronic device for the same

Country Status (1)

Country Link
KR (1) KR20180109217A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200042197A (en) * 2018-10-15 2020-04-23 정원주 Apparatus and method of matching faces using a deep learning
WO2020141754A1 (en) * 2018-12-31 2020-07-09 이준호 Method for recommending product to be worn on face, and apparatus therefor
CN112991191A (en) * 2019-12-13 2021-06-18 北京金山云网络技术有限公司 Face image enhancement method and device and electronic equipment
KR20220046982A (en) * 2020-10-08 2022-04-15 주식회사 써머캣 Device for retouching facial contour included in image and operating method of the same
KR20220060892A (en) * 2020-11-05 2022-05-12 주식회사 에스원 Method and apparatus for measuring body temperature using thermal image sensor
KR102608777B1 (en) * 2022-09-28 2023-12-04 주식회사 레코더즈 Method, apparatus and computer program for providing automated calibration service for user's profile image

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200042197A (en) * 2018-10-15 2020-04-23 정원주 Apparatus and method of matching faces using a deep learning
WO2020141754A1 (en) * 2018-12-31 2020-07-09 이준호 Method for recommending product to be worn on face, and apparatus therefor
KR20200085723A (en) * 2018-12-31 2020-07-15 이준호 Method and device for recommending facial wear products
CN112991191A (en) * 2019-12-13 2021-06-18 北京金山云网络技术有限公司 Face image enhancement method and device and electronic equipment
KR20220046982A (en) * 2020-10-08 2022-04-15 주식회사 써머캣 Device for retouching facial contour included in image and operating method of the same
KR20220060892A (en) * 2020-11-05 2022-05-12 주식회사 에스원 Method and apparatus for measuring body temperature using thermal image sensor
KR102608777B1 (en) * 2022-09-28 2023-12-04 주식회사 레코더즈 Method, apparatus and computer program for providing automated calibration service for user's profile image

Similar Documents

Publication Publication Date Title
KR102349428B1 (en) Method for processing image and electronic device supporting the same
KR102317820B1 (en) Method for processing image and electronic device supporting the same
US10917552B2 (en) Photographing method using external electronic device and electronic device supporting the same
KR102329862B1 (en) Method and electronic device for converting color of image
KR102401659B1 (en) Electronic device and method for processing video according to camera photography environment and scene using the same
KR20180003235A (en) Electronic device and image capturing method thereof
US10410407B2 (en) Method for processing image and electronic device thereof
KR20180109217A (en) Method for enhancing face image and electronic device for the same
KR20170097860A (en) Device for capturing image using display and method for the same
KR20160144851A (en) Electronic apparatus for processing image and mehotd for controlling thereof
US10460443B2 (en) Electronic device and method for applying correction scheme(s) to an image
KR20180013277A (en) Electronic apparatus for displaying graphic object and computer readable recording medium
KR20180001254A (en) Apparatus and method for processing an image
KR102359276B1 (en) Method and apparatus for controlling white balance function of electronic device
KR20180024337A (en) A driving method for a display including a curved display area and a display driving circuit and an electronic device supporting the same
KR20160149842A (en) Method for processing an image and electronic device thereof
KR102379898B1 (en) Electronic device for providing a graphic indicator related to a focus and method of operating the same
KR20180013523A (en) Apparatus and Method for Sequentially displaying Images on the Basis of Similarity of Image
KR20180014498A (en) Electronic device for improving a visibility of text and method of operating the same
KR102434754B1 (en) Electronic device and method for displaying content thereof
KR102457247B1 (en) Electronic device for processing image and method for controlling thereof
EP3280131B1 (en) Method of processing image and electronic device supporting the same
KR20180091380A (en) Electronic device and operating method thereof
KR102317624B1 (en) Electronic device and method for processing image of the same
KR102391490B1 (en) Method for tracking an object in an image and electronic device thereof