KR970008521B1 - Method of detecting horizontal/vertical line of graphics - Google Patents
Method of detecting horizontal/vertical line of graphics Download PDFInfo
- Publication number
- KR970008521B1 KR970008521B1 KR1019900013412A KR900013412A KR970008521B1 KR 970008521 B1 KR970008521 B1 KR 970008521B1 KR 1019900013412 A KR1019900013412 A KR 1019900013412A KR 900013412 A KR900013412 A KR 900013412A KR 970008521 B1 KR970008521 B1 KR 970008521B1
- Authority
- KR
- South Korea
- Prior art keywords
- mask
- line
- lines
- horizontal
- value
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
- G06F3/153—Digital output to display device ; Cooperation and interconnection of the display device with other functional units using cathode-ray tubes
-
- H—ELECTRICITY
- H01—ELECTRIC ELEMENTS
- H01L—SEMICONDUCTOR DEVICES NOT COVERED BY CLASS H10
- H01L2924/00—Indexing scheme for arrangements or methods for connecting or disconnecting semiconductor or solid-state bodies as covered by H01L24/00
- H01L2924/01—Chemical elements
- H01L2924/01029—Copper [Cu]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Character Input (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
Description
제1도는 본 발명에 따른 그래픽 영상의 수평/수직라인 검출 시스템 구성도.1 is a block diagram of a horizontal / vertical line detection system of a graphic image according to the present invention.
제2도 (가) 및 (나)는 본 발명에 따른 영상조사 방향 설명도.2 (a) and (b) is an explanatory view of the image irradiation direction according to the present invention.
제3도는 본 발명에 따른 4×4 마스크 설명도.3 is an explanatory view of a 4x4 mask according to the present invention.
제4도는 본 발명에 따른 그래픽 영상의 수평/수직라인 검출 제어흐름도.4 is a horizontal and vertical line detection control flow chart of a graphic image according to the present invention.
제5도 (가) 내지 (바)는 본 발명에 따른 수평라인 연결 예시도.Figure 5 (a) to (bar) is a diagram illustrating a horizontal line connection according to the present invention.
제6도 (가) 및 (나)는 본 발명에 따른 마스크에 대한 압축데이타 발생 설명도.6 (a) and (b) are explanatory diagrams of compression data generation for a mask according to the present invention.
제7도는 본 발명을 설명하기 위한 라인 좌표 설명도.7 is a line coordinate explanatory diagram for explaining the present invention.
제8도는 본 발명에 따른 수평라인 연결 제어회로도.8 is a horizontal line connection control circuit diagram according to the present invention.
* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings
1 : 스캐너2,10 : 프로세서1:
3,4,7,11 : 인터페이스5,8,13 : 메모리3,4,7,11:
6,12 : 프로그램 메모리9 : 호스트 PC6,12 program memory 9: host PC
본 발명은 그래픽 영상에서의 직선 검출방식에 관한 것으로, 특히 4×4 마스크를 이용하여 수평선 검출시 조사된 데이타를 수직선 검출시 이용함으로써 시간을 단축하고 입력영상의 왜곡을 극소화하기에 적당하도록 한 그래픽 영상의 수평/수직라인 검출방식에 관한 것이다.The present invention relates to a straight line detection method in a graphic image. In particular, the data irradiated during horizontal line detection using a 4 × 4 mask is used for vertical line detection to reduce time and minimize distortion of an input image. A horizontal / vertical line detection method of an image.
일반적으로 문서영상에서 라인을 검출하기 위해서는, 횡방향으로 1화소씩 이동시키면서 횡방향의 흑화소수를 구해 이 값이 어떤 임계치보다 크면 라인임을 인정하여 라인을 검출하고, 종방향 라인을 검출하기 위해서는 종방향으로 1화소씩 이동시키면서 흑화소수를 구해 라인을 검출한다.In general, in order to detect lines in a document image, the transverse black pixels are counted by one pixel in the transverse direction. The line is detected by determining the number of black pixels while moving one pixel in the direction.
그러나, 이와 같은 1화소씩 검색하여 1라인의 흑화소수를 판별한 후 이 흑화소수를 임의의 임계값과 비교하여 라인임을 판별하는데, 1화소씩 검색하므로 시간이 많이 걸리고, 입력화상의 잡음에 약해 1라인의 임의의 화소가 잡음에 의해 백화소("0")로 검색되었을때 그 라인을 라인으로 판별하지 못하는 에러가 발생되는 문제점이 있다.However, this pixel is searched one by one to determine the number of black pixels in one line, and this black pixel number is determined by comparing with an arbitrary threshold value. However, since each pixel is searched, it takes a long time and is weak in noise of an input picture. When an arbitrary pixel of one line is searched to a white pixel ("0") by noise, an error that does not identify the line as a line occurs.
본 발명은 이와 같은 문제점을 감안하여 4×4 마스크를 이용하여 수평라인을 판별하고, 이 수평라인 검색에서 얻은 압축데이타를 수직라인 검색에 사용함으로써 직선 검출의 시간을 단축시키도록 하기 위한 그래픽 영상의 수평/수직선 검출방식을 창안한 것으로, 이를 첨부한 도면을 참조해 상세히 설명하면 다음과 같다.In view of the above problems, the present invention uses a 4 × 4 mask to determine a horizontal line, and uses compressed data obtained from the horizontal line search for the vertical line search to reduce the time for detecting a straight line. Invented a horizontal / vertical detection method, which will be described in detail with reference to the accompanying drawings.
제1도는 본 발명에 따른 그래픽 영상 인식시스템 구성도로서, 이에 도시한 바와 같이 문서화상을 받아들이는 스캐너(1)와, 그 스캐너(1)를 통해 입력받는 문서화상으로부터 그래픽 영역을 분리해내는 마이크로 프로세서 1(2)과, 입력데이타를 저장하는 메모리(5)와, 상기 프로세서 1(2)의 처리 결과를 저장하는 데이타 메모리(8) 및 그 프로세서 1(2)의 프로그램 메모리(6)와, 상기 프로세서(2)의 처리 결과를 이용하여 라인을 추출하는 프로세서 2(10)와, 그 프로세서 2(10)의 처리 결과를 저장하는 메모리(13) 및 그 프로세서 2(10)의 프로그램 메모리(12)와, 각 프로세서 1,2(2),(10)의 처리 결과 및 스캐너(1)의 출력을 모니터에 표시해주기 위한 호스트 PC(9)와, 상기 프로세서 1,2(2),(10) 및 스캐너(1)와 상기 호스트 PC(9)와 인터페이스 해주기 위한 인터페이스(3),(11),(4)와, 상기 프로세서 1,2(2),(10)간의 인터페이스를 위한 인터페이스(7)로 구성하였다.FIG. 1 is a schematic diagram of a graphic image recognition system according to the present invention. As shown in FIG. 1, a microcomputer that separates a graphic region from a
먼저, 프로세서 1(2)이 스캐너(1)를 통해 문서화상 데이타를 입력받아 메모리(5)에 저장함과 아울러 그의 프로그램 메모리(6)의 프로그램 운용에 따라 그래픽 영역의 좌표를 구해 데이타 메모리(8)에 저장함과 아울러 인터페이스(7)를 통해 프로세서 2(10)에 입력시킨다. 이 프로세서 2(10)는 그의 프로그램 메모리(12)에 따라 프로그램 운용에 따라 수평, 수직라인을 구해 메모리(13)에 저장하고, 호스트 PC(9)를 이용하여 상기 메모리(13)의 값을 인터페이스(11)를 통해 입력받아 모니터에 디스플레이할 수 있다.First, the processor 1 (2) receives the document image data through the
제4도는 본 발명에 따른 그래픽 영상의 수평, 수직라인 검출 제어흐름도로서, 이에 도시한 바와 같이 프로세서 2(10)에서 그래픽 영상의 라인을 추출한다. 스캐너(1)를 통해 입력되어 메모리(5)에 저장됨과 아울러 프로세서 1(2)에 의해 그래픽 영역이 검출되어 데이타 메모리(8)에 저장되면, 프로세서 2(10)는 상기 데이타 메모리(8)로부터 그래픽 영역의 좌표를 입력받아 상기 메모리(5)로부터 그 좌표값에 해당하는 영역의 폭(W)과 높이(H)를 구한 후 입력영상의 좌상단에 4×4 마스크를 씌운다. 여기서 마스크는 제3도에 도시한 바와 같이 수평좌표(i=0,1,2,3)와 수직좌표(j=0,1,2,3)가 4×4인 마스크를 사용한다. 마스크를 씌운 후 마스크내의 흑화소수를 구하여 그 흑화수소를 임의의 값('3')과 비교하고, 그 흑화소수와 임의의 값 비교 결과(흑화소수3),(흑화소수<3)를 압축마스크 데이타 생성부 및 수직라인 검출부에 저장하며, 마스크내의 흑화소수가 임의의 값('3')보다 큰 경우(흑화소수3)에는 마스크의 수에 해당하는 값(boxnmum)을 증가(boxnum=boxnum+1)시킨 후 마스크를 이동하여 다음 좌표에 마스크를 씌우고 마스크내의 흑화소수를 판별한다. 만약, 마스크내의 흑화소수가 임의의 값보다 작은 경우(흑화소수<3)에는 상기 마스크 수에 따른 값(boxnum)을 임계값('12')과 비교하여 큰 경우(boxnum≥12)에는 라인이 검출되었다고 판별하여 라인수(L)를 증가(L=L+1)시키고, 작은 경우(boxnum<12)에는 그 마스크 수에 따른 값(boxnum)을 초기화(boxnum=0)시켜 라인검출이 아님을 판별하며, 상기 라인(L)검출(L=L+1)후 마스크 내부의 흑화소수가 임의의 값보다 큰 연속된 마스크(boxnum=1∼boxnum≥12)중의 맨처음 마스크의 좌상단 좌표[제3도의 좌표(0,0)]와 맨 나중 마스크의 우하단 좌표[제3도의 좌표(3,3)]를 라인 좌표(H←L)에 저장한다.4 is a horizontal and vertical line detection control flow chart of the graphic image according to the present invention. As shown in FIG. 4, the
이후 전영역 조사가 끝날 때까지 마스크를 이동시키며 상기 과정을 반복하여 라인 검출하고, 전영역 조사가 끝나면 수평선 연결 처리한다. 제2도 (가) 및 (나)는 본 발명에 따른 영상조사 방향 설명도로서, 제2도 (가)는 수평라인 검출시 영상조사 방향이고, (나)는 수직라인 검출시의 영상조사 방향이다. 즉, 마스크가 4×4 마스크이므로, 이동시 4화소씩 이동시키면서 영상조사를 한다.Thereafter, the mask is moved until the end of the full-area irradiation is completed, the line is repeatedly detected, and when the full-area irradiation is completed, horizontal connection is performed. 2 (a) and (b) are explanatory diagrams of the image irradiation direction according to the present invention, and FIG. 2 (a) is the image irradiation direction when the horizontal line is detected, and (b) the image irradiation direction when the vertical line is detected. to be. That is, since the mask is a 4x4 mask, image irradiation is performed while moving by 4 pixels.
제6도 (가) 및 (나)는 본 발명에 따른 마스크에 의한 압축데이타 발생 설명도로서, 원영상이 입력되어 제3도와 같은 4×4 마스크를 씌우면 제6도의 (가)와 같이 원영상의 4× 화소가 마스크(MASK1)에 속하게 된다.6 (a) and (b) are explanatory diagrams of compressed data generation by a mask according to the present invention. When the original image is input and a 4x4 mask is applied as shown in FIG. 4 × pixels of belong to the mask MASK1.
마스크(MASK1)내의 흑화소수를 구해 그 흑화소수가 임의의 값('3') 이상이면 제6도 (나)의 압축영상(a/4,b/4)의 좌표(M1)에 흑화소값 "1"을 저장하고, 만약, 마스크(MASK1)내의 흑화소수가 임의의 값('3')보다 작으면 좌표(M1)값을 "0"으로 저장한다.If the number of black pixels in the mask MASK1 is obtained and the number of black pixels is greater than or equal to an arbitrary value ('3'), the black pixel value is determined by the coordinate M1 of the compressed image (a / 4, b / 4) of FIG. The value " 1 " is stored, and if the number of black pixels in the mask MASK1 is smaller than the arbitrary value '3', the coordinate M1 value is stored as " 0 ".
마찬가지로 이동한 마스크(MASK2)의 값을 압축영상의 좌표(M2)에 기록한다. 이와 같이 원영상(a,b) 전체를 마스크를 통해 화소를 검출하여 압축영상(a/4,b/4)를 구할 수 있다. 이렇게 수평라인 검출시 압축영상값을 구하여 수직라인 검출에서는 제2도의 (나)와 같이 마스크를 순차적으로 수직 이동시키지 않아도 상기 제6도의 (나)와 같은 압축영상의 데이타를 가지고 수직방향 데이타가 임계값 이상인지 미만인지를 판별하여 압축영상의 수직라인을 검출한 후 이 좌표값에 4배를 하여 원영상의 좌표를 구해 원영상의 수직라인을 검출한다.Similarly, the value of the moved mask MASK2 is recorded in the coordinate M2 of the compressed image. In this way, the entire compressed image (a / 4, b / 4) can be obtained by detecting the pixel through the entire image (a, b). When the horizontal line is detected, the compressed image value is obtained. In the vertical line detection, the vertical data is critical with the data of the compressed image as shown in (b) of FIG. 6 even though the mask is not moved vertically as shown in (b) of FIG. After determining whether the value is greater than or equal to the value, the vertical line of the compressed image is detected, and the coordinate of the original image is obtained by multiplying this coordinate value by 4 times to detect the vertical line of the original image.
그리고, 수평라인 검출시 수평선 연결 처리는 제8도 본 발명을 설명하기 위한 한 라인 좌표 설명도에 도시한 바와 같이 한 라인을 좌표(x0,y0),(x1,y1)으로 나타내고, 이들을 라인에 대한 2차원 배열을 사용하여 나타낸다. 즉, 라인 L[i][j](i=1∼n,j=0,1,2,3)에서 첨자[i]는 임의의 라인을 나타내고, 첨자[j=0,1,2,3]는 라인 L[i]의 x0, y0, x1, y1 좌표를 나타내게 된다. 먼저 임의의 라인 L[i]과 그의 근접라인 L[i±1]의 좌표를 각기 비교하여 연결해야할지를 판별한다.When the horizontal line is detected, the horizontal line connecting process shows one line as coordinates (x0, y0) and (x1, y1) as shown in FIG. Represented using a two-dimensional array for. That is, the subscript [i] in the line L [i] [j] (i = 1 to n, j = 0,1,2,3) represents an arbitrary line, and the subscript [j = 0,1,2,3 ] Represents the coordinates x0, y0, x1, y1 of the line L [i]. First, the coordinates of an arbitrary line L [i] and its adjacent line L [i ± 1] are compared to determine whether to be connected.
제8도는 본 발명에 따른 수평선 연결 제어흐름도로서, 먼저 라인 변수[i],[k] 플래그를 세트시킨다(i,k=1∼N) 그뒤 i=1, k=1로 하고, 그의 차가 '1'인지 [|i-k|=1]를 비교하여 그 변수[i],[k]에 따라 라인(Li),(Lk)의 근접을 판별하며, |i-k|=1로 근접일 경우 Li, Lk의 좌표 비교로 수평라인 연결인지를 판별하고, 제5도의 (가) 내지 (바)의 경우와 같은 경우에는 라인좌표값을 조저한 후 라인[Lk)의 좌표를 삭제함과 아울러 그 라인 변수[k] 플래그를 "0"으로 없애게 된다. 근접라인[|i-k|=1]이 아닐 경우, 두 라인 Li, Lk가 제5도의 (가) 내지 (바)와 같은 경우가 아닐때 및 좌표조정 후 k값을 증가(k=k+1)시켜 그 k=k+1의 플래그가 "0"인지를 판별하여 플래그 [k]=0가 아닐때 kN이 될 때까지 L(i=1) 라인과 Lk를 비교 판별하며 그리고, i=i+1로 증가시켜 i≤N가 될 때까지 상기 과정을 반복 수행하여 처리한다.8 is a horizontal connection control flow diagram according to the present invention. First, the line variables [i] and [k] are set (i, k = 1 to N), and then i = 1 and k = 1, and the difference is' 1 'and [| ik | = 1] are compared and the proximity of lines Li and Lk is determined according to the variables [i] and [k]. If | ik | = 1, the proximity of Li and Lk is determined. It is determined whether the horizontal line is connected by comparing the coordinates of, and in the case of (a) to (bar) of FIG. 5, after adjusting the line coordinates, the coordinates of the line [Lk] are deleted and the line variable [k] is deleted. ] Flag is removed with "0". If not adjacent line [| ik | = 1], increase the value of k when two lines Li and Lk are not the same as (a) to (bar) in FIG. 5 and after coordinate adjustment (k = k + 1). Determine whether the flag of k = k + 1 is "0" and k when the flag [k] is not equal to 0. The L (i = 1) line and Lk are compared and discriminated until N is reached, and the process is performed by repeating the above process until i = N by increasing i = i + 1.
예를들어 제5도의 (가)와 같은 경우에는For example, in case of
L[i][0] < L[k][0] ……………………………………… 식 (1)L [i] [0] <L [k] [0]. … … … … … … … … … … … … … … Formula (1)
L[i][3] = L[k][1]-1 ………………………………… 식 (2)L [i] [3] = L [k] [1] -1... … … … … … … … … … … … … Formula (2)
L[i][2] < L[k][2] ……………………………………… 식 (3)L [i] [2] <L [k] [2]. … … … … … … … … … … … … … … Formula (3)
위 식(1),(2),(3)을 만족하므로 라인 좌표값을 다음식과 같이 조정한다.Since the above equations (1), (2) and (3) are satisfied, the line coordinate values are adjusted as follows.
L[i][0] = L[k][0] ……………………………………… 식 (4)L [i] [0] = L [k] [0]. … … … … … … … … … … … … … … Formula (4)
L[i][1] = L[k][1] ……………………………………… 식 (5)L [i] [1] = L [k] [1]. … … … … … … … … … … … … … … Equation (5)
L[i][2] = L[k][2] ……………………………………… 식 (6)L [i] [2] = L [k] [2]. … … … … … … … … … … … … … … Formula (6)
L[i][3] = L[k][3] ……………………………………… 식 (7)L [i] [3] = L [k] [3]. … … … … … … … … … … … … … … Formula (7)
윗 식과 같이 조정한 후 제5도 (가)의 우측과 같이 라인 1i와 1k를 하나의 라인으로 판별한다. 그리고, 제5도의 (다) 내지 (마)와 같은 경우에는 연속되는 화소(pixel)가 8화소차 이하일 경우에도 마찬가지로 (다) 내지 (마)의 우측과 같이 조정 판별한다.After adjusting as described above, the lines 1i and 1k are identified as one line as shown in the right side of FIG. In the case of (c) to (e) in FIG. 5, the adjustment is discriminated similarly to the right side of (c) to (e) even when the consecutive pixels are 8 pixels or less.
이상에서 설명한 바와 같이 본 발명은 문서영상의 그래픽 영역(특히 표영역)에서 4×4 마스크를 이용하여 수평라인을 검출하고, 그 수평라인의 근접라인을 판별하여 조정함과 아울러 압축영상 데이타를 만든 후 그 압축영상 데이타를 이용해 수직라인을 검출하므로, 그래픽 영역내의 문자를 인식함과 아울러 직선 검출시간을 단축시킬 수 있는 효과가 있다.As described above, the present invention detects a horizontal line using a 4 × 4 mask in a graphic region (especially a table region) of a document image, determines and adjusts adjacent lines of the horizontal line, and generates compressed image data. Since the vertical line is detected using the compressed image data, it is possible to recognize the characters in the graphic area and to shorten the linear detection time.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1019900013412A KR970008521B1 (en) | 1990-08-29 | 1990-08-29 | Method of detecting horizontal/vertical line of graphics |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1019900013412A KR970008521B1 (en) | 1990-08-29 | 1990-08-29 | Method of detecting horizontal/vertical line of graphics |
Publications (2)
Publication Number | Publication Date |
---|---|
KR920004958A KR920004958A (en) | 1992-03-28 |
KR970008521B1 true KR970008521B1 (en) | 1997-05-24 |
Family
ID=19302872
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1019900013412A KR970008521B1 (en) | 1990-08-29 | 1990-08-29 | Method of detecting horizontal/vertical line of graphics |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR970008521B1 (en) |
-
1990
- 1990-08-29 KR KR1019900013412A patent/KR970008521B1/en not_active IP Right Cessation
Also Published As
Publication number | Publication date |
---|---|
KR920004958A (en) | 1992-03-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5075895A (en) | Method and apparatus for recognizing table area formed in binary image of document | |
US7457440B2 (en) | Method of determining usability of a document image and an apparatus therefor | |
JP2940936B2 (en) | Tablespace identification method | |
CN100369049C (en) | Precise dividing device and method for grayscale character | |
JP3209746B2 (en) | Character position confirmation apparatus and method used in character recognition system | |
KR970008521B1 (en) | Method of detecting horizontal/vertical line of graphics | |
US4242734A (en) | Image corner detector using Haar coefficients | |
KR880011690A (en) | Image Contour Detection Device | |
KR940009712B1 (en) | Device for detecting character direction in document | |
JPS60189084A (en) | Character area extracting circuit | |
US5347598A (en) | Image processing apparatus | |
JPS63282889A (en) | Image processing method | |
JP3299873B2 (en) | Image processing apparatus and image processing method | |
JP2639165B2 (en) | Character extraction device | |
JPS6284391A (en) | Extraction system for narrow rectangle | |
JPS6327752B2 (en) | ||
JP2937607B2 (en) | Layout creation device | |
JPH03213053A (en) | Original inclination detector | |
KR940011699B1 (en) | Method of extracting the image contour from binary image signal | |
JPH01205287A (en) | Character line inclination detector | |
JPH0266681A (en) | Drawing processor | |
KR910009929B1 (en) | Method for extracting document region for document recognition | |
JPH0628520A (en) | Character recognition device | |
JPH1185986A (en) | Image processor | |
JPH0554187A (en) | Method for detecting character pattern inclination |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
G160 | Decision to publish patent application | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20060929 Year of fee payment: 10 |
|
LAPS | Lapse due to unpaid annual fee |