JPH04360287A - Binary image processor - Google Patents

Binary image processor

Info

Publication number
JPH04360287A
JPH04360287A JP13506691A JP13506691A JPH04360287A JP H04360287 A JPH04360287 A JP H04360287A JP 13506691 A JP13506691 A JP 13506691A JP 13506691 A JP13506691 A JP 13506691A JP H04360287 A JPH04360287 A JP H04360287A
Authority
JP
Japan
Prior art keywords
area
information table
information
line
maximum
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.)
Pending
Application number
JP13506691A
Other languages
Japanese (ja)
Inventor
Motoaki Asao
浅尾 元明
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP13506691A priority Critical patent/JPH04360287A/en
Publication of JPH04360287A publication Critical patent/JPH04360287A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To rapidly lead out the maximun and minimum values of a target in both the X and Y directions without using an image memory by providing this binary image processor with line buffers for two systems, an area information table, a means for detecting the start and end of an area and so on. CONSTITUTION:This binary image processor is provided with the line buffers 5, 6 for two systems which alternately execute writing and reading in each line. The maximum and minimum values of each closed area in the X and Y directions of the area and connecting information between respective areas are stored in an area information table 9. The processor is also provided with the area start/end detecting parts 7, 8, a buffer control part 3, an area information table control part 10 and so on. The connecting information of the table 9 is formed based upon the input image information and the information of the preceding line read out from the buffers 5, 6. Consequently, the maximun and minimum values of the target in both the X and Y directions can rapidly be led out.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、2値画像を対象とした
画像処理装置に関するものであり、特に領域の大きさを
判定する装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus for processing binary images, and more particularly to an apparatus for determining the size of an area.

【0002】0002

【従来の技術】2値画像の画像認識においては、対象物
の大きさつまりX方向の最大値、最小値、Y方向の最大
値、最小値がその対象物を表現する特徴量として有用な
ものとなる。本発明はこの対象物のX方向の最大値、最
小値、Y方向の最大値、最小値を導出する装置に関する
ものである。
[Background Art] In image recognition of binary images, the size of an object, that is, the maximum and minimum values in the X direction, and the maximum and minimum values in the Y direction, are useful as feature quantities that express the object. becomes. The present invention relates to a device for deriving the maximum value and minimum value in the X direction and the maximum value and minimum value in the Y direction of this object.

【0003】従来においては、これらの数値の導出は、
一旦画像情報を画像メモリーに書き込み、その上で境界
線追跡法や塗りつぶし法などによって行われていた。
Conventionally, the derivation of these numerical values is as follows:
The image information was once written into the image memory, and then the boundary tracing method or fill-in method was used.

【0004】しかしこれらの方法では画像メモリーが必
要となるうえ、処理速度についても高速化が困難であっ
た。
However, these methods require an image memory, and it is difficult to increase the processing speed.

【0005】[0005]

【発明が解決しようとする課題】本発明は、対象物のX
方向、Y方向それぞれの最小値、最大値を画像メモリー
を用いずに高速に導出することを目的とするものである
[Problems to be Solved by the Invention] The present invention solves the problem of
The purpose of this method is to quickly derive the minimum value and maximum value in the direction and Y direction, respectively, without using an image memory.

【0006】[0006]

【課題を解決するための手段】本発明は、入力画像情報
及び領域情報テーブルのアドレスを保持する2系統のラ
インバッファと、閉領域毎にその領域のX方向、Y方向
の最大値、最小値及び領域間の連結情報を保持する領域
情報テーブルと領域の開始、終了を検知する手段と、上
記ラインバッファのアドレス及び読み出し、書き込みを
制御する制御手段と、上記領域情報テーブルのアドレス
及び読み出し、書き込みを制御する制御手段とからなる
[Means for Solving the Problems] The present invention provides two lines of line buffers that hold input image information and addresses of area information tables, and a maximum value and a minimum value in the X direction and Y direction of each closed area. and an area information table that holds connection information between areas, means for detecting the start and end of an area, a control means for controlling the address, reading, and writing of the line buffer, and an address, reading, and writing of the area information table. and control means for controlling.

【0007】[0007]

【作用】本発明は前記のような構成であるので、前ライ
ン情報と領域開始、終了情報と、領域情報テーブルの情
報とを用いて、画像メモリーを用いることなしに対象画
像の走査の終了と同時に対象画像中に含まれる複数の閉
領域のX方向、Y方向それぞれ最小値、最大値を閉領域
情報テーブルに作成することができる。
[Operation] Since the present invention has the above-described configuration, it is possible to finish scanning the target image without using image memory by using the previous line information, area start and end information, and information in the area information table. At the same time, the minimum and maximum values in the X and Y directions of a plurality of closed regions included in the target image can be created in the closed region information table.

【0008】[0008]

【実施例】図1に本発明の実施例のブロック図を示す。 また、図2及び図3にラインバッファの構成及び領域情
報テーブルの構成を示す。そして図4、図5、図6に図
1の構成の動作を説明する処理フローを示す。
Embodiment FIG. 1 shows a block diagram of an embodiment of the present invention. Further, FIGS. 2 and 3 show the configuration of the line buffer and the configuration of the area information table. FIGS. 4, 5, and 6 show processing flows for explaining the operation of the configuration shown in FIG.

【0009】以下これらの図を参照して本発明の実施例
を説明する。
Embodiments of the present invention will be described below with reference to these figures.

【0010】図1に示すようにカメラ、スキャナーなど
の画像読み取り装置1からの画像データは、2値化回路
2で2値化される。2値化された画像データは、ライン
バッファ制御部3の制御のもとに、セレクタ4を介して
、第1ラインバッファ5及び第2ラインバッファ6に交
互に書き込まれると同時に第1、第2領域開始/終了検
知部7、8に送られる。この時書き込みされていないほ
うのラインバッファは、前ラインの情報を参照するため
に読み出しが行われる。
As shown in FIG. 1, image data from an image reading device 1 such as a camera or a scanner is binarized by a binarization circuit 2. The binarized image data is alternately written into the first line buffer 5 and the second line buffer 6 via the selector 4 under the control of the line buffer control unit 3. The data is sent to area start/end detection units 7 and 8. At this time, the line buffer to which data has not been written is read in order to refer to the information of the previous line.

【0011】このラインバッファの構成は図2に示され
る。ここで白/黒の情報ビットは、2値化データが白画
素か黒画素かを示し、領域情報テーブル領域NO部は白
/黒情報が黒画素の場合、その黒画素が含まれる領域情
報テーブルの領域NOを保持している。但しこの領域N
Oは黒画素がスタートする、つまり黒領域が始まるとこ
ろでのみ意味を有する。図2においてNは、X方向の画
素数を示す。
The configuration of this line buffer is shown in FIG. Here, the white/black information bit indicates whether the binarized data is a white pixel or a black pixel, and if the white/black information is a black pixel, the area information table area NO part is an area information table that includes the black pixel. It holds the area NO. However, this area N
O has meaning only where a black pixel starts, that is, where a black area begins. In FIG. 2, N indicates the number of pixels in the X direction.

【0012】図1において領域情報テーブル9は本発明
の構成及び動作にしたがって導出される各領域の大きさ
の情報を最終的に保持するテーブルであり、図3の構成
をもっている。
In FIG. 1, area information table 9 is a table that ultimately holds information on the size of each area derived according to the configuration and operation of the present invention, and has the configuration shown in FIG. 3.

【0013】図3に示すように領域情報テーブルは、領
域NO毎にX方向の最小値[XMIN(NO)]、最大
値[XMAX(NO)]、Y方向の最小値[YMIN(
NO)]、最大値[YMAX(NO)]及び領域連結情
報[LINK(NO)]で構成される。ここで領域連結
情報とは、その領域がつながっている別の領域の番号を
保持するものであり、本発明の構成においては、複雑な
形状をした領域の場合には、1つの領域番号の中だけで
領域の大きさを導出できないために用意されている。 つまり連結情報によって結び付けられた複数の領域は、
各々つながっていることを示している。この領域情報テ
ーブルは、画像の入力に先だって初期化される必要があ
る。
As shown in FIG. 3, the area information table includes, for each area number, the minimum value in the X direction [XMIN(NO)], the maximum value [XMAX(NO)], and the minimum value in the Y direction [YMIN(
NO)], maximum value [YMAX(NO)], and area connection information [LINK(NO)]. Here, the area connection information holds the number of another area to which the area is connected, and in the configuration of the present invention, in the case of an area with a complex shape, the area connection information holds the number of another area to which the area is connected. It is provided because it is not possible to derive the size of the area by itself. In other words, multiple areas connected by connected information are
It shows that they are connected. This area information table needs to be initialized before inputting an image.

【0014】領域情報テーブルの作成は、図1の領域情
報テーブル制御部10の制御のもとに行われることにな
る。また図1において、ラインアドレスカウンター11
はY方向のラインNOをカウントするカウンターであり
、現時点でのラインNO(I)を保持している。同様に
画素アドレスカウンター12はX方向の画素NOをカウ
ントするカウンターであり現時点での画素NO(J)を
保持している。領域スタート位置レジスタ13はそのラ
インにおける黒領域が始まった時点での画素NO(XS
T)を保持するレジスタである。アドレスレジスタ14
、15はそれぞれ読み出し中のラインバッファつまり前
ラインのデータが黒領域を開始した時点でのラインバッ
ファに保持されている領域情報テーブル9の領域NOを
保持するレジスターである。いいかえれば、前ラインの
黒領域が領域情報テーブル9のどの番号に対応している
かを保持していることになる。領域情報テーブルアドレ
スカウンタ16は、今までの領域と全くつながっていな
い新しい領域が発生した場合に作成すべき領域情報テー
ブルの番号(AC)を保持するレジスタであり、新しい
領域が発生する毎に1づつ更新される。最後に書き込み
アドレスレジスタ17は現ラインで検出中の黒領域の情
報を書き込むべき領域情報テーブル9のアドレス(WA
DR)を保持するレジスタであり、アドレスレジスタ1
4、15か領域情報テーブルアドレスカウンター16の
値が入る事になる。
The creation of the area information table is performed under the control of the area information table control section 10 shown in FIG. In addition, in FIG. 1, the line address counter 11
is a counter that counts line numbers in the Y direction, and holds the current line number (I). Similarly, the pixel address counter 12 is a counter that counts pixel numbers in the X direction, and holds the current pixel number (J). The area start position register 13 stores the pixel number (XS
This is a register that holds T). address register 14
, 15 are registers each holding the area number of the area information table 9 held in the line buffer being read, that is, the line buffer at the time when the data of the previous line started the black area. In other words, it holds which number in the area information table 9 the black area of the previous line corresponds to. The area information table address counter 16 is a register that holds the number (AC) of the area information table to be created when a new area that is completely unconnected to the previous area is generated. It is updated one by one. Finally, the write address register 17 is set to the address (WA
DR), and is a register that holds address register 1.
4, 15, or the value of area information table address counter 16 will be entered.

【0015】本発明の構成は以上であるが実際にどのよ
うにこれらの手段が制御されるかを図4、5、6にフロ
ーチャートで示す。
The configuration of the present invention has been described above, and flow charts of FIGS. 4, 5, and 6 show how these means are actually controlled.

【0016】なお、前記したと同じくフローチャートに
おいて、Iは現ラインのラインNOを、Jは現画素の画
素NOを、WADRは書き込みアドレスレジスタ17に
保持された値を、ADRはアドレスレジスタ14、15
の値を、ACは領域情報テーブルアドレスカウンター1
6の値を、XSTは領域スタート位置レジスタ13の値
を示している。
In the same flowchart as described above, I indicates the line number of the current line, J indicates the pixel number of the current pixel, WADR indicates the value held in the write address register 17, and ADR indicates the address register 14, 15.
AC is the area information table address counter 1.
6, and XST indicates the value of the area start position register 13.

【0017】図4は1画素の処理を示す全体フローであ
り、これを1ライン分繰り返すと共にラインバッファ5
、6を交互に交換しながら全ライン分繰り返す。全ライ
ン分繰り返す事によって領域情報テーブル9に入力画像
中に含まれる全ての領域の情報が書き込まれる事になる
FIG. 4 is an overall flowchart showing the processing of one pixel, and this is repeated for one line, and the line buffer 5
, 6 alternately and repeat for all lines. By repeating this process for all lines, information on all areas included in the input image is written into the area information table 9.

【0018】図5は、図4において黒画素の処理として
いる部分の詳細である。図4においては、大きく分けて
黒領域の開始を検知した時と黒領域の内部の時とで処理
が異なっているが、主に書き込みアドレスレジスタ17
(WADR)の内容を操作している。
FIG. 5 shows details of the black pixel processing in FIG. 4. In FIG. 4, the processing is largely different depending on when the start of a black area is detected and when the inside of the black area is detected.
The contents of (WADR) are being manipulated.

【0019】図6は、図4において白画素の処理として
いる部分の詳細である。白画素の処理においては、黒領
域の終了を検知したときに書き込みアドレスレジスタ1
7(WADR)の位置の領域情報テーブル9に領域情報
を設定しているとともに現ラインバッファの領域スター
ト位置にWADRの内容を書き込む作業を行っている。
FIG. 6 shows details of the white pixel processing in FIG. 4. In white pixel processing, write address register 1 is written when the end of the black area is detected.
The area information is set in the area information table 9 at position 7 (WADR), and the contents of WADR are written to the area start position of the current line buffer.

【0020】本発明の構成は、本実施例に示すようなハ
ードウェア処理を行うことによって最も効果を発揮する
が、画像メモリーに書き込まれた画像データに対して、
同様の処理をハードウェアで行うことも可能であるとと
もに、ソフトウェアによって処理することも可能である
。この場合は、画像メモリーは必要となるが、本処理方
式を用いることにより処理の高速化を計ることができる
The configuration of the present invention is most effective by performing hardware processing as shown in this embodiment.
Similar processing can be performed using hardware, and it is also possible to perform processing using software. In this case, an image memory is required, but by using this processing method, it is possible to speed up the processing.

【0021】[0021]

【発明の効果】本発明の構成を用いることにより画像メ
モリーを必要とせずに、入力画像情報からリアルタイム
で入力画像情報中に含まれる閉領域のX方向、Y方向の
最大値、最小値を導出することができる。
[Effects of the Invention] By using the configuration of the present invention, the maximum and minimum values in the X and Y directions of a closed region included in the input image information can be derived in real time from the input image information without the need for an image memory. can do.

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

【図1】本発明のブロック図である。FIG. 1 is a block diagram of the present invention.

【図2】ラインバッファの構成図である。FIG. 2 is a configuration diagram of a line buffer.

【図3】領域情報テーブルの構成図である。FIG. 3 is a configuration diagram of an area information table.

【図4】全体の処理の流れを示す処理フローチャートで
ある。
FIG. 4 is a processing flowchart showing the overall processing flow.

【図5】黒画素の処理内容を示す処理フローチャートで
ある。
FIG. 5 is a processing flowchart showing the details of processing of black pixels.

【図6】白画素の処理内容を示す処理フローチャートで
ある。
FIG. 6 is a processing flowchart showing the processing details of white pixels.

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

3  ラインバッファ制御部 5  第1ラインバッファ 6  第2ラインバッファ 9  領域情報テーブル 7  第1領域開始終了検知部 8  第2領域開始終了検知部 10  領域情報テーブル制御部 3 Line buffer control section 5 First line buffer 6 Second line buffer 9 Area information table 7 First area start/end detection unit 8 Second area start/end detection unit 10 Area information table control unit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  2値画像の閉領域のX方向の最大値及
び最小値、Y方向の最大値及び最小値を導出する装置に
おいて、入力画像情報及び領域情報テーブルのアドレス
を保持し、ライン毎に書き込み及び読み出しが交互に行
われる2系統のラインバッファと、閉領域毎にその領域
のX方向の最大値、最小値、Y方向の最大値、最小値及
び領域間の連結情報を保持する領域情報テーブルと、ラ
イン内における各領域の開始終了を検知する領域開始終
了検知部と、上記ラインバッファの読み出し及び書き込
みを制御するラインバッファ制御部と、上記領域情報テ
ーブルの読み出し及び書き込みを制御する領域情報テー
ブル制御部を有し、入力画像情報と上記ラインバッファ
より読み出される前ラインの情報とによって上記領域情
報テーブルに閉領域のX方向の最大値、最小値、Y方向
の最大値、最小値及び領域間の連結情報を作成すること
を特徴とする2値画像の画像処理装置。
Claim 1: A device for deriving the maximum and minimum values in the X direction and the maximum and minimum values in the Y direction of a closed region of a binary image, which holds input image information and the address of a region information table, and calculates the maximum and minimum values for each line. Two lines of line buffers for which writing and reading are performed alternately, and an area that holds the maximum value and minimum value in the X direction, the maximum value and minimum value in the Y direction, and connection information between areas for each closed area. an information table, an area start/end detection unit that detects the start and end of each area within a line, a line buffer control unit that controls reading and writing of the line buffer, and an area that controls reading and writing of the area information table. The area information table includes an information table control unit that stores the maximum value and minimum value in the X direction, the maximum value, the minimum value in the Y direction, and An image processing device for binary images, characterized in that it creates connection information between regions.
JP13506691A 1991-06-06 1991-06-06 Binary image processor Pending JPH04360287A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13506691A JPH04360287A (en) 1991-06-06 1991-06-06 Binary image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13506691A JPH04360287A (en) 1991-06-06 1991-06-06 Binary image processor

Publications (1)

Publication Number Publication Date
JPH04360287A true JPH04360287A (en) 1992-12-14

Family

ID=15143076

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13506691A Pending JPH04360287A (en) 1991-06-06 1991-06-06 Binary image processor

Country Status (1)

Country Link
JP (1) JPH04360287A (en)

Similar Documents

Publication Publication Date Title
JP2591292B2 (en) Image processing device and automatic optical inspection device using it
JPH04360287A (en) Binary image processor
US5062142A (en) Data processor producing a medial axis representation of an extended region
JPH06129992A (en) Inspection device for periodic pattern
JP2834758B2 (en) Image processing device
JP2536183B2 (en) Image processing method and apparatus
JPH04290176A (en) Image accumulating device and image processing device provided therewith
Mcllroy et al. Edge detection in real-time
JP2838556B2 (en) Image processing device
JPH02208790A (en) Interpolation processing system for image
JPS62108381A (en) Density histogram detecting system
JPH02277186A (en) Binarizing device
JPH0385681A (en) Picture processor
JPH04248689A (en) Thinning processing system for picture data
JPH01151362A (en) Picture processor
JPS6326784A (en) Image connection processor
JPH0571990B2 (en)
JPS63301374A (en) Vanishing method for background of image
Mcllroy Edge Detection in Real-Time CD Mcllroy, R. Linggard, W. Monteith Department of Electrical and Electronic Engineering, The Queen's University of Belfast, Stranmillis Road, Belfast, N. Ireland, BT9 5AH
JPS59142677A (en) Picture processing device
JPS63104187A (en) Area specification system
JPH05500282A (en) Intelligent scanning image processor
JPH0337783A (en) Image normalizing system
JPH08305844A (en) Image processor
JPH04270475A (en) Image noise removing device