KR101831204B1 - Method and apparatus for document area segmentation - Google Patents
Method and apparatus for document area segmentation Download PDFInfo
- Publication number
- KR101831204B1 KR101831204B1 KR1020170046633A KR20170046633A KR101831204B1 KR 101831204 B1 KR101831204 B1 KR 101831204B1 KR 1020170046633 A KR1020170046633 A KR 1020170046633A KR 20170046633 A KR20170046633 A KR 20170046633A KR 101831204 B1 KR101831204 B1 KR 101831204B1
- Authority
- KR
- South Korea
- Prior art keywords
- text
- text line
- document
- area
- document image
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/62—Text, e.g. of license plates, overlay texts or captions on TV images
- G06V20/63—Scene text, e.g. street names
-
- G06K9/3258—
-
- G06K9/344—
-
- G06K9/38—
-
- G06K9/40—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/28—Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/30—Noise filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/148—Segmentation of character regions
- G06V30/153—Segmentation of character regions using recognition of characters or words
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
Description
본 명세서에서 개시되는 실시예들은 문서 영상에서 텍스트 영역, 비텍스트 영역 및 문서 경계를 검출하기 위한 방법 및 장치에 관한 것이다.The embodiments disclosed herein relate to a method and apparatus for detecting text areas, non-text areas and document boundaries in a document image.
최근에는 스마트폰과 같이 개인이 휴대하는 기기에 구비된 카메라의 성능이 향상됨에 따라, 스캐너를 이용하여 문서를 스캔하는 대신에 스마트폰 등에 구비된 카메라를 이용하여 문서를 촬영하고, 촬영된 문서 영상을 스캔 영상 대신 사용하는 경우가 많다.In recent years, the performance of cameras provided in personal devices such as smart phones has been improved. Therefore, instead of scanning a document using a scanner, a document is photographed using a camera provided in a smart phone or the like, Is often used instead of a scan image.
그런데, 문서 영상을 전자 문서로 변환하는 과정에서, 문자 인식을 수행할 때 텍스트 이외의 요소가 포함되면 문자 인식 결과가 나빠진다. 따라서, 전자 문서 변환시의 정확도를 높이기 위해서는, 문서 영상에서 텍스트 영역 및 비텍스트 영역은 각각 어느 부분인지, 그리고 문서 전체의 경계는 어디인지를 결정하는 전처리 과정이 필요하다.However, in the process of converting a document image into an electronic document, character recognition results are deteriorated when an element other than text is included in performing character recognition. Therefore, in order to improve the accuracy of the electronic document conversion, a preprocessing process is required to determine which part of the text area and the non-text area are in the document image, and the boundary of the entire document.
관련하여 선행기술 문헌인 한국특허공개번호 제2000-0033954호에서는 클러스터링에 기반하여 문서 영상을 분할하는 방법 및 장치를 개시하며, 자세하게는 스캐너를 통해 입력된 문서 영상에 포함된 문자 영역들 사이의 여백들만에 기초하여 클러스터링을 수행하고, 그 결과에 기초하여 문자 영역들을 분할하여 추출하는 내용을 개시하고 있다.Korean Patent Laid-Open Publication No. 2000-0033954 discloses a method and apparatus for dividing document images based on clustering. More specifically, Japanese Patent Application Laid-Open No. 2000-0033954 discloses a method and apparatus for dividing document images based on clustering, Clustering is performed on the basis of only the character regions, and the character regions are divided and extracted based on the result.
한편, 전술한 배경기술은 발명자가 본 발명의 도출을 위해 보유하고 있었거나, 본 발명의 도출 과정에서 습득한 기술 정보로서, 반드시 본 발명의 출원 전에 일반 공중에게 공개된 공지기술이라 할 수는 없다.On the other hand, the background art described above is technical information acquired by the inventor for the derivation of the present invention or obtained in the derivation process of the present invention, and can not necessarily be a known technology disclosed to the general public before the application of the present invention .
본 명세서에서 개시되는 실시예들은, 문서 영상에서 텍스트 영역, 비텍스트 영역 및 문서 경계를 높은 정확도로 검출할 수 있는 방법 및 장치를 제시하는데 목적이 있다.Embodiments disclosed herein are aimed at providing a method and apparatus capable of detecting a text area, a non-text area, and a document boundary in a document image with high accuracy.
상술한 기술적 과제를 달성하기 위한 기술적 수단으로서, 일 실시예에 따르면, 문서 영역 분할 방법은, 문서 영상에 포함되는 연결 요소들을 군집화(clustering)하여 텍스트 라인 후보들을 검출하는 단계, 상기 검출된 텍스트 라인 후보들에 대해서, 서로 다른 두 개의 문턱값을 이용한 필터링을 수행함으로써, 비텍스트 요소를 제거하고 텍스트 라인을 검출하는 단계, 상기 검출된 텍스트 라인을 상기 문서 영상에서 제거한 후, 반복 X-Y 컷(cut)을 수행함으로써 비텍스트 영역을 검출하는 단계 및 상기 검출된 비텍스트 영역을 관심 영역과 비교함으로써 문서 경계를 검출하는 단계를 포함할 수 있다.According to an embodiment of the present invention, there is provided a method of dividing a document region, the method comprising: clustering connection elements included in a document image to detect text line candidates; Removing the non-text elements and detecting a text line by performing filtering using two different threshold values for the candidates, removing the detected text line from the document image, and then repeating the repetitive X-Y cut Detecting a non-text area by performing a search on the detected non-text area, and detecting the document boundary by comparing the detected non-text area with the area of interest.
다른 실시예에 따르면, 문서 영역 분할 방법을 수행하기 위한 컴퓨터 프로그램으로서, 문서 영역 분할 방법은, 문서 영상에 포함되는 연결 요소들을 군집화(clustering)하여 텍스트 라인 후보들을 검출하는 단계, 상기 검출된 텍스트 라인 후보들에 대해서, 서로 다른 두 개의 문턱값을 이용한 필터링을 수행함으로써, 비텍스트 요소를 제거하고 텍스트 라인을 검출하는 단계, 상기 검출된 텍스트 라인을 상기 문서 영상에서 제거한 후, 반복 X-Y 컷(cut)을 수행함으로써 비텍스트 영역을 검출하는 단계 및 상기 검출된 비텍스트 영역을 관심 영역과 비교함으로써 문서 경계를 검출하는 단계를 포함할 수 있다.According to another embodiment, a computer program for performing a document area dividing method, the method comprising: clustering connecting elements included in a document image to detect text line candidates; Removing the non-text elements and detecting a text line by performing filtering using two different threshold values for the candidates, removing the detected text line from the document image, and then repeating the repetitive X-Y cut Detecting a non-text area by performing a search on the detected non-text area, and detecting the document boundary by comparing the detected non-text area with the area of interest.
또 다른 실시예에 따르면, 문서 영역 분할 방법을 수행하는 프로그램이 기록된 컴퓨터 판독 가능한 기록매체로서, 문서 영역 분할 방법은, 문서 영상에 포함되는 연결 요소들을 군집화(clustering)하여 텍스트 라인 후보들을 검출하는 단계, 상기 검출된 텍스트 라인 후보들에 대해서, 서로 다른 두 개의 문턱값을 이용한 필터링을 수행함으로써, 비텍스트 요소를 제거하고 텍스트 라인을 검출하는 단계, 상기 검출된 텍스트 라인을 상기 문서 영상에서 제거한 후, 반복 X-Y 컷(cut)을 수행함으로써 비텍스트 영역을 검출하는 단계 및 상기 검출된 비텍스트 영역을 관심 영역과 비교함으로써 문서 경계를 검출하는 단계를 포함할 수 있다.According to another aspect of the present invention, there is provided a computer-readable medium having recorded thereon a program for performing a method of dividing a document region, the method comprising: clustering connection elements included in a document image to detect text line candidates Removing the non-text elements and detecting a text line by performing filtering using the two different threshold values for the detected text line candidates, removing the detected text line from the document image, Detecting the non-text area by performing a repetitive X-Y cut, and detecting the document boundary by comparing the detected non-text area with the area of interest.
또 다른 실시예에 따르면, 문서 영역 분할 장치는, 문서 영상의 처리와 관련된 입력을 수신하고, 문서 영상의 처리가 진행되는 상황 및 결과를 보여주기 위한 입출력부, 문서 영역 분할을 수행하기 위한 프로그램이 저장되는 저장부 및 상기 프로그램을 실행함으로써 상기 문서 영상의 영역 분할을 수행하는 제어부를 포함하며, 상기 제어부는, 상기 문서 영상에 포함되는 연결 요소들을 군집화(clustering)하여 텍스트 라인 후보들을 검출하고, 상기 검출된 텍스트 라인 후보들에 대해서, 서로 다른 두 개의 문턱값을 이용한 필터링을 수행함으로써, 비텍스트 요소를 제거하고 텍스트 라인을 검출하며, 상기 검출된 텍스트 라인을 상기 문서 영상에서 제거한 후, 반복 X-Y 컷(cut)을 수행함으로써 비텍스트 영역을 검출하고, 상기 검출된 비텍스트 영역을 관심 영역과 비교함으로써 문서 경계를 검출할 수 있다.According to another embodiment, the document area dividing apparatus includes an input / output unit for receiving an input related to processing of a document image and for displaying a situation and a result of processing of the document image, a program for performing document area division And a control unit for performing an area division of the document image by executing the program, wherein the control unit detects clusters of the text line candidates by clustering connection elements included in the document image, Removing the non-text elements and detecting the text line by performing filtering using the two different threshold values for the detected text line candidates, removing the detected text line from the document image, a non-text area is detected by performing a cut operation on the detected non-text area, The document boundary can be detected by comparing with the station.
전술한 과제 해결 수단 중 어느 하나에 의하면, 문서 영상에 포함된 연결 요소들을 군집화한 후 투사를 수행함으로써, 복잡한 레이아웃을 갖는 문서 영상에 대해서도 텍스트 라인을 정확하게 검출할 수 있다.According to any one of the above-mentioned means for solving the problems, it is possible to accurately detect a text line even for a document image having a complicated layout by clustering connection elements included in the document image and then performing projection.
또한, 2개의 서로 다른 문턱값을 이용하는 분류기를 적용함으로써 비텍스트 요소를 제거함에 있어서도 정확도를 높일 수 있다.In addition, by applying a classifier using two different threshold values, it is possible to improve the accuracy in removing non-text elements.
또한, 초기값으로 주어지는 관심 영역과 검출된 비텍스트 영역을 비교하여 문서 경계를 검출함으로써, 문서 경계 검출의 정확도를 높일 수 있다.In addition, by detecting the document boundary by comparing the detected non-text region with the region of interest given as the initial value, the accuracy of document boundary detection can be increased.
개시되는 실시예들에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 개시되는 실시예들이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The effects obtained in the disclosed embodiments are not limited to the effects mentioned above, and other effects not mentioned are obvious to those skilled in the art to which the embodiments disclosed from the following description belong It can be understood.
도 1은 일 실시예에 따른 문서 영역 분할 장치의 구성을 도시한 블록도이다.
도 2는 일 실시예에 따른 문서 영상을 도시한 도면이다.
도 3은 일 실시예에 따라 MSER 알고리즘을 적용하고, 연결 요소들을 추출하여 군집화를 수행한 결과를 도시한 도면이다.
도 4는 일 실시예에 따라 문서 영상에서 각 군집에 세로 방향의 투사를 수행하여, 군집을 분리한 결과를 도시한 도면이다.
도 5는 일 실시예에 따라 문서 영상에서 각 군집에 가로 방향의 투사를 수행하여, 군집을 분리한 결과를 도시한 도면이다.
도 6은 일 실시예에 따라 문서 영상에서 텍스트 라인이 검출된 결과를 도시한 도면이다.
도 7은 일실시예에 따라 문서 영상에서 텍스트 영역 및 비텍스트 영역을 분할하고, 문서 경계를 검출한 결과를 도시한 도면이다.
도 8은 일 실시예에 따른 문서 영역 분할 방법을 설명하기 위한 순서도이다.1 is a block diagram showing a configuration of a document area dividing apparatus according to an embodiment.
2 is a diagram illustrating a document image according to an exemplary embodiment.
FIG. 3 is a diagram illustrating a result of applying an MSER algorithm according to an exemplary embodiment, and extracting connection elements and performing clustering.
FIG. 4 is a diagram illustrating a result of separating clusters by performing vertical projection on each of the clusters in a document image according to an exemplary embodiment.
FIG. 5 is a diagram showing a result of separating clusters by performing a horizontal projection on each of the clusters in a document image according to an embodiment.
6 is a diagram illustrating a result of detecting a text line in a document image according to an embodiment.
7 is a diagram showing a result of dividing a text area and a non-text area in a document image and detecting a document boundary according to an embodiment.
8 is a flowchart for explaining a document area dividing method according to an embodiment.
아래에서는 첨부한 도면을 참조하여 다양한 실시예들을 상세히 설명한다. 아래에서 설명되는 실시예들은 여러 가지 상이한 형태로 변형되어 실시될 수도 있다. 실시예들의 특징을 보다 명확히 설명하기 위하여, 이하의 실시예들이 속하는 기술분야에서 통상의 지식을 가진 자에게 널리 알려져 있는 사항들에 관해서 자세한 설명은 생략하였다. 그리고, 도면에서 실시예들의 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Various embodiments are described in detail below with reference to the accompanying drawings. The embodiments described below may be modified and implemented in various different forms. In order to more clearly describe the features of the embodiments, detailed descriptions of known matters to those skilled in the art are omitted. In the drawings, parts not relating to the description of the embodiments are omitted, and like parts are denoted by similar reference numerals throughout the specification.
명세서 전체에서, 어떤 구성이 다른 구성과 "연결"되어 있다고 할 때, 이는 '직접적으로 연결'되어 있는 경우뿐 아니라, '그 중간에 다른 구성을 사이에 두고 연결'되어 있는 경우도 포함한다. 또한, 어떤 구성이 어떤 구성을 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한, 그 외 다른 구성을 제외하는 것이 아니라 다른 구성들을 더 포함할 수도 있음을 의미한다.Throughout the specification, when a configuration is referred to as being "connected" to another configuration, it includes not only a case of being directly connected, but also a case of being connected with another configuration in between. In addition, when a configuration is referred to as "including ", it means that other configurations may be included, as well as other configurations, as long as there is no specially contradicted description.
이하 첨부된 도면을 참고하여 실시예들을 상세히 설명하기로 한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.
도 1은 일 실시예에 따른 문서 영역 분할 장치의 구성을 도시한 블록도이다.1 is a block diagram showing a configuration of a document area dividing apparatus according to an embodiment.
일 실시예에 따른 문서 영역 분할 장치는, 문서를 직접 촬영하고 촬영된 문서 영상의 영역을 분할하는 장치일 수 있다. 예를 들어, 문서 영역 분할 장치는 카메라를 구비하며 문서 영역 분할을 수행하기 위한 어플리케이션이 설치된 스마트폰 또는 태블릿 등의 단말일 수 있다.The document area dividing device according to an embodiment may be a device for directly photographing a document and dividing an area of the photographed document image. For example, the document area dividing device may be a terminal, such as a smart phone or a tablet, equipped with an application for performing document area division.
또는, 일 실시예에 따른 문서 영역 분할 장치는, 다른 장치로부터 문서 영상을 수신하고, 수신한 문서 영상의 영역을 분할하는 장치일 수 있다. 예를 들어, 문서 영역 분할 장치는 문서 영역 분할을 수행하기 위한 프로그램이 설치된 데스크탑 또는 노트북 등일 수 있다.Alternatively, the document area dividing device according to an embodiment may be a device for receiving a document image from another apparatus and dividing an area of the received document image. For example, the document area dividing device may be a desktop or a notebook installed with a program for performing document area dividing.
또는, 일 실시예에 따른 문서 영역 분할 장치는, 네트워크를 통해 사용자의 단말로부터 문서 영상을 수신하여 영역 분할을 수행하고, 그 결과를 다시 사용자의 단말로 전송하는 서버일 수도 있다.Alternatively, the document area dividing apparatus according to an exemplary embodiment may be a server that receives a document image from a user's terminal through a network, performs area division, and transmits the document image to the user's terminal.
도 1을 참조하면, 일 실시예에 따른 문서 영역 분할 장치(100)는 입출력부(110), 제어부(120), 저장부(130) 및 통신부(140)를 포함할 수 있다. 또한, 도 1에는 도시되지 않았지만, 문서 영역 분할 장치(100)는 촬영부를 더 포함할 수도 있다.1, the document
입출력부(110)는 사용자로부터 문서 영상의 처리와 관련된 입력을 수신하고, 문서 영상의 처리가 진행되는 상황 및 결과를 보여주는 화면을 표시할 수 있다. 예를 들어, 입출력부(110)는 사용자 입력을 수신하는 조작 패널(operation panel) 및 화면을 표시하는 디스플레이 패널(display panel) 등을 포함할 수 있다.The input /
구체적으로, 입력부는 키보드, 물리 버튼, 터치 스크린, 카메라 또는 마이크 등과 같이 다양한 형태의 사용자 입력을 수신할 수 있는 장치들을 포함할 수 있다. 또한, 출력부는 디스플레이 패널 또는 스피커 등을 포함할 수 있다. 다만, 이에 한정되지 않고 입출력부(110)는 다양한 입출력을 지원하는 구성을 포함할 수 있다.In particular, the input unit may include devices capable of receiving various types of user input, such as a keyboard, a physical button, a touch screen, a camera or a microphone. Also, the output unit may include a display panel or a speaker. However, the present invention is not limited to this, and the input /
제어부(120)는 문서 영역 분할 장치(100)의 전체적인 동작을 제어하며, CPU 등과 같은 프로세스를 포함할 수 있다. 일 실시예에 따르면, 제어부(120)는 적어도 하나의 프로세서를 포함할 수 있다. 제어부(120)는 저장부(130)에 저장된 프로그램을 실행시킴으로써 문서 영역을 분할하는 프로세스들을 수행할 수 있다.The
저장부(130)에는 파일, 어플리케이션 및 프로그램 등과 같은 다양한 종류의 데이터가 설치 및 저장될 수 있다. 일 실시예에 따르면, 저장부(130)에는 문서 영역 분할 방법을 수행하기 위한 프로그램이 설치될 수 있다.Various types of data such as files, applications, programs, and the like may be installed and stored in the
통신부(140)는 다른 디바이스 또는 네트워크와 유무선 통신을 수행할 수 있다. 이를 위해, 통신부(140)는 다양한 유무선 통신 방법 중 적어도 하나를 지원하는 통신 모듈을 포함할 수 있다. 예를 들어, 통신 모듈은 칩셋(chipset)의 형태로 구현될 수 있다. 일 실시예에 따르면, 통신부(140)는 다른 장치로부터 문서 영상을 수신할 수 있다.The
통신부(140)가 지원하는 무선 통신은, 예를 들어 Wi-Fi(Wireless Fidelity), Wi-Fi Direct, 블루투스(Bluetooth), UWB(Ultra Wide Band) 또는 NFC(Near Field Communication) 등일 수 있다. 또한, 통신부(140)가 지원하는 유선 통신은, 예를 들어 USB 또는 HDMI(High Definition Multimedia Interface) 등일 수 있다. 또한, 통신부(140)는 인터넷 또는 이동통신망을 통해 목적지에 데이터 또는 메시지 등을 전송할 수도 있다.The wireless communication supported by the
이하에서는 일 실시예에 따라 제어부(120)가 문서 영역을 분할하는 과정을 자세히 설명하도록 한다.Hereinafter, a process of dividing a document area by the
제어부(120)는 문서 영상으로부터 텍스트 영역 검출, 비텍스트 영역 검출 및 문서 경계 검출을 순서대로 수행할 수 있다.The
제어부(120)는 문서 영상에 포함되는 연결 요소(connected component)들을 군집화(clustering)하여 텍스트 라인 후보들을 검출하고, 검출된 텍스트 라인 후보들에 대해서, 서로 다른 두 개의 문턱값을 이용한 필터링을 수행함으로써 비텍스트 요소를 제거하여 텍스트 영역을 검출할 수 있다.The
이어서, 제어부(120)는 검출된 텍스트 라인 및 배경을 문서 영상에서 제거한 후, 반복 X-Y 컷(cut)을 수행함으로써 비텍스트 영역을 검출할 수 있다.Then, the
마지막으로, 제어부(120)는 검출된 비텍스트 영역을 미리 설정된 관심 영역과 비교함으로써 문서 경계를 검출할 수 있다.Finally, the
제어부(120)가 텍스트 영역을 검출하는 과정을 자세히 설명하면 다음과 같다.A process of detecting the text area by the
제어부(120)는 문서 영상으로부터 연결 요소들을 추출한다. 예를 들어, 제어부(120)는 레티넥스(Retinex) 이진화 방법을 이용하여 문서 영상을 이진화 영상으로 변환하고, 이진화 영상으로부터 연결 요소들을 추출할 수 있다. 또는, 제어부(120)는 MSER(Maximally Stable External Region) 알고리즘을 이용하여 블롭(blob)들을 추출하는 방식으로 연결 요소들을 추출할 수 있다.The
레티넥스 이진화 방법을 식으로 표현하면 아래의 수학식 1과 같다.The Retinex binarization method can be expressed by the following equation (1).
이때, B는 이진화 영상이고, I는 입력 영상이다. 또한, G·I는 입력 영상에 가우시안 필터링을 수행한 영상이고, k1은 문턱값이다.In this case, B is a binary image and I is an input image. Also, G · I is an image obtained by performing Gaussian filtering on the input image, and k 1 is a threshold value.
MSER 알고리즘은 주변의 인접한 픽셀들과 강도(intensity)가 상이한 픽셀들의 집합 영역을 블롭(blob)으로 검출하는 알고리즘이다.The MSER algorithm is an algorithm for blobly detecting an aggregate region of pixels having different intensities from neighboring neighboring pixels.
제어부(120)는 이진화 알고리즘 또는 MSER 알고리즘을 통해 추출된 연결 요소들에 필터링을 수행함으로써, 비텍스트에 해당되는 연결 요소들을 제거하고, 텍스트에 해당될 가능성이 높은 연결 요소들만을 추출할 수 있다. 예를 들어, 제어부(120)는 8방향의 이웃 픽셀들 중에서 전경값을 갖는 픽셀들끼리 연결하고, 연결된 픽셀들을 아래와 같은 방식으로 필터링할 수 있다.The
우선, 하나로 연결된 연결 요소들의 픽셀 개수를 N이라고 하면, 아래의 수학식 2와 같이 표현할 수 있고, 이때 C의 공분산 행렬을 아래의 수학식 3과 같이 분해할 수 있다.First, if the number of pixels of the connected connection elements is N, the following equation (2) can be obtained. In this case, the covariance matrix of C can be decomposed as shown in Equation (3) below.
이때, 는 고유값 및 고유벡터이다.At this time, Are eigenvalues and eigenvectors.
텍스트에 해당되는 연결 요소의 경우 보통 고유값들의 곱으로 표현되는 영역에 비해 픽셀 개수의 비율이 높고, 고유값들의 비율이 크지 않다. 따라서, 이러한 성질을 이용하여 아래의 수학식 4 및 수학식 5를 만족하는 연결 요소들을 필터링함으로써, 비텍스트에 해당되는 연결 요소들을 최대한 제거할 수 있다.In the case of a link element corresponding to text, the ratio of the number of pixels is higher and the ratio of the eigenvalues is not larger than the area represented by the product of the eigenvalues. Therefore, by filtering the connection elements satisfying the following equations (4) and (5) using this property, the connection elements corresponding to the non-text can be removed as much as possible.
이때, 는 문턱값에 해당된다.At this time, Corresponds to the threshold value.
제어부(120)는 필터링되고 남은 연결 요소들을 군집화하고, 텍스트 라인 후보들을 검출할 수 있다. 먼저, 제어부(120)는 같은 문단에 포함되는 텍스트들은 서로 비슷한 속성을 가지고 있다는 점을 이용하여 연결 요소들의 군집화를 수행할 수 있다. 예를 들어, 제어부(120)는 각 연결 요소들의 색 거리(color distance), 획 굵기(stroke width) 비율, 경계 박스(bounding box) 둘레의 비율, 세로 방향 또는 가로 방향으로 동일 선상에 놓여 있는지 여부 등에 기초하여 연결 요소들을 유사한 속성을 가지는 것들끼리 군집화할 수 있다.The
도 2에는 일 실시예에 따른 문서 영상을 도시하였다. 그리고, 도 3에는 도 2의 문서 영상에서 MSER 알고리즘을 적용하고, 연결 요소들을 추출하여 군집화를 수행한 결과 영상을 도시하였다. 도 3을 참조하면, 문서 영상(300)에 포함된 연결 요소들 중 비슷한 속성을 갖는 연결 요소들이 하나의 군집(301)을 형성하고 있음을 확인할 수 있다. 이때, 동일한 색상의 연결 요소들이 동일한 군집에 포함되는 것인데, 설명의 편의를 위해 일부 다른 색상의 연결 요소들이 포함되더라도 직사각형 형태로 군집(301)의 경계를 설정하였다.FIG. 2 shows a document image according to an embodiment. FIG. 3 shows an image obtained by applying the MSER algorithm in the document image of FIG. 2, extracting connection elements, and performing clustering. Referring to FIG. 3, it can be seen that the connection elements having similar attributes among the connection elements included in the
연결 요소들의 군집화가 완료된 후, 제어부(120)는 군집들에 대해서 투사(projection)를 수행하여 텍스트 라인 후보들을 검출할 수 있다. 예를 들어, 제어부(120)는 각각의 군집들에 대해서 세로 방향 및 가로 방향 중 적어도 한 방향으로 투사를 수행함으로써, 각각의 군집을 텍스트 문단 및 텍스트 라인에 해당되는 작은 군집들로 나누고, 텍스트 라인에 해당되는 작은 군집들을 텍스트 라인 후보들로 검출할 수 있다.After the clustering of the connection elements is completed, the
예로 든 문서 영상의 경우, 텍스트 문단은 컬럼(column) 단위로 나누어져 있다. 따라서, 제어부(120)는 군집화가 완료된 도 3의 문서 영상(300)에서 각 군집에 세로 방향으로 투사를 수행하고, 그 결과 각 군집에 포함된 연결 요소의 평균 획 굵기의 일정 배수(e.g. 4배) 이상 큰 틈이 존재한다면, 이를 문단이 나누어지는 경계로 보고, 틈을 경계로 작은 군집들로 분리할 수 있다. 도 4에는 도 3에 도시된 문서 영상(300)에서 각 군집에 세로 방향으로 투사를 수행함으로써, 군집을 텍스트 문단 단위의 작은 군집들로 분리한 결과를 도시하였다. 도 4의 문서 영상(400)을 참조하면, 도 3에서 하나의 군집(301)을 구성하던 연결 요소들이, 작은 두 개의 군집들(401, 402)로 분리되었음을 알 수 있다. 두 군집들(401, 402) 사이의 틈의 길이(d1)가 연결 요소의 평균 획 굵기의 일정 배수 이상이므로, 제어부(120)는 두 연결 요소들을 서로 다른 군집으로 분리하였다.In the example document image, the text paragraphs are divided into columns. Accordingly, the
제어부(120)는 이어서 도 4에 도시된 문서 영상(400)에서 각 군집에 가로 방향으로 투사를 수행함으로써, 각각의 군집을 텍스트 라인 단위의 더 작은 군집으로 분리할 수 있다. 예를 들어, 제어부(120)는 텍스트 문단 단위로 군집이 나누어진 도 4의 문서 영상(400)에서 각 군집에 가로 방향으로 투사를 수행하고, 그 결과 각 군집에 포함된 연결 요소의 평균 획 굵기의 일정 배수(e.g. 0.5배)보다 작은 틈이 있다면, 이를 텍스트 라인이 나누어지는 경계로 보고, 틈을 경계로 작은 군집들로 분리할 수 있다. 도 5에는 도 4에 도시된 문서 영상(400)에서 각 군집에 가로 방향으로 투사를 수행함으로써, 군집을 텍스트 라인 단위의 작은 군집들(501, 502)로 분리한 결과를 도시하였다. 도 5의 문서 영상(500)을 참조하면, 도 4에서 하나의 군집(402)을 구성하던 연결 요소들 중 일부가, 작은 두 개의 군집들(501, 502)로 분리되었음을 알 수 있다. 두 군집들(501, 502) 사이의 틈의 길이(d2)가 연결 요소의 평균 획 굵기의 일정 배수 보다 작으므로, 제어부(120)는 두 연결 요소들을 서로 다른 군집으로 분리하였다.The
한편, 도 2에 도시된 문서 영상의 경우, 텍스트 문단이 컬럼 단위로 나누어져 있어 제어부(120)는 세로 방향 및 가로 방향의 투사를 모두 수행함으로써 텍스트 문단 및 텍스트 라인을 분리하였으나, 만약 로우(row) 단위로 텍스트 문단이 나누어진 경우라면 가로 방향의 투사만을 수행함으로써 텍스트 문단 및 텍스트 라인에 해당되는 작은 군집들로 나눌 수 있다. 예를 들어, 제어부(120)는 연결 요소들이 군집화된 문서 영상에서 각 군집에 가로 방향의 투사를 수행하고, 그 결과 확인된 틈들의 너비를 연결 요소의 평균 획 굵기와 비교함으로써, 확인된 틈들 각각이 문단을 나누는 경계인지 또는 라인을 나누는 경계인지를 판단할 수 있다.On the other hand, in the case of the document image shown in FIG. 2, since the text paragraphs are divided into columns, the
제어부(120)는 텍스트 라인 후보들을 검출하였으면, 텍스트 라인 후보들에 분류기를 이용한 필터링을 수행하여 비텍스트 요소들을 제거하고, 텍스트 라인들을 검출할 수 있다. 이때, 제어부(120)는 2개의 문턱값을 갖는 분류기를 이용함으로써 비텍스트 요소를 제거함에 있어서 정확도를 높일 수 있다.When the
일 실시예에 따르면, 제어부(120)는 2개의 문턱값을 갖는 MLP(Multi- Layer Perceptron) 분류기(classifier)를 이용하여, 텍스트 라인 후보들 중에서 비텍스트 요소들을 제거할 수 있다. 먼저, 제어부(120)는 2개의 문턱값 중 낮은 문턱값을 이용한 필터링을 수행함으로써, 일부 비텍스트 요소가 남더라도 최대한 텍스트 라인이 제거되는 것을 방지하면서 비텍스트 요소를 제거한다. 즉, 제어부(120)는 낮은 문턱값을 이용하여 1차 필터링을 수행한다.According to one embodiment, the
1차 필터링을 수행한 결과 남은 텍스트 라인 후보들에 대해서, 제어부(120)는 군집화를 수행한다. 하나의 문단에서는 텍스트 라인들의 높이와 텍스트 라인 사이의 간격이 일정하다는 성질에 기초하여, 제어부(120)는 남은 텍스트 라인 후보들을 군집화하여 문단으로 만든다.The
이러한 군집화를 수행했음에도 문단에 포함되지 못하고 여전히 하나씩 남아있는 텍스트 라인 후보가 있다면, 제어부(120)는 하나씩 남아있는 텍스트 라인 후보에 대해서 2개의 문턱값 중 높은 문턱값을 이용하여 2차 필터링을 수행한다.If there are still text line candidates that are not included in the paragraph even though the clustering has been performed, the
제어부(120)는 2차 필터링을 수행한 후에 남아있는 텍스트 라인 후보들을 텍스트 라인으로 검출하고, 텍스트 라인을 포함하는 영역을 텍스트 영역으로 검출할 수 있다.The
도 5의 문서 영상(500)에서 추출된 텍스트 라인 후보들 중에서, 비텍스트 요소가 제거되고 텍스트 라인이 검출된 결과를 도 6에 도시하였다. 도 6의 문서 영상(600)은 텍스트 라인만을 포함하고 있다.Among the text line candidates extracted from the
텍스트 영역의 검출이 완료되었으면, 제어부(120)는 비텍스트 영역을 검출한다. 제어부(120)가 비텍스트 영역을 검출하는 과정을 자세히 설명하면 다음과 같다.When the detection of the text area is completed, the
제어부(120)는 문서 영상을 이진화한 영상으로부터, 앞서 검출된 텍스트 영역을 제거한다. 이때, 남은 전경 픽셀들, 즉 연결 요소들은 비텍스트 영역에 포함될 가능성이 높다. 하지만, 하드카피 문서를 카메라로 촬영한 경우라면 문서 영상에 문서 이외의 배경이 포함되어 있을 수 있으므로, 남은 연결 요소들 중 일부는 배경에 해당될 수도 있다. 따라서, 배경에 해당되는 연결 요소들을 제거하기 위해 다음과 같은 작업이 필요하다.The
우선, 제어부(120)는 문서 영상 중 적어도 일부를 관심 영역으로 미리 설정하고, 앞서 검출된 텍스트 라인들에 기초하여 관심 영역의 크기를 조절한다. 이때, 제어부(120)는 전체의 문서 영상 중에서 문서에 해당될 가능성이 높은 영역을 관심 영역의 초기값으로 설정할 수 있다. 제어부(120)는 검출된 텍스트 라인 중 일부가 미리 설정된 관심 영역의 외부에 존재한다면, 관심 영역이 그 텍스트 라인을 포함하게 되도록 관심 영역을 확장한다.First, the
이렇게 관심 영역의 크기가 조절되면, 제어부(120)는 관심 영역의 경계에 걸쳐서 존재하는 연결 요소가 있는지 확인한다. 관심 영역의 경계에 걸쳐서 존재하는 연결 요소가 있다면, 제어부(120)는 해당 연결 요소에 포함된 픽셀들 중에서 관심 영역의 내부에 존재하는 픽셀의 수와 관심 영역의 외부에 존재하는 픽셀의 수를 비교한다. 만약, 관심 영역의 내부에 존재하는 픽셀의 수가 관심 영역의 외부에 존재하는 픽셀의 수보다 많다면, 해당 연결 요소는 배경이 아닌 문서의 비텍스트 영역에 해당될 가능성이 높으므로 제어부(120)는 해당 연결 요소를 남겨둔다. 하지만, 관심 영역의 외부에 존재하는 픽셀의 수가 관심 영역의 내부에 존재하는 픽셀의 수보다 많다면, 해당 연결 요소는 배경에 해당될 가능성이 높으므로 제어부(120)는 해당 연결 요소를 제거한다.When the size of the ROI is adjusted, the
이와 같이 배경에 해당될 가능성이 높은 연결 요소들을 문서 영상에서 제거한 후, 제어부(120)는 남은 연결 요소들에 대해서 반복 X-Y 컷(cut)을 수행함으로써 비텍스트 영역을 검출한다. 예를 들어, 제어부(120)는 텍스트 영역 및 배경에 해당될 가능성이 높은 연결 요소들이 제거된 문서 영상에 가로 방향 및 세로 방향으로 투사한 결과 얻은 히스토그램에서, 연결 요소들 사이의 연속된 0의 개수가 미리 설정된 문턱값 이하라면 연결 요소들을 하나의 비텍스트 영역으로 검출한다. 반대로, 연결 요소들 사이의 연속된 0의 개수가 문턱값보다 크다면, 제어부(120)는 연결 요소들을 각각 별도의 비텍스트 영역으로 검출한다. 문턱값의 크기를 적절하게 조절함으로써 효과적으로 비텍스트 영역을 검출할 수 있다.After removing the connection elements that are likely to correspond to the background in the document image, the
비텍스트 영역의 검출이 완료되었으면, 제어부(120)는 문서 경계를 검출할 수 있다. 제어부(120)가 문서 경계를 검출하는 과정을 자세히 설명하면 다음과 같다.When the detection of the non-text area is completed, the
제어부(120)는 검출된 비텍스트 영역을 미리 설정된 관심 영역과 비교한다. 제어부(120)는 관심 영역의 외부에 존재하는 비텍스트 영역이 있다면, 관심 영역을 확장하여 관심 영역 내부에 비텍스트 영역이 들어오도록 한다. 문서 영상에 포함된 모든 비텍스트 영역이 관심 영역 내부에 존재하게 되었다면, 제어부(120)는 관심 영역의 경계를 문서 경계로 검출한다.The
문서 영상으로부터 텍스트 영역 및 비텍스트 영역을 분할하고, 문서 경계를 검출한 예를 도 7에 도시하였다. 도 7을 참조하면, 문서 영상(700)에서 텍스트 영역(701) 및 비텍스트 영역(702)이 분할되었다. 또한, 텍스트 영역(701) 및 비텍스트 영역(702)을 포함하고, 배경은 제외하도록 문서 경계(703)가 검출되었다.An example in which a text region and a non-text region are divided from a document image and a document boundary is detected is shown in Fig. 7, in the
이와 같이 일 실시예에 따른 문서 영역 분할 장치(100)를 이용하면, 문서 영상에 포함된 연결 요소들을 군집화한 후 투사를 수행함으로써, 복잡한 레이아웃을 갖는 문서 영상에 대해서도 텍스트 라인을 정확하게 검출할 수 있다. 또한, 2개의 서로 다른 문턱값을 이용하는 분류기를 적용함으로써 비텍스트 요소를 제거함에 있어서도 정확도를 높일 수 있다. 또한, 초기값으로 주어지는 관심 영역과 검출된 비텍스트 영역을 비교하여 문서 경계를 검출함으로써, 문서 경계 검출의 정확도를 높일 수 있다.By using the document
도 8은 일 실시예에 따른 문서 영역 분할 방법을 설명하기 위한 순서도이다.8 is a flowchart for explaining a document area dividing method according to an embodiment.
도 8에 도시된 실시예에 따른 문서 영역 분할 방법은 도 1에 도시된 문서 영역 분할 장치(100)에서 시계열적으로 처리되는 단계들을 포함한다. 따라서, 이하에서 생략된 내용이라고 하더라도 도 1에 도시된 문서 영역 분할 장치(100)에 관하여 이상에서 기술한 내용은 도 8에 도시된 실시예에 따른 문서 영역 분할 방법에도 적용될 수 있다.The document area dividing method according to the embodiment shown in FIG. 8 includes the steps of time-series processing in the document
도 8을 참조하면, 801 단계에서 문서 영상에 포함되는 연결 요소들을 군집화하여 텍스트 라인 후보들을 검출한다. 구체적으로는, 문서 영상에 앞서 설명한 이진화 알고리즘 또는 MSER 알고리즘을 적용하여 연결 요소들을 추출하고, 추출된 연결 요소들을 군집화한다. 이어서,연결 요소의 각 군집에 대해서, 가로 방향 및 세로 방향 중 적어도 하나의 방향으로 투사함으로써, 텍스트 라인 후보들을 검출할 수 있다.Referring to FIG. 8, in
또한 이때, 문서 영상으로부터 연결 요소들을 추출함에 있어서, 문서 영상에 이진화 알고리즘 또는 MSER 알고리즘을 적용하여 추출된 연결 요소들에 대해서, 고유값 및 픽셀 개수에 기초하여 필터링을 수행함으로써 비텍스트 요소를 제거한 후, 남은 연결 요소들만을 추출할 수 있다.At this time, in extracting the connection elements from the document image, filtering is performed on the extracted connection elements by applying a binarization algorithm or MSER algorithm to the document image based on the eigenvalue and the number of pixels, thereby removing non-text elements , Only the remaining connection elements can be extracted.
또한 이때, 텍스트 라인 후보들을 검출함에 있어서, 군집에 포함된 연결 요소 사이의 여백의 너비와 연결 요소의 평균 획 굵기를 비교한 결과에 따라 군집을 복수의 세부 군집들로 나누고, 세부 군집들을 텍스트 라인 후보들로 검출할 수 있다.In this case, when the text line candidates are detected, the cluster is divided into a plurality of detailed clusters according to the result of comparing the width of the margins between the connection elements included in the clusters and the average stroke width of the connecting elements, It can be detected as candidates.
이어서 802 단계에서는 검출된 텍스트 라인 후보들에 대해서 서로 다른 두 개의 문턱값을 이용한 필터링을 수행함으로써, 비텍스트 요소를 제거하고 텍스트 라인을 검출할 수 있다. 구체적으로는, 텍스트 라인 후보들에 대해서, 제1 문턱값을 이용한 필터링을 수행하여 비텍스트 요소를 제거하고, 남은 텍스트 라인 후보들을 문단으로 군집화하며, 남은 텍스트 라인 후보들 중 문단으로 군집화되지 않은 텍스트 라인 후보들에 대해서, 제1 문턱값보다 큰 제2 문턱값을 이용한 필터링을 수행하여 비텍스트 요소를 제거하고, 남은 텍스트 라인 후보들을 텍스트 라인을 검출할 수 있다.Next, in
803 단계에서는 검출된 텍스트 라인을 문서 영상에서 제거한 후, 반복 X-Y 컷을 수행함으로써 비텍스트 영역을 검출할 수 있다. 구체적으로는, 문서 영상에서 검출된 텍스트 라인을 제거하고, 검출된 텍스트 라인에 기초하여 관심 영역을 조절하고, 관심 영역의 경계에 걸쳐서 존재하는 연결 요소들이 배경에 해당되는지를 판단하고, 배경으로 판단된 연결 요소들을 제거하고, 남은 연결 요소들에 대해서 반복 X-Y 컷을 수행함으로써 비텍스트 영역을 검출할 수 있다.In
804 단계에서는 검출된 비텍스트 영역을 관심 영역과 비교함으로써 문서 경계를 검출할 수 있다. 구체적으로는, 비텍스트 영역이 관심 영역의 외부에도 존재한다면, 관심 영역의 내부에 비텍스트 영역이 포함되도록 관심 영역을 확장하고, 확장된 관심 영역의 경계를 문서 경계로 결정할 수 있다.In
이상의 실시예들에서 사용되는 '~부'라는 용어는 소프트웨어 또는 FPGA(field programmable gate array) 또는 ASIC 와 같은 하드웨어 구성요소를 의미하며, '~부'는 어떤 역할들을 수행한다. 그렇지만 '~부'는 소프트웨어 또는 하드웨어에 한정되는 의미는 아니다. '~부'는 어드레싱할 수 있는 저장 매체에 있도록 구성될 수도 있고 하나 또는 그 이상의 프로세서들을 재생시키도록 구성될 수도 있다. 따라서, 일 예로서 '~부'는 소프트웨어 구성요소들, 객체지향 소프트웨어 구성요소들, 클래스 구성요소들 및 태스크 구성요소들과 같은 구성요소들과, 프로세스들, 함수들, 속성들, 프로시저들, 서브루틴들, 프로그램특허 코드의 세그먼트들, 드라이버들, 펌웨어, 마이크로코드, 회로, 데이터, 데이터베이스, 데이터 구조들, 테이블들, 어레이들, 및 변수들을 포함한다.The term " part " used in the above embodiments means a hardware component such as a software or a field programmable gate array (FPGA) or an ASIC, and the 'part' performs certain roles. However, 'part' is not meant to be limited to software or hardware. &Quot; to " may be configured to reside on an addressable storage medium and may be configured to play one or more processors. Thus, by way of example, 'parts' may refer to components such as software components, object-oriented software components, class components and task components, and processes, functions, , Subroutines, segments of program patent code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, and variables.
구성요소들과 '~부'들 안에서 제공되는 기능은 더 작은 수의 구성요소들 및 '~부'들로 결합되거나 추가적인 구성요소들과 '~부'들로부터 분리될 수 있다.The functions provided within the components and components may be combined with a smaller number of components and components or separated from additional components and components.
뿐만 아니라, 구성요소들 및 '~부'들은 디바이스 또는 보안 멀티미디어카드 내의 하나 또는 그 이상의 CPU 들을 재생시키도록 구현될 수도 있다.In addition, the components and components may be implemented to play back one or more CPUs in a device or a secure multimedia card.
도 8을 통해 설명된 실시예에 따른 문서 영역 분할 방법은 컴퓨터에 의해 실행 가능한 명령어 및 데이터를 저장하는, 컴퓨터로 판독 가능한 매체의 형태로도 구현될 수 있다. 이때, 명령어 및 데이터는 프로그램 코드의 형태로 저장될 수 있으며, 프로세서에 의해 실행되었을 때, 소정의 프로그램 모듈을 생성하여 소정의 동작을 수행할 수 있다. 또한, 컴퓨터로 판독 가능한 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터로 판독 가능한 매체는 컴퓨터 기록 매체일 수 있는데, 컴퓨터 기록 매체는 컴퓨터 판독 가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함할 수 있다. 예를 들어, 컴퓨터 기록 매체는 HDD 및 SSD 등과 같은 마그네틱 저장 매체, CD, DVD 및 블루레이 디스크 등과 같은 광학적 기록 매체, 또는 네트워크를 통해 접근 가능한 서버에 포함되는 메모리일 수 있다.The document area segmentation method according to the embodiment described with reference to FIG. 8 can also be implemented in the form of a computer-readable medium for storing instructions and data executable by a computer. At this time, the command and data may be stored in the form of program code, and when executed by the processor, a predetermined program module may be generated to perform a predetermined operation. In addition, the computer-readable medium can be any available media that can be accessed by a computer and includes both volatile and nonvolatile media, removable and non-removable media. The computer-readable medium can also be a computer storage medium, which can be volatile and non-volatile, implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, Volatile, removable and non-removable media. For example, the computer recording medium may be a magnetic storage medium such as an HDD and an SSD, an optical recording medium such as a CD, a DVD and a Blu-ray Disc, or a memory included in a server accessible via a network.
또한 도 8을 통해 설명된 실시예에 따른 문서 영역 분할 방법은 컴퓨터에 의해 실행 가능한 명령어를 포함하는 컴퓨터 프로그램(또는 컴퓨터 프로그램 제품)으로 구현될 수도 있다. 컴퓨터 프로그램은 프로세서에 의해 처리되는 프로그래밍 가능한 기계 명령어를 포함하고, 고레벨 프로그래밍 언어(High-level Programming Language), 객체 지향 프로그래밍 언어(Object-oriented Programming Language), 어셈블리 언어 또는 기계 언어 등으로 구현될 수 있다. 또한 컴퓨터 프로그램은 유형의 컴퓨터 판독가능 기록매체(예를 들어, 메모리, 하드디스크, 자기/광학 매체 또는 SSD(Solid-State Drive) 등)에 기록될 수 있다. The document area dividing method according to the embodiment described with reference to FIG. 8 may also be implemented as a computer program (or a computer program product) including instructions executable by a computer. A computer program includes programmable machine instructions that are processed by a processor and can be implemented in a high-level programming language, an object-oriented programming language, an assembly language, or a machine language . The computer program may also be recorded on a computer readable recording medium of a type (e.g., memory, hard disk, magnetic / optical medium or solid-state drive).
따라서 도 8을 통해 설명된 실시예에 따른 문서 영역 분할 방법은 상술한 바와 같은 컴퓨터 프로그램이 컴퓨팅 장치에 의해 실행됨으로써 구현될 수 있다. 컴퓨팅 장치는 프로세서와, 메모리와, 저장 장치와, 메모리 및 고속 확장포트에 접속하고 있는 고속 인터페이스와, 저속 버스와 저장 장치에 접속하고 있는 저속 인터페이스 중 적어도 일부를 포함할 수 있다. 이러한 성분들 각각은 다양한 버스를 이용하여 서로 접속되어 있으며, 공통 머더보드에 탑재되거나 다른 적절한 방식으로 장착될 수 있다.Therefore, the document area dividing method according to the embodiment described with reference to FIG. 8 can be implemented by the computer program as described above being executed by the computing device. The computing device may include a processor, a memory, a storage device, a high speed interface connected to the memory and the high speed expansion port, and a low speed interface connecting the low speed bus and the storage device. Each of these components is connected to each other using a variety of buses and can be mounted on a common motherboard or mounted in any other suitable manner.
여기서 프로세서는 컴퓨팅 장치 내에서 명령어를 처리할 수 있는데, 이런 명령어로는, 예컨대 고속 인터페이스에 접속된 디스플레이처럼 외부 입력, 출력 장치상에 GUI(Graphic User Interface)를 제공하기 위한 그래픽 정보를 표시하기 위해 메모리나 저장 장치에 저장된 명령어를 들 수 있다. 다른 실시예로서, 다수의 프로세서 및(또는) 다수의 버스가 적절히 다수의 메모리 및 메모리 형태와 함께 이용될 수 있다. 또한 프로세서는 독립적인 다수의 아날로그 및(또는) 디지털 프로세서를 포함하는 칩들이 이루는 칩셋으로 구현될 수 있다.Where the processor may process instructions within the computing device, such as to display graphical information to provide a graphical user interface (GUI) on an external input, output device, such as a display connected to a high speed interface And commands stored in memory or storage devices. As another example, multiple processors and / or multiple busses may be used with multiple memory and memory types as appropriate. The processor may also be implemented as a chipset comprised of chips comprising multiple independent analog and / or digital processors.
또한 메모리는 컴퓨팅 장치 내에서 정보를 저장한다. 일례로, 메모리는 휘발성 메모리 유닛 또는 그들의 집합으로 구성될 수 있다. 다른 예로, 메모리는 비휘발성 메모리 유닛 또는 그들의 집합으로 구성될 수 있다. 또한 메모리는 예컨대, 자기 혹은 광 디스크와 같이 다른 형태의 컴퓨터 판독 가능한 매체일 수도 있다.The memory also stores information within the computing device. In one example, the memory may comprise volatile memory units or a collection thereof. In another example, the memory may be comprised of non-volatile memory units or a collection thereof. The memory may also be another type of computer readable medium such as, for example, a magnetic or optical disk.
그리고 저장장치는 컴퓨팅 장치에게 대용량의 저장공간을 제공할 수 있다. 저장 장치는 컴퓨터 판독 가능한 매체이거나 이런 매체를 포함하는 구성일 수 있으며, 예를 들어 SAN(Storage Area Network) 내의 장치들이나 다른 구성도 포함할 수 있고, 플로피 디스크 장치, 하드 디스크 장치, 광 디스크 장치, 혹은 테이프 장치, 플래시 메모리, 그와 유사한 다른 반도체 메모리 장치 혹은 장치 어레이일 수 있다.And the storage device can provide a large amount of storage space to the computing device. The storage device may be a computer readable medium or a configuration including such a medium and may include, for example, devices in a SAN (Storage Area Network) or other configurations, and may be a floppy disk device, a hard disk device, Or a tape device, flash memory, or other similar semiconductor memory device or device array.
상술된 실시예들은 예시를 위한 것이며, 상술된 실시예들이 속하는 기술분야의 통상의 지식을 가진 자는 상술된 실시예들이 갖는 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 상술된 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.It will be apparent to those skilled in the art that the above-described embodiments are for illustrative purposes only and that those skilled in the art will readily understand that other embodiments can be readily modified without departing from the spirit or essential characteristics of the embodiments described above You will understand. It is therefore to be understood that the above-described embodiments are to be considered in all respects only as illustrative and not restrictive. For example, each component described as a single entity may be distributed and implemented, and components described as being distributed may also be implemented in a combined form.
본 명세서를 통해 보호 받고자 하는 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태를 포함하는 것으로 해석되어야 한다.It is to be understood that the scope of the present invention is defined by the appended claims rather than the foregoing description and should be construed as including all changes and modifications that come within the meaning and range of equivalency of the claims, .
100: 문서 영역 분할 장치 110: 입출력부
120: 제어부 130: 저장부
140: 통신부100: Document area dividing device 110: Input /
120: control unit 130:
140:
Claims (16)
문서 영상에 포함되는 연결 요소들을 군집화(clustering)하여 텍스트 라인 후보들을 검출하는 단계;
상기 검출된 텍스트 라인 후보들에 대해서, 서로 다른 두 개의 문턱값을 이용한 필터링을 수행함으로써, 비텍스트 요소를 제거하고 텍스트 라인을 검출하는 단계;
상기 검출된 텍스트 라인을 상기 문서 영상에서 제거한 후, 반복 X-Y 컷(cut)을 수행함으로써 비텍스트 영역을 검출하는 단계; 및
상기 검출된 비텍스트 영역을 관심 영역과 비교함으로써 문서 경계를 검출하는 단계를 포함하는 방법.A document area dividing method,
Clustering connection elements included in a document image to detect text line candidates;
Removing the non-text elements and detecting a text line by performing filtering using two different threshold values for the detected text line candidates;
Detecting a non-text area by removing the detected text line from the document image and then performing a repeated X-Y cut; And
Detecting the document boundary by comparing the detected non-text region with a region of interest.
상기 텍스트 라인 후보들을 검출하는 단계는,
상기 문서 영상에 이진화 알고리즘 또는 MSER(Maximally Stable External Region) 알고리즘을 적용하여 연결 요소들을 추출하는 단계;
상기 추출된 연결 요소들을 군집화하는 단계; 및
상기 연결 요소의 각 군집(cluster)에 대해서, 가로 방향 및 세로 방향 중 적어도 하나의 방향으로 투사(projection)함으로써, 상기 텍스트 라인 후보들을 검출하는 단계를 포함하는 것을 특징으로 하는 방법.The method according to claim 1,
Wherein the step of detecting the text line candidates comprises:
Extracting connection elements by applying a binarization algorithm or an MSER (Maximally Stable External Region) algorithm to the document image;
Clustering the extracted connection elements; And
Detecting the text line candidates by projecting in at least one of a horizontal direction and a vertical direction for each cluster of the connecting element.
상기 연결 요소들을 추출하는 단계는,
상기 문서 영상에 상기 이진화 알고리즘 또는 MSER 알고리즘을 적용하여 추출된 연결 요소들에 대해서, 고유값 및 픽셀 개수에 기초하여 필터링을 수행함으로써 비텍스트 요소를 제거한 후, 남은 연결 요소들만을 추출하는 것을 특징으로 하는 방법.3. The method of claim 2,
Wherein the extracting of the coupling elements comprises:
Filtering the extracted connection elements based on the eigenvalues and the number of pixels by applying the binarization algorithm or the MSER algorithm to the document image to remove the non-text elements, and then extracting only the remaining connection elements. How to.
상기 텍스트 라인 후보들을 검출하는 단계는,
상기 군집에 포함된 연결 요소 사이의 여백의 너비와 상기 연결 요소의 평균 획 굵기를 비교한 결과에 따라 상기 군집을 복수의 세부 군집들로 나누고, 상기 세부 군집들을 텍스트 라인 후보들로 검출하는 것을 특징으로 하는 방법.3. The method of claim 2,
Wherein the step of detecting the text line candidates comprises:
Dividing the cluster into a plurality of detailed clusters according to a result of comparing a width of a margin between connection elements included in the cluster and an average stroke of the connection element, and detecting the detailed clusters as text line candidates. How to.
상기 텍스트 라인을 검출하는 단계는,
상기 텍스트 라인 후보들에 대해서, 제1 문턱값을 이용한 필터링을 수행하여 비텍스트 요소를 제거하고, 남은 텍스트 라인 후보들을 문단으로 군집화하는 단계; 및
상기 남은 텍스트 라인 후보들 중 문단으로 군집화되지 않은 텍스트 라인 후보들에 대해서, 상기 제1 문턱값보다 큰 제2 문턱값을 이용한 필터링을 수행하여 비텍스트 요소를 제거하고, 남은 텍스트 라인 후보들을 텍스트 라인으로 검출하는 단계를 포함하는 것을 특징으로 하는 방법.The method according to claim 1,
Wherein the step of detecting the text line comprises:
Performing filtering using the first threshold value for the text line candidates to remove non-text elements, and grouping the remaining text line candidates into paragraphs; And
Performing filtering using a second threshold value larger than the first threshold value for text line candidates not grouped into paragraphs of the remaining text line candidates to remove non-text elements, and detecting remaining text line candidates as text lines ≪ / RTI >
상기 비텍스트 영역을 검출하는 단계는,
상기 문서 영상에서 검출된 텍스트 라인을 제거하는 단계;
상기 검출된 텍스트 라인에 기초하여, 상기 관심 영역을 조절하는 단계;
상기 관심 영역의 경계에 걸쳐서 존재하는 연결 요소들이 배경에 해당되는지를 판단하는 단계;
배경으로 판단된 연결 요소를 제거하는 단계; 및
남은 연결 요소들에 대해서 반복 X-Y 컷을 수행하는 단계를 포함하는 것을 특징으로 하는 방법.The method according to claim 1,
Wherein the detecting the non-text area comprises:
Removing a text line detected in the document image;
Adjusting the region of interest based on the detected text line;
Determining whether connection elements existing over a boundary of the ROI correspond to a background;
Removing a connection element determined as a background; And
And performing an iterative XY cut on the remaining connection elements.
상기 문서 경계를 검출하는 단계는,
상기 비텍스트 영역이 상기 관심 영역의 외부에도 존재한다면, 상기 관심 영역의 내부에 상기 비텍스트 영역이 포함되도록 상기 관심 영역을 확장하는 단계; 및
상기 확장된 관심 영역의 경계를 문서 경계로 결정하는 단계를 포함하는 것을 특징으로 하는 방법.The method according to claim 1,
Wherein the step of detecting the document boundary comprises:
Expanding the region of interest such that the non-text region is included within the region of interest if the non-text region is also outside the region of interest; And
And determining the boundaries of the extended region of interest as document boundaries.
문서 영상의 처리와 관련된 입력을 수신하고, 문서 영상의 처리가 진행되는 상황 및 결과를 보여주기 위한 입출력부;
문서 영역 분할을 수행하기 위한 프로그램이 저장되는 저장부; 및
상기 프로그램을 실행함으로써 상기 문서 영상의 영역 분할을 수행하는 제어부를 포함하며,
상기 제어부는, 상기 문서 영상에 포함되는 연결 요소들을 군집화(clustering)하여 텍스트 라인 후보들을 검출하고, 상기 검출된 텍스트 라인 후보들에 대해서, 서로 다른 두 개의 문턱값을 이용한 필터링을 수행함으로써, 비텍스트 요소를 제거하고 텍스트 라인을 검출하며, 상기 검출된 텍스트 라인을 상기 문서 영상에서 제거한 후, 반복 X-Y 컷(cut)을 수행함으로써 비텍스트 영역을 검출하고, 상기 검출된 비텍스트 영역을 관심 영역과 비교함으로써 문서 경계를 검출하는, 장치.A document area dividing device comprising:
An input / output unit for receiving an input related to processing of a document image and for displaying a status and a result of processing of the document image;
A storage unit for storing a program for performing document area division; And
And a control unit for performing area division of the document image by executing the program,
The control unit detects text line candidates by clustering connection elements included in the document image and performs filtering using the two threshold values different from each other for the detected text line candidates, Detects a text line, removes the detected text line from the document image, and then performs a repetitive XY cut to detect the non-text area, and compares the detected non-text area with the area of interest Detecting a document boundary.
상기 제어부는,
상기 문서 영상에 이진화 알고리즘 또는 MSER(Maximally Stable External Region) 알고리즘을 적용하여 연결 요소들을 추출하고, 상기 추출된 연결 요소들을 군집화하고, 상기 연결 요소의 각 군집(cluster)에 대해서 가로 방향 및 세로 방향 중 적어도 하나의 방향으로 투사(projection)함으로써, 상기 텍스트 라인 후보들을 검출하는 것을 특징으로 하는 장치.11. The method of claim 10,
Wherein,
A connection element is extracted by applying a binarization algorithm or an MSER (Maximally Stable External Region) algorithm to the document image, and the extracted connection elements are clustered, and in each of the clusters of the connection element, And detecting the text line candidates by projecting the text line candidates in at least one direction.
상기 제어부는,
상기 문서 영상에 상기 이진화 알고리즘 또는 MSER 알고리즘을 적용하여 추출된 연결 요소들에 대해서, 고유값 및 픽셀 개수에 기초하여 필터링을 수행함으로써 비텍스트 요소를 제거한 후, 남은 연결 요소들만을 추출하는 것을 특징으로 하는 장치.12. The method of claim 11,
Wherein,
Filtering the extracted connection elements based on the eigenvalues and the number of pixels by applying the binarization algorithm or the MSER algorithm to the document image to remove the non-text elements, and then extracting only the remaining connection elements. .
상기 제어부는,
상기 군집에 포함된 연결 요소 사이의 여백의 너비와 상기 연결 요소의 평균 획 굵기를 비교한 결과에 따라 상기 군집을 복수의 세부 군집들로 나누고, 상기 세부 군집들을 텍스트 라인 후보들로 검출하는 것을 특징으로 하는 장치.12. The method of claim 11,
Wherein,
Dividing the cluster into a plurality of detailed clusters according to a result of comparing a width of a margin between connection elements included in the cluster and an average stroke of the connection element, and detecting the detailed clusters as text line candidates. .
상기 제어부는,
상기 텍스트 라인 후보들에 대해서, 제1 문턱값을 이용한 필터링을 수행하여 비텍스트 요소를 제거하고, 남은 텍스트 라인 후보들을 문단으로 군집화하고, 상기 남은 텍스트 라인 후보들 중 문단으로 군집화되지 않은 텍스트 라인 후보들에 대해서, 상기 제1 문턱값보다 큰 제2 문턱값을 이용한 필터링을 수행하여 비텍스트 요소를 제거하고, 남은 텍스트 라인 후보들을 텍스트 라인으로 검출하는 것을 특징으로 하는 장치.11. The method of claim 10,
Wherein,
Filtering the text line candidates by using a first threshold value to remove non-text elements, grouping the remaining text line candidates into paragraphs, and selecting text line candidates that are not clustered as paragraphs of the remaining text line candidates And performing filtering using a second threshold value that is greater than the first threshold value to remove non-text elements, and detects remaining text line candidates as text lines.
상기 제어부는,
상기 문서 영상에서 검출된 텍스트 라인을 제거하고, 상기 검출된 텍스트 라인에 기초하여 상기 관심 영역을 조절하고, 상기 관심 영역의 경계에 걸쳐서 존재하는 연결 요소들이 배경에 해당되는지를 판단하고, 배경으로 판단된 연결 요소를 제거하고, 남은 연결 요소들에 대해서 반복 X-Y 컷을 수행함으로써, 상기 비텍스트 영역을 검출하는 것을 특징으로 하는 장치.11. The method of claim 10,
Wherein,
The text line detected in the document image is removed, the attention area is adjusted based on the detected text line, the connection elements existing over the boundary of the ROI are judged to correspond to the background, Wherein the non-text area is detected by removing a connected element and performing a repetitive X-Y cut on the remaining connecting elements.
상기 제어부는,
상기 비텍스트 영역이 상기 관심 영역의 외부에도 존재한다면, 상기 관심 영역의 내부에 상기 비텍스트 영역이 포함되도록 상기 관심 영역을 확장하고, 상기 확장된 관심 영역의 경계를 문서 경계로 결정하는 것을 특징으로 하는 장치.11. The method of claim 10,
Wherein,
Expanding the ROI such that the non-text area is included in the ROI if the non-text area exists outside the ROI, and determining the boundary of the ROI as the document boundary. .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020170046633A KR101831204B1 (en) | 2017-04-11 | 2017-04-11 | Method and apparatus for document area segmentation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020170046633A KR101831204B1 (en) | 2017-04-11 | 2017-04-11 | Method and apparatus for document area segmentation |
Publications (1)
Publication Number | Publication Date |
---|---|
KR101831204B1 true KR101831204B1 (en) | 2018-02-22 |
Family
ID=61387140
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020170046633A KR101831204B1 (en) | 2017-04-11 | 2017-04-11 | Method and apparatus for document area segmentation |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101831204B1 (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110442521A (en) * | 2019-08-02 | 2019-11-12 | 腾讯科技(深圳)有限公司 | Control element detection method and device |
CN111027560A (en) * | 2019-11-07 | 2020-04-17 | 浙江大华技术股份有限公司 | Text detection method and related device |
WO2020194004A1 (en) * | 2019-03-28 | 2020-10-01 | The Nielsen Company (Us), Llc | Methods and apparatus to detect a text region of interest in a digital image using machine-based analysis |
US11410446B2 (en) | 2019-11-22 | 2022-08-09 | Nielsen Consumer Llc | Methods, systems, apparatus and articles of manufacture for receipt decoding |
US11625930B2 (en) | 2021-06-30 | 2023-04-11 | Nielsen Consumer Llc | Methods, systems, articles of manufacture and apparatus to decode receipts based on neural graph architecture |
US11810380B2 (en) | 2020-06-30 | 2023-11-07 | Nielsen Consumer Llc | Methods and apparatus to decode documents based on images using artificial intelligence |
US11822216B2 (en) | 2021-06-11 | 2023-11-21 | Nielsen Consumer Llc | Methods, systems, apparatus, and articles of manufacture for document scanning |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101571681B1 (en) | 2014-12-29 | 2015-11-25 | 주식회사 디오텍 | Method for analysing structure of document using homogeneous region |
-
2017
- 2017-04-11 KR KR1020170046633A patent/KR101831204B1/en active IP Right Grant
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101571681B1 (en) | 2014-12-29 | 2015-11-25 | 주식회사 디오텍 | Method for analysing structure of document using homogeneous region |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020194004A1 (en) * | 2019-03-28 | 2020-10-01 | The Nielsen Company (Us), Llc | Methods and apparatus to detect a text region of interest in a digital image using machine-based analysis |
GB2595412A (en) * | 2019-03-28 | 2021-11-24 | Nielsen Consumer Llc | Methods and apparatus to detect a text region of interest in a digital image using machine-based analysis |
US20220189190A1 (en) * | 2019-03-28 | 2022-06-16 | Nielsen Consumer Llc | Methods and apparatus to detect a text region of interest in a digital image using machine-based analysis |
GB2595412B (en) * | 2019-03-28 | 2023-09-27 | Nielsen Consumer Llc | Methods and apparatus to detect a text region of interest in a digital image using machine-based analysis |
CN110442521A (en) * | 2019-08-02 | 2019-11-12 | 腾讯科技(深圳)有限公司 | Control element detection method and device |
CN110442521B (en) * | 2019-08-02 | 2023-06-27 | 腾讯科技(深圳)有限公司 | Control unit detection method and device |
CN111027560A (en) * | 2019-11-07 | 2020-04-17 | 浙江大华技术股份有限公司 | Text detection method and related device |
US11410446B2 (en) | 2019-11-22 | 2022-08-09 | Nielsen Consumer Llc | Methods, systems, apparatus and articles of manufacture for receipt decoding |
US11768993B2 (en) | 2019-11-22 | 2023-09-26 | Nielsen Consumer Llc | Methods, systems, apparatus and articles of manufacture for receipt decoding |
US11810380B2 (en) | 2020-06-30 | 2023-11-07 | Nielsen Consumer Llc | Methods and apparatus to decode documents based on images using artificial intelligence |
US11822216B2 (en) | 2021-06-11 | 2023-11-21 | Nielsen Consumer Llc | Methods, systems, apparatus, and articles of manufacture for document scanning |
US11625930B2 (en) | 2021-06-30 | 2023-04-11 | Nielsen Consumer Llc | Methods, systems, articles of manufacture and apparatus to decode receipts based on neural graph architecture |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101831204B1 (en) | Method and apparatus for document area segmentation | |
CN109670500B (en) | Text region acquisition method and device, storage medium and terminal equipment | |
US9552536B2 (en) | Image processing device, information storage device, and image processing method | |
US10134165B2 (en) | Image distractor detection and processing | |
US10748023B2 (en) | Region-of-interest detection apparatus, region-of-interest detection method, and recording medium | |
JP5775225B2 (en) | Text detection using multi-layer connected components with histograms | |
US9014480B2 (en) | Identifying a maximally stable extremal region (MSER) in an image by skipping comparison of pixels in the region | |
EP3203417B1 (en) | Method for detecting texts included in an image and apparatus using the same | |
US20150039637A1 (en) | Systems Apparatus and Methods for Determining Computer Apparatus Usage Via Processed Visual Indicia | |
US8374454B2 (en) | Detection of objects using range information | |
JP2018509678A (en) | Target acquisition method and apparatus | |
KR102655789B1 (en) | Face detecting method and apparatus | |
EP2808828A2 (en) | Image matching method, image matching device, model template generation method, model template generation device, and program | |
JP2017004350A (en) | Image processing system, image processing method and program | |
US11341675B2 (en) | Image processing apparatus, image processing method, and image processing program | |
US9256792B2 (en) | Image processing apparatus, image processing method, and program | |
JP2016029546A (en) | Image processing device, image processing method, and image processing program | |
KR102416146B1 (en) | Apparatus and method for evaluating state of road pavement | |
US11270439B2 (en) | Histogram-based method for auto segmentation of integrated circuit structures from SEM images | |
JP2014229314A (en) | Method and device for text detection | |
KR102002533B1 (en) | Method for detecting pedestrian from video, and apparatus for performing the same | |
JP7486574B2 (en) | Scalable Structure Learning via Context-Free Recursive Document Decomposition | |
KR20150103443A (en) | Multiclass classification apparatus, method thereof and computer readable medium having computer program recorded therefor | |
El Bahi et al. | Document text detection in video frames acquired by a smartphone based on line segment detector and dbscan clustering | |
KR101912758B1 (en) | Method and apparatus for rectifying document image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |