KR100782254B1 - Method for detecting word regions using camera - Google Patents
Method for detecting word regions using camera Download PDFInfo
- Publication number
- KR100782254B1 KR100782254B1 KR1020050106378A KR20050106378A KR100782254B1 KR 100782254 B1 KR100782254 B1 KR 100782254B1 KR 1020050106378 A KR1020050106378 A KR 1020050106378A KR 20050106378 A KR20050106378 A KR 20050106378A KR 100782254 B1 KR100782254 B1 KR 100782254B1
- Authority
- KR
- South Korea
- Prior art keywords
- value
- area
- camera
- extracting
- threshold value
- Prior art date
Links
Images
Classifications
-
- 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
-
- 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/40—Document-oriented image-based pattern recognition
- G06V30/41—Analysis of document content
- G06V30/414—Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text
Abstract
본 발명은 카메라를 문서에 가져갔을 때 원하는 문자 영역을 추출하는 방법에 관한 것으로, 특히 본 발명은 핸드폰(휴대 전화기)과 같은 휴대형 이동 단말기에 내장되거나 외장된 카메라를 문서에 비췄을 때 원하는 문자 영역을 추출하고, 이 추출된 영상을 저장하는 카메라를 이용한 문자 영역 추출 방법에 관한 것이다. 이와 같이 본 발명에 따른 문자 영역 추출 방법은 카메라가 장착된 휴대형 이동 단말기에서의 특정 문자 영역의 추출 과정이 프리뷰(preview) 화면에서 실시간으로 추출되어 그 특정 문자의 좌표 영역을 디스플레이한다. The present invention relates to a method of extracting a desired text area when a camera is taken in a document. In particular, the present invention relates to a desired text area when a camera embedded in or mounted on a portable mobile terminal such as a mobile phone is reflected on a document. And a method for extracting a text area using a camera to store the extracted image. As described above, in the method for extracting a text area according to the present invention, a process of extracting a specific text area in a portable mobile terminal equipped with a camera is extracted in real time from a preview screen to display the coordinate area of the specific text.
카메라, 이동 단말기, 문자 추출, 프리뷰(preview) 화면 Camera, Mobile Terminal, Character Extraction, Preview Screen
Description
도 1은 본 발명에 따른 카메라를 이용한 문자 영역 추출 과정을 나타낸 순서도1 is a flowchart illustrating a text area extraction process using a camera according to the present invention.
도 2는 본 발명에 따른 카메라를 이용한 문자 영역 추출 전을 디스플레이한 도면 2 is a view showing a character region extraction before using a camera according to the present invention;
도 3은 본 발명에 따른 카메라를 이용한 문자 영역 추출 과정 중 절대 중심 좌표 조정 방법을 설명하기 위한 도면3 is a view for explaining a method for adjusting the absolute center coordinates of the text area extraction process using a camera according to the present invention
도 4는 본 발명에 따른 카메라를 이용한 문자 영역 추출 과정 중 y 좌표 추출 방법을 설명하기 위한 도면4 is a view for explaining a y coordinate extraction method of the text area extraction process using a camera according to the present invention;
도 5는 본 발명에 따른 카메라를 이용한 문자 영역 추출 과정 중 x 좌표 추출 방법을 설명하기 위한 도면5 is a view for explaining the x-coordinate extraction method of the text area extraction process using a camera according to the present invention
도 6은 본 발명에 따른 카메라를 이용한 문자 영역 추출 후를 디스플레이한 도면6 is a view showing after extracting a text area using a camera according to the present invention;
본 발명은 카메라를 문서에 가져갔을 때 원하는 문자 영역을 추출하는 방법에 관한 것으로, 특히 본 발명은 핸드폰(휴대 전화기)과 같은 휴대형 이동 단말기에 내장되거나 외장된 카메라를 문서에 비췄을 때 원하는 문자 영역을 추출하고, 이 추출된 영상을 저장하는 카메라를 이용한 문자 영역 추출 방법에 관한 것이다. The present invention relates to a method of extracting a desired text area when a camera is taken in a document. In particular, the present invention relates to a desired text area when a camera embedded in or mounted on a portable mobile terminal such as a mobile phone is reflected on a document. And a method for extracting a text area using a camera to store the extracted image.
일반적으로 문서 영상을 취득하여 그 문서 영상 내에 포함되어 있는 문자를 인식하는 방법으로 OCR, 스캐너 기반의 문자 인식 방법이 있다. In general, a method of acquiring a document image and recognizing a character included in the document image includes an OCR and a scanner-based character recognition method.
상기 OCR 시스템이나 스캐너 기반의 문자 인식방법의 경우는 문서 인식 전용 시스템이기 때문에 문서 영상의 처리와 인식을 위한 방대한 어플리케이션과 하드웨어 자원이 요구된다. 그러므로 제한된 프로세서 및 메모리 자원을 갖는 기기에서는 기존의 OCR 시스템이나 스캐너 기반의 문자 인식방법을 그대로 인식하여 사용하기에는 적지않은 어려움이 따른다. Since the OCR system or the scanner-based character recognition method is a document recognition system, extensive application and hardware resources are required for processing and recognition of document images. Therefore, in a device having limited processor and memory resources, it is difficult to recognize and use an existing OCR system or a scanner-based character recognition method as it is.
특히, 현재 휴대형 이동 단말기에 카메라가 도입되면서 영상을 이용하여 여러 가지 기술들이 적용되어 왔고 또한 계속적인 기술 개발이 이루어지고 있다. In particular, as the camera is introduced into a portable mobile terminal, various technologies have been applied by using an image, and continuous technology development is being made.
또한, 사용자가 카메라를 통해 저장하고자하는 대상에는 여러 가지가 있는데 문서의 경우도 그 중 하나라고 볼 수 있다. In addition, there are a number of objects that the user wants to store through the camera, and the document is one of them.
그러나 영상 데이터 자체는 그 영상이 담고 있는 정보에 비해 실제 차지하는 용량이 많기 때문에 그 저장 측면에 있어 많은 제약을 가지고 있다. However, the image data itself has a lot of limitations in terms of its storage because it actually has a larger capacity than the information contained in the image.
이러한 문제를 해결하기 위해서는 촬영을 하는 문서 내용 중 사용자가 필요 로 하는 최소한의 영역만을 저장하는 방식이 필요하다. In order to solve this problem, it is necessary to store only the minimum area of the document contents that the user needs.
그러나 영역을 추출해 내는 영상 처리 기술들은 지금껏 많이 개발되어 왔으나, 휴대형 이동 단말기와 같은 제한적인 프로세서 하드웨어 환경과 카메라 프리뷰(preview)와 같은 실시간으로 수행되어야 하는 상황에서는 영역 추출 알고리즘에 있어서 한계가 있다. However, although image processing techniques for extracting regions have been developed so far, there are limitations in region extraction algorithms in a limited processor hardware environment, such as a mobile mobile terminal, and in a situation that must be performed in real time, such as a camera preview.
따라서, 본 발명은 상기의 문제점을 해결하기 위해 안출한 것으로서, 카메라를 통해 영상을 받아들여 문자 영역을 추출하되 중심으로부터 일부 영역만을 연산하도록 하는 시나리오를 통해 불필요한 연산을 하지 않고, 계산량을 단축시킬 수 있는 카메라를 이용한 문자영역 추출 방법을 제공한다. Accordingly, the present invention has been made in order to solve the above problems, it is possible to reduce the amount of calculation without unnecessary calculation through a scenario that accepts an image through a camera to extract a text area, but only a partial area from the center to calculate It provides a text area extraction method using a camera.
상기 목적을 달성하기 위한 본 발명의 특징은 특정 문자 영역을 프리뷰(preview) 화면에서 실시간으로 추출하기 위한 카메라를 이용한 문자 영역 추출 방법에 있어서, 문자 영역의 추출을 위해 절대 중심 좌표를 조정하는 제 1 단계; 상기 조정된 중심 좌표에서 상·하로 떨어져 있는 상·하 오프셋(offset)을 계산하여 1차 상·하 Y 좌표를 추출하는 제 2 단계; 및 상기 추출된 상·하 Y 좌표 영역 안에서 1차 좌·우 X 좌표를 추출하는 제 3 단계를 포함하여 이루어지는 것을 특징으로 한다. A feature of the present invention for achieving the above object is a character region extraction method using a camera for extracting a specific character region on a preview screen in real time, the first region for adjusting the absolute center coordinates for extraction of the character region; step; A second step of extracting a first upper and lower Y coordinate by calculating an upper and lower offset apart from the adjusted center coordinates; And extracting a primary left and right X coordinate in the extracted upper and lower Y coordinate regions.
삭제delete
그리고, 상기 제 1 단계는, 사용자가 비춘 특정 단어 영상의 상대 중심 좌표로부터 미리 정해진 일정 영역 내부의 x 축 방향 히스토그램값을 라인 단위로 구하는 단계와, 상기 라인 단위로 구한 x 축 방향의 히스토그램 값을 Y 축에 투영(projection)시켜, 투영된 값들을 임계치와 비교하여 단어가 있는 영역을 추출하는 단계와, 상기 단어가 있는 영역의 중심과 상기 사용자가 비춘 특정 단어 영상의 상대적인 중심값의 차(△)를 구하는 단계와, 상기 구해진 값(△)을 절대 중심 Y 값에서 뺀 값을 구하는 단계를 포함하여 이루어진다. The first step may include obtaining an x-axis histogram value within a predetermined region from a relative center coordinate of a specific word image reflected by the user in units of lines, and calculating the histogram value of the x-axis direction obtained in units of lines. Projecting the Y-axis to compare the projected values with a threshold value to extract an area with a word, and the difference between the center of the worded area and the relative center value of the specific word image reflected by the user (Δ ) And a value obtained by subtracting the obtained value? From the absolute center Y value.
또한, 상기 투영된 값들을 임계치와 비교하여 임계치 이상이면 1로 표기하고, 임계치 미만이면 0으로 표기한다. In addition, the projected values are expressed as 1 when the threshold value is greater than or equal to the threshold value and 0 when the threshold value is less than the threshold value.
그리고, 상기 1로 표기된 부분은 단어가 있는 영역이고, 0으로 표기된 부분은 단어가 없는 영역인 것을 특징으로 한다. The portion marked 1 is a region having a word, and the portion marked 0 is a region without a word.
또한, 상기 히스토그램은 레인지(range) 범위를 0~31 범위로 맴핑시키는 것을 특징으로 한다. In addition, the histogram is characterized in that to map the range (range) to the range 0 ~ 31.
그리고, 제 3 단계는 상·하 Y 좌표 영역 안에서 Y 방향의 히스토그램 값을 컬럼(column) 단위로 구하는 단계와, 상기 컬럼 단위로 구해진 히스토그램 값을 임계치와 비교하여 X축에 투영시키는 단계와, 상기 X축에 투영된 값을 좌우 끝에서부터 차례로 스캔하여 최초로 시작되는 임계치 이상인 좌측 위치와 최후로 끝나는 우측 위치 범위를 구하는 단계와, 상기 범위 안에서 조정된 절대 중심 X 좌표에서 좌우로 가장 가까운 공백 영역의 오프셋(offset)을 계산하는 단계와, 상기 계산된 좌우 오프셋 값을 조정된 절대 중심 X 좌표에서 빼고 더하는 단계를 포함하여 이루어 진다. The third step may include obtaining a histogram value in the Y direction in a column unit within the upper and lower Y coordinate areas, projecting the histogram value obtained in the column unit on a X-axis by comparing with a threshold value, and Scanning the values projected on the X-axis from left to right in order to obtain a range of left positions that are above the first threshold and last ends of the right positions, and an offset of the nearest blank space left and right from the absolute center X coordinate adjusted within the range. calculating (offset), and subtracting and adding the calculated left and right offset values from the adjusted absolute center X coordinates.
또한, 상기 범위내에서 임계치 이상이 아닌 영역을 찾아 이 영역을 단어와 단어 사이의 영역인지, 글자와 글자 사이의 영역인지를 판단하는 단계를 더 포함하며, 상기 판단은 기 설정된 임계값에 의해 구분되어, 상기 기 설정된 임계값보다 크면 단어와 단어 사이를 나타내는 공백으로 판단하고, 기 설정된 임계값보다 작으면 글자와 글자 사이를 나타내는 공백으로 판단하여 값을 1로 재지정한다. The method may further include determining an area within the range that is not greater than or equal to a threshold, and determining whether the area is a word between words and an area between letters and letters, wherein the determination is divided by a predetermined threshold value. If the value is larger than the predetermined threshold value, the word is determined to be a space representing the word and the word is smaller than the predetermined threshold value, and the value is determined to be a space representing the character and the letter.
그리고, 상기 컬럼 단위로 구해진 히스토그램 값을 임계치와 비교하여 X축에 투영시키는 단계에서 임계치 이상이면 1로 표기하고, 임계치 미만이면 0으로 표시한다. In the step of projecting the histogram value obtained in the column unit to the X-axis by comparing with the threshold value, it is expressed as 1 if the value is greater than or equal to the threshold value, and 0 if it is less than the threshold value.
또한, 상기 추출된 1차 X, Y 좌표를 가지고 2차 Y좌표를 추출하고, 추출된 Y 좌표를 통해 2차 X 좌표를 추출하는 것을 특징으로 한다. In addition, the secondary Y coordinates are extracted with the extracted primary X and Y coordinates, and the secondary X coordinates are extracted through the extracted Y coordinates.
그리고, 상기 추출된 문자 영역의 표시는 박스 형태로 표시되어 사용자가 확인할 수 있다. In addition, the display of the extracted text area is displayed in the form of a box and can be confirmed by the user.
이하, 첨부된 도면을 참조하여 본 발명의 카메라를 이용한 문자영역 추출 방법을 설명하면 다음과 같다. Hereinafter, a method of extracting a text area using the camera of the present invention will be described with reference to the accompanying drawings.
도 1은 본 발명에 따른 카메라를 이용한 문자 영역 추출 과정을 나타낸 순서도이다. 1 is a flow chart illustrating a text area extraction process using a camera according to the present invention.
도 1을 참조하면, 먼저 사용자가 휴대형 이동 단말기에 부착된 카메라를 작동시키므로 카메라가 프리뷰(preview) 모드로 전환되었는지를 확인한다(S100).Referring to FIG. 1, first, a user operates a camera attached to a portable mobile terminal, thereby confirming whether the camera is switched to a preview mode (S100).
상기 확인 결과(S100), 카메라가 프리뷰 모드로 전환되면, 사용자는 프리뷰 모드로 전환됨과 동시에 특정 영역을 비추게 되고, 이때 디폴트(default)로 고정해 놓은 절대 중심 좌표가 특정 영역의 임의의 위치에 위치하도록 상·하·좌·우 조정하며, 이 임의의 위치에 위치한 절대 중심 좌표로부터 일정 영역 내에서 절대 중심 좌표가 조정된다(S110).As a result of the checking (S100), when the camera is switched to the preview mode, the user switches to the preview mode and simultaneously illuminates a specific area, and at this time, the absolute center coordinates fixed as defaults are located at an arbitrary position of the specific area. The center of gravity is adjusted up, down, left, and right so as to be positioned, and the absolute center coordinates are adjusted within a predetermined area from the absolute center coordinates located at this arbitrary position (S110).
여기서, 상기 카메라를 특정 영역에 비추었을 때, 도 2와 같이 휴대형 이동 단말기의 표시부를 통해 특정 영역이 디폴트(default)로 고정된 절대 중심 좌표가 십자 모양으로 표시됨을 알 수 있다. Here, when the camera is illuminated on a specific area, as shown in FIG. 2, the absolute center coordinates of which the specific area is fixed as a default is displayed in a cross shape through the display of the portable mobile terminal.
도 2는 본 발명에 따른 카메라를 이용한 문자 영역 추출 전을 디스플레이한 도면이다.2 is a view showing before the text area extraction using a camera according to the present invention.
즉, 사용자가 카메라를 특정 영역인 "Protect Optics" 부분이 포함된 영역에 비추면 이 특정 영역의 중심 좌표가 십자 모양으로 표시된다. That is, when the user illuminates the camera on an area including the "Protect Optics" part, the center coordinates of the specific area are displayed in a cross shape.
그리고, 상기 디폴트(default)로 고정해 좋은 중심 좌표를 중심으로 사용자가 비춘 특정 영역의 단어를 추출하기 위한 절대 중심 좌표를 조정하는 방법을 도 3을 통해 설명하면 다음과 같다. In addition, a method of adjusting the absolute center coordinates for extracting a word of a specific area reflected by the user based on the good center coordinates fixed as the default will be described with reference to FIG. 3.
도 3은 본 발명에 따른 카메라를 이용한 문자 영역 추출 과정 중 절대 중심 좌표 조정 방법을 설명하기 위한 도면이다. 3 is a view for explaining a method of adjusting the absolute center coordinates of the text area extraction process using a camera according to the present invention.
먼저 사용자가 카메라를 이용해 특정 영역을 비추면 이 특정 영역이 디폴트(default)로 고정해 놓은 절대 중심 좌표로 표시되며, 이 특정 영역안에 포함되는 사용자가 추출하고자 하는 단어를 추출하고 이를 확인하기 위해서는 추출하려는 단어의 중심좌표를 알아야 한다.First, when the user illuminates a specific area using the camera, the specific area is displayed with the absolute center coordinates fixed by default, and the word to be extracted by the user included in this specific area is extracted to check it. You need to know the center coordinates of the words you want to say.
그러기 위해서는 절대 중심 좌표를 조정해야 한다. To do this, you must adjust the absolute center coordinates.
사용자가 비춘 특정 단어 영상의 중심 좌표를 상대 중심 좌표로 보고, 특정 단어 영상의 상대 중심 좌표로부터 미리 정해진 일정 영역 내부의 x축 방향 히스토그램을값을 라인 단위로 구한다. The center coordinates of the specific word image reflected by the user are regarded as relative center coordinates, and the x-axis histogram inside a predetermined region is determined from the relative center coordinates of the specific word image in units of lines.
그런 다음, 상기 라인 단위로 구한 x축 방향의 히스토그램 값을 Y축에 투영(projection)시켜, 투영된 값들을 임계치와 비교하여 단어가 있는 영역을 추출한다. Then, the histogram value in the x-axis direction obtained by the line unit is projected onto the Y-axis, and the projected values are compared with a threshold to extract an area having a word.
이때, 상기 투영된 값들을 임계치와 비교하여 임계치 이상이면 '1'로 표기하고, 임계치 미만이면 '0'으로 표기한다.In this case, the projected values are compared with a threshold and represented as '1' if the threshold is greater than or equal to '0'.
상기 '1'로 표기된 부분은 단어가 있는 영역이고, '0'으로 표기된 부분은 단어가 없는 영역임을 알 수 있다. The portion marked with '1' is a region with a word, and the portion marked with '0' is a region without a word.
또한, 일반적으로 히스토그램의 레인지(range)는 0~255 범위에서 사용하지만 여러회 연산이 반복될 경우 그 연산량이 전체 연상량의 큰 영향을 미치므로 히스토그램 레인지 범위를 0~31 로 맵핑(mapping) 시켜 사용한다. In addition, the range of the histogram is generally used in the range of 0 to 255, but if the operation is repeated many times, the amount of calculation has a large influence on the total association, so the histogram range is mapped to 0 to 31. use.
즉, 0~7 → 0, 8~15 →1, 16~23 →2, 24~31 →3, 32~39 →4, 40~47 →5, 48~55 →6, .............248~255 →31로 맵핑시키는 것이다.That is, 0 ~ 7 → 0, 8 ~ 15 → 1, 16 ~ 23 → 2, 24 ~ 31 → 3, 32 ~ 39 → 4, 40 ~ 47 → 5, 48 ~ 55 → 6, ...... ....... 248 ~ 255 to 31.
상기 투영된 값들을 임계치와 비교하여 단어가 있는 영역이 추출되면, 상기 단어가 있는 영역의 중심과 상기 사용자가 비춘 특정 단어 영상의 상대적인 중심값의 차(△)를 구한다. When a region having a word is extracted by comparing the projected values with a threshold value, a difference Δ between a center of the region having a word and a relative center value of a specific word image reflected by the user is obtained.
그런 다음 상기 구해진 값(△)을 절대 중심 Y 값에서 뺌으로 절대 중심 좌표 를 조정한다. Then, the absolute center coordinate is adjusted from the absolute value Y to the absolute value Y.
상기 조정된 절대 중심 좌표를 [수학식 1]로 나타내면 다음과 같다. The adjusted absolute center coordinates are represented by Equation 1 as follows.
[수학식 1][Equation 1]
여기서, 상기 는 단어가 있는 영역의 중심과 상기 사용자가 비춘 특정 단어 영상의 상대적인 중심값의 차(△)를 나타낸다. Where Denotes the difference Δ between the center of the area where the word is located and the relative center value of the specific word image reflected by the user.
이어서, 상기 절대 중심 좌표가 조정되면, 조정된 중심 좌표로부터 특정 영역의 문자 추출 알고리즘이 구동된다.(S120).Subsequently, when the absolute center coordinates are adjusted, a character extraction algorithm of a specific region is driven from the adjusted center coordinates (S120).
여기서, 상기 특정 영역의 문자 추출은 크게 4 단계로 구분될 수 있으며, 그 이상의 단계로 구분 지어질 수도 있다. Here, the text extraction of the specific region may be divided into four stages, or may be divided into more stages.
먼저 대략의 1차 y 영역 좌표를 구하고 이 1차 y 좌표를 통해 1차 x 좌표값이 추출된다(S120a~S120b). First, the approximate primary y-area coordinates are obtained, and the primary x-coordinate values are extracted through the primary y-coordinates (S120a to S120b).
그리고, 1차 x, y 좌표를 토대로 다시 정확한 2차 y 좌표를 추출하고 정확하게 추출된 y 좌표로 2차 x 좌표를 구한다(S120c~S120d). Then, the correct second y coordinate is extracted again based on the first x and y coordinates, and the second x coordinates are obtained from the extracted y coordinates (S120c to S120d).
먼저 1차 영역의 y 좌표 추출은 도 4를 통해 설명한다. First, y coordinate extraction of the primary region will be described with reference to FIG. 4.
도 4는 본 발명에 따른 카메라를 이용한 문자 영역 추출 과정 중 y 좌표 추출 방법을 설명하기 위한 도면이다. 4 is a view for explaining a y coordinate extraction method of the text area extraction process using a camera according to the present invention.
도 4에 도시된 바와 같이 문자영역의 1차 y값은 조정된 중심 좌표에서 상· 하로 떨어져 있는 오프셋(offset)을 계산하여 1차 상·하 Y 좌표를 추출한다 (S120a)As shown in FIG. 4, the primary y-value of the text area is calculated by calculating an offset that is spaced up and down from the adjusted center coordinates to extract the primary Y-coordinates (S120a).
상기 절대 중심 좌표 조정에서 사용된 것처럼 x축의 각 라인에서 추출된 히스토그램 값들을 y축에 프로젝션시킨 후, 나온 값을 보고 판단하며, 여기서 또한 히스토그램을 0~31 레인지 범위로 맵핑하여 사용하고, 프로젝션 값이 존재하는 부분을 조정된 중심 좌표 Y를 중심으로 상위 y와 하위 y의 오프셋을 계산한다.The histogram values extracted from each line of the x-axis are projected on the y-axis as determined in the absolute center coordinate adjustment, and the determined values are determined based on the measured values. Here, the histogram is mapped to the range of 0 to 31, and the projection value is used. Calculate the offset of the upper y and lower y around this adjusted center coordinate Y.
추출된 문자 영역의 상위 1차 상위 Y 좌표와 하위 Y 좌표를 [수학식 2]로 표시하면 다음과 같다. When the upper first upper Y coordinate and the lower Y coordinate of the extracted character area are expressed by [Equation 2], they are as follows.
[수학식 2][Equation 2]
이어서, 상기 1차 상·하 Y 좌표가 추출되면, 이 추출된 1차 상·하 Y 좌표 영역 안에서 1차 좌·우 X 좌표를 추출한다(S120b).Subsequently, when the primary upper and lower Y coordinates are extracted, the primary left and right X coordinates are extracted in the extracted primary upper and lower Y coordinate regions (S120b).
도 5는 본 발명에 따른 카메라를 이용한 문자영역 추출 과정 중 x 좌표 추출 방법을 설명하기 위한 도면이다. 5 is a view for explaining the x-coordinate extraction method of the text area extraction process using a camera according to the present invention.
먼저 1 차로 추출된 상·하 Y 좌표 영역 안에서 Y 방향의 히스토그램 값을 컬럼(column) 단위로 구한다. First, the histogram value in the Y direction is calculated in the column unit in the upper and lower Y coordinate regions extracted first.
그런 다음, 상기 컬럼 단위로 구해진 히스토그램 값을 임계치와 비교하여 x 축에 프로젝션시킨다.Then, the histogram value obtained in the column unit is projected on the x-axis by comparing with the threshold.
여기서, 상기 임계치와 비교하여 임계치 이상이며 '1'로 표기하고, 임계치 미만이면 '0'으로 표기한다. In this case, the threshold is greater than or equal to '1' and the threshold is less than '0'.
이어서, 상기 x축에 투영된 값을 좌·우 끝에서부터 차례로 스캔하여 임계치 이상인 '1'로 표기된 최초로 시작되는 좌측 위치와 최후로 끝나는 우측 위치 범위를 구한다. Subsequently, the values projected on the x-axis are scanned sequentially from the left and right ends to obtain a range of the first starting left position and the last ending right position, denoted by '1' which is greater than or equal to a threshold.
그런 다음, 상기 범위안에서 상기 조정된 절대 중심 X 좌표에서 좌·우로 가장 가까운 공백 영역의 오프셋(offset)을 계산하고, 계산된 좌·우 오프셋 값을 조정된 절대 중심 X 좌표에서 빼고 더하여 1차 좌·우 X 좌표를 추출하는 것이다. Then, within the range, the offset of the nearest blank area left and right from the adjusted absolute center X coordinate is calculated, and the calculated left and right offset value is subtracted from the adjusted absolute center X coordinate and added to the primary left. Extract the right X coordinate.
여기서, 상기 범위내에서 임계치 미만인 영역을 추출하여, 이 추출된 영역을 또다른 기 설정된 임계값에 의해 단어와 단어 사이의 영역인지, 글자와 글자 사이의 영역인지를 구분한다. Here, an area less than the threshold value is extracted within the above range, and the extracted area is distinguished between an area between words and words or between letters and letters by another preset threshold value.
여기서, 상기 구분은 임계값보다 크면 단어와 단어 사이를 나타내는 공백으로 판단하고, 임계값보다 작으면 글자와 글자 사이 공백으로 판단하여 값을 '1'로 재지정한다. In this case, when the division is larger than the threshold, the division is determined to be a space between the words and the word.
상기 추출된 1차 좌·우 X 좌표를 [수학식 3]으로 표시하면 다음과 같다. When the extracted first left and right X coordinates are expressed by Equation 3 as follows.
[수학식 3][Equation 3]
이어서, 상기 1 차로 추출된 X, Y 좌표를 가지고 다시 2차 Y좌표를 정확히 찾고, 여기서 추출된 2차 Y 좌표 영역을 토대로 2차 X 좌표의 영역을 추출해 낸다(S120c~S120d). Subsequently, the secondary Y coordinates are accurately found again with the first and second extracted X and Y coordinates, and the second X coordinate region is extracted based on the extracted second Y coordinate region (S120c to S120d).
여기서, 상기 2차 영역 추출 단계는 1차에서 못 찾은 연결, 분절 오류 등을 미리 정해진 임계값을 통해 걸러내어 좀 더 정확한 최종 좌표 영역을 조정하여(S130) 영역 존재 유무(S140)에 의해 영역이 존재하면 존재하는 영역을 네모로 표시하고, 존재하는 영역이 없으면 십자 모양으로 표시된다. Here, in the step of extracting the secondary region, the connection is not found in the primary, and the segmentation error is filtered out through a predetermined threshold value to adjust the more accurate final coordinate region (S130). If present, the existing area is displayed as a square. If there is no area, a cross is displayed.
즉, 상기 추출된 문자 영역의 표시는 도 6에 표시된 바와 같이 박스(네모) 형태로 표시하여 사용자가 추출된 문자를 확인할 수 있다. That is, the extracted text area may be displayed in a box (square) form as shown in FIG. 6 so that the user may check the extracted text.
따라서, 상기 도 2를 통해 최초 프리뷰 화면은 정해진 위치에 십자 표시를 나타내고 이 표시 영역 중심으로 문자 영상이 들어오면 상기 도 3 내지 도 5에서 설명된 방법과 같이 알고리즘이 구동되어 좌표를 추출하여 프리뷰 화면상에서 그 좌표 영역을 박스 형태로 디스플레이한다. Therefore, the initial preview screen shows a cross-section at a predetermined position through FIG. 2, and when a text image enters the center of the display area, an algorithm is driven to extract a coordinate as in the method described in FIGS. 3 to 5. Display the coordinate area in the form of a box on the screen.
상술한 바와 같이 본 발명은 카메라를 통해 영상을 받아들여 문자 영역을 추출하되 중심으로부터 일부 영역만을 연산할 수 있도록 하여 불필요한 연산을 하지 않는다. As described above, the present invention receives an image through a camera and extracts a text area, but only a part of the area can be calculated from the center so that unnecessary calculation is not performed.
그리고, 문자 영역 추출을 위한 히스토그램 분석시 0~31 레인지로 맵핑하여 사용하기 때문에 계산량이 8/1로 단축시키는 효과가 있으며, 초당 15 프레임을 보여주는 프리뷰 화면에서 실시간으로 알고리즘을 수행하고 화면 디스플레이까지 가능하다. In addition, when the histogram analysis for character area extraction is used by mapping from 0 to 31 range, the calculation amount is reduced to 8 / 1.Also, the algorithm can be performed in real time on the preview screen showing 15 frames per second and display on the screen. Do.
또한, 히스토그램을 낮췄음에도 불구하고 중심 좌표 조정과, 1, 2 X,Y 좌표 를 정확히 사용자가 원하는 부분의 문자 영역을 추출해 내는 효과가 있다. In addition, even though the histogram is lowered, the center coordinate adjustment and 1, 2 X, Y coordinates have the effect of extracting the text area of the part exactly desired by the user.
한편 본 발명의 상세한 설명에는 구체적인 실시예에 관해 설명하였으나, 본 발명의 범위에서 벗어나지 않는 한도 내에서 여러 가지 변형이 가능함은 물론이다. 그러므로, 본 발명의 범위는 설명된 실시예에 국한되어 정해져서는 아니되며 후술하는 특허청구의 범위뿐만 아니라 이 특허청구의 범위와 균등한 것들에 의해 정해져야 한다. Meanwhile, in the detailed description of the present invention, specific embodiments have been described, but various modifications are possible without departing from the scope of the present invention. Therefore, the scope of the present invention should not be limited to the described embodiments, but should be defined not only by the scope of the following claims, but also by the equivalents of the claims.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020050106378A KR100782254B1 (en) | 2005-11-08 | 2005-11-08 | Method for detecting word regions using camera |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020050106378A KR100782254B1 (en) | 2005-11-08 | 2005-11-08 | Method for detecting word regions using camera |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20070049317A KR20070049317A (en) | 2007-05-11 |
KR100782254B1 true KR100782254B1 (en) | 2007-12-04 |
Family
ID=38273310
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020050106378A KR100782254B1 (en) | 2005-11-08 | 2005-11-08 | Method for detecting word regions using camera |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100782254B1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109409377B (en) * | 2018-12-03 | 2020-06-02 | 龙马智芯(珠海横琴)科技有限公司 | Method and device for detecting characters in image |
CN111369441B (en) * | 2020-03-09 | 2022-11-15 | 稿定(厦门)科技有限公司 | Word processing method, medium, device and apparatus |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20030094708A (en) * | 2002-06-07 | 2003-12-18 | 주식회사 한국인식기술 | Character awareness administration method to use camera |
KR20040017376A (en) * | 2002-08-21 | 2004-02-27 | 에스케이텔레텍주식회사 | Method and mobile phone for reading name card using camera for cellular phone |
KR20040086623A (en) * | 2003-04-03 | 2004-10-12 | 아폴로산업 주식회사 | Mobile phone having document scanning function and foreign language translating function |
KR20050052087A (en) * | 2003-11-29 | 2005-06-02 | 삼성전자주식회사 | Method for implementing a function of electronic dictionary in mobile phone having camera of cam function |
-
2005
- 2005-11-08 KR KR1020050106378A patent/KR100782254B1/en not_active IP Right Cessation
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20030094708A (en) * | 2002-06-07 | 2003-12-18 | 주식회사 한국인식기술 | Character awareness administration method to use camera |
KR20040017376A (en) * | 2002-08-21 | 2004-02-27 | 에스케이텔레텍주식회사 | Method and mobile phone for reading name card using camera for cellular phone |
KR20040086623A (en) * | 2003-04-03 | 2004-10-12 | 아폴로산업 주식회사 | Mobile phone having document scanning function and foreign language translating function |
KR20050052087A (en) * | 2003-11-29 | 2005-06-02 | 삼성전자주식회사 | Method for implementing a function of electronic dictionary in mobile phone having camera of cam function |
Also Published As
Publication number | Publication date |
---|---|
KR20070049317A (en) | 2007-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100859210B1 (en) | Human being detection apparatus, method of detecting human being, and computer readable recording medium storing human being detecting program | |
KR101784919B1 (en) | Text image trimming method | |
US8019164B2 (en) | Apparatus, method and program product for matching with a template | |
JP6099457B2 (en) | Image processing apparatus, area determination method, and computer program | |
US20120092329A1 (en) | Text-based 3d augmented reality | |
CN111695540B (en) | Video frame identification method, video frame clipping method, video frame identification device, electronic equipment and medium | |
JP2003526841A (en) | Face extraction system and method based on biometrics | |
CN107845068B (en) | Image view angle conversion device and method | |
JP2007233871A (en) | Image processor, control method for computer, and program | |
JP2010231686A (en) | Device, method and program for extracting document area from image | |
JP4517003B2 (en) | Automatic road sign recognition system | |
JP2002228423A (en) | Tire detecting method and device | |
US20180158203A1 (en) | Object detection device and object detection method | |
KR100782254B1 (en) | Method for detecting word regions using camera | |
CN112906532B (en) | Image processing method and device, electronic equipment and storage medium | |
CN109074646B (en) | Image recognition device and image recognition program | |
JP2016053763A (en) | Image processor, image processing method and program | |
JP5010627B2 (en) | Character recognition device and character recognition method | |
CN111008987A (en) | Method and device for extracting edge image based on gray background and readable storage medium | |
JP3638845B2 (en) | Image processing apparatus and method | |
JP5176523B2 (en) | Moving body detection apparatus, moving body detection method, and moving body detection program | |
JP2008077489A (en) | Image processor, method, program, and storage medium | |
JP2009098867A (en) | Character string recognition method, computer program and storage medium | |
JP2006229685A (en) | Distortion determination device for business form | |
CN112560857B (en) | Character area boundary detection method, equipment, storage medium and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
G170 | Publication of correction | ||
LAPS | Lapse due to unpaid annual fee |