KR102316969B1 - Electronic apparatus capable of recognizing text included in an image captured by a camera and the method thereof - Google Patents

Electronic apparatus capable of recognizing text included in an image captured by a camera and the method thereof Download PDF

Info

Publication number
KR102316969B1
KR102316969B1 KR1020190179138A KR20190179138A KR102316969B1 KR 102316969 B1 KR102316969 B1 KR 102316969B1 KR 1020190179138 A KR1020190179138 A KR 1020190179138A KR 20190179138 A KR20190179138 A KR 20190179138A KR 102316969 B1 KR102316969 B1 KR 102316969B1
Authority
KR
South Korea
Prior art keywords
image
color
text
processor
electronic device
Prior art date
Application number
KR1020190179138A
Other languages
Korean (ko)
Other versions
KR20210085742A (en
Inventor
고하나
최규상
Original Assignee
주식회사 서밋코퍼레이션
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 서밋코퍼레이션 filed Critical 주식회사 서밋코퍼레이션
Priority to KR1020190179138A priority Critical patent/KR102316969B1/en
Publication of KR20210085742A publication Critical patent/KR20210085742A/en
Application granted granted Critical
Publication of KR102316969B1 publication Critical patent/KR102316969B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06K9/20
    • G06K9/4652
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/18Extraction of features or characteristics of the image
    • G06V30/18105Extraction of features or characteristics of the image related to colour
    • G06K2209/01

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Character Input (AREA)
  • Image Analysis (AREA)

Abstract

본 발명의 일 실시예에 따라 카메라를 이용하여 촬상한 이미지에 포함된 텍스트의 인식이 가능한 전자장치에 있어서, 인터페이스부; 카메라를 이용하여 촬상한 제1이미지를 수신하고, 상기 제1이미지에 포함된 텍스트에 대응하는 텍스트 후보 색상을 포함하는 복수의 색상에 기초하여 상기 제1이미지의 색상 변환을 수행하여 제2이미지를 획득하고, 상기 획득된 제2이미지에 기초하여 상기 제1이미지에 포함된 텍스트의 인식 결과를 획득하고, 상기 획득한 인식 결과를 디스플레이에 표시하는, 프로세서를 포함할 수 있다.According to an embodiment of the present invention, there is provided an electronic device capable of recognizing text included in an image captured using a camera, comprising: an interface unit; Receives a first image captured using a camera, and performs color conversion of the first image based on a plurality of colors including text candidate colors corresponding to text included in the first image to obtain a second image and a processor configured to obtain a recognition result of the text included in the first image based on the obtained second image, and display the obtained recognition result on a display.

Description

카메라를 이용하여 촬상한 이미지에 포함된 텍스트의 인식이 가능한 전자장치 및 그 제어방법{ELECTRONIC APPARATUS CAPABLE OF RECOGNIZING TEXT INCLUDED IN AN IMAGE CAPTURED BY A CAMERA AND THE METHOD THEREOF}An electronic device capable of recognizing text included in an image captured using a camera and a method for controlling the same

본 발명은 이미지에 포함된 텍스트의 인식을 수행하는 전자장치 및 그 제어방법에 관한 것이다.The present invention relates to an electronic device for recognizing text included in an image and a method for controlling the same.

최근 문자(텍스트) 인식 기술에 대한 니즈(needs)가 계속해서 증가됨에 따라 다양한 기술이 등장해왔다. 문자 인식 기술의 대표적 기술 중 하나인 OCR(Optical Character Recognition)은 광학 문자 인식 기술로써, 문자를 광으로 읽어서 전기 신호로 변환 및 인식하는 기술이다. 문자 인식 기술이 점점 더 정교해지고 있으나, 여전히 문자 인식에 대한 오류가 발생하고 있으므로, 문자 인식의 신속하면서도 신뢰성을 높이는 방안이 요구되고 있다.
(특허문헌 1) KR 10-2015-0137752 A (2015.12.09.)
Recently, as the needs for character (text) recognition technology continue to increase, various technologies have appeared. OCR (Optical Character Recognition), which is one of the representative technologies of character recognition technology, is an optical character recognition technology, which reads text as light, converts it into an electrical signal, and recognizes it. Although text recognition technology is becoming more and more sophisticated, errors still occur in text recognition, so a method for quickly and reliably improving text recognition is required.
(Patent Document 1) KR 10-2015-0137752 A (2015.12.09.)

본 발명은 보다 신뢰성 높은 텍스트 인식을 수행하는 전자장치 및 그 제어방법에 관한 것이다.The present invention relates to an electronic device for more reliable text recognition and a method for controlling the same.

본 발명의 일 실시예에 따라 카메라를 이용하여 촬상한 이미지에 포함된 텍스트의 인식이 가능한 전자장치에 있어서, 인터페이스부; 카메라를 이용하여 촬상한 제1이미지를 수신하고, 상기 제1이미지에 포함된 텍스트에 대응하는 텍스트 후보 색상을 포함하는 복수의 색상에 기초하여 상기 제1이미지의 색상 변환을 수행하여 제2이미지를 획득하고, 상기 획득된 제2이미지에 기초하여 상기 제1이미지에 포함된 텍스트의 인식 결과를 획득하고, 상기 획득한 인식 결과를 디스플레이에 표시하는, 프로세서를 포함할 수 있다.According to an embodiment of the present invention, there is provided an electronic device capable of recognizing text included in an image captured using a camera, comprising: an interface unit; Receives a first image captured using a camera, and performs color conversion of the first image based on a plurality of colors including text candidate colors corresponding to text included in the first image to obtain a second image and a processor configured to obtain a recognition result of the text included in the first image based on the obtained second image, and display the obtained recognition result on a display.

상기 복수의 색상은 상기 텍스트 후보 색상과 다른 색상값을 가지는 배경 후보 색상을 포함할 수 있다.The plurality of colors may include a background candidate color having a color value different from that of the text candidate color.

상기 프로세서는, 상기 제1이미지의 각 픽셀의 제1색상값을 식별하고, 상기 식별된 제1색상값을 상기 텍스트 후보 색상 또는 상기 배경 후보 색상의 제2색상값 중에서 상기 제1색상값과 유사한 값으로 치환하여 상기 제1이미지의 색상 변환을 수행할 수 있다.The processor identifies a first color value of each pixel of the first image, and sets the identified first color value to a second color value similar to the first color value among the text candidate color or the background candidate color. The color conversion of the first image may be performed by substituting a value.

상기 복수의 색상은, 상기 텍스트 후보 색상 또는 상기 배경 후보 색상의 색상값이 서로 다른 복수의 색상 그룹 중 어느 한 그룹의 색상일 수 있다.The plurality of colors may be colors of any one of a plurality of color groups having different color values of the text candidate color or the background candidate color.

상기 프로세서는, 상기 복수의 색상 그룹 중에서 상기 제1이미지에 포함된 텍스트에 대응하는 색상값을 가지는 상기 텍스트 후보 색상을 포함하는 색상 그룹을 선택할 수 있다.The processor may select a color group including the text candidate color having a color value corresponding to the text included in the first image from among the plurality of color groups.

상기 프로세서는, 상기 복수의 색상 그룹 중에서 상기 제1이미지에 포함된 배경에 대응하는 색상값을 가지는 상기 배경 후보 색상을 포함하는 색상 그룹을 선택할 수 있다.The processor may select a color group including the background candidate color having a color value corresponding to the background included in the first image from among the plurality of color groups.

상기 프로세서는, 상기 제1이미지를 표시하는 타겟의 디스플레이 특성 또는 상기 타겟의 주변 환경 중 적어도 하나에 기초하여 상기 색상 그룹을 선택할 수 있다.The processor may select the color group based on at least one of a display characteristic of a target displaying the first image or a surrounding environment of the target.

본 발명의 일 실시예에 따른 전자장치에 있어서, 사용자입력부를 더 포함하고, 상기 프로세서는, 상기 사용자입력부를 통해 상기 제1이미지에 대응하는 상기 텍스트에 대응되는 일 영역을 선택하는 사용자입력을 수신할 수 있다.In the electronic device according to an embodiment of the present invention, further comprising a user input unit, the processor receives a user input for selecting a region corresponding to the text corresponding to the first image through the user input unit. can do.

상기 프로세서는, 상기 선택된 일 영역에 포함된 텍스트의 크기에 기초하여 상기 일 영역의 크기를 설정할 수 있다.The processor may set the size of the one area based on the size of text included in the selected one area.

상기 프로세서는, 상기 획득된 제2이미지에 필터링을 수행하여 제3이미지를 획득하고, 상기 제3이미지 내의 픽셀을 확대하는 제1동작 또는 인접한 2이상의 픽셀을 서로 연결하는 제2동작 중 적어도 하나를 수행하여, 상기 제1이미지에 포함된 텍스트의 인식 결과를 획득할 수 있다.The processor performs at least one of a first operation of enlarging pixels in the third image and a second operation of connecting two or more adjacent pixels to each other to obtain a third image by performing filtering on the obtained second image By doing so, it is possible to obtain a recognition result of the text included in the first image.

본 발명의 일 실시예에 따라 카메라를 이용하여 촬상한 이미지에 포함된 텍스트의 인식이 가능한 전자장치의 제어방법에 있어서, 카메라를 이용하여 촬상한 제1이미지를 수신하는 단계; 상기 제1이미지에 포함된 텍스트에 대응하는 텍스트 후보 색상을 포함하는 복수의 색상에 기초하여 상기 제1이미지의 색상 변환을 수행하여 제2이미지를 획득하는 단계; 상기 획득된 제2이미지에 기초하여 상기 제1이미지에 포함된 텍스트의 인식 결과를 획득하는 단계; 및 상기 획득한 인식 결과를 디스플레이에 표시하는 단계를 포함할 수 있다.According to an embodiment of the present invention, there is provided a method for controlling an electronic device capable of recognizing text included in an image captured by using a camera, the method comprising: receiving a first image captured by a camera; obtaining a second image by performing color conversion of the first image based on a plurality of colors including a text candidate color corresponding to the text included in the first image; obtaining a recognition result of text included in the first image based on the obtained second image; and displaying the obtained recognition result on a display.

본 발명의 일 실시예에 따르면, 이미지에 포함된 텍스트를 인식할 때, 색상 변환을 이용함으로써 보다 쉽게 문자 인식을 할 수 있는 상태로 이미지를 변환하여 텍스트 인식의 신뢰성을 높일 수 있다.According to an embodiment of the present invention, when recognizing text included in an image, the reliability of text recognition can be improved by converting the image to a state in which character recognition can be performed more easily by using color conversion.

본 발명의 일 실시예에 따르면, 색상 변환을 통해 이미지에 포함된 색상을 단순화 시키고, 텍스트와 배경의 구별을 선명하게 할 수 있으므로 텍스트 인식이 용이하게 이루어질 수 있다. According to an embodiment of the present invention, since a color included in an image can be simplified through color conversion and a text and a background can be clearly distinguished, text recognition can be easily achieved.

본 발명의 일 실시예에 따르면, 텍스트의 노이즈 보정을 통해 텍스트가 선명해짐에 따라 텍스트를 인식하는 시간이 단축될 수 있고, 인식이 불가능한 부분이 가능해지고 정확도 또한 증가할 수 있다.According to an embodiment of the present invention, as the text becomes clear through noise correction of the text, the time for recognizing the text may be shortened, the unrecognizable part may be made possible, and the accuracy may also be increased.

도 1은 본 발명의 일 실시예에 의한 전체 시스템 및 전자장치의 구성을 표시한 블럭도를 도시한 도면이다.
도 2는 본 발명의 일 실시예에 따른 전자장치의 동작 흐름도를 도시한 도면이다.
도 3은 본 발명의 일 실시예에 따른 이미지에 따른 색상 그룹을 도시한 도면이다.
도 4는 본 발명의 실시예에 따른 전자장치의 이미지 색상 변환의 원리 및 그 예를 도시한 도면이다.
도 5는 본 발명의 일 실시예에 따른 이미지 색상 변환 및 필터링 모습을 도시한 도면이다.
도 6은 본 발명의 일 실시예에 따른 일 영역을 지정하는 사용자입력을 도시한 도면이다.
도 7은 본 발명의 일 실시예에 따른 노이즈 보정을 수행하는 모습을 도시한 도면이다.
1 is a block diagram showing the configuration of an entire system and an electronic device according to an embodiment of the present invention.
2 is a diagram illustrating an operation flowchart of an electronic device according to an embodiment of the present invention.
3 is a diagram illustrating a color group according to an image according to an embodiment of the present invention.
4 is a diagram illustrating a principle and an example of image color conversion of an electronic device according to an embodiment of the present invention.
5 is a diagram illustrating image color conversion and filtering according to an embodiment of the present invention.
6 is a diagram illustrating a user input for designating an area according to an embodiment of the present invention.
7 is a diagram illustrating a state in which noise correction is performed according to an embodiment of the present invention.

이하에서는 첨부 도면을 참조하여 본 발명의 실시예들을 상세히 설명한다. 도면에서 동일한 참조번호 또는 부호는 실질적으로 동일한 기능을 수행하는 구성요소를 지칭하며, 도면에서 각 구성요소의 크기는 설명의 명료성과 편의를 위해 과장되어 있을 수 있다. 다만, 본 발명의 기술적 사상과 그 핵심 구성 및 작용이 이하의 실시예에 설명된 구성 또는 작용으로만 한정되지는 않는다. 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략하기로 한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the drawings, the same reference numbers or symbols refer to components that perform substantially the same function, and the size of each component in the drawings may be exaggerated for clarity and convenience of description. However, the technical spirit of the present invention and its core configuration and operation are not limited to the configuration or operation described in the following embodiments. In describing the present invention, if it is determined that a detailed description of a known technology or configuration related to the present invention may unnecessarily obscure the gist of the present invention, the detailed description thereof will be omitted.

본 발명의 실시예에서, 제1, 제2 등과 같이 서수를 포함하는 용어는 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용되며, 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 또한, 본 발명의 실시예에서, '구성되다', '포함하다', '가지다' 등의 용어는 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다. 또한, 본 발명의 실시예에서, '모듈' 혹은 '부'는 적어도 하나의 기능이나 동작을 수행하며, 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있으며, 적어도 하나의 모듈로 일체화되어 구현될 수 있다. 또한, 본 발명의 실시예에서, 복수의 요소 중 적어도 하나(at least one)는, 복수의 요소 전부뿐만 아니라, 복수의 요소 중 나머지를 배제한 각 하나 혹은 이들의 조합 모두를 지칭한다.In an embodiment of the present invention, terms including an ordinal number such as first, second, etc. are used only for the purpose of distinguishing one element from another element, and the expression of the singular is plural unless the context clearly indicates otherwise. includes the expression of In addition, in an embodiment of the present invention, terms such as 'consisting', 'comprising', 'having' and the like are one or more other features or the presence of numbers, steps, operations, components, parts, or combinations thereof. Or it should be understood that the possibility of addition is not excluded in advance. In addition, in an embodiment of the present invention, a 'module' or 'unit' performs at least one function or operation, and may be implemented as hardware or software or a combination of hardware and software, and is integrated into at least one module. and can be implemented. Further, in an embodiment of the present invention, at least one of the plurality of elements refers to all of the plurality of elements as well as each one or a combination thereof excluding the rest of the plurality of elements.

도 1은 본 발명의 일 실시예에 의한 전체 시스템 및 전자장치의 구성을 표시한 블럭도를 도시한 도면이다.1 is a block diagram showing the configuration of an entire system and an electronic device according to an embodiment of the present invention.

도 1은 본 발명의 일 실시예에 따른 전자장치(100), 타겟(200), 서버(300)로 이루어지는 전체 시스템을 도시한다. 전자장치(100)는 타겟(200)으로부터 이미지를 촬상하거나, 촬상된 이미지를 획득하여 서버(300)와의 통신을 이용하여 이미지에 포함된 텍스트를 인식할 수 있다.1 illustrates an entire system including an electronic device 100 , a target 200 , and a server 300 according to an embodiment of the present invention. The electronic device 100 may capture an image from the target 200 or acquire the captured image and recognize the text included in the image using communication with the server 300 .

전자장치(100)는 영상을 표시할 수 있는 디스플레이장치로 구현될 수 있다. 일 예로, 전자장치(100)는 스마트 폰, 컴퓨터, 태블릿, 휴대용 미디어 플레이어, TV, 웨어러블 디바이스 등을 포함할 수 있다. 타겟(200)은 전자장치로서 외부장치에 해당할 수 있으나, 문자 인식을 위한 텍스트를 포함하는 이미지를 제공할 수 있는 어떤 것이든 가능할 수 있다. 예컨대, 컴퓨터, 스마트 폰 등 전자장치 이외에도 인식하고자 하는 텍스트를 포함하는 문서, 사진 등이 가능할 수 있다.The electronic device 100 may be implemented as a display device capable of displaying an image. For example, the electronic device 100 may include a smart phone, a computer, a tablet, a portable media player, a TV, a wearable device, and the like. The target 200 may correspond to an external device as an electronic device, but may be anything capable of providing an image including text for character recognition. For example, in addition to an electronic device such as a computer or a smart phone, a document including text to be recognized, a photo, or the like may be possible.

본 발명의 일 실시예에 따른 전자장치(100)는, 도 1에 도시된 바와 같이, 인터페이스부(110), 디스플레이부(120), 사용자입력부(130), 저장부(140), 카메라(150), 마이크로폰(160), 스피커(170), 프로세서(180)를 포함한다. 전자장치(100)에 포함되는 구성은 일부 구성을 제외 또는 변경하여 구성되거나, 추가적으로 다른 구성들을 포함하여 구현될 수 있다.As shown in FIG. 1 , the electronic device 100 according to an embodiment of the present invention includes an interface unit 110 , a display unit 120 , a user input unit 130 , a storage unit 140 , and a camera 150 . ), a microphone 160 , a speaker 170 , and a processor 180 . Components included in the electronic device 100 may be configured by excluding or changing some components, or may be implemented by additionally including other components.

인터페이스부(110)는 유선 인터페이스부(111)와 무선 인터페이스부(112)를 포함한다. 인터페이스부(110)는 서버(300)와의 통신을 통해 전자장치(100)가 획득한 이미지에 포함된 텍스트의 인식을 위한 데이터 송/수신을 수행할 수 있다.The interface unit 110 includes a wired interface unit 111 and a wireless interface unit 112 . The interface unit 110 may transmit/receive data for recognizing text included in an image obtained by the electronic device 100 through communication with the server 300 .

유선 인터페이스부(111)는 USB 포트 등과 같은 범용 데이터 전송규격에 따른 커넥터 또는 포트, HDMI 포트 등과 같은 비디오 및/또는 오디오 전송규격에 따른 커넥터 또는 포트 등을 포함할 수 있다. The wired interface unit 111 may include a connector or port according to a universal data transmission standard such as a USB port, a connector or port according to a video and/or audio transmission standard such as an HDMI port, and the like.

무선 인터페이스부(112)는 전자장치(100)의 구현 형태에 대응하여 다양한 방식으로 구현될 수 있다. 예를 들면, 무선 인터페이스부(112)는 통신방식으로 RF(radio frequency), 블루투스(bluetooth), 와이파이(Wi-Fi), 등 무선통신을 사용할 수 있다. 무선 인터페이스부(112)는 네트워크 상의 서버(300)와 무선 통신함으로써, 서버(300)와의 사이에 데이터 패킷을 송수신할 수 있다.The wireless interface unit 112 may be implemented in various ways corresponding to the implementation form of the electronic device 100 . For example, the wireless interface unit 112 may use radio frequency (RF), Bluetooth (bluetooth), Wi-Fi, etc. wireless communication as a communication method. The wireless interface unit 112 may transmit and receive data packets to and from the server 300 by wirelessly communicating with the server 300 on the network.

디스플레이부(120)는 화면 상에 영상을 표시할 수 있는 LCD 등으로 구현될 수 있으며, 타겟(200)을 촬상한 이미지 등을 디스플레이 할 수 있다.The display unit 120 may be implemented as an LCD capable of displaying an image on a screen, and may display an image obtained by capturing the target 200 .

사용자입력부(130)는 전자장치(100)의 종류에 따라서 여러 가지 형태의 구성이 가능하며, 예컨대, 전자장치(100)의 기계적 또는 전자적 버튼부, 전자장치(100)의 디스플레이부(120)에 설치된 터치스크린 등이 있다.The user input unit 130 may be configured in various forms depending on the type of the electronic device 100 , for example, a mechanical or electronic button unit of the electronic device 100 , or the display unit 120 of the electronic device 100 . Installed touch screen, etc.

저장부(140)는 디지털화된 데이터를 저장한다. 저장부(140)는 전원의 제공 유무와 무관하게 데이터를 보존할 수 있는 플래시메모리(flash-memory)와 같은 비휘발성 속성의 스토리지(storage)와, 프로세서(180)에 의해 처리되기 위한 데이터가 로딩되며 전원이 제공되지 않으면 데이터를 보존할 수 없는 버퍼(buffer)등의 휘발성 속성의 메모리(memory)를 포함한다.The storage unit 140 stores digitized data. The storage unit 140 includes a nonvolatile storage such as a flash-memory capable of preserving data regardless of whether or not power is provided, and data to be processed by the processor 180 is loaded. and includes memory with volatile properties such as buffers that cannot retain data when power is not provided.

카메라(150)는 인식하고자 하는 텍스트를 포함하는 이미지를 촬상한다. 카메라(150)는 촬상된 이미지를 프로세서(180)에 전달한다.The camera 150 captures an image including text to be recognized. The camera 150 transmits the captured image to the processor 180 .

마이크로폰(160)은 사용자 음성을 비롯한 외부 환경의 소리를 수집한다. 마이크로폰(160)은 수집된 소리의 신호를 프로세서(180)에 전달한다.The microphone 160 collects sounds of the external environment including the user's voice. The microphone 160 transmits the collected sound signal to the processor 180 .

스피커(170)는 프로세서(180)에 의해 처리되는 오디오 데이터를 소리로 출력할 수 있다. The speaker 170 may output audio data processed by the processor 180 as sound.

전자장치(100)는 프로세서(180)를 포함할 수 있다. 프로세서(180)는 인쇄회로기판 상에 장착되는 CPU, 칩셋, 버퍼, 회로 등으로 구현되는 하나 이상의 하드웨어 프로세서를 포함할 수 있다. The electronic device 100 may include a processor 180 . The processor 180 may include one or more hardware processors implemented as CPUs, chipsets, buffers, circuits, etc. mounted on a printed circuit board.

프로세서(180)는 이미지에 포함된 텍스트에 대응하는 텍스트 후보 색상을 포함하는 복수의 색상을 식별하고, 이에 기초하여 이미지의 색상 변환을 수행하고, 색상 변환된 이미지에 포함된 텍스트를 인식하기 위한 데이터 분석, 처리, 및 결과 정보 생성 중 적어도 일부를 규칙 기반 또는 인공지능(Artificial Intelligence) 알고리즘으로서 기계학습, 신경망 네트워크(neural network), 또는 딥러닝 알고리즘 중 적어도 하나를 이용하여 수행할 수 있다.The processor 180 identifies a plurality of colors including a text candidate color corresponding to the text included in the image, performs color conversion of the image based on this, and data for recognizing text included in the color-converted image At least a part of analysis, processing, and result information generation may be performed using at least one of machine learning, a neural network, or a deep learning algorithm as a rule-based or artificial intelligence algorithm.

일 예로, 본 발명에 따른 전자장치(100)의 제어방법은 컴퓨터 프로그램 제품 (Computer Program Product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은, 앞서 설명한, 프로세서(180)에 의해 실행되는 소프트웨어의 명령어들을 포함할 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예컨대, CD-ROM)의 형태로 배포되거나, 또는 어플리케이션 스토어(예컨대, 플레이 스토어TM)를 통해 또는 두 개의 사용자 장치들(예컨대, 스마트폰들) 간에 직접, 온라인으로 배포(예컨대, 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.For example, the control method of the electronic device 100 according to the present invention may be provided by being included in a computer program product. The computer program product may include instructions for software executed by the processor 180 , as described above. Computer program products may be traded between sellers and buyers as commodities. The computer program product is distributed in the form of a machine-readable storage medium (eg, CD-ROM), or via an application store (eg, Play Store™) or between two user devices (eg, smartphones). It can be distributed directly, online (eg, downloaded or uploaded). In the case of online distribution, at least a part of the computer program product may be temporarily stored or temporarily created in a machine-readable storage medium such as a memory of a server of a manufacturer, a server of an application store, or a relay server.

도 2는 본 발명의 일 실시예에 따른 전자장치의 동작 흐름도를 도시한 도면이다. 2 is a diagram illustrating an operation flowchart of an electronic device according to an embodiment of the present invention.

프로세서(180)는 카메라를 이용하여 촬상한 제1이미지를 수신할 수 있다(S210). 이 때, 전자장치(100)는 전자장치(100)에 내장된 카메라(150)를 이용하여 촬상한 제1이미지를 수신(획득)하거나, 외장형 혹은 외부장치 장착형 카메라를 이용하여 촬상한 제1이미지를 인터페이스부(110)를 통해 수신할 수 있으며, 어느 하나에 한정된 것은 아니다. 또한, 본 발명의 일 실시예에 따른 제1이미지는 타겟(200)에 표시된 화면을 촬상하거나, 타겟(200)이 전자장치가 아닌 경우, 타겟(200) 자체를 촬상하여 획득된 이미지일 수 있으며, 어느 하나에 한정된 것은 아니다.The processor 180 may receive the first image captured by the camera (S210). In this case, the electronic device 100 receives (acquires) a first image captured using the camera 150 built in the electronic device 100, or a first image captured using an external or external device-mounted camera. may be received through the interface unit 110, but is not limited thereto. In addition, the first image according to an embodiment of the present invention may be an image obtained by capturing a screen displayed on the target 200 or, when the target 200 is not an electronic device, capturing the target 200 itself. , is not limited to any one.

프로세서(180)는 제1이미지에 포함된 텍스트에 대응하는 텍스트 후보 색상을 포함하는 복수의 색상에 기초하여 제1이미지의 색상 변환을 수행하여 제2이미지를 획득할 수 있다(S220). 본 발명의 일 실시예에 따르면, 제1이미지는 텍스트와 배경으로 이루어질 수 있다. 이 때, 타겟(200)의 화면에 표시된 이미지의 색상과 촬상된 제1이미지의 색상은 디스플레이 특성이나 전자장치(100) 혹은 타겟(200)의 주변 환경 특성상 항상 동일하다고 보기 어렵다. 이를 고려하여, 촬상된 제1이미지에서 텍스트를 보다 신뢰성 있게 인식하기 위하여, 제1이미지에 포함된 복수의 색상으로 이루어진 색상 그룹을 정할 수 있다. 따라서, 색상 그룹의 복수의 색상은 텍스트 후보 색상과 배경 후보 색상을 포함할 수 있다. 이 때, 색상을 표현하는 방법으로는 헥스 코드, RGB 표현법, HSV 표현법 등이 있는데, 헥스 코드는 색상을 #과 뒤에 붙는 여섯 자리의 16진수로 나타낸 것이다. 따라서 헥스 코드로 나타낼 수 있는 색상의 수는 총 16,777,216가지이다. 숫자는 두 자리씩 끊어서 각각 R(Red), G(Green), B(Blue)를 나타내며, 16진수로 표현되어 각 색상별로 고유한 색상값을 가질 수 있다. 예컨대, 가장 어두운 색인 검정색은 색상값 #000000을 가지고, 가장 밝은 색인 흰색은 색상값 #FFFFFF을 가진다.The processor 180 may obtain a second image by performing color conversion of the first image based on a plurality of colors including text candidate colors corresponding to text included in the first image ( S220 ). According to an embodiment of the present invention, the first image may include text and a background. At this time, it is difficult to see that the color of the image displayed on the screen of the target 200 and the color of the captured first image are always the same due to the display characteristics or the characteristics of the electronic device 100 or the surrounding environment of the target 200 . In consideration of this, in order to more reliably recognize text in the captured first image, a color group including a plurality of colors included in the first image may be determined. Accordingly, the plurality of colors of the color group may include a text candidate color and a background candidate color. At this time, there are hex code, RGB expression method, HSV expression method, etc. as a method of expressing color. The hex code is a six-digit hexadecimal number followed by # followed by a color. Therefore, the total number of colors that can be represented by hex codes is 16,777,216. Numbers are separated by two digits to represent R (Red), G (Green), and B (Blue), respectively, and expressed in hexadecimal numbers, each color can have a unique color value. For example, the darkest color black has a color value #000000, and the lightest color white has a color value #FFFFFF.

색상 변환은 이미지 열화(degradation)를 위한 작업의 일환으로써, 프로세서(180)는 제1이미지에 포함된 색상 중 우선순위가 높은 순으로 색상을 추려낼 수 있다. 예컨대, 프로세서(180)는 제1이미지에 포함된 색상 중 검정색, 흰색, 텍스트 후보 색상, 배경 후보 색상을 포함하여 우선순위가 높은 10개의 색상으로 색상 그룹을 구성할 수 있다. 이 때, 우선순위는 제1이미지에 포함된 색상 중 많은 비율을 차지하는 기준일 수 있으나, 사용자가 직접 색상을 선택할 수도 있으며, 그 기준은 어느 하나에 한정된 것은 아니다. 또한, 색상 그룹을 구성하는 색상은 많을수록 텍스트 인식의 정확도가 증가할 수 있으나, 작업시간 또한 증가하는 측면이 있는 바, 대상에 따라 달리 적용이 가능할 것이다. 보다 자세한 색상 변환 과정은 후술한다.As color conversion is a part of an image degradation operation, the processor 180 may select colors in the order of priority among colors included in the first image. For example, the processor 180 may configure a color group with 10 colors having high priority, including black, white, text candidate colors, and background candidate colors among colors included in the first image. In this case, the priority may be a criterion that occupies a large proportion of the colors included in the first image, but the user may directly select a color, and the criterion is not limited to any one. In addition, as the number of colors constituting the color group increases, the accuracy of text recognition may increase, but the working time also increases, so it may be applied differently depending on the subject. A more detailed color conversion process will be described later.

따라서, 프로세서(180)는 제1이미지를 색상 그룹을 이용하여 색상 변환을 수행하여 제2이미지를 획득할 수 있다.Accordingly, the processor 180 may obtain the second image by performing color conversion on the first image using the color group.

프로세서(180)는 획득된 제2이미지에 기초하여 제1이미지에 포함된 텍스트의 인식 결과를 획득할 수 있다(S230). 프로세서(180)는 획득한 인식 결과를 디스플레이에 표시할 수 있다. 본 발명의 일 실시예에 따르면, 프로세서(180)는 획득한 인식 결과를 이용하여 목적에 맞게 처리할 수 있다. 예컨대, 텍스트를 인식한 것이 획득한 텍스트로 웹 브라우저 등을 이용하여 검색하기 위한 것일 수 있다. 이 때, 프로세서(180)는 사용자입력부(130)를 통한 사용자입력에 기초하여 혹은 사용자입력 없이 검색을 수행할 수 있다.The processor 180 may acquire a recognition result of the text included in the first image based on the acquired second image (S230). The processor 180 may display the acquired recognition result on the display. According to an embodiment of the present invention, the processor 180 may use the acquired recognition result to process it according to a purpose. For example, the recognition of the text may be to search for the acquired text using a web browser or the like. In this case, the processor 180 may perform a search based on a user input through the user input unit 130 or without a user input.

본 발명의 일 실시예에 따르면, 이미지에 포함된 텍스트를 인식할 때, 텍스트 후보 색상이 주변 색상들과 구별될 수 있도록 색상 변환함으로써 보다 쉽게 문자 인식을 할 수 있는 상태로 이미지를 변환하여 텍스트 인식의 신뢰성을 높일 수 있다.According to an embodiment of the present invention, when recognizing text included in an image, text recognition is performed by converting the image to a state in which character recognition can be performed more easily by color conversion so that a text candidate color can be distinguished from surrounding colors. can increase the reliability of

도 3은 본 발명의 일 실시예에 따른 이미지에 따른 색상 그룹을 도시한 도면이다. 도 3은 타겟(200)이 표시하는 동일한 화면을 여러 번 촬상하여 획득한 복수의 이미지(310)와 각 이미지에 포함된 색상들로 이루어진 색상 그룹(색상 그룹 1, 색상 그룹 2, 색상 그룹 3)을 도시하고 있다. 3 is a diagram illustrating a color group according to an image according to an embodiment of the present invention. 3 shows a plurality of images 310 obtained by capturing the same screen displayed by the target 200 multiple times and a color group (color group 1, color group 2, color group 3) including colors included in each image. is showing

제1이미지는 제1이미지를 표시하는 타겟(200)의 디스플레이의 종류 등 특성 또는 촬영 장소의 밝기 수준 등 타겟(200)의 주변 환경에 따라 도 3에 도시된 복수의 이미지(310)와 같이 다르게 보일 수 있으므로, 신뢰성 있는 결과를 위해 다양한 샘플을 획득할 수 있다.The first image is different as the plurality of images 310 shown in FIG. 3 according to the surrounding environment of the target 200, such as characteristics such as the type of display of the target 200 displaying the first image, or the brightness level of the shooting location. As it can be seen, various samples can be obtained for reliable results.

색상 그룹은 각 획득된 제1이미지의 텍스트와 배경에 대응하는 색상들로 지정되어 저장부(140)에 저장될 수 있다. 다만, 색상 그룹은 획득한 이미지에 기초하여 정해질 뿐만 아니라, 사용자의 선택에 따라 정해질 수도 있는 등 이를 정하는 기준은 어느 하나에 한정되지 않는다. 또한, 저장된 색상 그룹은 보다 정확한 색상으로 업데이트 되거나 새로운 이미지에 기초한 색상 그룹이 추가될 수 있다. 본 발명의 일 실시예에 따르면, 제1이미지에 대응하는 복수의 색상은 텍스트 후보 색상 또는 배경 후보 색상의 색상값이 서로 다른 복수의 색상 그룹 중 어느 한 그룹의 색상일 수 있다.The color group may be designated as colors corresponding to the text and background of each acquired first image and stored in the storage unit 140 . However, the criterion for determining the color group is not limited to any one, for example, the color group may be determined based on the acquired image and may be determined according to the user's selection. In addition, the stored color group may be updated with more accurate colors or a color group based on a new image may be added. According to an embodiment of the present invention, the plurality of colors corresponding to the first image may be colors of any one of a plurality of color groups having different color values of a text candidate color or a background candidate color.

도 3에 도시된 바에 따르면, 색상 그룹에 포함된 색상은 텍스트 후보 색상(320)과 배경 후보 색상(330)으로 나뉠 수 있고, 배경 후보 색상(330)은 주 배경 색상, 텍스트 후보 색상(320)과 유사한 색상값을 가지는 색상, 기타 색상으로 나뉘어질 수 있다. 예컨대, 색상 그룹 1을 기준으로 주 배경 색상은 0E465E, 3E9599이고, 텍스트 후보 색상(320)과 유사한 색상값을 가지는 색상은 B2B2B2이고, 이들과 텍스트 후보 색상(320)을 제외한 나머지가 기타 색상일 수 있다.As shown in FIG. 3 , a color included in the color group may be divided into a text candidate color 320 and a background candidate color 330 , and the background candidate color 330 is a main background color and a text candidate color 320 . It can be divided into colors having a color value similar to , and other colors. For example, based on color group 1, the main background colors are 0E465E and 3E9599, the color having a color value similar to the text candidate color 320 is B2B2B2, and the rest except for these and the text candidate color 320 may be other colors. have.

본 발명에 따르면, 저장된 색상 그룹을 이용하는 방법은 다양하게 존재할 수 있다. 먼저 프로세서(180)는 하나의 색상 그룹을 고정해두고, 이를 그대로 동작 중에 이용할 수 있다. 이는, 이미지에 포함된 색상이 고정되고, 그 이미지에 포함된 텍스트를 인식하는 경우에 적용할 수 있다. 예컨대, 타겟(200)이 컴퓨터이고, 해당 컴퓨터로 게임을 실행한다고 가정해본다. 게임 내 특정 화면에 포함된 텍스트를 인식하는 것이 필요한 경우, 게임 내 특정 화면은 색상이 고정되어 있을 가능성이 높다. 따라서, 텍스트의 인식이 요구되는 게임 내 특정 화면의 모습을 다양한 환경에서 촬상한 후, 촬상된 이미지에서 텍스트와 배경에 대응하는 색상으로 구성된 색상 그룹을 지정할 수 있다.According to the present invention, there may be various methods for using the stored color group. First, the processor 180 may fix one color group and use it as it is during operation. This can be applied when a color included in an image is fixed and text included in the image is recognized. For example, it is assumed that the target 200 is a computer and a game is executed by the computer. If it is necessary to recognize text included on a specific screen in the game, it is highly likely that the color of the specific screen in the game is fixed. Accordingly, after capturing the appearance of a specific screen in a game requiring text recognition in various environments, it is possible to designate a color group composed of colors corresponding to the text and the background in the captured image.

추후, 프로세서(180)는 해당 화면을 촬상한 이미지를 수신한 경우, 저장된 색상 그룹을 그대로 동작 중에 이용할 수 있다. 따라서, 저장된 색상 그룹을 이용한 색상 변환을 통해 신속하고, 정확한 텍스트 인식이 이루어질 수 있다. Subsequently, when receiving an image obtained by capturing the corresponding screen, the processor 180 may use the stored color group as it is during operation. Accordingly, rapid and accurate text recognition can be achieved through color conversion using the stored color group.

다른 실시예로서, 프로세서(180)는 촬상된 제1이미지를 수신하는 경우, 저장된 복수의 색상 그룹 중 수신한 제1이미지와 유사한 색상 그룹을 선택할 수 있다. 이 경우, 프로세서(180)는 제1이미지의 텍스트 색상에 관한 정보에 기초하여 텍스트 색상에 대응하는 색상 그룹을 선택할 수 있다. 제1이미지의 텍스트 색상에 관한 정보는 프로세서(180)가 제1이미지를 분석하여 획득할 수 있고, 사용자로부터 정보를 입력 받거나, 외부장치로부터 정보를 수신하는 등 다양하게 획득 가능할 것이다. As another embodiment, when receiving the captured first image, the processor 180 may select a color group similar to the received first image from among a plurality of stored color groups. In this case, the processor 180 may select a color group corresponding to the text color based on information about the text color of the first image. Information on the text color of the first image may be obtained by the processor 180 by analyzing the first image, and may be obtained in various ways, such as by receiving information from a user or receiving information from an external device.

또한, 프로세서(180)는 제1이미지를 수신하고, 텍스트의 인식을 용이하게 하기 위한 색상 변환을 하는 과정에서 텍스트 후보 색상에 관한 정보를 수신하여 색상 그룹을 정할 수 있다. 예컨대, 프로세서(180)는 사용자입력부(130)를 통해 텍스트 후보 색상 등을 지정하는 사용자입력을 수신할 수 있다. 자세한 사항은 도 6에서 후술한다. In addition, the processor 180 may receive the first image and receive information about a text candidate color in a process of color conversion for facilitating text recognition to determine a color group. For example, the processor 180 may receive a user input for designating a text candidate color or the like through the user input unit 130 . Details will be described later with reference to FIG. 6 .

다양한 방법을 통해 색상 그룹을 지정하여, 상황에 맞게 수신한 이미지에 대응하는 색상 그룹을 통해 신속하고 정확하게 텍스트 인식을 위한 색상 변환을 수행할 수 있다.By specifying a color group through various methods, color conversion for text recognition can be performed quickly and accurately through a color group corresponding to the received image according to the situation.

도 4는 본 발명의 실시예에 따른 전자장치의 이미지 색상 변환의 원리 및 그 예를 도시한 도면이다.4 is a diagram illustrating a principle and an example of image color conversion of an electronic device according to an embodiment of the present invention.

도 4는 프로세서(180)가 제1이미지를 색상 변환하는 원리를 도시한다. 이미지는 수많은 픽셀들로 이루어져 있고, 각 픽셀 별로 서로 다른 색상값을 가지게 된다. 예컨대, 도 4에 도시된 RGB 큐브 모델(410)과 같이 하나의 색상은 삼원색(RGB)을 기준선으로 하는 삼차원 직교 좌표계의 한 점으로 나타낼 수 있다. 프로세서(180)는 제1이미지의 각 픽셀의 제1색상값을 식별하고, 식별된 제1색상값을 텍스트 후보 색상 또는 배경 후보 색상의 제2색상값 중에서 제1색상값과 유사한 색상값으로 치환하여 제1이미지의 색상 변환을 수행할 수 있다. 4 illustrates a principle of the processor 180 converting the color of the first image. An image is made up of many pixels, and each pixel has a different color value. For example, as in the RGB cube model 410 shown in FIG. 4 , one color may be represented by a point in a three-dimensional orthogonal coordinate system using three primary colors (RGB) as a reference line. The processor 180 identifies a first color value of each pixel of the first image, and replaces the identified first color value with a color value similar to the first color value among the second color values of the text candidate color or the background candidate color Thus, color conversion of the first image may be performed.

유사한 색상값이란, 각 픽셀의 R, G, B 값과 색상 그룹을 구성하고 있는 색상의 R, G, B 값을 각각 3차원 평면상의 x, y, z값으로 변환하여 거리가 가까운 값을 유사한 색상값이라고 볼 수 있다. 예컨대, 도 4에 도시된 삼차원 직교 좌표계(420)에서 제1이미지의 한 픽셀의 색상값이 P(p1, p2, p3)라고 가정해본다. 그리고 프로세서(180)는 제1이미지의 색상 그룹에서 P와 가장 가까운 거리에 있는 색상값이 Q(q1, q2, q3)인 것을 식별하고, 그 픽셀을 Q 색상값을 가지는 색상으로 치환할 수 있다. 색상값 간의 거리를 계산하는 방법은, 두 좌표 간 거리를 계산하는 방법으로써 다음과 같은 수식을 이용할 수 있다.Similar color values are similar to each other by converting the R, G, and B values of each pixel and the R, G, and B values of the colors constituting the color group into x, y, and z values on a three-dimensional plane. It can be viewed as a color value. For example, it is assumed that the color value of one pixel of the first image in the three-dimensional orthogonal coordinate system 420 shown in FIG. 4 is P(p1, p2, p3). In addition, the processor 180 may identify that a color value closest to P in the color group of the first image is Q(q1, q2, q3), and replace the pixel with a color having a Q color value. . As a method of calculating the distance between color values, the following equation may be used as a method of calculating the distance between two coordinates.

[수식 1][Formula 1]

Figure 112019136025034-pat00001
Figure 112019136025034-pat00001

따라서, 위와 같은 방법으로 색상 변환 전의 이미지(430)와 색상 변환 후의 이미지(440)를 도시하고 있다. 프로세서(180)는 선택된 일 영역에 포함된 텍스트의 크기에 기초하여 일 영역의 크기를 설정할 수 있다. 따라서, 이미지 변환 작업은 전체 이미지에서 필요한 영역, 예컨대, 텍스트 영역만 선택한 후 축소시켜 사용할 수 있다. 이미지가 작을수록 빠른 연산이 가능하나, 텍스트의 폭(450)이 도 4의 이미지(430)에 도시된 바와 같이, 6 픽셀 이상은 되어야 정확한 텍스트 인식이 가능할 것이다. Accordingly, the image 430 before color conversion and the image 440 after color conversion are illustrated in the above manner. The processor 180 may set the size of the selected area based on the size of text included in the selected area. Therefore, the image conversion operation can be used after selecting only a necessary area, for example, a text area, from the entire image and then reducing it. The smaller the image, the faster the calculation is possible. However, as shown in the image 430 of FIG. 4 , the width 450 of the text must be 6 pixels or more to enable accurate text recognition.

본 발명의 일 실시예에 따르면, 색상 변환을 통해 제1이미지에 포함된 색상을 단순화 시키고, 텍스트와 배경의 구별을 선명하게 할 수 있으므로 텍스트 인식이 용이하게 이루어질 수 있다. According to an embodiment of the present invention, since the color included in the first image can be simplified through color conversion and the text and the background can be clearly distinguished, text recognition can be easily achieved.

도 5는 본 발명의 일 실시예에 따른 이미지 색상 변환 및 필터링 모습을 도시한 도면이다. 5 is a diagram illustrating image color conversion and filtering according to an embodiment of the present invention.

도 5는 타겟(200)의 화면을 촬상한 제1이미지(510), 제1이미지(510)를 색상 변환한 제2이미지(520) 및 제2이미지에 필터링을 수행하여 획득한 제3이미지(530)를 도시하고 있다. 5 is a first image 510 obtained by capturing the screen of the target 200, a second image 520 obtained by color-converting the first image 510, and a third image obtained by filtering the second image ( 530) is shown.

프로세서(180)는 앞서 설명한 바와 같이, 이미지 열화를 위해 제1이미지(510)를 색상 변환하여 제2이미지(520)를 획득할 수 있다. 이 때, 색상 변환을 위한 색상 그룹은 수신한 제1이미지의 샘플을 미리 획득하여 정한 복수의 색상 그룹 중 하나를 선택할 수도 있고, 수신한 제1이미지에 포함된 색상을 바로 식별하여 정할 수도 있으며, 어느 하나에 한정된 것은 아니다.As described above, the processor 180 may obtain the second image 520 by color-converting the first image 510 for image degradation. In this case, as the color group for color conversion, one of a plurality of color groups determined by acquiring a sample of the received first image in advance may be selected, or a color included in the received first image may be directly identified and determined, It is not limited to any one.

그리고, 프로세서(180)는 획득된 제2이미지(520)에 필터링을 수행하여 제3이미지(530)를 획득할 수 있다. 이 때, 필터링은 텍스트를 문자 인식 라이브러리에서 빠르고 정확하게 인식할 수 있도록 흰 배경에 검은색 텍스트로 변환하는 흑백 필터링일 수 있으나, 어느 하나에 한정되는 것은 아니다.Then, the processor 180 may obtain the third image 530 by performing filtering on the obtained second image 520 . In this case, the filtering may be black-and-white filtering in which text is converted into black text on a white background so that the text can be quickly and accurately recognized in the character recognition library, but is not limited thereto.

만약 프로세서(180)가 색상 변환을 하지 않고 제1이미지(510)에 필터링을 바로 수행하는 경우, 도 5의 왼쪽 아래 이미지(540)를 획득하게 된다. 이미지(540)에 나타난 것처럼 인식 대상이 되는 텍스트 주변에 텍스트와 비슷한 색상의 픽셀이 존재 할 경우, 인식 결과의 정확성이 떨어질 수 있다. 따라서, 프로세서(180)는 인식의 대상이 되는 텍스트와 주변 픽셀을 별도의 색상으로 색상 그룹을 구성하여 색상 변환을 수행할 수 있다. 이렇게 색상 변환 후 흑백 필터링을 적용한 제3이미지(530)와 비교해 보면, 텍스트 색상과 유사한 색상의 배경이 흑백 필터링 시 제거되어 텍스트 부분만 남아있게 되고 텍스트 인식의 정확도가 증가한다.If the processor 180 directly performs filtering on the first image 510 without color conversion, the lower left image 540 of FIG. 5 is obtained. As shown in the image 540 , when pixels of a color similar to the text exist around the text to be recognized, the accuracy of the recognition result may be reduced. Accordingly, the processor 180 may perform color conversion by composing a color group of text to be recognized and surrounding pixels as separate colors. In comparison with the third image 530 to which black and white filtering is applied after color conversion, the background of a color similar to the text color is removed during black and white filtering so that only the text portion remains, and the accuracy of text recognition is increased.

도 6은 본 발명의 일 실시예에 따른 일 영역을 지정하는 사용자입력을 도시한 도면이다. 6 is a diagram illustrating a user input for designating an area according to an embodiment of the present invention.

프로세서(180)는 인식하고자 하는 텍스트가 위치하고 있는 영역을 쉽게 추출하기 위해 촬영 가이드 UI를 디스플레이에 표시하고, 촬상된 이미지 내 해당 영역에 위치하고 있는 텍스트의 크기와 좌표를 이용하여 필터링을 할 수 있다. 이 외에도, 도 6에서와 같이 전자장치(100)는 사용자입력부(130)를 더 포함하고, 프로세서(180)는, 사용자입력부(130)를 통해 제1이미지(610)의 텍스트에 대응되는 일 영역(620)을 지정하는 사용자입력을 수신할 수 있다. 이는 도 3에서 설명한 바와 같이 텍스트에 대응되는 일 영역(620)에 관한 정보는 색상 그룹을 지정할 때 필요한 텍스트 색상에 관한 정보가 될 수 있다.The processor 180 may display the shooting guide UI on the display in order to easily extract the region where the text to be recognized is located, and perform filtering using the size and coordinates of the text located in the corresponding region in the captured image. In addition to this, as shown in FIG. 6 , the electronic device 100 further includes a user input unit 130 , and the processor 180 includes a region corresponding to the text of the first image 610 through the user input unit 130 . A user input designating 620 may be received. As described with reference to FIG. 3 , the information on the one area 620 corresponding to the text may be information on the text color required when designating a color group.

본 발명의 일 실시예를 따르면, 사용자는 촬상된 제1이미지에서도 인식하고자 하는 텍스트에 대응되는 일 영역을 지정함으로써 프로세서(180)는 지정된 일 영역을 기준으로 색상 변환 및 텍스트 인식을 수행할 수 있다. 따라서, 신속하고 더 정확한 텍스트 인식 결과를 획득할 수 있을 것이다.According to an embodiment of the present invention, the user designates a region corresponding to the text to be recognized even in the captured first image, so that the processor 180 may perform color conversion and text recognition based on the designated one region. . Accordingly, a faster and more accurate text recognition result may be obtained.

도 7은 본 발명의 일 실시예에 따른 노이즈 보정을 수행하는 모습을 도시한 도면이다.7 is a diagram illustrating a state in which noise correction is performed according to an embodiment of the present invention.

촬상된 이미지의 경우, 노이즈가 발생할 수 있으므로 보다 나은 텍스트 인식을 위한 보정 작업이 필요할 수 있다. 따라서, 프로세서(180)는 동일한 색상값을 가지는 연속된 픽셀과 유사한 색상값을 참고하여 보정 작업을 진행한다. In the case of a captured image, since noise may occur, a correction operation for better text recognition may be required. Accordingly, the processor 180 performs a correction operation with reference to a color value similar to successive pixels having the same color value.

프로세서(180)는 필터링을 거친 제3이미지 내의 픽셀을 확대하는 제1동작 또는 인접한 2이상의 픽셀을 서로 연결하는 제2동작 중 적어도 하나를 수행하여, 제1이미지에 포함된 텍스트의 인식 결과를 획득할 수 있다. The processor 180 obtains a recognition result of text included in the first image by performing at least one of a first operation of enlarging pixels in the filtered third image or a second operation of connecting two or more adjacent pixels to each other can do.

예컨대, 모니터를 촬상하여 이미지를 획득한 경우, 모니터 특성상 촬상된 이미지에는 가로 혹은 세로 방향으로 결이 생길 수 있다. 따라서, 도 7에 도시된 바와 같이 이를 확대할 경우, 확대된 영역(710)은 빈 틈이 존재하는 것을 확인할 수 있다. 따라서, 프로세서(180)는 확대된 영역(710)에서 인접한 2 이상의 픽셀을 서로 연결하여 빈 틈을 메울 수 있다. 도 7에서 빈 틈을 메우게 된 영역(720, 730)을 확인할 수 있다. For example, when an image is obtained by capturing a monitor, grains may be formed in the captured image in a horizontal or vertical direction due to the characteristics of the monitor. Accordingly, as shown in FIG. 7 , when it is enlarged, it can be confirmed that an empty gap exists in the enlarged area 710 . Accordingly, the processor 180 may fill the gap by connecting two or more pixels adjacent to each other in the enlarged area 710 . In FIG. 7 , regions 720 and 730 in which empty gaps are filled can be identified.

본 발명의 일 실시예에 따르면, 텍스트의 빈 틈을 메워 텍스트가 선명해짐에 따라 텍스트를 인식하는 시간이 단축될 수 있고, 인식이 불가능한 부분이 가능해지고 정확도 또한 증가할 수 있다.According to an embodiment of the present invention, as the text becomes clearer by filling in the gaps in the text, the time for recognizing the text may be shortened, the unrecognizable part may be made possible, and the accuracy may also be increased.

100: 전자장치
110: 인터페이스부
120: 디스플레이부
130: 사용자입력부
140: 저장부
150: 카메라
160: 마이크로폰
170: 스피커
180: 프로세서
100: electronics
110: interface unit
120: display unit
130: user input unit
140: storage
150: camera
160: microphone
170: speaker
180: processor

Claims (11)

카메라를 이용하여 촬상한 이미지에 포함된 텍스트의 인식이 가능한 전자장치에 있어서,
인터페이스부; 및
카메라를 이용하여 촬상한 제1이미지를 수신하고,
상기 제1이미지에 포함된 텍스트에 대응하는 텍스트 후보 색상과 상기 텍스트 후보 색상과 색상값이 다른 배경 후보 색상을 식별하고,
상기 제1이미지의 각 픽셀의 제1색상값을 상기 텍스트 후보 색상의 제2색상값 또는 상기 배경 후보 색상의 제3색상값 중에서 상기 제1색상값과 유사한 값으로 변환하여 제2이미지를 획득하고,
상기 획득된 제2이미지에 기초하여 상기 제1이미지에 포함된 텍스트의 인식 결과를 획득하고,
상기 획득한 인식 결과를 디스플레이에 표시하는,
프로세서를 포함하는 전자장치.
An electronic device capable of recognizing text included in an image captured using a camera, the electronic device comprising:
interface unit; and
Receive a first image captured using a camera,
identifying a text candidate color corresponding to the text included in the first image and a background candidate color having a different color value from the text candidate color;
a second image is obtained by converting a first color value of each pixel of the first image into a value similar to the first color value among a second color value of the text candidate color or a third color value of the background candidate color; ,
Obtaining a recognition result of the text included in the first image based on the obtained second image,
displaying the obtained recognition result on a display,
An electronic device comprising a processor.
삭제delete 삭제delete 제1항에 있어서,
상기 프로세서는,
상기 텍스트 후보 색상 또는 상기 배경 후보 색상의 색상값이 서로 다른 복수의 색상 그룹을 식별하는 전자장치.
According to claim 1,
The processor is
An electronic device for identifying a plurality of color groups having different color values of the text candidate color or the background candidate color.
제4항에 있어서,
상기 프로세서는,
상기 복수의 색상 그룹 중에서 상기 제1이미지에 포함된 텍스트에 대응하는 색상값을 가지는 상기 텍스트 후보 색상을 포함하는 색상 그룹을 선택하는 전자장치.
5. The method of claim 4,
The processor is
The electronic device selects a color group including the text candidate color having a color value corresponding to the text included in the first image from among the plurality of color groups.
제4항에 있어서,
상기 프로세서는,
상기 복수의 색상 그룹 중에서 상기 제1이미지에 포함된 배경에 대응하는 색상값을 가지는 상기 배경 후보 색상을 포함하는 색상 그룹을 선택하는 전자장치.
5. The method of claim 4,
The processor is
An electronic device for selecting a color group including the background candidate color having a color value corresponding to the background included in the first image from among the plurality of color groups.
제4항에 있어서,
상기 프로세서는,
상기 제1이미지를 표시하는 타겟의 디스플레이 특성 또는 상기 타겟의 주변 환경 중 적어도 하나에 기초하여 상기 색상 그룹을 선택하는 전자장치.
5. The method of claim 4,
The processor is
An electronic device for selecting the color group based on at least one of a display characteristic of a target displaying the first image or a surrounding environment of the target.
제1항에 있어서,
사용자입력부를 더 포함하고,
상기 프로세서는, 상기 사용자입력부를 통해 상기 제1이미지에 대응하는 상기 텍스트에 대응되는 일 영역을 선택하는 사용자입력을 수신하는 전자장치.
According to claim 1,
Further comprising a user input unit,
The processor may be configured to receive a user input for selecting a region corresponding to the text corresponding to the first image through the user input unit.
제8항에 있어서,
상기 프로세서는,
상기 선택된 일 영역에 포함된 텍스트의 크기에 기초하여 상기 일 영역의 크기를 설정하는 전자장치.
9. The method of claim 8,
The processor is
An electronic device configured to set a size of the one area based on a size of text included in the selected one area.
제1항에 있어서,
상기 프로세서는,
상기 획득된 제2이미지에 필터링을 수행하여 제3이미지를 획득하고,
상기 제3이미지 내의 픽셀을 확대하는 제1동작 또는 인접한 2이상의 픽셀을 서로 연결하는 제2동작 중 적어도 하나를 수행하여, 상기 제1이미지에 포함된 텍스트의 인식 결과를 획득하는 전자장치.
According to claim 1,
The processor is
To obtain a third image by performing filtering on the obtained second image,
The electronic device obtains a recognition result of text included in the first image by performing at least one of a first operation of enlarging pixels in the third image and a second operation of connecting two or more adjacent pixels to each other.
카메라를 이용하여 촬상한 이미지에 포함된 텍스트의 인식이 가능한 전자장치의 제어방법에 있어서,
카메라를 이용하여 촬상한 제1이미지를 수신하는 단계;
상기 제1이미지에 포함된 텍스트에 대응하는 텍스트 후보 색상과 상기 텍스트 후보 색상과 색상값이 다른 배경 후보 색상을 식별하는 단계;
상기 제1이미지의 각 픽셀의 제1색상값을 상기 텍스트 후보 색상의 제2색상값 또는 상기 배경 후보 색상의 제3색상값 중에서 상기 제1색상값과 유사한 값으로 변환하여 제2이미지를 획득하는 단계;
상기 획득된 제2이미지에 기초하여 상기 제1이미지에 포함된 텍스트의 인식 결과를 획득하는 단계; 및
상기 획득한 인식 결과를 디스플레이에 표시하는 단계를 포함하는 전자장치의 제어방법.
A method of controlling an electronic device capable of recognizing text included in an image captured by using a camera, the method comprising:
Receiving a first image captured using a camera;
identifying a text candidate color corresponding to the text included in the first image and a background candidate color having a different color value from the text candidate color;
obtaining a second image by converting a first color value of each pixel of the first image into a value similar to the first color value among a second color value of the text candidate color or a third color value of the background candidate color step;
obtaining a recognition result of text included in the first image based on the obtained second image; and
and displaying the acquired recognition result on a display.
KR1020190179138A 2019-12-31 2019-12-31 Electronic apparatus capable of recognizing text included in an image captured by a camera and the method thereof KR102316969B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190179138A KR102316969B1 (en) 2019-12-31 2019-12-31 Electronic apparatus capable of recognizing text included in an image captured by a camera and the method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190179138A KR102316969B1 (en) 2019-12-31 2019-12-31 Electronic apparatus capable of recognizing text included in an image captured by a camera and the method thereof

Publications (2)

Publication Number Publication Date
KR20210085742A KR20210085742A (en) 2021-07-08
KR102316969B1 true KR102316969B1 (en) 2021-10-26

Family

ID=76894324

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190179138A KR102316969B1 (en) 2019-12-31 2019-12-31 Electronic apparatus capable of recognizing text included in an image captured by a camera and the method thereof

Country Status (1)

Country Link
KR (1) KR102316969B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005202834A (en) * 2004-01-19 2005-07-28 Toshiba Corp Character recognition system, character recognition method and character recognition program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101023389B1 (en) * 2009-02-23 2011-03-18 삼성전자주식회사 Apparatus and method for improving performance of character recognition
KR102208683B1 (en) * 2014-05-30 2021-01-28 삼성에스디에스 주식회사 Character recognition method and apparatus thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005202834A (en) * 2004-01-19 2005-07-28 Toshiba Corp Character recognition system, character recognition method and character recognition program

Also Published As

Publication number Publication date
KR20210085742A (en) 2021-07-08

Similar Documents

Publication Publication Date Title
KR102196845B1 (en) Information processing device and information processing method
KR100658998B1 (en) Image processing apparatus, image processing method and computer readable medium which records program thereof
US10699473B2 (en) System and method for generating a virtual viewpoint apparatus
US9959681B2 (en) Augmented reality contents generation and play system and method using the same
US10681287B2 (en) Apparatus and method for displaying AR object
US9961231B2 (en) Image processing method that attempts decoding of additional information using a plurality of decoding methods, and apparatus therefor
KR20150114437A (en) Image processing apparatus and image processing method
KR20190031032A (en) Method and apparatus for executing a content
KR102383134B1 (en) Electronic device for processing image based on priority and method for operating thefeof
KR102383129B1 (en) Method for correcting image based on category and recognition rate of objects included image and electronic device for the same
EP3531308A1 (en) Method for providing text translation managing data related to application, and electronic device thereof
KR102423295B1 (en) An apparatus for composing objects using depth map and a method thereof
CN107018407B (en) Information processing device, evaluation chart, evaluation system, and performance evaluation method
CN106506975A (en) A kind of image pickup method and terminal
KR20190096748A (en) electronic device and method for correcting image using external electronic device
US20210272249A1 (en) Electronic device and method for correcting image on basis of image transmission state
CN103685854A (en) Image processing apparatus, image processing method, and program
JP6108220B2 (en) Image processing apparatus and image processing program
KR102316969B1 (en) Electronic apparatus capable of recognizing text included in an image captured by a camera and the method thereof
US10896344B2 (en) Information processing apparatus, information processing method, and computer program
CN110826376B (en) Marker identification method and device, terminal equipment and storage medium
JP2019144107A (en) Information processor, terminal device, information processing method, and program
CN110865911B (en) Image testing method, device, storage medium, image acquisition card and upper computer
EP3534601B1 (en) Image processing apparatus, image processing method, and storage medium
CN111652186A (en) Video category identification method and related device

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant