JPH0782546B2 - Feature extraction device - Google Patents

Feature extraction device

Info

Publication number
JPH0782546B2
JPH0782546B2 JP62065578A JP6557887A JPH0782546B2 JP H0782546 B2 JPH0782546 B2 JP H0782546B2 JP 62065578 A JP62065578 A JP 62065578A JP 6557887 A JP6557887 A JP 6557887A JP H0782546 B2 JPH0782546 B2 JP H0782546B2
Authority
JP
Japan
Prior art keywords
pixel
pattern
sub
black
scanning
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
Application number
JP62065578A
Other languages
Japanese (ja)
Other versions
JPS63233482A (en
Inventor
雅久 矢野
憲一朗 内村
義征 山下
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP62065578A priority Critical patent/JPH0782546B2/en
Publication of JPS63233482A publication Critical patent/JPS63233482A/en
Publication of JPH0782546B2 publication Critical patent/JPH0782546B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Character Discrimination (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は文字、図形認識において必要な特徴抽出装置に
関し、特に水平、垂直、左斜め、右斜めのサブパタンを
用いた特徴抽出装置に関する。
Description: TECHNICAL FIELD The present invention relates to a feature extraction device necessary for character and figure recognition, and more particularly to a feature extraction device using horizontal, vertical, left diagonal, and right diagonal sub-patterns.

(従来の技術) 従来、この種の装置としては特公昭60−38755号公報に
開示されたものがある。上記文献に開示された装置は、
光電変換部と、線幅計算部と、パタンメモリと、サブパ
タン抽出部と、特徴抽出部とを備え、次にようにして特
徴を抽出していた。まず光電変換部により光学的に読み
取った文字図形パタンを2値パタンに光電変換する。そ
の2値パタンはパタンメモリに格納される。一方、線幅
計算部は光電変換部の出力に基づき文字図形の線幅wを
計算する。サブパタン抽出部はパタンメモリに格納され
ている2値パタンを複数の方向に走査し、当該各走査方
向における黒画素の連続の長さlと線幅計算部で求めた
線幅wとの間でl≧N・w(Nは定数)を満足する黒画
素を取り出し、各走査方向ごとにサブパタンを抽出す
る。そして特徴抽出部はこのサブパタンを用いて特徴を
抽出する。
(Prior Art) Conventionally, an apparatus of this type is disclosed in Japanese Patent Publication No. 60-38755. The device disclosed in the above document is
The photoelectric conversion unit, the line width calculation unit, the pattern memory, the sub pattern extraction unit, and the feature extraction unit are provided, and the features are extracted as follows. First, the photoelectric conversion unit photoelectrically converts a character / graphic pattern optically read into a binary pattern. The binary pattern is stored in the pattern memory. On the other hand, the line width calculation unit calculates the line width w of the character graphic based on the output of the photoelectric conversion unit. The sub-pattern extraction unit scans the binary pattern stored in the pattern memory in a plurality of directions, and between the continuous length l of black pixels in each scanning direction and the line width w obtained by the line width calculation unit. Black pixels satisfying l ≧ N · w (N is a constant) are extracted, and sub-patterns are extracted for each scanning direction. Then, the feature extraction unit extracts the feature using this sub-pattern.

(発明が解決しようとする問題点) しかしながら、上記従来の装置では、特徴抽出を必要と
する入力が膨大なデータ量を有する図面等の場合、該図
面等の2値パタンを格納しているパタンメモリを複数回
走査するため、特徴抽出処理に時間がかかり、処理の高
速化を妨げるという問題点があった。
(Problems to be Solved by the Invention) However, in the above-described conventional apparatus, when the input requiring feature extraction is a drawing or the like having a huge amount of data, the pattern storing the binary pattern of the drawing or the like is used. Since the memory is scanned a plurality of times, there is a problem in that the feature extraction processing takes time and hinders speeding up of the processing.

本発明は、このような従来技術の問題点を解決するため
になされたものであって、1回のパタンメモリの走査で
所望のサブパタンを得ることができ、処理の高速化が可
能な特徴抽出装置を提供することを目的とする。
The present invention has been made in order to solve the above-mentioned problems of the conventional technology, and a desired sub-pattern can be obtained by one scan of the pattern memory, and feature extraction capable of speeding up the processing. The purpose is to provide a device.

(問題点を解決するための手段) 本発明は、前記従来技術の問題点を解決するために、文
書、図面を光電変換し、黒画素と白画素で表わされる2
値パタンを得る第1の手段と、該2値パタンを格納する
第2の手段と、前記2値パタンを水平方向に走査したと
きの走査位置の画素が黒画素であれば計数値を歩進さ
せ、当該画素が画素であれば計数値をゼロクリアするこ
とにより黒画素の水平方向の連続数を計数する第3の手
段と、前記2値パタンを水平方向に走査したときに、当
該走査位置の画素が黒画素であれば、当該画素位置に対
応する記憶位置の内容を歩進させた値を当該記憶位置に
格納することにより、それまでの水平方向の走査で当該
黒画素と垂直方向に連続している黒画素の連続数を当該
画素位置に対応する記憶位置に記憶し、当該走査位置の
画素が白画素であれば当該画素位置に対応する記憶位置
の内容をゼロクリアした値を記憶する第4の手段と、前
記2値パタンを水平方向に走査したときに、当該走査位
置の画素が黒画素であれば、当該走査位置に対応する記
憶位置の直前の記憶位置の内容を歩進させた値を当該画
素位置に対応する記憶位置に格納することにより、それ
までの水平方向の走査で当該黒画素と左斜め方向に連続
している黒画素の連続数を当該画素位置に対応する記憶
位置に記憶し、当該走査位置の画素が白画素であれば当
該画素位置に対応する記憶位置の内容をゼロクリアした
値を記憶する第5の手段と、前記2値パタンを水平方向
に走査したときに、当該走査位置の画素が黒画素であれ
ば当該走査位置に対応する記憶位置の次の記憶位置の内
容を歩進させた値を当該画素位置に対応する記憶位置に
格納することにより、それまでの水平方向の走査で当該
黒画素と右斜め方向に連続している黒画素の連続数を当
該画素位置に対応する記憶位置に記憶し、当該走査位置
の画素が白画素であれば当該画素位置に対応する記憶位
置の内容をゼロクリアした値を記憶する第6の手段と、
前記第3の手段により計数した黒画素の水平方向の連続
数が所定値以上のとき、当該走査位置の黒画素に水平方
向に連続する前記2値パタンの黒画素を水平サブパタン
として記憶させ、走査位置に対応する前記第4の手段に
より記憶した値が所定値以上のとき、当該走査位置の黒
画素に垂直方向に連続する前記2値パタンの黒画素を垂
直サブパタンとして記憶させ、走査位置に対応する前記
第5の手段により記憶した値が所定値以上のとき、当該
走査位置の黒画素に左斜め方向に連続する前記2値パタ
の黒画素を左斜めサブパタンとして記憶させ、走査位置
に対応する前記第6の手段により記憶した値が所定値以
上のとき、当該走査位置の黒画素に右斜め方向に連続す
る前記2値パタンの黒画素を右斜めサブパタンとして記
憶させる第7の手段と、前記水平サブパタン、垂直サブ
パタン、左斜めサブパタン、右斜めサブパタンを用いて
特徴を抽出する特徴抽出手段とを設けたものである。
(Means for Solving Problems) In order to solve the problems of the prior art, the present invention photoelectrically converts a document and a drawing, and is represented by a black pixel and a white pixel.
A first means for obtaining a value pattern, a second means for storing the binary pattern, and a count value if the pixel at the scanning position when the binary pattern is horizontally scanned is a black pixel. If the pixel is a pixel, the third means for counting the number of consecutive black pixels in the horizontal direction by clearing the count value to zero and the scanning position of the scanning position when the binary pattern is scanned in the horizontal direction. If the pixel is a black pixel, the value obtained by advancing the contents of the storage position corresponding to the pixel position is stored in the storage position, and the scan in the horizontal direction up to that point continues in the vertical direction with the black pixel. The number of consecutive black pixels is stored in the storage position corresponding to the pixel position, and if the pixel at the scanning position is a white pixel, the value of the storage position corresponding to the pixel position is cleared to zero. 4 means and the binary pattern horizontal When the pixel at the scanning position is a black pixel when scanned in the direction, the value obtained by stepping the contents of the storage position immediately before the storage position corresponding to the scanning position is set to the storage position corresponding to the pixel position. By storing, the number of consecutive black pixels that are continuous in the left diagonal direction with the black pixel in the previous horizontal scanning is stored in the storage position corresponding to the pixel position, and the pixel at the scanning position is white. If the pixel is a pixel, a fifth means for storing a value obtained by zero-clearing the content of the storage position corresponding to the pixel position and a pixel at the scanning position when the binary pattern is scanned in the horizontal direction are black pixels. For example, by storing the value obtained by advancing the contents of the storage position next to the storage position corresponding to the scanning position in the storage position corresponding to the pixel position, the black pixel and Black that is continuous diagonally A sixth means for storing the number of consecutive primes in a storage position corresponding to the pixel position, and storing a value obtained by zero-clearing the contents of the storage position corresponding to the pixel position if the pixel at the scanning position is a white pixel; ,
When the number of continuous black pixels in the horizontal direction counted by the third means is equal to or larger than a predetermined value, the black pixels of the binary pattern continuous in the horizontal direction with the black pixel at the scanning position are stored as a horizontal sub-pattern, and scanning is performed. When the value stored by the fourth means corresponding to the position is equal to or larger than a predetermined value, the black pixel of the binary pattern which is continuous in the vertical direction with the black pixel at the scanning position is stored as a vertical sub-pattern and corresponds to the scanning position. When the value stored by the fifth means is equal to or larger than a predetermined value, the black pixel of the binary pattern continuous in the left diagonal direction to the black pixel at the scanning position is stored as a left diagonal sub-pattern, and corresponds to the scanning position. When the value stored by the sixth means is equal to or larger than a predetermined value, a black pixel of the binary pattern continuous in the right diagonal direction to the black pixel at the scanning position is stored as a right diagonal sub pattern. When the horizontal sub-patterns, a vertical sub-pattern is obtained by providing the left oblique sub-patterns, the feature extracting means for extracting a feature with the right diagonal sub-patterns.

(作用) 本発明では、第1の手段は文書、図面を光電変換し、黒
画素と白画素で表わされる2値パタンを得て第2の手段
に出力する。第2の手段はその2値パタンを格納する。
第2の手段に格納された2値パタンの水平方向の走査を
垂直方向に繰り返す過程において、第3の手段は2値パ
タンにおける水平方向の黒画素の連続数の計数値を保持
し、第4の手段は2値パタンにおける垂直方向の黒画素
の連続数を水平走査の各走査位置の画素に対応させて画
素毎に記憶し、第5の手段は2値パタンにおける左斜め
方向の黒画素の連続数を水平走査の各走査位置の画素に
対応させて画素毎に記憶し、第6の手段は2値パタンに
おける右斜め方向の黒画素の連続数を水平走査の各走査
位置の画素に対応させて画素毎に記憶する。第7の手段
は、第3、第4、第5及び第6の各手段における計数
値、あるいは記憶された値が所定の条件を満たすとき
に、特徴抽出手段は前記2値パタンから水平サブパタ
ン、垂直サブパタン、左斜めサブパタン、右斜めサブパ
タンを用いて特徴抽出を行う。
(Operation) In the present invention, the first means photoelectrically converts a document and a drawing, obtains a binary pattern represented by black pixels and white pixels, and outputs the binary pattern to the second means. The second means stores the binary pattern.
In the process of repeating the horizontal scanning of the binary pattern stored in the second means in the vertical direction, the third means holds the count value of the continuous number of black pixels in the horizontal direction in the binary pattern, Means stores the number of consecutive black pixels in the vertical direction in the binary pattern for each pixel in correspondence with the pixel at each scanning position in the horizontal scanning, and the fifth means stores black pixels in the left diagonal direction in the binary pattern. The consecutive number is stored for each pixel in correspondence with the pixel at each scanning position in the horizontal scanning, and the sixth means corresponds to the number of consecutive black pixels in the right diagonal direction in the binary pattern to the pixel at each scanning position in the horizontal scanning. Then, each pixel is stored. In a seventh means, when the count value in each of the third, fourth, fifth and sixth means or a stored value satisfies a predetermined condition, the feature extracting means changes the binary pattern from the horizontal sub-pattern to the horizontal sub-pattern. Feature extraction is performed using the vertical sub-pattern, the left diagonal sub-pattern, and the right diagonal sub-pattern.

従って、第2の手段に記憶された2値パタンの全面にわ
たる水平走査を一度行うことにより、所望のサブパタン
が全て抽出され、そのサブパタンから特徴抽出が行われ
るので、処理の高速化が可能となり、前記従来技術の問
題点が解決される。
Therefore, by performing horizontal scanning once over the entire surface of the binary pattern stored in the second means, all desired sub-patterns are extracted, and feature extraction is performed from the sub-patterns, so that the processing speed can be increased. The problems of the prior art described above are solved.

(実施例) 第1図は本発明による特徴抽出装置の一実施例の構想を
示すものであって、1は画像入力部、2は水平・垂直・
左斜め・右斜めサブパタン抽出部、3は特徴抽出部であ
る。画像入力部1は図面等を光電変換し、黒画素と白画
素で表わされる第2図(a)のような2値パタン1aを得
る。水平・垂直・左斜め・右斜めサブパタン抽出部2は
入力2値パタン1aから第2図(b)のような水平サブパ
タン2a、第2図(c)のような垂直サブパタン2b、第2
図(d)のような左斜めサブパタン2c、第2図(e)の
ような右斜めサブパタン2dを抽出する。特徴抽出部3は
水平サブパタン2aと、垂直サブパタン2bと、左斜めサブ
パタン2cと、右斜めサブパタン2dを用いて特徴点を抽出
する。例えば水平サブパタン2aと垂直サブパタン2bとも
に黒画素である位置を特徴点として抽出する。
(Embodiment) FIG. 1 shows the concept of one embodiment of the feature extraction apparatus according to the present invention, in which 1 is an image input unit and 2 is horizontal / vertical /
Left diagonal / right diagonal sub-pattern extraction unit 3 is a feature extraction unit. The image input unit 1 photoelectrically converts a drawing or the like to obtain a binary pattern 1a represented by black pixels and white pixels as shown in FIG. The horizontal / vertical / left diagonal / right diagonal sub-pattern extraction unit 2 receives the input binary pattern 1a from a horizontal sub-pattern 2a as shown in FIG. 2 (b), a vertical sub-pattern 2b as shown in FIG. 2 (c), and a second sub-pattern.
A left diagonal sub-pattern 2c as shown in FIG. 2D and a right diagonal sub-pattern 2d as shown in FIG. 2E are extracted. The feature extraction unit 3 extracts feature points using the horizontal sub-pattern 2a, the vertical sub-pattern 2b, the left diagonal sub-pattern 2c, and the right diagonal sub-pattern 2d. For example, a position where both the horizontal sub-pattern 2a and the vertical sub-pattern 2b are black pixels is extracted as a feature point.

第3図は、第1図の装置における水平・垂直・左斜め・
右斜めサブパタン抽出部2の具体的構成例を示すもので
あって、4は原パタンメモリ、5は水平黒RUNカウン
タ、6は垂直黒RUNメモリ、7は左斜め黒RUNメモリ、8
は遅延レジスタ、9は右斜め黒RUNメモリ、10は判別回
路、11は水平サブパタンメモリ、12は垂直サブパタンメ
モリ、13は左斜めサブパタンメモリ、14は右斜めサブパ
タンメモリである。原パタンメモリ4は画像入力部1か
らの入力2値パタン1aを格納するものであり、主走査方
向X、副走査方向Yをアドレスとして画像データの書き
込み、読み出しが行なわれる。ここで主走査方向Xは水
平方向、副走査方向Yは垂直方向に対応する。水平黒RU
Nカウンタ5は黒画素の水平方向の連続数を計数するも
のである。垂直黒RUNメモリ6は水平方向の画素毎に垂
直方向の黒画素の連続数を記憶するものであって、原パ
タンメモリ4の主走査と同期して走査される。左斜め黒
RUNメモリ7は水平方向の画素毎に左斜め方向の黒画素
の連続数を記憶するものであって、原パタンメモリ4の
主走査と同期して走査される。遅延レジスタ8は原パタ
ンメモリ4の主走査と同期して走査される左斜め黒RUN
メモリ7の画素毎の記憶内容を1画素分遅延させて記憶
するものであって、走査位置の左斜め上に隣接する画素
に対応し、既に走査済みの左斜め方向の黒画素の連続数
が記憶されている。右斜め黒RUNメモリ9は水平方向の
画素毎に右斜め方向の黒画素の連続数を記憶するもので
あって、原パタンメモリ4の主走査と同期して走査され
る。判別回路10は原パタンメモリ4の走査位置の画素
(以下着目画素という)データ4aと、水平黒RUNカウン
タ5、垂直黒RUNメモリ6、左斜め黒RUNレジスタ7、遅
延レジスタ8、右斜め黒RUNメモリ9の内容によって、
着目画素データ4aおよび着目画素に連続する画素が水平
サブパタン、垂直サブパタン、左斜めサブパタン、右斜
めサブパタンのいずれに属するかを判定し、その結果を
それぞれ水平サブパタンメモリ11、垂直サブパタンメモ
リ12、左斜めサブパタンメモリ13、右斜めパタンメモリ
14へ格納する。水平サブパタンメモリ11、垂直サブパタ
ンメモリ12、左斜めサブパタンメモリ13、右斜めサブパ
タンメモリ14はそれぞれ水平サブパタン、垂直サブパタ
ン、左斜めサブパタン、右斜めサブパタンを格納するも
のであって、原パタンメモリ4と同一の容量を持ち、原
パタンメモリ4と同期して走査される。
Fig. 3 shows horizontal, vertical, left diagonal, and
1 shows a specific configuration example of the right diagonal sub-pattern extraction unit 2, 4 is an original pattern memory, 5 is a horizontal black RUN counter, 6 is a vertical black RUN memory, 7 is a left diagonal black RUN memory, 8
Is a delay register, 9 is a right diagonal black RUN memory, 10 is a discrimination circuit, 11 is a horizontal sub pattern memory, 12 is a vertical sub pattern memory, 13 is a left diagonal sub pattern memory, and 14 is a right diagonal sub pattern memory. The original pattern memory 4 stores the input binary pattern 1a from the image input unit 1, and image data is written and read by using the main scanning direction X and the sub scanning direction Y as addresses. Here, the main scanning direction X corresponds to the horizontal direction and the sub scanning direction Y corresponds to the vertical direction. Horizontal black RU
The N counter 5 counts the number of consecutive black pixels in the horizontal direction. The vertical black RUN memory 6 stores the number of continuous black pixels in the vertical direction for each pixel in the horizontal direction, and is scanned in synchronization with the main scan of the original pattern memory 4. Left diagonal black
The RUN memory 7 stores the number of consecutive black pixels in the diagonal left direction for each pixel in the horizontal direction, and is scanned in synchronization with the main scanning of the original pattern memory 4. The delay register 8 is a left diagonal black RUN that is scanned in synchronization with the main scan of the original pattern memory 4.
The storage content of each pixel of the memory 7 is delayed by one pixel and stored, and the number of consecutive black pixels in the left diagonal direction which has already been scanned corresponds to the pixel adjacent to the upper left of the scanning position. Remembered The right diagonal black RUN memory 9 stores the number of consecutive black pixels in the right diagonal direction for each pixel in the horizontal direction, and is scanned in synchronization with the main scanning of the original pattern memory 4. The discrimination circuit 10 includes pixel 4 (hereinafter referred to as a pixel of interest) data at the scanning position of the original pattern memory 4, a horizontal black RUN counter 5, a vertical black RUN memory 6, a left diagonal black RUN register 7, a delay register 8, and a right diagonal black RUN. Depending on the contents of the memory 9,
The target pixel data 4a and the pixels continuous to the target pixel are determined to belong to a horizontal sub-pattern, a vertical sub-pattern, a left diagonal sub-pattern, a right diagonal sub-pattern, and the results are respectively the horizontal sub-pattern memory 11, the vertical sub-pattern memory 12, Left diagonal sub-pattern memory 13, right diagonal sub-pattern memory
Store in 14. The horizontal sub-pattern memory 11, the vertical sub-pattern memory 12, the left diagonal sub-pattern memory 13, and the right diagonal sub-pattern memory 14 store the horizontal sub-pattern, the vertical sub-pattern, the left diagonal sub-pattern and the right diagonal sub-pattern, respectively. It has the same capacity as the memory 4 and is scanned in synchronization with the original pattern memory 4.

次に、第4図のフローチャートにしたがって判別回路10
の動作について説明する。
Next, the discrimination circuit 10 according to the flowchart of FIG.
The operation of will be described.

まず水平・垂直・左斜め、右斜めサブパタン抽出部2の
初期化を行う(ステップ、)。次に主走査方向のた
めの初期化を行い(ステップ、)、原パタンメモリ
4、水平サブパタンメモリ11、垂直サブパタンメモリ1
2、左斜めサブパタンメモリ13、右斜めサブパタンメモ
リ14(以下総称してパタンメモリという)の着目画素を
決定するための1つの要素である垂直走査位置を進める
とともに、原パタンメモリ4を全面走査したか否かの判
定を行う(ステップ、)。続いてパタンメモリの着
目画素を決定するためのもう1つの要素である水平走査
位置を進めるとともに、原パタンメモリ4の水平走査の
終了判定を行う(ステップ、)。次に決定した走査
位置における原パタンメモリ4の内用すなわち着目画素
データが黒か白かの判定を行う(ステップ)。白と判
定された場合、水平サブパタン、垂直サブパタン、左斜
めサブパタン、右斜めサブパタンの画素データを白とし
て出力するとともに、黒画素と連結関係がないことを示
すための処理が行われる(ステップ〜)。また着目
画素(走査位置の画素)が黒画素と判定された場合、水
平黒RUNカウンタ5を歩進させ、走査位置に対応する垂
直黒RUNメモリ6の内容を歩進させた値を当該記憶位置
に格納する(ステップ,)とともに、水平サブパタ
ンに関する処理(ステップ〜)と、垂直サブパタン
に関する処理(ステップ〜)と、左斜めサブパタン
に関する処理(ステップ〜)と、右斜めサブパタン
に関する処理(ステップ〜)を行う。
First, the horizontal / vertical / diagonal left and diagonal right sub-pattern extracting unit 2 is initialized (step,). Next, initialization for the main scanning direction is performed (step,), and the original pattern memory 4, the horizontal sub-pattern memory 11, the vertical sub-pattern memory 1
2, advance the vertical scanning position, which is one element for determining the pixel of interest of the left diagonal sub-pattern memory 13 and the right diagonal sub-pattern memory 14 (hereinafter collectively referred to as a pattern memory), and the original pattern memory 4 over the entire surface. It is determined whether or not scanning has been performed (step,). Subsequently, the horizontal scanning position, which is another element for determining the pixel of interest of the pattern memory, is advanced, and the end of horizontal scanning of the original pattern memory 4 is determined (step,). Next, it is determined whether the internal pixel data of the original pattern memory 4 at the determined scanning position, that is, the pixel data of interest is black or white (step). If it is determined to be white, the pixel data of the horizontal sub-pattern, the vertical sub-pattern, the left diagonal sub-pattern, and the right diagonal sub-pattern is output as white, and a process for indicating that there is no connection relationship with the black pixel is performed (step ~). . Further, when the pixel of interest (pixel at the scanning position) is determined to be a black pixel, the horizontal black RUN counter 5 is stepped up, and the value obtained by advancing the contents of the vertical black RUN memory 6 corresponding to the scanning position is the storage position. (Step,), the horizontal sub-pattern processing (step-), the vertical sub-pattern processing (step-), the left diagonal sub-pattern processing (step-), and the right diagonal sub-pattern processing (step-). To do.

水平サブパタンに関する処理は次にようにして行われ
る。
The processing regarding the horizontal sub-pattern is performed as follows.

先ず水平黒RUNカウンタ5の内容が線幅などで決まる所
定の値(Lt)未満の場合、水平サブパタンの水平サブパ
タンの条件を満たしていないとして、当該走査位置に対
応する水平サブパタンメモリ11の記憶位置に白画素とし
て出力する(ステップ,)。また、水平黒RUNカウ
ンタ5の内容が前記所定の値(Lt)と等しい場合、着目
画素及び既に走査した当該着目画素に連続する水平方向
の黒画素は水平サブパタンとしての条件を満たしたこと
により、これらの黒画素に対応する水平サブパタンメモ
リ11の記憶位置に黒画素として出力する(ステップ,
)。また、水平黒RUNカウンタ5の内容が前記所定の
値(Lt)を越えた場合、水平サブパタンとしての条件を
満たすとしての当該走査位置に対応する水平サブパタン
メモリ11の記憶位置に黒画素として出力する(ステップ
,)。
First, when the content of the horizontal black RUN counter 5 is less than a predetermined value (L t ) determined by the line width or the like, it is determined that the condition of the horizontal sub-pattern of the horizontal sub-pattern is not satisfied, and the horizontal sub-pattern memory 11 corresponding to the scanning position is stored. Output as a white pixel to the memory location (step,). When the content of the horizontal black RUN counter 5 is equal to the predetermined value (L t ), the target pixel and the black pixels in the horizontal direction continuous to the target pixel already scanned satisfy the condition as the horizontal sub pattern. , Output as black pixels to the storage positions of the horizontal sub-pattern memory 11 corresponding to these black pixels (step,
). When the content of the horizontal black RUN counter 5 exceeds the predetermined value (L t ), black pixels are stored at the storage position of the horizontal sub-pattern memory 11 corresponding to the scanning position that satisfies the condition as the horizontal sub-pattern. Output (step,).

垂直サブパタンに関する処理は次のようにして行われ
る。
The processing regarding the vertical sub-pattern is performed as follows.

先ず走査位置に対応する垂直黒RUNメモリ6の内容が前
記所定の値(Lt)未満の場合、垂直サブパタンの条件を
満たしていないとして、垂直サブパタンメモリ12の当該
走査位置に対応する記憶位置に白画素として出力する
(ステップ,)。また、走査位置に対応する垂直黒
RUNメモリ6の内容が前記所定の値(Lt)と等しい場
合、着目画素及び既に走査した当該着目画素に連続する
垂直方向の黒画素は垂直サブパタンとしての条件を満た
したことになりこれらの黒画素位置に対応する垂直サブ
パタンメモリ12の記憶位置に黒画素として出力される
(ステップ,)。また、走査位置に対応する垂直黒
RUNメモリ6の内容が前記所定の値(Lt)を越える場
合、垂直サブパタンの条件を満たすとして当該走査位置
に対応する垂直サブパタンメモリ12の記憶位置に黒画素
として出力する(ステップ,)。
First, when the content of the vertical black RUN memory 6 corresponding to the scanning position is less than the predetermined value (L t ), it is determined that the condition of the vertical sub pattern is not satisfied, and the storage position corresponding to the scanning position of the vertical sub pattern memory 12 is determined. Output as white pixels to (step,). Also, the vertical black corresponding to the scanning position
When the content of the RUN memory 6 is equal to the predetermined value (L t ), the target pixel and the black pixels in the vertical direction continuous to the target pixel already scanned satisfy the condition as the vertical sub pattern. It is output as a black pixel to the storage position of the vertical sub-pattern memory 12 corresponding to the pixel position (step,). Also, the vertical black corresponding to the scanning position
When the content of the RUN memory 6 exceeds the predetermined value (L t ), it is determined that the condition of the vertical sub-pattern is satisfied, and the black pixel is output to the storage position of the vertical sub-pattern memory 12 corresponding to the scanning position (step,).

左斜めサブパタンに関する処理は次にようにして行われ
る。
The process related to the left diagonal sub-pattern is performed as follows.

先ず左斜め上方向の黒画素の連続数を記憶している遅延
レジスタ8の内容を歩進させた値を走査位置に対応する
左斜め黒RUNメモリ7に格納する(ステップ)。次
に、走査位置に対応する左斜め黒RUNメモリ7の内容が
前記所定の値(Lt)未満の場合、左斜めサブパタンの条
件を満たしていないとして左斜めサブパタンメモリ13の
対応する記憶位置に白画素として出力する(ステップ
,)。また、走査位置に対応する左斜め黒RUNメモ
リ7の内容が前記所定の値(Lt)に等しい場合、着目画
素、及び既に走査した当該着目画素に連続する左斜め上
方向の黒画素は左斜めサブパタンとしての条件を満たし
たことになりこれらの黒画素位置に対応する左斜めサブ
パタンメモリ13の記憶位置に黒画素として出力する(ス
テップ,)。また、走査位置に対応する左斜め黒RU
Nメモリ7の内容が前記所定の値(Lt)を越える場合、
左斜めサブパタンの条件を満たすとして当該走査位置に
対応する左斜めサブパタンメモリ13の記憶位置に黒画素
として出力する(ステップ,)。
First, the value obtained by advancing the contents of the delay register 8 which stores the number of consecutive black pixels in the left diagonally upward direction is stored in the left diagonal black RUN memory 7 corresponding to the scanning position (step). Next, when the content of the left diagonal black RUN memory 7 corresponding to the scanning position is less than the predetermined value (L t ), it is determined that the condition of the left diagonal sub pattern is not satisfied, and the corresponding storage position of the left diagonal sub pattern memory 13 is determined. Output as white pixels to (step,). When the content of the left diagonal black RUN memory 7 corresponding to the scanning position is equal to the predetermined value (L t ), the pixel of interest and the black pixel in the diagonally left upward direction that is continuous with the pixel of interest already scanned are left. The condition for the diagonal sub-pattern is satisfied, and the black pixel is output to the storage position of the left diagonal sub-pattern memory 13 corresponding to these black pixel positions (step,). Also, the left diagonal black RU corresponding to the scanning position
When the content of N memory 7 exceeds the predetermined value (L t ),
If the condition of the left diagonal sub-pattern is satisfied, it is output as a black pixel to the storage position of the left diagonal sub-pattern memory 13 corresponding to the scanning position (step,).

右斜めサブパタンに関する処理は次のようにして行われ
る。
The process related to the right diagonal sub-pattern is performed as follows.

先ず右斜め上方向の黒画素の連続数を記憶している走査
位置+1の画素位置に対応する右斜め黒RUNメモリ9の
内容を歩進させた値を当該走査位置に対応する右斜め黒
RUNメモリ9の記憶位置に格納する(ステップ)。次
に、走査位置に対応する右斜め黒RUNメモリ9の内容が
前記所定の値(Lt)未満の場合、右斜めサブパタンの条
件を満たしていないとして右斜めサブパタンメモリ13の
対応する記憶位置に白画素として出力する(ステップ
,)。また、走査位置に対応する右斜め黒RUNメモ
リ9の内容が前記所定の値(Lt)に等しい場合、着目画
素、及び既に走査した当該着目画素に連続する右斜め上
方向の黒画素は右斜めサブパタンとしての条件を満たし
たことになりこれらの黒画素位置に対応する右斜めサブ
パタンメモリ14の記憶位置に黒画素として出力する(ス
テップ,)。また、走査位置に対応する右斜め黒RU
Nメモリ9の内容が前記所定の値(Lt)を越える場合、
右斜めサブパタンの条件を満たすとして当該走査位置に
対応する右斜めサブパタンメモリ14の記憶位置に黒画素
として出力する(ステップ,)。
First, a value obtained by advancing the contents of the right diagonal black RUN memory 9 corresponding to the pixel position of the scanning position +1 which stores the number of consecutive black pixels in the upper right diagonal direction is the right diagonal black corresponding to the scanning position.
The data is stored in the storage position of the RUN memory 9 (step). Next, when the content of the right diagonal black RUN memory 9 corresponding to the scanning position is less than the predetermined value (L t ), it is determined that the condition of the right diagonal sub pattern is not satisfied, and the corresponding storage position of the right diagonal sub pattern memory 13 is determined. Output as white pixels to (step,). If the content of the right diagonal black RUN memory 9 corresponding to the scanning position is equal to the predetermined value (L t ), the pixel of interest and the black pixel in the diagonally right upward direction that is continuous with the pixel of interest already scanned are on the right. Since the condition for the diagonal sub-pattern has been satisfied, black pixels are output to the storage positions of the right diagonal sub-pattern memory 14 corresponding to these black pixel positions (step,). Also, the right diagonal black RU corresponding to the scanning position
When the content of N memory 9 exceeds the predetermined value (L t ),
If the right diagonal sub-pattern is satisfied, the pixel is output as a black pixel to the storage position of the right diagonal sub-pattern memory 14 corresponding to the scanning position (step,).

前述したステップ〜の処理を原パタンメモリ4の走
査終了まで行うことによって、目的とする水平サブパタ
ン、垂直サブパタン、左斜めサブパタン、右斜めサブパ
タンを抽出することができる。
By performing the processes of steps 1 to 4 until the scanning of the original pattern memory 4 is completed, it is possible to extract the target horizontal sub-pattern, vertical sub-pattern, left diagonal sub-pattern, and right diagonal sub-pattern.

ここで水平黒RUNカウンタ5、垂直黒RUNメモリ6、左斜
め黒RUNメモリ7、右斜め黒RUNメモリ9は所定の値
(Lt)+1を計数できるビット容量のもので良い。
Here, the horizontal black RUN counter 5, the vertical black RUN memory 6, the left diagonal black RUN memory 7, and the right diagonal black RUN memory 9 may have a bit capacity capable of counting a predetermined value (L t ) +1.

また、必要とするサブパタンの種類が限定される場合、
該サブパタン抽出に必要とする部分のみ装置化すること
により安価な装置として実現できる。
In addition, if the type of sub pattern required is limited,
It can be realized as an inexpensive device by forming only the part required for the sub-pattern extraction.

(発明の効果) 以上詳細に説明したように、本発明によれば、文書、図
面の2値パタンを格納するメモリ(第2の手段)に対し
て水平走査のみを順次垂直方向に繰り返し行う過程で水
平方向、垂直方向、左斜め方向、右斜め方向の黒画素の
連続数を計数、記憶し、その記憶した内容が所定の値以
上の時、所定の値を越える方向に関して、該方向に連続
する黒画素を抽出して、前記方向に該当するサブパタン
として、水平サブパタン、垂直サブパタン、左斜めサブ
パタン、右斜めサブパタンを得、これらのサブパタンに
基づき特徴点を抽出するようにしたので、従来の方法に
比べ、約1/4の処理時間で従来と同様の結果を得ること
ができる。
(Effect of the Invention) As described in detail above, according to the present invention, a process of sequentially performing only horizontal scanning in the vertical direction on a memory (second means) for storing binary patterns of documents and drawings. , Counts and stores the number of consecutive black pixels in the horizontal, vertical, diagonal left, and diagonal right directions, and when the stored content is greater than or equal to a specified value, the direction in which the specified value is exceeded continues in that direction. By extracting the black pixels, the horizontal sub-pattern, the vertical sub-pattern, the left diagonal sub-pattern, and the right diagonal sub-pattern are obtained as the sub-patterns corresponding to the direction, and the characteristic points are extracted based on these sub-patterns. Compared with, it is possible to obtain the same result as the conventional one with a processing time of about 1/4.

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

第1図は本発明による特徴抽出装置の一実施例の構成
図、第2図は第1図の装置で処理される図面の例を示す
図、第3図は第1図の水平・垂直・左斜め、右斜めサブ
パタン抽出部の具体的構成の例を示す図、第4図は第1
図の判別回路の処理手順の一例を示すフローチャートで
ある。 1……画像入力部、 2……水平・垂直・左斜め・右斜めサブパタン抽出部、 3……特徴抽出部、 4……原パタンメモリ、 5……水平黒RUNカウンタ、 6……垂直黒RUNメモリ、 7……左斜め黒RUNメモリ、 8……遅延レジスタ、 9……右斜め黒RUNレジスタ、 10……判別回路、 11……水平サブパタンメモリ、 12……垂直サブパタンメモリ、 13……左斜めサブパタンメモリ、 14……右斜めサブパタンメモリ。
FIG. 1 is a block diagram of an embodiment of a feature extraction device according to the present invention, FIG. 2 is a diagram showing an example of a drawing processed by the device of FIG. 1, and FIG. FIG. 4 is a diagram showing an example of a specific configuration of a diagonally left and diagonally right sub-pattern extraction unit, and FIG.
It is a flow chart which shows an example of the processing procedure of the discrimination circuit of the figure. 1 ... Image input section, 2 ... Horizontal / vertical / left diagonal / right diagonal sub-pattern extraction section, 3 ... Feature extraction section, 4 ... Original pattern memory, 5 ... Horizontal black RUN counter, 6 ... Vertical black RUN memory, 7 ... left diagonal black RUN memory, 8 ... delay register, 9 ... right diagonal black RUN register, 10 ... discrimination circuit, 11 ... horizontal sub pattern memory, 12 ... vertical sub pattern memory, 13 …… Left diagonal sub-pattern memory, 14 …… Right diagonal sub-pattern memory.

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 G06T 7/00 ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI technical display location G06T 7/00

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】文書、図面を光電変換し、黒画素と白画素
で表わされる2値パタンを得る第1の手段と、 該2値パタンを格納する第2の手段と、 前記2値パタンを水平方向に走査したときの走査位置の
画素が黒画素であれば計数値を歩進させ、当該画素が白
画素であれば計数値をゼロクリアすることにより黒画素
の水平方向の連続数を計数する第3の手段と、 前記2値パタンを水平方向に走査したときに、当該走査
位置の画素が黒画素であれば、当該画素位置に対応する
記憶位置の内容を歩進させた値を当該記憶位置に格納す
ることにより、それまでの水平方向の走査で当該黒画素
と垂直方向に連続している黒画素の連続数を当該画素位
置に対応する記憶位置に記憶し、当該走査位置の画素が
白画素であれば当該画素位置に対応する記憶位置の内容
をゼロクリアした値を記憶する第4の手段と、 前記2値パタンを水平方向に走査したときに、当該走査
位置の画素が黒画素であれば、当該走査位置に対応する
記憶位置の直前の記憶位置の内容を歩進させた値を当該
画素位置に対応する記憶位置に格納することにより、そ
れまでの水平方向の走査で当該黒画素と左斜め方向に連
続している黒画素の連続数を当該画素位置に対応する記
憶位置に記憶し、当該走査位置の画素が白画素であれば
当該画素位置に対応する記憶位置の内容をゼロクリアし
た値を記憶する第5の手段と、 前記2値パタンを水平方向に走査したときに、当該走査
位置の画素が黒画素であれば当該走査位置に対応する記
憶位置の次の記憶位置の内容を歩進させた値を当該画素
位置に対応する記憶位置に格納することにより、それま
での水平方向の走査で当該黒画素と右斜め方向に連続し
ている黒画素の連続数を当該画素位置に対応する記憶位
置に記憶し、当該走査位置の画素が白画素であれば当該
画素位置に対応する記憶位置の内容をゼロクリアした値
を記憶する第6の手段と、 前記第3の手段により計数した黒画素の水平方向の連続
数が所定値以上のとき、当該走査位置の黒画素に水平方
向に連続する前記2値パタンの黒画素を水平サブパタン
として記憶させ、走査位置に対応する前記第4の手段に
より記憶した値が所定値以上のとき、当該走査位置の黒
画素に垂直方向に連続する前記2値パタンの黒画素を垂
直サブパタンとして記憶させ、走査位置に対応する前記
第5の手段により記憶した値が所定値以上のとき、当該
走査位置の黒画素に左斜め方向に連続する前記2値パタ
ンの黒画素を左斜めサブパタンとして記憶させ、走査位
置に対応する前記第6の手段により記憶した値が所定値
以上のとき、当該走査位置の黒画素に右斜め方向に連続
する前記2値パタンの黒画素を右斜めサブパタンとして
記憶させる第7の手段と、 前記水平サブパタン、垂直サブパタン、左斜めサブパタ
ン、右斜めサブパタンを用いて特徴を抽出する特徴抽出
手段とを 設けたことを特徴とする特徴抽出装置。
1. A first means for photoelectrically converting a document or drawing to obtain a binary pattern represented by black pixels and white pixels, a second means for storing the binary pattern, and the binary pattern. If the pixel at the scanning position when scanning in the horizontal direction is a black pixel, the count value is incremented, and if the pixel is a white pixel, the count value is cleared to zero to count the number of consecutive black pixels in the horizontal direction. Third means, and when the pixel at the scanning position is a black pixel when the binary pattern is scanned in the horizontal direction, a value obtained by advancing the content of the storage position corresponding to the pixel position is stored. By storing in the position, the number of consecutive black pixels continuous in the vertical direction with the black pixel in the horizontal scanning up to that point is stored in the storage position corresponding to the pixel position, and the pixel at the scanning position is stored. If it is a white pixel, the storage position corresponding to the pixel position Fourth means for storing a value in which the contents are zero-cleared, and when the pixel at the scanning position is a black pixel when the binary pattern is scanned in the horizontal direction, a value immediately before the storage position corresponding to the scanning position is displayed. By storing the value obtained by advancing the contents of the storage position in the storage position corresponding to the pixel position, the number of consecutive black pixels continuous in the left diagonal direction with the black pixel in the scanning in the horizontal direction up to that point. Is stored in a storage position corresponding to the pixel position, and if the pixel at the scanning position is a white pixel, a fifth means for storing a value obtained by zero-clearing the contents of the storage position corresponding to the pixel position; When the pixel at the scanning position is a black pixel when the pattern is scanned in the horizontal direction, the value obtained by advancing the content of the storage position next to the storage position corresponding to the scanning position is stored in the memory corresponding to the pixel position. By storing in a position Then, the number of consecutive black pixels continuous in the right diagonal direction with the black pixel in the horizontal scanning up to that point is stored in the storage position corresponding to the pixel position, and the pixel at the scanning position is a white pixel. For example, sixth means for storing a value obtained by zero-clearing the content of the storage position corresponding to the pixel position, and the scanning position when the number of consecutive black pixels in the horizontal direction counted by the third means is equal to or more than a predetermined value. The black pixels of the binary pattern continuous in the horizontal direction as the horizontal sub-pattern, and the value stored by the fourth means corresponding to the scanning position is equal to or more than a predetermined value, the black pixel of the scanning position. The black pixels of the binary pattern continuous in the vertical direction are stored as vertical sub-patterns, and when the value stored by the fifth means corresponding to the scanning position is equal to or more than a predetermined value, the black pixel at the scanning position is slanted to the left. In the direction The successive black pixels of the binary pattern are stored as a left diagonal sub-pattern, and when the value stored by the sixth means corresponding to the scanning position is equal to or greater than a predetermined value, the black pixels at the scanning position are continuously connected in the right diagonal direction. And a feature extraction unit for extracting features using the horizontal sub-pattern, the vertical sub-pattern, the left diagonal sub-pattern, and the right diagonal sub-pattern. A feature extraction device.
JP62065578A 1987-03-23 1987-03-23 Feature extraction device Expired - Lifetime JPH0782546B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62065578A JPH0782546B2 (en) 1987-03-23 1987-03-23 Feature extraction device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62065578A JPH0782546B2 (en) 1987-03-23 1987-03-23 Feature extraction device

Publications (2)

Publication Number Publication Date
JPS63233482A JPS63233482A (en) 1988-09-29
JPH0782546B2 true JPH0782546B2 (en) 1995-09-06

Family

ID=13291026

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62065578A Expired - Lifetime JPH0782546B2 (en) 1987-03-23 1987-03-23 Feature extraction device

Country Status (1)

Country Link
JP (1) JPH0782546B2 (en)

Also Published As

Publication number Publication date
JPS63233482A (en) 1988-09-29

Similar Documents

Publication Publication Date Title
JPH07192086A (en) Picture inclination detection method
US6333788B1 (en) Image processing apparatus and method
JPH02277185A (en) Extracting method for rectangle coordinates
JPH0782546B2 (en) Feature extraction device
JPS6311832B2 (en)
JPH03126181A (en) Area dividing method for document image
JPS62121589A (en) Character segmenting system
JP3783815B2 (en) Image processing device
JPS613568A (en) Intermediate tone area identification system
JP2915700B2 (en) Image processing method and apparatus
JP3882427B2 (en) Image processing apparatus and image processing method
JP2784059B2 (en) Method and apparatus for removing noise from binary image
JP2845376B2 (en) Pixel density converter
JPH0214392A (en) Document area analyzing device
JPS6343788B2 (en)
JPH03209579A (en) Image processor
JP3430506B2 (en) Image processing method and license plate search method using the same
JPS6331825B2 (en)
JPH022189B2 (en)
JPS63233483A (en) Feature extracting device
JP2980636B2 (en) Character recognition device
JPH07120392B2 (en) Character pattern cutting device
JPH0743764B2 (en) Line figure folding processing device
JPH05165955A (en) Image processing method
JPH0540848A (en) Area extraction method for document image