JPH0830731A - Method and device for character string confirmation - Google Patents

Method and device for character string confirmation

Info

Publication number
JPH0830731A
JPH0830731A JP6164073A JP16407394A JPH0830731A JP H0830731 A JPH0830731 A JP H0830731A JP 6164073 A JP6164073 A JP 6164073A JP 16407394 A JP16407394 A JP 16407394A JP H0830731 A JPH0830731 A JP H0830731A
Authority
JP
Japan
Prior art keywords
character
template image
preset
correlation value
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
JP6164073A
Other languages
Japanese (ja)
Inventor
Yuzuru Betto
譲 別當
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.)
Daikin Industries Ltd
Original Assignee
Daikin Industries 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 Daikin Industries Ltd filed Critical Daikin Industries Ltd
Priority to JP6164073A priority Critical patent/JPH0830731A/en
Publication of JPH0830731A publication Critical patent/JPH0830731A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shorten the required time of character string confirmation and to improve the accuracy of the character string confirmation. CONSTITUTION:By scanning the preset area of a work surface corresponding to the read rule of a character string and obtaining correlation with the template pictures of preset characters, the position of a leading character is detected and which one of the preset characters is the leading character is confirmed. By scanning a partial area determined based on the relative position of the other character to the position of the leading character and the position of the leading character and obtaining the correlation with the template pictures of the preset characters, the position of the other character is obtained and which one of the preset characters is the other character is confirmed. Until all the characters for constituting the character string are confirmed, scanning within the partial area and the acquisition of the correlation with the template pictures of the preset characters are performed and the acquisition of the position of the other character and the confirmation on which one of the preset characters is the other character are repeated.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は文字列確認方法および
その装置に関し、さらに詳細にいえば、ワークに施され
ている文字列(刻印文字列など)を検査などのために確
認する場合に好適な文字列確認方法およびその装置に関
する。なお、この明細書において、「文字列」とは、ひ
らがな、漢字、英字、数字、記号などで構成されるもの
を示す用語として使用され、また、「文字」とは、ひら
がな、漢字、英字、数字、記号などを示す用語として使
用される。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a character string confirmation method and apparatus, and more specifically, it is suitable for confirming a character string (marked character string, etc.) applied to a work for inspection. Character string confirmation method and its device. In this specification, "character string" is used as a term indicating a character composed of hiragana, kanji, letters, numbers, symbols, etc., and "character" means hiragana, kanji, letters, It is used as a term that indicates numbers, symbols, etc.

【0002】[0002]

【従来の技術】従来から、ワークなどに施された文字列
を確認するための方法は殆ど提案されていなかった。と
ころで、ワークなどの検査を正確に行なうためには、刻
印などにより施された文字列を確認することが必要にな
る。この要請に応えるために、従来から各種の分野で適
用されているパターン認識の手法を採用することが考え
られる。この手法を採用すれば、文字列もパターンの一
種であるから、文字列の確認を達成することができる。
2. Description of the Related Art Hitherto, almost no method has been proposed for confirming a character string applied to a work or the like. By the way, in order to accurately inspect a work or the like, it is necessary to confirm a character string provided by engraving or the like. In order to meet this demand, it is conceivable to adopt a pattern recognition method that has been conventionally applied in various fields. If this method is adopted, since the character string is also a kind of pattern, the confirmation of the character string can be achieved.

【0003】[0003]

【発明が解決しようとする課題】しかし、上述のように
パターン認識の手法を採用した場合には、ワーク間にお
いて文字列の品質にかなりのばらつきがあるだけでな
く、文字列の位置にもかなりのばらつきがあるので、確
認対象となる文字列が文字列のテンプレート画像と一致
しない可能性が高い。このような点を考慮して、文字列
を確認するためには正規相関法を採用することになり、
しかもワークの全範囲を検索対象領域とすることにな
り、所要時間が著しく長くなってしまう。
However, when the pattern recognition method is adopted as described above, not only does the quality of the character string vary considerably among the works, but also the position of the character string considerably. , There is a high possibility that the character string to be confirmed does not match the template image of the character string. Considering such a point, the normal correlation method will be adopted to confirm the character string.
Moreover, since the entire range of the work is set as the search target area, the required time becomes extremely long.

【0004】また、文字列のテンプレート画像は、文字
数が多くなればテンプレート画像自体も大きくなるの
で、相関値を算出するための所要時間が長くなり、所要
時間が一層長くなってしまう。さらに、文字列を構成す
る文字数が多くなれば、例えば、1つの文字のみがテン
プレート画像の該当画像と異なっていても、かなり高い
相関値が得られてしまい、誤確認を生じ易くなってしま
う。
Further, the template image of the character string has a large size as the number of characters increases, so that the time required for calculating the correlation value becomes long, and the time required becomes even longer. Furthermore, if the number of characters forming the character string is large, for example, even if only one character is different from the corresponding image of the template image, a considerably high correlation value is obtained, and erroneous confirmation is likely to occur.

【0005】このような不都合を解消しようとすれば、
文字ごとにテンプレート画像を準備しておき、全てのテ
ンプレート画像に基づいて上記の一連の処理を行わなけ
ればならないので、所要時間が一層長くなってしまう。
また、文字としての確認を行うことはできるが、文字列
としての確認を行うことはできない。もちろん、縦読
み、横読みの文字列の確認、複数行にわたる文字列の確
認などを行なうこともできない。
In order to eliminate such inconvenience,
Since a template image must be prepared for each character and the series of processes described above must be performed based on all the template images, the required time becomes even longer.
Also, although it is possible to confirm as a character, it is not possible to confirm as a character string. Of course, it is not possible to confirm a vertically read character string, a horizontally read character string, or a character string extending over a plurality of lines.

【0006】[0006]

【発明の目的】この発明は上記の問題点に鑑みてなされ
たものであり、文字列の確認を正確に達成することがで
きるとともに、所要時間を大幅に短縮することができる
新規な文字列確認方法およびその装置を提供することを
目的としている。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and a novel character string confirmation capable of accurately achieving confirmation of a character string and drastically reducing the time required. It is an object to provide a method and an apparatus thereof.

【0007】[0007]

【課題を解決するための手段】請求項1の文字列確認方
法は、文字列の読み規則にしたがってワーク表面の予め
設定された領域内を走査するとともに、予め設定されて
いる文字のテンプレート画像との相関をとることによ
り、先頭文字の位置を検出するとともに、先頭文字が予
め設定されている文字の何れであるかを確認し、予め設
定されている、先頭文字の位置に対する他の文字の相対
位置と上記先頭文字の位置とに基づいて定まる部分領域
内を走査するとともに、予め設定されている文字のテン
プレート画像との相関をとることにより、該他の文字の
位置を得るとともに、該他の文字が予め設定されている
文字の何れであるかを確認し、文字列を構成する全ての
文字が確認されるまで、上記部分領域内の走査および予
め設定されている文字のテンプレート画像との相関獲得
を行い、他の文字の位置獲得および他の文字が予め設定
されている文字の何れかであるかの確認を反復する方法
である。
According to a character string confirmation method of a first aspect, a predetermined area of a work surface is scanned in accordance with a character string reading rule, and a template image of a preset character is used. By detecting the position of the first character by checking the correlation of the first character, it is confirmed which of the preset characters the first character is, and the relative position of other characters to the preset position of the first character. While scanning the partial area determined based on the position and the position of the first character, and by correlating with the template image of the character set in advance, the position of the other character is obtained and It is confirmed whether the character is a preset character, and scanning and preset text in the partial area until all the characters that make up the character string are confirmed. Performs correlation acquisition of the template image, the position acquisition and other characters of the other character is a method for repeating the confirmation of whether any of the characters that are set in advance.

【0008】請求項2の文字列確認装置は、予め設定さ
れている文字のテンプレート画像を保持するテンプレー
ト画像保持手段と、先頭文字の位置に対する他の文字の
相対位置を保持する相対位置保持手段と、文字列の読み
規則にしたがってワーク表面の予め設定された領域内を
走査する第1走査手段と、第1走査手段により得られる
走査結果と予め設定されている文字のテンプレート画像
との相関をとる第1相関手段と、上記テンプレート画像
に対する先頭文字の相関値が最大になる位置を先頭文字
の位置として検出する第1文字位置検出手段と、検出さ
れた先頭文字の位置および上記相対位置に基づいて他の
文字のために走査を行うべき部分領域を設定する部分領
域設定手段と、設定された部分領域を走査する第2走査
手段と、第2走査手段により得られる走査結果と予め設
定されている文字のテンプレート画像との相関をとる第
2相関手段と、上記テンプレート画像に対する他の文字
の相関値が最大になる位置を該他の文字の位置として検
出する第2文字位置検出手段と、上記先頭文字または他
の文字の相関値が最大になるテンプレート画像が先頭文
字または他の文字であることを確認する文字確認手段
と、文字列を構成する全ての文字が確認されるまで、上
記部分領域設定手段、第2走査手段、第2相関手段、第
2文字位置検出手段および文字確認手段を反復動作させ
る制御手段とを有している。
According to a second aspect of the present invention, there is provided a character string confirmation device which includes a template image holding means for holding a template image of a preset character and a relative position holding means for holding a relative position of another character with respect to the position of the leading character. , Correlating the scanning result obtained by the first scanning means with the scanning image obtained by the first scanning means and the preset template image of the character according to the reading rule of the character string. Based on the first correlation means, the first character position detection means for detecting the position where the correlation value of the first character with respect to the template image is maximum as the position of the first character, and the detected position of the first character and the relative position. Partial area setting means for setting a partial area to be scanned for another character, second scanning means for scanning the set partial area, and second scanning Second correlating means for correlating the scanning result obtained by the step with the preset template image of the character, and the position where the correlation value of the other character with respect to the template image is the maximum, as the position of the other character. Second character position detecting means for detecting, character confirming means for confirming that the template image having the maximum correlation value between the first character and other characters is the first character or another character, and all of the character strings constituting the character string. Until the character is confirmed, it has the partial area setting means, the second scanning means, the second correlating means, the second character position detecting means, and the control means for repeatedly operating the character confirming means.

【0009】請求項3の文字列確認方法は、予め設定さ
れている文字のテンプレート画像が文字の属性により区
分されてあり、文字確認のための相関をとるに当って、
確認対象文字の属性が予め設定されていることに応答し
て、該当する区分に属する文字のテンプレート画像との
相関をとる方法である。請求項4の文字列確認方法は、
文字を確認するために、確認対象となる文字と、該当す
る全ての文字のテンプレート画像との相関値を算出し
て、確認対象となる文字に対する各テンプレート画像の
順位付けを施す方法である。
According to the character string confirmation method of claim 3, the preset template image of the character is divided by the attribute of the character, and the correlation for character confirmation is obtained by
This is a method of correlating with the template image of the character belonging to the corresponding section in response to the attribute of the character to be confirmed being preset. The character string confirmation method of claim 4 is
In order to confirm the character, the correlation value between the character to be confirmed and the template images of all the corresponding characters is calculated, and the template images are ranked with respect to the character to be confirmed.

【0010】請求項5の文字列確認方法は、順位付けに
したがってテンプレート画像を順次選択し、各テンプレ
ート画像が選択された状態において、テンプレート画像
と等しいサイズの小領域を複数の方向に所定量だけシフ
トさせてテンプレート画像との相関値を算出し、シフト
前の小領域の相関値よりも高い相関値を有する小領域の
有無を判別し、シフト前の小領域の相関値よりも高い相
関値を有する小領域がある場合には、該当する小領域を
基準として再び上記相関値の算出および有無の判別を行
ない、シフト前の小領域の相関値よりも高い相関値を有
する小領域がない場合には、シフト前の小領域の相関値
が所定のしきい値より大きいか否かを判別し、シフト前
の小領域の相関値が所定のしきい値よりも小さい場合に
は、次の順位のテンプレート画像を選択して上記一連の
処理を行い、シフト前の小領域の相関値が所定のしきい
値よりも大きい場合には、該当する小領域を確認対象と
なる文字の小領域として採用する方法である。
According to a fifth aspect of the character string confirmation method, template images are sequentially selected according to the ranking, and in the state where each template image is selected, a small area having the same size as the template image is provided in a plurality of directions by a predetermined amount. Calculate the correlation value with the template image by shifting, determine the presence or absence of a small area having a higher correlation value than the small area before the shift, the correlation value higher than the correlation value of the small area before the shift If there is a small area having the same, the above-mentioned correlation value is again calculated and the presence / absence of the small area is determined with reference to the corresponding small area. Determines whether or not the correlation value of the small area before the shift is larger than a predetermined threshold value. If the correlation value of the small area before the shift is smaller than the predetermined threshold value, Te If a plate image is selected and the above series of processing is performed, and the correlation value of the small area before shifting is larger than a predetermined threshold value, the corresponding small area is adopted as the small area of the character to be confirmed. Is the way.

【0011】請求項6の文字列確認方法は、文字列を構
成する少なくとも2つの文字の位置が得られたことに応
答して文字列の傾きを算出し、先頭文字の位置に対する
他の文字の相対位置を算出された傾きで補正する方法で
ある。
According to the character string confirmation method of claim 6, the inclination of the character string is calculated in response to the positions of at least two characters forming the character string being obtained, and the inclination of the character string is calculated with respect to the position of the first character. This is a method of correcting the relative position with the calculated inclination.

【0012】[0012]

【作用】請求項1の文字列確認方法であれば、文字列の
読み規則にしたがって走査を行う関係上、先頭文字を確
認するための検索範囲をかなり狭くすることができ、他
の文字に関しては相対位置が予め設定されている関係
上、検索範囲を十分に狭くすることができ、この結果、
文字列確認のための所要時間を大幅に短縮することがで
きる。また、文字毎に確認を行うのであるが、上述のよ
うに相対位置が予め設定されているのであるから、縦読
み、横読みの文字列、複数行、列にわたる文字列などを
正確に確認することができる。
According to the character string confirmation method of claim 1, since the scanning is performed in accordance with the reading rules of the character string, the search range for confirming the first character can be considerably narrowed. Since the relative position is preset, the search range can be narrowed sufficiently, and as a result,
The time required for checking the character string can be greatly reduced. In addition, although the confirmation is performed for each character, since the relative position is set in advance as described above, it is possible to accurately confirm the vertical reading, horizontal reading character strings, character strings spanning multiple rows, columns, and the like. be able to.

【0013】請求項2の文字列確認装置であれば、文字
列の読み規則にしたがって走査を行う関係上、先頭文字
を確認するための検索範囲をかなり狭くすることがで
き、他の文字に関しては相対位置が予め設定されている
関係上、検索範囲を十分に狭くすることができ、この結
果、文字列確認のための所要時間を大幅に短縮すること
ができる。また、文字毎に確認を行うのであるが、上述
のように相対位置が予め設定されているのであるから、
縦読み、横読みの文字列、複数行、列にわたる文字列な
どを正確に確認することができる。
According to the character string confirmation apparatus of claim 2, since the scanning is performed in accordance with the reading rules of the character string, the search range for confirming the first character can be considerably narrowed, and other characters can be searched. Since the relative position is preset, the search range can be sufficiently narrowed, and as a result, the time required for character string confirmation can be significantly shortened. Also, although confirmation is performed for each character, since the relative position is preset as described above,
You can accurately check vertical reading, horizontal reading character strings, character strings across multiple rows, and columns.

【0014】請求項3の文字列確認方法であれば、予め
設定されている文字のテンプレート画像が文字の属性に
より区分されてあり、文字確認のための相関をとるに当
って、確認対象文字の属性が予め設定されていることに
応答して、該当する区分に属する文字のテンプレート画
像との相関をとるのであるから、各文字毎に相関をとる
べきテンプレート画像の数を少なくすることができ、文
字列確認のための所要時間を一層短縮することができ
る。
According to the character string confirmation method of claim 3, the preset template image of the character is divided according to the attribute of the character, and when the correlation for character confirmation is taken, the confirmation target character In response to the attribute being preset, the number of template images that should be correlated for each character can be reduced because it correlates with the template image of the character belonging to the corresponding section. The time required for character string confirmation can be further shortened.

【0015】請求項4の文字列確認方法であれば、文字
を確認するために、確認対象となる文字と、該当する全
ての文字のテンプレート画像との相関値を算出して、確
認対象となる文字に対する各テンプレート画像の順位付
けを施すのであるから、蓋然性が高いテンプレート画像
に基づく確認処理を優先的に行うことができ、文字列確
認のための所要時間をより短縮することができる。
According to the character string confirmation method of claim 4, in order to confirm the character, the correlation value between the character to be confirmed and the template images of all the corresponding characters is calculated and the character is confirmed. Since the template images are ranked with respect to the characters, the confirmation process based on the template image with high probability can be preferentially performed, and the time required for confirming the character string can be further shortened.

【0016】請求項5の文字列確認方法であれば、順位
付けにしたがってテンプレート画像を順次選択した各テ
ンプレート画像に対して、テンプレート画像と等しいサ
イズの小領域を複数の方向に所定量だけシフトさせてテ
ンプレート画像との相関値が最も大きい小領域を得、最
終的に、相関値が最も高く、かつ所定のしきい値よりも
大きい小領域を確認対象となる文字の小領域として採用
することができ、文字列確認の正確性を高めることがで
きるとともに、文字列確認のための所要時間を短縮する
ことができる。
According to the character string confirmation method of claim 5, for each template image in which the template images are sequentially selected according to the ranking, a small area having the same size as the template image is shifted in a plurality of directions by a predetermined amount. A small area having the highest correlation value with the template image can be obtained, and finally, the small area having the highest correlation value and larger than a predetermined threshold can be adopted as the small area of the character to be confirmed. Therefore, the accuracy of character string confirmation can be improved, and the time required for character string confirmation can be shortened.

【0017】請求項6の文字列確認方法であれば、文字
列を構成する少なくとも2つの文字の位置が得られたこ
とに応答して文字列の傾きを算出し、先頭文字の位置に
対する他の文字の相対位置を算出された傾きで補正する
のであるから、他の文字を確認するための領域を比較的
正確に設定することができ、ひいては、文字列確認のた
めの所要時間を短縮でき、また、誤確認を防止できる。
According to the character string confirmation method of the sixth aspect, the inclination of the character string is calculated in response to the position of at least two characters forming the character string being obtained, and the other inclination is calculated with respect to the position of the first character. Since the relative position of the character is corrected with the calculated inclination, the area for confirming other characters can be set relatively accurately, and the time required for confirming the character string can be shortened. In addition, it is possible to prevent erroneous confirmation.

【0018】[0018]

【実施例】以下、実施例を示す添付図面によってこの発
明を詳細に説明する。図1はこの発明の文字列確認方法
の一実施例を説明するフローチャートである。ステップ
SP1において、予め設定されている文字のテンプレー
ト画像との正規相関をとることにより文字列の先頭文字
を確認するとともに、先頭文字の位置を決定し、ステッ
プSP2において、先頭文字の位置と、先頭文字に対す
る他の文字の相対位置とに基づいて次の文字の位置を算
出し、ステップSP3において、算出された位置を基準
として予め設定されている文字のテンプレート画像との
正規相関をとることにより次の文字を確認し、ステップ
SP4において正規相関値が最大になる領域の位置を正
確な位置として採用し、ステップSP5において次の文
字が存在するか否かを判別し、次の文字が存在する場合
には、再びステップSP2の処理を行う。逆に、次の文
字が存在しない場合には、そのまま一連の処理を終了す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail below with reference to the accompanying drawings showing embodiments. FIG. 1 is a flow chart for explaining an embodiment of the character string confirmation method of the present invention. In step SP1, the leading character of the character string is confirmed by taking a normal correlation with the template image of the preset character, and the position of the leading character is determined. In step SP2, the position of the leading character and the leading character The position of the next character is calculated based on the relative position of the other character with respect to the character, and in step SP3, the next position is calculated by taking a normal correlation with the template image of the character set in advance based on the calculated position. If the next character exists, the position of the area where the normal correlation value becomes maximum is adopted as the accurate position in step SP4, and it is determined whether or not the next character exists in step SP5. For that, the process of step SP2 is performed again. On the contrary, if the next character does not exist, the series of processing is terminated.

【0019】さらに詳細に説明する。確認対象となる文
字列が縦読みか、横読みかが予め定められているのであ
るから、例えば、縦読みの場合には、検索対象領域の全
範囲を上下に複数の領域に分割し(図2中A参照)、最
も上の分割領域から順に、予め設定されているテンプレ
ート画像との正規相関をとり、最大の正規相関値が得ら
れ、かつこの正規相関値が所定のしきい値よりも大きい
場合に、先頭文字の確認結果として得るとともに、該当
する小領域(テンプレート画像と等しいサイズの領域)
を先頭文字領域として得る。また、横読みの場合には、
検索対象領域の全範囲を左右に複数の領域に分割し(図
2中B参照)、最も左の分割領域から順に、予め設定さ
れているテンプレート画像との正規相関をとり、最大の
正規相関値が得られ、かつこの正規相関値が所定のしき
い値よりも大きい場合に、先頭文字の確認結果として得
るとともに、該当する小領域を先頭文字領域として得
る。尚、図2中Aにおける分割領域内での検索は左側か
ら順に行うことが好ましく、図2中Bにおける分割領域
内での検索は上側から順に行うことが好ましく、複数
行、列にわたる文字列の先頭文字を確実に確認すること
ができる。また、上記の検索は、小領域を単位として順
次行われるのであり、順次検索が行われる小領域どうし
は、互いに所定量だけ所定方向にずれている。
A more detailed description will be given. Since it is predetermined whether the character string to be checked is vertical reading or horizontal reading, for example, in the case of vertical reading, the entire range of the search target area is divided into upper and lower areas (Fig. 2 (A in 2), the highest normal correlation value is obtained in order from the uppermost divided area, with the preset template image, and this normal correlation value is higher than the predetermined threshold value. If it is large, it will be obtained as the confirmation result of the first character and the corresponding small area (area of the same size as the template image)
As the first character area. Also, in the case of horizontal reading,
The entire range of the search target area is divided into a plurality of areas on the left and right (see B in FIG. 2), and a normal correlation with a preset template image is obtained in order from the leftmost divided area to obtain the maximum normal correlation value. And the normal correlation value is larger than a predetermined threshold value, it is obtained as the confirmation result of the first character and the corresponding small area is obtained as the first character area. It should be noted that the search in the divided area in A in FIG. 2 is preferably performed in order from the left side, and the search in the divided area in B in FIG. 2 is preferably performed in order from the upper side. The first character can be surely confirmed. Further, the above-described search is sequentially performed in units of small areas, and the small areas that are sequentially searched are displaced from each other by a predetermined amount in a predetermined direction.

【0020】また、予め設定されているテンプレート画
像に対して、登録文字コードを付加しておくことが好ま
しく、文字確認結果を登録文字モードとして得ることが
できる。ここで、例えば、大文字と小文字とで同じ登録
文字コードを付加しておくことが可能である。また、上
記テンプレート画像に対して文字グループを示すグルー
プデータを付加しておくことが好ましい。この場合に、
文字グループは、英字と数字のような文字属性にしたが
って区分されていることが好ましい。この構成を採用す
れば、例えば、先頭文字が必ず英字であることが分って
いる場合に、英字グループに属するテンプレート画像の
みに基づく正規相関をとるだけでよくなり、先頭文字確
認負荷を低減することができるとともに、先頭文字確認
の所要時間を短縮することができる。
Further, it is preferable to add a registered character code to a preset template image, and the character confirmation result can be obtained in the registered character mode. Here, for example, it is possible to add the same registered character code to uppercase letters and lowercase letters. Further, it is preferable to add group data indicating a character group to the template image. In this case,
Character groups are preferably separated according to character attributes such as letters and numbers. If this configuration is adopted, for example, when it is known that the first character is always an alphabet, it is only necessary to take the normal correlation based on only the template images belonging to the alphabet group, and the load of confirming the first character is reduced. In addition, it is possible to shorten the time required to confirm the first character.

【0021】さらに、先頭文字に対応する小領域を基準
として、他の文字に対応する小領域の相対位置(相対座
標値)が図3に示すように予め設定されている(図3中
Aが先頭文字の小領域を、B,C,Dが他の文字の小領
域をそれぞれ示している)のであるから、上述のように
先頭文字に対応する小領域が得られた後は、先頭文字に
対応する小領域の座標値に対して上記相対座標値を加算
することにより、他の文字に対応する小領域の座標値を
得ることができる(ステップSP2参照)。ただし、上
記相対位置は必ずしも正確に設定されているわけではな
いから、他の文字に対応する小領域も必ずしも正確に座
標値が得られているわけではない。したがって、相対位
置に基づいて得られた小領域を基準として所定範囲(部
分領域)内に位置する小領域のそれぞれについて各テン
プレート画像との正規相関をとり、正規相関値が最大
で、かつ正規相関値が所定のしきい値よりも大きい場合
のテンプレート画像に基づいて文字の確認を行なうこと
ができる(ステップSP3参照)。そして、文字の確認
が行われれば、この小領域が正確な小領域であることが
分かるので、この小領域の座標値を正確な位置として得
る(ステップSP4参照)。
Further, the relative position (relative coordinate value) of a small area corresponding to another character is preset as shown in FIG. 3 with the small area corresponding to the first character as a reference (A in FIG. Since the small areas of the first character are B, C, and D respectively indicate the small areas of other characters), after the small area corresponding to the first character is obtained as described above, By adding the relative coordinate value to the coordinate value of the corresponding small area, the coordinate value of the small area corresponding to another character can be obtained (see step SP2). However, since the relative position is not always set accurately, the coordinate values are not necessarily obtained accurately even in the small areas corresponding to other characters. Therefore, with respect to each of the small areas located within the predetermined range (partial area) with reference to the small area obtained based on the relative position, the normal correlation with each template image is obtained, and the normal correlation value is the maximum and the normal correlation is The character can be confirmed based on the template image when the value is larger than the predetermined threshold value (see step SP3). Then, if the characters are confirmed, it is known that this small area is an accurate small area, and therefore the coordinate value of this small area is obtained as an accurate position (see step SP4).

【0022】なお、2番目以降の文字に関しても、文字
グループが予め定められていれば、該当する文字グルー
プに属するテンプレート画像に基づく正規相関をとるだ
けでよいから、上記と同様に文字確認負荷を低減するこ
とができるとともに、文字確認の所要時間を短縮するこ
とができる。したがって、文字列確認の所要時間を大幅
に短縮することができ、しかも文字列確認の精度を高め
ることができる。
For the second and subsequent characters, if the character group is predetermined, it is only necessary to take the normal correlation based on the template image belonging to the corresponding character group. In addition to being able to reduce the time, it is possible to shorten the time required for character confirmation. Therefore, the time required for character string confirmation can be significantly reduced, and the accuracy of character string confirmation can be improved.

【0023】[0023]

【実施例2】図4はこの発明の文字列確認装置の一実施
例を示すブロック図である。この文字列確認装置は、予
め設定されている文字のテンプレート画像を保持するテ
ンプレート画像保持部1と、先頭文字の位置に対する他
の文字の相対位置を保持する相対位置保持部2と、文字
列の記載規則にしたがってワーク表面の予め設定された
領域内を走査する第1走査部3と、第1走査部3により
得られる走査結果と予め設定されている文字のテンプレ
ート画像との相関をとる第1相関部4と、上記テンプレ
ート画像に対する先頭文字の相関値が最大になる位置を
先頭文字の位置として検出する第1文字位置検出部5
と、検出された先頭文字の位置および上記相対位置に基
づいて他の文字のために走査を行うべき部分領域を設定
する部分領域設定部6と、設定された部分領域を走査す
る第2走査部7と、第2走査部7により得られる走査結
果と予め設定されている文字のテンプレート画像との相
関をとる第2相関部8と、上記テンプレート画像に対す
る他の文字の相関値が最大になる位置を該他の文字の位
置として検出する第2文字位置検出部9と、上記先頭文
字または他の文字の相関値が最大になるテンプレート画
像が先頭文字または他の文字であることを確認する文字
確認部10と、文字列を構成する全ての文字が確認され
るまで、上記部分領域設定部6、第2走査部7、第2相
関部8、第2文字位置検出部9および文字確認部10を
反復動作させる制御部11とを有している。
[Embodiment 2] FIG. 4 is a block diagram showing an embodiment of a character string confirmation apparatus of the present invention. This character string confirmation device includes a template image holding unit 1 that holds a template image of a preset character, a relative position holding unit 2 that holds the relative position of another character with respect to the position of the first character, and a character string A first scanning unit 3 that scans a preset area on the surface of the work according to the description rule, and a first scanning unit 3 that correlates the scanning result obtained by the first scanning unit 3 with a preset character template image. The correlation unit 4 and the first character position detection unit 5 that detects the position where the correlation value of the first character with respect to the template image is maximum as the position of the first character.
A partial area setting unit 6 for setting a partial area to be scanned for another character based on the detected position of the first character and the relative position, and a second scanning unit for scanning the set partial area. 7, a second correlation unit 8 that correlates the scanning result obtained by the second scanning unit 7 with the preset template image of the character, and the position where the correlation value of the other characters with respect to the template image is maximum. A second character position detection unit 9 for detecting the position of the other character, and a character confirmation for confirming that the template image having the maximum correlation value of the first character or the other character is the first character or the other character. The part 10 and the partial area setting part 6, the second scanning part 7, the second correlation part 8, the second character position detecting part 9 and the character confirming part 10 until all the characters forming the character string are confirmed. Control to make it repeat And a section 11.

【0024】上記テンプレート画像保持部1は、予め設
定された文字のテンプレート画像を保持しているととも
に、必要に応じてテンプレート画像に対応する登録文字
コード、文字グループを示すグループデータを保持して
いる。上記相対位置保持部2は、先頭文字の小領域(テ
ンプレート画像と等しいサイズの領域)に対する他の文
字の小領域の相対位置を示す座標値を保持している。た
だし、この相対位置は、必ずしも正確な相対位置を示し
ているわけではないが、ある程度正確な相対位置を示し
ている。
The template image holding unit 1 holds a template image of preset characters and, if necessary, holds a registered character code corresponding to the template image and group data indicating a character group. . The relative position holding unit 2 holds the coordinate value indicating the relative position of the small area of the other character with respect to the small area of the first character (area having the same size as the template image). However, this relative position does not necessarily indicate an accurate relative position, but indicates an accurate relative position to some extent.

【0025】上記第1走査部3は、文字列の記載規則に
したがってワーク表面の予め設定された領域内を走査す
るものであり、例えば、縦読みの場合には、検索対象領
域の全範囲を上下に複数の領域に分割し(図2中A参
照)、最も上の分割領域から順に、該当領域の走査を行
う。また、横読みの場合には、検索対象領域の全範囲を
左右に複数の領域に分割し(図2中B参照)、最も左の
分割領域から順に、該当領域の走査を行う。また、何れ
の場合にも、小領域を単位とする走査を順次行う。な
お、順次走査が行われる小領域どうしは、互いに所定量
だけ所定方向(上下、左右の各方向)にずれている。
The first scanning unit 3 scans a preset area on the surface of the work according to the character string description rule. For example, in the case of vertical reading, the entire range of the search target area is scanned. It is divided into a plurality of areas vertically (see A in FIG. 2), and the corresponding area is scanned in order from the uppermost divided area. Further, in the case of horizontal reading, the entire range of the search target area is divided into a plurality of areas on the left and right (see B in FIG. 2), and the corresponding area is scanned in order from the leftmost divided area. Further, in either case, scanning is sequentially performed in units of small areas. The small areas in which the sequential scanning is performed are displaced from each other by a predetermined amount in predetermined directions (vertical and horizontal directions).

【0026】上記第1相関部4は、第1走査部3により
小領域を走査して得た画像と、テンプレート画像との正
規相関を得るものである。上記第1文字位置検出部5
は、第1相関部4により得られる正規相関値を一時的に
保持し、正規相関値が最大であり、かつ所定のしきい値
よりも大きい小領域を先頭文字の小領域として検出する
ものであり、この小領域の所定の端点の座標値を先頭文
字の位置として出力する。
The first correlation section 4 obtains a normal correlation between the image obtained by scanning the small area by the first scanning section 3 and the template image. The first character position detector 5
Is for temporarily holding the normal correlation value obtained by the first correlation unit 4 and detecting a small area having the largest normal correlation value and larger than a predetermined threshold value as the small area of the first character. Yes, the coordinate value of a predetermined endpoint of this small area is output as the position of the first character.

【0027】上記部分領域設定部6は、第1文字位置検
出部5から出力された座標値に対して相対位置保持部2
に保持されている座標値を加算することにより、該当す
る部分領域の座標値を得る。上記第2走査部7は、設定
された部分領域内において小領域を単位とする走査を順
次行う。なお、順次走査が行われる小領域どうしは、互
いに所定量だけ所定方向にずれている。
The partial area setting unit 6 has a relative position holding unit 2 for the coordinate values output from the first character position detecting unit 5.
The coordinate value of the corresponding partial area is obtained by adding the coordinate values held in the. The second scanning unit 7 sequentially performs scanning in units of small areas within the set partial area. It should be noted that the small areas that are sequentially scanned are displaced from each other by a predetermined amount in a predetermined direction.

【0028】上記第2相関部8は、第2走査部7により
小領域を走査して得た画像と、テンプレート画像との正
規相関を得るものである。ただし、第2相関部8を第1
相関部4に兼ねさせてもよい。上記第2文字位置検出部
9は、第2相関部8により得られる正規相関値を一時的
に保持し、正規相関値が最大であり、かつ所定のしきい
値よりも大きい小領域を先頭文字の小領域として検出す
るものであり、この小領域の所定の端点の座標値を該当
する文字の位置として出力する。ただし、第2文字位置
検出部9を第1文字位置検出部5に兼ねさせてもよい。
The second correlation unit 8 obtains a normal correlation between the image obtained by scanning the small area by the second scanning unit 7 and the template image. However, the second correlator 8 is
The correlating unit 4 may also serve. The second character position detection unit 9 temporarily holds the normal correlation value obtained by the second correlation unit 8, and sets a small area having the maximum normal correlation value and larger than a predetermined threshold as the first character. Is detected as the small area of the character and the coordinate value of a predetermined end point of the small area is output as the position of the corresponding character. However, the second character position detection unit 9 may also function as the first character position detection unit 5.

【0029】上記文字確認部10は、正規相関値が最大
であり、かつ所定のしきい値よりも大きいテンプレート
画像、または対応する登録文字コードを検出して順次保
持し、最終的に一連のテンプレート画像または登録文字
コードを出力する。したがって、この実施例の場合に
も、文字列確認の所要時間を大幅に短縮することがで
き、しかも文字列確認の精度を高めることができる。
The character confirmation unit 10 detects and sequentially holds a template image having a maximum normal correlation value and larger than a predetermined threshold value or a corresponding registered character code, and finally stores a series of templates. Output an image or registered character code. Therefore, also in the case of this embodiment, the time required for character string confirmation can be greatly shortened and the accuracy of character string confirmation can be improved.

【0030】[0030]

【実施例3】図5はこの発明の文字列確認方法の他の実
施例を説明するフローチャートである。ステップSP1
において、予め設定されている文字のテンプレート画像
との正規相関をとることにより文字列の先頭文字を確認
するとともに、先頭文字の位置を決定し、ステップSP
2において、先頭文字の位置と、先頭文字に対する他の
文字の相対位置とに基づいて次の文字の位置を算出し、
ステップSP3において、算出された位置を基準として
予め設定されている文字のテンプレート画像との正規相
関をとることにより次の文字を確認するとともに、正規
相関値が最大になる領域の位置を正確な位置として採用
し、ステップSP4において次の文字が存在するか否か
を判別し、次の文字が存在する場合には、ステップSP
5において、少なくとも2つの文字の確認が行われてい
ることを条件として、文字位置の補正処理を行い、再び
ステップSP2の処理を行う。逆に、次の文字が存在し
ない場合には、そのまま一連の処理を終了する。
Third Embodiment FIG. 5 is a flow chart for explaining another embodiment of the character string confirmation method of the present invention. Step SP1
In step 1, the leading character of the character string is confirmed and the position of the leading character is determined by taking the normal correlation of the preset character with the template image, and step SP
2, the position of the next character is calculated based on the position of the first character and the relative position of the other character to the first character,
In step SP3, the next character is confirmed by taking the normal correlation with the template image of the character set in advance on the basis of the calculated position, and the position of the area where the normal correlation value is the maximum is accurately determined. And determines in step SP4 whether or not the next character is present. If the next character is present, then in step SP
In 5, the character position correction process is performed on condition that at least two characters have been confirmed, and the process of step SP2 is performed again. On the contrary, if the next character does not exist, the series of processing is terminated.

【0031】さらに詳細に説明する。ステップSP1の
処理、ステップSP2の処理、ステップSP4の判別処
理は図1のフローチャートのステップSP1、ステップ
SP2、ステップSP5の処理と同様である。また、ス
テップSP3の処理は、図1のフローチャートのステッ
プSP3、ステップSP4の処理と同様である。
Further details will be described. The processing of step SP1, the processing of step SP2, and the determination processing of step SP4 are the same as the processing of step SP1, step SP2, and step SP5 in the flowchart of FIG. The processing of step SP3 is the same as the processing of steps SP3 and SP4 in the flowchart of FIG.

【0032】ステップSP5の処理は、例えば、図6に
破線四角で示すように2番目、3番目の文字の相対位置
が設定されているにも拘らず、実線の二重四角および実
線四角で示すように先頭文字の位置および次の文字の位
置が得られている場合に、先頭文字の位置および次の文
字の位置を結ぶ直線の傾き(例えば、水平方向に対する
傾き)の角度θを算出し、数1に示す演算を行って、波
線四角で示すように文字位置を補正する。
The processing of step SP5 is shown by a solid double square and a solid square, for example, even though the relative positions of the second and third characters are set as shown by the dashed squares in FIG. As described above, when the position of the first character and the position of the next character are obtained, the angle θ of the inclination (for example, the inclination with respect to the horizontal direction) of the straight line connecting the position of the first character and the position of the next character is calculated, The calculation shown in Expression 1 is performed to correct the character position as indicated by the wavy square.

【0033】[0033]

【数1】 [Equation 1]

【0034】ただし、x0,y0は先頭文字の位置の座
標値、x,yは相対位置を示す座標値に基づいて得られ
る座標値、X,Yは補正後の座標値をそれぞれ示してい
る。したがって、この実施例の場合には、作業者、産業
用ロボットなどによりワークに銘板などを張り付けるに
当って、銘板などが斜めになったような場合に好適であ
り、斜めになっていることを考慮して次の文字の位置を
算出するので、該当する文字を確認するための所要時間
を、補正を全く行わない場合と比較して短縮することが
できる。もちろん、銘板などが斜めになっている場合に
は、先頭文字から離れるほど補正量が多くなるので、文
字列全体としての確認のための所要時間を、補正を全く
行わない場合と比較して大幅に短縮することができる。
However, x0 and y0 are the coordinate values of the position of the first character, x and y are the coordinate values obtained based on the coordinate values indicating the relative position, and X and Y are the corrected coordinate values. Therefore, in the case of this embodiment, when a name plate or the like is attached to a work by an operator, an industrial robot, or the like, it is suitable when the name plate or the like is inclined, Since the position of the next character is calculated in consideration of the above, the time required to confirm the corresponding character can be shortened as compared with the case where no correction is performed. Of course, when the nameplate is slanted, the amount of correction increases as it moves away from the first character, so the time required to check the entire character string is significantly larger than when no correction is performed. Can be shortened to

【0035】[0035]

【実施例4】図7はこの発明の文字列確認方法のさらに
他の実施例の要部を説明するフローチャートである。こ
のフローチャートは、先頭文字の位置を基準として他の
文字の位置が得られた場合の処理を説明している。ステ
ップSP1において文字グループを得、ステップSP2
において、得られた文字グループに属するテンプレート
画像と該当する位置における小領域との正規相関値を算
出して、正規相関値の順にテンプレート画像に対して優
先順位を付与し、ステップSP3において、優先順位が
高い順にテンプレート画像を順次選択し、算出された位
置を基準として選択されたテンプレート画像との正規相
関をとることにより該当する文字を確認するとともに、
正規相関値が最大になる領域の位置を正確な位置として
採用し、そのまま一連の処理を終了する。
[Fourth Embodiment] FIG. 7 is a flow chart for explaining a main part of still another embodiment of the character string confirmation method according to the present invention. This flowchart explains the processing when the positions of other characters are obtained with the position of the first character as a reference. A character group is obtained in step SP1, and step SP2
In, the normal correlation value between the template image belonging to the obtained character group and the small area at the corresponding position is calculated, and the priority order is given to the template images in the order of the normal correlation value. While sequentially selecting template images in the order of higher, and confirming the corresponding characters by taking the normal correlation with the template image selected based on the calculated position,
The position of the area where the normal correlation value is maximum is adopted as the accurate position, and the series of processing is terminated.

【0036】さらに詳細に説明する。ステップSP1に
おいて、例えば、英字グループが得られた場合には、ス
テップSP2において、英字グループに属するテンプレ
ート画像のみを選択し、該当する小領域との正規相関値
を算出する。そして、正規相関値が高い順にテンプレー
ト画像に対して優先順位を付与する。したがって、確認
対象文字である蓋然性がかなりの程度あるテンプレート
画像に対して、かなり高い確率で最も高い優先順位が付
与される。
A more detailed description will be given. In step SP1, for example, when an alphabet group is obtained, only template images belonging to the alphabet group are selected in step SP2 and a normal correlation value with the corresponding small area is calculated. Then, priorities are given to the template images in descending order of the normal correlation value. Therefore, the highest priority is given to the template image having a high probability of being the confirmation target character with a fairly high probability.

【0037】そして、ステップSP3においては、上記
正規相関値を得た小領域を中心として、例えば、1画素
分だけずれた位置における小領域との間で正規相関値を
得、元の正規相関値よりも高い相関値が得られているか
否かを判別する。そして、元の正規相関値よりも高い正
規相関値が得られた小領域が存在している場合には、こ
の小領域を基準として再び上記の処理を反復する。この
反復処理を行うことにより、最終的に、該当するテンプ
レート画像に対して最も高い正規相関値を与える小領域
が得られる。したがって、この最も高い正規相関値が所
定のしきい値よりも高いか否かを判別し、所定のしきい
値よりも高い場合には、確認対象となる文字がこのテン
プレート画像と同じ文字であると判定する。逆に、上記
最も高い正規相関値が所定のしきい値以下であると判別
された場合には、次の優先順位のテンプレート画像を選
択して、上記の一連の処理を行なう。
Then, in step SP3, a normal correlation value is obtained with respect to a small area at a position displaced by one pixel, for example, from the small area for which the normal correlation value is obtained, and the original normal correlation value is obtained. It is determined whether or not a higher correlation value is obtained. Then, when there is a small area for which a normal correlation value higher than the original normal correlation value exists, the above processing is repeated again with this small area as a reference. By performing this iterative process, a small area that gives the highest normal correlation value to the corresponding template image is finally obtained. Therefore, it is determined whether or not this highest normal correlation value is higher than a predetermined threshold value, and if it is higher than the predetermined threshold value, the character to be confirmed is the same character as this template image. To determine. On the contrary, when it is determined that the highest normal correlation value is less than or equal to the predetermined threshold value, the template image having the next priority is selected and the series of processes described above is performed.

【0038】ここで、優先順位を付与するために正規相
関値を得た小領域が確認対象文字の真の小領域の近傍に
位置しているのであるから、上記優先順位がかなり信頼
性が高いものになっており、この優先順位にしたがって
文字の確認を行うのであるから、文字確認のための所要
時間を短縮することができ、しかも文字確認の精度を高
く維持することができる。
Here, since the small area for which the normal correlation value is obtained to give the priority is located near the true small area of the character to be confirmed, the above-mentioned priority is highly reliable. Since the characters are confirmed according to this priority order, the time required for the character confirmation can be shortened and the accuracy of the character confirmation can be kept high.

【0039】[0039]

【発明の効果】以上のように請求項1の発明は、文字列
の読み規則にしたがって走査を行う関係上、先頭文字を
確認するための検索範囲をかなり狭くすることができ、
他の文字に関しては相対位置が予め設定されている関係
上、検索範囲を十分に狭くすることができ、この結果、
文字列確認のための所要時間を大幅に短縮することがで
き、また、文字毎に確認を行うに当って、上述のように
相対位置が予め設定されているのであるから、縦読み、
横読みの文字列、複数行、列にわたる文字列などを正確
に確認することができるという特有の効果を奏する。
As described above, according to the invention of claim 1, since the scanning is performed according to the reading rule of the character string, the search range for confirming the first character can be considerably narrowed,
Since the relative positions of other characters are preset, the search range can be narrowed sufficiently, and as a result,
The time required to check the character string can be greatly shortened, and in checking each character, the relative position is preset as described above.
It has a unique effect that it is possible to accurately confirm a horizontally read character string, a plurality of lines, a character string extending over columns, and the like.

【0040】請求項2の発明は、文字列の読み規則にし
たがって走査を行う関係上、先頭文字を確認するための
検索範囲をかなり狭くすることができ、他の文字に関し
ては相対位置が予め設定されている関係上、検索範囲を
十分に狭くすることができ、この結果、文字列確認のた
めの所要時間を大幅に短縮することができ、また、文字
毎に確認を行うのであるが、上述のように相対位置が予
め設定されているのであるから、縦読み、横読みの文字
列、複数行、列にわたる文字列などを正確に確認するこ
とができるという特有の効果を奏する。
According to the second aspect of the present invention, since the scanning is performed according to the reading rules of the character string, the search range for confirming the first character can be considerably narrowed, and the relative positions of other characters are preset. Due to this, the search range can be narrowed sufficiently, and as a result, the time required for character string confirmation can be greatly shortened, and the confirmation is performed for each character. As described above, since the relative position is set in advance, there is a unique effect that a vertically read character string, a horizontally read character string, a character string extending over a plurality of rows, a character string extending over columns, and the like can be accurately confirmed.

【0041】請求項3の発明は、各文字毎に相関をとる
べきテンプレート画像の数を少なくすることができ、文
字列確認のための所要時間を一層短縮することができる
という特有の効果を奏する。請求項4の発明は、蓋然性
が高いテンプレート画像に基づく確認処理を優先的に行
うことができ、文字列確認のための所要時間をより短縮
することができるという特有の効果を奏する。
The invention of claim 3 has a unique effect that the number of template images to be correlated for each character can be reduced and the time required for character string confirmation can be further shortened. . The invention of claim 4 has a unique effect that the confirmation processing based on the template image with high probability can be preferentially performed, and the time required for confirming the character string can be further shortened.

【0042】請求項5の発明は、順位付けにしたがって
テンプレート画像を順次選択した各テンプレート画像に
対して、テンプレート画像と等しいサイズの小領域を複
数の方向に所定量だけシフトさせてテンプレート画像と
の相関値が最も大きい小領域を得、最終的に、相関値が
最も高く、かつ所定のしきい値よりも大きい小領域を確
認対象となる文字の小領域として採用することができ、
文字列確認の正確性を高めることができるとともに、文
字列確認のための所要時間を短縮することができるとい
う特有の効果を奏する。
According to the fifth aspect of the present invention, for each template image in which the template image is sequentially selected according to the ranking, a small area having the same size as the template image is shifted by a predetermined amount in a plurality of directions to form a template image. Obtain a small area with the largest correlation value, finally, the highest correlation value, it is possible to adopt a small area larger than a predetermined threshold as the small area of the character to be confirmed,
There is a unique effect that the accuracy of character string confirmation can be improved and the time required for character string confirmation can be shortened.

【0043】請求項6の発明は、他の文字を確認するた
めの領域を比較的正確に設定することができ、ひいて
は、文字列確認のための所要時間を短縮することができ
るという特有の効果を奏する。
The invention of claim 6 has a unique effect that the area for confirming other characters can be set relatively accurately, and the time required for confirming the character string can be shortened. Play.

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

【図1】この発明の文字列確認方法の一実施例を説明す
るフローチャートである。
FIG. 1 is a flowchart illustrating an embodiment of a character string confirmation method of the present invention.

【図2】確認対象となる文字列が縦読みか横読みかに対
応して検索対象領域を分割する方法を示す概略図であ
る。
FIG. 2 is a schematic diagram showing a method of dividing a search target region according to whether a character string to be confirmed is vertically read or horizontally read.

【図3】先頭文字に対応する小領域を基準として、他の
文字に対応する小領域の相対位置が設定されている状態
を示す概略図である。
FIG. 3 is a schematic diagram showing a state in which a relative position of a small area corresponding to another character is set with reference to a small area corresponding to a leading character.

【図4】この発明の文字列確認装置の一実施例を示すブ
ロック図である。
FIG. 4 is a block diagram showing an embodiment of a character string confirmation device of the present invention.

【図5】この発明の文字列確認方法の他の実施例を説明
するフローチャートである。
FIG. 5 is a flowchart illustrating another embodiment of the character string confirmation method of the present invention.

【図6】文字位置の補正処理を説明する概略図である。FIG. 6 is a schematic diagram illustrating a character position correction process.

【図7】この発明の文字列確認方法のさらに他の実施例
の要部を説明するフローチャートである。
FIG. 7 is a flowchart for explaining a main part of still another embodiment of the character string confirmation method of the present invention.

【符号の説明】[Explanation of symbols]

1 テンプレート画像保持部 2 相対位置保持部 3 第1走査部 4 第1相関部 5 第1文字位置検出部 6 部分領域設定部 7 第2走査部 8 第2相関部 9 第2文字位置検出部 10 文字確認部 11 制御部 DESCRIPTION OF SYMBOLS 1 Template image holding part 2 Relative position holding part 3 1st scanning part 4 1st correlation part 5 1st character position detection part 6 Partial area setting part 7 2nd scanning part 8 2nd correlation part 9 2nd character position detection part 10 Character confirmation unit 11 Control unit

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 文字列の読み規則にしたがってワーク表
面の予め設定された領域内を走査するとともに、予め設
定されている文字のテンプレート画像との相関をとるこ
とにより、先頭文字の位置を検出するとともに、先頭文
字が予め設定されている文字の何れであるかを確認し、
予め設定されている、先頭文字の位置に対する他の文字
の相対位置と上記先頭文字の位置とに基づいて定まる部
分領域内を走査するとともに、予め設定されている文字
のテンプレート画像との相関をとることにより、該他の
文字の位置を得るとともに、該他の文字が予め設定され
ている文字の何れであるかを確認し、文字列を構成する
全ての文字が確認されるまで、上記部分領域内の走査お
よび予め設定されている文字のテンプレート画像との相
関獲得を行い、他の文字の位置獲得および他の文字が予
め設定されている文字の何れかであるかの確認を反復す
ることを特徴とする文字列確認方法。
1. The position of the first character is detected by scanning a preset area on the surface of the work according to the reading rules of the character string and by correlating with the template image of the preset character. At the same time, confirm which of the preset characters is the first character,
While scanning within a preset partial area determined based on the relative position of another character to the position of the leading character and the position of the leading character, the correlation with the template image of the preset character is obtained. By obtaining the position of the other character, it is confirmed whether the other character is one of the preset characters, and the above partial area is displayed until all the characters forming the character string are confirmed. It is possible to repeat the scanning of the inside and the acquisition of the correlation of the preset character with the template image, the position acquisition of the other character, and the confirmation of whether the other character is one of the preset characters. Characterized character string confirmation method.
【請求項2】 予め設定されている文字のテンプレート
画像を保持するテンプレート画像保持手段(1)と、先
頭文字の位置に対する他の文字の相対位置を保持する相
対位置保持手段(2)と、文字列の読み規則にしたがっ
てワーク表面の予め設定された領域内を走査する第1走
査手段(3)と、第1走査手段(3)により得られる走
査結果と予め設定されている文字のテンプレート画像と
の相関をとる第1相関手段(4)と、上記テンプレート
画像に対する先頭文字の相関値が最大になる位置を先頭
文字の位置として検出する第1文字位置検出手段(5)
と、検出された先頭文字の位置および上記相対位置に基
づいて他の文字のために走査を行うべき部分領域を設定
する部分領域設定手段(6)と、設定された部分領域を
走査する第2走査手段(7)と、第2走査手段(7)に
より得られる走査結果と予め設定されている文字のテン
プレート画像との相関をとる第2相関手段(8)と、上
記テンプレート画像に対する他の文字の相関値が最大に
なる位置を該他の文字の位置として検出する第2文字位
置検出手段(9)と、上記先頭文字または他の文字の相
関値が最大になるテンプレート画像が先頭文字または他
の文字であることを確認する文字確認手段(10)と、
文字列を構成する全ての文字が確認されるまで、上記部
分領域設定手段(6)、第2走査手段(7)、第2相関
手段(8)、第2文字位置検出手段(9)および文字確
認手段(10)を反復動作させる制御手段(11)とを
有していることを特徴とする文字列確認装置。
2. A template image holding means (1) for holding a template image of a preset character, a relative position holding means (2) for holding a relative position of another character with respect to the position of the leading character, and a character. First scanning means (3) for scanning within a preset area on the surface of the work according to the column reading rule, a scanning result obtained by the first scanning means (3), and a template image of preset characters. And a first character position detecting means (5) for detecting the position where the correlation value of the first character with respect to the template image is maximum as the position of the first character.
A partial area setting means (6) for setting a partial area to be scanned for another character based on the detected position of the first character and the relative position; and a second part for scanning the set partial area. Scanning means (7), second correlating means (8) for correlating the scanning result obtained by the second scanning means (7) with the template image of the preset character, and other characters for the template image Second character position detecting means (9) for detecting the position having the maximum correlation value of the other character as the position of the other character, and the template image having the maximum correlation value of the first character or the other character is the first character or the other character. Character confirmation means (10) for confirming that the character is
Until all the characters forming the character string are confirmed, the partial area setting means (6), the second scanning means (7), the second correlating means (8), the second character position detecting means (9) and the character A character string confirmation device comprising: a control means (11) for repeatedly operating the confirmation means (10).
【請求項3】 予め設定されている文字のテンプレート
画像が文字の属性により区分されてあり、文字確認のた
めの相関をとるに当って、確認対象文字の属性が予め設
定されていることに応答して、該当する区分に属する文
字のテンプレート画像との相関をとる請求項1に記載の
文字列確認方法。
3. A preset template image of a character is divided according to the attribute of the character, and responds to the fact that the attribute of the confirmation target character is set in advance in obtaining correlation for confirming the character. The character string confirmation method according to claim 1, wherein a correlation is made between the characters belonging to the corresponding section and the template image.
【請求項4】 文字を確認するために、確認対象となる
文字と、該当する全ての文字のテンプレート画像との相
関値を算出して、確認対象となる文字に対する各テンプ
レート画像の順位付けを施す請求項1または請求項3に
記載の文字列確認方法。
4. In order to confirm a character, a correlation value between the character to be confirmed and the template images of all the corresponding characters is calculated, and the template images are ranked with respect to the character to be confirmed. The character string confirmation method according to claim 1 or 3.
【請求項5】 順位付けにしたがってテンプレート画像
を順次選択し、各テンプレート画像が選択された状態に
おいて、テンプレート画像と等しいサイズの小領域を複
数の方向に所定量だけシフトさせてテンプレート画像と
の相関値を算出し、シフト前の小領域の相関値よりも高
い相関値を有する小領域の有無を判別し、シフト前の小
領域の相関値よりも高い相関値を有する小領域がある場
合には、該当する小領域を基準として再び上記相関値の
算出および有無の判別を行ない、シフト前の小領域の相
関値よりも高い相関値を有する小領域がない場合には、
シフト前の小領域の相関値が所定のしきい値より大きい
か否かを判別し、シフト前の小領域の相関値が所定のし
きい値よりも小さい場合には、次の順位のテンプレート
画像を選択して上記一連の処理を行い、シフト前の小領
域の相関値が所定のしきい値よりも大きい場合には、該
当する小領域を確認対象となる文字の小領域として採用
する請求項4に記載の文字列確認方法。
5. A template image is sequentially selected according to the ranking, and in a state where each template image is selected, a small area having the same size as the template image is shifted in a plurality of directions by a predetermined amount and correlated with the template image. The value is calculated, the presence or absence of a small area having a correlation value higher than the correlation value of the small area before the shift is determined, and if there is a small area having a correlation value higher than the correlation value of the small area before the shift, , Calculating the correlation value again and determining the presence or absence of the corresponding small area as a reference, if there is no small area having a higher correlation value than the correlation value of the small area before the shift,
It is determined whether the correlation value of the small area before the shift is larger than a predetermined threshold value. If the correlation value of the small area before the shift is smaller than the predetermined threshold value, the template image of the next rank is determined. When the correlation value of the small area before the shift is larger than a predetermined threshold value, the corresponding small area is adopted as the small area of the character to be confirmed. The character string confirmation method described in 4.
【請求項6】 文字列を構成する少なくとも2つの文字
の位置が得られたことに応答して文字列の傾きを算出
し、先頭文字の位置に対する他の文字の相対位置を算出
された傾きで補正する請求項1、請求項3から請求項5
の何れかに記載の文字列確認方法。
6. The inclination of the character string is calculated in response to the positions of at least two characters forming the character string being obtained, and the relative position of the other character with respect to the position of the first character is calculated by the calculated inclination. Claims 1 and 3 to 5 to be corrected
The character string confirmation method described in any of 1.
JP6164073A 1994-07-15 1994-07-15 Method and device for character string confirmation Pending JPH0830731A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6164073A JPH0830731A (en) 1994-07-15 1994-07-15 Method and device for character string confirmation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6164073A JPH0830731A (en) 1994-07-15 1994-07-15 Method and device for character string confirmation

Publications (1)

Publication Number Publication Date
JPH0830731A true JPH0830731A (en) 1996-02-02

Family

ID=15786270

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6164073A Pending JPH0830731A (en) 1994-07-15 1994-07-15 Method and device for character string confirmation

Country Status (1)

Country Link
JP (1) JPH0830731A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006012027A (en) * 2004-06-29 2006-01-12 Seiko Epson Corp Optical reader, recognition processor, character reading method and program, magnetic ink character reader, and pos terminal device
JP2011238279A (en) * 2011-07-25 2011-11-24 Seiko Epson Corp Optical reader, recognition processor, character reading method and program, magnetic ink character reader, and pos terminal device
JP2014092871A (en) * 2012-11-01 2014-05-19 Nippon Telegr & Teleph Corp <Ntt> Character recognition device and computer readable recording medium having character recognition program recorded therein
JP2016031574A (en) * 2014-07-28 2016-03-07 日立オムロンターミナルソリューションズ株式会社 Paper sheet identification device, paper sheet handling device and paper sheet identification method
JP2017162148A (en) * 2016-03-09 2017-09-14 キヤノン株式会社 Information processing device, program, and information processing method
JP2018173818A (en) * 2017-03-31 2018-11-08 キヤノン株式会社 Portable information processing device and method utilizing the same and program
JP2021093225A (en) * 2021-03-19 2021-06-17 キヤノン株式会社 Information processing device, program, and information processing method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006012027A (en) * 2004-06-29 2006-01-12 Seiko Epson Corp Optical reader, recognition processor, character reading method and program, magnetic ink character reader, and pos terminal device
JP2011238279A (en) * 2011-07-25 2011-11-24 Seiko Epson Corp Optical reader, recognition processor, character reading method and program, magnetic ink character reader, and pos terminal device
JP2014092871A (en) * 2012-11-01 2014-05-19 Nippon Telegr & Teleph Corp <Ntt> Character recognition device and computer readable recording medium having character recognition program recorded therein
JP2016031574A (en) * 2014-07-28 2016-03-07 日立オムロンターミナルソリューションズ株式会社 Paper sheet identification device, paper sheet handling device and paper sheet identification method
JP2017162148A (en) * 2016-03-09 2017-09-14 キヤノン株式会社 Information processing device, program, and information processing method
JP2018173818A (en) * 2017-03-31 2018-11-08 キヤノン株式会社 Portable information processing device and method utilizing the same and program
JP2021093225A (en) * 2021-03-19 2021-06-17 キヤノン株式会社 Information processing device, program, and information processing method

Similar Documents

Publication Publication Date Title
CN111507251B (en) Method and device for positioning answering area in test question image, electronic equipment and computer storage medium
EP2091004A2 (en) Correcting for geometrical perspective distortion
EP1918877B1 (en) Correlation peak finding method for image correlation displacement sensing
US20040022451A1 (en) Image distortion correcting method and apparatus, and storage medium
SE519014C2 (en) Method and apparatus for recognizing a handwritten pattern
CN109858307A (en) A kind of Lane detection method and apparatus
CN112614188A (en) Dot-matrix calibration board based on cross ratio invariance and identification method thereof
JP4339221B2 (en) Image construction method, fingerprint image construction apparatus and program
JPH0830731A (en) Method and device for character string confirmation
US5887083A (en) Method of processing image information based on object model
JP2001175862A (en) Document discriminating device
JP7096033B2 (en) Building extraction system
CN112215240B (en) Optimization method for improving 2D complex edge detection precision
CN113674174B (en) Line scanning cylinder geometric correction method and device based on significant line matching
US20030156748A1 (en) Adaptive threshold determination for ball grid array component modeling
JP2628875B2 (en) Image displacement detection method
JPH07168941A (en) Picture processor
JP4454075B2 (en) Pattern matching method
JP5371015B2 (en) Cross mark detection apparatus and method, and program
JP3932201B2 (en) Form type identification device and recording medium
CN115829850A (en) Image correction method, system, computer readable recording medium storing program and program product
JPH0581430A (en) Detection of edge
JP2007249580A (en) Image processor, image processing program and image processing method
JP2022021927A (en) Image processor and image processing program
JP3948943B2 (en) Graphic recognition method and apparatus