JPH01196678A - Closed area paint-out system - Google Patents

Closed area paint-out system

Info

Publication number
JPH01196678A
JPH01196678A JP2166788A JP2166788A JPH01196678A JP H01196678 A JPH01196678 A JP H01196678A JP 2166788 A JP2166788 A JP 2166788A JP 2166788 A JP2166788 A JP 2166788A JP H01196678 A JPH01196678 A JP H01196678A
Authority
JP
Japan
Prior art keywords
image
image data
data
filled
closed area
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
JP2166788A
Other languages
Japanese (ja)
Inventor
Yuzo Akiyama
秋山 裕造
Kazunori Fujiwara
和紀 藤原
Katsuyasu Kato
勝康 加藤
Yoshiteru Imada
今田 義照
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.)
Hitachi Ltd
Hitachi Information and Control Systems Inc
Original Assignee
Hitachi Ltd
Hitachi Control Systems Inc
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 Hitachi Ltd, Hitachi Control Systems Inc filed Critical Hitachi Ltd
Priority to JP2166788A priority Critical patent/JPH01196678A/en
Publication of JPH01196678A publication Critical patent/JPH01196678A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は画像処理に於ける閉領域塗りつぶし方式に係わ
り、特に任意の形状、大きさの閉領域を高速で塗りつぶ
すことに好適な閉領域塗りつぶし方式に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a closed area filling method in image processing, and in particular to a closed area filling method suitable for filling in closed areas of arbitrary shapes and sizes at high speed. Regarding the method.

〔従来の技術〕[Conventional technology]

従来技術は、特開昭59−47664号公報に開示され
、これは第2図で示すように、処理対象画像1中の塗り
つぶす領域2を塗りつぶす場合、与えられる塗りつぶし
開始点19から、閉領域の境界18を塗りつぶし経過画
像23であられしているように境界の探索20を行う。
The prior art is disclosed in Japanese Patent Application Laid-Open No. 59-47664, and as shown in FIG. The boundary 18 is filled in and a boundary search 20 is performed as shown in the progress image 23.

このとき、探索した上下方向に後に実行する塗りつぶし
開始点21の有無も同時に調べ、あれば記憶しておき塗
りつぶし経過画像24から塗りつぶし経過画像27の塗
りつぶしを経て、目的の閉領域を塗りつぶし終了領域2
2で埋めつくすことにより塗りっぷし完了画像17を生
成する。
At this time, the presence or absence of the filling start point 21 to be executed later in the searched vertical direction is also checked, and if found, it is memorized and the target closed area is filled through filling from the filling progress image 24 to the filling progress image 27, and the end area 2 is filled.
2, a painted complete image 17 is generated.

このように、ソフトウェアにより画像データを読み出し
、閉領域を形成する境界点を探索し、閉領域内の画素に
対して画像データを書き込む事により閉領域の塗りつぶ
す処理を実行している。
In this way, the process of filling in the closed area is executed by reading image data using software, searching for boundary points forming a closed area, and writing image data to pixels within the closed area.

しかしながら、本方法では、形状が複雑な場合。However, in this method, when the shape is complex.

また、閉領域が広い場合には、データ読み出し書き込み
、および閉領域内である位置を記憶する回数が多くなる
ことにより、処理時間を多大に要する問題があった。な
お、この種の方式として関連するものには例えばHD6
3484ACRTC(Advanced  CRT  
Controller)ユーザーズマニュアル P、2
83〜P、294等に挙げられる。
Furthermore, when the closed area is wide, there is a problem in that a large amount of processing time is required due to the increased number of times of reading and writing data and storing a certain position within the closed area. Note that related systems of this type include, for example, HD6.
3484ACRTC (Advanced CRT
Controller) User's Manual P, 2
83-P, 294, etc.

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

上記従来技術では、ソフトウェアにより1画像データを
画素ずつ読み出しては、閉領域を形成する境界点を探索
したのち、閉領域内の画素へデータを書き込む処理のた
め、閉領域が複雑な形状である場合や、閉領域が広い場
合には、多大な処理時間を要するという問題があった。
In the above conventional technology, software reads out image data pixel by pixel, searches for boundary points that form a closed area, and then writes data to pixels within the closed area, so the closed area has a complicated shape. There is a problem in that a large amount of processing time is required when the closed area is large or the closed area is large.

本発明の目的は、塗りつぶし領域の境界を識別し1画素
づつ塗りつぶし処理を行うソフトウェアによる塗りつぶ
し処理を用いないで1画像処理ハードウェアの画像処理
機能を組み合わせて高速に閉領域の塗りつぶし処理を行
う閉領域塗りつぶし方式を提供することにある。
An object of the present invention is to provide a method for quickly filling a closed area by combining the image processing functions of one image processing hardware, without using software to identify the boundaries of the filled area and fill in each pixel pixel by pixel. The purpose is to provide an area filling method.

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

上記目的は、塗りつぶし要求信号に基づいて塗りつぶし
処理対象画像の2値画像データを反転するか否かを判別
し、前記塗りつぶし要求信号に基づいて設定された塗り
つぶしを行う閉領域の画像データを1に塗りつぶす場合
は前記2値画像データを反転し、0に塗りつぶす場合は
反転させずそのままとし2値反転画像を生成する画像デ
ータ反転手段と、該2値反転画像を連続した同一データ
毎にラベル番号付けしラベル付け画像データに変換する
ラベリング手段と、該ラベル付け画像データを前記設定
された閉領域に対応するラベル番号の画像データとそれ
以外のラベル番号の画像データとに2分して2値化画像
データに変換する2値化手段と、該2値化画像データと
前記塗りつぶし処理対象画像の2値画像データとを論理
演算し塗りつぶし画像を生成する画像演算手段とにより
前記設定された閉領域の塗りつぶし処理を行う閉領域塗
りつぶし方式により達成される。
The above purpose is to determine whether or not to invert the binary image data of the image to be filled based on the filling request signal, and to set the image data of the closed area to be filled based on the filling request signal to 1. Image data inversion means for generating a binary inverted image by inverting the binary image data when filling it out and leaving it as it is without inverting it when filling it out with 0, and assigning a label number to each consecutive same data in the binary inverted image. labeling means for converting the labeled image data into labeled image data, and dividing the labeled image data into two image data with a label number corresponding to the set closed region and image data with other label numbers and binarizing the labeled image data. The set closed area is converted by a binarization means for converting into image data, and an image calculation means for performing a logical operation on the binarized image data and the binary image data of the image to be filled out to generate a filled-in image. This is achieved using a closed area filling method that performs filling processing.

〔作用〕[Effect]

塗りつぶし要求信号に基づいて画像データ反転手段によ
り塗りつぶし処理対象画像の2値画像データを反転する
か否かを判別し、前記塗りつぶし要求信号に基づいて設
定された塗りつぶしを行う閉領域の画像データを1に塗
りつぶす場合は前記2値画像データを反転し、0に塗り
つぶす場合は反転させずそのままとし、2値反転画像を
生成し、ラベリング手段によりこの2値反転画像を連続
した同一データ毎にラベル番号付けしてラベル付け画像
データに変換し、2値化手段によりこのラベル付け画像
データを前記設定された閉領域に対応するラベル番号の
画像データとそれ以外のラベル番号の画像データとに2
分して2値化画像データに変換し、この2値化画像デー
タと前記塗りつぶし処理対象画像の2値画像データとを
画像演算手段により論理演算し塗りつぶし画像を生成す
ることにより前記設定された閉領域の塗りつぶし処理を
行う。
Based on the fill request signal, the image data inversion means determines whether or not to invert the binary image data of the image to be filled, and converts the image data of the closed area to be filled based on the fill request signal into 1. When filling in with 0, the binary image data is inverted, and when filling with 0, it is not inverted and is left as it is, a binary inverted image is generated, and a labeling means assigns a label number to each consecutive same data of this binary inverted image. This labeled image data is converted into labeled image data by a binarization means into image data with a label number corresponding to the set closed area and image data with other label numbers.
This binary image data and the binary image data of the image to be filled out are subjected to a logical operation by an image calculation means to generate a filled image. Performs area filling processing.

〔実施例〕〔Example〕

以下、本発明の一実施例を第1図、第3図、第4図によ
り説明する。
An embodiment of the present invention will be described below with reference to FIGS. 1, 3, and 4.

第3図は画像処理装置の構成図である。画像データを入
力するためのITVカメラ28、画像データを表示する
ためのモニタテレビ29、画像データを格納するための
画像メモリ31.2値化処理、ラベリング処理等の画像
処理を実行する画像処理プロセッサ32およびマンマシ
ンインターフェースのためのコンソールC:RT33と
から構成されている。
FIG. 3 is a block diagram of the image processing device. An ITV camera 28 for inputting image data, a monitor television 29 for displaying image data, an image memory 31 for storing image data, and an image processing processor for performing image processing such as binarization processing and labeling processing. 32 and a console C: RT 33 for man-machine interface.

第1図は本発明の一実施例の画像処理の動作原理を示し
たものである。処理対象画像1の中で“1”データで形
成される“1″データの領域3で囲われた110 II
データの領域4の1つである塗リつぶす領域2をl(1
nデータで塗りつぶす場合について説明する。処理対象
画像1に対し、2値画像反転処理(画像データ反転手段
)5を行う事により、″1″′データは゛′O″データ
に、′O”データは“1”データに反転し、2値反転画
像6を得る。この2値反転画像6をラベリング処理(ラ
ベリング手段)7を行うことにより、ラベル付け画像8
を得る。ここで、塗りつぶす領域2は、ラベル値it 
3 +1の領域11と同一位置・面積の領域であり、こ
のラベル値113 jlの領域11のみを2値化処理(
2値化手段)14することにより、2値化画像15を作
り出す。最終処理として、処理対像画像1と、2値化画
像15との画像間加算処理(画像演算手段)16(論理
和)を実行することにより、塗りつぶし完了画像17を
生成することができる。この一連の画像処理により、閉
領域塗りつぶしの効果を得る。
FIG. 1 shows the operating principle of image processing according to an embodiment of the present invention. 110 II surrounded by area 3 of “1” data formed by “1” data in image 1 to be processed
Fill area 2, which is one of the data areas 4, is l(1
The case of filling with n data will be explained. By performing binary image inversion processing (image data inversion means) 5 on the image to be processed 1, "1" data is inverted to "O" data, "O" data is inverted to "1" data, and 2 A value inversion image 6 is obtained. By performing a labeling process (labeling means) 7 on this binary inverted image 6, a labeled image 8
get. Here, the area to be filled 2 is the label value it
It is an area with the same position and area as area 11 of 3 +1, and only area 11 of this label value 113 jl is binarized (
A binarized image 15 is created by binarizing means) 14. As a final process, a filled-in completed image 17 can be generated by performing an inter-image addition process (image calculation means) 16 (logical OR) between the processed image 1 and the binarized image 15. Through this series of image processing, the effect of filling in a closed area is obtained.

以上の各処理内容について、以下に説明する。The contents of each of the above processes will be explained below.

画像反転処理は、110 I+データをl(I I+デ
ータへ、′″1″′1″′データ0 jjデータへ変換
する処理であり、ラベリング処理は、連続した物体(本
実施例では′1″のデータ)毎の領域に各々同一のラベ
ル値を付加する処理であり、2値化処理は、目的の濃度
値(本実施例では、ラベル値)をII I I+データ
に、その他の濃度値を゛′0″″データに変換する処理
であり、2値画像間加算処理は、2種の2値画像の論理
和を行う処理であり、これら、画像反転処理、ラベリン
グ処理、2値化処理、2値画像間加算は、画像処理装置
のハードウェアで有した処理機能である。これらの処理
を、第1図で示す手順で処理を行うことにより、ラフl
−ウェアで1画素ずつ画像データを読み書きする処理を
不要にすることができるため、高速に目的を達成するこ
とができる。
The image inversion process is a process of converting 110 I+ data to l(I I+ data, '''1'''1''' data 0 jj data, and the labeling process is a process of converting 110 I+ data to l(I I+ data, '''1'''1''' data 0 jj data, The binarization process adds the same label value to each area (data), and the binarization process adds the target density value (label value in this example) to II II I+ data and other density values. It is a process of converting into ``0'' data, and the inter-binary image addition process is a process of performing a logical sum of two types of binary images. Addition between binary images is a processing function possessed by the hardware of the image processing device.By performing these processes in the procedure shown in Figure 1, the rough l
- Since the process of reading and writing image data pixel by pixel using hardware can be eliminated, the objective can be achieved at high speed.

また、第4図で示すように塗りつぶす領域がrt l 
17データであり、この領域を“Onデータに塗りつぶ
す場合には、処理対象画像1に対し、ラベリング処理7
を行いラベル付け画像8から、ラベル値II 3 I+
以外の領域を“1″にするように2値化処理14を行い
、処理対象画像1と2値化画像15との排他的論理和の
否定の画像間演算34を行うことにより実施することが
できる。
Also, as shown in Figure 4, the area to be filled is rt l
17 data, and when filling this area with "On data," labeling processing 7 is applied to processing target image 1.
and from the labeled image 8, the label value II 3 I+
This can be carried out by performing the binarization process 14 so that the other areas are set to "1", and performing the inter-image operation 34 of negating the exclusive OR of the processing target image 1 and the binarized image 15. can.

以上、本実施例によれば、閉領域の形状や大きさの影響
を受けることなく4回(または3回)のハードウェアの
実行で閉領域の塗りつぶし処理が実施でき、ソフトウェ
アによる画像メモリの読出し、書込みの処理を無くする
ことができるため、高速に塗りつぶし処理を実現する効
果がある。
As described above, according to this embodiment, it is possible to perform the filling process of a closed area by executing the hardware four times (or three times) without being affected by the shape or size of the closed area, and the image memory can be read out by software. , it is possible to eliminate writing processing, which has the effect of realizing high-speed filling processing.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、塗りつぶし要求信号に基づいて画像デ
ータ反転手段により塗りつぶし処理対象画像の2値画像
データを反転するか否かを判別し、設定された塗りつぶ
しを行う閉領域の画像データを1に塗りつぶす場合は前
記2値画像データを反転し、0に塗りつぶす場合は反転
させずそのままとし、2値反転画像を生成し、ラベリン
グ手段によりこの2値反転画像を連続した同一データ毎
にラベル番号付けしてラベル付け画像データに変換し、
2値化手段によりこのラベル付け画像データを前記設定
された閉領域に対応するラベル番号の画像データとそれ
以外のラベル番号の画像データとに2分して2値化画像
データに変換し、この2値化画像データと前記塗りつぶ
し処理対象画像の2値画像データとを画像演算手段によ
り論理演算し塗りつぶし画像を生成し、設定された閉領
域を塗りつぶすことにより、1画素づつ塗りつぶしを行
うソフトウェアによる塗りつぶし処理に比べ閉領域を高
速で塗りつぶすことができるという優れた効果がある。
According to the present invention, based on the fill request signal, the image data inversion means determines whether or not to invert the binary image data of the image to be filled, and sets the image data of the closed area to be filled to 1. When filling, the binary image data is inverted; when filling with 0, it is not inverted and is left as it is, a binary inverted image is generated, and a labeling means assigns a label number to each consecutive identical data of this binary inverted image. and convert it into labeled image data.
A binarization means divides this labeled image data into two parts, image data with a label number corresponding to the set closed area and image data with other label numbers, and converts this into binarized image data. Filling using software that performs a logical operation on the binary image data and the binary image data of the image to be filled by an image calculation means to generate a filled image, and fills in a set closed area pixel by pixel. It has an excellent effect of being able to fill in closed areas at high speed compared to conventional processing.

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

第1図は本発明の一実施例の画像処理の動作原理図、第
2図は従来例の画像処理の動作原理図。 第3図は画像処理装置の構成図、第4図は他の実施例の
画像処理の動作原理図である。 1・・・処理対象画像、5・・・画像反転処理、7・・
・ラベリング処理、14・・・2値化処理、16・・・
画像間加算処理、17・・・塗りつぶし完了画像。
FIG. 1 is a diagram of the operating principle of image processing according to an embodiment of the present invention, and FIG. 2 is a diagram of the operating principle of image processing of a conventional example. FIG. 3 is a block diagram of the image processing apparatus, and FIG. 4 is a diagram of the operating principle of image processing in another embodiment. 1... Image to be processed, 5... Image inversion processing, 7...
・Labeling processing, 14... Binarization processing, 16...
Inter-image addition processing, 17...Filled completed image.

Claims (1)

【特許請求の範囲】[Claims] (1)塗りつぶし要求信号に基づいて塗りつぶし処理対
象画像の2値画像データを反転するか否かを判別し、前
記塗りつぶし要求信号に基づいて設定された塗りつぶし
を行う閉領域の画像データを1に塗りつぶす場合は前記
2値画像データを反転し、0に塗りつぶす場合は反転さ
せずそのままとして2値反転画像を生成する画像データ
反転手段と、該2値反転画像を連続した同一データ毎に
ラベル番号付けしラベル付け画像データに変換するラベ
リング手段と、該ラベル付け画像データを前記設定され
た閉領域に対応するラベル番号の画像データとそれ以外
のラベル番号の画像データとに2分して2値化画像デー
タに変換する2値化手段と、該2値化画像データと前記
塗りつぶし処理対象画像の2値画像データとを論理演算
し塗りつぶし画像を生成する画像演算手段とにより前記
設定された閉領域の塗りつぶし処理を行うことを特徴と
する閉領域塗りつぶし方式。
(1) Based on the fill request signal, determine whether or not to invert the binary image data of the image to be filled, and fill the image data of the closed area to be filled with 1 based on the fill request signal. an image data inverting means for inverting the binary image data in the case of filling it with 0, and generating a binary inverted image without inverting it as it is in the case of filling it with 0; a labeling means for converting into labeled image data; and a binarized image by dividing the labeled image data into image data with a label number corresponding to the set closed region and image data with other label numbers. The set closed area is filled in by a binarization means for converting it into data, and an image calculation means for performing a logical operation on the binarized image data and the binary image data of the image to be filled out to generate a filled image. A closed area filling method characterized by processing.
JP2166788A 1988-02-01 1988-02-01 Closed area paint-out system Pending JPH01196678A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2166788A JPH01196678A (en) 1988-02-01 1988-02-01 Closed area paint-out system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2166788A JPH01196678A (en) 1988-02-01 1988-02-01 Closed area paint-out system

Publications (1)

Publication Number Publication Date
JPH01196678A true JPH01196678A (en) 1989-08-08

Family

ID=12061391

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2166788A Pending JPH01196678A (en) 1988-02-01 1988-02-01 Closed area paint-out system

Country Status (1)

Country Link
JP (1) JPH01196678A (en)

Similar Documents

Publication Publication Date Title
JPS6170407A (en) distance measuring device
JPS61112284A (en) Method and apparatus for implementing expansive and erosive deformation in gray scale image processing
JPH0785286A (en) Image processing device
JPS6341107B2 (en)
JPS59135579A (en) Pattern contour tracing method
JPS62108381A (en) Density histogram detecting system
JPH0664074B2 (en) Moving object speed measuring device
JPS60128569A (en) Drawing smear-out system
JPS60117374A (en) System for approximating polygonal line of linear graphic form
JP2935847B2 (en) Image processing device
Andersen et al. Active vision system for robot guidance using a low-cost neural network board
JPH04184576A (en) Picture processor
JPS63163579A (en) Graphic boundary vector generating circuit
JPH0245229B2 (en)
JPH0290380A (en) How to determine the driving route
JP2962613B2 (en) Pattern filling method
JPS59142677A (en) Image processing device
JPH0691598B2 (en) Pattern recognition method and image reduction apparatus therefor
JPS63198171A (en) Picture processor
JPS63201880A (en) Image processing device
JPH0583953B2 (en)
JPS60257655A (en) Picture processor
JPH0642261B2 (en) Image processing method
JPH0442712B2 (en)
JPH02134548A (en) Pattern inspection