JP3001950B2 - Rectangle extraction device - Google Patents

Rectangle extraction device

Info

Publication number
JP3001950B2
JP3001950B2 JP2266055A JP26605590A JP3001950B2 JP 3001950 B2 JP3001950 B2 JP 3001950B2 JP 2266055 A JP2266055 A JP 2266055A JP 26605590 A JP26605590 A JP 26605590A JP 3001950 B2 JP3001950 B2 JP 3001950B2
Authority
JP
Japan
Prior art keywords
run
data
rectangle
rectangular
identification number
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
JP2266055A
Other languages
Japanese (ja)
Other versions
JPH04142688A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2266055A priority Critical patent/JP3001950B2/en
Publication of JPH04142688A publication Critical patent/JPH04142688A/en
Application granted granted Critical
Publication of JP3001950B2 publication Critical patent/JP3001950B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、文字認識等の画像処理に関し、特に矩形抽
出を高速に行う矩形抽出装置に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to image processing such as character recognition and, more particularly, to a rectangle extraction device that performs rectangle extraction at high speed.

〔従来技術〕(Prior art)

従来の矩形抽出処理を図を用いて説明すると、まずイ
メージスキャナ等から取り込んだ画像データからラン
(黒連結)を抽出する。第3図は、画像の1ラインずつ
をラスタスキャンすることによって抽出されたランを示
し、第4図はそれを拡大したラン1からラン3を示す。
ここで、ランデータは、その始点、終点のx,y座標(ラ
ンiの始点はxsi,ysi、終点はxei,yei)とそのランの属
している矩形データへのポインタPkiからなり、1つ前
のライン上の複数のランデータがランデータメモリの領
域52(第5図)に書き込まれ、現在ライン上の複数のラ
ンデータがランデータメモリの領域51に書き込まれる。
そして、現在ラインのランと1つ前のラインのランとの
接続関係(4連結あるいは8連結)を調べることによっ
て次々に矩形を生成していく。
The conventional rectangle extraction processing will be described with reference to the drawings. First, a run (black connection) is extracted from image data taken in from an image scanner or the like. FIG. 3 shows runs extracted by raster-scanning each line of the image, and FIG. 4 shows run 1 to run 3 in which the run is enlarged.
Here, the run data includes the x and y coordinates of the start point and end point (the start point of run i is xsi, ysi, and the end point is xei, yesi) and a pointer Pki to the rectangular data to which the run belongs. A plurality of run data on the previous line is written to the run data memory area 52 (FIG. 5), and a plurality of run data on the current line is written to the run data memory area 51.
Then, rectangles are generated one after another by examining the connection relationship (four connections or eight connections) between the run of the current line and the run of the previous line.

すなわち、ラン3を現在ライン上のランとし、ラン
1、2を1つ前のライン上のランとすると、ラン1のラ
ンデータ1つまりその始点、終点のx,y座標(xs1,ys1,x
e1,ye1)が領域52に書き込まれる。ラン1の前にはラン
がないものとすると、ラン1が矩形を構成するので、そ
の矩形データK1(その始点、終点の座標、すなわちxs1,
ys1,xe1,ye1)が矩形データ領域53に書き込まれる。そ
して、ランデータ1のポインタには矩形データK1を指す
Pk1が書き込まれる(第5図)。
That is, assuming that Run 3 is a run on the current line and Runs 1 and 2 are runs on the immediately preceding line, the run data 1 of Run 1, that is, the x and y coordinates (xs1, ys1, x
e1, ye1) are written to the area 52. Assuming that there is no run before run 1, since run 1 forms a rectangle, its rectangular data K1 (the coordinates of its start point and end point, ie, xs1,
ys1, xe1, ye1) are written to the rectangular data area 53. Then, the pointer of the run data 1 points to the rectangular data K1
Pk1 is written (FIG. 5).

同様に、ラン2がラン1とこの時点では接続関係にな
いと判定されると、ラン2のランデータ2(xs2,ys2,xe
2,ye2)が領域52に書き込まれ、その矩形データK2(xs
2,ys2,xe2,ye2)が矩形データ領域53に書き込まれ、ラ
ンデータ2のポインタには矩形データK2を指すPk2が書
き込まれる(第5図)。
Similarly, if it is determined that the run 2 is not connected to the run 1 at this time, the run data 2 (xs2, ys2, xe
2, ye2) is written to the area 52, and the rectangular data K2 (xs
2, ys2, xe2, ye2) are written in the rectangular data area 53, and Pk2 pointing to the rectangular data K2 is written in the pointer of the run data 2 (FIG. 5).

次いで、現在ライン上に処理が移り、ラン3が抽出さ
れると、そのランデータ3(xs3,ys3,xe3,ye3)が領域5
1に書き込まれ、まず1つ前のライン上のラン1との接
続関係が調べられる。ラン3はまだどの矩形にも属して
いないので、ラン3がラン1と接続していれば、ラン1
の属している矩形データK1を更新する。すなわち、第6
図に示すように、矩形データK1の終点座標をxe1,ye1か
らxe3,ye3(ラン3の終点座標)に書き換え、また、ラ
ンデータ3のポインタには矩形データK1を指すPk1が書
き込まれる(第6図)。
Next, the processing moves to the current line, and when run 3 is extracted, the run data 3 (xs3, ys3, xe3, ye3) is stored in area 5
1 is written, and the connection relationship with run 1 on the previous line is checked first. Since run 3 does not yet belong to any rectangle, if run 3 is connected to run 1,
Update the rectangular data K1 to which. That is, the sixth
As shown in the figure, the end point coordinates of the rectangular data K1 are rewritten from xe1, ye1 to xe3, ye3 (end point coordinates of run 3), and Pk1 pointing to the rectangular data K1 is written in the pointer of run data 3 (No. 6).

更に、ラン3と1つ前のライン上のラン2との接続関
係が調べられ、ラン3がラン2と接続していていれば、
ラン3が既に矩形データK1に属しているので、矩形デー
タK2が矩形データK1に統合される。すなわち、矩形デー
タK1の終点座標をxe3,ye3からxe2,ye2(ラン2の終点座
標)に書き換えると共に、ランデータ2のポインタ(Pk
2)を、矩形データK1を指すPk1に書き換える(第7
図)。
Further, the connection relationship between the run 3 and the run 2 on the previous line is checked, and if the run 3 is connected to the run 2,
Since the run 3 already belongs to the rectangular data K1, the rectangular data K2 is integrated with the rectangular data K1. That is, the end point coordinates of the rectangular data K1 are rewritten from xe3, ye3 to xe2, ye2 (end point coordinates of run 2), and the pointer (Pk
2) is rewritten to Pk1 indicating the rectangular data K1 (7th
Figure).

以上の処理が正しく行われるためには、全てのランデ
ータが正しい所属の矩形データへのポインタを保持して
いなければならない。
In order for the above process to be performed correctly, all the run data must hold pointers to the rectangular data to which the run data belongs.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

すなわち、前述したように矩形の統合が行われると、
統合された矩形データに所属していたランデータのポイ
ンタは、もはや有効なものではないのでこれを修正し、
統合した側の矩形データを指示するようにポインタを更
新しなければならない。このため現在ライン上のランデ
ータを全て調べる必要があり、例えば第7図のランmが
もはや有効ではない矩形データK2を指していた場合は、
このランmのポインタを修正しなければならず、このた
め処理速度が大幅に悪化するという問題があった。
That is, when rectangles are integrated as described above,
The pointer of the run data belonging to the unified rectangle data is no longer valid, so correct this.
The pointer must be updated to point to the unified rectangle. Therefore, it is necessary to check all the run data on the current line. For example, if the run m in FIG. 7 points to the rectangular data K2 which is no longer valid,
The pointer of the run m must be corrected, which causes a problem that the processing speed is greatly reduced.

また、統合された矩形データ(第7図の矩形データK
2)はゴミになるため、矩形データ領域53の利用効率が
悪くなるという問題があった。この領域を再利用するこ
とは可能であるが、次のような理由によって、コストが
高い処理になる。すなわち、一般に矩形データは画素デ
ータを走査するときに現われた順序で読みだすことが要
求される。従って、統合された矩形データの領域(例え
ばK2)を他の矩形データの登録に使用すると、低アドレ
スから順番に矩形データを読みだす時に、該領域の矩形
データの読みだし順序を管理しなければならないという
問題が生じる。
The integrated rectangular data (rectangular data K in FIG. 7)
2) becomes a garbage, so that there is a problem that the use efficiency of the rectangular data area 53 is deteriorated. Although it is possible to reuse this area, the processing is expensive for the following reasons. That is, it is generally required that rectangular data be read in the order in which it appears when scanning pixel data. Therefore, if the integrated rectangular data area (eg, K2) is used to register other rectangular data, when reading rectangular data in order from the lowest address, the reading order of rectangular data in the area must be managed. The problem that it does not occur.

更に、上述したように矩形データ領域には多くのゴミ
データが含まれているので、矩形データの読みだし時に
は、そのようなゴミをスキップして読みださなければな
らないという問題があった。一般的には、矩形データ中
に、そのデータが有効であるか否かのフラグを設け、読
みだし時に全データを調べて有効なデータのみを取り出
すようにすることも可能であるが、この方法では処理デ
ータ量が多くなると共に、処理に大幅な時間が費やされ
るという問題がある。
Further, as described above, since a large amount of dust data is included in the rectangular data area, there is a problem that such dust must be skipped when reading rectangular data. In general, it is also possible to provide a flag in the rectangular data as to whether the data is valid or not, to check all data at the time of reading, and to extract only valid data. In this case, there is a problem that the amount of processing data increases and a great deal of time is spent for processing.

本発明の目的は、矩形データの処理を高速に行うこと
ができる矩形抽出装置を提供することにある。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a rectangle extracting device capable of performing processing of rectangular data at high speed.

〔課題を解決するための手段〕[Means for solving the problem]

前記目的を達成するために、請求項1に記載の発明で
は、画像データから矩形を抽出処理する矩形抽出装置で
あって、各アドレスに、矩形の始点および終点データ、
該矩形の識別番号、当該アドレスが使用されているか否
かを表示するフラグからなる矩形データを格納する第1
の格納手段と、現在ラインのランと前ラインのランにつ
いて、その始点および終点データと、ランが所属する矩
形の識別番号を格納する第2の格納手段と、前ライン上
の第1のランが所属する第1の矩形、第2のランが所属
する第2の矩形とそれぞれのフラグを使用に表示して前
記第1の格納手段に格納され、前ライン上の第1、第2
のランと、現在ライン上の第3のランが前記第2の格納
手段に格納されていて、前記第2の格納手段を参照して
現在ラインと前ラインのランの接続関係を調べ、前記第
1、第2、第3のランが接続しているとき、前記第1、
第2の矩形を統合処理し、統合された側の矩形のフラグ
を未使用に表示し、さらに統合された側の矩形に所属す
るランの識別番号を、統合した側の矩形の識別番号に変
更する制御手段とを備えたことを特徴としている。
In order to achieve the above object, according to the present invention, there is provided a rectangle extracting apparatus for extracting a rectangle from image data.
A first storage unit which stores rectangular data including an identification number of the rectangle and a flag indicating whether the address is used or not.
Storage means for storing the start point and end point data of the run of the current line and the run of the previous line, the identification number of the rectangle to which the run belongs, and the first run on the previous line. The first rectangle to which the second run belongs, the second rectangle to which the second run belongs, and the respective flags are displayed for use and stored in the first storage means, and the first and second rectangles on the previous line are displayed.
And the third run on the current line are stored in the second storage means, and the connection relationship between the run of the current line and the run of the previous line is checked by referring to the second storage means. When the first, second and third runs are connected, the first,
The second rectangle is integrated, the flag of the integrated rectangle is displayed as unused, and the identification number of the run belonging to the integrated rectangle is changed to the identification number of the integrated rectangle. And control means for performing the control.

請求項2に記載の発明では、前記第3のランが前記第
1、第2のランと接続しないとき、前記第3のランを新
たな矩形として、前記第1の格納手段のフラグが未使用
を表示しているアドレスに登録することを特徴としてい
る。
In the invention according to claim 2, when the third run is not connected to the first and second runs, the third run is set as a new rectangle and the flag of the first storage unit is not used. Is registered at the address that displays.

請求項3に記載の発明では、前記第1の格納手段から
の矩形データの読みだしは、前記使用を表示しているフ
ラグを参照して行うことを特徴としている。
The invention according to claim 3 is characterized in that reading of the rectangular data from the first storage means is performed by referring to a flag indicating the use.

〔作 用〕(Operation)

画像データインターフェース部が読み取った画素デー
タからランデータを作成し、ランデータ連想メモリに書
き込む。最初のランデータは矩形データとして登録され
る。この登録領域(アドレス)は、連想メモリのガーベ
ッジフラグがセットされているアドレスを連想メモリの
検索機能によって未使用領域を見つける。
Run data is created from the pixel data read by the image data interface unit and written to the run data associative memory. The first run data is registered as rectangular data. In this registered area (address), an unused area is found by the search function of the associative memory at the address of the associative memory where the garbage flag is set.

続いて、前ラインのランデータと現在ラインのランデ
ータから、各ランデータの接続関係を調べ、接続してい
れば統合処理する。統合の結果、統合された矩形データ
のガーベッジフラグをセットし、これによりこの領域の
再利用が可能になる。統合された矩形データに属してい
た現在ライン上のランデータを全て探し、検索されたラ
ンデータの所属矩形ポインタフィールドのidの値を全て
統合した側の矩形データ識別番号idの値に変更する。矩
形の読みだし処理は、矩形データのガーベッジフラグフ
ィールドがリセットされているものを一致検索によって
探すことによって、有効な矩形データだけが検索され
る。
Subsequently, the connection relationship of each run data is checked from the run data of the previous line and the run data of the current line, and if connected, the integration process is performed. As a result of the merging, the garbage flag of the merged rectangular data is set, so that this area can be reused. All the run data on the current line belonging to the integrated rectangular data are searched, and the value of the id of the belonging rectangular pointer field of the searched run data is changed to the value of the rectangular data identification number id on the integrated side. In the rectangle reading process, only valid rectangle data is retrieved by searching for a rectangle data whose garbage flag field is reset by a match search.

〔実施例〕〔Example〕

以下、本発明の一実施例を図面を用いて具体的に説明
する。
Hereinafter, an embodiment of the present invention will be specifically described with reference to the drawings.

第1図は、本発明の一実施例に係る矩形抽出装置のブ
ロック構成図である。1は、矩形データを格納する連想
メモリで、各ワードは、矩形の始点および終点のx座
標、y座標、矩形の識別番号id、そしてこのアドレスが
使用されているか否かを表示するガーベッジフラグの6
フィールドから構成されている。2は、現在ラインと前
ライン中のランデータを格納するランデータ連想メモリ
で、このランデータは始点および終点のx座標とy座
標、所属する矩形へのポインタすなわち、所属する矩形
の識別番号からなっている。3は、スキャナあるいはイ
メージデータメモリ等から画素データを取り込む画像デ
ータインターフェース部、4は、上記各部を制御する制
御部であり、また前記矩形の識別番号idを管理してい
る。
FIG. 1 is a block diagram of a rectangle extracting apparatus according to one embodiment of the present invention. Reference numeral 1 denotes an associative memory for storing rectangular data. Each word includes an x-coordinate and a y-coordinate of a starting point and an ending point of the rectangle, an identification number id of the rectangle, and a garbage flag indicating whether or not this address is used. 6
Consists of fields. Reference numeral 2 denotes a run data associative memory for storing run data in the current line and the previous line. The run data includes x and y coordinates of a start point and an end point, a pointer to a belonging rectangle, that is, an identification number of the belonging rectangle. Has become. Reference numeral 3 denotes an image data interface unit that captures pixel data from a scanner or image data memory or the like. Reference numeral 4 denotes a control unit that controls the above units, and manages the identification number id of the rectangle.

なお、この実施例で用いる連想メモリとは、その内容
について大小比較や一致等の条件で検索を行うと、結果
として該当するメモリのアドレスを得ることができるも
のをいう。これらのアドレスは低い方から順に連想メモ
リの出力レジスタに読みだすことができる。また、マス
クレジスタを用いることによって各フィールド毎の比較
ができるように構成されている。
Note that the associative memory used in this embodiment means a memory whose address can be obtained as a result of performing a search on the contents under conditions such as magnitude comparison or agreement. These addresses can be read out to the output register of the associative memory in ascending order. Also, the configuration is such that comparison can be made for each field by using a mask register.

以上のように構成された本発明の矩形抽出装置の動作
を、第4図のランを例にして詳細に説明すると、処理に
先立って連想メモリ1のガーベッジフラグフィールドを
全てセットし、また制御部4の矩形データ識別番号idを
0にリセットする。
The operation of the rectangle extracting apparatus of the present invention configured as described above will be described in detail by taking the run of FIG. 4 as an example. Prior to the processing, all the garbage flag fields of the associative memory 1 are set, and the control unit is controlled. The rectangular data identification number id of 4 is reset to 0.

次いで、制御部4は、画像データインターフェース部
3が読み取った画素データからランデータを作成し、ラ
ンデータ連想メモリ2に書き込む。最初のライン1につ
いては前ラインが存在しないので、最初のランデータ1
(ラン1)がそのまま矩形データ(K1)として登録され
る。
Next, the control unit 4 creates run data from the pixel data read by the image data interface unit 3 and writes it to the run data associative memory 2. Since there is no previous line for the first line 1, the first run data 1
(Run 1) is registered as it is as rectangular data (K1).

登録処理; この登録処理は次のようにして行われる。制御部4
は、連想メモリ1のガーベッジフラグがセットされてい
るアドレスを連想メモリの検索機能によってサーチす
る。この検索によって見つかったアドレスは未使用領域
であるので、その内の最初に見つかったアドレスの各フ
ィールドに、第2図(a)に示すような矩形データ(K
1)を書き込む。第2図(a)において、矩形の始点フ
ィールド21にはランデータ(ラン1)の始点のx座標値
(xi1)とy座標値(yi1)、矩形の終点フィールド22に
は終点のx座標値(xi2)とy座標値(yi2)、矩形デー
タ識別番号id23には識別番号1、そしてガーベッジフラ
グフィールド24には0(リセット)が書き込まれる。
Registration process; This registration process is performed as follows. Control unit 4
Searches the address of the associative memory 1 where the garbage flag is set by the associative memory search function. Since the address found by this search is an unused area, rectangular data (K) as shown in FIG.
Write 1). In FIG. 2A, the starting point field 21 of the rectangle is the x coordinate value (xi1) and y coordinate value (yi1) of the starting point of the run data (run 1), and the ending point field 22 of the rectangle is the x coordinate value of the ending point. (Xi2) and the y coordinate value (yi2), the identification number 1 is written in the rectangular data identification number id23, and 0 (reset) is written in the garbage flag field 24.

また、第2図(b)の示すようにランデータ連想メモ
リ2内に、ラン1の始点、終点座標値を書き込み、現在
ラインの所属矩形ポインタフィールドに識別番号1を書
き込む。その後、制御部4は矩形データ識別番号idを1
だけ増加する。
Also, as shown in FIG. 2 (b), the start point and end point coordinate values of the run 1 are written in the run data associative memory 2, and the identification number 1 is written in the belonging rectangle pointer field of the current line. Thereafter, the control unit 4 sets the rectangular data identification number id to 1
Only increase.

次いで、現在ラインのラン2が抽出され、このラン2
はラン1と接続していないので、ラン1の登録処理と同
様に、その矩形データ(K2)とランデータ(ラン2)が
それぞれ第2図(c)、(d)に示すようにメモリ1、
2に書き込まれる。また、矩形K2の識別番号としてid=
2が書き込まれ、ガーベッジフラグフィールド24には0
(リセット)が書き込まれる。その後、制御部4は矩形
データ識別番号idを1だけ増加する(id=3)。
Next, run 2 of the current line is extracted, and this run 2
Is not connected to the run 1, the rectangular data (K2) and the run data (run 2) are stored in the memory 1 as shown in FIGS. ,
2 is written. Also, id =
2 is written, and 0 is set in the garbage flag field 24.
(Reset) is written. Thereafter, the control unit 4 increases the rectangular data identification number id by 1 (id = 3).

続いて、制御部4は、現在ライン1のランデータを前
ラインのランデータ用の領域に移すことによって現在ラ
インのランデータ領域を空ける。なお、実際にデータの
移動処理を行うと時間がかかるので、2つの領域へのポ
インタを用意して、これらを入れ替えるように処理す
る。
Subsequently, the control unit 4 clears the run data area of the current line by moving the run data of the current line 1 to the run data area of the previous line. Since it takes time to actually perform the data movement processing, pointers to the two areas are prepared, and the processing is performed so that these are replaced.

そして、次のライン2の画素データを読み込み、現在
ラインのランデータ領域にランデータ(ラン3)を作成
する(第2図(e))。
Then, the pixel data of the next line 2 is read, and run data (run 3) is created in the run data area of the current line (FIG. 2 (e)).

制御部4は、第2図(e)のメモリを参照して、前ラ
イン1のランデータ(ラン1、2)と現在ライン2のラ
ンデータ(ラン3)から、各ランデータの接続関係(4
連結あるいは8連結)を調べ、接続していなければ矩形
データを前述したと同様に登録処理し、接続していれば
統合処理する。ラン3がラン1、2と接続していなけれ
ば、ラン3を矩形データ(K3)として、識別番号3を付
与して登録する。
The control unit 4 refers to the memory of FIG. 2 (e), and based on the run data of the previous line 1 (runs 1 and 2) and the run data of the current line 2 (run 3), the connection relationship of each run data (run 3). 4
(Concatenation or 8 concatenation), and if not connected, rectangular data is registered in the same manner as described above, and if connected, integrated processing is performed. If Run 3 is not connected to Runs 1 and 2, Run 3 is registered as rectangular data (K3) with identification number 3 attached.

統合処理; 第4図の例では、ラン1、2、3が接続しているの
で、従来技術で説明したと同様に、まず、矩形データ
(K1)とラン3とを統合処理する。すなわち、統合処理
により、矩形データ(K1)の始点、終点データを書き換
え、またラン3は矩形K1に所属するので、ポインタを1
にする。次いで、矩形K1と矩形K2とを統合し、矩形K1の
始点、終点データを書き換える。
In the example of FIG. 4, since the runs 1, 2, and 3 are connected, first, the rectangular data (K1) and the run 3 are integrated, as described in the related art. In other words, the start point and the end point data of the rectangular data (K1) are rewritten by the integration processing, and since the run 3 belongs to the rectangle K1, the pointer is set to 1
To Next, the rectangle K1 and the rectangle K2 are integrated, and the start point and end point data of the rectangle K1 are rewritten.

統合の結果、統合された矩形データ(K2)のガーベッ
ジフラグをセット(1にする)し、これによりこの領域
の再利用が可能になる。
As a result of the integration, the garbage flag of the integrated rectangular data (K2) is set (set to 1), and this area can be reused.

統合された矩形データ(K2)に属していた現在ライン
上のランデータを全て探す。このサーチは、ランデータ
の所属矩形ポインタフィールドに、統合された矩形デー
タ識別番号idの値(id=2)が書き込まれているデータ
を検索することによって行われる。そして、検索された
ランデータの所属矩形ポインタフィールドのidの値(id
=2)を全て統合した側の矩形データ識別番号idの値
(id=1)に変更する。
Search for all run data on the current line that belonged to the integrated rectangular data (K2). This search is performed by searching for data in which the integrated rectangle data identification number id value (id = 2) is written in the belonging rectangle pointer field of the run data. Then, the id value (id
= 2) is changed to the value (id = 1) of the rectangular data identification number id on the unified side.

矩形の読みだし処理; 以上の処理を全ての画素データに対して行い、その処
理が終了したら、矩形の読みだし処理を行う。
Rectangle reading processing: The above processing is performed on all pixel data, and when the processing is completed, rectangle reading processing is performed.

すなわち、矩形データのガーベッジフラグフィールド
がリセットされているものを一致検索によって探すこと
によって、有効な矩形データだけが検索される。この検
索された矩形データの内、矩形データの始点のy座標フ
ィールドが最小値であるものを検索する。更に、この検
索結果の内、矩形データの始点のx座標フィールドが最
小値であるものを検索する。
That is, only valid rectangular data is searched by searching for a rectangular data whose garbage flag field is reset by a match search. Among the searched rectangular data, the one in which the y-coordinate field of the starting point of the rectangular data has the minimum value is searched. Further, the search result having the minimum value in the x coordinate field of the starting point of the rectangular data is searched.

この検索結果によって、第1の矩形データが連想メモ
リ1の出力レジスタから読みだされる。この読みだされ
た矩形データのガーベッジフラグフィールドをセット
し、このデータが再度読みだされないようにする。
Based on this search result, the first rectangular data is read from the output register of the associative memory 1. The garbage flag field of the read rectangular data is set so that the data is not read again.

上記処理を全ての矩形データが読みだされるまで、繰
り返す。
The above process is repeated until all the rectangular data is read.

〔発明の効果〕〔The invention's effect〕

以上、説明したように、本発明によれば、所属矩形ポ
インタの更新処理が高速に行われるので、矩形抽出の処
理速度が従来のものに比べて格段に向上する。また、統
合された矩形データの領域が再利用できるので、メモリ
の利用効率が良くなる。
As described above, according to the present invention, since the updating process of the belonging rectangle pointer is performed at high speed, the processing speed of rectangle extraction is significantly improved as compared with the conventional one. Further, since the area of the integrated rectangular data can be reused, the use efficiency of the memory is improved.

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

第1図は、本発明の一実施例に係る矩形抽出装置のブロ
ック構成図、第2図(a)、(c)は、矩形データ連想
メモリに登録された矩形データの一例を示す図、第2図
(b)、(d)、(e)は、ランデータ連想メモリに書
き込まれたランデータの一例を示す図、第3図は、画像
の1ラインずつをラスタスキャンすることによって抽出
されたランを示す図、第4図は、拡大したランを示す
図、第5図、第6図、第7図は、従来の矩形抽出処理を
説明するための図である。 1……矩形データ連想メモリ、2……ランデータ連想メ
モリ、 3……画像データインターフェース部、4……制御部。
FIG. 1 is a block diagram of a rectangle extracting apparatus according to an embodiment of the present invention. FIGS. 2 (a) and 2 (c) are diagrams showing an example of rectangle data registered in a rectangle data associative memory. 2 (b), (d), and (e) show examples of run data written in the run data associative memory, and FIG. 3 is extracted by raster-scanning each line of an image. FIG. 4 is a diagram showing a run, FIG. 4 is a diagram showing an enlarged run, and FIGS. 5, 6, and 7 are diagrams for explaining a conventional rectangle extraction process. 1 ... rectangular data associative memory, 2 ... run data associative memory, 3 ... image data interface unit, 4 ... control unit.

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】画像データから矩形を抽出処理する矩形抽
出装置であって、各アドレスに、矩形の始点および終点
データ、該矩形の識別番号、当該アドレスが使用されて
いるか否かを表示するフラグからなる矩形データを格納
する第1の格納手段と、現在ラインのランと前ラインの
ランについて、その始点および終点データと、ランが所
属する矩形の識別番号を格納する第2の格納手段と、前
ライン上の第1のランが所属する第1の矩形、第2のラ
ンが所属する第2の矩形とそれぞれのフラグを使用に表
示して前記第1の格納手段に格納され、前ライン上の第
1、第2のランと、現在ライン上の第3のランが前記第
2の格納手段に格納されていて、前記第2の格納手段を
参照して現在ラインと前ラインのランの接続関係を調
べ、前記第1、第2、第3のランが接続しているとき、
前記第1、第2の矩形を統合処理し、統合された側の矩
形のフラグを未使用に表示し、さらに統合された側の矩
形に所属するランの識別番号を、統合した側の矩形の識
別番号に変更する制御手段とを備えたことを特徴とする
矩形抽出装置。
1. A rectangle extracting apparatus for extracting a rectangle from image data, comprising, for each address, start and end point data of the rectangle, an identification number of the rectangle, and a flag indicating whether or not the address is used. First storage means for storing rectangular data consisting of: a start point and an end point data for the current line run and the previous line run; and an identification number of the rectangle to which the run belongs; The first rectangle to which the first run belongs on the previous line, the second rectangle to which the second run belongs, and the respective flags are displayed and stored in the first storage means. The first run, the second run, and the third run on the current line are stored in the second storage means, and the connection between the current line and the run of the previous line is referred to by referring to the second storage means. Investigate the relationship, the first, second When the third run is connected,
The first and second rectangles are integrated, the flag of the integrated rectangle is displayed as unused, and the identification number of the run belonging to the integrated rectangle is changed to the value of the integrated rectangle. And a control unit for changing the identification number to an identification number.
【請求項2】前記第3のランが前記第1、第2のランと
接続しないとき、前記第3のランを新たな矩形として、
前記第1の格納手段のフラグが未使用を表示しているア
ドレスに登録することを特徴とする請求項1記載の矩形
抽出装置。
2. When the third run is not connected to the first and second runs, the third run is defined as a new rectangle.
2. The rectangle extracting apparatus according to claim 1, wherein the flag is registered in an address where the flag of the first storage means indicates unused.
【請求項3】前記第1の格納手段からの矩形データの読
みだしは、前記使用を表示しているフラグを参照して行
うことを特徴とする請求項1記載の矩形抽出装置。
3. The rectangle extracting apparatus according to claim 1, wherein the reading of the rectangular data from the first storage means is performed by referring to a flag indicating the use.
JP2266055A 1990-10-03 1990-10-03 Rectangle extraction device Expired - Fee Related JP3001950B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2266055A JP3001950B2 (en) 1990-10-03 1990-10-03 Rectangle extraction device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2266055A JP3001950B2 (en) 1990-10-03 1990-10-03 Rectangle extraction device

Publications (2)

Publication Number Publication Date
JPH04142688A JPH04142688A (en) 1992-05-15
JP3001950B2 true JP3001950B2 (en) 2000-01-24

Family

ID=17425756

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2266055A Expired - Fee Related JP3001950B2 (en) 1990-10-03 1990-10-03 Rectangle extraction device

Country Status (1)

Country Link
JP (1) JP3001950B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8548250B2 (en) 2007-11-09 2013-10-01 Ricoh Company, Ltd. Information processing apparatus and information processing method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011145847A (en) * 2010-01-14 2011-07-28 Fuji Xerox Co Ltd Image processor and image processing program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8548250B2 (en) 2007-11-09 2013-10-01 Ricoh Company, Ltd. Information processing apparatus and information processing method

Also Published As

Publication number Publication date
JPH04142688A (en) 1992-05-15

Similar Documents

Publication Publication Date Title
JP3001950B2 (en) Rectangle extraction device
CN111552410A (en) Writing trace processing method, device, equipment and computer readable storage medium
JPH03111926A (en) Data processor
JP2834130B2 (en) How to check recognition data
JP2829002B2 (en) Character recognition device
JP3072868B2 (en) Labeling circuit for image processing
JP3657725B2 (en) Line figure image processing method
JP3570082B2 (en) Database device and database search method
JP2831816B2 (en) Display device for correspondence between design information
JPH0573641A (en) Element area extraction method
JPS6283790A (en) Image processor
JPS61231686A (en) Pattern recognizing method
JPS62198893A (en) Graphic display
JP2846349B2 (en) Font cache control method in character processing system
JP2801246B2 (en) Character processing apparatus and method
JP2536619B2 (en) Graphic processing device
JPH0457177A (en) Closed area painting out method in plotting process
JPS5818772A (en) Data condensing system
JPH0496148A (en) Down-route tracking system
JPH03282888A (en) Marker symbol registration display system
JPH05324731A (en) Retrieval processing system for data
JPS61131084A (en) Picture processor
JPH03116393A (en) Matching system
JPH02148365A (en) Echo displaying system for graphic display device
JPH04123226A (en) Method for exchanging data

Legal Events

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

Free format text: PAYMENT UNTIL: 20071112

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20081112

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20081112

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20091112

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees