KR102243466B1 - Method and apparatus for detecting eye of animal in image - Google Patents

Method and apparatus for detecting eye of animal in image Download PDF

Info

Publication number
KR102243466B1
KR102243466B1 KR1020200056872A KR20200056872A KR102243466B1 KR 102243466 B1 KR102243466 B1 KR 102243466B1 KR 1020200056872 A KR1020200056872 A KR 1020200056872A KR 20200056872 A KR20200056872 A KR 20200056872A KR 102243466 B1 KR102243466 B1 KR 102243466B1
Authority
KR
South Korea
Prior art keywords
image
electronic device
contour
guide
guide area
Prior art date
Application number
KR1020200056872A
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 KR1020200056872A priority Critical patent/KR102243466B1/en
Application granted granted Critical
Publication of KR102243466B1 publication Critical patent/KR102243466B1/en
Priority to PCT/KR2021/006010 priority patent/WO2021230680A1/en
Priority to US17/573,510 priority patent/US20220139113A1/en

Links

Images

Classifications

    • G06K9/00597
    • 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
    • G06K9/481
    • G06T5/002
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/469Contour-based spatial representations, e.g. vector-coding
    • 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/30004Biomedical image processing
    • G06T2207/30041Eye; Retina; Ophthalmic

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Ophthalmology & Optometry (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)

Abstract

The present disclosure relates to a method for an electronic device to identify an object in an image. According to one embodiment, the method for an electronic device to identify an object in an image comprises the steps of: obtaining an image including an object; determining at least one guide area corresponding to the object in the obtained image; extracting a feature vector for identifying the object from the at least one guide area; identifying the type of object in the image by inputting the extracted feature vector into an artificial intelligence model; and, when the type of the identified object is identified as an animal's eye or partial objects related to the animal's eye, storing at least one pixel value in the image including the object.

Description

이미지 내 동물의 눈 영역을 검출하는 방법 및 장치 {METHOD AND APPARATUS FOR DETECTING EYE OF ANIMAL IN IMAGE}Method and apparatus for detecting the eye area of an animal in an image {METHOD AND APPARATUS FOR DETECTING EYE OF ANIMAL IN IMAGE}

본 개시는 이미지 내 객체를 식별하는 전자 장치 및 방법에 관한 것이다. 보다 상세하게는, 적어도 하나의 객체를 포함하는 이미지로부터 객체를 식별하는 전자 장치 및 방법에 관한 것이다.The present disclosure relates to an electronic device and method for identifying an object in an image. More particularly, it relates to an electronic device and method for identifying an object from an image including at least one object.

정보통신기술이 발전함에 따라 복수의 프레임을 포함하는 영상에 포함된 객체를 식별하기 위한 기술들이 개발되고 있다. 특히, 인간이 지닌 인식 방법을 전자 장치에 적용시킴으로써, 전자 장치가 스스로 영상 내 객체를 식별하거나, 미리 설정된 소정의 객체를 식별하도록 하는 기술들이 개발되고 있다.As information and communication technology develops, technologies for identifying objects included in an image including a plurality of frames are being developed. In particular, technologies are being developed that allow the electronic device to identify an object in an image by itself or to identify a predetermined object set in advance by applying a human recognition method to an electronic device.

또한, 최근 영상 인식 기술을 기반으로, 영상으로부터 사람의 생체 정보를 획득하고, 획득된 생체 정보들을 이용하여 뱅킹, 쇼핑 및 잠금 해제 등을 위한 인증방식으로써 생체 인증 방식을 이용하는 기술 개발이 활발하게 진행되고 있다. 예를 들어, 대표적인 생체 인증 방식으로써, 영상에서 검출된 눈 영역의 이미지를 통한 홍채 인식, 영상에서 검출된 얼굴 영역의 이미지를 통한 얼굴 인식, 영상에서 검출된 손 지문 이미지를 분석하고, 분석된 결과에 기초하여 지문 인식을 수행하는 기술들이 개발되고 있다. In addition, based on recent image recognition technology, biometric information of a person is acquired from an image, and technology using biometric authentication is actively progressing as an authentication method for banking, shopping, and unlocking using the obtained biometric information. Has become. For example, as a representative biometric authentication method, iris recognition through the image of the eye area detected in the image, face recognition through the image of the face area detected in the image, the hand fingerprint image detected in the image is analyzed, and the result of the analysis Technology for performing fingerprint recognition on the basis of is being developed.

그러나, 생체 정보를 통한 인증 기술은, 인증 특성상 높은 정확도를 요구하기 때문에, 여전히 생체 정보를 통하여 정확하게 대상을 인증하기 위한 기술 개발이 요구되고 있다. 또한, 사람을 대상으로 하는 생체 인증 기술뿐만이 아니라, 동물을 대상으로 하는 생체 인증 기술의 개발 역시 요구되고 있다.However, since authentication technology using biometric information requires high accuracy due to authentication characteristics, there is still a need to develop a technology for accurately authenticating an object through biometric information. In addition, development of biometric authentication technology targeting animals as well as biometric authentication technology targeting humans is required.

한국공개특허 제 10-2018-0109665호Korean Patent Publication No. 10-2018-0109665

일 실시 예에 따르면, 이미지 내 객체를 식별하는 전자 장치 및 방법이 제공될 수 있다.According to an embodiment, an electronic device and method for identifying an object in an image may be provided.

또한, 일 실시 예에 의하면, 전자 장치가 이미지 내 객체의 종류를 식별하고, 식별된 객체의 종류에 기초하여 상기 이미지 내 적어도 하나의 픽셀 값들을 저장하는 전자 장치가 제공될 수 있다.In addition, according to an embodiment, an electronic device may be provided in which the electronic device identifies a type of an object in an image and stores at least one pixel value in the image based on the type of the identified object.

상술한 기술적 과제를 달성하기 위한 본 개시의 일 실시 예에 따라, 전자 장치가 이미지 내 객체를 식별하는 방법은 상기 객체를 포함하는 이미지를 획득하는 단계; 상기 획득된 이미지 내 상기 객체에 대응되는 적어도 하나의 가이드 영역을 결정하는 단계; 상기 적어도 하나의 가이드 영역으로부터 상기 객체를 식별하기 위한 특징 벡터를 추출하는 단계; 상기 추출된 특징 벡터를 인공 지능 모델에 입력함으로써 상기 이미지 내 객체의 종류를 식별하는 단계; 및 상기 식별된 객체의 종류가 동물의 눈 또는 상기 동물의 눈과 관련된 부분 객체들로 식별되는 경우, 상기 객체를 포함하는 이미지 내 적어도 하나의 픽셀 값들을 저장하는 단계; 를 포함할 수 있다.According to an embodiment of the present disclosure for achieving the above-described technical problem, a method of identifying an object in an image by an electronic device includes: obtaining an image including the object; Determining at least one guide area corresponding to the object in the acquired image; Extracting a feature vector for identifying the object from the at least one guide area; Identifying a type of object in the image by inputting the extracted feature vector into an artificial intelligence model; And when the type of the identified object is identified as an animal eye or partial objects related to the animal eye, storing at least one pixel value in an image including the object. It may include.

또한, 상기 기술적 과제를 해결하기 위한 본 개시의 또 다른 실시 예에 따라, 이미지 내 객체를 식별하는 전자 장치는 디스플레이; 적어도 하나의 카메라; 하나 이상의 인스트럭션을 저장하는 메모리; 및 상기 하나 이상의 인스트럭션을 실행하는 적어도 하나의 프로세서; 를 포함하고, 상기 프로세서는 상기 하나 이상의 인스트럭션을 실행함으로써, 상기 객체를 포함하는 이미지를 획득하고, 상기 획득된 이미지 내 상기 객체에 대응되는 적어도 하나의 가이드 영역을 결정하고, 상기 적어도 하나의 가이드 영역으로부터 상기 객체를 식별하기 위한 특징 벡터를 추출하고, 상기 추출된 특징 벡터를 인공 지능인공 지능 모델에 입력함으로써 상기 이미지 내 객체의 종류를 식별하고, 상기 식별된 객체의 종류가 동물의 눈 또는 상기 동물의 눈과 관련된 부분 객체들로 식별되는 경우, 상기 객체를 포함하는 이미지 내 적어도 하나의 픽셀 값들을 저장할 수 있다.In addition, according to another embodiment of the present disclosure for solving the above technical problem, an electronic device for identifying an object in an image includes a display; At least one camera; A memory for storing one or more instructions; And at least one processor executing the one or more instructions. Including, wherein the processor executes the one or more instructions to obtain an image including the object, determine at least one guide area corresponding to the object in the obtained image, and the at least one guide area A feature vector for identifying the object is extracted from and the extracted feature vector is input to an artificial intelligence artificial intelligence model to identify the type of object in the image, and the identified object type is the animal's eye or the animal. When identified as partial objects related to the eye of the person, at least one pixel value in the image including the object may be stored.

또한, 상기 기술적 과제를 해결하기 위한 본 개시의 또 다른 실시 예에 따라, 전자 장치가 이미지 내 객체를 식별하는 방법에 있어서, 상기 객체를 포함하는 이미지를 획득하는 단계; 상기 획득된 이미지 내 상기 객체에 대응되는 적어도 하나의 가이드 영역을 결정하는 단계; 상기 적어도 하나의 가이드 영역으로부터 상기 객체를 식별하기 위한 특징 벡터를 추출하는 단계; 상기 추출된 특징 벡터를 인공 지능인공 지능 모델에 입력함으로써 상기 이미지 내 객체의 종류를 식별하는 단계; 및 상기 식별된 객체의 종류가 동물의 눈 또는 상기 동물의 눈과 관련된 부분 객체들로 식별되는 경우, 상기 객체를 포함하는 이미지 내 적어도 하나의 픽셀 값들을 저장하는 단계; 를 포함하는, 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체가 제공될 수 있다.In addition, according to another embodiment of the present disclosure for solving the technical problem, a method for identifying an object in an image by an electronic device, the method comprising: acquiring an image including the object; Determining at least one guide area corresponding to the object in the acquired image; Extracting a feature vector for identifying the object from the at least one guide area; Identifying the type of object in the image by inputting the extracted feature vector into an artificial intelligence artificial intelligence model; And when the type of the identified object is identified as an animal eye or partial objects related to the animal eye, storing at least one pixel value in an image including the object. A computer-readable recording medium storing a program for executing a method on a computer including, may be provided.

본 개시의 일 실시 예에 의하면, 이미지 내 객체의 종류를 정확하게 식별할 수 있다.According to an embodiment of the present disclosure, it is possible to accurately identify the type of object in an image.

또한, 일 실시 예에 의하면, 서로 다른 스케일에 따른 복수의 가이드 영역들을 이용함으로써 이미지 내 객체의 종류를 정확하게 식별할 수 있다.In addition, according to an embodiment, by using a plurality of guide areas according to different scales, it is possible to accurately identify the type of object in the image.

도 1은 일 실시 예에 따른 전자 장치가 이미지 내 객체를 식별하는 과정을 개략적으로 설명하기 위한 도면이다.
도 2는 일 실시 예에 따른 전자 장치가 이미지 내 객체를 식별하는 방법을 나타내는 흐름도이다.
도 3은 일 실시 예에 따른 전자 장치가 복수의 스케일에 따른 적어도 하나의 가이드 영역을 결정하는 방법을 구체적으로 설명하기 위한 흐름도이다.
도 4는 일 실시 예에 따른 전자 장치가, 적어도 하나의 가이드 영역을 결정하는 방법을 설명하기 위한 도면이다.
도 5는 일 실시 예에 따른 전자 장치가, 적어도 하나의 가이드 영역 별 객체 식별 결과에 기초하여, 이미지 내 객체의 종류를 식별하는 방법을 설명하기 위한 흐름도이다.
도 6은 일 실시 예에 따른 전자 장치가, 적어도 하나의 가이드 영역 별 객체의 식별 결과에 기초하여, 이미지 내 객체의 종류를 식별하는 방법을 설명하기 위한 도면이다.
도 7은 일 실시 예에 따른 전자 장치가 이미지 내 적어도 하나의 잡음을 제거하기 위해 이미지를 전처리 하는 방법을 설명하기 위한 도면이다.
도 8은 일 실시 예에 따른 전자 장치가 생성된 적어도 하나의 가이드 영역들 중, 일부의 가이드 영역으로부터 특징 벡터를 추출하는 과정을 설명하기 위한 도면이다.
도 9는 일 실시 예에 따른 전자 장치가 적어도 하나의 가이드 영역으로부터, 객체에 관한 윤곽을 검출하는 과정을 설명하기 위한 도면이다.
도 10은 일 실시 예에 따른 전자 장치가 이진화된 적어도 하나의 가이드 영역 내 이미지로부터 윤곽선을 검출하는 구체적인 방법을 설명하기 위한 흐름도이다.
도 11은 일 실시 예에 따른 전자 장치가 이진화된 적어도 하나의 가이드 영역 내 이미지로부터 윤곽선을 검출하는 구체적인 방법을 설명하기 위한 참고 도면이다.
도 12는 일 실시 예에 따라, 전자 장치가 가이드 영역 내 검출된 객체가 눈에 대응될 확률을 결정하기 위해 이용하는 식별 조건을 설명하기 위한 도면이다.
도 13은 일 실시 예에 따른 전자 장치의 블록도이다.
도 14는 또 다른 실시 예에 따른 전자 장치의 블록도이다.
도 15는 일 실시 예에 따른 서버의 블록도이다.
도 16은 일 실시 예에 따라, 전자 장치 및 서버가 서로 연동함으로써 이미지 내 객체를 식별하는 과정을 설명하기 위한 도면이다.
1 is a diagram schematically illustrating a process of identifying an object in an image by an electronic device according to an exemplary embodiment.
2 is a flowchart illustrating a method of identifying an object in an image by an electronic device according to an exemplary embodiment.
3 is a flowchart illustrating a method of determining at least one guide area according to a plurality of scales by an electronic device according to an exemplary embodiment.
4 is a diagram illustrating a method of determining at least one guide area by an electronic device according to an exemplary embodiment.
5 is a flowchart illustrating a method of identifying, by an electronic device, a type of an object in an image based on an object identification result for each guide area, according to an exemplary embodiment.
FIG. 6 is a diagram illustrating a method of identifying a type of an object in an image based on a result of identifying an object for each guide area by an electronic device according to an exemplary embodiment.
7 is a diagram illustrating a method of preprocessing an image in order to remove at least one noise in an image by an electronic device according to an exemplary embodiment.
FIG. 8 is a diagram illustrating a process of extracting a feature vector from some of at least one guide area generated by an electronic device according to an exemplary embodiment.
9 is a diagram for describing a process of detecting an outline of an object from at least one guide area by an electronic device according to an exemplary embodiment.
10 is a flowchart illustrating a detailed method of detecting an outline from an image in at least one binarized guide area by an electronic device according to an exemplary embodiment.
FIG. 11 is a reference diagram for explaining a specific method of detecting an outline from an image in at least one binarized guide area by an electronic device according to an exemplary embodiment.
12 is a diagram illustrating an identification condition used by an electronic device to determine a probability that an object detected in a guide area corresponds to an eye, according to an exemplary embodiment.
13 is a block diagram of an electronic device according to an exemplary embodiment.
14 is a block diagram of an electronic device according to another embodiment.
15 is a block diagram of a server according to an embodiment.
16 is a diagram for describing a process of identifying an object in an image by interworking with each other between an electronic device and a server, according to an embodiment.

본 명세서에서 사용되는 용어에 대해 간략히 설명하고, 본 개시에 대해 구체적으로 설명하기로 한다. The terms used in the present specification will be briefly described, and the present disclosure will be described in detail.

본 개시에서 사용되는 용어는 본 개시에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 개시에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 개시의 전반에 걸친 내용을 토대로 정의되어야 한다. Terms used in the present disclosure have selected general terms that are currently widely used as possible while considering functions in the present disclosure, but this may vary according to the intention or precedent of a technician engaged in the art, the emergence of new technologies, and the like. In addition, in certain cases, there are terms arbitrarily selected by the applicant, and in this case, the meaning of the terms will be described in detail in the description of the corresponding invention. Therefore, the terms used in the present disclosure should be defined based on the meaning of the term and the contents of the present disclosure, not the name of a simple term.

명세서 전체에서 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있음을 의미한다. 또한, 명세서에 기재된 "...부", "모듈" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있다.When a part of the specification is said to "include" a certain component, it means that other components may be further included rather than excluding other components unless specifically stated to the contrary. In addition, terms such as "... unit" and "module" described in the specification mean a unit that processes at least one function or operation, which may be implemented as hardware or software or a combination of hardware and software. .

아래에서는 첨부한 도면을 참고하여 본 개시의 실시 예에 대하여 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 개시는 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시 예에 한정되지 않는다. 그리고 도면에서 본 개시를 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those of ordinary skill in the art may easily implement the present disclosure. However, the present disclosure may be implemented in various different forms and is not limited to the embodiments described herein. In the drawings, parts irrelevant to the description are omitted in order to clearly describe the present disclosure, and similar reference numerals are attached to similar parts throughout the specification.

도 1은 일 실시 예에 따른 전자 장치가 이미지 내 객체를 식별하는 과정을 개략적으로 설명하기 위한 도면이다.1 is a diagram schematically illustrating a process of identifying an object in an image by an electronic device according to an exemplary embodiment.

일 실시 예에 의하면, 전자 장치(1000)는 적어도 하나의 객체를 포함하는 이미지를 획득하고, 획득된 이미지 내 객체 영역을 식별하며, 식별된 객체 영역이 나타내는 객체의 종류를 식별할 수 있다. 본 개시의 일 실시 예에 의하면, 전자 장치(1000)는 적어도 하나의 카메라를 이용하여 동물을 포함하는 이미지를 촬영함으로써, 동물을 포함하는 동물 이미지를 획득할 수 있다. According to an embodiment, the electronic device 1000 may acquire an image including at least one object, identify an object area within the acquired image, and identify a type of an object represented by the identified object area. According to an embodiment of the present disclosure, the electronic device 1000 may acquire an animal image including an animal by capturing an image including an animal using at least one camera.

일 실시 예에 의하면, 전자 장치(1000)가 식별하는 객체는 동물의 신체 부위 중 일부를 포함할 수 있다. 예를 들어, 전자 장치(1000)가 식별하는 객체는, 동물의 눈 또는 동물의 눈과 관련된 부분 객체들 중 적어도 하나를 포함할 수 있다. 일 실시 예에 의하면, 본 개시에 따른 부분 객체들은 동물의 눈과 관련된 눈썹, 눈동자, 흰자, 눈 영역의 주위에 위치하는 동물의 털 중 적어도 하나를 포함할 수 있다. 본 개시에 따른 전자 장치(1000) 동물 이미지 내 동물의 눈 영역, 또는 동물의 눈과 관련된 부분 객체들에 대한 영역으로써, 눈썹, 눈동자, 흰자를 포함하는 부분 객체 영역을 검출하고, 검출된 영역 내 객체 또는 부분 객체의 종류를 식별할 수 있다.According to an embodiment, the object identified by the electronic device 1000 may include a part of body parts of an animal. For example, the object identified by the electronic device 1000 may include at least one of the eye of an animal or partial objects related to the eye of the animal. According to an embodiment, the partial objects according to the present disclosure may include at least one of eyebrows, pupils, whites, and animal hairs positioned around the eye area related to the eyes of the animals. The electronic device 1000 according to the present disclosure detects a partial object region including eyebrows, pupils, and whites as an animal eye region in an animal image or a region for partial objects related to the animal's eyes, and within the detected region. You can identify the type of object or partial object.

일 실시 예에 의하면, 전자 장치는(1000)는 서버 (2000)와 통신할 수 있는 통신 모듈을 포함하는 다양한 형태의 장치로 구현될 수 있다. 예를 들어, 전자 장치(1000)는 디지털 카메라, 모바일 단말, 스마트 폰(smart phone), 노트북 컴퓨터(laptop computer), 태블릿 PC, 전자북 단말기, 디지털방송용 단말기, PDA(Personal Digital Assistants), PMP(Portable Multimedia Player), 네비게이션, MP3 플레이어 등이 있을 수 있으나, 이에 한정되는 것은 아니다. 또한, 일 실시 예에 의하면, 전자 장치(1000)는 사용자에 의해 착용될 수 있는 장치(wearable device)일 수도 있다. According to an embodiment, the electronic device 1000 may be implemented as various types of devices including a communication module capable of communicating with the server 2000. For example, the electronic device 1000 includes a digital camera, a mobile terminal, a smart phone, a laptop computer, a tablet PC, an e-book terminal, a digital broadcasting terminal, personal digital assistants (PDA), and a PMP ( Portable Multimedia Player), navigation, MP3 player, and the like, but are not limited thereto. In addition, according to an embodiment, the electronic device 1000 may be a device that can be worn by a user.

예를 들어, 웨어러블 디바이스는 액세서리 형 장치(예컨대, 시계, 반지, 팔목 밴드, 발목 밴드, 목걸이, 안경, 콘택트 렌즈), 머리 착용형 장치(Head Mounted Display Device, HMD), 직물 또는 의류 일체형 장치(예: 전자 의복), 신체 부착형 장치(예컨대, 스킨 패드(skin pad)), 또는 생체 이식형 장치(예: implantable circuit) 중 적어도 하나를 포함할 수 있으나, 이에 한정되는 것은 아니다.For example, wearable devices include accessory type devices (e.g., watches, rings, wrist bands, ankle bands, necklaces, glasses, contact lenses), head mounted display devices (HMD), textile or clothing integrated devices ( Examples: electronic clothing), a body-attached device (eg, a skin pad), or a living body implantable device (eg, an implantable circuit) may be included, but is not limited thereto.

일 실시 예에 의하면, 서버(2000)는 네트워크(3000)를 통하여 전자 장치(1000)와 연결됨으로써, 전자 장치와 데이터를 송수신할 수 있는 기타 컴퓨팅 장치를 포함할 수 있다. 또한, 일 실시 예에 의하면, 서버 장치(2000)는 웨어러블 디바이스를 관리하기 위한 W-BMS(Wearable Business Management Server)일 수 있다. 일 실시 예에 의하면, 네트워크(3000)는 근거리 통신망(Local Area Network; LAN), 광역 통신망(Wide Area Network; WAN), 부가가치 통신망(Value Added Network; VAN), 이동 통신망(mobile radio communication network), 위성 통신망 및 이들의 상호 조합을 포함하고, 도 1에 도시된 각 네트워크 구성 주체가 서로 원활하게 통신을 할 수 있도록 하는 포괄적인 의미의 데이터 통신망이며, 유선 인터넷, 무선 인터넷 및 모바일 무선 통신망을 포함할 수 있다.According to an embodiment, the server 2000 may include other computing devices capable of transmitting and receiving data to and from the electronic device by being connected to the electronic device 1000 through the network 3000. In addition, according to an embodiment, the server device 2000 may be a Wearable Business Management Server (W-BMS) for managing wearable devices. According to an embodiment, the network 3000 includes a local area network (LAN), a wide area network (WAN), a value added network (VAN), a mobile radio communication network, and It is a data communication network in a comprehensive sense that includes a satellite communication network and a mutual combination thereof, and enables each network component shown in FIG. 1 to communicate with each other smoothly, and includes wired Internet, wireless Internet, and mobile wireless communication network. I can.

일 실시 예에 의하면, 전자 장치(1000)는 사용자의 입력에 기초하여, 동물 이미지를 획득하고, 획득된 동물 이미지를 표시함과 함께, 복수의 가이드 영역들 중 적어도 하나의 가이드 영역(114)을 화면(102)에 표시할 수 있다. 또한, 일 실시 예에 의하면, 전자 장치(1000)는 사용자가 동물 이미지를 촬영하는 동안, 사용자의 촬영 편의를 위하여 '강아지의 왼눈을 촬영해 주세요' 와 같은 안내 메시지(112) 또는 '강아지의 오른눈을 촬영해주세요'와 같은 안내 메시지(116)를 화면(104)에 더 제공할 수도 있다. According to an embodiment, the electronic device 1000 acquires an animal image based on a user's input, displays the acquired animal image, and displays at least one guide area 114 among a plurality of guide areas. It can be displayed on the screen 102. In addition, according to an embodiment, while the user is capturing an animal image, the electronic device 1000 may provide a guide message 112 such as'Please take a picture of the dog's left eye' or'right side of the dog' for convenience. A guide message 116 such as'Please take a picture of your eyes' may be further provided on the screen 104.

본 개시에 따른 전자 장치(1000)는 가이드 영역(114)에 촬영된 객체의 종류를 식별하고, 식별된 객체의 종류가 미리 설정된 객체의 종류와 일치하는 경우, 동물 이미지 내 다른 동물의 신체를 촬영하기 위한 안내 메시지를 출력할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 사용자의 입력에 기초하여 획득된 이미지 내 가이드 영역(114)에 포함된 객체의 종류를 식별하고, 식별된 객체의 종류가 미리 설정된 객체의 종류와 일치하는 경우, 가이드 영역(114)을 미리 설정된 주기에 따라 깜빡이거나, 현재 표시된 가이드 영역(114)의 색을 변경하여 표시함으로써, 사용자에게 이미지가 정확하게 촬영되었음을 나타낼 수도 있다.The electronic device 1000 according to the present disclosure identifies the type of object photographed in the guide area 114, and when the type of the identified object matches the preset type of object, photographs the body of another animal in the animal image. You can print out a guide message for doing so. According to an embodiment, the electronic device 1000 identifies the type of the object included in the guide area 114 in the image acquired based on the user's input, and the type of the identified object coincides with a preset type of object. In this case, the guide area 114 may be displayed by blinking according to a preset period or by changing the color of the currently displayed guide area 114 to indicate to the user that the image has been accurately captured.

도 2는 일 실시 예에 따른 전자 장치가 이미지 내 객체를 식별하는 방법을 나타내는 흐름도이다.2 is a flowchart illustrating a method of identifying an object in an image by an electronic device according to an exemplary embodiment.

S210에서, 전자 장치(1000)는 객체를 포함하는 이미지를 획득할 수 있다. 예를 들어, 전자 장치(1000)는 전자 장치 내 포함된 적어도 하나의 카메라를 이용하여 이미지를 획득할 수 있다. 전자 장치(1000)는 적어도 하나의 카메라를 이용하여 제1 이미지를 획득한 후, 다음 프레임의 제2 이미지를 획득할 수 있다. 즉, 전자 장치(1000)는 객체에 관한 복수의 이미지들을 포함하는 영상을 획득할 수도 있다.In S210, the electronic device 1000 may acquire an image including an object. For example, the electronic device 1000 may acquire an image using at least one camera included in the electronic device. After obtaining the first image using at least one camera, the electronic device 1000 may obtain a second image of the next frame. That is, the electronic device 1000 may acquire an image including a plurality of images of an object.

S220에서, 전자 장치(1000)는 획득된 이미지 내 객체에 대응되는 적어도 하나의 가이드 영역을 결정할 수 있다. 예를 들어, 전자 장치(1000)는 제1 가이드 영역을 생성하고, 생성된 제1 가이드 영역을 미리 설정된 스케일에 따라 스케일링함으로써 복수의 제2 가이드 영역들을 생성할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 제1 가이드 영역은 전자 장치의 화면에 표시하고, 제2 가이드 영역들은 전자 장치의 화면에 표시하지 않을 수 있다. In S220, the electronic device 1000 may determine at least one guide area corresponding to an object in the acquired image. For example, the electronic device 1000 may generate a first guide area and generate a plurality of second guide areas by scaling the generated first guide area according to a preset scale. According to an embodiment, the electronic device 1000 may display the first guide area on the screen of the electronic device, and may not display the second guide area on the screen of the electronic device.

일 실시 예에 의하면, 전자 장치(1000)는 미리 설정된 위치에 따라 제1 가이드 영역을 결정할 수 있다. 또 다른 실시 예에 의하면, 전자 장치(1000)는 전자 장치에 포함된 적어도 하나의 센서를 통하여, 사용자의 움직임에 따른 센서 값을 획득하고, 획득된 센서 값에 기초하여 제1 가이드 영역의 좌표를 결정할 수도 있다.According to an embodiment, the electronic device 1000 may determine the first guide area according to a preset position. According to another embodiment, the electronic device 1000 acquires a sensor value according to a user's movement through at least one sensor included in the electronic device, and calculates the coordinates of the first guide area based on the acquired sensor value. You can also decide.

S230에서, 전자 장치(1000)는 적어도 하나의 가이드 영역으로부터 객체를 식별하기 위한 특징 벡터를 추출할 수 있다. 예를 들어, 전자 장치(1000)는 가이드 영역에 대응되는 이미지 내 픽셀들의 그래디언트(Gradient)를 결정하고, 결정된 그래디언트를 이용하여 특징 벡터를 추출할 수 있다. 그러나, 전자 장치(1000)가 특징 벡터를 추출하는 과정은 여기에 한정되지 않으며, 픽셀 값들의 변화량에 기초하여 특징 벡터를 추출하는 기타 특징 벡터 추출 알고리즘을 이용하여 특징 벡터를 추출할 수 있다.In S230, the electronic device 1000 may extract a feature vector for identifying an object from at least one guide area. For example, the electronic device 1000 may determine a gradient of pixels in an image corresponding to the guide area, and extract a feature vector using the determined gradient. However, the process of extracting the feature vector by the electronic device 1000 is not limited thereto, and the feature vector may be extracted using another feature vector extraction algorithm that extracts the feature vector based on the amount of change in pixel values.

일 실시 예에 의하면, 전자 장치(1000)는 이미지 내 픽셀들의 그래디언트를 이용하여, 이미지 내 부분 영역 별 히스토그램을 생성할 수 있다. 전자 장치(1000)는 부분 영역 별로 생성된 히스토그램의 빈(bin) 값들을 연결함으로써, 가이드 영역으로부터 객체를 식별하기 위한 특징 벡터를 추출할 수도 있다.According to an embodiment, the electronic device 1000 may generate a histogram for each partial area in the image by using the gradient of pixels in the image. The electronic device 1000 may extract a feature vector for identifying an object from the guide area by linking bin values of the histogram generated for each partial area.

또한, 일 실시 예에 의하면, 전자 장치(1000)는 특징 벡터를 추출하기에 앞서, 특징 벡터를 추출할 대상의 이미지들을 전처리함으로써, 이미지의 크기를 소정의 크기로 변경할 수 있다. 전자 장치(1000)는 소정의 크기로 변경된 이미지로부터 특징 벡터를 추출하고, 추출된 특징 벡터를 이용하여 이미지 내 객체를 식별할 수 있다.Also, according to an embodiment, before extracting the feature vector, the electronic device 1000 may change the size of the image to a predetermined size by pre-processing the images to which the feature vector is to be extracted. The electronic device 1000 may extract a feature vector from an image changed to a predetermined size, and identify an object in the image using the extracted feature vector.

일 실시 예에 의하면, 전자 장치(1000)가 이미지로부터 추출하는 특징 벡터는 영상의 특징을 표현하기 위한 기술자(descriptor)일 수 있다. 일 실시 예에 의하면, 전자 장치(1000)가 이미지로부터 추출하는 특징 벡터는 HOG(Histogram of Oriented Gradients) 특징, SIFT(Scale Invariant Feature Transform) 특징, Haar 특징, Ferns 특징 중 적어도 하나에 따른 특징 값들을 포함할 수 있다. 그러나, 여기에 한정되는 것은 아니며, 본 개시에 따른 전자 장치는 기타 픽셀 값들을 이용한 특징(feature) 추출 알고리즘을 사용할 수 있다.According to an embodiment, a feature vector extracted from an image by the electronic device 1000 may be a descriptor for expressing a feature of an image. According to an embodiment, the feature vector extracted from the image by the electronic device 1000 includes feature values according to at least one of a Histogram of Oriented Gradients (HOG) feature, a Scale Invariant Feature Transform (SIFT) feature, a Haar feature, and a Ferns feature. Can include. However, the present disclosure is not limited thereto, and the electronic device according to the present disclosure may use a feature extraction algorithm using other pixel values.

예를 들어, 전자 장치(1000)는 가이드 영역에 대응되는 이미지를 분할함으로써 적어도 하나의 부분 영역들을 결정할 수 있다. 전자 장치(1000)는 결정된 부분 영역 별 픽셀들의 엣지(edge)를 결정하고, 결정된 엣지들의 x축 성분, y축 성분을 결정할 수 있다. 또한, 전자 장치(1000)는 결정된 부분 영역별 엣지들의 x축 성분, y축 성분들을 이용하여 엣지의 방향(orientation)을 결정하고, 결정된 엣지들의 방향을 카테고리로 하는 히스토그램을 생성할 수 있다. 전자 장치(10000)는 부분 영역 별로 생성된 히스토그램의 빈(bin)값들을 서로 연결함으로써 특징 벡터를 결정할 수 있다.For example, the electronic device 1000 may determine at least one partial region by dividing an image corresponding to the guide region. The electronic device 1000 may determine edges of pixels for each determined partial region, and determine an x-axis component and a y-axis component of the determined edges. In addition, the electronic device 1000 may determine an orientation of an edge using x-axis components and y-axis components of the determined edges for each partial region, and generate a histogram in which the directions of the determined edges are a category. The electronic device 10000 may determine a feature vector by connecting bin values of the histogram generated for each partial region with each other.

S240에서, 전자 장치(1000)는 추출된 특징 벡터를 인공 지능(Artificial intelligence) 모델에 입력함으로써, 이미지 내 객체의 종류를 식별할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)가 이용하는 인공 지능 모델은, 특징 벡터가 입력되면, 객체의 종류가 미리 정의된 레이블(label) 별(예컨대, 왼쪽눈, 오른쪽눈, 코, 눈썹, 입 등) 확률 값들을 출력할 수 있다. 또 다른 실시 예에 의하면, 전자 장치(1000)가 이용하는 인공 지능 모델은, 특징 벡터가 입력되면, 입력된 특징 벡터에 가장 높은 확률로 대응되는 레이블을, 객체의 종류로써 출력할 수 있다.In S240, the electronic device 1000 may identify the type of object in the image by inputting the extracted feature vector into an artificial intelligence model. According to an embodiment, in the artificial intelligence model used by the electronic device 1000, when a feature vector is input, the type of the object is defined by a predefined label (e.g., left eye, right eye, nose, eyebrow, mouth). Etc.) Probability values can be output. According to another embodiment, when a feature vector is input, the artificial intelligence model used by the electronic device 1000 may output a label corresponding to the input feature vector with the highest probability as the type of object.

전자 장치(1000)가 이용하는 인공 지능 모델은 여러 계층을 가진 깊은 신경망(deep neural network) 구조로 형성되는 인공 신경망 모델, 기타 인공 지능 학습 알고리즘에 따라 학습되는 기계 학습 모델을 포함할 수 있다. 일 실시 예에 의하면, 전자 장치가 이용하는 인공 신경망 모델은 합성곱 신경망(Convolutional Neural Network), DNN(Deep Neural Network), RNN(Recurrent Neural Network), BRDNN(Bidirectional Recurrent Deep Neural Network), MLP(Multilayer Perceptron)을 포함할 수 있으나, 이에 한정되지 않는다. The artificial intelligence model used by the electronic device 1000 may include an artificial neural network model formed in a deep neural network structure having multiple layers, and a machine learning model that is learned according to other artificial intelligence learning algorithms. According to an embodiment, the artificial neural network model used by the electronic device is a convolutional neural network, a deep neural network (DNN), a recurrent neural network (RNN), a bidirectional recurrent deep neural network (BRDNN), and a multilayer perceptron (MLP). ) May be included, but is not limited thereto.

일 실시 예에 의하면, 전자 장치(1000)가 이용하는 신경망은 다층 퍼셉트론(MLP)일 수도 있다. 인접한 레이어의 퍼셉트론간의 연결은 존재하나, 동일한 레이어의 퍼셉트론 끼리의 연결이 존재하지 않는 피드포워드(FeedForward) 형태의 인공 지능일 수 있다. 또 다른 실시 예에 의하면, 전자 장치(1000)가 이용하는 인공 지능은 컨벌루션 레이어와 풀링 레이어(pooling layer)가 반복 사용되는 CNN 구조에 풀리 커넥티드 레이어(fully-connected)가 연결된 구조일 수 있다.According to an embodiment, the neural network used by the electronic device 1000 may be a multilayer perceptron (MLP). The connection between the perceptrons of the adjacent layer exists, but the connection between the perceptrons of the same layer does not exist. It may be an artificial intelligence in the form of FeedForward. According to another embodiment, the artificial intelligence used by the electronic device 1000 may be a structure in which a fully-connected layer is connected to a CNN structure in which a convolutional layer and a pooling layer are repeatedly used.

S250에서, 전자 장치(1000)는 식별된 객체의 종류가 동물의 눈 또는 동물의 눈과 관련된 부분 객체들로 식별되는 경우, 객체를 포함하는 이미지 내 적어도 하나의 픽셀 값들을 저장할 수 있다. 예를 들어, 전자 장치(1000)는 '왼쪽 눈을 촬영해 주세요'와 같은 안내 메시지의 출력에 응답하여, 사용자 입력에 따른 동물의 이미지를 획득하고, 획득된 이미지 내 객체의 종류가 동물의 왼쪽 눈으로 식별되는 경우, 현재 획득된 이미지에 대한 정보를 전자 장치의 메모리에 저장할 수 있다.In S250, when the type of the identified object is identified as an animal's eye or a partial object related to the animal's eye, the electronic device 1000 may store at least one pixel value in the image including the object. For example, the electronic device 1000 acquires an image of an animal according to a user input in response to an output of a guide message such as'Please take a picture of the left eye', and the type of the object in the acquired image is the left side of the animal. When it is identified by eyes, information on the currently acquired image may be stored in a memory of the electronic device.

일 실시 예에 의하면, 전자 장치(1000)는 식별된 객체의 종류가 동물의 눈 또는 동물의 눈과 관련된 부분 객체들로 식별되는 경우, 이미지 전체에 대한 정보를 저장하는 것이 아닐, 식별된 객체를 포함하는 가이드 영역 내 픽셀들에 대한 정보만을 저장할 수 도 있다. 또한, 전자 장치(1000)는 식별된 객체의 종류가 동물의 눈 또는 동물의 눈과 관련된 부분 객체들로 식별되는 경우, 객체를 포함하는 이미지 내 적어도 하나의 픽셀 값들을 저장할 뿐만 아니라, 저장된 적어도 하나의 픽셀 값들에 매칭하여 식별된 객체의 종류를 더 저장할 수도 있다.According to an embodiment, when the type of the identified object is identified as an animal's eye or a partial object related to the animal's eye, the electronic device 1000 does not store information on the entire image, but stores the identified object. It is also possible to store only information on pixels in the included guide area. In addition, when the type of the identified object is identified as an animal eye or partial objects related to the animal eye, the electronic device 1000 not only stores at least one pixel value in the image including the object, but also stores at least one stored object. The type of the identified object may be further stored by matching the pixel values of.

도 3은 일 실시 예에 따른 전자 장치가 복수의 스케일에 따른 적어도 하나의 가이드 영역을 결정하는 방법을 구체적으로 설명하기 위한 흐름도이다.3 is a flowchart illustrating a method of determining at least one guide area according to a plurality of scales by an electronic device according to an exemplary embodiment.

S310에서, 전자 장치(1000)는 이미지 내 미리 설정된 기준 픽셀을 포함하도록 객체에 대응되는 제1 가이드 영역을 결정할 수 있다. 예를 들어, 전자 장치(1000)는 전자 장치의 화면의 크기에 기초하여, 기준 픽셀의 좌표를 결정하고, 결정된 좌표에 위치하는 기준 픽셀을 포함하도록 제1 가이드 영역을 결정할 수 있다. In S310, the electronic device 1000 may determine a first guide area corresponding to the object to include a preset reference pixel in the image. For example, the electronic device 1000 may determine coordinates of a reference pixel based on the size of the screen of the electronic device, and may determine a first guide area to include a reference pixel positioned at the determined coordinates.

또 다른 실시 예에 의하면, 전자 장치(1000)는 전자 장치 내에 포함된 적어도 하나의 센서를 통하여 획득된 센싱값에 기초하여, 현재 전자 장치가 향하는 방향 및 현재 전자 장치의 위치 및 촬영 대상의 위치의 상대적인 관계를 나타내는 위치 정보를 결정하고, 상기 방향 및 위치 정보에 기초하여 제1 가이드 영역을 결정할 수 있다. 또한, 일 실시 예에 의하면, 전자 장치(1000)는 기준 픽셀의 위치에서 미리 설정된 길이의 폭 및 높이만큼 연장된 선분을 가지는 사각 형태의 제1 가이드 영역을 결정할 수도 있다. 일 실시 예에 의하면 제1 가이드 영역은 정사각 형태로 형성될 수 있으나, 이에 한정되는 것은 아니다.According to another embodiment, the electronic device 1000 includes a current direction of the electronic device and a current position of the electronic device and a location of a photographing target based on a sensing value acquired through at least one sensor included in the electronic device. Position information indicating a relative relationship may be determined, and a first guide area may be determined based on the direction and position information. In addition, according to an embodiment, the electronic device 1000 may determine a first guide area having a rectangular shape having a line segment extending from a position of a reference pixel by a predetermined width and height. According to an embodiment, the first guide region may be formed in a square shape, but is not limited thereto.

S320에서, 전자 장치(1000)는 제1 가이드 영역을 미리 설정된 스케일에 따라 스케일링함으로써, 객체에 대응되는 적어도 하나의 제2 가이드 영역을 결정할 수도 있다. 예를 들어, 전자 장치(1000)는 스케일링 계수를 1.1로 결정하고, 결정된 스케일링 계수를 제1 가이드 영역 내 가로 길이에 적용함으로써, 제1 가이드 영역의 가로 길이 보다 10% 증가된 길이의 가로 길이를 가지는 제2 가이드 영역을 결정할 수 있다. 또한, 전자 장치(1000)는 스케일링 계수 1.1을 제1 가이드 영역의 세로 길이에 적용함으로써, 제1 가이드 영역의 세로 길이 보다 10% 증가된 세로 길이를 가지는 제2 가이드 영역을 결정할 수도 있다. In S320, the electronic device 1000 may determine at least one second guide area corresponding to an object by scaling the first guide area according to a preset scale. For example, the electronic device 1000 determines the scaling factor to be 1.1, and applies the determined scaling factor to the horizontal length in the first guide area, thereby increasing the horizontal length by 10% than the horizontal length of the first guide area. The branches may determine the second guide area. Also, the electronic device 1000 may determine a second guide region having a vertical length that is 10% greater than the vertical length of the first guide region by applying a scaling factor of 1.1 to the vertical length of the first guide region.

도 4는 일 실시 예에 따른 전자 장치가, 적어도 하나의 가이드 영역을 결정하는 방법을 설명하기 위한 도면이다.4 is a diagram illustrating a method of determining at least one guide area by an electronic device according to an exemplary embodiment.

도 3에서 상술한 바와 같이, 전자 장치(1000)는 제1 가이드 영역(416)을 결정한 후, 결정된 제1 가이드 영역(416)을 미리 설정된 스케일에 따라 스케일링함으로써 적어도 하나의 제2 가이드 영역들(412, 414, 418, 422)를 생성할 수 있다. 일 실시 예에 의하면, 제1 가이드 영역(416)은 전자 장치의 화면상에 표시될 수 있지만, 제2 가이드 영역들은 전자 장치의 화면에 표시되지 않을 수 있다. 전자 장치(1000)는 제1 가이드 영역에 기초하여 생성된 제2 가이드 영역들을 화면에 표시하지 않고, 단지 이미지 내 객체를 식별하기 위한 연산 과정에만 이용할 수도 있다.As described above in FIG. 3, after determining the first guide area 416, the electronic device 1000 scales the determined first guide area 416 according to a preset scale, so that at least one of the second guide areas ( 412, 414, 418, 422) can be created. According to an embodiment, the first guide areas 416 may be displayed on the screen of the electronic device, but the second guide areas may not be displayed on the screen of the electronic device. The electronic device 1000 may not display the second guide areas generated based on the first guide area on the screen, but may use only the calculation process for identifying an object in the image.

예를 들어, 전자 장치(1000)는 제1 가이드 영역(416)내 좌측 하단의 모서리 지점을 기준 픽셀의 좌표로 결정하고, 결정된 기준 픽셀의 위치에서, 미리 설정된 가로 폭(402)의 길이만큼 연장된 가로 선분 및 세로 높이(404)의 길이만큼 연장된 세로 선분을 포함하는 제1 가이드 영역(416)을 화면에 표시할 수 있다. 전자 장치의 사용자는 제1 가이드 영역(416)내에 표시되는 전자 장치의 화면에 기초하여, 촬영 대상 영역을 쉽게 결정할 수 있다.For example, the electronic device 1000 determines the lower left corner of the first guide area 416 as the coordinates of the reference pixel, and extends from the determined reference pixel position by a predetermined length of the horizontal width 402 The first guide area 416 including the horizontal line segment and the vertical line segment extended by the length of the vertical height 404 may be displayed on the screen. The user of the electronic device can easily determine the area to be photographed based on the screen of the electronic device displayed in the first guide area 416.

또한, 일 실시 예에 의하면, 전자 장치(1000)는 제1 가이드 영역의 가로 길이 또는 세로 길이 중 적어도 하나의 길이를 증가 시키거나 감소 시키기 위한 스케일링 계수를 결정하고, 결정된 스케일링 계수를 제1 가이드 영역에 적용함으로써, 제2 가이드 영역들을 결정할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 제1 가이드 영역 보다 넓은 면적을 가지는 제2 가이드 영역들(412, 414)을 2개 결정하고, 제1 가이드 영역 보다 좁은 면적을 가지는 제2 가이드 영역들(418, 422)를 2개 결정할 수 있다. In addition, according to an embodiment, the electronic device 1000 determines a scaling factor for increasing or decreasing at least one of a horizontal length or a vertical length of the first guide area, and determines the determined scaling factor as the first guide area. By applying to, it is possible to determine the second guide areas. According to an embodiment, the electronic device 1000 determines two second guide areas 412 and 414 having a larger area than the first guide area, and a second guide area having a narrower area than the first guide area. Two of them 418 and 422 can be determined.

본 개시에 따른 전자 장치(1000)는 제1 가이드 영역 및 적어도 하나의 제2 가이드 영역 각각으로부터 특징 벡터를 추출하고, 추출된 특징 벡터를 이용하여 이미지 내 객체를 식별할 수 있다. 그러나 또 다른 실시 예에 의하면, 본 개시에 따른 전자 장치(1000)는 제1 가이드 영역 및 제2 가이드 영역 별로 객체에 대응될 확률 값을 결정하고, 결정된 확률 값이 미리 설정된 임계치 보다 큰지 여부에 기초하여, 1차적으로 가이드 영역들에 대한 객체를 식별할 수 있다. 본 개시에 따른 전자 장치(1000)는 확률 값이 미리 설정된 임계치 보다 작은 가이드 영역들에 대한 객체는 식별되지 않은 것으로 결정하고, 확률 값이 미리 설정된 임계치 보다 큰 가이드 영역들로부터 추출된 특징 벡터만을 인공 지능 모델에 입력한다.The electronic device 1000 according to the present disclosure may extract a feature vector from each of the first guide area and the at least one second guide area, and identify an object in the image using the extracted feature vector. However, according to another embodiment, the electronic device 1000 according to the present disclosure determines a probability value corresponding to an object for each of the first guide area and the second guide area, and based on whether the determined probability value is greater than a preset threshold. Thus, it is possible to primarily identify objects for the guide areas. The electronic device 1000 according to the present disclosure determines that objects for guide areas having a probability value smaller than a preset threshold are not identified, and artificially only feature vectors extracted from guide areas having a probability value larger than a preset threshold. Enter into the intelligence model.

따라서, 본 개시에 따른 전자 장치(1000)는 제1 이미지 생성된 모든 가이드 영역들에 대하여 신경망 연산을 수행하는 것이 아니라, 미리 설정된 기준에 따라 1차로 객체를 식별해 본 후, 객체로 식별되지 않은 가이드 영역들에 대해서는 신경망 연산을 수행하지 않음으로써, 전자 장치의 연산 효율을 높일 수 있다. 전자 장치(1000)가 복수의 가이드 영역들 각각에 대해서 결정된 객체 식별 값에 기초하여, 전체 이미지 내 객체의 종류를 식별하는 방법은 후술하는 도 5 내지 6을 참조하여 더 구체적으로 설명하기로 한다.Therefore, the electronic device 1000 according to the present disclosure does not perform a neural network operation on all guide regions in which the first image is generated, but after first identifying an object according to a preset criterion, the electronic device 1000 is not identified as an object. By not performing a neural network operation on the guide regions, it is possible to increase the operation efficiency of the electronic device. A method of identifying the type of the object in the entire image by the electronic device 1000 based on the object identification value determined for each of the plurality of guide areas will be described in more detail with reference to FIGS. 5 to 6 to be described later.

도 5는 일 실시 예에 따른 전자 장치가, 적어도 하나의 가이드 영역 별 객체 식별 결과에 기초하여, 이미지 내 객체의 종류를 식별하는 방법을 설명하기 위한 흐름도이다.5 is a flowchart illustrating a method of identifying, by an electronic device, a type of an object in an image based on an object identification result for each guide area, according to an exemplary embodiment.

S520에서, 전자 장치(1000)는 제1 가이드 영역 및 적어도 하나의 제2 가이드 영역 각각에 대한 객체의 종류를 식별한다. 예를 들어, 전자 장치(1000)는 제1 가이드 영역 및 제2 가이드 영역 별로 객체에 관한 윤곽(contour)을 검출하고, 검출된 윤곽 내 윤곽 성분들을 이용하여 결정된 식별 조건에 서로 다른 가중치를 적용함으로써, 가이드 영역 별로 검출된 윤곽이 객체에 대응될 확률을 결정할 수 있다. 전자 장치(1000)는 가이드 영역 별로 검출된 윤곽이 객체에 대응될 확률 값에 기초하여, 가이드 영역 별 객체의 종류를 식별할 수 있다.In S520, the electronic device 1000 identifies a type of an object for each of the first guide area and at least one second guide area. For example, the electronic device 1000 detects a contour of an object for each of the first guide area and the second guide area, and applies different weights to the identification condition determined using the detected contour components. , It is possible to determine a probability that the detected contour for each guide area corresponds to the object. The electronic device 1000 may identify the type of the object for each guide area based on a probability value that the contour detected for each guide area corresponds to the object.

S540에서, 전자 장치(1000)는 식별된 객체의 종류 중, 동일한 종류의 객체로 식별된 가이드 영역의 빈도수를 결정할 수 있다. 예를 들어, 전자 장치(1000)는 가이드 영역 별로 식별된 객체의 종류를 카운팅함으로써, 동일 종류로 식별된 가이드 영역의 수를 계산할 수 있다. S560에서, 전자 장치(1000)는 동일한 종류의 객체로 식별되는 가이드 영역의 빈도수에 기초하여 이미지 내 객체의 종류를 식별한다. 일 실시 예에 의하면, 전자 장치(1000)는 가이드 영역들 중, 가장 많은 수로 카운팅된 객체의 종류를, 이미지 내 객체의 종류로 식별할 수 있다.In S540, the electronic device 1000 may determine the frequency of the guide area identified as an object of the same type among the types of the identified object. For example, the electronic device 1000 may calculate the number of guide areas identified as the same type by counting the types of objects identified for each guide area. In S560, the electronic device 1000 identifies the type of the object in the image based on the frequency of the guide area identified as the same type of object. According to an embodiment, the electronic device 1000 may identify the type of the object counted as the largest number among the guide areas as the type of the object in the image.

도 6은 일 실시 예에 따른 전자 장치가, 적어도 하나의 가이드 영역 별 객체의 식별 결과에 기초하여, 이미지 내 객체의 종류를 식별하는 방법을 설명하기 위한 도면이다.FIG. 6 is a diagram illustrating a method of identifying a type of an object in an image, based on a result of identifying an object for each guide area, by an electronic device according to an exemplary embodiment.

도 6을 참조하여, 전자 장치(1000)가 가이드 영역 별로 식별된 객체의 종류를 이용하여, 전체 이미지 내 객체의 종류를 식별하는 실시 예를 설명하기로 한다. 일 실시 예에 의하면, 제1 가이드 영역(예컨대 BOX 0)에 대응되는 객체가 코(Nose)로 식별되고, 제2 가이드 영역(예컨대 Box 1)에 대응되는 객체는 코(Nose)로 식별되며, 나머지 가이드 영역들(예컨대, Box 2, 3, 4)에 대해서는 확률 값이 기 설정된 임계치 이하로 판별됨에 따라, 나머지 가이드 영역들에 대응되는 객체들이 식별되지 않을 수 있다. 이러한 경우, 전자 장치(1000)는 코(nose)로 식별된 가이드 영역의 빈도수가 2로 가장 크므로, 전체 이미지 내 객체의 종류를 코(nose)로 식별할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 동일한 종류의 빈도수를 나타내는 가이드 영역의 수를 카운팅함에 있어, 식별되지 않은 가이드 영역의 빈도수는 카운팅 하지 않을 수 있다.Referring to FIG. 6, an embodiment in which the electronic device 1000 identifies the type of object in the entire image by using the type of the object identified for each guide area will be described. According to an embodiment, an object corresponding to the first guide area (eg, BOX 0) is identified as a nose, and an object corresponding to the second guide area (eg, Box 1) is identified as a nose, For the remaining guide areas (eg, Box 2, 3, 4), as the probability value is determined to be less than a preset threshold, objects corresponding to the remaining guide areas may not be identified. In this case, the electronic device 1000 may identify the type of the object in the entire image as a nose because the frequency of the guide area identified as a nose is the largest as 2. According to an embodiment, when the electronic device 1000 counts the number of guide areas representing the same type of frequency, the frequency of the unidentified guide area may not be counted.

또 다른 실시 예에 의하면, 제1 가이드 영역(예컨대 BOX 0)에 대응되는 객체가 왼쪽 눈(Left eye) 로 식별되고, 제2 가이드 영역(예컨대 Box 1)에 대응되는 객체는 코(Nose)로 식별되며, 제3 가이드 영역(예컨대 Box 2)에 대응되는 객체가 왼쪽 눈(Left eye)로 식별되고, 나머지 가이드 영역들(예컨대, Box 3, 4)에 대해서는 확률 값이 기 설정된 임계치 이하로 판별됨에 따라, 나머지 가이드 영역들에 대응되는 객체들이 식별되지 않을 수 있다. 이러한 경우, 전자 장치(1000)는 왼쪽 눈(Left eye)으로 식별된 가이드 영역의 빈도수가 2이고, 코(nose)로 식별된 가이드 영역의 빈도수가 1이며, 객체가 식별되지 않은 가이드 영역의 빈도수가 2이므로, 왼쪽 눈(Left eye)으로 식별된 가이드 영역의 빈도수와 객체가 식별되지 않은 가이드 영역의 빈도수를 비교하게 된다. 그러나, 일 실시 예에 의하면, 전자 장치(1000)는 객체가 식별되지 않은 가이드 영역의 빈도수는, 카운팅계산에 이용하지 않을 수 있으므로, 전자 장치(1000)는 왼쪽 눈(Left eye)으로 식별된 가이드 영역의 빈도수가 가장 높은 것으로 결정한 후, 이미지 내 객체의 종류를 왼쪽 눈으로 식별할 수 있다.According to another embodiment, an object corresponding to the first guide area (eg, BOX 0) is identified as a left eye, and an object corresponding to the second guide area (eg, Box 1) is indicated by a nose. It is identified, and the object corresponding to the third guide area (for example, Box 2) is identified as a left eye, and for the remaining guide areas (for example, Box 3, 4), the probability value is determined to be less than a preset threshold. Accordingly, objects corresponding to the remaining guide areas may not be identified. In this case, in the electronic device 1000, the frequency of the guide area identified by the left eye is 2, the frequency of the guide area identified by the nose is 1, and the frequency of the guide area in which the object is not identified. Since is 2, the frequency of the guide area identified by the left eye is compared with the frequency of the guide area in which the object is not identified. However, according to an embodiment, since the electronic device 1000 may not use the frequency of the guide area in which the object is not identified for counting calculations, the electronic device 1000 is a guide identified as a left eye. After determining that the frequency of the region is the highest, the type of the object in the image can be identified with the left eye.

또 다른 실시 예에 의하면, 제1 가이드 영역(예컨대 BOX 0)에 대응되는 객체가 왼쪽 눈(Left eye) 로 식별되고, 제2 가이드 영역(예컨대 Box 1)에 대응되는 객체는 오른쪽 눈(right eye)으로 식별되며, 제3 가이드 영역(예컨대 Box 2)에 대응되는 객체가 코(nose)로 식별되고, 나머지 가이드 영역들(예컨대, Box 3, 4)에 대해서는 확률 값이 기 설정된 임계치 이하로 판별됨에 따라, 나머지 가이드 영역들에 대응되는 객체들이 식별되지 않을 수 있다.이러한 경우, 전자 장치(1000)는 왼쪽 눈(Left eye) 로 식별된 가이드의 빈도수가 1이고, 오른쪽 눈(right eye)으로 식별된 가이드의 빈도수도 1이며, 코(nose)로 식별된 가이드 영역의 빈도수가 1이므로, 가이드 영역들 중, 동일한 종류의 객체를 나타내는 가이드 영역의 빈도수를 결정하지 못할 수 있다. 전자 장치(1000)는 동일한 종류의 객체를 나타내는 가이드 영역의 빈도수를 결정하지 못하는 경우, 이미지 내 객체의 종류가 식별되지 않은 것으로 결정할 수 있다. 전자 장치(1000)는 이미지 내 객체의 종류가 식별되지 않는 경우, 'none'과 같은 글자를 화면에 출력할 수 있다.According to another embodiment, an object corresponding to the first guide area (eg, BOX 0) is identified as a left eye, and the object corresponding to the second guide area (eg, Box 1) is identified as a right eye. ), and the object corresponding to the third guide area (e.g. Box 2) is identified as a nose, and the remaining guide areas (e.g., Box 3, 4) have a probability value less than a preset threshold. Accordingly, objects corresponding to the remaining guide areas may not be identified. In this case, the electronic device 1000 has the frequency of the guide identified as the left eye of 1, and the right eye Since the frequency of the identified guide is also 1 and the frequency of the guide area identified by the nose is 1, it may not be possible to determine the frequency of the guide area representing the same type of object among the guide areas. When the electronic device 1000 fails to determine the frequency of the guide area representing the same type of object, the electronic device 1000 may determine that the type of the object in the image is not identified. When the type of the object in the image is not identified, the electronic device 1000 may output a character such as'none' on the screen.

또 다른 실시 예에 의하면, 제1 가이드 영역(예컨대 BOX 0)에 대응되는 객체가 왼쪽 눈(Left eye) 로 식별되고, 제2, 3, 4 가이드 영역(예컨대 Box 1, 2, 3)에 대응되는 객체는 모두 코(nose)로 식별되며, 제5 가이드 영역 (예컨대 Box 4)에 대응되는 객체가 오른쪽 눈(right eye)으로 식별될 수 있다. 이 경우, 전자 장치(1000)는 코(nose)로 식별된 가이드 영역의 빈도수는 3이고, 왼쪽 눈으로 식별된 가이드 영역의 빈도수는 1이며, 오른쪽 눈으로 식별된 가이드 영역의 빈도수를 1로 결정할 수 있다. 따라서, 전자 장치(1000)는 코로 식별된 가이드 영역이 빈도수가 3으로 가장 크므로, 이미지 내 객체의 종류를 코(nose)로 식별할 수 있다.According to another embodiment, an object corresponding to the first guide area (eg, BOX 0) is identified as a left eye, and corresponds to the second, 3, and 4 guide areas (eg, Box 1, 2, 3). All of the objects are identified as noses, and an object corresponding to the fifth guide area (eg, Box 4) may be identified as a right eye. In this case, the electronic device 1000 determines that the frequency of the guide area identified by the nose is 3, the frequency of the guide area identified by the left eye is 1, and the frequency of the guide area identified by the right eye is 1 I can. Accordingly, the electronic device 1000 may identify the type of the object in the image as a nose because the frequency of the guide region identified by the nose is the highest as 3.

또 다른 실시 예에 의하면, 제1, 2 가이드 영역(예컨대 BOX 0, 1)에 대응되는 객체가 각각 코(nose)로 식별되고, 제3 가이드 영역(예컨대 Box 2)에 대응되는 객체는 모두 오른쪽 눈(right eye)으로 식별되며, 제 4, 5 가이드 영역(예컨대, Box 3, 4)에 대응되는 객체가 왼쪽 눈(left eye)으로 식별될 수 있다. 이 경우, 전자 장치(1000)는 코(nose)로 식별된 가이드 영역의 빈도수가 2이고, 오른쪽 눈으로 식별된 가이드 영역의 빈도수가 1이며, 왼쪽 눈으로 식별된 가이드 영역의 빈도수를 2로 결정할 수 있다. 따라서, 전자 장치(1000)는 현재 코로 식별된 가이드 영역의 빈도수 및 왼쪽 눈으로 식별된 가이드 영역의 빈도수가 오른쪽 눈으로 식별된 가이드 영역의 빈도수보다 크다고 결정할 수 있다. 그러나, 전자 장치(1000)는 오른쪽 눈으로 식별된 가이드 영역의 빈도수 보다 크다고 결정된, 코로 식별된 가이드 영역의 빈도수 및 왼쪽 눈으로 식별된 가이드 영역의 빈도수가 2로 동일하므로, 이미지 내 객체의 종류를 식별할 수 없는 것으로 결정할 수 있다. According to another embodiment, objects corresponding to the first and second guide areas (eg, BOX 0, 1) are identified by nose, and objects corresponding to the third guide area (eg, Box 2) are all right An object identified as a right eye and corresponding to the fourth and fifth guide areas (eg, Box 3 and 4) may be identified as a left eye. In this case, the electronic device 1000 determines that the frequency of the guide area identified by the nose is 2, the frequency of the guide area identified by the right eye is 1, and the frequency of the guide area identified by the left eye is 2. I can. Accordingly, the electronic device 1000 may determine that the frequency of the guide area currently identified by the nose and the frequency of the guide area identified by the left eye are greater than the frequency of the guide area identified by the right eye. However, since the electronic device 1000 determines that the frequency of the guide area identified by the nose and the frequency of the guide area identified by the left eye is equal to 2, which is determined to be greater than the frequency of the guide area identified by the right eye, the type of object in the image It can be determined that it cannot be identified.

도 7은 일 실시 예에 따른 전자 장치가 이미지 내 적어도 하나의 잡음을 제거하기 위해 이미지를 전처리 하는 방법을 설명하기 위한 도면이다.7 is a diagram illustrating a method of preprocessing an image in order to remove at least one noise in an image by an electronic device according to an exemplary embodiment.

본 개시의 일 실시 예에 따르면, 전자 장치(1000)는 획득한 이미지 내 잡음을 제거하고, 눈 검출의 정확도를 향상시키기 위해서 이미지를 전처리할 수 있다. 일 실시 예에 의하면, S720에서, 전자 장치(1000)는 이미지 내의 픽셀 값들에 소정의 커널을 적용함으로써, 이미지 내 잡음을 제거할 수 있다. According to an embodiment of the present disclosure, the electronic device 1000 may pre-process the image in order to remove noise in the acquired image and improve the accuracy of eye detection. According to an embodiment, in S720, the electronic device 1000 may remove noise in the image by applying a predetermined kernel to pixel values in the image.

일 실시 예에 의하면, 전자 장치(1000)는 가우시안 분포를 나타내는 가우시안 커널을 적용함으로써 이미지 내 가우시안 잡음을 제거할 수 있다. 예를 들어, 전자 장치(1000)가 획득하는 이미지 내에는, 이미지를 촬영한 이미지 센서 자체 특성으로 인한 잡음과 같이 가우시안 분포를 따르는 잡음들이 포함될 수 있다. 이러한 잡음들은 이미지 또는 복수의 이미지를 포함하는 영상의 품질을 떨어뜨릴 수 있다. 전자 장치(1000)는 가우시안 분포(Gaussian Distribution)를 나타내는, 미리 설정된 크기의 가우시안 커널을 이미지에 적용함으로써, 이미지 내 가우시안 잡음을 제거할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 이미지를 소정의 부분 영역들로 분할하고, 분할된 부분 영역들 별로 가우시안 커널을 적용할 수도 있다. 그러나, 이에 한정되는 것은 아니며, 전자 장치(1000)는 이미지 내 잡음(Noise)을 제거하기 위한 기타 이미지 필터들을 이용하여 잡음을 제거할 수도 있다.According to an embodiment, the electronic device 1000 may remove Gaussian noise in an image by applying a Gaussian kernel indicating a Gaussian distribution. For example, noises following a Gaussian distribution may be included in the image acquired by the electronic device 1000, such as noise due to a characteristic of an image sensor that photographed the image. These noises may deteriorate the quality of an image or an image including a plurality of images. The electronic device 1000 may remove Gaussian noise in the image by applying a Gaussian kernel having a preset size, representing a Gaussian distribution, to an image. According to an embodiment, the electronic device 1000 may divide an image into predetermined partial regions and apply a Gaussian kernel to each of the divided partial regions. However, the present invention is not limited thereto, and the electronic device 1000 may remove noise by using other image filters for removing noise in an image.

S740에서, 전자 장치(1000)는 잡음이 제거된 이미지 내 픽셀 값들을 변환할 수 있다. 일 실시 예에 따라, 가우시안 커널을 사용하는 경우, 전자 장치(1000)는 가우시안 잡음이 제거된 이미지 내 픽셀 값들의 히스토그램을 평활화(equalizing) 할 수 있다. 예를 들어, 전자 장치(1000)는 이미지 내 픽셀 값들에 기초하여 이미지의 밝기 값들을 픽셀별로 획득할 수 있다. 전자 장치(1000)는 이미지 내 픽셀 별로 밝기 값을 소정의 레벨로 분류한 빈(bin)들에, 이미지 내 픽셀들의 밝기 값을 분류함으로써, 이미지 내 밝기 값에 대한 히스토그램을 생성할 수 있다. In S740, the electronic device 1000 may convert pixel values in the image from which noise has been removed. According to an embodiment, when using a Gaussian kernel, the electronic device 1000 may equalize a histogram of pixel values in an image from which Gaussian noise has been removed. For example, the electronic device 1000 may obtain brightness values of an image for each pixel based on pixel values in the image. The electronic device 1000 may generate a histogram of the brightness values in the image by classifying the brightness values of pixels in the image into bins in which the brightness values for each pixel in the image are classified at a predetermined level.

일 실시 예에 의하면, 히스토그램은 이미지 내에서 특정 밝기 값을 나타내는 픽셀의 수를 포함하는 bin을 포함할 수 있고, bin들은 밝기 값을 분류하기 위한 소정의 범위를 가질 수 있다. 전자 장치(1000)는 이미지에 대한 밝기 값의 분포를 나타내는 히스토그램을 평활화함으로써, 이미지 내 밝기 값들이 이미지 전체에 골고루 분포되게 할 수 있다. 또한, 전자 장치(1000)는 이미지에 대한 히스토그램을 평활화함으로써, 이미지 전체의 contrast를 향상시킬 수 있다.According to an embodiment, the histogram may include a bin including the number of pixels representing a specific brightness value in an image, and the bins may have a predetermined range for classifying brightness values. The electronic device 1000 may smooth the histogram indicating the distribution of brightness values for the image, so that the brightness values in the image are evenly distributed throughout the image. Also, the electronic device 1000 may improve the contrast of the entire image by smoothing the histogram of the image.

그러나, 또 다른 실시 예에 의하면, 전자 장치(1000)는 히스토그램이 아닌, 이미지 내 픽셀들의 세기(intensity)를 평활화(equalizing)할 수도 있다. 또한, 전자 장치(1000)는 상술한 평준화방법에 외에 기타 공지의 픽셀 값들을 평준화 하기 위한 방법을 사용하여 이미지 내 픽셀 값들을 평준화할 수도 있다.However, according to another embodiment, the electronic device 1000 may equalize the intensity of pixels in the image, not the histogram. In addition, the electronic device 1000 may level pixel values in an image by using a method for leveling other known pixel values in addition to the above-described leveling method.

S760에서, 전자 장치(1000)는 픽셀 값들이 변환된 이미지들을 적어도 하나의 부분 영역들로 분할하고, 분할된 부분 영역 별로 결정되는 임계값들을 이용하여 부분 영역들 내 픽셀 값들을 이진화 할 수 있다. 예를 들어, 전자 장치(1000)는 이미지를 그레이 스케일(gray scale)이미지로 변환하고, 기 설정된 임계값을 이용하여 이미지를 이진화 할 수도 있다. In S760, the electronic device 1000 may divide the images from which pixel values are converted into at least one partial region, and binarize pixel values in the partial regions using threshold values determined for each divided partial region. For example, the electronic device 1000 may convert the image into a gray scale image and may binarize the image using a preset threshold.

그러나, 본 개시의 일 실시 예에 따른 전자 장치(1000)는 이미지를 하나 이상의 부분 영역들로 분할하고, 분할된 부분 영역들 별로 임계값을 결정함으로써, 이미지의 부분 영역별 서로 다르게 결정된 임계값을 이용하여 부분 영역 별 픽셀 값들을 이진화 할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 이미지가 그레이 스케일로 변환된 상태인 경우, 부분 영역 별로 결정된 임계값을 이용하여 부분 영역 내 픽셀별 발기 값을 이진화 할 수도 있다. 전자 장치(1000)는 부분 영역 별로 서로 다른 임계값을 이용하여 이미지를 이진화 함으로써, 이진화된 이미지로부터 객체에 대응되는 윤곽을 더 정확하게 검출할 수 있다. 또 다른 실시 예에 의하면, 전자 장치(1000)는 부부 영역 별로 이진화된 밝기 값을 포함하는 가이드 영역으로부터 객체에 관한 윤곽을 검출할 수도 있다. However, the electronic device 1000 according to an embodiment of the present disclosure divides an image into one or more partial regions, and determines a threshold value for each of the divided partial regions, so that a threshold value determined differently for each partial region of the image is determined. By using, the pixel values for each partial area can be binarized. According to an embodiment, when the image is converted to gray scale, the electronic device 1000 may binarize the erection value for each pixel in the partial region using a threshold value determined for each partial region. The electronic device 1000 may more accurately detect a contour corresponding to an object from the binarized image by binarizing the image using different threshold values for each partial region. According to another embodiment, the electronic device 1000 may detect an outline of an object from a guide area including a binary brightness value for each couple area.

또한, 일 실시 예에 따라 전자 장치(1000)가 히스토그램 평활화 기법을 이용하는 경우, 전자 장치(1000)는 히스토그램이 평활화된 이미지들을 적어도 하나의 부분 영역들로 분할하며, 분할된 부분 영역 별로 결정되는 임계값들을 이용하여 부분 영역들 내 픽셀 값들을 이진화 할 수도 있다.In addition, according to an embodiment, when the electronic device 1000 uses the histogram smoothing technique, the electronic device 1000 divides the histogram-smoothed images into at least one partial region, and a threshold determined for each divided partial region. It is also possible to binarize pixel values in partial regions using values.

도 8은 일 실시 예에 따른 전자 장치가 생성된 적어도 하나의 가이드 영역들 중, 일부의 가이드 영역으로부터 특징 벡터를 추출하는 과정을 설명하기 위한 도면이다.FIG. 8 is a diagram illustrating a process of extracting a feature vector from some of at least one guide area generated by an electronic device according to an exemplary embodiment.

S820에서, 전자 장치(1000)는 이미지 내 적어도 하나의 가이드 영역들을 생성할 수 있다. S820은 도 3 내지 도 4에서 전자 장치(1000)가 제1 가이드 영역을 결정하고, 결정된 제1 가이드 영역을 미리 설정된 스케일에 따라 스케일링함으로써 제2 가이드 영역들을 생성하는 과정에 대응될 수 있으므로 구체적인 설명은 생략하기로 한다.In S820, the electronic device 1000 may generate at least one guide area in the image. S820 may correspond to a process in which the electronic device 1000 determines a first guide area in FIGS. 3 to 4 and creates second guide areas by scaling the determined first guide area according to a preset scale, so detailed description Will be omitted.

S840에서, 전자 장치(1000)는 적어도 하나의 가이드 영역 별 객체에 관한 윤곽을 검출할 수 있다. 예를 들어, 전자 장치(1000)는 이진화된 이미지에서 특징점을 추출하고, 추출된 특징점 중 같은 이미지 값을 나타내는 점들의 집합을 식별함으로써, 이미지 내 객체에 대응되는 윤곽(contour)을 검출할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 이미지 내 객체에 대응되는 복수의 윤곽들을 검출할 수 있고, 검출된 윤곽들 중, 최외곽 윤곽들을 결정할 수도 있다. 일 실시 예에 의하면, 전자 장치(1000)는 convex hull 알고리즘을 이용하여 이미지 내 검출된 윤곽들 중, 최외곽(max contour)를 검출할 수도 있다. 또한, 일 실시 예에 의하면, 전자 장치(1000)는 이진화된 적어도 하나의 가이드 영역으로부터 윤곽을 검출한 후, 검출된 윤곽에 대하여 중간값 필터를 적용함으로써, 윤곽의 경계를 평탄화(smoothing)하는 과정을 더 수행할 수도 있다. 전자 장치(1000)는 평탄화된 후보 윤곽선을 적어도 하나의 가이드 영역 별 객체에 관한 윤곽으로 검출할 수 있다.In S840, the electronic device 1000 may detect an outline of an object for each of at least one guide area. For example, the electronic device 1000 may detect a contour corresponding to an object in the image by extracting a feature point from a binarized image and identifying a set of points representing the same image value among the extracted feature points. . According to an embodiment, the electronic device 1000 may detect a plurality of contours corresponding to an object in an image, and may determine outermost contours among the detected contours. According to an embodiment, the electronic device 1000 may detect a max contour among contours detected in an image using a convex hull algorithm. In addition, according to an embodiment, the electronic device 1000 detects a contour from at least one binarized guide region, and then smoothes the boundary of the contour by applying an intermediate value filter to the detected contour. You can also do more. The electronic device 1000 may detect the flattened candidate contour as a contour of an object for each of at least one guide area.

S860에서, 전자 장치(1000)는 검출된 윤곽이 객체에 대응될 확률을 결정할 수 있다. 예를 들어, 전자 장치(1000)는 이진화된 이미지 영역을 포함하는 적어도 하나의 가이드 영역 별로 최외곽 윤곽을 검출하고, 검출된 최외곽 윤곽들 각각이 객체에 대응될 확률을 결정할 수 있다. In S860, the electronic device 1000 may determine a probability that the detected contour corresponds to the object. For example, the electronic device 1000 may detect an outermost contour for each of at least one guide area including a binarized image area, and determine a probability that each of the detected outermost contours corresponds to an object.

보다 상세하게는, 전자 장치(1000)는 적어도 하나의 가이드 영역 별 윤곽에 관한 윤곽 성분들을 결정하고, 결정된 윤곽 성분들을 이용하여 객체를 식별하기 위한 식별 조건을 결정할 수 있다. 전자 장치(1000)는 결정된 식별 조건에 서로 다른 가중치를 적용함으로써, 적어도 하나의 가이드 영역 내 윤곽들이 객체에 대응될 확률을 결정할 수 있다. 예를 들어, 전자 장치(1000)는 하나의 가이드 영역에서 검출된 윤곽의 윤곽 성분들로써 윤곽의 높이, 윤곽의 폭, 윤곽의 면적, 윤곽을 구성하는 픽셀들, 상기 윤곽을 구성하는 픽셀들의 좌표 값, 상기 픽셀들을 포함하는 타원의 경계에 관한 좌표 값을 결정할 수 있다. 전자 장치(1000)는 윤곽 성분들에 기초하여 상기 윤곽을 기준으로 형성된 타원 내 픽셀들의 강도, 검출된 윤곽의 면적, 검출된 윤곽의 높이 및 윤곽의 폭의 비율, 윤곽의 면적 및 최외곽 윤곽의 면적을 제외한 윤곽 내 면적의 비율과 같은 식별 조건들을 결정할 수 있다. In more detail, the electronic device 1000 may determine contour components related to an outline of at least one guide area, and determine an identification condition for identifying an object using the determined contour components. The electronic device 1000 may determine a probability that contours in at least one guide area correspond to the object by applying different weights to the determined identification condition. For example, the electronic device 1000 uses the contour components of the contour detected in one guide area, such as the height of the contour, the width of the contour, the area of the contour, the pixels constituting the contour, and the coordinate values of the pixels constituting the contour. , It is possible to determine a coordinate value for a boundary of an ellipse including the pixels. Based on contour components, the electronic device 1000 includes the intensity of pixels in the ellipse formed based on the contour, the area of the detected contour, the height of the detected contour and the ratio of the width of the contour, the area of the contour, and the outermost contour. Identification conditions such as the ratio of the area within the contour excluding the area can be determined.

전자 장치(1000)는 하나의 가이드 영역에서 검출된 윤곽 및 상기 윤곽을 구성하는 윤곽 성분들로부터 상술한 바와 같은 식별 조건을 결정한 후, 검출된 윤곽들이, 서로 다른 가중치를 가지는 식별 조건에 해당할 점수를 결정할 수 있다. 전자 장치(1000)는 가이드 영역에서 검출된 윤곽에 대하여, 식별 조건 별 점수를 할당한 후, 할당된 점수들을 식별 조건 별로 서로 다르게 할당된 가중치에 따라 가중합함으로써, 가이드 영역 내 윤곽이 객체에 대응될 확률을 결정할 수 있다.The electronic device 1000 determines the identification condition as described above from the contour detected in one guide area and the contour components constituting the contour, and then points that the detected contours correspond to the identification condition having different weights. Can be determined. The electronic device 1000 allocates points for each identification condition to the contour detected in the guide area, and then weights the allocated points according to different weights assigned to each identification condition, so that the outline within the guide area corresponds to the object. You can determine the probability of becoming.

S880에서, 전자 장치(1000)는 적어도 하나의 가이드 영역 별로 결정된 객체에 대응된 확률 값들이 기 설정된 임계치 이상인지 여부를 결정할 수 있다. 또한, 전자 장치(1000)는 적어도 하나의 가이드 영역 들 중, 기 설정된 임계치 보다 큰 윤곽을 포함하는 가이드 영역이 무엇인지 여부를 식별할 수 있다. 전자 장치(1000)는 미리 설정된 임계치 보다 큰, 확률 값을 나타내는 윤곽을 포함하는 가이드 영역으로부터만 특징 벡터를 추출하고, 추출된 특징 벡터를 미리 학습된 인공 지능 모델에 입력함으로써, 객체 식별 과정을 한번 더 수행하게 된다.In S880, the electronic device 1000 may determine whether probability values corresponding to an object determined for each of at least one guide area are equal to or greater than a preset threshold. In addition, the electronic device 1000 may identify which of the at least one guide area is a guide area including an outline larger than a preset threshold. The electronic device 1000 extracts a feature vector only from a guide region including an outline representing a probability value greater than a preset threshold, and inputs the extracted feature vector into a pre-learned artificial intelligence model, thereby performing the object identification process once. You will perform more.

일 실시 예에 의하면, 전자 장치(1000)는 미리 설정된 임계치 보다 큰 확률 값을 나타내는 윤곽을 포함하는 가이드 영역들로부터 특징 벡터를 추출하기 전, 가이드 영역들을 미리 설정된 크기로 리사이징(resizing)할 수 있다. 전자 장치(1000)는 미리 설정된 크기로 리사이징된 적어도 하나의 가이드 영역으로부터 특징 벡터를 추출할 수도 있다.According to an embodiment, the electronic device 1000 may resize the guide regions to a preset size before extracting a feature vector from guide regions including an outline representing a probability value greater than a preset threshold. . The electronic device 1000 may extract a feature vector from at least one guide area resized to a preset size.

본 개시에 따른 전자 장치(1000)는 이미지 내 적어도 하나의 가이드 영역들로부터 추출된 윤곽들이 객체에 대응될 확률 값들을 결정하고, 결정된 확률들이 기 설정된 임계치 이하인 가이드 영역에 대해서는 객체가 식별되지 않은 것으로 결정하며, 확률 값들이 기 설정된 임계치보다 큰 가이드 영역으로부터만 특징 벡터를 추출하고, 추출된 특징 벡터를 인공 지능 모델에 입력함으로써, 인공 지능 연산량을 감소시킬 수 있다. The electronic device 1000 according to the present disclosure determines probability values that contours extracted from at least one guide region in the image correspond to an object, and that the object is not identified for a guide region whose determined probabilities are less than a preset threshold. It is determined, by extracting a feature vector only from a guide region whose probability values are larger than a preset threshold, and inputting the extracted feature vector into the artificial intelligence model, thereby reducing the amount of artificial intelligence computation.

즉, 전자 장치(1000)는 이미지 내 가이드 영역들에 대하여 1차로 객체에 대응될 확률 값을 결정해 본 후, 객체에 대응될 확률 값이 높은 가이드 영역으로부터 추출된 특징 벡터를 이용하여, 객체에 대응될 확률 값이 높은 가이드 영역에 대해서만 인공 지능 모델을 이용하여 신경망 연산을 수행함으로써, 신속하고, 정확하게 이미지 내 객체의 종류를 식별할 수 있다.That is, the electronic device 1000 first determines a probability value corresponding to the object with respect to the guide regions in the image, and then uses the feature vector extracted from the guide region having a high probability value corresponding to the object, By performing a neural network operation using an artificial intelligence model only for a guide region having a high probability of being matched, it is possible to quickly and accurately identify the type of object in the image.

도 9는 일 실시 예에 따른 전자 장치가 적어도 하나의 가이드 영역으로부터, 객체에 관한 윤곽을 검출하는 과정을 설명하기 위한 도면이다.9 is a diagram for describing a process of detecting an outline of an object from at least one guide area by an electronic device according to an exemplary embodiment.

S920에서 전자 장치(1000)는 S840단계에 대응되는 윤곽 검출 방법을 이용하여, 가이드 영역 별 객체에 대응되는 윤곽을 검출할 수 있다. S940에서, 전자 장치(1000)는 가이드 영역 별로 검출된 윤곽(contour)을 근사(approximation)할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 가이드 영역 내 복수의 윤곽들 중, 일부 윤곽들을 제거하며, 가장 큰 윤곽의 경계를 평탄화(smoothing)할 수도 있다. S960에서, 전자 장치(1000)는 가이드 영역 별로 검출된 윤곽의 경계를 식별하고, 식별된 윤곽의 경계에 인접한 타원을 생성할 수 있다. 전자 장치(1000)는 윤곽을 기준으로 형성된 타원 내 픽셀들의 강도를 결정하고, 타원 내 픽셀들의 강도에 기초하여, 가이드 영역에서 검출된 윤곽이 객체에 대응될 확률을 결정할 수도 있다.In S920, the electronic device 1000 may detect a contour corresponding to an object for each guide area by using the contour detection method corresponding to step S840. In S940, the electronic device 1000 may approximate a contour detected for each guide area. According to an embodiment, the electronic device 1000 may remove some contours from among a plurality of contours in the guide area, and may smooth the boundary of the largest contour. In S960, the electronic device 1000 may identify a boundary of the detected contour for each guide area and generate an ellipse adjacent to the boundary of the identified contour. The electronic device 1000 may determine the intensity of pixels in the ellipse formed based on the contour, and may determine a probability that the contour detected in the guide area corresponds to the object based on the intensity of the pixels in the ellipse.

도 10은 일 실시 예에 따른 전자 장치가 이진화된 적어도 하나의 가이드 영역 내 이미지로부터 윤곽선을 검출하는 구체적인 방법을 설명하기 위한 흐름도이다.10 is a flowchart illustrating a detailed method of detecting an outline from an image in at least one binarized guide area by an electronic device according to an exemplary embodiment.

S1020에서, 전자 장치(1000)는 이진화된 픽셀 값들을 포함하는 이미지 내 제1 가이드 영역을 포함하는 사각 형태의 경계 박스를 생성할 수 있다. 예를 들어, 전자 장치(1000)는 제1 가이드 영역으로부터 소정의 높이 및 폭을 증가시킴으로써 사각 형태의 경계 박스를 생성할 수 있다.In S1020, the electronic device 1000 may generate a rectangular bounding box including the first guide area in the image including the binarized pixel values. For example, the electronic device 1000 may generate a rectangular bounding box by increasing a predetermined height and width from the first guide area.

S1040에서, 전자 장치(1000)는 경계 박스의 각 변의 중심점에 기초하여 객체를 포함하는 후보 윤곽선을 결정할 수 있다. 예를 들어, 전자 장치(1000)는 경계박스의 꼭지점 좌표들을 식별하고, 식별된 꼭지점들의 좌표에 기초하여 경계박스의 중심점의 좌표를 식별할 수 있다. 전자 장치(1000)는 식별된 중심점의 좌표들 중, 인접한 두개의 중심점을 이용하여 후보 윤곽선을 결정할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)가 생성하는 후보 윤곽선은 인접한 두개의 중심점 중 일 중심점으로부터 시작되어, 다른 중심점에서 종료되는, 임의의 직선 또는 곡선 중 적어도 하나를 포함할 수 있다.In S1040, the electronic device 1000 may determine a candidate contour including the object based on the center point of each side of the bounding box. For example, the electronic device 1000 may identify the coordinates of the vertices of the bounding box, and may identify the coordinates of the center point of the bounding box based on the coordinates of the identified vertices. The electronic device 1000 may determine a candidate contour using two adjacent center points among coordinates of the identified center point. According to an embodiment, the candidate contour line generated by the electronic device 1000 may include at least one of an arbitrary straight line or a curve starting from one of two adjacent center points and ending at the other center point.

S1060에서, 전자 장치(1000)는 후보 윤곽을 따라 배치되는 후보 윤곽선으로부터 떨어진 거리에 기초하여, 서로 다른 점수를 나타내는 조정 박스들을 이용하여 후보 윤곽선을 조정할 수 있다. 예를 들어, 전자 장치(1000)는 후보 윤곽선을 기준으로 양쪽으로 제1 거리만큼 떨어진 제1 조정 박스를 생성하고, 후보 윤곽선을 기준으로 양쪽으로 제2 거리만큼 떨어진 제2 조정 박스를 생성할 수 있다. 전자 장치(1000)는 제1 조정 박스에는 제1 조정 점수를 할당하고, 제2 조정 박스에는 제2 조정 점수를 할당할 수 있다. In S1060, the electronic device 1000 may adjust the candidate contour using adjustment boxes representing different scores based on a distance away from the candidate contour arranged along the candidate contour. For example, the electronic device 1000 may generate a first adjustment box separated by a first distance on both sides based on the candidate contour line, and generate a second adjustment box separated by a second distance on both sides based on the candidate contour line. have. The electronic device 1000 may allocate a first adjustment score to the first adjustment box and a second adjustment score to the second adjustment box.

전자 장치(1000)는 서로 다른 점수를 나타내는 복수의 조정 박스들을 이용하여, 현재 생성된 후보 윤곽선들 내 부분 후보 윤곽선들에 대한 점수를 결정할 수 있다. 전자 장치(1000)는 부분 후보 윤곽선들에 대한 점수에 기초하여 부분 후보 윤곽선들을 조정함으로써, 전체 후보 윤곽선을 조정할 수 있다.The electronic device 1000 may determine scores for partial candidate contours within the currently generated candidate contours by using a plurality of adjustment boxes representing different scores. The electronic device 1000 may adjust the entire candidate contours by adjusting the partial candidate contours based on scores for the partial candidate contours.

일 실시 예에 의하면, 전자 장치(1000)는 조정된 후보 윤곽선을 평탄화 할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 미리 설정된 중간값 필터를 이용하여 조정된 후보 윤곽선을 평탄화 할 수도 있다.According to an embodiment, the electronic device 1000 may flatten the adjusted candidate contour line. According to an embodiment, the electronic device 1000 may flatten the adjusted candidate contour using a preset median filter.

S1080에서, 전자 장치(1000)는 조정된 후보 윤곽선을 가이드 영역 내 객체의 윤곽으로 검출할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 평탄화된 후보 윤곽선을 적어도 하나의 가이드 영역 별 객체에 관한 윤곽으로 검출할 수도 있다.In S1080, the electronic device 1000 may detect the adjusted candidate contour as the contour of the object in the guide area. According to an embodiment, the electronic device 1000 may detect the flattened candidate contour as a contour of an object for each guide area.

도 11은 일 실시 예에 따른 전자 장치가 이진화된 적어도 하나의 가이드 영역 내 이미지로부터 윤곽선을 검출하는 구체적인 방법을 설명하기 위한 참고 도면이다.FIG. 11 is a reference diagram for explaining a specific method of detecting an outline from an image in at least one binarized guide area by an electronic device according to an exemplary embodiment.

전자 장치(1000)는 이진화된 이미지를 포함하는 제1 가이드 영역을 포함하는 사각형태의 경계 박스(1112)를 생성할 수 있다. 전자 장치(1000)는 경계 박스(1112)의 꼭지점 좌표를 식별하고, 식별된 꼭지점의 좌표에 기초하여 경계 박스의 중심점(1102, 1104, 1106, 1108)의 좌표를 식별할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 식별된 중심점 중, 인접한 2개의 중심점을 연결함으로써 임의의 호를 생성할 수 있다. 예를 들어, 전자 장치(1000)는 경계박스의 중심점(1102) 및 중심점(1104)를 시점과 종점으로 하는 임의의 후보 윤곽(1116)을 검출할 수 있다. 또 다른 실시 예에 의하면, 전자 장치(1000)는 경계박스의 중심점(1106) 및 중심점(1108)을 시점과 종점으로 하는 임의의 후보 윤곽(1114)를 검출할 수도 있다.The electronic device 1000 may generate a rectangular bounding box 1112 including a first guide area including a binarized image. The electronic device 1000 may identify the coordinates of the vertices of the bounding box 1112 and identify coordinates of the center points 1102, 1104, 1106, and 1108 of the bounding box based on the coordinates of the identified vertex. According to an embodiment, the electronic device 1000 may generate an arbitrary arc by connecting two adjacent center points among the identified center points. For example, the electronic device 1000 may detect an arbitrary candidate contour 1116 using the center point 1102 and the center point 1104 of the bounding box as a starting point and an end point. According to another embodiment, the electronic device 1000 may detect an arbitrary candidate contour 1114 using the center point 1106 and the center point 1108 of the bounding box as a start point and an end point.

예를 들어, 전자 장치(1000)가 경계박스의 인접한 2개의 중심점을 이용하여 후보 윤곽을 검출하는 방법을 구체적으로 설명하기로 한다. 예를 들어, 전자 장치(1000)가 현재 식별한 경계박스의 중심점을 점 A(1122) 및 점 B(1124)가정하기로 한다. 전자 장치(1000)는 점 A 및 점 B를 연결하는 직선을 생성하고, 생성된 직선의 중심점 C (1126)를 식별할 수 있다. 전자 장치(1000)는 점 A 및 점 B를 연결하는 직선에 수직하도록, 중심점 C(1125)로부터 기 설정된 거리만큼 이격된 점 D(1128)를 식별할 수 있다. 전자 장치(1000)는 점 A(1122), WJA B(1124) 및 점 D(1128)을 연결함으로써, 1차 후보 윤곽을 검출할 수 있다.For example, a method in which the electronic device 1000 detects a candidate contour using two adjacent center points of a bounding box will be described in detail. For example, it is assumed that the center point of the bounding box currently identified by the electronic device 1000 is point A (1122) and point B (1124). The electronic device 1000 may generate a straight line connecting the point A and the point B, and identify a center point C 1126 of the generated straight line. The electronic device 1000 may identify a point D 1128 spaced apart from the center point C 1125 by a preset distance so as to be perpendicular to a straight line connecting the points A and B. The electronic device 1000 may detect a primary candidate contour by connecting the point A 1122, the WJA B 1124 and the point D 1128.

본 개시에 따른 전자 장치(1000)는 점 A(1122) 및 점 B(1124)를 이용하여 1차 후보 윤곽을 검출한 방법과 유사하게, 식별된 점 A(1122) 및 점 D(1128)를 이용하여 A(1122) 및 점 D(1128)사이의 2차 후보 윤곽을 검출할 수 있다. 또한, 전자 장치(1000)는 점 D(1128) 및 점 B(1124)를 이용하여 2차 후보 윤곽을 유사한 방법으로 검출할 수 있다. 전자 장치(1000)는 상술한 방식을 반복함으로써, 경계박스의 인접한 2개의 중심점을 연결하는 최적의 후보 윤곽선을 결정할 수 있다.The electronic device 1000 according to the present disclosure identifies the identified points A 1122 and D 1128, similar to the method of detecting the first candidate contour using the points A 1122 and B 1124. Can be used to detect a secondary candidate contour between A 1122 and point D 1128. Also, the electronic device 1000 may detect the second-order candidate contour using the point D 1128 and the point B 1124 in a similar manner. The electronic device 1000 may determine an optimal candidate contour for connecting two adjacent center points of the bounding box by repeating the above-described method.

또한, 전자 장치(1000)는 결정된 후보 윤곽선을 따라 서로 다른 점수를 나타내는 조정 박스들을 생성할 수 있다. 예를 들어, 전자 장치(1000)는 후보 윤곽선으로부터 제1 거리만큼 떨어진 제1 조정 박스(1132)를 생성하고, 후보 윤곽선으로부터 제2 거리만큼 떨어진 제2 조정 박스(1134)를 생성할 수 있다. 전자 장치(1000)는 조정 박스들에 서로 다른 조정 점수를 할당할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 제1 조정 박스 및 제2 조정 박스 외의 영역(1136)에는 0의 조정 점수를 할당하거나, 음의 조정 점수를 할당할 수도 있다. Also, the electronic device 1000 may generate adjustment boxes representing different scores along the determined candidate contour. For example, the electronic device 1000 may generate a first adjustment box 1132 that is separated by a first distance from the candidate contour line, and may generate a second adjustment box 1134 that is separated by a second distance from the candidate contour line. The electronic device 1000 may allocate different adjustment points to the adjustment boxes. According to an embodiment, the electronic device 1000 may allocate a zero adjustment score or a negative adjustment score to areas 1136 other than the first and second adjustment boxes.

전자 장치(1000)는 후보 윤곽선들이 지나는 픽셀들의 좌표를 식별하고, 식별된 픽셀들의 좌표가 제1 조정 박스(1132)에 속하는지, 제2 조정 박스(1134)에 속하는지 여부를 식별함으로써, 후보 윤곽선들에 대한 윤곽 점수를 결정할 수 있다. 전자 장치(1000)는 후보 윤곽선들에 대하여 결정된 윤곽 점수들이 미리 설정된 임계치 이하보다 작은 경우, 이진화된 이미지를 포함하는 가이드 영역으로부터 다시 윤곽을 검출할 수 있다. 그러나, 전자 장치(1000)는 후보 윤곽선들에 대하여 결정된 윤곽 점수들이 미리 설정된 임계치 보다 큰 경우 해당 후보 윤곽을 객체의 윤곽으로 검출할 수 있다. 즉, 전자 장치(1000)는 후보 윤곽선들을 따라 배치된 복수의 조정 박스들을 이용하여 후보 윤곽선에 대한 윤곽 점수를 결정하고, 윤곽 점수와 미리 설정된 임계치를 비교함으로써, 후보 윤곽선들을 조정할 수 있다. 전자 장치(1000)는 서로 다른 점수를 나타내는 조정 박스들을 이용하여 후보 윤곽선을 조정하고, 조정된 후보 윤곽선을 가이드 영역 내 객체에 대한 최종 윤곽으로 검출할 수 있다.The electronic device 1000 identifies coordinates of pixels through which candidate contours pass, and identifies whether the coordinates of the identified pixels belong to the first adjustment box 1132 or the second adjustment box 1134, thereby It is possible to determine the contour score for the contours. When the contour scores determined for the candidate contours are smaller than a preset threshold value, the electronic device 1000 may detect the contour again from the guide region including the binarized image. However, when the contour scores determined for the candidate contours are greater than a preset threshold, the electronic device 1000 may detect the corresponding candidate contour as the contour of the object. That is, the electronic device 1000 may adjust the candidate contours by determining the contour score for the candidate contour using a plurality of adjustment boxes arranged along the candidate contours and comparing the contour score with a preset threshold. The electronic device 1000 may adjust the candidate contour using adjustment boxes representing different scores, and detect the adjusted candidate contour as a final contour of the object in the guide area.

도 12는 일 실시 예에 따라, 전자 장치가 가이드 영역 내 검출된 객체가 눈에 대응될 확률을 결정하기 위해 이용하는 식별 조건을 설명하기 위한 도면이다.12 is a diagram illustrating an identification condition used by an electronic device to determine a probability that an object detected in a guide area corresponds to an eye, according to an exemplary embodiment.

전자 장치(1000)는 인공 지능 연산에 사용될 특징 벡터를 모든 가이드 영역으로부터 추출하는 것이 아니라, 가이드 영역 내 검출된 윤곽이 객체에 대응될 확률을 결정하고, 결정된 확률이 미리 설정된 임계치 이상인 가이드 영역만을 이용하여 객체를 식별할 수 있다. 즉, 전자 장치(1000)는 이진화된 이미지를 포함하는 가이드 영역 내 윤곽을 구성하는 윤곽 성분(1146), 상기 윤곽 성분에 기초하여 소정의 식별 조건(1152)를 결정하고, 결정된 윤곽 성분 및 식별 조건에 기초하여, 특정 가이드 영역으로부터 특징 벡터를 추출할 지 여부를 결정할 수 있다.The electronic device 1000 does not extract feature vectors to be used for artificial intelligence calculations from all guide areas, but determines the probability that the detected contour in the guide area corresponds to the object, and uses only the guide area in which the determined probability is equal to or greater than a preset threshold. So you can identify the object. That is, the electronic device 1000 determines a contour component 1146 constituting an outline in the guide area including the binarized image, a predetermined identification condition 1152 based on the contour component, and determines the determined contour component and the identification condition. Based on, it may be determined whether to extract a feature vector from a specific guide area.

일 실시 예에 의하면, 전자 장치(1000)가 인공 지능 연산을 이용하여 2차적으로 객체를 판단하기 위한 과정에 앞서, 이미지 내 복수의 가이드 영역들에 대한 1차 객체 판단에 필요한 윤곽 성분(1146) 및 식별 조건들(1152)들은 각각 식별 번호(1142) 및 식별 번호(1148)에 의하여 식별될 수 있다. 전자 장치(1000)는 식별 번호(1142) 및 윤곽 성분(1146)을 매칭하고, 식별 번호(1148) 및 식별 조건(1152)을 매칭하며, 매칭된 식별 번호(1142) 및 윤곽 성분(1146)과 매칭된 식별 번호(1148) 및 식별 조건(1152)을 전자 장치의 메모리에 저장해둘 수 있다.According to an embodiment, prior to a process for the electronic device 1000 to secondarily determine an object by using an artificial intelligence operation, a contour component 1146 necessary for determining a primary object for a plurality of guide areas in an image And identification conditions 1152 may be identified by identification number 1142 and identification number 1148, respectively. The electronic device 1000 matches the identification number 1142 and the contour component 1146, matches the identification number 1148 and the identification condition 1152, and matches the identification number 1142 and the contour component 1146. The matched identification number 1148 and identification condition 1152 may be stored in a memory of the electronic device.

일 실시 예에 의하면, 전자 장치(1000)가 이용하는 윤곽 성분(1146)은 가이드 영역으로부터 추출된 윤곽의 높이, 윤곽의 폭, 윤곽의 면적, 윤곽을 구성하는 픽셀, 상기 윤곽을 구성하는 픽셀들의 좌표에 대한 정보를 포함할 수 있다. 또한, 일 실시 예에 의하면, 전자 장치(1000)가 이용하는 식별 조건(1152)은 상기 윤곽 성분에 기초하여, 윤곽을 기준으로 형성된 타원 내 픽셀들의 강도, 검출된 윤곽의 면적, 검출된 윤곽의 좌표 정보, 검출된 윤곽의 높이 및 폭의 비율(Aspect ratio) 또는 최외곽 윤곽의 면적 및 상기 최외곽 윤곽의 면적을 제외한 상기 윤곽 내 면적의 비율(solidity)를 포함할 수 있다.According to an embodiment, the contour component 1146 used by the electronic device 1000 is the height of the contour extracted from the guide area, the width of the contour, the area of the contour, the pixels constituting the contour, and coordinates of the pixels constituting the contour. May include information about. In addition, according to an embodiment, the identification condition 1152 used by the electronic device 1000 is, based on the contour component, the intensity of pixels in the ellipse formed based on the contour, the area of the detected contour, and the coordinates of the detected contour. It may include information, an aspect ratio of the height and width of the detected contour, or an area of the outermost contour and a solidity of an area within the contour excluding an area of the outermost contour.

일 실시 예에 의하면, 전자 장치(1000)는 결정된 식별 조건에 서로 다른 가중치를 적용함으로써, 적어도 하나의 가이드 영역 내 윤곽들이 객체에 대응될 확률을 결정할 수 있다. 예를 들어, 전자 장치(1000)는 가이드 영역에서 검출된 윤곽을 기준으로 형성된 타원 내 픽셀들의 강도 값을 식별한 후, 식별된 강도 값의 세기에 따라, ##0001항목에는 제1 점수를 할당할 수 있다. According to an embodiment, the electronic device 1000 may determine a probability that contours in at least one guide area correspond to an object by applying different weights to the determined identification condition. For example, the electronic device 1000 identifies the intensity values of pixels in the ellipse formed based on the outline detected in the guide area, and then assigns a first score to the ##0001 item according to the intensity of the identified intensity value. can do.

또한, 전자 장치(1000)는 가이드 영역에서 검출된 윤곽의 높이 및 폭의 비율(Aspect ratio)에 따라 ##0100항목에는 제2 점수를 할당할 수 있다. 또한, 전자 장치(1000)는 가이드 영역에서 검출된 최외곽 윤곽의 면적 및 최외곽 윤곽의 면적을 제외한 윤곽 내 면적의 비율(solidity)에 따라 ##1001항목에는 제3 점수를 할당할 수 있다. 마찬가지로, 전자 장치(1000)는 가이드 영역으로부터 검출된 윤곽이 다른 식별조건의 항목들에 대응하는 정도에 따라 점수를 할당할 수 있다. In addition, the electronic device 1000 may allocate a second score to the ##0100 item according to the aspect ratio of the height and width of the contour detected in the guide area. In addition, the electronic device 1000 may allocate a third score to item ##1001 according to a solidity of the area of the outermost contour detected in the guide area and the area within the contour excluding the area of the outermost contour. Likewise, the electronic device 1000 may allocate points according to the degree to which the contours detected from the guide area correspond to items of different identification conditions.

전자 장치(1000)는 각 식별 조건의 항목 별로 할당된 점수를 합한 값에 기초하여, 가이드 영역으로부터 검출된 윤곽이 객체에 대응될 확률을 결정할 수 있다. 또한, 일 실시 예에 의하면, 전자 장치(1000)는 각 식별 조건에 대응되는 점수를 단순히 합하는 것이 아니라, 식별 조건 별로 서로 다른 가중치를 결정하고, 서로 다른 가중치에 따라 각 식별 조건에 대한 점수들을 가중합함으로써, 가이드 영역 내 윤곽이 객체에 대응될 확률을 결정할 수도 있다.The electronic device 1000 may determine a probability that the contour detected from the guide area corresponds to the object based on a sum of points allocated for each item of each identification condition. In addition, according to an embodiment, the electronic device 1000 does not simply sum the scores corresponding to each identification condition, but determines different weights for each identification condition, and weights the scores for each identification condition according to different weights. By summing, it is also possible to determine the probability that the outline in the guide area corresponds to the object.

도 13은 일 실시 예에 따른 전자 장치의 블록도이다.13 is a block diagram of an electronic device according to an exemplary embodiment.

도 14는 또 다른 실시 예에 따른 전자 장치의 블록도이다.14 is a block diagram of an electronic device according to another embodiment.

도 13에 도시된 바와 같이, 전자 장치(1000)는 프로세서(1300), 메모리(1700), 카메라 모듈(1610) 및 디스플레이부(1210)를 포함할 수 있다. 그러나 도시된 구성 요소 모두가 필수구성요소인 것은 아니다. 도시된 구성요소보다 많은 구성요소에 의해 전자 장치(1000)가 구현될 수도 있고, 그보다 적은 구성 요소에 의해서도 전자 장치(1000)가 구현될 수도 있다.13, the electronic device 1000 may include a processor 1300, a memory 1700, a camera module 1610, and a display 1210. However, not all of the illustrated components are essential components. The electronic device 1000 may be implemented by more components than the illustrated components, or the electronic device 1000 may be implemented by fewer components.

예를 들어, 도 14에 도시된 바와 같이, 일 실시 예에 따른 전자 장치(1000)는 프로세서(1300), 메모리(1700), 카메라 모듈(1610) 및 디스플레이부(1210)이외에 사용자 입력 인터페이스(1100), 음향 출력부(1220) 및 진동 모터(1230)를 더 포함하는 출력부(1200), 센싱부(1400), 네트워크 인터페이스(1500), A/V 입력부(1600), 체결부(미도시)를 더 포함할 수도 있다. For example, as illustrated in FIG. 14, the electronic device 1000 according to an exemplary embodiment includes a user input interface 1100 in addition to the processor 1300, the memory 1700, the camera module 1610, and the display 1210. ), an output unit 1200 further including a sound output unit 1220 and a vibration motor 1230, a sensing unit 1400, a network interface 1500, an A/V input unit 1600, a fastening unit (not shown) It may further include.

사용자 입력 인터페이스(1100)는, 사용자가 전자 장치 (1000)를 제어하기 위한 시퀀스를 입력하는 수단을 의미한다. 예를 들어, 사용자 입력 인터페이스(1100)에는 키 패드(key pad), 돔 스위치 (dome switch), 터치 패드(접촉식 정전 용량 방식, 압력식 저항막 방식, 적외선 감지 방식, 표면 초음파 전도 방식, 적분식 장력 측정 방식, 피에조 효과 방식 등), 조그 휠, 조그 스위치 등이 있을 수 있으나 이에 한정되는 것은 아니다. 사용자 입력 인터페이스(1100)는 전자 장치(1000)가 디스플레이 상에 출력한 화면에 대한 사용자의 입력 시퀀스를 수신할 수 있다. 또한, 사용자 입력 인터페이스(1100)는 디스플레이를 터치하는 사용자의 터치 입력 또는 디스플레이상 그래픽 사용자 인터페이스를 통한 키 입력을 수신할 수도 있다.The user input interface 1100 refers to a means for a user to input a sequence for controlling the electronic device 1000. For example, the user input interface 1100 includes a key pad, a dome switch, and a touch pad (contact capacitive method, pressure resistive film method, infrared sensing method, surface ultrasonic conduction method, red). A method for measuring a powdered tension, a method for measuring a piezo effect, etc.), a jog wheel, a jog switch, etc. may be provided, but the present invention is not limited thereto. The user input interface 1100 may receive a user input sequence for a screen output on the display by the electronic device 1000. In addition, the user input interface 1100 may receive a touch input of a user who touches the display or a key input through a graphic user interface on the display.

출력부(1200)는, 오디오 신호 또는 비디오 신호 또는 진동 신호를 출력할 수 있으며, 출력부(1200)는 디스플레이부(1210), 음향 출력부(1220), 및 진동 모터(1230)를 포함할 수 있다.The output unit 1200 may output an audio signal, a video signal, or a vibration signal, and the output unit 1200 may include a display unit 1210, an audio output unit 1220, and a vibration motor 1230. have.

디스플레이부(1210)는 전자 장치(1000)에서 처리되는 정보를 표시 출력하기 위한 화면을 포함한다. 또한, 화면은 동물 이미지를 사용자가 촬영하도록 하기 위한 안내 메시지, 적어도 하나의 가이드 영역들을 표시할 수 있다. 음향 출력부(1220)는 네트워크 인터페이스 (1500)로부터 수신되거나 메모리(1700)에 저장된 오디오 데이터를 출력한다. 또한, 음향 출력부(1220)는 전자 장치(1000)에서 수행되는 기능과 관련된 음향 신호를 출력한다. 진동 모터(1230)는 진동 신호를 출력할 수 있다. 예를 들어, 진동 모터(1230)는 전자 장치(1000)에서 수행되는 기능들의 출력에 대응하는 진동 신호를 출력할 수 있다.The display 1210 includes a screen for displaying and outputting information processed by the electronic device 1000. In addition, the screen may display a guide message for allowing a user to photograph an animal image and at least one guide area. The sound output unit 1220 outputs audio data received from the network interface 1500 or stored in the memory 1700. Also, the sound output unit 1220 outputs sound signals related to functions performed by the electronic device 1000. The vibration motor 1230 may output a vibration signal. For example, the vibration motor 1230 may output a vibration signal corresponding to an output of functions performed by the electronic device 1000.

프로세서(1300)는, 통상적으로 전자 장치(1000)의 전반적인 동작을 제어한다. 예를 들어, 프로세서(1300)는, 메모리(1700)에 저장된 프로그램들을 실행함으로써, 사용자 입력부(1100), 출력부(1200), 센싱부(1400), 통신부(1500), A/V 입력부(1600) 등을 전반적으로 제어할 수 있다. 또한, 프로세서(1300)는 메모리(1700)에 저장된 프로그램들을 실행함으로써, 도 1 내지 도 12에 기재된 전자 장치(1000)의 기능을 수행할 수 있다.The processor 1300 generally controls the overall operation of the electronic device 1000. For example, the processor 1300, by executing programs stored in the memory 1700, the user input unit 1100, the output unit 1200, the sensing unit 1400, the communication unit 1500, the A/V input unit 1600 ) And so on. Also, the processor 1300 may perform a function of the electronic device 1000 illustrated in FIGS. 1 to 12 by executing programs stored in the memory 1700.

구체적으로, 프로세서(1300)는 사용자 입력부를 제어함으로써 전자 장치의 화면을 터치하는 사용자의 입력을 획득할 수 있다. 일 실시 예에 의하면, 프로세서(1300)는 사용자의 음성을 획득하도록 마이크로폰을 제어할 수도 있다. 프로세서(1300)는 사용자 입력에 기초하여 객체를 포함하는 이미지들을 획득할 수 있고, 이미지 내 객체가 식별되지 않는 경우, 사용자로부터 재 수신된 사용자 입력에 기초하여, 객체를 포함하는 이미지를 다시 획득할 수 있다.Specifically, the processor 1300 may obtain an input of a user who touches the screen of the electronic device by controlling the user input unit. According to an embodiment, the processor 1300 may control the microphone to acquire a user's voice. The processor 1300 may acquire images including the object based on a user input, and if the object in the image is not identified, the processor 1300 may obtain an image including the object again based on a user input re-received from the user. I can.

일 실시 예에 의하면, 프로세서(1300)는 메모리에 저장된 상기 하나 이상의 인스트럭션을 실행함으로써, 상기 객체를 포함하는 이미지를 획득하고, 상기 획득된 이미지 내 상기 객체에 대응되는 적어도 하나의 가이드 영역을 결정하고, 상기 적어도 하나의 가이드 영역으로부터 상기 객체를 식별하기 위한 특징 벡터를 추출하고, 상기 추출된 특징 벡터를 인공 지능인공 지능 모델에 입력함으로써 상기 이미지 내 객체의 종류를 식별하며, 상기 식별된 객체의 종류가 동물의 눈 또는 상기 동물의 눈과 관련된 부분 객체들로 식별되는 경우, 상기 객체를 포함하는 이미지 내 적어도 하나의 픽셀 값들을 저장할 수 있다. 일 실시 예에 의하면, 상기 인공 지능은 입력 레이어, 출력 레이어 및 상기 입력 레이어와 출력 레이어 사이의 하나 이상의 히든 레이어들을 포함하고, 상기 입력 레이어, 출력 레이어 및 상기 히든 레이어들 사이의 연결 강도에 관한 가중치가 갱신되는 전방향(FeedForward) 네트워크일 수 있다.According to an embodiment, the processor 1300 acquires an image including the object by executing the one or more instructions stored in a memory, determines at least one guide area corresponding to the object in the acquired image, and , Extracting a feature vector for identifying the object from the at least one guide area, and inputting the extracted feature vector into an artificial intelligence artificial intelligence model to identify the type of object in the image, and the type of the identified object When is identified as an animal's eye or a partial object related to the animal's eye, at least one pixel value in an image including the object may be stored. According to an embodiment, the artificial intelligence includes an input layer, an output layer, and one or more hidden layers between the input layer and the output layer, and a weight related to the connection strength between the input layer, the output layer, and the hidden layers. It may be a feedforward network in which is updated.

또한, 일 실시 예에 의하면, 프로세서(1300)는 하나 이상의 인스트럭션을 실행함으로써, 상기 획득된 이미지 내 미리 설정된 기준 픽셀을 포함하도록 상기 객체에 대응되는 제1 가이드 영역을 결정하고, 상기 결정된 제1 가이드 영역을 미리 설정된 스케일에 따라 스케일링함으로써 상기 객체에 대응되는 적어도 하나의 제2 가이드 영역을 결정하고, 상기 제1 가이드 영역 및 상기 적어도 하나의 제2 가이드 영역 각각에 대한 특징 벡터를 추출할 수 있다.In addition, according to an embodiment, the processor 1300 determines a first guide area corresponding to the object to include a preset reference pixel in the acquired image by executing one or more instructions, and the determined first guide By scaling an area according to a preset scale, at least one second guide area corresponding to the object may be determined, and feature vectors for each of the first guide area and the at least one second guide area may be extracted.

또한, 일 실시 예에 의하면, 프로세서(1300)는 제1 가이드 영역은 상기 전자 장치의 화면 상에 표시하고, 상기 적어도 하나의 제2 가이드 영역은 전자 장치의 화면상에 표시되지 않도록 디스플레이를 제어할 수도 있다.In addition, according to an embodiment, the processor 1300 may control the display so that the first guide area is displayed on the screen of the electronic device, and the at least one second guide area is not displayed on the screen of the electronic device. May be.

일 실시 예에 의하면, 프로세서(1300)는 이미지 내 픽셀들의 그래디언트(gradient)를 결정하고, 상기 결정된 그래디언트를 이용하여 상기 이미지 내 부분 영역 별 히스토그램을 생성하고, 상기 부분 영역 별로 생성된 히스토그램의 빈(bin)값을 연결함으로써 상기 특징 벡터를 추출할 수 있다.According to an embodiment, the processor 1300 determines a gradient of pixels in an image, generates a histogram for each partial region in the image using the determined gradient, and generates a blank of the histogram for each partial region. By linking bin) values, the feature vector can be extracted.

또한, 일 실시 예에 의하면, 프로세서(1300)는 제1 가이드 영역 및 상기 적어도 하나의 제2 가이드 영역 각각에 대한 객체의 종류를 식별하고, 상기 식별된 객체의 종류 중, 동일한 종류의 객체로 식별되는 가이드 영역의 빈도수를 결정하고, 결정된 빈도수에 기초하여 상기 이미지 내 객체의 종류를 식별할 수 있다.In addition, according to an embodiment, the processor 1300 identifies a type of an object for each of the first guide area and the at least one second guide area, and identifies the type of the identified object as an object of the same type. The frequency number of the guide area to be formed may be determined, and the type of the object in the image may be identified based on the determined frequency number.

또한, 일 실시 예에 의하면, 프로세서(1300)는 획득된 이미지 내의 픽셀값들에 가우시안 분포를 나타내는 가우시안 커널을 적용함으로써, 상기 획득된 이미지 내 가우시안 잡음을 제거하고, 상기 가우시안 잡음이 제거된 이미지 내 픽셀 값들의 히스토그램을 평활화(equalizing) 하고, 히스토그램이 평활화된 이미지 내 상기 적어도 하나의 가이드 영역을 결정할 수 있다.In addition, according to an embodiment, the processor 1300 removes Gaussian noise in the acquired image by applying a Gaussian kernel indicating a Gaussian distribution to pixel values in the acquired image, and The histogram of pixel values may be equalized, and the at least one guide area in the image whose histogram is smoothed may be determined.

또한, 일 실시 예에 의하면, 프로세서(1300)는 적어도 하나의 가이드 영역 별로 상기 객체에 관한 윤곽을 검출하고, 상기 검출된 윤곽이 상기 객체에 대응될 확률을 결정하고, 상기 결정된 확률이 기 설정된 임계치보다 큰 윤곽을 포함하는 상기 적어도 하나의 가이드 영역으로부터 상기 특징 벡터를 추출할 수 있다.In addition, according to an embodiment, the processor 1300 detects a contour of the object for each of at least one guide area, determines a probability that the detected contour corresponds to the object, and the determined probability is a preset threshold. The feature vector may be extracted from the at least one guide area including a larger outline.

또한, 일 실시 예에 의하면, 프로세서(1300)는 검출된 윤곽 내 윤곽 성분들을 이용하여 상기 객체를 식별하기 위한 식별 조건을 결정하고, 상기 결정된 식별 조건에 서로 다른 가중치를 적용함으로써, 상기 적어도 하나의 가이드 영역 내 윤곽이 상기 객체에 대응될 확률을 결정할 수 있다.In addition, according to an embodiment, the processor 1300 determines an identification condition for identifying the object using the detected contour components in the contour, and applies different weights to the determined identification condition, so that the at least one It is possible to determine a probability that the outline in the guide area corresponds to the object.

또한, 일 실시 예에 의하면, 프로세서(1300)는 히스토그램이 평활화된 이미지들을 미리 설정된 크기의 적어도 하나의 부분 영역들로 분할하고, 상기 분할된 부분 영역들의 픽셀 값에 기초하여, 상기 부분 영역별로 임계값들을 결정하고, 상기 결정된 임계값들에 기초하여 상기 부분 영역들 내 픽셀 값들을 이진화 하고, 이진화된 픽셀 값들을 포함하는 이미지 내, 상기 적어도 하나의 가이드 영역 별로 상기 객체에 관한 윤곽을 검출할 수 있다.In addition, according to an embodiment, the processor 1300 divides the histogram-smoothed image into at least one partial region of a preset size, and based on the pixel values of the divided partial regions, the processor 1300 Determine values, binarize pixel values in the partial regions based on the determined threshold values, and detect a contour of the object for each of the at least one guide region within an image including the binarized pixel values. have.

또한, 일 실시 에에 의하면, 프로세서(1300)는 결정된 확률이 기 설정된 임계치 보다 큰 윤곽을 포함하는 상기 적어도 하나의 가이드 영역들의 크기를 리사이징(resizing) 하고, 상기 리사이징된 적어도 하나의 가이드 영역 별로 상기 특징 벡터를 추출할 수도 있다.In addition, according to an embodiment, the processor 1300 resizes the sizes of the at least one guide area including an outline having a determined probability greater than a preset threshold, and the characteristic for each of the resized at least one guide area. You can also extract vectors.

또한, 일 실시 예에 의하면, 프로세서(1300)는 이진화된 픽셀 값들을 포함하는 이미지 내 상기 제1 가이드 영역을 포함하는 사각 형태의 경계 박스를 생성하고, 생성된 경계박스의 각 변의 중심점에 기초하여 상기 객체를 포함하는 후보 윤곽선을 결정하며, 결정된 후보 윤곽선을 따라 배치되고, 상기 후보 윤곽선으로부터 떨어진 거리에 기초하여, 서로 다른 점수를 나타내는 조정 박스들을 이용하여 상기 후보 윤곽선을 조정하고, 상기 조정된 후보 윤곽선을 상기 객체의 윤곽으로 검출할 수 있다.In addition, according to an embodiment, the processor 1300 generates a rectangular bounding box including the first guide area in an image including binarized pixel values, and based on the center points of each side of the generated bounding box. A candidate contour including the object is determined, and the candidate contour is adjusted using adjustment boxes representing different scores based on a distance away from the candidate contour and arranged along the determined candidate contour, and the adjusted candidate The outline can be detected as the outline of the object.

또한, 일 실시 예에 의하면, 프로세서(1300)는 상기 조정된 후보 윤곽선을 기 설정된 중간값 필터를 이용하여 평탄화(smoothing) 하고, 상기 평탄화된 후보 윤곽선을 상기 적어도 하나의 가이드 영역 별 상기 객체에 관한 윤곽으로 검출할 수 있다.In addition, according to an embodiment, the processor 1300 smoothes the adjusted candidate contour using a preset median filter, and calculates the flattened candidate contour with respect to the object for each of the at least one guide area. It can be detected by the outline.

센싱부(1400)는, 전자 장치(1000)의 상태 또는 전자 장치(1000) 주변의 상태를 감지하고, 감지된 정보를 프로세서(1300)로 전달할 수 있다. 센싱부(1400)는, 지자기 센서(Magnetic sensor)(1410), 가속도 센서(Acceleration sensor)(1420), 온/습도 센서(1430), 적외선 센서(1440), 자이로스코프 센서(1450), 위치 센서(예컨대, GPS)(1460), 기압 센서(1470), 근접 센서(1480), 및 RGB 센서(illuminance sensor)(1490) 중 적어도 하나를 포함할 수 있으나, 이에 한정되는 것은 아니다. 각 센서들의 기능은 그 명칭으로부터 당업자가 직관적으로 추론할 수 있으므로, 구체적인 설명은 생략하기로 한다.The sensing unit 1400 may detect a state of the electronic device 1000 or a state around the electronic device 1000 and transmit the sensed information to the processor 1300. The sensing unit 1400 includes a magnetic sensor 1410, an acceleration sensor 1420, a temperature/humidity sensor 1430, an infrared sensor 1440, a gyroscope sensor 1450, and a position sensor. (For example, a GPS) 1460, an atmospheric pressure sensor 1470, a proximity sensor 1480, and an RGB sensor 1490 may be included, but are not limited thereto. Since the function of each sensor can be intuitively inferred by a person skilled in the art from its name, a detailed description will be omitted.

네트워크 인터페이스(1500)는, 전자 장치(1000)가 다른 장치(미도시) 및 서버(2000)와 통신을 하게 하는 하나 이상의 구성요소를 포함할 수 있다. 다른 장치(미도시)는 전자 장치(1000)와 같은 컴퓨팅 장치이거나, 센싱 장치일 수 있으나, 이에 제한되지 않는다. 예를 들어, 네트워크 인터페이스(1500)는, 무선 통신 인터페이스(1510), 유선 통신 인터페이스(1520) 및 이동 통신부(530)를 포함할 수 있다. The network interface 1500 may include one or more components that allow the electronic device 1000 to communicate with other devices (not shown) and the server 2000. Another device (not shown) may be a computing device such as the electronic device 1000 or a sensing device, but is not limited thereto. For example, the network interface 1500 may include a wireless communication interface 1510, a wired communication interface 1520, and a mobile communication unit 530.

무선 통신 인터페이스(1510)는 근거리 통신부(short-range wireless communication unit), 블루투스 통신부, 근거리 무선 통신부(Near Field Communication unit), WLAN(와이파이) 통신부, 지그비(Zigbee) 통신부, 적외선(IrDA, infrared Data Association) 통신부, WFD(Wi-Fi Direct) 통신부 등을 포함할 수 있으나, 이에 한정되는 것은 아니다. 유선 통신 인터페이스(1520)는 서버(2000)또는 전자 장치(1000)를 유선으로 연결할 수 있다.The wireless communication interface 1510 includes a short-range wireless communication unit, a Bluetooth communication unit, a Near Field Communication unit, a WLAN (Wi-Fi) communication unit, a Zigbee communication unit, an infrared data association (IrDA). ) May include a communication unit, a Wi-Fi Direct (WFD) communication unit, etc., but is not limited thereto. The wired communication interface 1520 may connect the server 2000 or the electronic device 1000 by wire.

이동 통신부(1530)는, 이동 통신망 상에서 기지국, 외부의 단말, 서버 중 적어도 하나와 무선 신호를 송수신한다. 여기에서, 무선 신호는, 음성 신호, 화상 통화 호 신호 또는 문자/멀티미디어 메시지 송수신에 따른 다양한 형태의 데이터를 포함할 수 있다.The mobile communication unit 1530 transmits and receives a radio signal with at least one of a base station, an external terminal, and a server on a mobile communication network. Here, the wireless signal may include a voice signal, a video call signal, or various types of data according to transmission and reception of text/multimedia messages.

일 실시 예에 의하면, 네트워크 인터페이스(1500)는 프로세서의 제어에 의하여, 객체를 촬영한 이미지에 대한 정보 또는 복수의 프레임으로 구성된 영상들에 대한 정보를 서버로 전송할 수도 있다. 또한, 네트워크 인터페이스(1500)는 서버로부터 이미지 내 객체를 인식한 결과에 대한 정보를 더 수신할 수도 있다. According to an embodiment, the network interface 1500 may transmit information on an image of an object or information on images composed of a plurality of frames to a server under the control of a processor. In addition, the network interface 1500 may further receive information on a result of recognizing an object in the image from the server.

A/V(Audio/Video) 입력부(1600)는 오디오 신호 또는 비디오 신호 입력을 위한 것으로, 이에는 카메라(1610)와 마이크로폰(1620) 등이 포함될 수 있다. 카메라(1610)는 화상 통화모드 또는 촬영 모드에서 이미지 센서를 통해 정지영상 또는 동영상 등의 화상 프레임을 얻을 수 있다. 이미지 센서를 통해 캡쳐된 이미지는 프로세서(1300) 또는 별도의 이미지 처리부(미도시)를 통해 처리될 수 있다. 예를 들어, 카메라 모듈(1610)은 사용자 입력에 기초하여, 동물 이미지를 복수 횟수로 획득할 수 있다.The A/V (Audio/Video) input unit 1600 is for inputting an audio signal or a video signal, and may include a camera 1610 and a microphone 1620. The camera 1610 may obtain an image frame such as a still image or a video through an image sensor in a video call mode or a photographing mode. The image captured through the image sensor may be processed by the processor 1300 or a separate image processing unit (not shown). For example, the camera module 1610 may acquire an animal image multiple times based on a user input.

마이크로폰(1620)은, 외부의 음향 신호를 입력 받아 전기적인 음성 데이터로 처리한다. 예를 들어, 마이크로폰(1620)은 외부 디바이스 또는 사용자로부터 음향 신호를 수신할 수 있다. 마이크로폰(1620)은 사용자의 음성 입력을 수신할 수 있다. 마이크로폰(1620)은 외부의 음향 신호를 입력 받는 과정에서 발생 되는 잡음(noise)을 제거하기 위한 다양한 잡음 제거 알고리즘을 이용할 수 있다. The microphone 1620 receives an external sound signal and processes it as electrical voice data. For example, the microphone 1620 may receive an acoustic signal from an external device or a user. The microphone 1620 may receive a user's voice input. The microphone 1620 may use various noise removal algorithms for removing noise generated in a process of receiving an external sound signal.

메모리(1700)는, 프로세서(1300)의 처리 및 제어를 위한 프로그램을 저장할 수 있고, 전자 장치(1000)로 입력되거나, 출력되는 데이터를 저장할 수도 있다. 또한, 메모리(1700)는 전자 장치(1000)가 사용자 입력에 기초하여 획득한, 객체를 포함하는 이미지, 영상에 대한 정보, 이미지 또는 영상에 표시된 적어도 하나의 가이드 영역에 대한 정보, 가이드 영역으로부터 검출된 윤곽에 대한 정보, 가이드 영역 별 객체의 식별 결과에 대한 정보, 가이드 영역 별 윤곽이 객체에 대응될 확률을 결정하기 위한 윤곽 성분, 또는 식별 조건에 대한 정보를 더 저장할 수도 있다.The memory 1700 may store a program for processing and controlling the processor 1300, and may store data input to or output to the electronic device 1000. In addition, the memory 1700 is an image including an object, information on an image, information on at least one guide area displayed on an image or image, and detection from the guide area obtained by the electronic device 1000 based on a user input. Information on the outlined contour, information on the identification result of the object for each guide area, a contour component for determining a probability that the contour for each guide area corresponds to the object, or information on the identification condition may be further stored.

메모리(1700)는 플래시 메모리 타입(flash memory type), 하드디스크 타입(hard disk type), 멀티미디어 카드 마이크로 타입(multimedia card micro type), 카드 타입의 메모리(예를 들어 SD 또는 XD 메모리 등), 램(RAM, Random Access Memory) SRAM(Static Random Access Memory), 롬(ROM, Read-Only Memory), EEPROM(Electrically Erasable Programmable Read-Only Memory), PROM(Programmable Read-Only Memory), 자기 메모리, 자기 디스크, 광디스크 중 적어도 하나의 타입의 저장매체를 포함할 수 있다. The memory 1700 is a flash memory type, a hard disk type, a multimedia card micro type, a card type memory (for example, SD or XD memory), and RAM. (RAM, Random Access Memory) SRAM (Static Random Access Memory), ROM (ROM, Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), PROM (Programmable Read-Only Memory), magnetic memory, magnetic disk And at least one type of storage medium among optical disks.

메모리(1700)에 저장된 프로그램들은 그 기능에 따라 복수 개의 모듈들로 분류할 수 있는데, 예를 들어, UI 모듈(1710), 터치 스크린 모듈(1720), 알림 모듈(1730) 등으로 분류될 수 있다. Programs stored in the memory 1700 may be classified into a plurality of modules according to their functions, for example, a UI module 1710, a touch screen module 1720, a notification module 1730, and the like. .

UI 모듈(1710)은, 애플리케이션 별로 전자 장치(1000)와 연동되는 특화된 UI, GUI 등을 제공할 수 있다. 터치 스크린 모듈(1720)은 사용자의 터치 스크린 상의 터치 제스처를 감지하고, 터치 제스처에 관한 정보를 프로세서(1300)로 전달할 수 있다. 일부 실시예에 따른 터치 스크린 모듈(1720)은 터치 코드를 인식하고 분석할 수 있다. 터치 스크린 모듈(1720)은 컨트롤러를 포함하는 별도의 하드웨어로 구성될 수도 있다.The UI module 1710 may provide a specialized UI, GUI, etc. that are linked with the electronic device 1000 for each application. The touch screen module 1720 may detect a user's touch gesture on a touch screen and transmit information about the touch gesture to the processor 1300. The touch screen module 1720 according to some embodiments may recognize and analyze a touch code. The touch screen module 1720 may be configured with separate hardware including a controller.

알림 모듈(1730)은 전자 장치(1000)의 이벤트 발생을 알리기 위한 신호를 발생할 수 있다. 전자 장치(1000)에서 발생되는 이벤트의 예로는 호 신호 수신, 메시지 수신, 키 신호 입력, 일정 알림 등이 있다. 알림 모듈(1730)은 디스플레이부(1210)를 통해 비디오 신호 형태로 알림 신호를 출력할 수도 있고, 음향 출력부(1220)를 통해 오디오 신호 형태로 알림 신호를 출력할 수도 있고, 진동 모터(1230)를 통해 진동 신호 형태로 알림 신호를 출력할 수도 있다.The notification module 1730 may generate a signal to notify the occurrence of an event of the electronic device 1000. Examples of events occurring in the electronic device 1000 include call signal reception, message reception, key signal input, and schedule notification. The notification module 1730 may output a notification signal in the form of a video signal through the display unit 1210, may output a notification signal in the form of an audio signal through the sound output unit 1220, and the vibration motor 1230 It is also possible to output a notification signal in the form of a vibration signal through.

도 15는 일 실시 예에 따른 서버의 블록도이다.15 is a block diagram of a server according to an embodiment.

서버(2000)는 네트워크 인터페이스(2100), 데이터 베이스(2200) 및 프로세서(2300)를 포함할 수 있다. 네트워크 인터페이스(2100)는 14 도시된 전자 장치(1000)의 네트워크 인터페이스(1500)에 대응될 수 있다. 예를 들어, 네트워크 인터페이스(2100)는 전자 장치(1000)로부터 객체들을 촬영한 이미지 또는 영상에 대한 정보를 수신하건, 수신된 이미지 또는 영상 내 객체를 인식한 결과에 대한 정보를 전자 장치(1000)로 전송할 수 있다. The server 2000 may include a network interface 2100, a database 2200, and a processor 2300. The network interface 2100 may correspond to the network interface 1500 of the electronic device 1000 illustrated in 14. For example, the network interface 2100 may transmit information on a result of recognizing the received image or object in the image, whether it receives information about an image or an image photographing objects from the electronic device 1000. Can be transferred to.

데이터 베이스(2200)는 도 14에 도시된 전자 장치(1000)의 메모리(1700)에 대응될 수 있다. 예를 들어, 데이터 베이스(2200)는 전자 장치(1000)가 사용자 입력에 기초하여 획득한, 객체를 포함하는 이미지, 영상에 대한 정보, 이미지 또는 영상에 표시된 적어도 하나의 가이드 영역에 대한 정보, 가이드 영역으로부터 검출된 윤곽에 대한 정보, 가이드 영역 별 객체의 식별 결과에 대한 정보, 가이드 영역 별 윤곽이 객체에 대응될 확률을 결정하기 위한 윤곽 성분, 또는 식별 조건에 대한 정보를 더 저장할 수 있다.The database 2200 may correspond to the memory 1700 of the electronic device 1000 illustrated in FIG. 14. For example, the database 2200 includes an image including an object, information on an image, information on at least one guide area displayed on an image or image, and a guide acquired by the electronic device 1000 based on a user input. Information on the contour detected from the region, information on the identification result of the object for each guide region, the contour component for determining a probability that the contour for each guide region corresponds to the object, or information on the identification condition may be further stored.

프로세서(2300)는 통상적으로 서버(2000)의 전반적인 동작을 제어한다. 예를 들어, 프로세서(2300)는, 서버(2000)의 DB(2200)에 저장된 프로그램들을 실행함으로써, DB(2200) 및 네트워크 인터페이스(2100) 등을 전반적으로 제어할 수 있다. 또한, 프로세서(2300)는 DB(2100)에 저장된 프로그램들을 실행함으로써, 도 1 내지 도14에서의 전자 장치(1000)의 동작의 일부를 수행할 수 있다. 예를 들어, 프로세서(2300)는 전자 장치로부터 객체를 포함하는 이미지에 대한 정보를 수신하고, 수신된 이미지 내 객체에 대응되는 적어도 하나의 가이드 영역을 결정하고, 적어도 하나의 가이드 영역으로부터 객체를 식별하기 위한 특징 벡터를 추출하며, 추출된 특징 벡터를 서버에 저장된 인공 지능 모델에 입력함으로써 이미지 내 객체의 종류를 식별할 수 있다. 또한, 프로세서(23000)는 이미지에 대한 분석 결과를 전자 장치(1000)로 전송할 수도 있다. The processor 2300 typically controls the overall operation of the server 2000. For example, the processor 2300 may generally control the DB 2200 and the network interface 2100 by executing programs stored in the DB 2200 of the server 2000. Also, the processor 2300 may perform some operations of the electronic device 1000 in FIGS. 1 to 14 by executing programs stored in the DB 2100. For example, the processor 2300 receives information on an image including an object from the electronic device, determines at least one guide area corresponding to the object in the received image, and identifies the object from at least one guide area. It is possible to identify the type of object in the image by extracting the feature vector to be used and inputting the extracted feature vector to the artificial intelligence model stored in the server. Also, the processor 23000 may transmit an analysis result of the image to the electronic device 1000.

도 16은 일 실시 예에 따라, 전자 장치 및 서버가 서로 연동함으로써 이미지 내 객체를 식별하는 과정을 설명하기 위한 도면이다.16 is a diagram for describing a process of identifying an object in an image by interworking with each other between an electronic device and a server, according to an exemplary embodiment.

S1602에서, 전자 장치(1000)는 객체를 포함하는 이미지를 획득할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 전자 장치 내 적어도 하나의 카메라를 이용하여, 동물 이미지를 포함하는 영상을 획득할 수도 있다. S1604에서, 전자 장치(1000)는 객체를 포함하는 이미지를 서버(2000)로 전송할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 동물을 포함하는 이미지 또는 영상에 대한 정보를 서버(2000)로 전송할 수도 있다.In S1602, the electronic device 1000 may acquire an image including an object. According to an embodiment, the electronic device 1000 may acquire an image including an animal image by using at least one camera in the electronic device. In S1604, the electronic device 1000 may transmit an image including an object to the server 2000. According to an embodiment, the electronic device 1000 may transmit an image including an animal or information on an image to the server 2000.

S1606에서, 서버(2000)는 이미지 내 객체에 대응되는 적어도 하나의 가이드 영역을 결정할 수 있다. 예를 들어, 서버(2000)는 이미지 내 제1 가이드 영역을 결정하고, 결정된 제1 가이드 영역을 미리 설정된 스케일에 따라 스케일링함으로써 제2 가이드 영역들을 결정할 수도 잇다. In S1606, the server 2000 may determine at least one guide area corresponding to an object in the image. For example, the server 2000 may determine the second guide areas by determining a first guide area in the image and scaling the determined first guide area according to a preset scale.

S1608에서, 서버(2000)는 생성된 적어도 하나의 가이드 영역으로부터 객체를 식별하기 위한 특징 벡터를 추출할 수 있다. 일 실시 예에 의하면, 서버(2000)는 이미지 또는 영상 내 픽셀들의 그래디언트를 결정하고, 그래디언트를 이용하여 상기 이미지 내 부분 영역 별 히스토그램을 생성하며, 상기 부분 영역 별로 생성된 히스토그램의 빈(bin)값을 연결함으로써 상기 특징 벡터를 추출할 수 있다.In S1608, the server 2000 may extract a feature vector for identifying an object from the generated at least one guide area. According to an embodiment, the server 2000 determines a gradient of pixels in an image or image, generates a histogram for each partial region in the image using the gradient, and a bin value of the histogram generated for each partial region The feature vector can be extracted by connecting.

S1610에서, 서버(2000)는 추출된 특징 벡터를 미리 학습된 인공 지능 모델에 입력함으로써, 이미지 내 객체의 종류를 식별할 수 있다. S1612에서, 서버(2000)는 식별된 객체의 종류가 동물의 눈 또는 동물의 눈과 관련된 부분 객체들로 식별되는 경우, 해당 객체를 포함하는 이미지 내 적어도 하나의 픽셀 값들을 데이터 베이스에 저장할 수 있다. S1614에서, 서버(2000)는 이미지를 분석함으로써, 이미지 내 객체 인식 결과에 대한 정보를 전자 장치(1000)로 전송할 수 있다. S1616에서, 전자 장치(1000)는 서버로부터 수신된 이미지 내 객체 인식 결과에 대한 정보를 출력할 수 있다.In S1610, the server 2000 may identify the type of object in the image by inputting the extracted feature vector into the pre-learned artificial intelligence model. In S1612, when the type of the identified object is identified as an animal's eye or a partial object related to the animal's eye, the server 2000 may store at least one pixel value in the image including the object in the database. . In S1614, the server 2000 may transmit information on the result of recognizing an object in the image to the electronic device 1000 by analyzing the image. In S1616, the electronic device 1000 may output information on a result of recognizing an object in an image received from the server.

일 실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 개시를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. The method according to an embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like alone or in combination. The program instructions recorded in the medium may be specially designed and configured for the present disclosure, or may be known and usable to those skilled in computer software.

또한, 상기 일 실시 예에 다른 방법을 수행하도록 하는 프로그램이 저장된 기록매체를 포함하는 컴퓨터 프로그램 장치가 제공될 수 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. In addition, a computer program device including a recording medium storing a program for performing another method may be provided in the above embodiment. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. -A hardware device specially configured to store and execute program instructions such as magneto-optical media, and ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine language codes such as those produced by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like.

이상에서 본 개시의 실시예에 대하여 상세하게 설명하였지만 본 개시의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 개시의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 개시의 권리범위에 속한다.Although the embodiments of the present disclosure have been described in detail above, the scope of the present disclosure is not limited thereto, and various modifications and improvements of those skilled in the art using the basic concept of the present disclosure defined in the following claims are also included in the present disclosure. It belongs to the scope of rights.

Claims (15)

전자 장치가 이미지 내 객체를 식별하는 방법에 있어서,
상기 객체를 포함하는 이미지를 획득하는 단계;
상기 획득된 이미지 내 상기 객체에 대응되는 서로 다른 스케일의 복수의 가이드 영역들을 결정하는 단계;
상기 복수의 가이드 영역들로부터 상기 객체를 식별하기 위한 특징 벡터를 추출하는 단계;
상기 추출된 특징 벡터를 인공 지능(Artificial intelligence) 모델에 입력함으로써 상기 이미지 내 객체의 종류를 식별하는 단계; 및
상기 식별된 객체의 종류가 동물의 눈 또는 상기 동물의 눈과 관련된 부분 객체들로 식별되는 경우, 상기 객체를 포함하는 이미지 내 적어도 하나의 픽셀 값들을 저장하는 단계; 를 포함하고,
상기 객체의 종류를 식별하는 단계는 상기 서로 다른 스케일의 복수의 가이드 영역들 각각에 대해 객체의 종류를 식별한 결과, 동일한 종류의 객체로 식별되는 가이드 영역의 빈도수에 기초하여, 상기 이미지 내 객체의 종류를 식별하는 단계; 를 더 포함하는, 방법.
In a method for an electronic device to identify an object in an image,
Obtaining an image including the object;
Determining a plurality of guide areas of different scales corresponding to the object in the acquired image;
Extracting a feature vector for identifying the object from the plurality of guide areas;
Identifying the type of object in the image by inputting the extracted feature vector into an artificial intelligence model; And
Storing at least one pixel value in an image including the object when the type of the identified object is identified as an animal eye or partial objects related to the animal eye; Including,
The step of identifying the type of the object is based on the frequency of the guide area identified as an object of the same type as a result of identifying the type of the object for each of the plurality of guide areas of different scales, Identifying a type; The method further comprising.
제1항에 있어서, 상기 복수의 가이드 영역들을 결정하는 단계는
상기 획득된 이미지 내 미리 설정된 기준 픽셀을 포함하도록 상기 객체에 대응되는 제1 가이드 영역을 결정하는 단계; 및
상기 결정된 제1 가이드 영역을 미리 설정된 스케일에 따라 스케일링함으로써 상기 객체에 대응되는 적어도 하나의 제2 가이드 영역을 결정하는 단계; 를 더 포함하고,
상기 특징 벡터를 추출하는 단계는 상기 제1 가이드 영역 및 상기 적어도 하나의 제2 가이드 영역 각각에 대한 특징 벡터를 추출하는 것을 특징으로 하는, 방법.
The method of claim 1, wherein determining the plurality of guide areas
Determining a first guide area corresponding to the object to include a preset reference pixel in the obtained image; And
Determining at least one second guide area corresponding to the object by scaling the determined first guide area according to a preset scale; Including more,
The extracting of the feature vector comprises extracting a feature vector for each of the first guide region and the at least one second guide region.
제2항에 있어서,
상기 제1 가이드 영역은 상기 전자 장치의 화면 상에 표시되고, 상기 적어도 하나의 제2 가이드 영역은 전자 장치의 화면상에 표시되지 않는 것을 특징으로 하는, 방법.
The method of claim 2,
Wherein the first guide area is displayed on the screen of the electronic device, and the at least one second guide area is not displayed on the screen of the electronic device.
제1항에 있어서, 상기 특징 벡터를 추출하는 단계는
상기 이미지 내 픽셀들의 그래디언트(gradient)를 결정하는 단계;
상기 결정된 그래디언트를 이용하여 상기 특징 벡터를 추출하는 단계; 를 포함하는, 방법.
The method of claim 1, wherein extracting the feature vector comprises:
Determining a gradient of pixels in the image;
Extracting the feature vector using the determined gradient; Including, the method.
제2항에 있어서, 상기 객체의 종류를 식별하는 단계는
상기 제1 가이드 영역 및 상기 적어도 하나의 제2 가이드 영역 각각에 대한 객체의 종류를 식별하는 단계;
상기 식별된 객체의 종류 중, 동일한 종류의 객체로 식별되는 가이드 영역의 빈도수를 결정하는 단계; 및
상기 결정된 빈도수에 기초하여 상기 이미지 내 객체의 종류를 식별하는 단계; 를 포함하는, 방법.
The method of claim 2, wherein the step of identifying the type of object
Identifying a type of an object for each of the first guide area and the at least one second guide area;
Determining a frequency number of a guide area identified as an object of the same type among the types of the identified objects; And
Identifying the type of the object in the image based on the determined frequency; Including, the method.
제2항에 있어서, 상기 방법은
상기 획득된 이미지 내의 픽셀값들에 커널을 적용함으로써, 상기 획득된 이미지 내 잡음을 제거하는 단계;
상기 잡음이 제거된 이미지 내 픽셀 값들을 변환 하는 단계; 및
상기 픽셀 값들이 변환된 이미지 내 상기 복수의 가이드 영역들을 결정하는 단계; 를 더 포함하는, 방법.
The method of claim 2, wherein the method
Removing noise in the acquired image by applying a kernel to pixel values in the acquired image;
Converting pixel values in the image from which the noise has been removed; And
Determining the plurality of guide regions in the image in which the pixel values are converted; The method further comprising.
제6항에 있어서, 상기 방법은
상기 복수의 가이드 영역들 별로 상기 객체에 관한 윤곽을 검출하는 단계;
상기 검출된 윤곽이 상기 객체에 대응될 확률을 결정하는 단계; 및
상기 결정된 확률이 기 설정된 임계치보다 큰 윤곽을 포함하는 복수의 가이드 영역들로부터 상기 특징 벡터를 추출하는 단계; 를 더 포함하는, 방법.
The method of claim 6, wherein the method
Detecting an outline of the object for each of the plurality of guide areas;
Determining a probability that the detected contour corresponds to the object; And
Extracting the feature vector from a plurality of guide regions including an outline having the determined probability greater than a preset threshold; The method further comprising.
제7항에 있어서, 상기 객체에 대응될 확률을 결정하는 단계는
상기 검출된 윤곽 내 윤곽 성분들을 이용하여 상기 객체를 식별하기 위한 식별 조건을 결정하는 단계; 및
상기 결정된 식별 조건에 서로 다른 가중치를 적용함으로써, 상기 복수의 가이드 영역들 내 윤곽이 상기 객체에 대응될 확률을 결정하는 단계; 를 포함하는, 방법.
The method of claim 7, wherein determining a probability corresponding to the object comprises:
Determining an identification condition for identifying the object using contour components in the detected contour; And
Determining a probability that a contour within the plurality of guide regions corresponds to the object by applying different weights to the determined identification condition; Including, the method.
제7항에 있어서, 상기 방법은
상기 변환된 이미지들을 미리 설정된 크기의 적어도 하나의 부분 영역들로 분할하는 단계;
상기 분할된 부분 영역들의 픽셀 값에 기초하여, 상기 부분 영역 내에 포함된 픽셀 값들을 이진화 하기 위해 상기 부분 영역들 별 임계값들을 결정하는 단계;
상기 결정된 임계값들에 기초하여 상기 부분 영역들 내 픽셀 값들을 이진화 하는 단계; 및
상기 이진화된 픽셀 값들을 포함하는 이미지 내, 상기 복수의 가이드 영역들 별로 상기 객체에 관한 윤곽을 검출하는 단계; 를 더 포함하는, 방법.
The method of claim 7, wherein the method
Dividing the converted images into at least one partial region of a preset size;
Determining threshold values for each of the subregions to binarize pixel values included in the subregion, based on the pixel values of the divided subregions;
Binarizing pixel values in the partial regions based on the determined threshold values; And
Detecting an outline of the object for each of the plurality of guide areas in the image including the binarized pixel values; The method further comprising.
제7항에 있어서, 상기 특징 벡터를 추출하는 단계는
상기 결정된 확률이 기 설정된 임계치 보다 큰 윤곽을 포함하는 상기 복수의 가이드 영역들의 크기를 리사이징(resizing) 하는 단계; 및
상기 리사이징된 복수의 가이드 영역들 별로 상기 특징 벡터를 추출하는 단계; 를 포함하는, 방법.
The method of claim 7, wherein extracting the feature vector comprises:
Resizing the sizes of the plurality of guide regions including contours having the determined probability greater than a preset threshold; And
Extracting the feature vector for each of the plurality of resized guide regions; Including, the method.
제9항에 있어서, 상기 윤곽을 검출하는 단계는
상기 이진화된 픽셀 값들을 포함하는 이미지 내 상기 제1 가이드 영역을 포함하는 사각 형태의 경계 박스를 생성하는 단계;
상기 생성된 경계박스의 각 변의 중심점에 기초하여 상기 객체를 포함하는 후보 윤곽선을 결정하는 단계;
상기 결정된 후보 윤곽선을 따라 배치되고, 상기 후보 윤곽선으로부터 떨어진 거리에 기초하여, 서로 다른 점수를 나타내는 조정 박스들을 이용하여 상기 후보 윤곽선을 조정하는 단계; 및
상기 조정된 후보 윤곽선을 상기 객체의 윤곽으로 검출하는 단계; 를 포함하는, 방법.
The method of claim 9, wherein detecting the contour
Generating a rectangular bounding box including the first guide area in the image including the binarized pixel values;
Determining a candidate contour including the object based on the center point of each side of the generated bounding box;
Adjusting the candidate contour using adjustment boxes arranged along the determined candidate contour and representing different scores based on a distance away from the candidate contour; And
Detecting the adjusted candidate contour as the contour of the object; Including, the method.
제11항에 있어서, 상기 윤곽을 검출하는 단계는
상기 조정된 후보 윤곽선을 평탄화(smoothing) 하는 단계; 및
상기 평탄화된 후보 윤곽선을 상기 복수의 가이드 영역들 별 상기 객체에 관한 윤곽으로 검출하는 단계; 를 더 포함하는, 방법.
The method of claim 11, wherein detecting the contour
Smoothing the adjusted candidate contour line; And
Detecting the flattened candidate contour as a contour of the object for each of the plurality of guide regions; The method further comprising.
제8항에 있어서,
상기 윤곽 성분들은 상기 검출된 윤곽의 높이, 상기 윤곽의 폭, 상기 검출된 윤곽의 면적, 상기 검출된 윤곽 중 최외곽 윤곽의 면적, 상기 윤곽을 구성하는 픽셀들을 포함하고, 상기 식별 조건은 상기 검출된 윤곽을 기준으로 형성된 타원 내 픽셀들의 강도, 상기 검출된 윤곽의 면적, 상기 검출된 윤곽의 좌표, 상기 검출된 윤곽의 높이 및 상기 윤곽의 폭의 비율, 상기 최외곽 윤곽의 면적 및 상기 최외곽 윤곽의 면적을 제외한 상기 윤곽 내 면적의 비율을 포함하는 것을 특징으로 하는, 방법.
The method of claim 8,
The contour components include the height of the detected contour, the width of the contour, the area of the detected contour, the area of the outermost contour among the detected contours, and pixels constituting the contour, and the identification condition is the detection Intensity of pixels in the ellipse formed based on the outline, the area of the detected outline, the coordinates of the detected outline, the ratio of the height of the detected outline and the width of the outline, the area of the outermost outline and the outermost It characterized in that it comprises a ratio of the area within the contour excluding the area of the contour.
제1항에 있어서,
상기 인공 지능 모델은, 입력 레이어, 출력 레이어 및 상기 입력 레이어와 출력 레이어 사이의 하나 이상의 히든 레이어들을 포함하고, 상기 입력 레이어, 출력 레이어 및 상기 히든 레이어들 사이의 연결 강도에 관한 가중치가 갱신되는 인공 신경망 모델 또는 인공 지능 학습 알고리즘에 따라 학습되는 기계 학습 모델을 포함하는 것을 특징으로 하는, 방법.
The method of claim 1,
The artificial intelligence model includes an input layer, an output layer, and one or more hidden layers between the input layer and the output layer, and the weight of the connection strength between the input layer, the output layer, and the hidden layers is updated. A method comprising a neural network model or a machine learning model that is trained according to an artificial intelligence learning algorithm.
이미지 내 객체를 식별하는 전자 장치에 있어서,
디스플레이;
적어도 하나의 카메라;
하나 이상의 인스트럭션을 저장하는 메모리; 및
상기 하나 이상의 인스트럭션을 실행하는 적어도 하나의 프로세서; 를 포함하고,
상기 프로세서는 상기 하나 이상의 인스트럭션을 실행함으로써,
상기 객체를 포함하는 이미지를 획득하고,
상기 획득된 이미지 내 상기 객체에 대응되는 서로 다른 스케일의 복수의 가이드 영역들을 결정하고,
상기 복수의 가이드 영역들로부터 상기 객체를 식별하기 위한 특징 벡터를 추출하고,
상기 추출된 특징 벡터를 인공 지능(Artificial intelligence) 모델에 입력함으로써 상기 이미지 내 객체의 종류를 식별하고,
상기 식별된 객체의 종류가 동물의 눈 또는 상기 동물의 눈과 관련된 부분 객체들로 식별되는 경우, 상기 객체를 포함하는 이미지 내 적어도 하나의 픽셀 값들을 저장하며,
상기 프로세서는 상기 서로 다른 스케일의 복수의 가이드 영역들 각각에 대해 객체의 종류를 식별한 결과, 동일한 종류의 객체로 식별되는 가이드 영역의 빈도수에 기초하여, 상기 이미지 내 객체의 종류를 식별하는 것을 특징으로 하는, 전자 장치.
In the electronic device for identifying an object in an image,
display;
At least one camera;
A memory for storing one or more instructions; And
At least one processor executing the one or more instructions; Including,
The processor executes the one or more instructions,
Obtaining an image including the object,
Determining a plurality of guide regions of different scales corresponding to the object in the acquired image,
Extracting a feature vector for identifying the object from the plurality of guide areas,
Identify the type of object in the image by inputting the extracted feature vector into an artificial intelligence model,
When the type of the identified object is identified as an animal eye or partial objects related to the animal eye, storing at least one pixel value in the image including the object,
The processor identifies the type of the object in the image based on the frequency of the guide area identified as an object of the same type as a result of identifying the type of the object for each of the plurality of guide areas of different scales. With electronic devices.
KR1020200056872A 2020-05-13 2020-05-13 Method and apparatus for detecting eye of animal in image KR102243466B1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
KR1020200056872A KR102243466B1 (en) 2020-05-13 2020-05-13 Method and apparatus for detecting eye of animal in image
PCT/KR2021/006010 WO2021230680A1 (en) 2020-05-13 2021-05-13 Method and device for detecting object in image
US17/573,510 US20220139113A1 (en) 2020-05-13 2022-01-11 Method and device for detecting object in image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200056872A KR102243466B1 (en) 2020-05-13 2020-05-13 Method and apparatus for detecting eye of animal in image

Publications (1)

Publication Number Publication Date
KR102243466B1 true KR102243466B1 (en) 2021-04-22

Family

ID=75730937

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200056872A KR102243466B1 (en) 2020-05-13 2020-05-13 Method and apparatus for detecting eye of animal in image

Country Status (1)

Country Link
KR (1) KR102243466B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102425057B1 (en) * 2021-09-28 2022-07-27 차가은 System for online shopping using neural networks

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130032856A (en) * 2011-09-23 2013-04-02 광주과학기술원 A method for monitoring a video and an apparatus using it
KR20180060257A (en) * 2016-11-28 2018-06-07 삼성전자주식회사 Metohd and apparatus for object recognition
KR20180109665A (en) 2017-03-27 2018-10-08 삼성전자주식회사 A method and apparatus of image processing for object detection
KR20190060162A (en) * 2017-11-24 2019-06-03 전자부품연구원 Traffic Sign Recognition Method and System using Deep Neural Network based on Online Unsupervised Learning
KR20200041296A (en) * 2018-10-11 2020-04-21 주식회사 핏펫 Computer program and theminal for providing individual animal information based on the facial and nose pattern imanges of the animal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130032856A (en) * 2011-09-23 2013-04-02 광주과학기술원 A method for monitoring a video and an apparatus using it
KR20180060257A (en) * 2016-11-28 2018-06-07 삼성전자주식회사 Metohd and apparatus for object recognition
KR20180109665A (en) 2017-03-27 2018-10-08 삼성전자주식회사 A method and apparatus of image processing for object detection
KR20190060162A (en) * 2017-11-24 2019-06-03 전자부품연구원 Traffic Sign Recognition Method and System using Deep Neural Network based on Online Unsupervised Learning
KR20200041296A (en) * 2018-10-11 2020-04-21 주식회사 핏펫 Computer program and theminal for providing individual animal information based on the facial and nose pattern imanges of the animal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102425057B1 (en) * 2021-09-28 2022-07-27 차가은 System for online shopping using neural networks

Similar Documents

Publication Publication Date Title
US11915515B2 (en) Facial verification method and apparatus
KR102659288B1 (en) Image display device and operating method for the same
KR102299847B1 (en) Face verifying method and apparatus
US10726244B2 (en) Method and apparatus detecting a target
US10957073B2 (en) Method and apparatus for recognizing image and method and apparatus for training recognition model based on data augmentation
US11163978B2 (en) Method and device for face image processing, storage medium, and electronic device
US7912253B2 (en) Object recognition method and apparatus therefor
WO2020078119A1 (en) Method, device and system for simulating user wearing clothing and accessories
EP3539056B1 (en) Electronic apparatus and operation method thereof
KR102236904B1 (en) Method and apparatus for compositing images
US20220309836A1 (en) Ai-based face recognition method and apparatus, device, and medium
KR20170047167A (en) Method and apparatus for converting an impression of a face in video
CN110532965A (en) Age recognition methods, storage medium and electronic equipment
Zhao et al. Applying contrast-limited adaptive histogram equalization and integral projection for facial feature enhancement and detection
CN106471440A (en) Eye tracking based on efficient forest sensing
Hebbale et al. Real time COVID-19 facemask detection using deep learning
US20220130019A1 (en) Electronic device and method for processing image by same
KR102246471B1 (en) Apparatus for detecting nose of animal in image and method thereof
KR102243466B1 (en) Method and apparatus for detecting eye of animal in image
CN116964619A (en) Electronic device for enhancing image quality and method of enhancing image quality by using the same
US20220139113A1 (en) Method and device for detecting object in image
CN114140839B (en) Image transmission method, device, equipment and storage medium for face recognition
CN109858355A (en) Image processing method and Related product
KR102237131B1 (en) Appratus and method for processing image including at least one object
Chen Design and simulation of AI remote terminal user identity recognition system based on reinforcement learning

Legal Events

Date Code Title Description
AMND Amendment
AMND Amendment
AMND Amendment
X701 Decision to grant (after re-examination)
GRNT Written decision to grant