JP2789835B2 - Table frame detection method and device - Google Patents

Table frame detection method and device

Info

Publication number
JP2789835B2
JP2789835B2 JP3067661A JP6766191A JP2789835B2 JP 2789835 B2 JP2789835 B2 JP 2789835B2 JP 3067661 A JP3067661 A JP 3067661A JP 6766191 A JP6766191 A JP 6766191A JP 2789835 B2 JP2789835 B2 JP 2789835B2
Authority
JP
Japan
Prior art keywords
contour
distance
memory
connected component
circumscribed rectangle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP3067661A
Other languages
Japanese (ja)
Other versions
JPH04280391A (en
Inventor
昌昭 水野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP3067661A priority Critical patent/JP2789835B2/en
Publication of JPH04280391A publication Critical patent/JPH04280391A/en
Application granted granted Critical
Publication of JP2789835B2 publication Critical patent/JP2789835B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、画像入力装置から入力
された文書画像・帳票画像から表枠を検出・抽出する方
法及び装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for detecting and extracting a table frame from a document image / form image input from an image input device.

【0002】[0002]

【従来の技術】帳票などの表形式の文書を読みとるため
には、まず、スキャナーなどの画像入力装置を用いて、
一般帳票文書を2値に量子化された帳票画像として入力
し、その後、表を構成する罫線を抽出する必要がある。
2. Description of the Related Art To read a tabular document such as a form, first, an image input device such as a scanner is used.
It is necessary to input a general form document as a form image quantized into binary, and then to extract ruled lines forming a table.

【0003】従来、このような帳票画像では、その主要
な構成要素である罫線が規則正しく並んでいること、及
び罫線は直線として表現されていることを利用して表構
造の抽出が行われていた。
Conventionally, in such a form image, a table structure has been extracted by taking advantage of the fact that ruled lines, which are main components, are regularly arranged and that ruled lines are expressed as straight lines. .

【0004】このような方式においては、入力画像の傾
きに非常に敏感であり、特に罫線が細い線分で描かれて
いる場合において、罫線の抽出が困難であるという問題
点を有している。
[0004] Such a system is very sensitive to the inclination of the input image, and has a problem that it is difficult to extract the ruled line particularly when the ruled line is drawn by a thin line segment. .

【0005】本発明の目的は、従来の上記課題を解決す
るために、表枠は長方形状の矩形として規則正しく配置
されることから、表の内側の輪郭線は矩形に近い形状を
していることに着目し、直線成分を検出する代わりに、
矩形に近い形状の輪郭線を抽出することにより、傾きに
対して安定にかつ容易に表枠の抽出を行うことを可能と
した表枠抽出手法を提供することにある。
[0005] An object of the present invention is to solve the above-mentioned conventional problems, because the table frame is regularly arranged as a rectangular rectangle, so that the outline inside the table has a shape close to a rectangle. And instead of detecting the linear component,
It is an object of the present invention to provide a table frame extracting method capable of stably and easily extracting a table frame with respect to an inclination by extracting a contour having a shape close to a rectangle.

【0006】本発明の他の目的は、連結する画素の輪郭
線のみを追跡することにより、実質的に走査する必要の
ある画素数を削減し、その結果処理に要する時間が改善
された表枠検出手法を提供することにある。
Another object of the present invention is to reduce the number of pixels that need to be scanned substantially by tracing only the contours of connected pixels, thereby improving the time required for processing. It is to provide a detection method.

【0007】[0007]

【課題を解決するための手段】本発明の表枠検出方法に
よれば、2値に量子化された文書・帳票等の画像からの
表枠検出に際し、まず黒画素の連結成分を検出する。そ
して、ここで検出した連結成分の輪郭線を求める。次
に、この輪郭線の外接矩形を求める。ここで外接矩形と
は、辺が水平方向または垂直方向で、かつ輪郭線のもっ
とも外側で接する長方形であると定義する。輪郭線及び
外接矩形の具体例を図1に示す。次に、輪郭線を構成す
る各々の画素と外接矩形との距離を計算し、その値を積
算する。輪郭線を構成するすべての画素に対して積算処
理を行い、輪郭線の周囲長と積算値とを比較し、表枠で
あるか否かを判定する。この表枠判定のためのアルゴリ
ズムを図2に示す。
According to the table frame detecting method of the present invention, when detecting a table frame from a binary quantized image of a document or form, a connected component of black pixels is first detected. Then, the contour of the connected component detected here is obtained. Next, a circumscribed rectangle of the contour is obtained. Here, the circumscribed rectangle is defined as a rectangle whose side is in the horizontal or vertical direction and which is in contact with the outermost side of the outline. FIG. 1 shows specific examples of the outline and the circumscribed rectangle. Next, the distance between each pixel constituting the contour and the circumscribed rectangle is calculated, and the values are integrated. The integration processing is performed on all the pixels constituting the outline, the peripheral length of the outline is compared with the integrated value, and it is determined whether or not the pixel is a table frame. FIG. 2 shows an algorithm for this table frame determination.

【0008】本発明の表枠検出装置は、2値に量子化さ
れた文書画像・帳票画像を記憶するメモリと、黒画素の
連結成分を抽出する連結成分切り出し部と、切り出した
連結成分の輪郭線を追跡する輪郭線追跡部と、追跡した
輪郭線を記憶するメモリと、切り出した連結成分の外接
矩形を求めるための外接矩形検出部と、外接矩形を記憶
するためのメモリと、輪郭線上の画素と外接矩形の辺と
の距離を求める距離検出部と、距離を積算する距離積算
部と、積算距離の値と輪郭線の周囲長と所定のいき値と
を比較し選択する比較選択部と、選択された表枠データ
を記憶する表枠記憶部と、各メモリからのデータ出力及
び各処理のタイミングを制御するタイミング制御部とを
具備する。
A table frame detecting apparatus according to the present invention includes a memory for storing a binary-quantized document image / form image, a connected component extracting section for extracting a connected component of black pixels, and a contour of the extracted connected component. A contour tracing unit for tracing a line, a memory for storing the tracing contour, a circumscribed rectangle detecting unit for obtaining a circumscribed rectangle of the cut connected component, a memory for storing the circumscribed rectangle, A distance detection unit that calculates the distance between the pixel and the side of the circumscribed rectangle, a distance integration unit that integrates the distance, and a comparison selection unit that compares and selects the value of the integrated distance, the perimeter of the contour line, and a predetermined threshold. , A table frame storage unit for storing selected table frame data, and a timing control unit for controlling data output from each memory and timing of each process.

【0009】[0009]

【実施例】以下に本発明の実施例について図面を参照し
ながら説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0010】図3は、表枠検出方法の概略を示したもの
である。以下、適宜、式を用いながら処理方法を説明す
る。原画像で黒画素の連結成分を分離し、各々の連結成
分に対して輪郭線を求める。次にこの連結成分の外接矩
形を求める。外接矩形は、水平及び垂直方向の線分から
なり、輪郭線の上端,下端,左端,右端にそれぞれ接す
るものであると定義する。従って、輪郭線を順に追跡
し、追跡している輪郭画素の座標の、それぞれ横軸方
向,縦軸方向の最大値及び最小値を検出することによ
り、外接矩形の座標を検出することができる。なお、輪
郭線を求める手続きには、公知の手法を用いることがで
きる。
FIG. 3 shows an outline of a table frame detection method. Hereinafter, the processing method will be described using formulas as appropriate. The connected components of black pixels are separated from the original image, and an outline is obtained for each connected component. Next, a circumscribed rectangle of the connected component is obtained. The circumscribed rectangle is defined by horizontal and vertical line segments and tangent to the upper end, lower end, left end, and right end of the contour line, respectively. Therefore, the coordinates of the circumscribed rectangle can be detected by sequentially tracing the contour and detecting the maximum value and the minimum value of the coordinates of the contour pixel being tracked in the horizontal axis direction and the vertical axis direction, respectively. A known method can be used for the procedure for obtaining the contour.

【0011】図4は、輪郭線上の一画素と外接矩形との
距離を求める手法を説明するものである。まず、輪郭線
上の一画素に対して、輪郭線の外接矩形の4辺との距離
を求める。本実施例では、輪郭線と外接矩形との距離を
求めるのに、ユークリッド距離を用いている。この距離
の定義法には、この他の距離の定義を用いることも可能
である。以上の手順を式で表現すると、以下のようにな
る。今、外接矩形の左上座標は(gx1,gy1)、右下座
標は(gx2,gy2)であるとする。また、現在調べてい
る輪郭画素の座標は(rx ,ry)であるとする。この
とき、外接矩形上辺との距離をδ1 、下辺との距離をδ
2、左辺との距離をδ3、右辺との距離をδ4 とすると、
それぞれの距離は次のように表される。
FIG. 4 illustrates a method for obtaining the distance between one pixel on the contour and the circumscribed rectangle. First, the distance between one pixel on the contour and four sides of the circumscribed rectangle of the contour is determined. In this embodiment, the Euclidean distance is used to determine the distance between the outline and the circumscribed rectangle. As a method of defining this distance, other definitions of the distance can be used. The above procedure is expressed by the following equation. Now, it is assumed that the upper left coordinate of the circumscribed rectangle is (g x1 , g y1 ) and the lower right coordinate is (g x2 , g y2 ). The coordinates of the contour pixels which are currently examined is assumed to be (r x, r y). At this time, the distance to the upper side of the circumscribed rectangle is δ 1 , and the distance to the lower side is δ
2 , if the distance to the left side is δ 3 and the distance to the right side is δ 4 ,
Each distance is expressed as follows.

【0012】[0012]

【数1】(Equation 1)

【0013】 [0013]

【0014】なお、輪郭線と外接矩形の関係から、gx1
≦rx ≦gx2、gy1≦ry≦gy2である。この4つの距
離の中で、最小のδi (i=l−4)をその輪郭画素に
対する外接矩形との距離Δと定義する。すなわち、
Note that, from the relationship between the contour and the circumscribed rectangle, g x1
≦ r x ≦ g x2 , g y1 ≦ r y ≦ g y2 . Of these four distances, the minimum δ i (i = 1-4) is defined as the distance Δ between the outline pixel and the circumscribed rectangle. That is,

【数2】(Equation 2)

【0015】 [0015]

【0016】となる。## EQU1 ##

【0017】次に、表枠はおおむね行方向,列方向に並
んでいるので、表枠の輪郭線はその包含矩形にほぼ接す
ることが期待できる。従って、当該図形が表枠であれ
ば、各々の輪郭線上の一画素と外接矩形との距離を積算
した値は十分小さいことが期待できる。この積算値を差
分値と定義する。また、表枠は文字の大きさに比べて十
分大きいので、輪郭線の周囲長は十分大きいことが期待
できる。従って、前記差分値と輪郭線周囲長との比は十
分大きくなることが期待できる。この比と所定のいき値
との比較により表枠の抽出を行う。
Next, since the table frames are arranged generally in the row direction and the column direction, the outline of the table frame can be expected to almost touch the containing rectangle. Therefore, if the figure is a table frame, a value obtained by integrating the distance between one pixel on each contour and the circumscribed rectangle can be expected to be sufficiently small. This integrated value is defined as a difference value. In addition, since the size of the table frame is sufficiently larger than the size of the character, it can be expected that the perimeter of the outline is sufficiently large. Therefore, it can be expected that the ratio between the difference value and the contour perimeter is sufficiently large. The table frame is extracted by comparing this ratio with a predetermined threshold value.

【0018】この手順を式で表現すると、以下のように
なる。前記輪郭画素と外接矩形との距離Δの積算値、す
なわち差分値Δtotal は、
This procedure is represented by the following equation. The integrated value of the distance Δ between the contour pixel and the circumscribed rectangle, that is, the difference value Δ total is

【数3】(Equation 3)

【0019】 [0019]

【0020】となる。ここで、Σは輪郭線を構成するす
べての画素に対して行う。
## EQU1 ## Here, Σ is performed for all pixels constituting the contour.

【0021】輪郭線の周囲長を求める手法については公
知の手法を用いることができる。たとえば、輪郭線の周
囲長r1 は、画素間の距離を上下・左右方向は1単位、
斜め方向は√2単位であると定義して、隣接輪郭画素と
の位置関係から輪郭線の追跡を行う時に算出できる。式
を用いて表すと、次のようになる。輪郭線の周囲長をr
1 、隣接する2画素の座標をr1(rx1,ry1)、r
2(rx2,ry2)とすると、
A known method can be used as a method for obtaining the perimeter of the contour line. For example, the perimeter r 1 of the contour line indicates that the distance between pixels is one unit in the vertical and horizontal directions,
The oblique direction is defined as √2 units, and can be calculated when the contour is tracked from the positional relationship with the adjacent contour pixels. This can be expressed by the following equation. The perimeter of the contour is r
1 , the coordinates of two adjacent pixels are represented by r 1 (r x1 , ry1 ), r
2 (r x2 , r y2 )

【数4】(Equation 4)

【0022】 [0022]

【0023】表枠の判定は、上記輪郭線周囲長r1 と前
記差分値Δtotalとの比r1/Δtotal が所定のいき値α
を越えない時に、当図形は表枠であると判定する。
The determination of the table frame is performed by determining the ratio r 1 / Δ total between the contour line perimeter r 1 and the difference value Δ total to a predetermined threshold value α.
Is not exceeded, it is determined that the figure is a table frame.

【0024】次に、第2の発明について説明する。第2
の発明は第1の発明に使用される装置である。図5に、
本発明における表枠検出装置の一実施例を示す機能ブロ
ック図を示す。
Next, the second invention will be described. Second
The present invention is an apparatus used in the first invention. In FIG.
FIG. 2 is a functional block diagram illustrating an embodiment of a table frame detection device according to the present invention.

【0025】この表枠検出装置は、パタンメモリ1,連
結成分切り出し部2,外接矩形メモリ3,輪郭線追跡部
4,輪郭線メモリ5,距離計算部6,距離積算部7,距
離メモリ8,比較選択部9,表枠記憶部10,タイミン
グ制御部11により構成されている。
This table frame detecting apparatus comprises a pattern memory 1, a connected component cutout unit 2, a circumscribed rectangle memory 3, a contour tracking unit 4, a contour memory 5, a distance calculation unit 6, a distance integration unit 7, a distance memory 8, It comprises a comparison and selection section 9, a table frame storage section 10, and a timing control section 11.

【0026】パタンメモリ1は、2値に量子化された文
書画像・帳票画像を記憶する。連結成分切り出し部2
は、パタンメモリ1からバイナリイメージなどの画像形
式で送られる画像データを解析して、画像内の黒画素連
結成分の切り出しを行う。外接矩形メモリ3は、連結成
分切り出し部2によって求められた連結図形の外接矩形
の座標値を記憶する。輪郭線追跡部4は、連結成分切り
出し部2によって切り出された連結成分の画像データに
対して輪郭線追跡を行い、輪郭線情報を出力する。輪郭
線情報の表現方法としては、たとえばチェインコードな
どのデータ形式を用いることができる。輪郭線メモリ5
は、輪郭線追跡部4によって生成された輪郭線情報を記
憶する。距離計算部6は、輪郭線メモリ5と外接矩形メ
モリ3からそれぞれ輪郭線データと外接矩形座標データ
を取り込み、その距離を算出する。距離積算部7は、距
離メモリ8を作業メモリとして用いながら距離検出部6
によって得られた距離を積算する。比較判定部9は、距
離積算部7によって得られた距離の積算値、すなわち差
分値と、輪郭線メモリ5に記憶された輪郭線の周囲長と
の比を計算し、所定のいき値と比較する。その結果、輪
郭線が表枠であると判定された場合に、輪郭線情報を所
定の形式、たとえばチェインコード形式で表枠記憶部1
0に転送する。
The pattern memory 1 stores a binary-quantized document image / form image. Connected component extraction unit 2
Analyzes image data sent from the pattern memory 1 in an image format such as a binary image, and cuts out black pixel connected components in the image. The circumscribed rectangle memory 3 stores the coordinate values of the circumscribed rectangle of the connected graphic obtained by the connected component cutout unit 2. The contour tracing section 4 performs contour tracing on the image data of the connected component cut out by the connected component cutout section 2 and outputs contour information. As a method of expressing the outline information, for example, a data format such as a chain code can be used. Contour memory 5
Stores the contour information generated by the contour tracking unit 4. The distance calculator 6 fetches the contour data and the circumscribed rectangle coordinate data from the contour memory 5 and the circumscribed rectangle memory 3, respectively, and calculates the distance. The distance accumulating section 7 uses the distance detecting section 6 while using the distance memory 8 as a working memory.
The distance obtained by is integrated. The comparison determining unit 9 calculates the ratio of the integrated value of the distance obtained by the distance integrating unit 7, that is, the difference value, to the peripheral length of the contour stored in the contour memory 5, and compares the ratio with a predetermined threshold. I do. As a result, when it is determined that the outline is a table frame, the outline information is stored in a table frame storage unit 1 in a predetermined format, for example, a chain code format.
Transfer to 0.

【0027】連結成分切り出し部2は、ラベルを記憶す
るメモリと、走査中の画素の座標を記憶するためのメモ
リと、ラスタ方向に画素走査を行う機構と、黒画素の存
在を判定する機構と、走査している画素及び当画素に隣
接する8画素の内容を読み取る機構と、隣接する8個の
画素にすでにラベルが割り振られている黒画素が存在す
る場合に、それと同じラベルを走査している画素に割り
付ける処理を行う機構と、隣接する8個の画素に2つ以
上のラベルが割り振られている場合に、これらのラベル
は等しいものとしてラベルを記憶するメモリに記憶する
機構と、メモリに記憶されたラベルの関係を参照して等
しいラベルを書き換える機構と、以上のメモリ,機構の
動作を制御するためのシーケンサなどの機構を用いて実
現できる。黒画素の存在を判定する機構は、画素データ
の該当ビットが0であるか1であるかを判定することに
よって実現できる。
The connected component cutout unit 2 includes a memory for storing labels, a memory for storing coordinates of pixels being scanned, a mechanism for performing pixel scanning in the raster direction, and a mechanism for determining the presence of black pixels. A mechanism for reading the content of the pixel being scanned and the eight pixels adjacent to the pixel, and scanning the same label when there is a black pixel whose label has already been allocated to the eight adjacent pixels. A mechanism for performing a process of allocating to a certain pixel, a mechanism for storing two or more labels in the memory that stores the labels as equal when eight adjacent pixels are allocated, and a mechanism for storing the labels in the memory. This can be realized by using a mechanism for rewriting the same label by referring to the relationship between the stored labels, and a mechanism such as a memory and a sequencer for controlling the operation of the mechanism. The mechanism for determining the presence of a black pixel can be realized by determining whether the corresponding bit of the pixel data is 0 or 1.

【0028】輪郭追跡部4は、ラスタ方向に画素走査を
行う機構と、走査を開始した画素及び走査中の画素の座
標を記憶するためのメモリと、走査中の画素が黒画素で
あるかを判定し、黒画素である場合に、走査している画
素及び当画素に隣接する8画素の内容を読み取る機構
と、読み取った隣接する8つの画素を所定の順序、例え
ば直前に走査した画素から時計回りに90度の角度をな
す画素を始点として時計回り、に走査し黒画素を探索す
ることにより輪郭線上の点を求める機構と、前記の輪郭
線上の点の探索で見つかった輪郭点に順次走査中の画素
の座標を置き換える機構と、走査中の画素の座標と走査
を開始した画素の座標が一致することを検出することに
より輪郭線の追跡が終了したことを判定し、輪郭追跡が
終了するまで輪郭点の座標の追跡を継続するように制御
を行うための機構と、以上のメモリ,機構の動作を制御
するためのシーケンサなどの機構を用いて実現できる。
The contour tracing unit 4 includes a mechanism for performing pixel scanning in the raster direction, a memory for storing the coordinates of the pixel that has started scanning and the coordinates of the pixel being scanned, and whether the pixel being scanned is a black pixel. If the pixel is determined to be a black pixel, a mechanism for reading the pixel being scanned and the contents of eight pixels adjacent to the pixel being scanned, and a mechanism for reading the read eight adjacent pixels in a predetermined order, for example, starting from the pixel scanned immediately before A mechanism for finding a point on the contour by scanning clockwise and searching for a black pixel starting from a pixel forming an angle of 90 degrees around the pixel, and sequentially scanning contour points found in the search for the point on the contour A mechanism that replaces the coordinates of the pixel in the middle, and by detecting that the coordinates of the pixel being scanned and the coordinates of the pixel that started the scanning match, determines that the contour tracking has ended, and the contour tracking ends. Contour point up to It can be realized by using a mechanism for performing control so as to continue the tracking of the coordinates, or more memory, a mechanism such as a sequencer for controlling the operation of the mechanism.

【0029】距離計算部6は、次の機構を用いて実現す
ることができる。まず、輪郭線上の一点と外接矩形の一
辺との距離を求める機構は、加算器,減算器,乗算器,
及び平方根を求める機構を用いて実現することができ
る。この機構に、距離を求める機構の結果を記憶するた
めのレジスタと、レジスタの内容の大小を比較する比較
器と、比較器の結果に従ってデータを選択する選択器を
付加することにより、距離計算部6を実現することがで
きる。
The distance calculator 6 can be realized by using the following mechanism. First, the mechanism for calculating the distance between one point on the contour and one side of the circumscribed rectangle is an adder, a subtractor, a multiplier,
And a mechanism for finding the square root. By adding to this mechanism a register for storing the result of the mechanism for obtaining the distance, a comparator for comparing the contents of the register, and a selector for selecting data in accordance with the result of the comparator, the distance calculation unit is added. 6 can be realized.

【0030】距離積算部7は、例えばアキュムレータを
用いて実現することができる。
The distance integrating section 7 can be realized by using, for example, an accumulator.

【0031】比較選択部9は、入力データの大小比較を
行う比較器と、比較器の結果に従ってデータを選択する
選択器を用いて実現することができる。
The comparison and selection section 9 can be realized by using a comparator for comparing the magnitude of input data and a selector for selecting data according to the result of the comparator.

【0032】上記の各処理部は、各メモリやレジスタを
マイクロコンピュータなどが直接アクセスするメモリと
することにより、各部の処理をソフトウェアで構成し、
マイクロコンピュータなどで実現することも可能であ
る。
Each of the processing units described above is configured with software by directly configuring each memory and register as a memory directly accessed by a microcomputer or the like,
It can also be realized by a microcomputer or the like.

【0033】各メモリからのデータの転送タイミングと
各処理の実行タイミングをタイミング制御部11により
集中的に制御することにより、図形切り出し部2から取
り出された複数の連結図形それぞれに対して表枠判定を
行うことができる。以下、タイミング制御部11の制御
手順を例を挙げて示す。
The timing of data transfer from each memory and the timing of execution of each process are intensively controlled by the timing control unit 11 so that a plurality of connected figures extracted from the figure cutout unit 2 are subjected to table frame determination. It can be performed. Hereinafter, a control procedure of the timing control unit 11 will be described with an example.

【0034】まず、外接矩形メモリ3,輪郭線メモリ
5,距離メモリ8を初期化(クリア)する。次に、パタ
ンメモリ1から一画面分の画像データを連結成分切り出
し部2に転送する。連結成分切り出し部2は画像のスキ
ャンを開始し、連結成分の切り出しを開始する。ある連
結成分が切り出されたなら、連結成分切り出し部2はタ
イミング制御部11に連結成分切り出し信号を送り、自
身の処理を中断する。次の連結成分の切り出しは、タイ
ミング制御部から送られてくる連結成分切り出し継続信
号をトリガとして再開される。連結成分切り出し信号は
外接矩形メモリ3にも送られ、外接矩形メモリ3への記
録タイミングとなる。切り出された図形データは輪郭線
追跡部4に送られ、輪郭線の追跡処理が行われる。輪郭
線の追跡処理が終了すると、タイミング制御部11及び
輪郭線メモリ5に輪郭線追跡信号が送られ、この信号に
同期して輪郭線メモリに輪郭線情報が記録される。
First, the circumscribed rectangle memory 3, contour line memory 5, and distance memory 8 are initialized (cleared). Next, image data for one screen is transferred from the pattern memory 1 to the connected component cutout unit 2. The connected component cutout unit 2 starts scanning an image and starts cutting out connected components. When a certain connected component is cut out, the connected component cutout unit 2 sends a connected component cutout signal to the timing control unit 11 and interrupts its own processing. The extraction of the next connected component is restarted with the connected component extraction continuation signal sent from the timing control unit as a trigger. The connected component cutout signal is also sent to the circumscribed rectangular memory 3, and the recording timing for the circumscribed rectangular memory 3 is reached. The cut-out graphic data is sent to the contour line tracking unit 4, and the contour line tracking process is performed. When the contour tracing process is completed, a contour tracing signal is sent to the timing controller 11 and the contour memory 5, and the contour information is recorded in the contour memory in synchronization with this signal.

【0035】次に、輪郭線メモリ5から輪郭線上の点の
座標値が順次距離計算部6に送られる。第1の発明の手
順に従い距離を算出し積算処理を行う。輪郭線メモリ5
からすべての輪郭座標の転送が終了すると、輪郭線メモ
リ5から輪郭座標信号が比較選択部9及びタイミング制
御部11に送られ、切り出し図形の判定処理が行われ
る。判定処理の結果、切り出し図形が表枠である場合
は、比較選択部9は輪郭線メモリ5に輪郭線出力信号を
送信し、該当輪郭線情報を表枠記憶部10に転送する。
表枠判定処理が終了すると、判定終了信号がタイミング
制御部11に送られる。タイミング制御部は判定終了信
号が入力されると、次の連結成分の判定処理を開始する
ため、外接矩形メモリ3,輪郭線メモリ5,距離メモリ
8の初期化を行い、連結成分切り出し部2に連結成分切
り出し継続信号を送出し、次の連結成分の切り出し処理
の再開を指示する。連結成分切り出し部2は、連結成分
切り出し継続信号が送られると、切り出し済みの連結成
分に切り出し・判定済みの印をつけ、次の連結成分の探
索を再開する。
Next, coordinate values of points on the contour line are sequentially sent from the contour line memory 5 to the distance calculating unit 6. The distance is calculated and integrated according to the procedure of the first invention. Contour memory 5
When the transfer of all the outline coordinates is completed, the outline coordinate signal is sent from the outline memory 5 to the comparison / selection unit 9 and the timing control unit 11, and the judgment processing of the cut-out figure is performed. As a result of the determination processing, when the cut-out figure is a table frame, the comparison and selection unit 9 transmits a contour output signal to the contour memory 5 and transfers the corresponding contour information to the table frame storage unit 10.
When the table frame determination processing ends, a determination end signal is sent to the timing control unit 11. When the timing control unit receives the determination end signal, the timing control unit initializes the circumscribed rectangle memory 3, the contour memory 5, and the distance memory 8 to start the next connected component determination process. A connected component cutout continuation signal is transmitted to instruct the restart of the next connected component cutout process. When the connected component cutout continuation signal is sent, the connected component cutout unit 2 marks the cutout connected component as cutout / determined, and restarts the search for the next connected component.

【0036】パタンメモリ1内の画像全面が探索された
なら、連結成分切り出し部2は連結成分切り出し終了信
号を送出し、すべての処理を終了する。
When the entire image in the pattern memory 1 has been searched, the connected component cutout unit 2 sends a connected component cutout end signal and ends all the processing.

【0037】[0037]

【発明の効果】以上に述べたように、連結する黒画素成
分を一つの連結する図形領域とみなし、その輪郭線の形
状・大きさを評価することにより、処理手数が少なく、
かつ入力画像の傾きに対しても安定に表枠の抽出を行う
ことができる。
As described above, the connected black pixel components are regarded as one connected graphic area, and the shape and size of the outline are evaluated, thereby reducing the number of processing steps.
In addition, it is possible to stably extract the table frame even with respect to the inclination of the input image.

【図面の簡単な説明】[Brief description of the drawings]

【図1】図形に対する輪郭線及び外接矩形の定義を説明
するための図である。
FIG. 1 is a diagram for explaining the definition of a contour line and a circumscribed rectangle for a graphic;

【図2】表枠判定アルゴリズムを示すための図である。FIG. 2 is a diagram illustrating a table frame determination algorithm.

【図3】本表枠検出手法の手順の概略を示すための図で
ある。
FIG. 3 is a diagram showing an outline of a procedure of the present table frame detection method.

【図4】切り出された図形の輪郭線の、輪郭線の外接矩
形に対する差分値を計算する手法について説明するため
の図である。
FIG. 4 is a diagram for explaining a method of calculating a difference value between a contour of a cut-out graphic and a circumscribed rectangle of the contour.

【図5】本発明における表枠検出装置の一実施例を示す
機能ブロック図である。
FIG. 5 is a functional block diagram showing an embodiment of a table frame detection device according to the present invention.

【符号の説明】[Explanation of symbols]

1 パタンメモリ 2 連結成分切り出し部 3 外接矩形メモリ 4 輪郭線追跡部 5 輪郭線メモリ 6 距離計算部 7 距離積算部 8 距離メモリ 9 比較選択部 10 表枠記憶部 11 タイミング制御部 REFERENCE SIGNS LIST 1 pattern memory 2 connected component cutout unit 3 circumscribed rectangle memory 4 contour tracking unit 5 contour memory 6 distance calculation unit 7 distance integration unit 8 distance memory 9 comparison selection unit 10 table frame storage unit 11 timing control unit

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】2値に量子化された文書画像・帳票画像の
表枠を検出する方法において、画素の連結成分を一つの
領域とみなし、その連結成分の輪郭線を求め、その輪郭
線の外接矩形と輪郭線上の画素との距離を輪郭線上の各
画素に対して累積し、累積値を輪郭線と外接矩形の差分
値とし、前記差分値と輪郭線の周囲長との比と、所定の
いき値との比較により表枠を検出する表枠検出方法。
In a method for detecting a table frame of a document image / form image quantized to binary, a connected component of pixels is regarded as one area, a contour of the connected component is obtained, and a contour of the connected component is determined. The distance between the circumscribed rectangle and the pixel on the contour is accumulated for each pixel on the contour, and the accumulated value is defined as a difference value between the contour and the circumscribed rectangle. A table frame detection method for detecting a table frame by comparing the threshold value with the threshold value.
【請求項2】2値に量子化された文書画像・帳票画像を
記憶するメモリと、黒画素の連結成分を抽出する連結成
分切り出し部と、切り出した連結成分の輪郭線を追跡す
る輪郭線追跡部と、追跡した輪郭線を記憶するメモリ
と、切り出した連結成分の外接矩形を求めるための外接
矩形検出部と、外接矩形を記憶するためのメモリと、輪
郭線上の画素と外接矩形の辺との距離を求める距離検出
部と、距離を積算する距離積算部と、積算距離の値と輪
郭線の周囲長と所定のいき値とを比較し選択する比較選
択部と、選択された表枠データを記憶する表枠記憶部
と、各メモリからのデータ出力及び各処理のタイミング
を制御するタイミング制御部を具備することを特徴とす
る表枠検出装置。
2. A memory for storing a binary-quantized document image / form image, a connected component extracting unit for extracting a connected component of a black pixel, and a contour tracing for tracing the contour of the cut connected component. Part, a memory for storing the tracked contour, a circumscribed rectangle detector for obtaining a circumscribed rectangle of the cut-out connected component, a memory for storing the circumscribed rectangle, pixels on the contour and sides of the circumscribed rectangle. A distance detecting unit for calculating the distance of the distance, a distance integrating unit for integrating the distance, a comparing and selecting unit for comparing and selecting the value of the integrated distance, the perimeter of the contour line and a predetermined threshold, and the selected table frame data. And a timing control unit for controlling the data output from each memory and the timing of each processing.
JP3067661A 1991-03-08 1991-03-08 Table frame detection method and device Expired - Fee Related JP2789835B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3067661A JP2789835B2 (en) 1991-03-08 1991-03-08 Table frame detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3067661A JP2789835B2 (en) 1991-03-08 1991-03-08 Table frame detection method and device

Publications (2)

Publication Number Publication Date
JPH04280391A JPH04280391A (en) 1992-10-06
JP2789835B2 true JP2789835B2 (en) 1998-08-27

Family

ID=13351415

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3067661A Expired - Fee Related JP2789835B2 (en) 1991-03-08 1991-03-08 Table frame detection method and device

Country Status (1)

Country Link
JP (1) JP2789835B2 (en)

Also Published As

Publication number Publication date
JPH04280391A (en) 1992-10-06

Similar Documents

Publication Publication Date Title
US9239946B2 (en) Method and apparatus for detecting and processing specific pattern from image
JP2001109895A (en) Processing method for digital images
JP2651009B2 (en) Information recognition device
US5081690A (en) Row-by-row segmentation and thresholding for optical character recognition
US5790696A (en) Image segmentation apparatus and a character recognition apparatus
JPH07220026A (en) Method and device for picture processing
JP2789835B2 (en) Table frame detection method and device
US6330360B1 (en) Image processing apparatus and method
JP4078045B2 (en) Image processing apparatus, method, program, and storage medium
JP3095470B2 (en) Character recognition device
JPS62121589A (en) Character segmenting system
JP2982221B2 (en) Character reader
JP2000285237A (en) Method and device for picture processing and recording medium with picture processing program recorded
JP3566738B2 (en) Shaded area processing method and shaded area processing apparatus
JP2000339407A (en) Picture processor, picture processing method and computer readable storage medium
JPH0830725A (en) Device and method for processing image
JPH08194776A (en) Method and device for processing slip
JP2803736B2 (en) Character recognition method
JPH07160810A (en) Character recognizing device
JPH07168911A (en) Document recognition device
JP3628536B2 (en) Binary image converter
JPH0139153B2 (en)
JPH0644406A (en) Method and device for processing image
JPH1185905A (en) Device and method for discriminating font and information recording medium
JPH10162104A (en) Character recognition device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080612

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090612

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees