JPH063609B2 - Image processing method - Google Patents
Image processing methodInfo
- Publication number
- JPH063609B2 JPH063609B2 JP59060680A JP6068084A JPH063609B2 JP H063609 B2 JPH063609 B2 JP H063609B2 JP 59060680 A JP59060680 A JP 59060680A JP 6068084 A JP6068084 A JP 6068084A JP H063609 B2 JPH063609 B2 JP H063609B2
- Authority
- JP
- Japan
- Prior art keywords
- area
- component
- data
- image
- storage means
- 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 - Lifetime
Links
Landscapes
- Character Input (AREA)
- Processing Or Creating Images (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Description
【発明の詳細な説明】 〔発明の利用分野〕 本発明は対象となる画像を画像区域ごとに順次切出しな
がら処理を進める画像処理方式に関するものである。Description: FIELD OF THE INVENTION The present invention relates to an image processing system for advancing processing while sequentially cutting out a target image for each image area.
撮像された画像の中から目的とする部品を探し出し、そ
の大きさと位置等を計測し、それらのデータをその部品
を扱う工業用ロボット等の制御に役立てることは既知で
ある。その画像には目的とする部品、その他の部品、背
景中の微小な部品が含まれ、またノイズとか傷あるいは
染みなどの要素も含まれる。このため、背景が複雑でノ
イズ等が多い場合は、その分だけ画像中に認識される見
かけ上の部品点数が増大する結果となり、画像処理用記
憶手段の容量を予め大きく設定する必要が生ずる。It is known that a target part is searched for in a picked-up image, its size, position, and the like are measured, and those data are used for controlling an industrial robot or the like that handles the part. The image includes target parts, other parts, minute parts in the background, and also noise, scratches, stains, and other elements. Therefore, when the background is complicated and there are many noises and the like, the number of apparent parts recognized in the image increases correspondingly, and it becomes necessary to set the capacity of the image processing storage means large in advance.
またノイズによる見かけ上の部品点数増大により、処理
時間が多くなってくるので、上記目的のために使用され
る図形処理装置においては、処理時間が短いことが重要
となる。Further, since the processing time becomes long due to the apparent increase in the number of parts due to noise, it is important that the processing time is short in the graphic processing apparatus used for the above purpose.
画像処理用記憶手段を使って画像を切出し、ノイズを除
去する従来例として特開昭58−207181号、特開
昭49−149633号に示されたような方法がある
が、画面処理途上においてメモリ容量が不足してしま
い、次の画像区域の切出し工程を継続することができな
くなってしまうということに対しては、考慮が払われて
いなかった。As a conventional example for cutting out an image using a storage means for image processing and removing noise, there are methods as disclosed in JP-A-58-207181 and JP-A-49-149633. No consideration has been given to the lack of capacity and the inability to continue the cropping process for the next image area.
本発明は画像処理の途上で生ずる記憶手段の容量不足を
有効に回避するとともに、処理時間を短縮することにあ
る。An object of the present invention is to effectively avoid the shortage of the capacity of the storage means that occurs during image processing and to shorten the processing time.
本発明においては処理対象となる画像区域を順次切出す
手段と切出された画像区域に関するデータ、たとえば分
析データを格納する記憶手段を備える。また、すでに切
出された画像区域の中に含まれる各部品領域の切出し終
了を判定する手段をもつ。部品領域というのは画像中に
あらわれるあるひとつの部品が占める画面上の広がりの
ことである。もしも、その部品領域がその後に切出され
る画像区域にまつたく及んでいないのであれば、かりに
画像区域の切出しが未完であつても、その部品領域に関
する切出しは終了していることとなる。一方、切出しの
終了した部品領域に関するデータの要否を判定する手段
を有する。たとえばその部品領域の面積が予め定めた基
準値を下回わるのであれば、その領域をノイズ等と判断
し、不要なデータと判定する。この不要なデータの中に
はその部品領域の存在を示すデータたとえば部品領域番
号も含まれる。さらに、本発明においては前記手段によ
って判定された不要データを前記記憶手段の中から消去
する手段も備えている。このため、画像区域の切出しが
未完な状況で記憶手段の容量が不足した場合であつて
も、その中から不要のデータを消去することによつて、
次の画像区域の切出し工程を継続することができる。In the present invention, there are provided means for sequentially cutting out image areas to be processed and storage means for storing data relating to the cut out image areas, for example, analysis data. Further, it has means for judging the cut-out end of each part area included in the already cut-out image area. The parts area is the area on the screen occupied by one part that appears in the image. If the part area does not reach the image area to be subsequently cut out, the cutout for the part area is completed even if the image area is not completely cut out. On the other hand, it has a means for determining the necessity of data regarding the part area for which the cutting has been completed. For example, if the area of the component region is smaller than a predetermined reference value, the region is determined to be noise or the like and is determined as unnecessary data. The unnecessary data includes data indicating the existence of the parts area, for example, the parts area number. Further, the present invention further comprises means for erasing the unnecessary data judged by the means from the storage means. Therefore, even if the capacity of the storage means is insufficient due to the incomplete cutting of the image area, the unnecessary data can be deleted from it.
The cutting process of the next image area can be continued.
以下、本発明の実施例を図面により説明する。第1図に
画像処理回路を示す。この図は主としてデータの流れを
示したものであつて、処理に必要なCPUないしはその
プログラム記憶手段の図示は省いた。1は撮像装置であ
り、認識対象物の撮像を行なう。2は画像データ入力装
置であり、1の撮像装置が送信するアナログ信号を受信
し、このアナログ信号をデジタルの多値画像データに変
換し、3に示す多値画像メモリ上に格納する。4は多値
画像メモリ3に格納された画像データを2値化する機能
を有するコンパレータを示す。このコンパレータ4によ
り2値化した画像データを5に示す変化点検出装置によ
り変化点データに変換し、6に示す変化点メモリ上に格
納する。第2図は変化点メモリ6上に構成される変化点
テーブルを示す。この変化点テーブルは第3図に示すよ
うに、画像のラスタ上を左から右へ走査したときに画像
区域(この場合は画素)のビツトが「1」から「0」ま
たは「0」から「1」に変化した時の変化値と変化点の
走査方向のアドレスからなる。これも画像区域に関する
一種の分析データである。7はレジスタを示し、変化点
メモリ6上の変化点データを処理する機能を持つ。8は
部品領域データメモリを示す。このメモリは画像中に含
まれる各部品に関する部品領域特徴が格納される。すな
わち、上記変化点データをレジスタ7を介して分析し、
これによって 出された部品領域特徴が格納される。9
は部品領域番号メモリを示す。この部品領域番号メモリ
9は、ラスタ上の変化点がどの部品領域に属するかとい
う情報を持ち、後に説明する部品領域番号付け処理に利
用される。Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows an image processing circuit. This figure mainly shows the flow of data, and the CPU necessary for processing or its program storage means is not shown. An image pickup device 1 picks up an image of an object to be recognized. An image data input device 2 receives an analog signal transmitted by the image pickup device 1, converts the analog signal into digital multi-valued image data, and stores the multi-valued image memory shown in 3. Reference numeral 4 denotes a comparator having a function of binarizing the image data stored in the multi-valued image memory 3. The image data binarized by the comparator 4 is converted into change point data by the change point detection device shown in 5 and stored in the change point memory shown in 6. FIG. 2 shows a change point table formed on the change point memory 6. As shown in FIG. 3, this change point table shows that the bits of the image area (pixels in this case) are "1" to "0" or "0" to "0" when scanning the raster of the image from left to right. It is composed of a change value when changing to "1" and an address of the change point in the scanning direction. This is also a kind of analysis data regarding the image area. Reference numeral 7 denotes a register, which has a function of processing change point data on the change point memory 6. Reference numeral 8 indicates a component area data memory. This memory stores the component area feature relating to each component included in the image. That is, the change point data is analyzed via the register 7,
The component area feature generated by this is stored. 9
Indicates a component area number memory. The component area number memory 9 has information about which component area the change point on the raster belongs to, and is used for a component area numbering process described later.
ここで、本明細書記載上の用語について説明する。画像
中に含まれる部品とはその一画面の中にあらわれるたと
えばA部品,B部品………といつたごく普通の意味で用
いるが、部品の単一性に関する区別は厳格でない。たと
えば単一の実際の部品の一方の端面と他方の端面を示す
それぞれの図形が少なくとも当初は2部品として把握さ
れることもあり得るためである。また、区域,領域,地
域に関しては、画像処理のために、画像の中から画素単
位あるいはラスタ単位で切出されるものが区域であり、
画像中に含まれる部品の画面上の広がりが領域であり、
その領域のある一部分が地域である。Here, the terms used in this specification will be described. The parts included in the image are used in their ordinary meanings, such as A parts, B parts, and so on appearing in the one screen, but the distinction regarding the unity of the parts is not strict. This is because, for example, the respective figures showing one end face and the other end face of a single actual part may be grasped as two parts at least initially. Regarding areas, regions, and areas, what is cut out from the image in pixel units or raster units is an area for image processing.
The spread on the screen of the parts included in the image is the area,
A part of the area is a region.
以下、部品領域番号付けアルゴリズムについて説明す
る。第2図の変化点テーブルにおける変化値、アドレス
データの比較を、画像から切出された上下2つのラスタ
(区域)間で行ない、第4図に示す継続,発生,合流の
各パターンに分類する。以下、これらの各パターンにつ
いて説明する。なお、第4図,第8図は上下2つ以上の
ラスタをその順に並べたものであつて、図中の数字は部
品領域番号をあらわしている。The component area numbering algorithm will be described below. Comparison of change values and address data in the change point table of FIG. 2 is performed between two upper and lower rasters (areas) cut out from the image, and classified into the continuation, generation, and confluence patterns shown in FIG. . Each of these patterns will be described below. It should be noted that FIGS. 4 and 8 show two or more rasters in the upper and lower rows arranged in that order, and the numerals in the figures represent the component area numbers.
(1) 継続パターン(第5図) 隣接するラスタにおける上ラスタのたとえば部品領域1
0に属する地域と下ラスタの地域aが連結している場
合、部品領域10に対して付けてある領域番号すなわち
10を、部品領域番号メモリ9よりアクセスし、地域a
に対応する領域番号メモリ上の番地に格納する。上記の
部品領域10は「0」ビツトすなわち、背景ないしは抜
けの領域であるが「1」ビツト同志の場合もまつたく同
様である。(1) Continuation pattern (Fig. 5) For example, the component area 1 of the upper raster in the adjacent rasters
When the area belonging to 0 and the area a of the lower raster are connected, the area number assigned to the part area 10, that is, 10 is accessed from the part area number memory 9 and the area a
The area number corresponding to is stored in the address on the memory. The parts area 10 is a "0" bit, that is, a background or missing area, but the same applies to the case where "1" bits are comrades.
(2) 発生パターン(第6図) 上ラスタの部品領域12に属する地域と連結していない
地域に対して新しいたとえば13という部品領域番号を
付ける。(2) Occurrence pattern (FIG. 6) A new part area number such as 13, for example, is assigned to an area that is not connected to an area belonging to the part area 12 of the upper raster.
(3) 合流パターン(第7図) 上ラスタ左側の部品領域14に属する地域と上ラスタ右
側の部品領域15に属する地域とが下ラスタ地域bで互
いに合流する場合は上ラスタ左側の方の部品領域番号1
4を下ラスタの地域bに対して付け、上ラスタ右側の部
品領域15に付いている領域番号15を上ラスタ左側の
方の部品領域番号14に変更する。(3) Confluence pattern (Fig. 7) When an area belonging to the parts area 14 on the left side of the upper raster and an area belonging to the parts area 15 on the right side of the upper raster meet in the lower raster area b, the parts on the left side of the upper raster Area number 1
4 is attached to the area b of the lower raster, and the area number 15 attached to the parts area 15 on the right side of the upper raster is changed to the parts area number 14 on the left side of the upper raster.
以上のように継続あるいは合流の各パターンでは上のラ
スタに対応する部品領域番号と同じ番号を以下のラスタ
の各地域に対して付ける。このため、たとえば1行目の
ラスタに部品領域番号を付けると、それが以下のラスタ
に次々と伝播性を利用すると、画像区域の切出し処理中
に、ある部品領域に関する切出しがすでに終了している
のかどうかを判定することができる。以下、この点のア
ルゴリズムについて述べる。第8図の部品領域2の切出
し終了部分は同図中の2つの合流パターンc,dのう
ち、dのように同じ番号の部品領域1に属する二つの離
れた地域が最新に切出された画像区域(ラスタD)
の中でひとつに合流するところと判定される。この場
合、切出しが終了するのは部品領域1ではなく、前記の
二つの離れた地域によつてはさまれた地域を含む部
品領域2の方である。ラスタDの切出し以前に生じたも
うひとつの合流パターンCは部品領域2の切出し終了の
サインとはならない。この合流パターンCは少なくとも
合流が生ずる以前の段階では互いに異なる部品領域と見
られていた部品領域との合流であつて、同一部品領
域に属する二地域の合流ではない。以上のような部品領
域に関する切出し終了を検出することにより、第9図に
示すように、画像区域の切出し途上(第9図において最
新に切出された画像区域はラスタEである)においても
切出し終了の部品領域20〜28と切出し中の部品領域
30〜34を区別することが可能となる。As described above, in each of the continuous or merging patterns, the same number as the component area number corresponding to the upper raster is assigned to each area of the following rasters. For this reason, for example, if a part area number is assigned to the raster of the first row and it uses the propagating property for the following rasters one after another, the cutout for a certain part area is already completed during the cutout processing of the image area. Can be determined. The algorithm of this point will be described below. In the cut-out end portion of the part area 2 in FIG. 8, two separated areas belonging to the part area 1 having the same number as d among the two joining patterns c and d in the figure are cut out most recently. Image area (raster D)
It is judged that they will join together. In this case, it is not the component region 1 that cuts out, but the component region 2 that includes the region sandwiched by the two distant regions. Another confluence pattern C generated before the cutout of the raster D does not serve as a sign of the cutout of the component area 2. The merging pattern C is a merging with a component area that is considered to be a different component area at least at a stage before the merging occurs, and is not a merging of two regions belonging to the same component area. By detecting the cut-out end regarding the component area as described above, as shown in FIG. 9, the cut-out is performed even during the cut-out of the image area (the latest cut-out image area in FIG. 9 is the raster E). It is possible to distinguish between the finished component regions 20 to 28 and the component regions 30 to 34 being cut out.
部品領域の切出し終了が判定し難い特殊な例として、第
10図に示すように撮像した画面の外枠に接した部品領
域41,42,43,44がある場合が考えられる。こ
のように画面外枠に接した部品領域41〜44に対して
上記切出し終了の判定方式が適用しにくい原因は、画面
外枠で上記の部品領域番号の伝播性が切れてしまう点に
ある。そこで、マスク処理によつて第10図のように撮
像した画面の変化点データのうち画面外枠100と点線
200との間における変化点データ(たとえば411)
を、第11図に示される画面外枠と接触のない画像デー
タ(たとえば412)に変換することで、画面外枠付近
における部品領域番号の伝播性を生じさせれば、前記終
了判定の考え方をそのまま適用することができる。As a special example in which it is difficult to determine the cutout end of the part area, there may be a case where there are part areas 41, 42, 43, 44 in contact with the outer frame of the imaged screen as shown in FIG. The reason why it is difficult to apply the above-described cutout end determination method to the component areas 41 to 44 in contact with the outer frame of the screen is that the propagating property of the component area number is cut off in the outer frame of the screen. Therefore, change point data between the screen outer frame 100 and the dotted line 200 (for example, 411) in the change point data of the screen imaged by the masking process as shown in FIG.
Is converted into image data (for example, 412) that does not contact the outer frame of the screen shown in FIG. 11 to cause the propagation of the component area numbers near the outer frame of the screen, the concept of the end determination is described. It can be applied as is.
第12図は第1図8に示す部品領域データメモリ8のメ
モリテーブルをあらわしたものである。各部品領域に関
するデータはその部品領域番号たとえば1〜5の順に格
納されている。この領域データメモリ8は切出された画
像区域に関するデータを格納する一種の記憶手段に該当
する。このため、それら全体のデータ量は画像の切出し
が進むにしたがつて増加する。また、第9図のように切
出された画像区域のその画像(21〜28,30〜3
4)が複雑であれば必然的に増加することとなる。部品
領域データメモリ8として予め用意された容量がかりに
部品30個分であれば、パターン発生によつて第31番
目の部品領域が出現したときに容量が不足した状況とな
る。この状況のもとでは第31番目の部品領域に関する
データが格納できなくなる。話は第12図のメモリテー
ブルの中身が戻るが、ここでの部品領域に関する面積と
はその領域に属する画素ビツトの数を計数したものであ
つて画素ビツト単位であらわされている。また、上位領
域番号とは当該部品領域を包む他の部品領域の番号を示
すものである。たとえば第9図では部品領域23の上位
領域番号とは部品領域30の部品領域番号に該当する。
第12図の統合先番号とはそこにたとえば零以外の数が
書き込まれているときは、当該部品領域に関するデータ
は不要であつて、必要に応じて統合先番号に相当する部
品領域のデータへ統合してもよいことを示している。こ
の統合先番号は上位領域番号と一致することが多いが、
それと異なる場合もある。たとえば第9図の切出し途上
の部品領域33についてみると、その上位領域は30で
あるが、その後の切出しによつて部品領域33と32が
合流するのであれば、その合流したときに部品領域33
の統合先として部品領域32の番号が書込まれることと
なる。FIG. 12 shows a memory table of the component area data memory 8 shown in FIG. The data related to each component area is stored in the order of the component area number, for example, 1 to 5. This area data memory 8 corresponds to a kind of storage means for storing data relating to the cut-out image area. Therefore, the total amount of data increases as the cutout of the image progresses. Further, the image (21 to 28, 30 to 3) of the image area cut out as shown in FIG.
If 4) is complicated, it will inevitably increase. If there are 30 parts based on the capacity prepared in advance as the part area data memory 8, the capacity will be insufficient when the 31st part area appears due to pattern generation. Under this situation, the data regarding the 31st parts area cannot be stored. The content of the memory table shown in FIG. 12 is returned, and the area relating to the component region here is a count of the number of pixel bits belonging to the region and is expressed in pixel bit units. The upper area number indicates the number of another component area that surrounds the component area. For example, in FIG. 9, the upper area number of the parts area 23 corresponds to the parts area number of the parts area 30.
The integration destination number in FIG. 12 is, for example, when a number other than zero is written therein, it means that the data relating to the parts area concerned is unnecessary, and the data of the parts area corresponding to the integration destination number is necessary. It indicates that they can be integrated. This integrated destination number often matches the upper area number,
It may be different. For example, looking at the part area 33 in the middle of cutting out in FIG. 9, the upper area is 30, but if the part areas 33 and 32 merge due to the subsequent cutting out, the part area 33 at the time of merging.
The number of the parts area 32 will be written as the integration destination of.
前記したように、第12図の部品領域2,3に関するデ
ータは不要であつて、これを消去することが可能である
が、現に消去した場合は第12図のメモリテーブルが第
13図のように変更される。第12図における部品領域
番号2,3のデータはその面積「10」「17」をその
統合先番号「1」に相当する部品領域1の面積に加算す
る処理を行つた上で完全に消去される。消去後に部品領
域番号2,3のところが空白となるので、それ以下の部
品領域4,5………のデータを若い番号の方へ詰め、領
域データテーブルを第13図のように再配置する。この
結果、部品領域データメモリ8に部品領域2個分のゆと
りが生ずる。部品領域データメモリ8の容量不足は、予
めそのサイズに応じたたとえば30という数を基準値と
して記憶しておき、その数を越えた第31番目の部品領
域の発生によつて判断されることになるが、その不足の
状況のもとで、以上のような消去によつて部品領域2個
分のゆとりをつくれば、その第31番目のデータを部品
領域番号29のところへ格納することが可能となる。も
つとも、領域データテーブルを第13図のように再配置
する工程を省略し、第31番目のデータを第13図の部
品領域番号2の列に書込み、もつてそれ以前のデータを
消去するようにしてもかまわない。As described above, the data relating to the component areas 2 and 3 of FIG. 12 is unnecessary and can be erased. However, when the data is actually erased, the memory table of FIG. 12 is as shown in FIG. Is changed to. The data of the component area numbers 2 and 3 in FIG. 12 is completely erased after the processing of adding the area "10" and "17" to the area of the component area 1 corresponding to the integration destination number "1". It After the erasure, the parts area numbers 2 and 3 become blank, so the data of the parts areas 4, 5 ..., which are smaller than that, are packed toward the smaller numbers, and the area data table is rearranged as shown in FIG. As a result, a space for two component areas is generated in the component area data memory 8. Insufficient capacity of the component area data memory 8 is stored in advance as a reference value, for example, a number of 30 according to the size, and is judged by the occurrence of the 31st component area exceeding the number. However, under such a shortage condition, if the space for two component areas is created by erasing as described above, the 31st data can be stored at the component area number 29. Becomes In addition, the process of rearranging the area data table as shown in FIG. 13 is omitted, the 31st data is written in the column of the part area number 2 in FIG. 13, and the data before it is erased. It doesn't matter.
第14図は第1図9の部品領域番号メモリに関するデー
タテーブルを示したものである。ここにはラスタの上位
から下位の順番ごとに、かつ同一ラスタ内にあらわれる
変化点の順位ごとに、その地域の属する部品領域の番号
が格納されている。第14図の左上のものほど前記順番
ないしは順位が若い。この部品領域番号メモリ9も切出
された画像区域に関するデータを格納する一種の記憶手
段である。第12図,第13図のところで指適した不要
データの消去がなされるのであれば、それにともなつ
て、たとえば第14図の部品番号2のところがすべて空
白となり、その分だけメモリ容量上のゆとりが生ずるこ
ととなる。前記したように、部品領域の面積は画素ビツ
トの単位で測られるが、これはたとえば第14図のメモ
リテーブル中の部品領域番号4を書込むときに、そのラ
スタにおけるその地域の属する画素ビツトの数を第3図
のアドレス差から求め、その数をたとえば第3図中の部
品領域4の面積「436」に足し込めばよい。FIG. 14 shows a data table relating to the component area number memory of FIG. Here, the numbers of the component areas to which the area belongs are stored in order from the upper order of the raster to the lower order, and according to the order of the change points appearing in the same raster. In the upper left of FIG. 14, the order or rank is smaller. This component area number memory 9 is also a kind of storage means for storing data relating to the cut out image area. If unnecessary data is erased in a suitable manner as shown in FIGS. 12 and 13, for example, part number 2 in FIG. 14 is all blank, and the memory capacity is accordingly reduced. Will occur. As described above, the area of the component area is measured in the unit of pixel bit. This is, for example, when writing the component area number 4 in the memory table of FIG. 14, the pixel bit to which the area belongs in the raster is written. The number may be obtained from the address difference in FIG. 3, and the number may be added to the area “436” of the part region 4 in FIG. 3, for example.
次に、すでに切出しの終了した部品領域に関するデータ
が必要なものかあるいは不要なものかを判定するアルゴ
リズムについて説明する。ひとつの有効な手段はその切
出しの終了した部品領域の面積が予め設定した基準面積
に満たないときに不要と判定するものである。かりに、
この基準面積を20画素ビツトと定めておけば、たとえ
ば第12図の部品領域2,3に関するデータは不要と判
定され、その統合先番号1,1が記録される。別の手段
は切出しの終了した各部品領域のうち面積が最小のもの
を不要と判定する方式である。以上の二つの手段は微小
面積の部品領域は画面背景の遠くに位置する目的外の部
品であつたり、あるいはノイズとか傷、染みである公算
が高いという経験則を基礎としたものである。以上の二
つの手段を併用することも可能である。たとえば、はじ
めは前者の手段を採用し、基準面積以下に該当する部品
領域がまつたく見当らない状況(該当部品領域のデータ
をすでに消去した場合を含む)のもとで記憶手段の容量
が不足した場合に、後者の手段に切換える方式とする。Next, an algorithm for determining whether or not the data related to the part area that has already been cut out is necessary or unnecessary will be described. One effective means is to determine that the area is unnecessary when the area of the cut-out component area is less than a preset reference area. By the way,
If this reference area is set to 20 pixel bits, it is determined that the data concerning the component areas 2 and 3 in FIG. 12 is unnecessary, and the integration destination numbers 1 and 1 are recorded. Another means is a method of judging that the one having the smallest area out of the cut-out component regions is unnecessary. The above two means are based on the empirical rule that a component area having a very small area is an unintended component located far away from the screen background, or is likely to be noise, scratches, or stains. It is also possible to use the above two means together. For example, at first, the former method was adopted, and the capacity of the storage means became insufficient under the condition that the part area corresponding to the reference area or less was not found (including the case where the data of the corresponding part area was already deleted). In this case, the latter method is used.
部品領域に関するデータの消去についてはすでに説明し
た。その面積に関するデータを統合先のそれに加算した
後で消去することについてもすでに指摘したが、その消
去のタイミングは記憶手段の容量に不足が生じたときと
することが得策である。それは消去処理ないしはその後
のメモリテーブル再配置処理に要する時間を節約するた
めである。また、かりに容量不足が生せず、そのために
不要データが残つたとしても、より画像処理の進んだ後
の段階でデータの要否を判定した方が、その要否判定の
確度が高くなるためである。The erasure of data related to the parts area has already been described. Although it has already been pointed out that the data relating to the area is added to that of the integration destination and then the data is erased, the timing of the erasure is advantageous when the capacity of the storage means becomes insufficient. This is to save the time required for the erase process and the subsequent memory table rearrangement process. Also, even if there is not enough space and unnecessary data remains because of this, it is more accurate to determine the necessity of data at a later stage of image processing, because the necessity determination will be more accurate. Is.
第1図の変化点メモリ6も切出された画像区域に関する
データを格納する一種の記憶手段である。その切出しの
対象となる画像は多値画像メモリ3のそれであつて、こ
の場合は切出された画像ビツトごとのデータが2値化さ
れ、変化点が検出され、変化点メモリ6に記憶される。
この変化点メモリ6に容量不足が生じた場合にも、その
後の画像区域の切出しができなくなる。この場合は、以
上の画像区域の切出し処理と並行して、あるいは変化点
メモリ6が容量不足となつたときに、すでに切出された
変化点メモリ6に格納されたデータを分析して部品領域
データメモリ8あるいは部品領域番号メモリ9にデータ
を生成し、不要データを判定すれば、容量不足の生じた
変化点メモリ6の中からも不要データを消去することが
可能となる。たとえば第2図のアドレス7の地域が不要
と判定された部品領域に属するのであれば、アドレス7
とその次の8に対する変化値1と0を消去することが可
能となり、それを消去して容量不足を解消すれば、その
後の切出しを再開することができる。The change point memory 6 in FIG. 1 is also a kind of storage means for storing data regarding the cut out image area. The image to be cut out is that of the multi-valued image memory 3. In this case, the data for each cut out image bit is binarized, the change point is detected, and stored in the change point memory 6. .
Even when the capacity of the change point memory 6 becomes insufficient, the subsequent image area cannot be cut out. In this case, the data stored in the cut-out change point memory 6 is analyzed in parallel with the above-described cut-out processing of the image area or when the change-point memory 6 becomes insufficient in capacity, and the parts area is analyzed. By generating the data in the data memory 8 or the component area number memory 9 and determining the unnecessary data, it is possible to delete the unnecessary data from the change point memory 6 in which the capacity is insufficient. For example, if the area of address 7 in FIG. 2 belongs to a parts area determined to be unnecessary, address 7
Then, the change values 1 and 0 for the next 8 can be erased, and if they are erased to eliminate the lack of capacity, the subsequent cutting can be resumed.
第15図は第1図のレジスタ7等のデータを扱うCPU
のプログラム概要をあらわしたフローチャートである。
以下、これについて説明するが、図中のブロツク番号を
〔 〕でくくつてその該当ブロツクを示すこととし、そ
れに引続いてそのブロツクに関する説明を加えるきまり
とする。FIG. 15 is a CPU that handles data such as the register 7 in FIG.
2 is a flowchart showing the outline of the program.
This will be explained below, but it is assumed that the block numbers in the figure are enclosed by [] to indicate the corresponding block, and subsequently, the explanation about the block will be added.
〔501〕=変化点メモリ6の中から第1行目のラスタに
関するデータをレジスタ7に呼び出す 〔502〕=第1行目のラスタにおける各地域(部品領域
の一部)に割り振られる部品領域番号を部品領域番号メ
モリ9に登録する。またその面積、上位領域番号、統合
先番号を部品領域データメモリ8に格納する。上位領域
番号は最先の地域のそれを0とし、それ以外の地域のそ
れはその左側の地域の部品領域番号とする。統合先番号
はすべて0である。[501] = Call the data regarding the raster of the first row from the change point memory 6 to the register 7 [502] = Part area number assigned to each area (part of the part area) in the raster of the first row Is registered in the component area number memory 9. Further, the area, the upper area number, and the integration destination number are stored in the parts area data memory 8. The upper area number is set to 0 in the first area, and the other area is set to the part area number in the left area. The integration destination numbers are all 0.
〔503〕=第2行目相当の切出し対象となつたラスタに
関する変化点メモリ6のデータをレジスタ7に呼び出
す。[503] = Call the register 7 for the data of the change point memory 6 relating to the raster that is the target of the cut-out corresponding to the second line.
〔504〕=レジスタ7の2行相当分の変化点テーブルを
参照し、パターン分類の処理を行う。[504] = Refer to the change point table for two rows of the register 7 to perform pattern classification processing.
〔505〕=パターンの形態に応じてプログラムの飛び先
を変更する、 〔506〕=部品領域データメモリ8ないしは部品領域番
号メモリ9が不足していないかどうかを判断する。もし
も不足しているのであれば新たに発生した部品領域に関
するデータが格納できない状況となる。[505] = Change the program jump destination according to the form of the pattern. [506] = Determine whether the component area data memory 8 or the component area number memory 9 is sufficient. If there is a shortage, the data regarding the newly generated component area cannot be stored.
〔507〕=部品領域データメモリ8における統合先番号
(ただし0以外)の付与された部品領域に関するデータ
を消去する。それに先立ち、その面積に関するデータに
ついては統合先の部品領域データに加算する。最後に部
品領域データメモリ8のメモリテーブルを再配置する。[507] = Delete the data related to the component area to which the integration destination number (other than 0) in the component area data memory 8 is given. Prior to that, the data regarding the area is added to the component area data of the integration destination. Finally, the memory table of the component area data memory 8 is rearranged.
〔508〕=新たに発生した部品領域番号を部品領域番号
メモリ9に登録する。[508] = Register the newly generated component area number in the component area number memory 9.
〔509〕=新たに発生した部品領域に関するデータを部
品領域データメモリ8に登録する。この場合の統合先番
号は0であり、また上位領域番号はその地域の左側の地
域の属する部品領域の番号である。[509] = Register the data on the newly generated component area in the component area data memory 8. In this case, the integration destination number is 0, and the upper area number is the number of the part area to which the area on the left side of the area belongs.
〔511〕=レジスタ7における上下2ラスタ相当分の変
化テーブル上の参照位置右側方向へ移動させる。[511] = Move to the right of the reference position on the change table corresponding to the upper and lower two rasters in the register 7.
〔512〕=上下一対のラスタの最終画素ビツトのアドレ
スのところまですでに参照位置が進んでおればその上下
ラスタに関する比較は終了である。[512] = If the reference position has already reached the address of the final pixel bit of the pair of upper and lower rasters, the comparison of the upper and lower rasters is completed.
〔513〕=一対のラスタのうちの下位のものが最終行目
に当るときは終了となる。[513] = End when the lower one of the pair of rasters hits the final row.
〔515〕=まだ切出されていない最も上位のラスタに関
するデータを切出す。[515] = Cut out the data related to the highest raster that has not been cut out yet.
〔521〕=部品領域番号メモリ9の該当番地に所要の部
品領域番号を書込む。また、その該当地域の面積を部品
領域データメモリ8中の所要の面積に足し込む。[521] = Write a required component area number in the corresponding address of the component area number memory 9. Further, the area of the corresponding area is added to the required area in the component area data memory 8.
〔531〕=同一部品領域の合流かどうかを判定する。こ
れは合流される2地域の部品領域番号を比較することに
よつてなされる。[531] = Determine whether or not they are merging in the same component area. This is done by comparing the part area numbers of the two areas to be merged.
〔532〕=同番号部品領域(地域)の合流によつて確認
された切出し終了ずみの部品領域の面積が微小なものか
どうかを調べるために、予め設定した基準面積と比較す
る。[532] = Compare with a preset reference area to check whether the area of the part area that has been cut out and confirmed by merging of parts areas (regions) of the same number is small.
〔533〕=切出し終了ずみ部品領域に関し、それを包む
上位部品領域の番号を統合先番号のところに書込む。ま
た、合流した地域に関し、部品領域データメモリ8内の
面積加算処理および部品領域番号メモリ9への書込み処
理も行われる。[533] = Regarding the cut-out completed part area, write the number of the upper part area that wraps it into the integration destination number. Further, regarding the merged area, area addition processing in the component area data memory 8 and writing processing to the component area number memory 9 are also performed.
〔541〕=異なる番号の合流の場合は、合流する二つの
地域のうち右側のものが属する部品領域すなわち統合の
対象となる部品領域に関し、その統合先番号のところに
残りの左側の地域が属する部品領域の番号を書込む。こ
の場合の統合先番号と上位領域番号は互いに異なつたも
のとなる。〔507〕のところでは触れなかつたが、統合
先と上位領域の各番号が相違する部品領域の統合消去は
同番号のそれに優先して行うのがよい。その消去が形式
的なものであつて部品領域の実際の消去には該当しない
ためである。[541] = In the case of merging with different numbers, regarding the component area to which the right one of the two merging areas belongs, that is, the component area to be integrated, the remaining left area belongs to the integration destination number. Write the number of the parts area. In this case, the integration destination number and the upper area number are different from each other. Although it is not mentioned in [507], it is preferable to perform integrated erasing of component areas having different numbers of the integration destination and the upper area with priority over that of the same number. This is because the erasure is formal and does not correspond to the actual erasure of the parts area.
〔542〕=これも異なる番号の合流に特有な処理であ
る。合流する二つの地域のうちの右側のものが属する部
品領域の番号の書換え処理がこれに該当する。前記番号
のひとつあるいは二つ以上が部品領域番号メモリ9にす
でに記入されているので、そのすべてをその統合先番号
に書換えるのである。[542] = This is also a process peculiar to merging different numbers. This corresponds to the rewriting process of the number of the part area to which the right one of the two joining areas belongs. Since one or more of the above numbers have already been entered in the component area number memory 9, all of them are rewritten to the integration destination number.
以上で第15図のフローチヤートの説明を終えるが、な
お補足すると、〔501〕〔503〕〔515〕は処理対象とな
る画像区域を順々に切出すためのものであり、〔505〕
〔531〕はすでに切出された画像区域の中に含まれる各
部品領域の切出し終了を判定する手段に該当し、〔53
2〕は切出しの終了した部品領域に関するデータの要否
を判定する手段であり、〔507〕は不要データを記憶手
段の中から消去する手段に該当する。The description of the flow chart of FIG. 15 is finished above, but supplementary description will be made. [501], [503], and [515] are for sequentially cutting out image areas to be processed, and [505]
[531] corresponds to a means for determining the cut-out end of each component area included in the already cut-out image area, and [531]
[2] is a means for determining the necessity of data relating to the part area for which cutting has been completed, and [507] corresponds to a means for erasing unnecessary data from the storage means.
発明は画像区域の切出し途上において、切出された画像
区域に関するデータを格納する記憶手段の中から、所要
の不要データを消去し、もつて前記記憶手段の容量不足
を解消するものであり、しかも画面のラスタ走査を最終
行まで処理した時点で全処理が終了するものである。こ
れによれば予め用意する記憶手段の容量が小さなもので
よいため、処理コストの低減に役立つ。とともに、さら
に画像切出し処理時間が大幅に短縮できる効果があるThe invention is to eliminate necessary unnecessary data from the storage means for storing the data relating to the cut-out image area in the process of cutting out the image area, thereby eliminating the lack of capacity of the storage means. When the raster scan of the screen is processed up to the last line, the whole process is completed. According to this, the capacity of the storage means prepared in advance may be small, which is useful for reducing the processing cost. In addition, there is an effect that the image cutting processing time can be significantly shortened.
図はいずれも本発明に関するものである。第1図は画像
処理の回路、第2図は変化点メモリのメモリテーブル、
第3図は変化点データに関する説明図、第4図は部品領
域に関するパターンの説明図、第5図は継続パターンの
説明図、第6図は発生パターンの説明図、第7図は合流
パターンの説明図、第8図は合流パターンのさらに詳し
い説明図、第9図は切出し途上の画像を示す平面図、第
10図はマスク処理前の画像を示す平面図、第11図は
マスク処理後の画像を示す平面図、第12図は不要デー
タ消去前における部品領域データメモリのメモリテーブ
ル、第13図はその不要データ消去後のメモリテーブ
ル、第14図は部品領域番号メモリのメモリテーブル、
第15図は処理方式の要部を示すフローチヤートであ
る。 501,503,515…切出し手段、6,8,9…記
憶手段、505,531…部品領域の切出し終了を判定
する手段、532…データの要否を判定する手段、50
7…消去手段All figures relate to the invention. FIG. 1 is a circuit for image processing, FIG. 2 is a memory table of a change point memory,
FIG. 3 is an explanatory view of change point data, FIG. 4 is an explanatory view of a pattern of a parts area, FIG. 5 is an explanatory view of a continuation pattern, FIG. 6 is an explanatory view of a generation pattern, and FIG. 7 is a confluence pattern. Explanatory drawing, FIG. 8 is a more detailed explanatory view of the confluence pattern, FIG. 9 is a plan view showing an image in the process of being cut out, FIG. 10 is a plan view showing an image before mask processing, and FIG. 11 is a view after mask processing. FIG. 12 is a plan view showing an image, FIG. 12 is a memory table of a component area data memory before erasing unnecessary data, FIG. 13 is a memory table after erasing unnecessary data, FIG. 14 is a memory table of a component area number memory,
FIG. 15 is a flow chart showing the main part of the processing method. 501, 503, 515 ... Cutting-out means, 6, 8, 9 ... Storage means, 505, 531 ... Means for judging completion of cutting-out of parts area, 532 ... Means for judging necessity of data, 50
7 ... Erasing means
フロントページの続き (72)発明者 志村 安規 千葉県習志野市東習志野7丁目1番1号 日立京葉エンジニアリング株式会社内 (72)発明者 辻 征郎 千葉県習志野市東習志野7丁目1番1号 株式会社日立製作所習志野工場内 (56)参考文献 特開 昭58−207181(JP,A) 特開 昭57−13581(JP,A) 特開 昭53−118945(JP,A) 実開 昭49−149633(JP,U)Front Page Continuation (72) Inventor Yasushi Shimura 7-1-1 Higashi Narashino, Narashino, Chiba Prefecture Hitachi Keiyo Engineering Co., Ltd. (72) Inventor Seiro Tsuji 7-1-1 Higashi Narashino, Narashino, Chiba Hitachi Narashino Factory (56) References JP-A-58-207181 (JP, A) JP-A-57-13581 (JP, A) JP-A-53-118945 (JP, A) Practical application Sho-49-149633 (JP , U)
Claims (5)
と、 切出された前記画像区域に関するデータを格納する記憶
手段と、 前記記憶手段に基づいて、上下2つの隣接する前記画像
区域間で、画像地域の相互関連付けを行い、継続パター
ン、発生パターン、合流パターンに分類するパターン分
類手段と、 前記パターン分類にしたがって、前記画像地域に部品領
域番号を付けて前記記憶手段に記憶する手段と、 最新に切り出された画像区域に含まれる画像地域に同番
号の画像地域の合流パターンがあるとき、前記同番号画
像地域によって挟まれた部品領域の切出しが終了したと
判定する部品領域終了判定手段と、 前記記憶手段の容量不足が生じる以前の所定のタイミン
グで、切出しの終了した部品領域に関するデータの要否
を判定する部品領域要否判定手段と、前記部品領域要否
判定手段によって不要と判定されたデータを、前記記憶
手段の容量不足が生じる以前の所定のタイミングで、前
記記憶手段の中から消去するデータ消去手段 を備えたことを特徴とする画像処理方式。1. A means for sequentially cutting out image areas to be processed, a storage means for storing data relating to the cut out image areas, and a space between two adjacent upper and lower image areas based on the storage means. A pattern classifying unit that correlates image areas and classifies the pattern into continuous patterns, occurrence patterns, and confluence patterns; and a unit that stores the image areas in the storage unit with component area numbers according to the pattern classification. When the image area included in the image area most recently cut out has a confluence pattern of the image areas with the same number, the part area end determination means for determining that the cutting out of the part area sandwiched by the image areas with the same number is completed And a component that determines the necessity of data relating to the component region that has been cut out at a predetermined timing before the capacity of the storage means becomes insufficient. And a data erasing means for erasing the data determined to be unnecessary by the area necessity determination means and the component area necessity determination means from the storage means at a predetermined timing before the capacity of the storage means becomes insufficient. An image processing method characterized by being provided.
した基準面積に満たないときにその部品領域に関するデ
ータを不要と判定する部品領域要否判定手段をもった特
許請求の範囲第1項記載の画像処理方式。2. The component area necessity determining means for determining that the data regarding the component area is unnecessary when the area of the cut-out component area is less than a preset reference area. Image processing method.
切出しの終了した各部品領域のうち最小面積の部品領域
に関するデータを不要と判定する部品領域要否判定手段
をもった特許請求の範囲第1項記載の画像処理方式。3. A component area necessity determining means for determining, when the capacity of the storage means is insufficient, data relating to a component area having the smallest area out of the component areas which have already been cut out, as unnecessary. The image processing method according to item 1.
の終了した部品領域に関するデータの要否を判定し、不
要と判定されたデータを前記記憶手段の中から消去する
ことを特徴とする特許請求の範囲第1項記載の画像処理
方式。4. When the capacity of the storage means is insufficient, it is determined whether or not data regarding the part area for which cutting has been completed is necessary, and the data determined to be unnecessary is erased from the storage means. The image processing method according to claim 1.
の部品領域を包む上位の部品領域面積に加算されるのを
待って、前記の不要な部品領域に関するデータを記憶手
段の中から消去するデータ消去手段をもった特許請求の
範囲第1項記載の画像処理方式。5. Data for erasing the data relating to the unnecessary component area from the storage means after waiting for the data relating to the area of the unnecessary component area to be added to the area of the upper component area surrounding the component area. The image processing method according to claim 1, further comprising an erasing unit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP59060680A JPH063609B2 (en) | 1984-03-30 | 1984-03-30 | Image processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP59060680A JPH063609B2 (en) | 1984-03-30 | 1984-03-30 | Image processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS60205685A JPS60205685A (en) | 1985-10-17 |
| JPH063609B2 true JPH063609B2 (en) | 1994-01-12 |
Family
ID=13149270
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP59060680A Expired - Lifetime JPH063609B2 (en) | 1984-03-30 | 1984-03-30 | Image processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH063609B2 (en) |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS49149633U (en) * | 1973-04-27 | 1974-12-25 | ||
| JPS53118945A (en) * | 1977-03-28 | 1978-10-17 | Agency Of Ind Science & Technol | Linked component pick up circuit |
| JPS5713581A (en) * | 1980-06-27 | 1982-01-23 | Toshiba Corp | Noise removing system |
| JPS58207181A (en) * | 1982-05-27 | 1983-12-02 | Toshiba Corp | Character detecting and segmenting device |
-
1984
- 1984-03-30 JP JP59060680A patent/JPH063609B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPS60205685A (en) | 1985-10-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5048107A (en) | Table region identification method | |
| JPH0316377A (en) | Method and apparatus for reducing binary picture | |
| US6141444A (en) | Method for deleting ruled lines and a recording medium storing programs for performing the method | |
| JPH0256707B2 (en) | ||
| JPH063609B2 (en) | Image processing method | |
| JP2625612B2 (en) | Image processing method and image processing apparatus | |
| JP3846752B2 (en) | Ruled line removal method | |
| JP3919505B2 (en) | Pattern inspection apparatus and method | |
| JP2993007B2 (en) | Image area identification device | |
| JP2513365B2 (en) | Contour tracking method | |
| JP2005196282A (en) | Noise removal device and method for binary image, and program | |
| JPH09185726A (en) | Ruled line removing method | |
| JPH03122785A (en) | Optical character reader | |
| JPH0462110B2 (en) | ||
| JP2903043B2 (en) | Image structure recognition method and circuit configuration used in the method | |
| JPH11316797A (en) | Document image area identification method and apparatus | |
| JPH04152479A (en) | Image inspecting system | |
| JP2683116B2 (en) | Ruled line removal method | |
| JP3408869B2 (en) | Image processing device | |
| JPH0749313A (en) | Pattern inspection apparatus and pattern inspection method | |
| JPS6029876A (en) | Keyboard inspecting device | |
| JPH03296884A (en) | Device for extracting character image | |
| JPS61177583A (en) | Description and execution system for pattern classifying algorithm | |
| JPS63188277A (en) | Contour extracting system | |
| JP2003178313A (en) | Image processing device and image processing method |