JPH01226086A - Oblique line detecting system - Google Patents

Oblique line detecting system

Info

Publication number
JPH01226086A
JPH01226086A JP63053343A JP5334388A JPH01226086A JP H01226086 A JPH01226086 A JP H01226086A JP 63053343 A JP63053343 A JP 63053343A JP 5334388 A JP5334388 A JP 5334388A JP H01226086 A JPH01226086 A JP H01226086A
Authority
JP
Japan
Prior art keywords
data
image
section
input medium
input
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.)
Granted
Application number
JP63053343A
Other languages
Japanese (ja)
Other versions
JPH0789375B2 (en
Inventor
Takao Miura
孝雄 三浦
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP63053343A priority Critical patent/JPH0789375B2/en
Publication of JPH01226086A publication Critical patent/JPH01226086A/en
Publication of JPH0789375B2 publication Critical patent/JPH0789375B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To correctly detect an oblique state by scanning an image in horizontal and vertical directions, finding out image existence information, finding out the side information of an input medium, deciding whether the sides intersect at right angles or not, and when the sides of the lines intersect at right angles, calculating the oblique angle of the input medium. CONSTITUTION:Input medium data 11 is scanned in the horizontal direction and the lengths of a white area (no image part) and a black area (image part) are measured. A continuity recognizing part 3 decides whether a side L1 is continued or not by data read out by a horizontal direction processing part 1. In a lacking part F1, a straight line passing a point A in a start area detected at its continuity and a point B in its end area is defined as a side L1. Then the input medium data 1 is scanned in the vertical direction by a vertical direction processing part 2, its continuity is decided by the recognizing part 3 and a side L2 is obtained in a lacking part F2. Whether the obtained sides L1, L2 intersect at right angles or not is decided by an orthogonalization detecting part 4, and when the sides intersect at right angles, an inclined angle theta is calculated by an inclined angle calculating part 5 about either one of the sides L1, L2.

Description

【発明の詳細な説明】 〔目次〕 概要 産業上の利用分野 従来の技術(第6図) 発明が解決しようとする課題 課題を解決するための手段(第1図) 作用 実施例(第2図〜第5図) 発明の効果 〔概要〕 画像情報処理における斜行検出方式に係り、辺部に欠損
部分や折曲部分が存在している場合でもその斜行状態を
正しく検出できるようにすることを目的とし、 認識されるべき媒体の画像情報を基本パターンとして予
め登録しておき、センサより読取られた入力媒体の画像
情報を一旦メモリに記憶し、上記基本パターンと比較す
ることにより入力媒体の画像を認識する画像認識装置に
おいて、水平方向処理部と、垂直方向処理部と、連続性
認識部と、直交性検出部と、斜行角算出部を具備し、上
記入力媒体の画像情報を上記水平方向処理部により水平
方向に走査処理して画像の有無情報を求め、上記垂直方
向処理部により垂直方向に走査処理してこれまた画像の
有無情報を求め、これらにより連続性認識部により入力
媒体の辺情報を求め、この辺が直交しているか否かを上
記直交性検出部で判別し、直交しているときに入力媒体
の斜行角を算出するようにしたことを特徴とする。
[Detailed description of the invention] [Table of contents] Overview Industrial field of application Prior art (Figure 6) Means for solving the problems to be solved by the invention (Figure 1) Working examples (Figure 2) ~Figure 5) Effects of the invention [Summary] To enable correct detection of the skew state even when there is a missing part or a bent part on the side, in relation to a skew detection method in image information processing. With the aim of An image recognition device that recognizes an image includes a horizontal direction processing section, a vertical direction processing section, a continuity recognition section, an orthogonality detection section, and a skew angle calculation section, The horizontal processing section performs scanning processing in the horizontal direction to obtain image presence/absence information, the vertical processing section performs scanning processing in the vertical direction to obtain image presence/absence information, and based on these, the continuity recognition section determines the presence/absence information of the input medium. It is characterized in that the side information of the input medium is obtained, the orthogonality detection section determines whether the sides are orthogonal, and when the sides are orthogonal, the oblique angle of the input medium is calculated.

〔産業上の利用分野〕[Industrial application field]

この発明は、斜行検出方式に係り、特に、画像認識され
るべき媒体が、認識装置に対して斜行して入力された際
にその辺部に欠損部分が存在しても正確な斜行角度が算
出可能なものに関する。
The present invention relates to a skew detection method, and in particular, when a medium to be image-recognized is input to a recognition device in a skewed direction, even if there is a defective part on the side, the skew is accurately detected. Regarding things whose angles can be calculated.

例えば、紙幣の真贋の判定等のため、この紙幣等の媒体
の画像をセンサで読み取る画像認識装置がある。これは
、予め紙幣の画像データを基本、XIグーンとして記憶
しておき、読み取られた画像データと基本パターンの画
像データとを比較して、紙幣の真贋の判定を行うもので
ある。紙幣の基本パターンの画像データ(以下、基本パ
ターン・データという)は、画像を読み取るライン・セ
ンサのような読取部に対して直交する形で入力された紙
幣から得られるが、実際には、判定される紙幣は、読取
部に対して種々の方向(角度・傾き)で入力される。
For example, there is an image recognition device that uses a sensor to read an image of a medium such as a banknote in order to determine the authenticity of the banknote. This basically stores the image data of the banknote in advance as XI goons, and compares the read image data with the image data of the basic pattern to determine the authenticity of the banknote. Image data of the basic pattern of a banknote (hereinafter referred to as basic pattern data) is obtained from a banknote that is input orthogonally to a reading unit such as a line sensor that reads the image, but in reality, it is The banknotes are input into the reading section in various directions (angles and inclinations).

そのため、実際の真贋の判定の際には、正確な照合を行
うため、読み取られたデータと基本ノくターンとの間で
何らかの形でマ・ノチングをとる必要がある。
Therefore, when actually determining authenticity, it is necessary to perform some form of notching between the read data and the basic notation in order to perform accurate verification.

〔従来の技術〕[Conventional technology]

基本パターンと斜行入力されている紙幣の如き被照合体
とのマツチングを正確にとる下の1つの紙幣等の画像に
対して、種々の斜行入力角度のパターンを基本パターン
として予め登録しておけばよい。即ち、実際に入力され
る紙幣の入力方向の全てに対応するように、種々の斜行
入力角度に応じた基本パターンデータを予め登録してお
き、入力データに直ちに応することができるようにすれ
ばよいが、後述するような問題点がある。
Accurately match the basic pattern with the object to be verified, such as a bill that is being input obliquely. For the image of a banknote, etc. below, patterns with various oblique input angles are registered in advance as the basic pattern. Just leave it there. In other words, basic pattern data corresponding to various oblique input angles are registered in advance so as to correspond to all input directions of banknotes that are actually input, so that the input data can be immediately responded to. This is fine, but there are problems as described below.

例えば、第6図に示す如(、メモリ60に種々の基本パ
ターンのデータを記憶しておく場合には、記憶しておく
パターンの数だけ記憶することが必要となり、それぞれ
、正しく入力された紙幣等の媒体P、のデータ、角度θ
bで入力された媒体P3のデータ、角度θCで入力され
た媒体P。のデータ等、認識に必要な角度の数だけ用意
されることになる。
For example, as shown in FIG. Data of medium P, such as, angle θ
Data of medium P3 input at b, medium P input at angle θC. Data for the number of angles required for recognition will be prepared.

そして、読取部で読み取られた判定されるべき紙幣等の
媒体のデータが、これらのメモリに登録された基本パタ
ーンのデータと比較されることになる。
Then, the data of the medium such as the banknote to be determined read by the reading unit is compared with the basic pattern data registered in these memories.

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

このような方法は、多数の基本パターンを登録しておく
だけで良いので、技術的には、格別の困難性はないが、
実際には、入力紙幣は、いろいろな角度で入力されるこ
ととなり、スムーズな判定のためには、登録しておくべ
き基本パターンの数がきわめて多数必要になると言う課
題を有している。しかも入力紙幣に折曲部分や欠損部分
があってもこれに影響されないように斜行角を算出する
ことが必要である。
This method is not particularly difficult technically, as it only requires registering a large number of basic patterns.
In reality, input banknotes are input from various angles, and a problem arises in that an extremely large number of basic patterns are required to be registered for smooth determination. Moreover, it is necessary to calculate the skew angle so as not to be affected even if the input banknote has a bent part or a missing part.

この発明は、このような点に鑑みて成されたものであり
、登録すべき基本パターンの数を減らすことができ、し
かも、いろいろの角度で入力される紙幣等の媒体に対応
することができる画像認識補正方法を提供することを目
的とする。
This invention has been made in view of these points, and can reduce the number of basic patterns to be registered, and can also handle media such as banknotes that are input from various angles. The purpose of this invention is to provide an image recognition correction method.

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

第1図は、この発明の原理を示す図である。図において
、10は、図示省略した、ライン・センサの如き読取部
からの媒体のデータを記憶してお(画像メモリであり、
このメモリには、1)で示すように、読取部に対して角
度eで入力された媒体すなわち被照合物のデータが記憶
される。15は、基本パターン・データを記憶しておく
メモリであり、16で示すように、比較される原画像の
基本パターン・データが、読取部に対して直交して入力
された形で記憶されている。
FIG. 1 is a diagram showing the principle of the invention. In the figure, 10 is an image memory that stores medium data from a reading unit such as a line sensor (not shown);
As shown in 1), this memory stores data on the medium, that is, the object to be verified, which is input to the reading section at an angle e. Reference numeral 15 denotes a memory for storing basic pattern data, and as shown at 16, the basic pattern data of the original image to be compared is stored in a form input orthogonally to the reading unit. There is.

入力データと基本パターン・データとを比較するには、
まず、入力媒体データ1)から媒体の読取部に対する入
力角度eを求め、このθから計算によって、媒体の縁に
平行な方向のデータ列1)−1)1−2、−1)− n
を求める。これを、メモリ15に記憶されている基本パ
ターン・データ16のデータ列16−1.16−2、−
・16−nとそれぞれ比較することによって、入力媒体
の真贋の判定を行う。
To compare input data with basic pattern data,
First, find the input angle e to the reading section of the medium from the input medium data 1), and calculate from this θ the data string 1)-1)1-2, -1)-n in the direction parallel to the edge of the medium.
seek. This is converted into data strings 16-1, 16-2, - of the basic pattern data 16 stored in the memory 15.
- The authenticity of the input medium is determined by comparing it with 16-n.

この場合、辺部に欠損部分F ls、 F zや折曲部
分が存在しても、入力角度θを正確に求めることが必要
である。
In this case, even if there are missing portions F ls, F z or bent portions on the sides, it is necessary to accurately determine the input angle θ.

そのため、本発明では、第1図(C)に示す如く、水平
方向処理部l、垂直方向処理部2、連続性認識部31、
直交性検出部4を具備する。
Therefore, in the present invention, as shown in FIG. 1(C), the horizontal processing section l, the vertical processing section 2, the continuity recognition section 31,
An orthogonality detection section 4 is provided.

水平方向処理部lは、第1図(D)に示す如く、入力媒
体データ1)を水平方向に走査しその白領域(画像なし
部分)と、黒領域(画像あり部分)の長さを計数する。
As shown in FIG. 1(D), the horizontal processing unit 1 scans the input medium data 1) in the horizontal direction and counts the lengths of the white area (portion without image) and black area (portion with image). do.

連続性認識部3は、水平方向処理部lが読み出したデー
タにより、その辺L1が連続しているか、否かを判定す
る。即ち、Y座標n、で水平走査したとき初めに入力媒
体データ1)を検出したX座標をW(n+)とし、n、
より単位長(例えば1ビツト)離れたY座標n2で水平
走査したときの同X座標をW(nz)とするとき、この
W(n+)とW(nz)が何ビット長異なる゛ものかを
判断して連続性をチエツクする。通常の場合、θは最大
6度位であるのでW (n +) −W(n2)であり
、6度の場合Y座標で10ビツト離れても等しく、1)
ビツト離れて1ビツトX座標が変化する程度である。
The continuity recognition unit 3 determines whether or not the side L1 is continuous based on the data read by the horizontal direction processing unit l. That is, when horizontal scanning is performed at the Y coordinate n, the X coordinate at which the input medium data 1) is first detected is W(n+), and n,
Let W(nz) be the same X coordinate when horizontally scanning at the Y coordinate n2 which is separated by a unit length (for example, 1 bit), then find out how many bit lengths W(n+) and W(nz) differ from each other. Judge and check continuity. In the normal case, since θ is about 6 degrees at most, W (n +) - W (n2), and in the case of 6 degrees, it is the same even if 10 bits apart in the Y coordinate, 1)
This is the extent to which the X coordinate changes by 1 bit apart.

しかし、欠損部分F、の領域では、1ビツト離れたn、
とn4のw(n3)とw(n4)は1ビツト以上の差が
あるので、例えばこの連続性の検出された始めの領域の
A点と終わりの領域のB点を通る直線を辺り、とする。
However, in the region of the missing part F, n, which is 1 bit apart,
Since there is a difference of more than 1 bit between w(n3) and w(n4) of do.

同様に、垂直方向処理部2により入力媒体データ1)を
垂直方向に走査し、これにもとづき連続性認識部3で同
様にして連続性を判別し、欠損部分F2をして辺L2を
得ることができる。
Similarly, the input medium data 1) is scanned in the vertical direction by the vertical direction processing unit 2, and based on this, the continuity recognition unit 3 similarly determines continuity and removes the missing portion F2 to obtain the side L2. Can be done.

このようにして得たLlとL2を、直交性検出部4によ
りり、とL2が直交するか否かを判定し、直交するとき
、このり、、Ltのいずれかにより斜行角θを斜行角算
出部5により算出できる。
The orthogonality detection unit 4 determines whether or not Ll and L2 obtained in this way are orthogonal, and if they are orthogonal, the oblique angle θ is adjusted by It can be calculated by the line angle calculating section 5.

〔作用〕[Effect]

このようにして、欠損部や折曲部の影響なく、斜行角e
を求めることができる。
In this way, the oblique angle e can be adjusted without being affected by missing or bent parts.
can be found.

このθが求まると、画像メモリ10に記憶された入力媒
体データ1)から、媒体の縁に平行な方向でデータを読
み出してデータ列1)−1,1)−2、−41−nを得
る。このデータ列1)−1.1)−2、−1)−nは、
読取部に対して直交する形で入力された媒体から得られ
るデータと同じ方向になるので、メモリ15に記憶され
た、唯一の基本パターン・データと直接比較することが
できる。
Once this θ is determined, data is read out from the input medium data 1) stored in the image memory 10 in a direction parallel to the edge of the medium to obtain data sequences 1)-1, 1)-2, -41-n. . This data string 1)-1.1)-2, -1)-n is
Since the data is in the same direction as the data obtained from the medium input perpendicularly to the reading section, it can be directly compared with the only basic pattern data stored in the memory 15.

このため、登録しておくべき基本パターン・データは、
読取部に対して直交する形で入力されたデータでよく、
基本パターン・データを記憶しておくために必要なメモ
リを大幅に減らすことができるのみならず、正確に画像
認識を行うことができる。
For this reason, the basic pattern data that should be registered is
Data input perpendicular to the reading unit may be used.
Not only can the memory required to store basic pattern data be significantly reduced, but also image recognition can be performed accurately.

〔実施例〕〔Example〕

本発明の一実施例を第2図〜第5図にもとづき説明する
An embodiment of the present invention will be described based on FIGS. 2 to 5.

第2図(A)は本発明の一実施例構成図、同(B)はセ
ンサデータ説明図、同(C)はライン単位データ説明図
、第3図は読取部の一例、第4図は本発明の動作説明図
、第5図は入力媒体データ説明図である。
Figure 2 (A) is a configuration diagram of an embodiment of the present invention, Figure 2 (B) is a diagram explaining sensor data, Figure 2 (C) is a diagram explaining line unit data, Figure 3 is an example of a reading section, and Figure 4 is An explanatory diagram of the operation of the present invention, FIG. 5 is an explanatory diagram of input medium data.

第2図において第1図と同一符号は同一部分を示すもの
であり、6は連続性を検出する連続性検出部、7はカウ
ンタ、8はフラグ部、9−1は始点保持部、9−2は終
点保持部、20は制御部、21はプロセッサ、22はセ
ンサ部、23はセンサデータ読取部、24はRA M 
(Randam AccessMemory)、25は
外部インタフェース部である。
In FIG. 2, the same reference numerals as in FIG. 1 indicate the same parts, 6 is a continuity detection section for detecting continuity, 7 is a counter, 8 is a flag section, 9-1 is a starting point holding section, 9- 2 is an end point holding section, 20 is a control section, 21 is a processor, 22 is a sensor section, 23 is a sensor data reading section, 24 is a RAM
(Random Access Memory), 25 is an external interface section.

水平方向処理部lは第2図(B)に示す如き画像メモリ
lOを水平方向に走査処理して同(C)に示す如きライ
ン単位データを作成するものである。ライン単位データ
は、データ数区分d3、第1無ドツト数区分d2、第1
有ドツト数区分d1、第2無ドツト数区分d4等の区分
により構成され、必要に応じて他のドツト数区分d3、
d6・・・が用意されている。ここでデータ数区分d、
は水平走査ライン中に存在する白領域即ち無ドツト区分
と黒領域即ち有りドツト区分の和を示すものであり、第
1無ドツト数区分dtは水平走査ラインの最初の白領域
のドツト長を示し、第1有ドツト区分d、は最初の黒領
域のドツト長を示し、第2無ドツト区分d4は2番目の
白領域のドツト長を示す。
The horizontal processing section 1 horizontally scans the image memory 1O as shown in FIG. 2(B) to create line unit data as shown in FIG. 2(C). Line unit data includes data number division d3, first dot-free number division d2, and first dot-free number division d2.
It is composed of a dot count division d1, a second dot count division d4, etc., and other dot count divisions d3, d3, etc. as necessary.
d6... is prepared. Here, data number classification d,
indicates the sum of the white area, that is, the no-dot section, and the black area, that is, the dot section that exists in the horizontal scanning line, and the first no-dot number section dt indicates the dot length of the first white area of the horizontal scanning line. , the first dotted section d indicates the dot length of the first black area, and the second dotless section d4 indicates the dot length of the second white area.

それ故、第2図(B)において、水平走査ラインH1に
対してはオール白領域のため、データ数d+”lで第1
無ドツト数が画像メモリ10の水平方向数のライン単位
データが作成され、H2に対してはd l=3で第1無
ドツト数がWI、第1有ドツト数がBい第2無ドント数
がW2のライン単位データが作成され、H3に対しては
d1=5で第1無ドツト数がWl′、第1有ドツト数が
B、’(図示省略)、第2無ドツト数がW2′、第2有
ドツト数がW、というドツト数区分d3、d6までを使
用したライン単位データが作成される。そしてこれらの
各ライン単位データはRAM24に保持される。なお画
像メモリ10もRAM24の一部の領域が使用される。
Therefore, in FIG. 2(B), since the horizontal scanning line H1 is an all-white area, the first
Line unit data is created in which the number of no dots is the number in the horizontal direction of the image memory 10, and for H2, dl=3, the first number of no dots is WI, the first number of dots is B, and the second number of no dots is B. Line unit data of W2 is created, and for H3, d1=5, the first number of no dots is Wl', the first number of dots is B,' (not shown), and the second number of no dots is W2'. , the second number of existing dots is W, and line unit data is created using the dot number divisions d3 and d6. Each of these line unit data is held in the RAM 24. Note that the image memory 10 also uses a part of the area of the RAM 24.

そしてこれらのドツト数をカウントするためカウンタ7
が使用され、WとBの区分と水平走査ラインの終わりで
リセットされ、それまでのカウント値が各ドツト数区分
に記入されることになる。
Counter 7 is used to count the number of these dots.
is used and reset at the end of the W and B sections and the horizontal scan line, and the previous count value will be written into each dot number section.

垂直方向処理部2は、上記画像メモリ10を垂直方向に
走査処理して、これまた同様にライン単位データを作成
する。従って第2図(B)において、垂直走査ライン■
1に対してはデータ数d、=5の、■2に対してはデー
タ数a I=3のライン単位データが作成される。
The vertical processing unit 2 performs scanning processing on the image memory 10 in the vertical direction, and similarly creates line unit data. Therefore, in FIG. 2(B), the vertical scanning line ■
Line unit data of data number d = 5 is created for 1, and data number a I = 3 for 2 is created.

連続性認識部3は水平方向処理部l及び垂直方向処理部
2の作成したそれぞれのライン単位データにもとづき、
各辺L1〜L4における連続性を識別するものであり、
連続性検出部6、フラグ部8、始端保持部9−1、終端
保持部9−2等を具備している。
Based on the respective line unit data created by the horizontal direction processing section 1 and the vertical direction processing section 2, the continuity recognition section 3 performs
It identifies continuity on each side L1 to L4,
It includes a continuity detecting section 6, a flag section 8, a starting end holding section 9-1, a terminal end holding section 9-2, and the like.

なお連続性認識部3は、直交性検出部4とともに、本発
明の特徴的なところであるのでこれらの動作については
後で詳述する。
Note that the continuity recognition section 3 and the orthogonality detection section 4 are characteristic features of the present invention, and their operations will be described in detail later.

制御部20は本発明における総合的な処理を行うもので
あり、また画像メモリ10のサイズNXMを保持してい
る。
The control unit 20 performs comprehensive processing in the present invention, and also holds the size NXM of the image memory 10.

センサ部22は媒体が搬送されたときこれを読取るもの
である。センサ部22は、例えば第3図の如く構成され
ている。センサ部22媒体が載置搬送される台35と、
その両側に配置されたセンサアレイ3136よりなる。
The sensor section 22 is for reading the medium when it is conveyed. The sensor section 22 is configured as shown in FIG. 3, for example. A table 35 on which the sensor unit 22 medium is placed and conveyed;
It consists of sensor arrays 3136 arranged on both sides.

台35は、この場合透明な部材によって作られており、
媒体の表裏を同時に読み取ることができる。センサアレ
イは、LED等の発光素子部33.37とフォトセンサ
等の受光素子部34.38からなる。発光素子部33.
37から発光される光を媒体の表裏で反射させ、この反
射光を受光素子部34.38で受けることにより、媒体
のデータを読み取ることができる。
In this case, the stand 35 is made of a transparent material,
Both sides of the medium can be read simultaneously. The sensor array consists of a light emitting element section 33.37 such as an LED and a light receiving element section 34.38 such as a photosensor. Light emitting element section 33.
The data on the medium can be read by reflecting the light emitted from the medium 37 on the front and back surfaces of the medium and receiving the reflected light at the light receiving element portions 34 and 38.

この外、上段の発光素子からの光を、媒体に導き、その
透過光を下段の受光素子で受けるように構成してもよい
。即ち、図中2点鎖線で示す様に、媒体のデータサンプ
ルラインの点A1を通過した上段の発光素子からの光を
、下段の受光素子によって受ける。この透過光を用いる
方法は、媒体の有無を検出するのに最適であり、この発
明の媒体の入力角度を求める場合にも用いることができ
る。
Alternatively, the structure may be such that the light from the upper light emitting element is guided to the medium and the transmitted light is received by the lower light receiving element. That is, as shown by the two-dot chain line in the figure, light from the upper light emitting element that has passed through point A1 of the data sample line of the medium is received by the lower light receiving element. This method using transmitted light is most suitable for detecting the presence or absence of a medium, and can also be used to determine the input angle of the medium of the present invention.

なお、図中矢印は、媒体台35上の媒体の進行方向であ
る。
Note that the arrow in the figure indicates the traveling direction of the medium on the medium platform 35.

このようなセンサ部22により媒体が読み取られ、セン
サデータ読取部23により2値化情報に処理され、RA
M24の一部である画像メモリ10に順次保持されるも
のである。
The medium is read by such a sensor section 22, processed into binary information by the sensor data reading section 23, and then RA
The images are sequentially stored in the image memory 10, which is a part of the M24.

なお、外部インタフェース25は外部装置との入出力制
御を行うものであり、他の入出力装置との接続を行った
り、ホスト装置との接続などを行うものである。
The external interface 25 performs input/output control with external devices, and connects with other input/output devices, a host device, and the like.

次に連続性認識部3及び直交性検出部4の動作について
説明する。
Next, the operations of the continuity recognition section 3 and the orthogonality detection section 4 will be explained.

まず、辺り、の直線を求める、連続性認識部3の動作を
第4図(A)に示すフローに従って他国を参照しつつ説
明する。
First, the operation of the continuity recognition unit 3 for finding a straight line around , will be explained with reference to another country according to the flow shown in FIG. 4(A).

連続性検出部6は、制御部20に対して、水平方向処理
部1が作成し、RAM24に保持されている第2図(C
)に示す如きライン単位データを順次読出させ、そのデ
ータ数区分d、をチエツクする。これが最初に3を示し
たとき入力媒体データ1)を検出したことになるので、
その第1無ドツト数h (i)を読取りこれを保持する
。そして1ドツト次のライン単位データの第1無ドツト
数h (i+l)を読取り、その差h (i) −h 
(i+1)を計算する。このとき、画像メモリ10に、
第2図(B)に示す状態で入力媒体データ1)が記憶さ
れているとき、辺L2に対する部分は、この差が1以上
である。このときフラグ部8にフラグはセットされてな
く、カウンタ7もカウント値零なので、連続性検出部6
は処理ルーチン上これをリセットして、カウンタ7の水
平方向処理時のカウント値Cn=0とする。そして次の
座標位置のライン単位データが制御部20により読出さ
れる。
The continuity detection unit 6 transmits the data to the control unit 20 from the data shown in FIG. 2 (C
) is read out in sequence, and the data number classification d is checked. When this first shows 3, it means that input medium data 1) has been detected, so
The first dot-free number h (i) is read and held. Then, read the first number of non-dots h (i+l) of the line unit data following one dot, and read the difference h (i) - h
Calculate (i+1). At this time, in the image memory 10,
When the input medium data 1) is stored in the state shown in FIG. 2(B), this difference is 1 or more in the portion corresponding to the side L2. At this time, since no flag is set in the flag section 8 and the count value of the counter 7 is zero, the continuity detection section 6
This is reset in the processing routine, and the count value Cn of the counter 7 during horizontal direction processing is set to 0. Then, the line unit data of the next coordinate position is read out by the control section 20.

ところで辺り、のライン単位データが読出されるとき、
上記h (i)−h (i+1)=0が成立゛すること
になる。連続性検出部6は、このときのライン単位デー
タの位置iとそのh (i)を保持するとともに、カウ
ンタ7を+1する。また、制御部20により次のライン
単位データを読出し、同様の処理が行われる。この場合
、第1図(D)に示すLlの傾斜角θ=66とすれば、
第5図(B)におけるn、からn2′までが10ドツト
位の間は上記関係が成立するので、最大傾斜角が6′位
の例ではT−10と設定し、これを連続性検出部6で保
持しておく。そしてn3において上記式が成立しなくな
ったとき、連続性検出部6はフラグ部8にフラグが立っ
ていないこと及びカウンタ7のカウント値CがCATで
あることを認識し、その保持しているiとh (i)の
示す点P、を始点保持部9−1に辺L1の直線性を示し
た始点として設定し、フラグ部8にフラグをセットする
By the way, when the line unit data is read out,
The above h(i)-h(i+1)=0 holds true. The continuity detection unit 6 holds the position i of the line unit data and its h (i) at this time, and increments the counter 7 by 1. Further, the next line unit data is read out by the control unit 20, and similar processing is performed. In this case, if the inclination angle θ of Ll shown in FIG. 1(D) is set to 66, then
The above relationship holds true when the distance from n to n2' in FIG. Hold it at 6. When the above formula no longer holds true at n3, the continuity detection unit 6 recognizes that the flag is not set in the flag unit 8 and that the count value C of the counter 7 is CAT, and the continuity detection unit 6 recognizes that the flag C of the counter 7 is CAT. The point P indicated by and h (i) is set in the starting point holding section 9-1 as the starting point indicating the linearity of the side L1, and a flag is set in the flag section 8.

そしてカウンタ7をリセットする。Then, counter 7 is reset.

しかしn4のライン単位データが読出されたとき再び上
記式が成立する。そして同様な処理が行われるが、n、
において不成立となる。このときフラグがセットされて
いるので、連続性検出部6は今度はn3におけるiとh
 (i)の示す点P、を終点保持部9−2に設定し、カ
ウンタ7をリセットする。
However, when the line unit data of n4 is read out, the above equation is established again. Then, similar processing is performed, but n,
This is not true. Since the flag is set at this time, the continuity detection unit 6 now detects i and h in n3.
The point P shown in (i) is set in the end point holding section 9-2, and the counter 7 is reset.

そしてnhのライン単位データが読出されたとき、上記
式が成立し、同様な処理が行われるが、n7のライン単
位データが続出されたとき、上記式が成立せず、フラグ
がセットされているもののカウンタ7のカウント値CH
は1でありCM≧Tは成立しないため、カウンタ7はリ
セットされる。
When line unit data of nh is read out, the above formula holds true and similar processing is performed, but when line unit data of n7 is read out one after another, the above formula does not hold and the flag is set. Count value CH of thing counter 7
is 1 and CM≧T does not hold, so the counter 7 is reset.

そしてこの欠損部Fがすぎれば再び上記関係により得ら
れた新しいPgが得られることになるので、連続性検出
部6は終点保持部9−2をこの新P2で書き替える。
After this missing portion F passes, a new Pg obtained from the above relationship will be obtained again, so the continuity detecting section 6 rewrites the end point holding section 9-2 with this new P2.

このような処理が順次行われ、画像メモリlOの大きさ
Nまでのライン単位データに対する処理が終了したとき
、始点保持部9−1に記入されたPlと終点保持部9−
2に記入されたP!を結ぶ直線か辺り、の状態を示す直
線となる。
Such processing is performed sequentially, and when processing for line unit data up to the size N of the image memory IO is completed, Pl written in the starting point holding section 9-1 and ending point holding section 9-
P entered in 2! The line that connects the , or the area around it, is the line that indicates the state of .

このようにして得られたPlとP2は直交性検出部4に
送出される。
Pl and P2 obtained in this way are sent to the orthogonality detection section 4.

次に辺Ltの直線を求める処理が連続性検出部6により
行われる。この場合、垂直方向処理部2により作成され
たライン単位データにもとづき、第4図(B)のフロー
チャートに示す如き処理が行われる。このときカウンタ
7は垂直方向のデータに対する連続値C■をカウントす
ることになり、画像メモリ10の大きさMまでの領域で
行われる外は、上記第4図(A)と同一処理が行われる
ので、その詳細な説明は省略する。そしてこれにより得
られた始点Pl′と終点P2′はこれまた直交性検出部
4に送出され、辺り、とL2の直交性がチエツクされる
Next, the continuity detection unit 6 performs a process of determining the straight line of the side Lt. In this case, based on the line unit data created by the vertical direction processing section 2, processing as shown in the flowchart of FIG. 4(B) is performed. At this time, the counter 7 counts the continuous value C■ for the data in the vertical direction, and the same processing as in FIG. 4(A) above is performed except that it is performed in the area up to the size M of the image memory 10. Therefore, detailed explanation thereof will be omitted. The starting point Pl' and ending point P2' thus obtained are also sent to the orthogonality detecting section 4, and the orthogonality of L2 is checked.

直交性検出部4は、例えば次のような演算を行い2直線
の直交性を検知する。即ち、第4図(D)に示す如く、
点P+ (x+、y+) 、Pg (Xi、y2)を通
る直線り、と、点PI’  (X3、y3)、P2’ 
(X4% )’a)を通る直線LNが直交している場合
、公知の如く、その傾斜の積は−1となる。
The orthogonality detection unit 4 performs the following calculation, for example, to detect orthogonality between two straight lines. That is, as shown in FIG. 4(D),
A straight line passing through point P+ (x+, y+), Pg (Xi, y2), and point PI' (X3, y3), P2'
(X4%) If the straight line LN passing through 'a) is orthogonal, the product of their slopes is -1, as is well known.

即ち、 X、−X。That is, X, -X.

x3−x。x3-x.

とすると、L、とり、が直交しているとき)(、x K
z=  1 となる。
Then, when L, and, are orthogonal) (, x K
z=1.

したがって、直交性検出部4は、連続性検出部6から出
力された前記辺り、に対するPl、P2及び辺L2に対
するPl’、PZ’のデータが伝達されたとき、これら
により上記の演算を行いその傾斜の積を求めこれがほぼ
−1であれば辺L1とL2は直交しているものと判断す
る。しかし直交状態でないと判断したとき、連続性認識
部3は、後述するように、今度は辺り、の始点・終点デ
ータを出力し、辺り、とL3との直交性を求める。これ
により直交性が求められないとき、連続性認識部3は、
辺L4の始点・終点データを出力し、今度は辺L4とL
2、あるいはL4とり、の直交性を求める。
Therefore, when the orthogonality detection section 4 receives the data of Pl and P2 for the area outputted from the continuity detection section 6 and Pl' and PZ' for the side L2, the orthogonality detection section 4 performs the above calculation using these data. The product of the slopes is calculated and if the product is approximately -1, it is determined that the sides L1 and L2 are orthogonal. However, when it is determined that they are not in an orthogonal state, the continuity recognition unit 3 outputs the start point and end point data of around, and determines the orthogonality between around and L3, as will be described later. When orthogonality is not determined as a result of this, the continuity recognition unit 3:
Output the start point and end point data of side L4, and now side L4 and L
2 or L4, find the orthogonality.

そして第4図(C)に示す如く、これらによるもすべて
直交性が得られない場合、NGとなり、入力媒体は矩形
、或いは正方形ではないか、辺部分に破損が多く正常な
状態のものではない・と判定されることになる。
As shown in Figure 4 (C), if orthogonality cannot be obtained even with all of these methods, the result is NG, and the input medium is not rectangular or square, or the input medium is not in a normal condition because there are many damages on the sides.・It will be determined that

なお、辺L3の始点・終点を求めるには、垂直方向処理
部2が作成したライン単位データの最後の区分の無ドツ
ト数を使用して、同様の制御を行えばよく、第2図(B
)の■2の例では第2無ドツト数を使用すればよい。同
様に辺L4の始点・終点を求めるにはこれまた水平方向
処理部1の作成したライン単位データの最後の区分の無
ドツト数を使用して同様の制御を行えばよく、第2図(
B)のH2の場所では第2無ドツト数を使用すればよく
、Hlの場所では第3無ドツト数を使用すればよい。こ
のようにいずれの場合でも最後の区分の無ドツト数を使
用すればよいのでその制j1)1も容易である。
Note that in order to find the start and end points of side L3, the same control can be performed using the number of dots in the last section of the line unit data created by the vertical direction processing section 2, as shown in Fig. 2 (B
) In the example of (2), the second dot-free number may be used. Similarly, to find the start and end points of the side L4, the same control can be performed using the number of dots in the last section of the line unit data created by the horizontal direction processing section 1, as shown in FIG.
In B), the second dot-free number may be used at the H2 location, and the third dot-free number may be used at the H1 location. In this way, in any case, the number of dots in the last classification can be used, so the control j1)1 is easy.

このようにして、例えば、第5図(A)に示す如く、辺
L1に欠損部Cや折曲部りが存在しても、A−B点によ
り得られる直線を求めることができる。
In this way, for example, as shown in FIG. 5(A), even if there is a missing portion C or a bent portion on the side L1, a straight line obtained from the point AB can be obtained.

このようにして直交する辺、例えばLlとL2が求めら
れたとき、斜行角算出部5によりその斜行角θ゛を算出
することができる。
When the orthogonal sides, for example Ll and L2, are determined in this way, the skew angle calculation unit 5 can calculate the skew angle θ′.

これにもとづき、第5図(A)のデータ列1)−1.1
)−2−を入力媒体データ1)より得ることができるの
で、これらを第1図(B)に示すように、基本パターン
・データ16のデータ列16−1.16−2−と比較す
ることにより、正確な認識を行うことができる。
Based on this, data string 1)-1.1 in Figure 5 (A)
)-2- can be obtained from the input medium data 1), so these can be compared with the data strings 16-1, 16-2- of the basic pattern data 16, as shown in FIG. 1(B). This allows accurate recognition.

なお上記説明はθが最大6″の例について説明したが、
本発明は勿論これのみに限定されるものではなく、θが
変わればTもこれに応じて変わることになる。
Note that the above explanation was based on an example where θ is 6″ at maximum, but
Of course, the present invention is not limited to this, and if θ changes, T will also change accordingly.

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

本発明によれば入力媒体の一部分に欠損部や折曲部があ
ってもこれに影響されずに正しい斜行角を求めることが
できるので、1個の基本データによって正確な画像認識
を行うことができる。
According to the present invention, even if there is a missing part or a bent part in a part of the input medium, it is possible to obtain the correct oblique angle without being affected by this, so that accurate image recognition can be performed using one basic data. Can be done.

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

第1図は本発明の原理説明図、 第2図は本発明の一実施例、 第3図は読取部の一例、 第4図は本発明の動作説明図、 第5図は入力媒体データの説明図、 第6図は従来例説明図である。 1−・水平方向処理部  2−垂直方向処理部3−・一
連続性認識部   4−直交性検出部5−斜行角算出部
Fig. 1 is an explanatory diagram of the principle of the present invention, Fig. 2 is an embodiment of the present invention, Fig. 3 is an example of a reading section, Fig. 4 is an explanatory diagram of the operation of the present invention, and Fig. 5 is an illustration of input medium data. Explanatory diagram: FIG. 6 is an explanatory diagram of a conventional example. 1--Horizontal direction processing unit 2-Vertical direction processing unit 3--Continuity recognition unit 4-Orthogonality detection unit 5-Oblique angle calculation unit

Claims (1)

【特許請求の範囲】[Claims] (1)認識されるべき媒体の画像情報を基本パターンと
して予め登録しておき、センサより読取られた入力媒体
の画像情報を一端メモリに記憶し、上記基本パターンと
比較することにより入力媒体の画像を認識する画像認識
装置において、 水平方向処理部(1)と、 垂直方向処理部(2)と、 連続性認識部(3)と、 直交性検出部(4)と、 斜行角算出部(5)を具備し、 上記入力媒体の画像情報を上記水平方向処理部(1)に
より水平方向に走査処理して画像の有無情報を求め、上
記垂直方向処理部(2)により垂直方向に走査処理して
これまた画像の有無情報を求め、これらにより連続性認
識部(3)により入力媒体の辺情報を求め、この辺が直
交しているか否かを上記直交性検出部(4)で判別し、
直交しているときに入力媒体の斜行角を算出するように
したことを特徴とする斜行補正方式。
(1) The image information of the medium to be recognized is registered in advance as a basic pattern, the image information of the input medium read by the sensor is temporarily stored in memory, and the image of the input medium is imaged by comparing it with the basic pattern. In an image recognition device that recognizes 5), wherein the image information on the input medium is scanned in the horizontal direction by the horizontal direction processing section (1) to obtain image presence/absence information, and the image information on the input medium is scanned in the vertical direction by the vertical direction processing section (2). Then, the presence/absence information of the image is also obtained, and from this information, the continuity recognition section (3) obtains side information of the input medium, and the orthogonality detection section (4) determines whether or not the sides are orthogonal.
A skew correction method characterized in that a skew angle of an input medium is calculated when the input media are perpendicular to each other.
JP63053343A 1988-03-07 1988-03-07 Image recognition device Expired - Fee Related JPH0789375B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63053343A JPH0789375B2 (en) 1988-03-07 1988-03-07 Image recognition device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63053343A JPH0789375B2 (en) 1988-03-07 1988-03-07 Image recognition device

Publications (2)

Publication Number Publication Date
JPH01226086A true JPH01226086A (en) 1989-09-08
JPH0789375B2 JPH0789375B2 (en) 1995-09-27

Family

ID=12940122

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63053343A Expired - Fee Related JPH0789375B2 (en) 1988-03-07 1988-03-07 Image recognition device

Country Status (1)

Country Link
JP (1) JPH0789375B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5736692A (en) * 1992-12-22 1998-04-07 Kone Oy Remote controller linkage to an elevator system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5736692A (en) * 1992-12-22 1998-04-07 Kone Oy Remote controller linkage to an elevator system

Also Published As

Publication number Publication date
JPH0789375B2 (en) 1995-09-27

Similar Documents

Publication Publication Date Title
US6876766B2 (en) Reshaping freehand drawn lines and shapes in an electronic document
US8942484B2 (en) Text detection using image regions
CN104902120B (en) Image read-out and image reading method
JPH07234915A (en) Image recognizing device
JP2007323501A (en) Paper sheet discriminating device
JPH01226086A (en) Oblique line detecting system
JP3777775B2 (en) Inclined image processing method
van Beusekom et al. Resolution independent skew and orientation detection for document images
JP4513394B2 (en) Color image processing method and image processing apparatus
JPS6174089A (en) Printed matters discrimination system
JP3711737B2 (en) Method for detecting tilt angle of imaging medium
JPH03225578A (en) Method for detecting and segmenting character
JP4670993B2 (en) Color image processing method and image processing apparatus
JPS61277248A (en) Method and device for discriminating picture quality of picture reader
JPS58106665A (en) Character line cutout method
JP2810782B2 (en) Bill validator
JP2005039620A (en) Image reader
JP2001344608A (en) Paper sheet edge detecting method and method for calculating oblique angle using it
JPS61217882A (en) Optical character recognizer
JP2532631B2 (en) Shape determination method for paper sheets
JP2651186B2 (en) Notch corner position detection device
JPH08221506A (en) Device and method for recognizing business document
JPH1097620A (en) Method for approximating circle or circular arc
JP5594012B2 (en) Image processing system, image processing apparatus, and program
JPS61109374A (en) Mark area recognizing system

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees