JPH03262087A - Method for detecting position of character string or character line and character recognizing device - Google Patents

Method for detecting position of character string or character line and character recognizing device

Info

Publication number
JPH03262087A
JPH03262087A JP2060065A JP6006590A JPH03262087A JP H03262087 A JPH03262087 A JP H03262087A JP 2060065 A JP2060065 A JP 2060065A JP 6006590 A JP6006590 A JP 6006590A JP H03262087 A JPH03262087 A JP H03262087A
Authority
JP
Japan
Prior art keywords
character
value
waveform
reference waveform
character string
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2060065A
Other languages
Japanese (ja)
Inventor
Kazuya Asano
一哉 浅野
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.)
JFE Steel Corp
Original Assignee
Kawasaki Steel Corp
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 Kawasaki Steel Corp filed Critical Kawasaki Steel Corp
Priority to JP2060065A priority Critical patent/JPH03262087A/en
Publication of JPH03262087A publication Critical patent/JPH03262087A/en
Pending legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)

Abstract

PURPOSE:To make it possible to accurately segment a character string or a character line even when a noise exists or contrast is low by remarking the shape of the charac ter string or character line appearing on a projected waveform and detecting a segmenting position. CONSTITUTION:A waveform to be projected in a direction vertical to a character string or character line is found out and reference waveforms each of which has a pedestal part with a prescribed length set up on both the sides of two pulses corre sponding to the width of the character string or character line. The average value of the projected waveform part corresponding to the pedestal part of the reference waveform and the average value of the projected waveform part corresponding to the pulse width part of the reference waveform are computed to find out the pedestal value and peak value of the reference waveform and the integrated value of the square of the error between the computed reference waveform and the projected waveform is found within a range in which a difference from the reference waveform is larger than a previously determined threshold. The position minimizing the integrated value is set up as the position of the character string or character line. Even when a noise exists or the contrast between the characters and their background is low, the charac ter string or character line can be accurately segmented.

Description

【発明の詳細な説明】 [産業上の利用分野〕 本発明は、文字読み取り装置における文字列あるいは文
字行切出し方法に関するものであり、特に文字の背景に
ノイズが多い場合や低コントラストの画像でも、文字列
あるいは文字行の位置を正確に検出するための技術に関
するものである。本発明はまた、認識対象文字を含む画
像から認識対象文字を抽出し、認識を行う文字認識装置
に関するものである。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a method for cutting out character strings or character lines in a character reading device. It relates to technology for accurately detecting the position of character strings or character lines. The present invention also relates to a character recognition device that extracts recognition target characters from an image containing the recognition target characters and performs recognition.

[従来の技術] OCR(0ptical Character Rea
der、光学的文字読み取り装置)の普及に代表される
ように、文字認識技術は産業上、広く実用化されており
、事務効1化等に寄与するところは大きい、OCRでは
、一般に文字認識の対象となる文書などを光学的に読取
って画像を得て、画像中の文字列あるいは文字行の位置
を検出し、さらに−文字ずつの切出しを行った後、種々
の文字認識方法を適用している1文字認識方法は一般に
、切出された文字を一つずつ逐次処理してい(ことが前
提となっているため、文字列あるいは文字行の位置の検
出は、文字読み取り装置の実用化においても極めて重要
な技術である。
[Conventional technology] OCR (0pical character
Character recognition technology has been widely put into practical use in industry, as exemplified by the spread of optical character reading devices (optical character reading devices), and it has greatly contributed to improving office efficiency. After optically reading the target document to obtain an image, detecting the position of character strings or character lines in the image, and cutting out each character, various character recognition methods are applied. In general, single-character recognition methods (which are based on the premise of sequentially processing extracted characters one by one) make it difficult to detect the position of character strings or character lines even in the practical application of character reading devices. This is an extremely important technology.

文字列あるいは文字行の検出方法として、従来は文字列
あるいは文字行と平行に画像上の各点の濃度を加算し、
その分布状態から検出する方法が行われている。文字列
と文字行は、文字の並び方が異なるだけで、切出しに関
しては本質的に同等であるので、以下文字行の切出しに
関して説明する。
The conventional method for detecting character strings or character lines is to add the density of each point on the image parallel to the character string or character line.
A method of detecting it from its distribution state is being used. Character strings and character lines differ only in the way the characters are arranged, but are essentially the same in terms of extraction, so the extraction of character lines will be explained below.

第9図は、文書画像から、文字行1の位置を検出する方
法を示したもので、まず水平方向に画像の濃度(画素値
)を加算し、垂直軸に投影して射影波形(射影値)2を
得る。射影波形2を予め定めておいた閾値THと比較す
ることにより、文字行位置を検出できる。
Figure 9 shows a method for detecting the position of character line 1 from a document image. First, the image density (pixel value) is added in the horizontal direction, and then projected on the vertical axis to form a projected waveform (projected value ) get 2. By comparing the projected waveform 2 with a predetermined threshold TH, the character line position can be detected.

しかしながら、この方法は、画像にノイズが重畳してい
た場合、その影響を受は易いという欠点を持つ、第1O
図のようにノイズ3があると、閾値をTHIのように低
く設定すると、ノイズ3の位置を文字行位置と誤認する
。閾値TH2のように高く設定しておけば、ノイズの影
響は受けに(くなるが1文字行の一部が欠落したり、文
字行を捕えられなかったりすることが生じる。
However, this method has the disadvantage that it is easily affected by noise superimposed on the image.
If there is noise 3 as shown in the figure, if the threshold value is set as low as THI, the position of noise 3 will be mistaken as a character line position. If the threshold value is set as high as TH2, the influence of noise will be reduced (although it may result in part of one character line being missing or not being able to capture a character line).

これに対して、特開昭63−129485号において、
前記閾値の設定値によりノイズの影響を防止する文字切
出しにおける検出方式が開示されている。これは2値イ
メージの水平あるいは垂直射影値を閾値と比較して、文
字行又は文字を検出し、前記2値イメージから文字を切
出す文字切出し処理において、文字行又は文字の開始位
置を決定するための閾値よりも、文字行又は文字の終了
位置′を決定するための閾値を低く設定することにより
、開始位置を決定するときはノイズを除去し、終了位置
を決定するときにはイメージの欠落を防止しようとする
ものである。
On the other hand, in JP-A-63-129485,
A detection method for character segmentation is disclosed that prevents the influence of noise by setting the threshold value. This compares the horizontal or vertical projection value of the binary image with a threshold value to detect a character line or character, and determines the starting position of the character line or character in the character extraction process that extracts characters from the binary image. By setting the threshold for determining the end position of a character line or character lower than the threshold for determining the end position of a character line or character, noise is removed when determining the start position, and image loss is prevented when determining the end position. This is what I am trying to do.

〔発明が解決しようとする課題] しかしながら、上述のような文字切出しにおける検出方
式で軽減できるのは、閾値と同レベル以下のノイズの影
響であり、文字行と同程度あるいはそれ以上のレベルの
ノイズが重量している場合には、文字行とノイズの区別
が行えず、文字行だけを正確に切出すことができないと
いう問題がある。文書の場合、このようなノイズの例と
じては、アンダーラインや文字列を囲む外枠、レターヘ
ッド等がある。また、印刷物ではなく、製品や中間製品
へ管理のためにマーキングされる文字の認識においては
、地肌の模様、マーキングのペイントのはみ出し、認識
対象外の文字等、切出しの障害となるノイズはさらに多
(、また、文字と背景の濃度の差(コントラスト)が小
さいため、射影値に対して適切な閾値を設定することが
難しく、良好な切出しが行えないという問題がある。
[Problems to be Solved by the Invention] However, the above-described detection method for character segmentation can only reduce the effects of noise below the same level as the threshold value, and can only reduce the effects of noise at the same level or higher than the character line. If it is heavy, there is a problem in that it is not possible to distinguish between character lines and noise, and it is not possible to accurately cut out only character lines. In documents, examples of such noise include underlining, borders around text, and letterhead. In addition, when recognizing characters that are marked on products or intermediate products for management purposes rather than on printed matter, there are even more noises that impede extraction, such as background patterns, protruding paint on markings, and characters that are not recognized. (Also, since the difference in density (contrast) between the characters and the background is small, it is difficult to set an appropriate threshold value for the projection value, and there is a problem that good extraction cannot be performed.

このように、従来の技術では、切出しの対象となる文字
列あるいは文字行と同程度あるいはそれ以上のレベルの
ノイズがある場合、また、文字と背景のコントラストが
低い場合、文字列あるいは文字行とノイズを適切に区別
して正確な切出しを行う方法はなく、そのために、ノイ
ズを文字列と誤認したり、文字列を見落としたりするこ
とがあり、文字認識の実用化において大きな障害となっ
ていた。
In this way, with conventional technology, when there is noise of the same level or higher than the character string or character line to be extracted, or when the contrast between the characters and the background is low, the character string or character line cannot be cut out. There is no way to properly distinguish noise and perform accurate extraction, and as a result, noise can sometimes be mistaken for character strings or character strings can be overlooked, which has been a major obstacle in the practical application of character recognition.

本発明は、前記従来の問題点を解消すべくなされたもの
で、切出しの対象となる文字列あるいは文字行と同程度
あるいはそれ以上のレベルのノイズがある場合、また、
文字と背景のコントラストが低い場合でも、文字列ある
いは文字行とノイズを適切に区別して正確な切出しを行
うための文字列あるいは文字行の位置検出方法及びこの
方法を好適に使用する文字認識装置を提供することを課
題とするものである。
The present invention has been made to solve the above-mentioned conventional problems, and when there is noise at a level equal to or higher than the character string or line to be extracted,
A method for detecting the position of character strings or character lines for appropriately distinguishing character strings or character lines from noise and performing accurate extraction even when the contrast between characters and the background is low, and a character recognition device suitably using this method. The challenge is to provide this information.

[課題を解決するための手段] 本発明は、上述の課題を解決するものであり、(1)方
法発明は、認識対象文字を含む画像から、認識対象文字
を含む文字列あるいは文字行の位置検出方法に適用され
、次の方法を採った。すなわち、 ■文字列あるいは文字行と平行に画像の濃度を加算して
文字列あるいは文字行に垂直な方向への射影波形を求め
、 ■文字列あるいは文字行の幅および背景部から文字列あ
るいは文字行の幅に相当するパルスとパルスの両側に所
定の長さのペデスタル部分を持つ基準波形を設定し、 ■基準波形を射影波形に添って移動させて所定の周期で
射影波形と比較し、基準波形のペデスタル部分に対応す
る射影波形部分の平均値及び基準波形のパルス幅部分に
対応する射影波形部分の平均値を演算してそれぞれ基準
波形のペデスタル値及び波高値を求めると共に、基準波
形の波高値とペデスタル値との差が予め定められた閾値
よりも大きい範囲において、演算された基準波形と射影
波形の誤差の2乗の積分値を求め、 ■積分値が最小となる位置を文字列あるいは文字行の位
置とする。
[Means for Solving the Problems] The present invention solves the above-mentioned problems. (1) A method invention includes determining the position of a character string or character line containing the recognition target characters from an image including the recognition target characters. The following method was applied to the detection method. In other words, ■ add the density of the image parallel to the character string or character line to obtain the projected waveform in the direction perpendicular to the character string or character line, and ■ determine the character string or character from the width and background of the character string or character line. Set a reference waveform with a pulse corresponding to the row width and a pedestal part of a predetermined length on both sides of the pulse. ■ Move the reference waveform along the projected waveform and compare it with the projected waveform at a predetermined period. The average value of the projected waveform portion corresponding to the pedestal portion of the waveform and the average value of the projected waveform portion corresponding to the pulse width portion of the reference waveform are calculated to obtain the pedestal value and peak value of the reference waveform, respectively, and the waveform of the reference waveform is calculated. In the range where the difference between the high value and the pedestal value is larger than a predetermined threshold, calculate the integral value of the square of the error between the calculated reference waveform and the projected waveform, and The position of the character line.

ことを特徴とする文字列あるいは文字行の位置検出方法
である。
This is a method for detecting the position of a character string or character line.

最小となる値は、誤差の2乗の積分値を基準波形の波高
値とペデスタル値の差で除した値に設定してもよい。
The minimum value may be set to a value obtained by dividing the integral value of the square of the error by the difference between the peak value of the reference waveform and the pedestal value.

また、最小となる値は、誤差の2乗の積分値を基準波形
の波高値とペデスタル値の差の2乗で除した値に設定し
てもよい。
Further, the minimum value may be set to a value obtained by dividing the integral value of the square of the error by the square of the difference between the peak value of the reference waveform and the pedestal value.

さらに、最小となる値は、誤差の絶対値の積分値に設定
してもよい。
Furthermore, the minimum value may be set to the integral value of the absolute value of the error.

その他、最小となる値は、誤差の絶対値の積分値を基準
波形の波高値とペデスタル値の差で除した値に設定する
ことができる。
In addition, the minimum value can be set to a value obtained by dividing the integral value of the absolute value of the error by the difference between the peak value of the reference waveform and the pedestal value.

(2)装置発明は、認識対象文字を含む画像を入力する
画像入力部と、前記画像入力部で入力した画像から認識
対象文字を含む文字列あるいは文字行を切出す文字列あ
るいは文字行切出し部と、前記文字列あるいは文字行切
出し部で切出した文字列あるいは文字行の画像から認識
対象文字を切出す文字切出し部と、前記文字切出し部で
切出した認識対象文字を認識する文字認識部とからなる
文字認識装置に適用され、次の技術手段を採った。
(2) The device invention includes an image input section for inputting an image containing the recognition target character, and a character string or character line cutting section for cutting out a character string or character line containing the recognition target character from the image input by the image input section. a character extraction unit that extracts recognition target characters from an image of the character string or character line extracted by the character string or character line extraction unit; and a character recognition unit that recognizes the recognition target characters extracted by the character extraction unit. It was applied to a character recognition device, and the following technical measures were adopted.

すなわち。Namely.

文字列あるいは文字行切出し部は。Character string or character line extraction part.

■文字列あるいは文字行と平行に画゛像の濃度を加算し
て得られた文字列あるいは文字行に垂直な方向への射影
波形を求める射影波形形成部と、 ■文字列あるいは文字行の幅および背景から文字列ある
いは文字行の幅に相当するパルスとパルスの両側に所定
の長さのペデスタル部分を持つ基準波形を設定する基準
波形設定部と、 ■基準波形を射影波形に添って移動させて所定の周期で
射影波形と比較してペデスタル部分に対応する射影波形
部分の平均値及び基準波形のパルス幅部分に対応する射
影波形部分の平均値からそれぞれ基準波形のペデスタル
値及び波高値を演算する基準波形演算部と、■演算され
た基準波形と射影波形を比較して基準波形と射影波形の
誤差について所定の演算を行いその最小値を検出する比
較演算部とからなる ことを特徴とする文字認識装置である。
■A projected waveform forming unit that calculates a projected waveform in the direction perpendicular to the character string or character line obtained by adding the density of the image parallel to the character string or character line, and ■The width of the character string or character line. and a reference waveform setting unit that sets a reference waveform having a pulse corresponding to the width of a character string or character line from the background and a pedestal portion of a predetermined length on both sides of the pulse; The pedestal value and peak value of the reference waveform are calculated from the average value of the projected waveform part corresponding to the pedestal part and the average value of the projected waveform part corresponding to the pulse width part of the reference waveform, respectively. and (1) a comparison calculation unit that compares the calculated reference waveform and the projected waveform, performs a predetermined calculation on the error between the reference waveform and the projected waveform, and detects the minimum value. It is a character recognition device.

〔作用] 本発明者は、射影波形から文字列あるいは文字行の位置
を検出するにあたり、従来のように背景部分よりも文字
部分の濃度レベルが高いという前提のもとに濃度レベル
だけの情報から切出しを行うのではなく、射影波形上に
現れる文字列あるいは文字行の形状に看目し、予め設定
した基準波形によって射影波形を走査して行き、所定の
周期で両者を比較して基準波形のペデスタル値及び高さ
を演算してその時点における基準波形を求めると共に、
演算された射影波形とその基準波形を比較して、形の上
で最も基準波形に類似した位置を文字列あるいは文字行
の切出し位置として検出するという新規な方法及びその
装置を発明したものである。
[Operation] In detecting the position of a character string or character line from a projected waveform, the present inventor has developed a method based on the information of only the density level, based on the premise that the density level of the character part is higher than the background part, as in the past. Instead of cutting out, the shape of the character string or character line that appears on the projected waveform is scanned, the projected waveform is scanned using a preset reference waveform, and the two are compared at a predetermined period to determine the reference waveform. Calculate the pedestal value and height to find the reference waveform at that point,
We have invented a new method and device for comparing the calculated projected waveform with its reference waveform and detecting the position most similar to the reference waveform in terms of shape as the cutting position of a character string or character line. .

以下、文字行に関して説明を加えるが、文字列に関して
も全く同様である。
A description will be given below regarding character lines, but the same applies to character strings.

射影波形は、文字行に平行に画像の濃度を加算したもの
であるから、射影波形上には文字行の幅に相当する部分
である矩形状の凸部(パルス)が生じる。ノイズがある
場合、同様の凸部が生じるが、アンダーライン、外枠等
では、凸部の幅は文字行とは異なり、また、印刷の汚れ
、ペイントのはみ出し等では、凸部の形状が文字行とは
異なり、矩形状にはならないという特徴がある。従って
、文字の幅から射影波形に現われる文字行部の波形を予
め予想して矩形(パルス)状の基準波形を設定しておき
、射影波形と基準波形を比較して形の上で最も類似した
位置を文字行位置とすれば、文字行とノイズとを速切に
区別することができる。
Since the projected waveform is obtained by adding the density of the image parallel to the character line, a rectangular convex portion (pulse) corresponding to the width of the character line is generated on the projected waveform. Similar protrusions occur when there is noise, but in underlines, outer frames, etc., the width of the protrusions is different from the character line, and in cases of smudged printing, protruding paint, etc., the shape of the protrusions is different from that of the characters. Unlike lines, they have the characteristic that they are not rectangular. Therefore, a rectangular (pulse) reference waveform is set by predicting the character line waveform that appears in the projected waveform based on the width of the character, and the projected waveform and the reference waveform are compared to find the most similar waveform in terms of shape. If the position is the character line position, character lines and noise can be quickly distinguished.

射影波形と基準波形との類似度を評価するには、まず両
者の相互相関関数を用いることが考えられる。しかし、
゛非常にノイズのレベルが高い時には文字行部分よりも
ノイズ部分の値が大きくなり、誤検出してしまうことが
、本発明者の実験から判明した。
In order to evaluate the similarity between the projected waveform and the reference waveform, it is conceivable to first use a cross-correlation function between the two. but,
The inventor's experiments have revealed that when the noise level is extremely high, the value of the noise portion becomes larger than that of the character line portion, resulting in erroneous detection.

そこで、本発明においては、類似度の評価値として、射
影波形と基準波形の誤差の2乗あるいは誤差の絶対値の
積分を用いている。
Therefore, in the present invention, the square of the error between the projected waveform and the reference waveform or the integral of the absolute value of the error are used as the similarity evaluation value.

しかしながら、射影波形に現われる文字行波形の形状は
あらかじめ予測できても、その各部の値を予め知ること
はできないから、基準波形の形状は設定できても、文字
行部分の波高値(パルス高さ)や背景部分(ペデスタル
)の値は設定できない。そこで本発明においては、ある
時点における射影波形自身からこれらの値を算出して、
その時点における演算された基準波形とし、その演算さ
れた基準波形と射影波形とから文字行位置を求めること
とし、この問題を解決した。
However, even if the shape of the character line waveform that appears in the projected waveform can be predicted in advance, the values of each part cannot be known in advance. ) and background part (pedestal) values cannot be set. Therefore, in the present invention, these values are calculated from the projected waveform itself at a certain point in time, and
This problem was solved by using the calculated reference waveform at that point in time and determining the character line position from the calculated reference waveform and the projected waveform.

以下本発明方法を第1図により説明する。第1図(a)
は射影波形2を固定し、基準波形4を射影波形2に添っ
て移動させ、基準波形4の立上り位置が■〜■に移動し
たときにそれぞれ両波形を比較するものとしている。第
1図(b)〜第1図(f)は各位置における射影波形2
と基準波形4の相対位置関係を示したものである。なお
、基準波形4は文字列あるいは文字行の幅L2に相当す
るパルス部分と、その両端に付加したペデスタル部分L
1、L3とから構成される。
The method of the present invention will be explained below with reference to FIG. Figure 1(a)
The projected waveform 2 is fixed, the reference waveform 4 is moved along the projected waveform 2, and both waveforms are compared when the rising position of the reference waveform 4 moves from ■ to ■. Figures 1(b) to 1(f) are projected waveforms 2 at each position.
This shows the relative positional relationship between the reference waveform 4 and the reference waveform 4. Note that the reference waveform 4 consists of a pulse portion corresponding to the width L2 of a character string or character line, and a pedestal portion L added to both ends of the pulse portion.
1 and L3.

第1図(b)〜第1図(c)に示すように、射影波形2
と基準波形4とを重ね合わせたときに。
As shown in FIG. 1(b) to FIG. 1(c), the projected waveform 2
and reference waveform 4 are superimposed.

基準波形4のペデスタル値aと波高値すを、次のように
演算して求め、基準波形5とする。
The pedestal value a and the peak value of the reference waveform 4 are calculated and determined as follows, and are defined as the reference waveform 5.

ペデスタル値a、 基準波形4のペデスタル部分L1.L3と重なる射影波
形2の部分の平均値。
Pedestal value a, pedestal portion L1 of reference waveform 4. Average value of the portion of projected waveform 2 that overlaps with L3.

波高値す。Wave height value.

基準波形4のパルス部分L2と重なる射影波形2の部分
の平均値。
The average value of the portion of the projected waveform 2 that overlaps the pulse portion L2 of the reference waveform 4.

第1図(b)においては、基準波形5は明確でないので
、上部のO印の中に示している。このようにして、第1
図(b)〜第1図(f)に示すように、その時点におけ
る基準波形5を求め、射影波形2と基準波形5の誤差を
求め、その2乗あるいは絶対値を積分する。
In FIG. 1(b), since the reference waveform 5 is not clear, it is shown inside the O mark at the top. In this way, the first
As shown in FIGS. 1B to 1F, the reference waveform 5 at that point in time is determined, the error between the projected waveform 2 and the reference waveform 5 is determined, and its square or absolute value is integrated.

この結果第1図(g)に示すように、演算結果6の最小
値(第1図(e)に示すように基準波形4の立上り位置
が■のとき)をもって文字位置を検出することができる
As a result, as shown in FIG. 1(g), the character position can be detected using the minimum value of the calculation result 6 (when the rising position of the reference waveform 4 is ■ as shown in FIG. 1(e)). .

この操作は、基準波形4を射影波形2に添って移動させ
ながら探索域内について行われるが、基準波形5の値a
、bは所定の周期でその都度水められた後に誤差の計算
がなされるから、この方法では射影波形2のレベルでは
なく、波形形状に注目していることになる。なお、基準
波形4のペデスタル部分L1、L3の長さは、文字列あ
るいは文字行の間隔を考慮して、適宜に決めることがで
きる。すなわち、背景部分が、隣の文字列あるいは文字
行に重ならないように設定すればよい。
This operation is performed within the search area while moving the reference waveform 4 along the projected waveform 2, but the value a of the reference waveform 5
, b are submerged each time at a predetermined period and then the error is calculated, so this method focuses on the waveform shape rather than the level of the projected waveform 2. Note that the lengths of the pedestal portions L1 and L3 of the reference waveform 4 can be determined as appropriate, taking into consideration the spacing between character strings or character lines. That is, the background portion may be set so as not to overlap the adjacent character string or character line.

第1図(b)〜第1図(d)に示すように射影波形2の
変化が小さい部分では、baaあるいはb<aであるの
で、rb−a<閾値」となり探索域外となる部分である
。このような部分では、結果的に誤差が各部分で小さく
なり、したがって、積分値も小さくなる。極端な場合、
射影波形が一定値であると基準波形5の文字列部分とペ
デスタル部分の値は等しくなり、射影波形2と基準波形
5とは全く一致するので、誤差は0になる。
As shown in Fig. 1(b) to Fig. 1(d), in the part where the change in the projected waveform 2 is small, baa or b<a, so rb-a<threshold, and the part is outside the search area. . In such parts, the error becomes small in each part, and therefore the integral value also becomes small. In extreme cases,
If the projected waveform has a constant value, the values of the character string part and the pedestal part of the reference waveform 5 will be equal, and the projected waveform 2 and the reference waveform 5 will completely match, so the error will be zero.

これを文字行位置と判断しないようにするために、本発
明では、基準波形5の文字行部分の値とペデスタル部分
の値の差が予め定められた閾値よりも小さい場合は、積
分値が小さくても文字行と判断しないようにしている。
In order to avoid determining this as a character line position, in the present invention, if the difference between the value of the character line part and the value of the pedestal part of reference waveform 5 is smaller than a predetermined threshold, the integral value is small. Even if the line is a character line, it is not recognized as a character line.

第2図は上述の要旨をフローチャートで示したものであ
る。
FIG. 2 is a flowchart showing the above-mentioned gist.

本発明では、このようにして文字位置を検出するために
、切出しの対象となる文字列あるいは文字行と同程度あ
るいはそれ以上のレベルのノイズがある場合、また、文
字と背景のコントラストが低い場合でも、文字列あるい
は文字行とノイズを適切に区別して正確な切出しを行う
ことができる。
In order to detect the character position in this way, the present invention can be used in cases where there is noise at a level equal to or higher than the character string or character line to be extracted, or where the contrast between the characters and the background is low. However, it is possible to properly distinguish character strings or lines from noise and perform accurate extraction.

[実施例] 以下、本方法発明の実施例として、第3図に示すような
、連続鋳造で製造されるスラブの端面にマーキングされ
た文字の位置検出について説明する。
[Example] Hereinafter, as an example of the method invention, detection of the position of characters marked on the end face of a slab manufactured by continuous casting as shown in FIG. 3 will be described.

この文字は実際には、黒い地肌に白いペイントでマーキ
ングされるので、文字の濃度レベルの方が高くなるが、
第3図はそれを反転させた上で2値化を行ったものを示
しており、文字が黒く背景は白く示されている。この場
合、細長い紙から文字パターンを打ち抜いたものをスラ
ブ端面に当て、その上からペイントをスプレーすること
により印字を行っているので、第3図には文字行lの上
下にペイントのはみ出しによるノイズ3が見られる。第
3図の画像を水平方向に加算すると、第4図のようにな
り、ペイントのはみ出し部の方が文字行部よりも射影波
形2が大きくなるため、従来技術である射影波形2の値
だけで処理する方法では、文字行1を切出すことはでき
ない。
This character is actually marked with white paint on a black background, so the density level of the character is higher.
FIG. 3 shows the inverted and binarized version, where the characters are black and the background is white. In this case, printing is performed by punching out a character pattern from a long thin paper and applying it to the end face of the slab and spraying paint over it. Figure 3 shows the noise caused by the protruding paint above and below the character line l. 3 can be seen. When the images in Figure 3 are added in the horizontal direction, the result is as shown in Figure 4, and since the projected waveform 2 is larger in the protruding part of the paint than in the text line part, only the value of the projected waveform 2 in the conventional technology is With the method of processing character line 1, it is not possible to cut out character line 1.

従って、第4図の射影波形2に対し、第5図に示すよう
に、文字行の幅から予想される波形を基準波形4として
予め設定しておき、射影波形2と基準波形4を重ね合わ
せながら、上述した方法により、基準波形4の文字行部
分に対応する波高値すとペデスタル部分の値aを演算し
、数値化された基準波形5を求め、その時点の射影波形
2と基準波形5の誤差について所定の演算を行い、その
演算値の最小値の地点今文字位置とする。
Therefore, for the projected waveform 2 in FIG. 4, as shown in FIG. 5, a waveform expected from the width of the character line is set in advance as the reference waveform 4, and the projected waveform 2 and the reference waveform 4 are superimposed. However, by the method described above, the wave height value corresponding to the character line portion of the reference waveform 4 and the value a of the pedestal portion are calculated to obtain the digitized reference waveform 5, and the projected waveform 2 and the reference waveform 5 at that point are calculated. A predetermined calculation is performed on the error, and the point with the minimum value of the calculated value is set as the current character position.

演算値の最小となる値として、次の実施例1から実施例
5の値を用いることができる。
The following values of Examples 1 to 5 can be used as the minimum calculated values.

実施例1は、基準波形と射影波形の誤差の2乗の積分値
とする。
In the first embodiment, the integral value is the square of the error between the reference waveform and the projected waveform.

実施例2は、最小となる値を、実施例1の値を基準波形
の波高値とペデスタル値の差で除した値とする。
In the second embodiment, the minimum value is the value obtained by dividing the value in the first embodiment by the difference between the peak value and the pedestal value of the reference waveform.

実施例3は、最小となる値を、実施例1の値を基準波形
の波高値とペデスタル値の差の2乗で徐した値とする。
In the third embodiment, the minimum value is the value obtained by dividing the value in the first embodiment by the square of the difference between the peak value and the pedestal value of the reference waveform.

実施例4は、最小となる値を、実施例1の誤差の絶対値
の積分値とする。
In the fourth embodiment, the minimum value is the integral value of the absolute value of the error in the first embodiment.

実施例5は、最小となる値を、実施例1の誤差の絶対値
の積分値を基準波形の波高値とペデスタル値の差で除し
た値とする。
In the fifth embodiment, the minimum value is the value obtained by dividing the integral value of the absolute value of the error in the first embodiment by the difference between the peak value of the reference waveform and the pedestal value.

本例では、実施例2に提示した演算方法を適用し、誤差
の2乗の積分値を基準波形5の波高値とペデスタル値の
差(b−a)で割った値(演算結果6)が、基準波形5
の波高値すとペデスタル値aの差(b−a)が予め定め
られた閾値よりも大きい範囲内で、最小となる位置をも
って文字行位置とすることとし検出を行った。
In this example, the calculation method presented in Example 2 is applied, and the value (calculation result 6) obtained by dividing the integral value of the square of the error by the difference (ba) between the peak value and pedestal value of reference waveform 5 is calculated. , reference waveform 5
Within a range where the difference (b-a) between the peak value and the pedestal value a is larger than a predetermined threshold value, the position where the minimum value is determined as the character line position was detected.

これは、射影波形の波高値自体を考慮に入れることであ
り、文字行部分は少なくともノイズ以外の背景部分より
濃度レベルが高く、射影波形が矩形状に突出していると
いう既知の情報を用いて、そのような部分で演算結果6
が小さくなるようにしたものである。これによって、射
影波形が平坦なために演算結果6が小さくなった部分を
文字行位置とするのを防ぐ効果をさらに高めることがで
きる。
This is done by taking into account the peak value itself of the projected waveform, and using the known information that the text line part has a higher density level than the background part other than noise, and that the projected waveform protrudes into a rectangular shape. In such a part, the calculation result 6
is made smaller. This can further enhance the effect of preventing a character line position from being set in a portion where the calculation result 6 is small because the projected waveform is flat.

演算結果6を第6図に示す。hで示した部分は、基準波
形5の文字行部分の値すとペデスタル部分の値aの差が
予め定められた閾値よりも小さくなった部分であり、文
字行の候補領域からは除外される部分である。
Calculation result 6 is shown in FIG. The part indicated by h is a part where the difference between the value a of the character line part of the reference waveform 5 and the value a of the pedestal part is smaller than a predetermined threshold, and is excluded from the character line candidate area. It is a part.

第6図の演算結果6が最小となった位置が、本発明によ
って検出した文字行の開始位置であり、非常にノイズレ
ベルの高い画像から、文字行が正確に切出されているこ
゛とが示されている。
The position where the calculation result 6 in Fig. 6 is the minimum is the starting position of the character line detected by the present invention, which shows that the character line has been accurately cut out from the image with a very high noise level. has been done.

実施例1は、実施例2のような規格化を行わず、誤差の
2乗積分値をそのまま評価値としたもので、射影波形を
形だけで評価し、値自体は全く考慮しないことに相当す
るものである。
Example 1 does not perform standardization as in Example 2, and instead uses the square integral value of the error as the evaluation value, which corresponds to evaluating the projected waveform only based on its shape and not considering the value itself at all. It is something to do.

実施例3は、実施例2よりもさらに射影波形の値を重視
し、基準波形の文字行部分の値とペデスタル部分の値の
差が小さくなるほど、評価値が小さくなるようにしたも
のである。実施例1は、非常にノイズレベルが高い場合
に、実施例3は、ノイズレベルがそれほど高くない場合
に、と適宜使い分けることができる。
In the third embodiment, more emphasis is placed on the value of the projected waveform than in the second embodiment, and the evaluation value becomes smaller as the difference between the value of the character line portion and the value of the pedestal portion of the reference waveform becomes smaller. The first embodiment can be used when the noise level is very high, and the third embodiment can be used when the noise level is not so high.

実施例4は、誤差の2乗積分でなく、誤差の絶対値の積
分値を用いたもの、実施例5は誤差の絶対値の積分値を
基準波形の文字行部分の値とペデスタル部分の値の差で
割って規格化したものであり、実施例1.3とほぼ同様
に用いることができる。
In Example 4, the integral value of the absolute value of the error is used instead of the square integral of the error, and in the fifth embodiment, the integral value of the absolute value of the error is used as the value of the character line part and the value of the pedestal part of the reference waveform. It is normalized by dividing by the difference in , and can be used in almost the same way as in Example 1.3.

第7図は本発明装置の一実施例の系統図を示した。これ
は、第8図に示す従来装置の文字行切出し部9を改良し
たものであり、第7図の9aに示すように、射影波形形
成部、基準波形設定部、基準波形演算部及び比較演算部
から構成されているが、何れもICの組合せで形成され
るものである。
FIG. 7 shows a system diagram of an embodiment of the device of the present invention. This is an improved version of the character line cutting section 9 of the conventional device shown in FIG. 8, and as shown in 9a of FIG. Each of them is formed by a combination of ICs.

画像入力部7には、CCDカメラ、スキャナ等、公知の
種々の画像入力装置を用いることができ、入力された画
像は画像メモリ8に記憶される。文字切出し部lOは切
出された文字行から。
Various known image input devices such as a CCD camera and a scanner can be used as the image input section 7, and the input image is stored in the image memory 8. The character cutting part lO is from the cut out character line.

文字を一つずつ切出す部分であり、本発明による文字行
の位置検出により、ノイズは完全に除去されているので
、公知の切出し手段、例えば、切出した文字行部分の画
像を文字行と垂直方向に加算し、文字行と水平な軸に投
射して得た射影値と閾値を比較することにより文字切出
しを行うことができる0文字認識部11には、公知の種
々の認識手段、例えば、パターン・マツチング、ニュー
ラル・ネットワーク等の中から、認識対象文字の字体な
どを考慮して選択することができる。結果表示及び出力
部12は、認識結果の表示及び記録、マーキングが正常
に行われなかった場合の警報発生、上位計算機への結′
果伝送などの処理を行う部分である。
This is the part where characters are cut out one by one, and noise is completely removed by detecting the position of the character line according to the present invention. The 0 character recognition unit 11, which can perform character extraction by comparing a projection value obtained by adding in the direction and projecting it onto an axis horizontal to the character line, with a threshold value, includes various known recognition means, for example, It is possible to select from among pattern matching, neural network, etc., taking into consideration the font of the characters to be recognized. The result display and output unit 12 displays and records recognition results, generates an alarm when marking is not performed normally, and outputs results to the host computer.
This is the part that performs processing such as data transmission.

【発明の効果] 本発明は、切出しの対象となる文字列あるいは文字行と
同程度あるいはそれ以上のレベルのノイズがある場合、
また、文字と背景のコントラストが低い場合でも、文字
列あるいは文字行とノイズを適切に区別して正確な切出
しを行うことができるので、文字認識技術に極めて優れ
た効果を奏する。
[Effects of the Invention] The present invention has the advantage that when there is noise at a level equal to or higher than the character string or character line to be extracted,
Furthermore, even when the contrast between characters and the background is low, it is possible to appropriately distinguish character strings or lines from noise and perform accurate extraction, resulting in extremely excellent effects on character recognition technology.

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

第1図は、本発明方法の説明図、第2図は第1図の要旨
を示すフローチャート、第3図〜第6図はスラブ端面に
マーキングされた文字についての実施例の説明図であり
、第3図は認識対象文字及び背景、第4図は第3図の射
影波形、第5図は第3図の基準波形、第6図は所定の演
算から文字位置の決定図、第7図は本発明の文字認識装
置の一実施例の系統図、第8図は従来例の文字認識装置
の系統図、第9図〜第1O図は従来の文字位置検出方法
の説明図である。 1−m−文字行 2・・−射影波形(射影値) 3−ノイズ 4・−基準波形 5・・−基準波形(数値化された) 6−・・演算結果 7−・・画像入力部 8−・・画像メモリ 9.9a−・−文字行切出し部 10・・・文字切出し部 11・−文字認識部 12・・・結果表示及び出力部 Ll、L3−・−ペデスタル部分 L2  −パルス部分 第3図 第4図
Fig. 1 is an explanatory diagram of the method of the present invention, Fig. 2 is a flowchart showing the gist of Fig. 1, and Figs. Figure 3 shows the characters and background to be recognized, Figure 4 shows the projected waveform of Figure 3, Figure 5 shows the reference waveform of Figure 3, Figure 6 shows how character positions are determined from predetermined calculations, and Figure 7 shows the projected waveform of Figure 3. FIG. 8 is a system diagram of an embodiment of the character recognition device of the present invention, FIG. 8 is a system diagram of a conventional character recognition device, and FIGS. 9 to 1O are explanatory diagrams of a conventional character position detection method. 1-m-Character line 2...-Projected waveform (projection value) 3-Noise 4--Reference waveform 5...-Reference waveform (digitized) 6--Computation result 7--Image input section 8 --- Image memory 9.9a --- Character line cutting section 10 --- Character cutting section 11 --- Character recognition section 12 --- Result display and output section Ll, L3 --- Pedestal portion L2 --- Pulse portion No. Figure 3 Figure 4

Claims (1)

【特許請求の範囲】 1 認識対象文字を含む画像から、認識対象文字を含む
文字列あるいは文字行の位置を検出するにあたり、文字
列あるいは文字行と平行に画像の濃度を加算して文字列
あるいは文字行に垂直な方向への射影波形を求め、該文
字列あるいは文字行の幅および背景部から該文字列ある
いは文字行の幅に相当するパルスと該パルスの両側に所
定の長さのペデスタル部分を持つ基準波形を設定し、該
基準波形を該射影波形に添って移動させて所定の周期で
該射影波形と比較し、該基準波形のペデスタル部分に対
応する該射影波形部分の平均値及び該基準波形のパルス
幅部分に対応する該射影波形部分の平均値を演算してそ
れぞれ該基準波形のペデスタル値及び波高値を求めると
共に、該基準波形の波高値とペデスタル値との差が予め
定められた閾値よりも大きい範囲において、該演算され
た基準波形と該射影波形の誤差の2乗の積分値を求め、 該積分値が最小となる位置を該文字列あるいは文字行の
位置とすることを特徴とする文字列あるいは文字行の位
置検出方法。 2 前記最小となる値が、前記誤差の2乗の積分値を前
記基準波形の波高値とペデスタル値の差で除した値であ
る請求項1記載の文字列あるいは文字行の位置検出方法
。 3 前記最小となる値が、前記誤差の2乗の積分値を前
記基準波形の波高値とペデスタル値の差の2乗で除した
値である請求項1記載の文字列あるいは文字行の位置検
出方法。 4 前記最小となる値が、前記誤差の絶対値の積分値で
ある請求項1記載の文字列あるいは文字行の位置検出方
法。 5 前記最小となる値が、前記誤差の絶対値の積分値を
前記基準波形の波高値とペデスタル値の差で除した値で
ある請求項1記載の文字列あるいは文字行の位置検出方
法。 6 認識対象文字を含む画像を入力する画像入力部と、
前記画像入力部で入力した画像から認識対象文字を含む
文字列あるいは文字行を切出す文字列あるいは文字行切
出し部と、前記文字列あるいは文字行切出し部で切出し
た文字列あるいは文字行の画像から認識対象文字を切出
す文字切出し部と、前記文字切出し部で切出した認識対
象文字を認識する文字認識部とからなる文字認識装置に
おいて、前記文字列あるいは文字行切出し部は、 該文字列あるいは文字行と平行に画像の濃度を加算して
得られた該文字列あるいは文字行に垂直な方向への射影
波形を求める射影波形形成部と、 該文字列あるいは文字行の幅および背景から該文字列あ
るいは文字行の幅に相当するパルスと該パルスの両側に
所定の長さのペデスタル部分を持つ基準波形を設定する
基準波形設定部と、 該基準波形を該射影波形に添って移動させて所定の周期
で該射影波形と比較して該ペデスタル部分に対応する該
射影波形部分の平均値及び該基準波形のパルス幅部分に
対応する該射影波形部分の平均値からそれぞれ該基準波
形のペデスタル値及び波高値を演算する基準波形演算部
と、 該演算された基準波形と該射影波形を比較して該基準波
形と該射影波形の誤差について所定の演算を行いその最
小値を検出する比較演算部とからなることを特徴とする
文字認識装置。
[Claims] 1. In detecting the position of a character string or character line containing the recognition target character from an image containing the recognition target character, the density of the image is added in parallel to the character string or character line to detect the character string or character line. A projected waveform in the direction perpendicular to the character line is obtained, and a pulse corresponding to the width of the character string or character line and a pedestal portion of a predetermined length on both sides of the pulse are obtained from the width of the character string or character line and the background part. Set a reference waveform with The average value of the projected waveform portion corresponding to the pulse width portion of the reference waveform is calculated to obtain the pedestal value and the peak value of the reference waveform, respectively, and the difference between the peak value and the pedestal value of the reference waveform is determined in advance. Find the integral value of the square of the error between the calculated reference waveform and the projected waveform in a range larger than the calculated threshold, and set the position where the integral value is the minimum as the position of the character string or character line. A method for detecting the position of a character string or line of characters. 2. The method for detecting the position of a character string or character line according to claim 1, wherein the minimum value is a value obtained by dividing the integral value of the square of the error by the difference between the peak value and the pedestal value of the reference waveform. 3. The position detection of a character string or character line according to claim 1, wherein the minimum value is a value obtained by dividing the integral value of the square of the error by the square of the difference between the peak value of the reference waveform and the pedestal value. Method. 4. The method for detecting the position of a character string or character line according to claim 1, wherein the minimum value is an integral value of the absolute value of the error. 5. The method for detecting the position of a character string or character line according to claim 1, wherein the minimum value is a value obtained by dividing the integral value of the absolute value of the error by the difference between the peak value and the pedestal value of the reference waveform. 6 an image input unit for inputting an image including characters to be recognized;
a character string or character line cutting section that cuts out a character string or character line containing a character to be recognized from the image input by the image input section; and an image of the character string or character line cut out by the character string or character line cutting section. In a character recognition device comprising a character cutting section that cuts out a character to be recognized, and a character recognition section that recognizes the character to be recognized cut out by the character cutting section, the character string or character line cutting section cuts out the character string or character. a projected waveform forming unit that calculates a projected waveform in a direction perpendicular to the character string or character line obtained by adding the density of the image parallel to the line; Alternatively, a reference waveform setting section that sets a reference waveform having a pulse corresponding to the width of a character line and a pedestal portion of a predetermined length on both sides of the pulse, and a reference waveform setting section that moves the reference waveform along the projected waveform to obtain a predetermined value. The pedestal value and waveform of the reference waveform are determined from the average value of the projected waveform portion corresponding to the pedestal portion and the average value of the projected waveform portion corresponding to the pulse width portion of the reference waveform by comparing the projected waveform with the period. a reference waveform calculation unit that calculates a high value; and a comparison calculation unit that compares the calculated reference waveform and the projected waveform, performs a predetermined calculation on the error between the reference waveform and the projected waveform, and detects the minimum value. A character recognition device characterized by:
JP2060065A 1990-03-13 1990-03-13 Method for detecting position of character string or character line and character recognizing device Pending JPH03262087A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2060065A JPH03262087A (en) 1990-03-13 1990-03-13 Method for detecting position of character string or character line and character recognizing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2060065A JPH03262087A (en) 1990-03-13 1990-03-13 Method for detecting position of character string or character line and character recognizing device

Publications (1)

Publication Number Publication Date
JPH03262087A true JPH03262087A (en) 1991-11-21

Family

ID=13131312

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2060065A Pending JPH03262087A (en) 1990-03-13 1990-03-13 Method for detecting position of character string or character line and character recognizing device

Country Status (1)

Country Link
JP (1) JPH03262087A (en)

Similar Documents

Publication Publication Date Title
JP3943638B2 (en) Automatic recognition method of drop word in document image without using OCR
JP2020527260A (en) Text detection analysis methods, devices and devices
JP4232800B2 (en) Line noise elimination device, line noise elimination method, line noise elimination program
JPH09179937A (en) Method for automatically discriminating boundary of sentence in document picture
JP2005523530A (en) System and method for identifying and extracting character string from captured image data
JP2002133426A (en) Ruled line extracting device for extracting ruled line from multiple image
KR102181861B1 (en) System and method for detecting and recognizing license plate
JPH081663B2 (en) Method, vision system, and robot vision system for finding optically recognizable characters encoded on a label
US7146047B2 (en) Image processing apparatus and method generating binary image from a multilevel image
CN115082942A (en) Document image flow chart identification method, device and medium based on YOLO v5
Choi et al. Localizing slab identification numbers in factory scene images
JP2006155126A (en) Vehicle number recognition device
JPH03262087A (en) Method for detecting position of character string or character line and character recognizing device
JP4867894B2 (en) Image recognition apparatus, image recognition method, and program
Tai et al. Braille document parameters estimation for optical character recognition
JPH0388085A (en) Optical character reader
Kasar Recognition of Seven-Segment Displays from Images of Digital Energy Meters
WO2009097125A1 (en) Recognition of scanned optical marks for scoring student assessment forms
JP2002366900A (en) Optical character reader
JP3190794B2 (en) Character segmentation device
JP3000480B2 (en) Character area break detection method
Satter et al. Color Independent Word Segmentation From Transcribed Bangla Passages
JPH11250256A (en) Graphic recognizing/processing method, and record medium recorded with the program
JP2925270B2 (en) Character reader
JP3662967B2 (en) Character loop candidate extraction device and character completion device