JPH0443312B2 - - Google Patents
Info
- Publication number
- JPH0443312B2 JPH0443312B2 JP58049772A JP4977283A JPH0443312B2 JP H0443312 B2 JPH0443312 B2 JP H0443312B2 JP 58049772 A JP58049772 A JP 58049772A JP 4977283 A JP4977283 A JP 4977283A JP H0443312 B2 JPH0443312 B2 JP H0443312B2
- Authority
- JP
- Japan
- Prior art keywords
- data string
- scanning line
- section
- column
- column 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 - Lifetime
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/12—Edge-based segmentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/42—Global feature extraction by analysis of the whole pattern, e.g. using frequency domain transformations or autocorrelation
- G06V10/421—Global feature extraction by analysis of the whole pattern, e.g. using frequency domain transformations or autocorrelation by analysing segments intersecting the pattern
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Geometry (AREA)
- Image Analysis (AREA)
Description
【発明の詳細な説明】
産業上の利用分野
本発明は2値デイジタル画像の構造解析・特徴
抽出を行うための汎用の画像認識装置に関するも
のである。DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention relates to a general-purpose image recognition device for performing structural analysis and feature extraction of binary digital images.
従来列の構成とその問題点
従来は、認識対象画像を水平走査して得られた
「0」と「1」の極性を持つ2値デイジタルデー
タ列を入力とし、認識対象画像内の各閉領域に属
する各水平走査線上の連続する同極性のデータ列
であるデータ列部に同一番号を付与するラベリン
グを行なう場合、認識対象画像内の認識物体によ
り構成される閉領域のみのラベリングを行ない、
認識対象画像内の認識物体の背景あるいは穴など
の、認識物体により構成される閉領域とは異なる
極性を持つ閉領域についてはラベリングを行つて
いない。また上記異なる極性の閉領域間の包含関
係を1回の水平走査で求めることができなかつた
ため、各閉領域が包含する閉領域または包含され
る閉領域の特徴量を計算するのに何回も画面を走
査する必要があり、非常に時間を要していた。Conventional array configuration and its problems Conventionally, a binary digital data array with polarities of "0" and "1" obtained by horizontally scanning an image to be recognized is input, and each closed region in the image to be recognized is When labeling is performed by assigning the same number to the data string portion, which is a continuous data string of the same polarity on each horizontal scanning line belonging to the image, labeling is performed only on the closed region constituted by the recognition object in the recognition target image,
Labeling is not performed on closed regions that have a polarity different from the closed region formed by the recognition object, such as the background of the recognition object or a hole in the recognition target image. In addition, since it was not possible to determine the inclusion relationship between closed regions of different polarities in one horizontal scan, it took many times to calculate the feature values of the closed regions included in each closed region or the closed regions included. It was necessary to scan the screen, which was very time consuming.
第1図は認識対象画像(カメラ視野)を走査
し、認識物体である閉領域(斜視部)についてラ
ベリングを行つた例を示している。第2図はこの
ラベリング結果を示している。この従来の方式に
おいては第2図に示すような各走査線のデータ列
部を用いても、閉領域が包含する閉領域の数、面
積、境界長等を直接得ることはできなかつた。 FIG. 1 shows an example in which a recognition target image (camera field of view) is scanned and a closed region (a strabismus part) that is a recognition object is labeled. FIG. 2 shows the labeling results. In this conventional method, even if the data string portion of each scanning line as shown in FIG. 2 is used, it is not possible to directly obtain the number, area, boundary length, etc. of closed regions included in the closed region.
発明の目的
本発明は前記問題点を解消し、各閉領域間の包
含関係を一回の走査で求めることができる画像認
識装置を提供することを目的とする。OBJECTS OF THE INVENTION It is an object of the present invention to provide an image recognition device capable of solving the above-mentioned problems and determining the inclusion relationship between each closed region in a single scan.
発明の構成
画像のラベリング・構造解析および特徴抽出を
効率よく行うためには各走査線のデータ列のラベ
リングを行つている時に同時に構造解析および特
徴抽出を行う必要がある。Configuration of the Invention In order to efficiently perform image labeling, structural analysis, and feature extraction, it is necessary to simultaneously perform structural analysis and feature extraction while labeling the data string of each scanning line.
本発明の画像認識装置は認識対象画像内の、認
識物体より構成される閉領域のラベリングを行う
とともに、認識物体の背景または穴などの、認識
物体より構成される閉領域とは異なる極性を持つ
閉領域についても同時にラベリングを行い、各閉
領域間の包含関係をリアルタイムで求め、さらに
各閉領域毎の特徴量を同時に求め、2値画像デー
タの構造解析および特徴抽出を非常に高速で行
い、その情報より高速に画像認識を行なうもので
ある。 The image recognition device of the present invention labels a closed region composed of a recognition object in a recognition target image, and has a polarity different from that of the closed region composed of the recognition object, such as the background of the recognition object or a hole. The closed regions are also labeled at the same time, the inclusion relationships between each closed region are determined in real time, the feature values for each closed region are simultaneously determined, and the structure analysis and feature extraction of binary image data is performed at extremely high speed. Image recognition is performed faster than that information.
実施例の説明
第3図は本発明における一実施例の画像認識装
置の構成を示すブロツク図である。図において、
10は信号入力端子で、この入力端子10には画
像走査装置により認識対象画像を走査して得られ
画像走査信号が入力される。11はこの画像走査
信号を2値のデイジタルデータ列(以下、単にデ
ータ列という)に変換する2値化部である。DESCRIPTION OF EMBODIMENTS FIG. 3 is a block diagram showing the configuration of an image recognition apparatus according to an embodiment of the present invention. In the figure,
Reference numeral 10 denotes a signal input terminal, into which an image scanning signal obtained by scanning a recognition target image with an image scanning device is input. Reference numeral 11 denotes a binarization unit that converts this image scanning signal into a binary digital data string (hereinafter simply referred to as a data string).
100は2値認識対象画像内の閉領域の包含関
係を表わす画像の構造をリアルタイムで解析する
ラベリング構造解析部である。12はデータ列に
おいてデータが変化する点、すなわち「0」から
「1」または「1」から「0」に変化するエツジ
点を検出するエツジ検出部である。このエツジ検
出部12は、例えば第4図に示すような認識対象
画像の認識において、第i走査線のデータ列
が入力された時、点a,b,cをエツジ点として
検出し、エツジ検出信号16を出力する。このエ
ツジ点で水平走査線上の連続する同極性のデータ
列部を表現できる。13,15は走査されるデー
タ列を1水平走査線遅延させる1水平走査線遅延
部であり、14は現水平走査線上のデータと1水
平走査線前のデータとの極性を比較し、前記2つ
のデータが共に「1」(又は「0」となつている
同極性の場合ならば、重なり信号17を出力する
重なり検出部である。この重なり検出部14は、
例えば第4図において、第(i−1)走査線上の
点d(=「0」)と第i走査線上の点c(=「0」)は
同極性のデータであるので重なりを検出し、重な
り信号17を出力する。 Reference numeral 100 denotes a labeling structure analysis unit that analyzes in real time the structure of an image representing the inclusion relationship of closed regions in the binary recognition target image. Reference numeral 12 denotes an edge detection unit that detects points where data changes in a data string, that is, edge points where data changes from "0" to "1" or from "1" to "0". For example, in recognizing a recognition target image as shown in FIG. is input, points a, b, and c are detected as edge points, and an edge detection signal 16 is output. These edge points can represent continuous data strings of the same polarity on the horizontal scanning line. Reference numerals 13 and 15 denote one horizontal scanning line delay units for delaying the scanned data string by one horizontal scanning line, and reference numeral 14 compares the polarity of the data on the current horizontal scanning line with the data one horizontal scanning line before. If the two data are both "1" (or "0") and have the same polarity, the overlap detection section outputs an overlap signal 17.This overlap detection section 14
For example, in FIG. 4, since the point d (="0") on the (i-1)th scanning line and the point c (="0") on the i-th scanning line have the same polarity, an overlap is detected, An overlap signal 17 is output.
18は水平走査線の連続する同極性のデータ列
部が閉領域の頂上であるならば、頂上信号を出力
する閉領域頂上検出部である。 Reference numeral 18 denotes a closed area top detection unit which outputs a top signal if the continuous data string portion of the same polarity of the horizontal scanning line is the top of the closed area.
この閉領域頂上検出部18は、例えば第5図に
おいて、第1走査線のデータ列部が閉領域1の最
初の水平走査線上のデータ列部であるので、閉領
域1の頂上として検出する。第1走査線を走査
後、頂上検出信号21を出力する。また第i走査
線上の閉領域2のデータ列部は第(i−1)走査
線上のどのデータ列部とも重ならず、閉領域2の
頂上となり、第i走査線上の閉領域5のデータ列
部走査後、頂上検出信号21を出力する。19は
現水平走査線上のデータ列部が前記1水平走査線
前のデータ列部と重なつたが、前記1水平走査線
前のデータ列部が既に現水平走査線の他のデータ
列部と重なつているダイバージエンスの状態を検
出し、ダイバージエンス検出信号22を出力する
ダイバージエンス検出部である。すなわち、この
ダイバージエンス検出部19は、例えば第6図に
おいて、第(i−1)走査線上のデータ列部Aが
第i走査線上のデータ列部Dと重なつているが、
データ列部Aはデータ列部Dと重なる以前にデー
タ列部Bと重なつているときにダイバージエンス
が生じている事を検出し、ダイバージエンス検出
信号22を出力する。 For example, in FIG. 5, the closed area top detection unit 18 detects the data string part of the first scanning line as the top of the closed area 1 because it is the data string part on the first horizontal scanning line of the closed area 1. After scanning the first scanning line, the top detection signal 21 is output. Further, the data string portion of closed region 2 on the i-th scanning line does not overlap with any data string portion on the (i-1)th scanning line, and becomes the top of closed region 2, and the data string portion of closed region 5 on the i-th scanning line After the partial scanning, a top detection signal 21 is output. 19, the data string portion on the current horizontal scanning line overlaps with the data string portion one horizontal scanning line before, but the data string portion one horizontal scanning line before has already overlapped with another data string portion of the current horizontal scanning line. This is a divergence detection section that detects the state of overlapping divergence and outputs a divergence detection signal 22. That is, in the divergence detection unit 19, for example, in FIG. 6, the data string portion A on the (i-1)th scanning line overlaps the data string portion D on the i-th scanning line,
Before the data string section A overlaps with the data string section D, it detects that divergence occurs when it overlaps with the data string section B, and outputs a divergence detection signal 22.
20は、現水平走査線上のデータ列部が1水平
走査線前のデータ列部と重なつたが現水平走査線
上のデータ列部が前記1走査線前のデータ列部と
重なる以前に、前記1走査線前の他のデータ列部
と重なつており、前記1走査線前のデータ列部と
前記1走査線前の他のデータ列部が同じ閉領域番
号をもつコンバージエンスの状態を検出し、コン
バージエンス検出信号23を出力するコンバージ
エンス検出部である。すなわち、このコンバージ
エンス検出部20は、例えば第7図において、第
i走査線上のデータ列部Hが第(i−1)走査線
上のデータ列部Gと重なつているが、第i走査線
上のデータ列部Hが第(i−1)走査線上のデー
タ列部Gと重なる以前に第(i−1)走査線上の
データ列部Eと重なつているときにコンバージエ
ンスが生じた事を検出し、コンバージエンス検出
信号23を出力する。 20, the data string part on the current horizontal scanning line overlaps with the data string part one horizontal scanning line before, but before the data string part on the current horizontal scanning line overlaps with the data string part one scanning line before, Detects a convergence state in which the data string part overlaps with another data string part one scanning line before, and the data string part one scanning line before and the other data string part one scanning line before have the same closed region number. This is a convergence detection section that outputs a convergence detection signal 23. That is, in the convergence detection unit 20, for example, in FIG. 7, the data string portion H on the i-th scanning line overlaps the data string portion G on the (i-1)th scanning line, Convergence occurs when the data string section H overlaps with the data string section E on the (i-1)th scanning line before it overlaps with the data string section G on the (i-1)th scanning line. A convergence detection signal 23 is output.
24はエツジ検出信号16が入力された時、何
番目のエツジすなわち何番目のデータ列部かをカ
ウントし、またそのエツジの水平方向のアドレス
並びに現水平走査線の番号をカウントしているエ
ツジカウンタ部である。 Reference numeral 24 denotes an edge counter which counts the number of the edge, that is, the number of the data string, when the edge detection signal 16 is input, and also counts the horizontal address of the edge and the number of the current horizontal scanning line. Department.
25は現水平走査線上のデータ列部において、
閉領域頂上検出信号21が入力された場合、各デ
ータ列部の集合に付与するカラム番号を1増加さ
せ、当該データ列部に上記カラム番号を付与し、
さらに閉領域番号OFとして上記カラム番号を記
憶させ、また現水平走査線上のデータ列部におい
て、ダイバージエンス検出信号22が入力された
場合、カラム番号を1増加させ当該データ列部の
カラム番号とし、当該データ列部の閉領域番号と
して当該データ列部が重なつた1水平走査線前の
データ列部の属する閉領域の閉領域番号を当該デ
ータ列部のカラム番号に対応させて記憶させ、ま
た現水平走査線のデータ列部において閉領域頂上
信号もダイバージエンス検出信号も入力されなか
つた場合、当該データ列部が重なつた1水平走査
線前のデータ列部のカラム番号と同じ値のカラム
番号を当該データ列部に付与し、さらにカラムの
先頭、カラムの終了および当該データ列部の
「1」、「O」の極性をデータ列部に付すカラム番
号設定部である。 25 is in the data row portion on the current horizontal scanning line,
When the closed region top detection signal 21 is input, the column number given to each set of data string parts is increased by 1, and the column number is given to the data string part,
Furthermore, the column number is stored as the closed area number OF, and when the divergence detection signal 22 is input in the data string section on the current horizontal scanning line, the column number is incremented by 1 and used as the column number of the data string section. , storing the closed area number of the closed area to which the data string part one horizontal scanning line before the data string part overlaps is associated with the column number of the data string part as the closed area number of the data string part; In addition, if neither the closed area top signal nor the divergence detection signal is input in the data string part of the current horizontal scanning line, the same value as the column number of the data string part one horizontal scanning line before the data string part overlaps with the current horizontal scanning line. This is a column number setting unit that assigns a column number to the data string section, and also assigns the beginning of the column, the end of the column, and the polarity of "1" and "O" of the data string section to the data string section.
すなわち、このカラム番号設定部25は、例え
ば第6図において、第走査線上のデータ列部B
が第(−1)走査線上のデータ列部Aと重つて
おり、かつ閉領域頂上検出信号21もダイバージ
エンス検出信号22も出力されないときにデータ
列部Aのカラム番号をデータ列部Bに付与する。
また第走査線上のデータ列部Cは閉領域の頂上
であるのでカラム番号を1増加し、データ列部C
に付与し、その閉領域番号として上記カラム番号
を記憶させ、カラムの先頭フラツグも付与する。
また第走査線上のデータ列部Dでダイバージエ
ンスが検出され、カラム番号を1増加してデータ
列部Dに付与し、データ列部の閉領域番号として
データ列部Aの閉領域番号をデータ列部Cのカラ
ム番号に対応して記憶させ、カラムの先頭フラツ
グを付与する。また上記データ列部A,B,C,
Dに対しそれぞれ対応する極性を付与する。 That is, this column number setting section 25 sets the data string section B on the scanning line, for example in FIG.
overlaps the data string section A on the (-1)th scanning line, and when neither the closed area top detection signal 21 nor the divergence detection signal 22 is output, the column number of the data string section A is transferred to the data string section B. Give.
Also, since the data string portion C on the first scanning line is the top of the closed area, the column number is increased by 1, and the data string portion C
The column number is stored as the closed area number, and the head flag of the column is also added.
Further, a divergence is detected in the data string portion D on the first scanning line, the column number is incremented by 1 and assigned to the data string portion D, and the closed area number of the data string portion A is used as the closed area number of the data string portion. It is stored in correspondence with the column number of column C, and a column head flag is assigned. In addition, the above data string parts A, B, C,
A corresponding polarity is assigned to D.
26は現水平走査線上のデータ列部において、
ダイバージエンス検出信号22が入力された場
合、当該データ列部のダイバージエンスの原因を
表わすフラツグDF1として、当該データ列部の直
前のデータ列部の閉領域番号を当該データ列部の
カラム番号に対応させて記憶し、さらに前記直前
のデータ列部のダイバージエンスの影響を表わす
フラツグDF2として当該データ列部の閉領域番号
を前記直前のデータ列部のカラム番号に対応させ
て記憶するダイバージエンスフラツグ設定部であ
る。すなわち、このダイバージエンスフラツグ設
定部26は、例えば第6図において第走査線の
データ列部Dでダイバージエンスが生じている
が、データ列部Dのカラム番号に対応させて上記
フラツグDF1にデータ列部Cの閉領域番号を記憶
し、さらにデータ列部Dの閉領域番号をデータ列
部Cのカラム番号に対応させて上記フラツグDF2
に記憶させる。 26 is the data string portion on the current horizontal scanning line,
When the divergence detection signal 22 is input, the closed area number of the data string immediately before the data string is set as the flag DF1 indicating the cause of divergence in the data string. The closed area number of the data string section is stored in correspondence with the column number of the immediately preceding data string section as a flag DF2 representing the influence of divergence of the immediately preceding data string section. This is a divergence flag setting section. That is, the divergence flag setting unit 26 sets the flag DF in correspondence with the column number of the data string portion D, for example, in FIG. The closed area number of the data string section C is stored in 1 , and the closed area number of the data string section D is made to correspond to the column number of the data string section C, and the above flag DF 2 is stored.
to be memorized.
27は現水平走査線上のデータ列部において、
コンバージエンス検出信号23が入力された場
合、当該データ列部との重なりが新たに検出され
た1走査線前のデータ列部のコンバージエンスの
原因を表わすフラツグCF1として前記1走査線前
のデータ列部の直前のデータ列部の閉領域番号を
1走査線前のデータ列部のカラム番号に対応させ
て記憶し、さらに前記1走査線前のデータ列部の
直前のデータ列部のコンバージエンスの影響を表
わすフラツグCF2として、前記1走査線前のデー
タ列部の閉領域番号を前記1走査線前のデータ列
部の直前のデータ列部のカラム番号に対応させて
記憶するコンバージエンスフラツグ設定部であ
る。 27 is in the data row portion on the current horizontal scanning line,
When the convergence detection signal 23 is input, a flag CF 1 indicating the cause of convergence in the data string part of the previous scanning line in which overlap with the data string part is newly detected is set to the data of the previous scanning line. The closed region number of the data string section immediately before the column section is stored in correspondence with the column number of the data string section one scanning line before, and the convergence of the data string section immediately before the data string section one scanning line before is stored. A convergence flag CF 2 is used to store the closed area number of the data string part of the previous scanning line in correspondence with the column number of the data string part immediately before the data string part of the previous scanning line. This is the Tsug setting section.
コンバージエンスフラツグ設定部27は、例え
ば第7図において第走査線のデータ列部Hでコ
ンバージエンスが生じているが、データ列部Gの
カラム番号に対応させて上記フラツグCF1にデー
タ列部Fの閉領域番号を記憶し、さらにデータ列
部Gの閉領域番号をデータ列部下のカラム番号に
対応させて上記フラツグCF2に記憶させる。 For example, in FIG. 7, the convergence flag setting section 27 sets the flag CF 1 in the data string portion corresponding to the column number of the data string portion G, although convergence has occurred in the data string portion H of the first scanning line. The closed area number of F is stored, and the closed area number of data string section G is stored in the flag CF2 in correspondence with the column number below the data string.
28は2値化部11の出力信号を入力とし、上
記カラム番号設定部25で求められた現水平走査
線上のデータ列部のカラム番号に従つて、カラム
番号毎の面積、モーメント、境界長を求める特徴
抽出部である。 28 inputs the output signal of the binarization section 11, and calculates the area, moment, and boundary length for each column number according to the column number of the data string section on the current horizontal scanning line obtained by the column number setting section 25. This is the desired feature extraction part.
29はカラム番号設定部25、ダイバージエン
スフラツグ設定部26、コンバージエンスフラツ
グ設定部27、特徴抽出部28、エツジカウンタ
部24およびエツジ検出部12で得られたデータ
を記憶するメモリ部である。 Reference numeral 29 denotes a memory section for storing data obtained by the column number setting section 25, the divergence flag setting section 26, the convergence flag setting section 27, the feature extraction section 28, the edge counter section 24, and the edge detection section 12. be.
メモリ部29は、例えば第8図に示すように、
カラム番号に対応してそれぞれの閉領域番号OF、
コンバージエンスフラツグCF1,CF2、ダイバー
ジエンスフラツグDF1,DF2および面積、第一次
モーメント、第二次モーメント、境界長を記憶
し、また第9図に示すように、エツジ番号に反応
してカラムの先頭および終了フラツグ、カラム番
号およびデータ列部を表わすエツジデータを記憶
し、さらに第10図に示すように、走査線番号に
対応してエツジ番号を記憶している。 The memory section 29 includes, for example, as shown in FIG.
Each closed region number OF corresponds to the column number,
Convergence flags CF 1 , CF 2 , divergence flags DF 1 , DF 2 , area, first moment, second moment, boundary length are stored, and edge numbers are stored as shown in FIG. In response to this, column start and end flags, column numbers, and edge data representing the data string portion are stored, and as shown in FIG. 10, edge numbers are stored in correspondence with scanning line numbers.
30は全画素に対して処理した時に、求められ
た情報を整理し、画像を認識するための認識部で
あり、マイクロコンピユータにより構成される。 Reference numeral 30 denotes a recognition unit that organizes the information obtained when processing all pixels and recognizes the image, and is constituted by a microcomputer.
認識部30は閉領域が包含している閉領域の番
号を指している前記CF1および閉領域が包含され
る閉領域の番号を指している前記CF2を用いる事
により容易に各閉領域の包含関係を明らかにし、
第8図における各閉領域間の包含関係を表現する
ためのレベルフラツグLFをセツトする。 The recognition unit 30 easily recognizes each closed region by using the CF 1 indicating the number of the closed region included in the closed region and the CF 2 indicating the number of the closed region including the closed region. Clarifying inclusion relationships,
A level flag LF is set to express the inclusive relationship between each closed area in FIG.
さらに認識部は各カラム毎に計算された特徴量
を用い、同一閉領域番号毎にカラムの特徴量の和
を求め、各閉領域毎の特徴量を計算する。 Furthermore, the recognition unit calculates the feature amount for each closed region by using the feature amount calculated for each column and calculating the sum of the column feature amounts for each same closed region number.
以上のように構成された本実施例装置につい
て、以下、その動作を説明する。 The operation of the apparatus of this embodiment configured as described above will be described below.
認識画像として、第11図に示すものを例にと
つて説明する。 An example of a recognized image shown in FIG. 11 will be described.
第11図は画像信号が2値化された後の画像デ
ータを示す図であり、斜線部が認識物体で「1」
の値を持ち、空白部は背景で「0」の値をもつて
おり、認識物体は1個の穴をもつているものとす
る。また空白部および斜線部のデータ列部はそれ
ぞれのエツジ点により表現するものとする。 Figure 11 is a diagram showing the image data after the image signal has been binarized, and the shaded area is the recognized object and is ``1''.
It is assumed that the blank area has a value of "0" in the background, and the recognition object has one hole. It is also assumed that blank areas and diagonally shaded data string areas are expressed by respective edge points.
いま第11図において、第1走査線のデータ列
部lは空白部でありまた最初のデータ列部である
ので、第13図に示すように、カラム番号として
1、エツジデータとしてl、極性のフラツグに
0、カラムの先頭フラツグに1をエツジ番号1に
対応させて記憶する。また第1走査線のエツジ番
号は1であるので、第14図の走査線番号1に1
を対応させ、さらに第12図のカラム番号1の
OFに1を対応させそれぞれ記憶する。 Now, in FIG. 11, the data string portion l of the first scanning line is a blank space and is the first data string portion, so as shown in FIG. 13, the column number is 1, the edge data is l, and the polarity flag is set. 0 for the edge number and 1 for the column head flag in correspondence with the edge number 1. Also, since the edge number of the first scanning line is 1, the edge number of the first scanning line is 1.
and further, in column number 1 of Figure 12.
Each OF is associated with 1 and stored.
第2走査線のデータ列部mはデータ列部lと重
なる。そこでデータ列部lと同じカラム番号を第
13図のエツジ番号2に対応させ記憶する。また
第2走査線のエツジ番号は2からスタートするの
で第14図の走査線番号2に2を対応させ記憶す
る。次にデータ列部nは斜線部であり閉領域の頂
上である。そこでカラム番号を1増加しエツジデ
ータとしてn、極性のフラツグに1、カラムの先
頭フラツグに1をそれぞれ第13図のエツジ番号
3に対応させ記憶する。また第12図において、
カラム番号2のOF部に対応させ2を記憶する。
次にデータ列部0はデータ列部lと重なるがデー
タ列部lは既にデータ列部mと重なつており、ダ
イバージエンスが生じている。そこでカラム番号
を1増加し3とし、第13図のように記憶させ、
第12図のカラム番号3のOF部はカラム番号1
と同じ1,DF1部にはダイバージエンスの原因と
なつたデータ列部nの閉領域番号2を対応させ、
データ列部nのカラム番号2のDF2部にはダイバ
ージエンスにより影響を受けたデータ列部0の閉
領域番号1を対応させる。 The data string portion m of the second scanning line overlaps the data string portion l. Therefore, the same column number as data string portion 1 is stored in correspondence with edge number 2 in FIG. 13. Also, since the edge number of the second scanning line starts from 2, 2 is stored in correspondence with the scanning line number 2 in FIG. 14. Next, the data string portion n is the shaded portion and is the top of the closed area. Therefore, the column number is incremented by 1 and n is stored as edge data, 1 is set as the polarity flag, and 1 is set as the head flag of the column, each corresponding to edge number 3 in FIG. 13. Also, in Figure 12,
2 is stored in correspondence with the OF part of column number 2.
Next, data string portion 0 overlaps data string portion l, but data string portion l already overlaps data string portion m, and a divergence occurs. Therefore, increase the column number by 1 to 3 and store it as shown in Figure 13.
The OF part of column number 3 in Figure 12 is column number 1.
The same 1, DF 1 part corresponds to the closed region number 2 of the data string part n that caused the divergence,
The DF 2 portion of column number 2 of data string portion n corresponds to closed region number 1 of data string portion 0 affected by divergence.
次に第3走査線のデータ列部pはデータ列部m
と重なり、第13図において、エツジ番号5にカ
ラム番号として1、エツジデータとしてpを対応
させ、またこれは5番目のエツジであり、5を第
14図の走査線番号に対応させ記憶する。またデ
ータ例部qはデータ列部nと重なり、第13図に
おいてエツジ番号6にカラム番号として2、エツ
ジデータとしてqを対応させ記憶する。一方デー
タ列部rはどのデータ列とも重ならない。そこで
カラム番号を1増加し4とし、カラムの先頭フラ
ツグをセツトし、第13図のエツジ番号7に対応
させ記憶する。 Next, the data string portion p of the third scanning line is the data string portion m.
In FIG. 13, the edge number 5 is associated with 1 as the column number and p as the edge data, and since this is the fifth edge, 5 is stored in correspondence with the scanning line number in FIG. 14. Further, the data example part q overlaps with the data string part n, and in FIG. 13, the edge number 6 is stored in association with 2 as the column number and q as the edge data. On the other hand, the data string portion r does not overlap with any data string. Therefore, the column number is increased by 1 to 4, the head flag of the column is set, and the flag is stored in correspondence with edge number 7 in FIG.
更に第12図のカラム番号4においてOF部に
3を対応させ記憶する。またデータ列部sはデー
タ列部nと重なるデータ列部nは既にデータ列部
qと重なつており、ダイバージエンスが生じてい
る。そこで第13図のエツジ番号8にカラム番号
として5、エツジデータとしてsをそれぞれ対応
させ、さらに第12図においてカラム番号5の
OF部にデータ列部nの閉領域番号2を、DF1部
にはデータ列部rの閉領域番号4を対応させ記憶
する。またデータ列部rのカラム番号4のDF2部
にはデータ列部sの閉領域番号2を対応させ、デ
ータ列部tはデータ列部0と重なり、第13図の
エツジ番号9に対応させ記憶する。 Further, in column number 4 of FIG. 12, 3 is associated with the OF part and stored. Furthermore, the data string portion s overlaps the data string portion n. The data string portion n already overlaps the data string portion q, and a divergence occurs. Therefore, edge number 8 in Figure 13 corresponds to column number 5 and edge data to s, and furthermore, in Figure 12, column number 5 corresponds to s.
The closed area number 2 of the data string part n is associated with the OF part, and the closed area number 4 of the data string part r is stored in the DF 1 part. Furthermore, the DF 2 portion of column number 4 of data string section r corresponds to closed area number 2 of data string section s, and data string section t overlaps with data string section 0 and corresponds to edge number 9 in FIG. Remember.
次に第4走査線のデータ列部uはデータ列部p
と重なり、第13図のエツジ番号10にカラム番
号として1を対応させ、これは10番目のエツジデ
ータであり、第14図の走査線番号4に10を対
応させ、データ列部vはデータ列部qと重なり、
エツジ番号11にカラム番号として2を対応させ
記憶する。更にデータ列部vはデータ列部sとも
重なりコンバージエンスが生じている。そこで第
12図において、データ列部rの閉領域番号4を
コンバージエンスの影響を受けたデータ列部sの
カラム番号5のCF1部に対応させ、データ列部s
の閉領域番号2をデータ列部rのカラム番号4の
CF2部に対応させ記憶する。また第13図におい
て、データ列部r,sの属するカラムは終了し、
データ列部r,sのカラム終了フラツグを付与す
る。またデータ列部wはデータ列部tと重なる。
そこで第13図のエツジ番号12にカラム番号と
して3を対応させ記憶する。 Next, the data string portion u of the fourth scanning line is the data string portion p.
, the column number 1 corresponds to the edge number 10 in FIG. 13, which is the 10th edge data, 10 corresponds to the scanning line number 4 in FIG. 14, and the data string section v is the data string section. overlaps with q,
Edge number 11 is associated with 2 as a column number and stored. Furthermore, the data string portion v also overlaps with the data string portion s, resulting in convergence. Therefore, in FIG. 12, closed region number 4 of data string section r is made to correspond to CF 1 part of column number 5 of data string section s affected by convergence, and data string section s is
Closed region number 2 of column number 4 of data string part r
Store in correspondence with CF 2 copies. In addition, in FIG. 13, the columns to which the data string parts r and s belong end,
Add column end flags to data string parts r and s. Further, the data string portion w overlaps with the data string portion t.
Therefore, the column number 3 is associated with the edge number 12 in FIG. 13 and stored.
次に第5走査線のデータ列部xはデータ列部u
と重なる。そこで第13図のエツジ番号13にカ
ラム番号として1を対応させ記憶する。またデー
タ列部xはデータ列部wとも重なりコンバージエ
ンスが生じている。そこで第12図において、デ
ータ列部vの閉領域番号2をデータ列部wのカラ
ム番号3のCF1に対応させ、データ列部wの閉領
域番号1をデータ列部vのカラム番号2のCF2に
対応させそれぞれ記憶する。 Next, the data string portion x of the fifth scanning line is the data string portion u.
overlaps with Therefore, 1 is associated with the edge number 13 in FIG. 13 as a column number and stored. Further, the data string portion x also overlaps with the data string portion w, resulting in convergence. Therefore, in FIG. 12, closed area number 2 of data string section v corresponds to CF 1 of column number 3 of data string section w, and closed area number 1 of data string section w corresponds to column number 2 of column number 2 of data string section w. Store them in correspondence with CF 2 .
またデータ列部v,w,xは終了するので、第
13図においてそれぞれのカラム終了フラツグを
付与する。 Furthermore, since the data string parts v, w, and x end, respective column end flags are added in FIG. 13.
以上の処理により第12図によりカラム1とカ
ラム3およびカラム2とカラム5はそれぞれ同一
閉領域であり、閉領域2は閉領域1に、閉領域4
は閉領域2にそれぞれ包含されており、閉領域
2、つまり認識物体は1ケの穴閉領域4をもつて
いる事がわかる。そこで第12図のLF部は図の
ようにセツトする事ができ、第12図の閉領域番
号を昇順に書換えれば第15図のようになり、第
11図の構造は第16図の通りである事がわか
る。 As a result of the above processing, column 1 and column 3 and column 2 and column 5 are the same closed area, respectively, as shown in FIG.
are respectively included in the closed region 2, and it can be seen that the closed region 2, that is, the recognition object, has one hole closed region 4. Therefore, the LF part in Fig. 12 can be set as shown in the figure, and if the closed area numbers in Fig. 12 are rewritten in ascending order, it will become as shown in Fig. 15, and the structure in Fig. 11 will be as shown in Fig. 16. It turns out that it is.
更に以上の処理において、同時に各データ列部
の面積、1次モーメント、2次モーメントおよび
境界長を求めておき、エツジデータのカラム番号
と同じカラムのエリアにたし込み、全データが終
了後、同一閉領域番号の特徴量を加える事により
各閉領域毎の特徴量を計算することができる。 Furthermore, in the above processing, the area, first moment, second moment, and boundary length of each data string are calculated at the same time, and are applied to the area of the same column as the edge data column number. By adding the feature amount of the closed region number, the feature amount for each closed region can be calculated.
発明の効果
従来のラベリング方式では対象物の構造を解析
するためには数回画像データを走査する必要があ
つたが本発明では1回画像を走査するだけで対象
画像の閉領域の包含関係を求める事ができ、また
各閉領域が包含するまたは包含される閉領域の特
徴量も容易にかつ高速に求める事ができる。Effects of the Invention With conventional labeling methods, it was necessary to scan image data several times to analyze the structure of the target object, but with the present invention, the inclusion relationship of closed regions of the target image can be determined by scanning the image once. Furthermore, the feature amount of the closed region that each closed region includes or is included in can also be easily and quickly determined.
またエツジデータにカラム番号を対応させ、し
かもカラム番号と閉領域番号を対応させておく事
により各エツジデータがどの閉領域に属するかが
わかり、更に詳しい特徴量を計算するのに非常に
有効である。 Furthermore, by associating column numbers with edge data and also associating column numbers with closed region numbers, it is possible to know which closed region each edge data belongs to, which is very effective for calculating more detailed feature quantities.
第1図は従来のラベリング方式の例を示す図、
第2図は第1図に示したラベリング方式により得
られたデータ例を示す図、第3図は本発明におけ
る一実施例の画像認識装置の構成を示すブロツク
図、第4図は同実施例における重なり検出部を示
す図、第5図は閉領域頂上検出部を示す図、第6
図はダイバージエンス検出部を示す図、第7図は
コンバージエンス検出部を示す図、第8図〜第1
0図はメモリ部をそれぞれ説明するための図、第
11図は同実施例装置に入力される画像データ例
を示す図、第12図〜第14図はメモリ部の内容
を示す図、第15図は閉領域番号を付け直した後
の特徴データを示す図、第16図は画像データの
階層構造を示す図である。
10……入力端子、11……2値化部、29…
…メモリ部、30……認識部、100……構造解
析部。
Figure 1 is a diagram showing an example of a conventional labeling method.
FIG. 2 is a diagram showing an example of data obtained by the labeling method shown in FIG. 1, FIG. 3 is a block diagram showing the configuration of an image recognition device according to an embodiment of the present invention, and FIG. 4 is a diagram showing the same embodiment. Figure 5 is a diagram showing the overlap detection unit in , Figure 5 is a diagram showing the closed region top detection unit, Figure 6
The figure shows the divergence detector, Figure 7 shows the convergence detector, and Figures 8 to 1.
0 is a diagram for explaining each memory section, FIG. 11 is a diagram showing an example of image data input to the device of the embodiment, FIGS. 12 to 14 are diagrams showing the contents of the memory section, and FIG. The figure shows feature data after closed area numbers have been renumbered, and FIG. 16 is a diagram showing the hierarchical structure of image data. 10...Input terminal, 11...Binarization section, 29...
...Memory section, 30...Recognition section, 100...Structure analysis section.
Claims (1)
を水平走査して得られる2値デイジタルデータ列
を入力とし、現水平走査線の連続する同極性のデ
ータ列部と1水平走査線前のデータ列部との重な
りをチエツクし、重なりがない場合、データ列部
の集合を表わすカラム番号CFを1増加して当該
走査線のデータ列部に付与し、さらに当該データ
列部の属する閉領域の閉領域番号OFとして前記
カラム番号を記憶する第1の手段と、現水平走査
線の連続する同極性のデータ列部が1水平走査線
前のデータ列部と少なくとも一部初めて重なつた
場合、1走査線前のデータ列部のカラム番号と同
じ値のカラム番号を当該データ列部に付与する第
2の手段と、現水平走査線の連続する同極性のデ
ータ列部が1水平走査線前のデータ列部と重なつ
たが、前記1走査線前のデータ列部が既に現水平
走査線の他のデータ列部と重なつているダイバー
ジエンスの場合、カラム番号を1増加して当該デ
ータ列部のカラム番号とし、当該データ列部の閉
領域番号として前記1走査線前のデータ列部の属
する閉領域の閉領域番号を当該データ列部のカラ
ム番号に対応させて記憶し、当該データ列部の、
ダイバージエンスの原因を表わすフラツグDF1
として、当該データ列部の直前のデータ列部の閉
領域番号を当該データ列部のカラム番号に対応さ
せて記憶し、さらに前記直前のデータ列部の、ダ
イバージエンスの影響を表わすフラツグDF2と
して、当該データ列部の閉領域番号を前記直前の
データ列部のカラム番号に対応させて記憶する第
3の手段と、現水平走査線の連続する同極性のデ
ータ列部が1水平走査線前のデータ列部と重なつ
たが、当該データ列部が前記1走査線前のデータ
列部と重なるよりも前に既に前記1走査線前の他
のデータ列部と重なつており、前記1走査線前の
データ列部と前記1走査線前の他のデータ列部が
同じ閉領域番号をもつコンバージエンスの場合、
現データ列部との重なりが新たに検出された前記
1走査線前のデータ列部の、コンバージエンスの
原因を表わすフラツグCF1として、前記1走査
線前のデータ列部の直前のデータ列部の閉領域番
号を前記1走査線前のデータ列部のカラム番号に
対応させて記憶し、さらに前記1走査線前のデー
タ列部の直前のデータ列部の、コンバージエンス
の影響を表わすフラツグCF2として、前記1走
査線前のデータ列部の閉領域番号を前記1走査線
前のデータ列部の直前のデータ列部のカラム番号
に対応させて記憶する第4の手段と、現水平走査
線のデータ列部のカラム番号に対応する特徴項目
エリアに、各データ列部の面積、境界長、第一次
モーメント、第二次モーメントをたし込む第5の
手段と、全水平走査線のデータ列を前記第1〜第
4の手段により処理した後、前記各フラツグ
CF1,DF1,CF2,DF2をもとに画像の閉領
域の数、各々の閉領域の包含関係および画像の構
造、構造の深さを求めるとともに、前記第5の手
段により各カラム毎に計算された特徴を同じ閉領
域番号を持つカラム毎に加える事により各領域毎
の特徴を求める第6の手段とを備える事を特徴と
した画像認識装置。1 Input is a binary digital data string obtained by horizontally scanning a recognition target image containing at least one closed area, and the continuous data string part of the same polarity of the current horizontal scanning line and the one horizontal scanning line before Checks for overlap with the data string section, and if there is no overlap, increases the column number CF representing the set of data string sections by 1 and assigns it to the data string section of the scanning line, and then adds the column number CF representing the set of data string sections to the closed area to which the data string section belongs. the first means for storing the column number as a closed area number OF, and when a continuous data string portion of the same polarity of the current horizontal scanning line overlaps at least a portion of the data string portion of the previous horizontal scanning line for the first time; , a second means for assigning a column number having the same value as the column number of the data string part one scanning line before the data string part; However, in the case of divergence where the data row part of the previous scanning line already overlaps with another data row part of the current horizontal scanning line, the column number is increased by 1. storing as a column number of the data string portion, and storing a closed region number of a closed region to which the data string portion one scanning line before belongs as a closed region number of the data string portion in correspondence with a column number of the data string portion; In the data string section,
Flag DF1 indicating the cause of divergence
, the closed area number of the data string section immediately before the data string section is stored in correspondence with the column number of the data string section, and a flag DF2 representing the influence of divergence of the immediately preceding data string section is stored. , a third means for storing the closed area number of the data string portion in correspondence with the column number of the immediately preceding data string portion; However, before the data string portion overlaps with the data string portion of the previous scanning line, it has already overlapped with another data string portion of the previous scanning line, and the data string portion of In the case of convergence in which the data string part before the scanning line and the other data string part one scanning line before have the same closed area number,
The flag CF1 indicating the cause of convergence in the data string part one scanning line before, in which overlap with the current data string part has been newly detected, is set to The closed area number is stored in correspondence with the column number of the data string part of the one scanning line before, and is further used as a flag CF2 representing the influence of convergence of the data string part immediately before the data string part of the one scanning line before. , a fourth means for storing a closed area number of the data string part of the previous scanning line in correspondence with a column number of the data string part immediately before the data string part of the current horizontal scanning line; A fifth means for adding the area, boundary length, first moment, and second moment of each data string section to the feature item area corresponding to the column number of the data string section, and the data string of all horizontal scanning lines. is processed by the first to fourth means, and then each of the flags is processed by the first to fourth means.
Based on CF1, DF1, CF2, and DF2, the number of closed regions of the image, the inclusion relationship of each closed region, the structure of the image, and the depth of the structure are calculated for each column by the fifth means. and sixth means for obtaining features for each region by adding the features for each column having the same closed region number.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP58049772A JPS59174969A (en) | 1983-03-24 | 1983-03-24 | Picture recognizing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP58049772A JPS59174969A (en) | 1983-03-24 | 1983-03-24 | Picture recognizing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS59174969A JPS59174969A (en) | 1984-10-03 |
| JPH0443312B2 true JPH0443312B2 (en) | 1992-07-16 |
Family
ID=12840453
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP58049772A Granted JPS59174969A (en) | 1983-03-24 | 1983-03-24 | Picture recognizing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS59174969A (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS61129974A (en) * | 1984-11-28 | 1986-06-17 | Mita Ind Co Ltd | Graphic processor |
| JPH0812695B2 (en) * | 1986-03-06 | 1996-02-07 | 富士通株式会社 | Area extraction device |
-
1983
- 1983-03-24 JP JP58049772A patent/JPS59174969A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS59174969A (en) | 1984-10-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112036232B (en) | A method, system, terminal and storage medium for recognizing an image table structure | |
| JPH0546591B2 (en) | ||
| JPH08508128A (en) | Image classification method and apparatus using distribution map | |
| JPH0256707B2 (en) | ||
| JPH0821057B2 (en) | Document image analysis method | |
| JPH0443312B2 (en) | ||
| CN114267029A (en) | A lane line detection method, device, equipment and storage medium | |
| JP3058489B2 (en) | String extraction method | |
| JPS6084678A (en) | image recognition device | |
| JPH10312460A (en) | Image processing method and high-precision image processing device | |
| JPS6343788B2 (en) | ||
| JPH0245229B2 (en) | ||
| JPS58158761A (en) | Pattern position detecting method | |
| CN121191173A (en) | Vehicle mileage identification methods and equipment | |
| JPS60140487A (en) | Character feature extraction method | |
| JPH0446500B2 (en) | ||
| JPH01319872A (en) | Distortion measuring method and device by lattice picture | |
| JPS63250787A (en) | Method for segmentating character | |
| JPS59128678A (en) | Separating device of character | |
| JPS6175976A (en) | Recognizer | |
| JPS63103382A (en) | Erase point detector | |
| JPH03130889A (en) | Picture extraction method | |
| JPH0397085A (en) | Segmenting system for routine format character | |
| JPH0363108B2 (en) | ||
| JPH053627B2 (en) |