JP5045211B2 - Character recognition device, appearance inspection device, and character recognition method - Google Patents

Character recognition device, appearance inspection device, and character recognition method Download PDF

Info

Publication number
JP5045211B2
JP5045211B2 JP2007115915A JP2007115915A JP5045211B2 JP 5045211 B2 JP5045211 B2 JP 5045211B2 JP 2007115915 A JP2007115915 A JP 2007115915A JP 2007115915 A JP2007115915 A JP 2007115915A JP 5045211 B2 JP5045211 B2 JP 5045211B2
Authority
JP
Japan
Prior art keywords
character
character string
string information
pattern
patterns
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2007115915A
Other languages
Japanese (ja)
Other versions
JP2008276311A (en
Inventor
隆 室崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP2007115915A priority Critical patent/JP5045211B2/en
Publication of JP2008276311A publication Critical patent/JP2008276311A/en
Application granted granted Critical
Publication of JP5045211B2 publication Critical patent/JP5045211B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Character Discrimination (AREA)

Description

本発明は、文字認識装置、外観検査装置及び文字認識方法に関するものであり、より詳しくは、被検査物上に表記された文字列をパターンマッチングにより認識する文字認識装置及び文字認識方法、及びそれらを用いた外観検査装置に関する。   The present invention relates to a character recognition device, an appearance inspection device, and a character recognition method. More specifically, the present invention relates to a character recognition device, a character recognition method, and a character recognition method for recognizing a character string written on an inspection object by pattern matching. The present invention relates to an appearance inspection apparatus using the.

近年、被検査物に印字あるいは刻印されている文字情報を画像として取得し、その画像を解析することにより、その文字を認識する方法及び装置の開発が盛んに行われている。このような文字認識装置では、文字の種類毎に異なる特徴を表すと考えられる特徴量を画像から抽出し、その特徴量に基づいて文字を認識する。あるいは、認識対象となる文字の字体及びサイズが予め分かっている場合には、その字体及びサイズに応じた文字のテンプレートパターンを準備しておき、画像とそのテンプレートパターンとのパターンマッチングを行い、最も一致するテンプレートを特定することにより、文字を認識する。   In recent years, methods and apparatuses for recognizing characters by acquiring character information printed or stamped on an inspection object as an image and analyzing the image have been actively developed. In such a character recognition device, a feature amount that is considered to represent a different feature for each type of character is extracted from an image, and a character is recognized based on the feature amount. Alternatively, if the font and size of the character to be recognized are known in advance, a character template pattern corresponding to the font and size is prepared, and pattern matching between the image and the template pattern is performed. Recognize characters by identifying matching templates.

ここで、文字の認識精度を高めるために、一つの文字に対して複数の異なる文字パターンを予め準備し、それら複数の文字パターンを用いて文字認識を行う文字認識装置が開発されている。
例えば、特許文献1に開示された文字認識装置では、言語やフォントごとに準備された複数の文字パターンのそれぞれと、認識対象の画像領域との間でパターンマッチングを行い、最も認識結果の良い文字パターンに基づいて、その画像領域に表示されている文字を認識する。
Here, in order to improve character recognition accuracy, a character recognition device has been developed in which a plurality of different character patterns are prepared in advance for one character and character recognition is performed using the plurality of character patterns.
For example, in the character recognition device disclosed in Patent Document 1, pattern matching is performed between each of a plurality of character patterns prepared for each language or font and an image area to be recognized, and the character with the best recognition result is obtained. Based on the pattern, the characters displayed in the image area are recognized.

特開2001−266072号公報JP 2001-266072 A

上記のように、想定される文字の形態に合わせて、複数の文字パターンを準備しておくことにより、検査対象の画像に含まれる文字がその想定された文字の形態に近い場合、その文字と何れかの文字パターンとの一致度が高くなるので、良好な認識結果を得ることができる。しかし、検査対象の画像に含まれる文字が、その想定された文字の形態と異なる場合、例えば、被検査物の表面が汚れて文字の一部しか見えなくなっている場合には、必ずしも認識精度は向上しなかった。この理由は、多数の文字パターンが存在するために、誤った文字パターンとの一致度が最も高くなって誤認識してしまう可能性も高くなることによる。
また、そのような事態を避けるために、様々な状況を想定して非常に多数の文字パターンを準備すると、パターンマッチング処理に要する時間が非常に長くなってしまうという問題があった。
As described above, by preparing a plurality of character patterns according to the assumed character form, when the character included in the image to be inspected is close to the assumed character form, the character and Since the degree of coincidence with any of the character patterns increases, a good recognition result can be obtained. However, when the character included in the image to be inspected is different from the assumed character form, for example, when the surface of the inspection object is dirty and only a part of the character is visible, the recognition accuracy is not necessarily It did not improve. The reason for this is that since there are a large number of character patterns, the degree of coincidence with the wrong character pattern is the highest and the possibility of erroneous recognition increases.
Further, in order to avoid such a situation, if a large number of character patterns are prepared assuming various situations, there is a problem that the time required for the pattern matching process becomes very long.

上記の問題点に鑑み、本発明の目的は、認識すべき文字の一部が見えないような、想定される形態と異なる形態の文字についても、正確に認識できる文字認識装置、外観検査装置及び文字認識方法を提供することにある。
また、本発明の他の目的は、文字認識に要する処理時間を短縮できる文字認識装置、外観検査装置及び文字認識方法を提供することにある。
In view of the above problems, an object of the present invention is to provide a character recognition device, an appearance inspection device, and a character recognition device capable of accurately recognizing a character in a form different from an assumed form such that a part of the character to be recognized cannot be seen. It is to provide a character recognition method.
Another object of the present invention is to provide a character recognition device, an appearance inspection device, and a character recognition method that can shorten the processing time required for character recognition.

本発明の請求項1に記載の形態によれば、本発明に係る文字認識装置は、少なくとも一つの文字列が表記された被検査物を撮影した検査画像と、複数の文字パターンとの一致度を求めて、複数の文字パターンのうちの最も一致する文字パターンが表す文字を少なくとも一つの文字列に含まれる文字として認識し、且つその認識された文字の検査画像中の位置を取得する文字認識手段(34)と、文字認識手段(34)で認識された複数の文字の位置関係に基づいて、その複数の文字の順序を決定することにより、少なくとも一つの文字列の認識結果である文字列情報を取得する文字列情報取得手段(36)と、文字列情報が、被検査物上に表記される可能性のある文字列である場合、文字列情報は正しいと判定し、文字列情報が、被検査物上に表記される可能性のない文字列である場合、文字列情報は誤りであると判定する判定手段(37)とを有する。
上記のように、本発明に係る文字認識装置は、認識された文字列が被検査物上に表記されるはずのない文字列か否かを調べることによって正誤判定を行うので、認識精度を高めることができる。
According to the first aspect of the present invention, the character recognition device according to the present invention provides a degree of coincidence between an inspection image obtained by photographing an inspection object on which at least one character string is written and a plurality of character patterns. Character recognition that recognizes the character represented by the most matching character pattern among a plurality of character patterns as a character included in at least one character string, and obtains the position of the recognized character in the inspection image The character string which is the recognition result of at least one character string by determining the order of the plurality of characters based on the positional relationship between the means (34) and the plurality of characters recognized by the character recognition means (34). When the character string information acquisition means (36) for acquiring information and the character string information is a character string that may be written on the inspection object, it is determined that the character string information is correct, and the character string information is On the object to be inspected If it is not likely to be writing character string, character string information having an determination means and (37) is an error.
As described above, the character recognition device according to the present invention performs the correct / incorrect determination by checking whether the recognized character string is a character string that should not be displayed on the object to be inspected. be able to.

た、本発明に係る文字認識装置は、文字列情報が誤りであると判定された場合、文字列情報に含まれる何れかの文字と最も一致した文字パターンを削除する文字パターン削除手段(38)をさらに有することが好ましい。
係る構成により、誤認識し易い文字パターンを文字認識に使用しなくなるので、認識精度をより向上させることができる。
Also, the character recognition apparatus according to the present invention, when the character string information is determined to be erroneous, the character pattern deletion means for deleting one of the most matched character pattern with the character included in the character string information (38 ).
With such a configuration, since a character pattern that is easily misrecognized is not used for character recognition, the recognition accuracy can be further improved.

さらに請求項に記載のように、文字列情報が正しいと判定された場合、文字列情報に含まれる何れかの文字と最も一致した文字パターンについて、その最も一致した回数を計数する計数手段(35)をさらに有することが好ましい。 Furthermore, as described in claim 2 , when it is determined that the character string information is correct, the counting means for counting the number of times that the character pattern most closely matches any character included in the character string information ( 35).

この場合において、請求項に記載のように、複数の文字パターンは、所定の文字を検出するための第1の個数の文字パターンを含み、文字認識手段(34)は、その第1の個数の文字パターンのうち、文字列情報に含まれる何れかの文字と最も一致した回数が多い方から順に、第1の個数よりも少ない第2の個数の文字パターンを用いて検査画像との一致度を求めることが好ましい。
あるいは、請求項に記載のように、複数の文字パターンは、所定の文字を検出するための第1の個数の文字パターンを含み、文字認識手段(34)は、第1の個数の文字パターンのうち、文字列情報に含まれる何れかの文字と最も一致した回数が多い方から順に、第1の個数よりも少ない第2の個数の文字パターンを用いて検査画像との一致度を求め、検査画像との一致度の最大値が所定の閾値未満の場合、第1の個数の文字パターンの全てを用いて検査画像との一致度を求めることが好ましい。
係る構成により、パターンマッチングに使用する文字パターンを、認識精度が高いと考えられるものに限定できるので、認識精度を下げることなく、処理時間を短縮することができる。
In this case, as described in claim 3 , the plurality of character patterns include a first number of character patterns for detecting a predetermined character, and the character recognition means (34) has the first number of character patterns. The degree of coincidence with the inspection image using a second number of character patterns that is smaller than the first number in order from the largest number of times that the number of the character patterns in the character string information matches the largest number of times. Is preferably obtained.
Alternatively, as described in claim 4 , the plurality of character patterns include a first number of character patterns for detecting a predetermined character, and the character recognition means (34) includes the first number of character patterns. Among them, in order from the largest number of matches with any character included in the character string information, the degree of coincidence with the inspection image is obtained using a second number of character patterns smaller than the first number, When the maximum value of the degree of coincidence with the inspection image is less than a predetermined threshold, it is preferable to obtain the degree of coincidence with the inspection image using all of the first number of character patterns.
With this configuration, the character pattern used for pattern matching can be limited to those that are considered to have high recognition accuracy, so that the processing time can be shortened without reducing the recognition accuracy.

また、本発明の請求項に記載の形態によれば、少なくとも一つの文字列が表記された被検査物の外観を検査する外観検査装置が提供される。係る外観検査装置は、少なくとも一つの文字列が表記された被検査物を撮影した検査画像と、複数の文字パターンとの一致度を求めて、複数の文字パターンのうちの最も一致する文字パターンが表す文字を少なくとも一つの文字列に含まれる文字として認識し、且つその認識された文字の検査画像中の位置を取得する文字認識手段(34)と、文字認識手段(34)で認識された複数の文字の位置関係に基づいて、その複数の文字の順序を決定することにより、少なくとも一つの文字列の認識結果である文字列情報を取得する文字列情報取得手段(36)と、文字列情報が被検査物上に表記される可能性のある文字列である場合、被検査物は良品であると判定し、文字列情報が被検査物上に表記される可能性のない文字列である場合、被検査物は不良品であると判定する判定手段(37)とを有する。 Moreover, according to the aspect of Claim 5 of this invention, the external appearance inspection apparatus which test | inspects the external appearance of the to-be-inspected object in which the at least 1 character string was described is provided. Such an appearance inspection apparatus obtains the degree of coincidence between an inspection image obtained by photographing an object to be inspected on which at least one character string is written and a plurality of character patterns, and the most matching character pattern among the plurality of character patterns is obtained. A character recognizing means (34) for recognizing a character to be represented as a character included in at least one character string and acquiring the position of the recognized character in the inspection image; and a plurality of characters recognized by the character recognizing means (34) A character string information acquisition means (36) for acquiring character string information as a recognition result of at least one character string by determining the order of the plurality of characters based on the positional relationship of the characters; Is a character string that can be written on the inspection object, it is determined that the inspection object is a non-defective product, and the character string information is a character string that is not likely to be displayed on the inspection object. If inspected And a determining means and is defective (37).

た、係る外観検査装置は、文字列情報が誤りであると判定された場合、文字列情報に含まれる何れかの文字と最も一致した文字パターンを削除する文字パターン削除手段(38)をさらに有することが好ましい。 Also, engagement Ru appearance inspection apparatus, when the character string information is determined to be erroneous, the character pattern deletion means for deleting one of the most matched character pattern with the character included in the character string information (38) Furthermore, it is preferable to have.

また、本発明の請求項に記載の形態によれば、少なくとも一つの文字列が表記された被検査物を撮影した検査画像から、被検査物上に表記された文字列を認識する文字認識方法が提供される。係る文字認識方法は、
検査画像と、複数の文字パターンとの一致度を求めて、複数の文字パターンのうちの最も一致する文字パターンが表す文字を少なくとも一つの文字列に含まれる文字として認識し、且つその認識された文字の検査画像中の位置を取得するステップと、認識された複数の文字の位置関係に基づいて、その複数の文字の順序を決定することにより、少なくとも一つの文字列の認識結果である文字列情報を取得するステップと、文字列情報が被検査物上に表記される可能性のある文字列である場合、文字列情報は正しいと判定し、文字列情報が被検査物上に表記される可能性のない文字列である場合、文字列情報は誤りであると判定するステップとを有する。
Further, according to the embodiment of claim 6 of the present invention, the inspection image obtained by photographing at least an inspection object single string is denoted recognizes character recognition strings, labeled on the test object A method is provided. The character recognition method is
The degree of coincidence between the inspection image and the plurality of character patterns is obtained, and the character represented by the most matching character pattern among the plurality of character patterns is recognized as a character included in at least one character string, and the character is recognized. A character string that is a recognition result of at least one character string by obtaining a position of the character in the inspection image and determining the order of the plurality of characters based on the positional relationship of the recognized characters. When obtaining the information and the character string information is a character string that may be written on the inspection object, it is determined that the character string information is correct, and the character string information is displayed on the inspection object If the character string has no possibility, the character string information is determined to be erroneous.

た、係る文字認識方法は、文字列情報が誤りであると判定された場合、文字列情報に含まれる何れかの文字と最も一致した文字パターンを削除するステップをさらに有することが好ましい。 Also, engagement Ru character recognition method, when the character string information is determined to be erroneous, may further include a step of deleting the most matched character pattern with any of the characters included in the character string information.

なお、上記各手段に付した括弧内の符号は、後述する実施形態に記載の具体的手段との対応関係を示す一例である。   In addition, the code | symbol in the parenthesis attached | subjected to each said means is an example which shows a corresponding relationship with the specific means as described in embodiment mentioned later.

以下、図面を参照しつつ本発明に係る文字認識装置について詳細に説明する。
本発明を適用した文字認識装置は、一例として、車載エンジンに燃料を供給するポンプユニットの生産ラインに設置され、そのポンプユニットの部品(ワーク)の表面に刻印された、型番、製造年月日など、所定の大きさ及び所定の字体の文字列を、予め用意した文字パターンテンプレートとのパターンマッチングにより認識するものである。そして、文字認識装置は、認識された文字列が、ワークに刻印されるはずのない文字列であった場合に、その認識された文字列に含まれる文字の認識に用いられた文字パターンテンプレートを削除することにより、認識率の向上を図ったものである。さらに、この文字認識装置は、認識した文字列の正誤に基づいて、ワークの良否を判定する外観検査装置としても機能するものである。
Hereinafter, a character recognition device according to the present invention will be described in detail with reference to the drawings.
A character recognition device to which the present invention is applied is, for example, installed in a production line of a pump unit that supplies fuel to an in-vehicle engine, and is stamped on the surface of a part (work) of the pump unit. For example, a character string having a predetermined size and a predetermined font is recognized by pattern matching with a character pattern template prepared in advance. Then, when the recognized character string is a character string that should not be engraved on the workpiece, the character recognition device determines the character pattern template used for recognizing the character included in the recognized character string. By deleting, the recognition rate is improved. Furthermore, this character recognition device also functions as an appearance inspection device that determines the quality of the workpiece based on the correctness of the recognized character string.

図1に、本発明を適用した文字認識装置1の構成ブロック図を示す。
本発明を適用した文字認識装置1は、被検査物であるワーク5を撮影し、検査画像を取得する撮像部2と、検査画像に基づいてワーク5表面に刻印された文字列を認識し、且つ文字認識装置の制御を行う処理部3と、ワーク5に刻印されている型番などを記憶する文字列判定情報記憶部4とを有する。
以下、文字認識装置1の各部について詳細に説明する。
FIG. 1 shows a configuration block diagram of a character recognition apparatus 1 to which the present invention is applied.
The character recognition device 1 to which the present invention is applied recognizes a character string stamped on the surface of the workpiece 5 based on the imaging unit 2 that captures an inspection image by imaging the workpiece 5 that is an inspection object, In addition, it includes a processing unit 3 that controls the character recognition device, and a character string determination information storage unit 4 that stores a model number or the like imprinted on the workpiece 5.
Hereinafter, each part of the character recognition device 1 will be described in detail.

撮像部2は、ワーク5の表面に刻印された文字列を撮影し、検査画像を取得する。また撮像部2は、文字列全体が検査画像に含まれ、且つその文字列に含まれる個々の文字が識別できるように撮影する。そのために、撮像部2は、CCD、C−MOSセンサなどの光電変換器で構成された2次元検出器と、その2次元検出器上にワーク5表面の像を結像する結像光学系を有する。本実施形態では、2次元検出器として、640×480画素の2/3インチCCDを用いた。また、検査画像上において、ワーク5表面に刻印された文字の1文字当たりの画素数が、横60画素×縦80画素となるように、結像光学系の焦点距離及びワーク5から撮像部までの距離を設定した。しかし、撮像部2を、異なる画素数及び画面サイズを有する2次元検出器で構成してもよい。また、検査画像上で各文字の特徴が判別できる範囲で、1文字当たりの画素数が上記と異なるように結像光学系などの構成を変更してもよい。さらに、撮像部2は、ワーク5を照明する照明光源を有してもよい。   The imaging unit 2 captures a character string stamped on the surface of the workpiece 5 and acquires an inspection image. Further, the imaging unit 2 captures an image so that the entire character string is included in the inspection image and individual characters included in the character string can be identified. For this purpose, the imaging unit 2 includes a two-dimensional detector composed of a photoelectric converter such as a CCD or C-MOS sensor, and an imaging optical system that forms an image of the surface of the workpiece 5 on the two-dimensional detector. Have. In the present embodiment, a 2/3 inch CCD having 640 × 480 pixels is used as the two-dimensional detector. Further, on the inspection image, the focal length of the imaging optical system and the work 5 to the imaging unit are set so that the number of pixels per character of the character imprinted on the surface of the work 5 is 60 pixels wide × 80 pixels long. Set the distance. However, you may comprise the imaging part 2 with the two-dimensional detector which has a different pixel count and screen size. In addition, the configuration of the imaging optical system or the like may be changed so that the number of pixels per character is different from the above within a range where the characteristics of each character can be determined on the inspection image. Furthermore, the imaging unit 2 may include an illumination light source that illuminates the workpiece 5.

図2に、撮像部2で取得される検査画像の概略図を示す。図2において、検査画像200に撮影されたワーク5の表面には、文字列として、ワーク5の型番情報201と、製造年月日情報202とが刻印されている。本実施形態において、型番情報201は、4桁の数値で表される。また、製造年月日情報202は、2段になった文字列であり、上段に製造日を示す2桁の数値が表され、下段には左から順に、製造月を示す2桁の数値と、製造年を示す1文字のアルファベット(例えば、製造年が2005年の場合、'G'とし、2006年の場合、'H'というように表す)が表記される。
取得された検査画像は、処理部3へ送信される。
FIG. 2 shows a schematic diagram of an inspection image acquired by the imaging unit 2. In FIG. 2, model number information 201 and manufacturing date information 202 of the workpiece 5 are engraved on the surface of the workpiece 5 photographed in the inspection image 200 as a character string. In the present embodiment, the model number information 201 is represented by a 4-digit numerical value. The date of manufacture information 202 is a character string having two columns, the upper row shows a two-digit numerical value indicating the date of manufacture, and the lower row is a two-digit numerical value indicating the manufacturing month in order from the left. , A one-letter alphabet indicating the year of manufacture (for example, “G” if the year of manufacture is 2005, and “H” if it is 2006) is written.
The acquired inspection image is transmitted to the processing unit 3.

処理部3は、撮像部2から取得した検査画像を解析して、ワーク5の表面に刻印された文字列を認識する。そして、その認識結果を、文字列判定情報記憶部4から取得した、ワーク5に刻印されているべき文字列判定情報と比較して、認識された文字列が正しいか否かを判定する。   The processing unit 3 analyzes the inspection image acquired from the imaging unit 2 and recognizes a character string stamped on the surface of the workpiece 5. Then, the recognition result is compared with the character string determination information to be stamped on the work 5 acquired from the character string determination information storage unit 4, and it is determined whether or not the recognized character string is correct.

文字列判定情報記憶部4は、生産ラインの管理又は制御に用いられるサーバ及びサーバに接続されたハードディスクなどで構成され、生産ライン上を流れるワークの型番情報、製造年月日情報を記憶する。また、文字列判定情報記憶部4は、処理部3と通信回線を通じて接続され、互いにデータを送受信可能となっている。そして、処理部3からの要求に応じて、ワークの型番情報、製造年月日情報を処理部3に送信する。また文字列判定情報記憶部4は、処理部3から、認識された文字列、その認識された文字列の正誤判定結果及びワーク5の良否判定結果を受信する。   The character string determination information storage unit 4 includes a server used for production line management or control, a hard disk connected to the server, and the like, and stores model number information and manufacturing date information of a workpiece flowing on the production line. The character string determination information storage unit 4 is connected to the processing unit 3 through a communication line, and can transmit and receive data to and from each other. Then, in response to a request from the processing unit 3, the workpiece model number information and manufacturing date information are transmitted to the processing unit 3. Further, the character string determination information storage unit 4 receives the recognized character string, the correctness / incorrectness determination result of the recognized character string, and the quality determination result of the work 5 from the processing unit 3.

以下、処理部3について詳細に説明する。図3に、処理部3の機能ブロック図を示す。図3に示すように、処理部3は、制御手段31、通信手段32、記憶手段33、文字認識手段34、計数手段35、文字列情報取得手段36、判定手段37及び文字パターン削除手段38を有する。処理部3は、例えば、パーソナルコンピュータ(PC)、その周辺機器及びPC上で動作するコンピュータプログラムで構成される。   Hereinafter, the processing unit 3 will be described in detail. FIG. 3 shows a functional block diagram of the processing unit 3. As shown in FIG. 3, the processing unit 3 includes a control unit 31, a communication unit 32, a storage unit 33, a character recognition unit 34, a counting unit 35, a character string information acquisition unit 36, a determination unit 37, and a character pattern deletion unit 38. Have. The processing unit 3 includes, for example, a personal computer (PC), its peripheral devices, and a computer program that operates on the PC.

制御手段31は、PCの中央演算装置(CPU)と、リードオンリーメモリ(ROM)、ランダムアクセスメモリ(RAM)などの半導体メモリなどで構成され、CPUに読み込まれたコンピュータプログラムにしたがって動作し、撮像部2及び処理部3の各手段を制御する。また、通信手段32は、処理部3と、撮像部2及び文字列判定情報記憶部4との間で制御信号、画像データあるいはデータ信号を送受信する入出力インタフェースであり、USB、SCSI、RS232C、イーサネット(登録商標)などの各種の通信インタフェース回路及びそれらを駆動するドライバソフトウェアで構成される。そして、処理部3は、通信手段32を通じて撮像部2から検査画像を受信する。一方、制御手段31で生成された制御信号は、通信手段32を通じて撮像部2へ送信される。さらに、通信手段32は、検査画像に基づいて認識された文字列、その正誤判定結果及びワーク5の良否判定結果を、操作表示部(図示せず)や、文字列判定情報記憶部4など外部の機器へ出力する。   The control means 31 is composed of a central processing unit (CPU) of a PC, a semiconductor memory such as a read only memory (ROM), a random access memory (RAM), etc., and operates according to a computer program read into the CPU, Each unit of the unit 2 and the processing unit 3 is controlled. The communication unit 32 is an input / output interface that transmits and receives control signals, image data, or data signals between the processing unit 3 and the imaging unit 2 and the character string determination information storage unit 4, and includes USB, SCSI, RS232C, It comprises various communication interface circuits such as Ethernet (registered trademark) and driver software for driving them. Then, the processing unit 3 receives the inspection image from the imaging unit 2 through the communication unit 32. On the other hand, the control signal generated by the control unit 31 is transmitted to the imaging unit 2 through the communication unit 32. Further, the communication means 32 displays the character string recognized based on the inspection image, the correctness / incorrectness determination result, and the quality determination result of the work 5 on the operation display unit (not shown), the character string determination information storage unit 4 or the like. Output to other devices.

記憶手段33は、ランダムアクセスメモリ(RAM)、又は磁気ディスク、光ディスク若しくはフラッシュメモリなどの不揮発性メモリで構成され、撮像部2から受信した検査画像を一時的に記憶する。また、記憶手段33は、処理部3の制御を行うプログラムなどを記憶する。   The storage unit 33 is configured by a random access memory (RAM) or a nonvolatile memory such as a magnetic disk, an optical disk, or a flash memory, and temporarily stores an inspection image received from the imaging unit 2. Further, the storage unit 33 stores a program for controlling the processing unit 3 and the like.

さらに、記憶手段33は、ワーク5に刻印される可能性のある各文字(例えば、アルファベット、数字、記号)に対応する文字パターンテンプレートを記憶し、文字パターン記憶手段として機能する。この文字パターンテンプレートには、刻印される文字の理想的な形状に対応するものの他、ワーク5表面の汚れなどによって文字の一部が検査画像上で識別できない場合を想定して作成された、文字の一部が欠けたパターンも含まれる。そのため、記憶手段33は、各文字に対して、複数の対応する文字パターンテンプレートを記憶する。また、記憶手段33は、文字パターンテンプレートを識別するための識別情報及び文字パターンテンプレートが対応する文字を表す文字コードを、各文字パターンテンプレートに関連付けて記憶する。   Furthermore, the storage unit 33 stores a character pattern template corresponding to each character (for example, alphabet, number, symbol) that may be imprinted on the workpiece 5, and functions as a character pattern storage unit. In this character pattern template, in addition to the one corresponding to the ideal shape of the character to be engraved, a character created assuming that a part of the character cannot be identified on the inspection image due to dirt on the surface of the work 5 Patterns lacking a part of are also included. Therefore, the storage means 33 stores a plurality of corresponding character pattern templates for each character. Further, the storage unit 33 stores identification information for identifying the character pattern template and a character code representing a character corresponding to the character pattern template in association with each character pattern template.

文字認識手段34、計数手段35、文字列情報取得手段36、判定手段37及び文字パターン削除手段38は、例えばCPU上で実行されるプログラムモジュールとして実装される。あるいは、これらの各手段を、CPUと別個に設けられた画像処理用プロセッサなどを備えた専用処理ボードとして実装してもよい。   The character recognition unit 34, the counting unit 35, the character string information acquisition unit 36, the determination unit 37, and the character pattern deletion unit 38 are implemented as program modules executed on the CPU, for example. Alternatively, each of these units may be mounted as a dedicated processing board including an image processing processor provided separately from the CPU.

文字認識手段34は、記憶手段33から文字パターンテンプレートを取得し、検査画像との間でパターンマッチングを行って、ワーク5に刻印された文字列に含まれる各文字を認識する。ここで、文字列中の複数の箇所に含まれる可能性のある文字を最初に認識すると、文字列中における認識された文字の相対的な位置が分からない限り、文字列中のどの文字が認識されたのかを確定することができない。そのため、他の文字の認識を行う場合には、改めて文字列情報が含まれている可能性のある領域全体を対象としてパターンマッチングを行わなければならず、演算処理量が多くなる。また、個々に認識された文字の位置を後で比較して、文字の並び順を調べる処理を別途行うことが必要となる。そこで、文字認識手段34は、文字列情報中の位置を最も一意に決定し易い文字を基準文字として最初に認識する。そして、他の文字については、文字認識手段34は、認識しようとする文字と基準文字との相対的な位置関係に基づいて探索領域を限定し、その限定された探索領域内でパターンマッチングを行って、その文字を認識する。このようにして認識を行うことにより、認識された各文字の位置関係も予め分かっているため、文字の並び順を改めて調べる必要がない。   The character recognizing unit 34 acquires a character pattern template from the storage unit 33, performs pattern matching with the inspection image, and recognizes each character included in the character string stamped on the work 5. Here, when a character that may be included in multiple places in a character string is recognized first, which character in the character string is recognized unless the relative position of the recognized character in the character string is known. It is not possible to determine if it was done. Therefore, when recognizing other characters, pattern matching must be performed for the entire area that may possibly contain character string information, which increases the amount of calculation processing. Further, it is necessary to separately perform processing for comparing the positions of individually recognized characters and checking the order of characters. Therefore, the character recognizing means 34 first recognizes a character that can most uniquely determine the position in the character string information as a reference character. For other characters, the character recognition means 34 limits the search area based on the relative positional relationship between the character to be recognized and the reference character, and performs pattern matching within the limited search area. To recognize the character. By performing the recognition in this way, the positional relationship between the recognized characters is also known in advance, so there is no need to check the character arrangement order anew.

再度図2を参照すると、本実施形態では、ワーク5上には、認識対象となる文字列として、3行の文字列が含まれ、各行が複数の文字を含んでいる。このうち、製造年月日情報202の製造年を表す文字203のみがアルファベット文字であり、それ以外は、全て数字である。そこで、文字認識手段34は、製造年を表すアルファベット文字203を基準文字として、最初に認識する。その後、製造年月日情報202の他の文字及び型番情報201の各文字を、文字の並び順に従って認識する。   Referring to FIG. 2 again, in this embodiment, the work 5 includes a character string of three lines as a character string to be recognized, and each line includes a plurality of characters. Of these, only the character 203 representing the year of manufacture in the date of manufacture information 202 is an alphabetic character, and all other characters are numbers. Therefore, the character recognition unit 34 first recognizes the alphabet character 203 representing the year of manufacture as a reference character. Thereafter, the other characters of the manufacturing date information 202 and the characters of the model number information 201 are recognized in accordance with the arrangement order of the characters.

図4(a)〜(e)に、本実施形態で使用される文字パターンテンプレートの例を示す。図4(a)〜(d)は、数字の‘6’を認識するための文字パターンテンプレートを示す。このうち、図4(a)に示す文字パターンテンプレートは、ワーク5の表面に汚れや傷の無い状態を想定した作成されたものであり、文字と背景との輝度差が比較的大きくなっている。一方、図4(b)〜図4(d)に示す文字パターンテンプレートは、ワーク5の表面に汚れ又は傷がある状態を想定して作成されたものであり、文字と背景との輝度差を比較的に小さくしたり、文字の一部を背景と区別できなくしたものである。また、図4(e)は、数字の‘9’を認識するための文字パターンテンプレートを示す。そして、図4(e)に示す文字パターンテンプレートは、図4(a)〜(d)の文字パターンテンプレートが、実際の検査画像から切り出して作成されたものであるのに対し、ワーク5の表面に刻印される文字のフォント及びサイズに基づいてコンピュータ上で作成された、理想的な文字の画像に相当する文字パターンテンプレートである。以下、このような文字パターンテンプレートを、デフォルトの文字パターンテンプレートという。   4A to 4E show examples of character pattern templates used in this embodiment. 4A to 4D show a character pattern template for recognizing the numeral “6”. Among these, the character pattern template shown in FIG. 4A is created assuming that the surface of the work 5 is free from dirt and scratches, and the brightness difference between the character and the background is relatively large. . On the other hand, the character pattern template shown in FIGS. 4B to 4D is created assuming that the surface of the work 5 has dirt or scratches, and the brightness difference between the character and the background is calculated. It is relatively small or part of characters cannot be distinguished from the background. FIG. 4E shows a character pattern template for recognizing the numeral “9”. The character pattern template shown in FIG. 4 (e) is created by cutting out the character pattern template shown in FIGS. 4 (a) to 4 (d) from an actual inspection image. This is a character pattern template corresponding to an ideal character image created on a computer on the basis of the font and size of the character stamped on the character. Hereinafter, such a character pattern template is referred to as a default character pattern template.

文字認識手段34は、検査画像と各文字パターンテンプレートの相対的な位置及び角度を探索領域内で変更しつつ、パターンマッチングにより一致度を求める。そして文字認識手段34は、その一致度が最大となる文字パターンテンプレートを特定し、一致度が最大となるときの文字パターンテンプレートの位置を求める。さらに、一致度が最大となるとき、すなわち、検査画像と文字パターンテンプレートが最良の一致となるとき、文字認識手段34は、その文字パターンテンプレートが表す文字がワーク5に刻印されているものとする。なお、一致度(相関係数)は、例えば、以下の式を用いて求めることができる。   The character recognizing means 34 obtains the degree of coincidence by pattern matching while changing the relative position and angle of the inspection image and each character pattern template within the search area. Then, the character recognition unit 34 specifies the character pattern template that maximizes the matching degree, and obtains the position of the character pattern template when the matching degree is maximized. Furthermore, when the degree of coincidence is maximized, that is, when the inspection image and the character pattern template are the best match, the character recognition unit 34 assumes that the character represented by the character pattern template is imprinted on the workpiece 5. . Note that the degree of coincidence (correlation coefficient) can be obtained using, for example, the following equation.

ここでrは一致度であり、I、Mはそれぞれ検査画像及び文字パターンテンプレートの画素値を表す。また、Nは文字パターンテンプレートに含まれる画素数を表す。この式において、検査画像と文字パターンテンプレートが完全に一致する場合、一致度r=1となり、検査画像と文字パターンテンプレートに全く相関が無い場合、一致度r=0となる。 Here, r is the degree of coincidence, and I and M represent pixel values of the inspection image and the character pattern template, respectively. N represents the number of pixels included in the character pattern template. In this expression, when the inspection image and the character pattern template completely match, the matching degree r = 1, and when there is no correlation between the inspection image and the character pattern template, the matching degree r = 0.

本実施形態では、基準文字からの横m文字、縦n文字離れた位置にある文字を認識する場合、探索領域は、以下のように設定される。まず、探索領域の中心画素(xc,yc)は、基準文字の中心座標を(x0,y0)とすると、上記のように、検査画像上で1文字当たりの画素数が横60画素、縦80画素であるため、xc=x0+60m、yc=y0+80nとなる。そして、探索領域は、(xc,yc)を中心として、上下左右方向にそれぞれ±30画素の広さを有する領域とする。例えば、図2に示すように、製造年月日情報202の左上端の文字に対して設定される探索領域204については、基準文字203から左側に2文字、上側に1文字の位置にあるので、xc=x0-120、yc=y0-80となる。 In this embodiment, when recognizing a character at a position separated by m characters horizontally and n characters vertically from the reference character, the search area is set as follows. First, the center pixel (x c , y c ) of the search region has a horizontal pixel count of 60 per character on the inspection image as described above, assuming that the center coordinates of the reference character are (x 0 , y 0 ). Since there are 80 pixels in the vertical direction, x c = x 0 +60 m and y c = y 0 +80 n. The search area is an area having a width of ± 30 pixels in the vertical and horizontal directions with (x c , y c ) as the center. For example, as shown in FIG. 2, the search area 204 set for the upper left character of the manufacturing date information 202 is located at two characters on the left side and one character on the upper side from the reference character 203. , X c = x 0 -120, y c = y 0 -80.

なお、文字認識手段34は、予めムラ補正処理、ノイズ除去処理などの前処理を行ってから、パターンマッチングを行うようにしてもよい。本実施形態では、ノイズ除去処理として、ワーク5の表面に存在するゲートの削り痕など、予め形状が想定されるノイズのパターンを、パターンマッチングにより検出し、ノイズのパターンに相当する画素の値を背景部分の平均画素値などに書き換えることにより除去する。あるいは、ノイズ除去処理として、ガウシアンフィルタなどのフィルタを用いて検査画像をフィルタリングするなど、公知の方法を用いてもよい。   The character recognition unit 34 may perform pattern matching after performing preprocessing such as unevenness correction processing and noise removal processing in advance. In this embodiment, as noise removal processing, a noise pattern whose shape is assumed in advance, such as a shaving mark on a gate existing on the surface of the workpiece 5, is detected by pattern matching, and a pixel value corresponding to the noise pattern is calculated. It is removed by rewriting the average pixel value of the background portion. Alternatively, as a noise removal process, a known method such as filtering an inspection image using a filter such as a Gaussian filter may be used.

また、文字認識手段34は、検査画像に対してエッジ検出処理を行って、エッジパターン画像を作成し、そのエッジパターン画像と文字パターンテンプレートとの間でパターンマッチングを行ってもよい。さらに、文字認識手段34は、検査画像を2値化あるいは上記のエッジパターン画像を2値化した2値化画像と、文字パターンテンプレートとの間でパターンマッチングを行ってもよい。なお、このようにエッジ画像を用いてパターンマッチングを行う場合には、文字パターンテンプレートも文字のエッジを抽出したエッジパターンとすることが好ましい。同様に、2値化画像を用いてパターンマッチングを行う場合には、文字パターンテンプレートも文字部分と背景部分とが異なる値を持つように2値化したパターンとすることが好ましい。   The character recognition unit 34 may perform edge detection processing on the inspection image to create an edge pattern image, and perform pattern matching between the edge pattern image and the character pattern template. Further, the character recognition unit 34 may perform pattern matching between the character pattern template and the binarized image obtained by binarizing the inspection image or binarizing the edge pattern image. When pattern matching is performed using the edge image in this way, it is preferable that the character pattern template is also an edge pattern obtained by extracting the edge of the character. Similarly, when pattern matching is performed using a binarized image, the character pattern template is preferably a binarized pattern so that the character portion and the background portion have different values.

また、文字認識手段34は、文字パターンテンプレートのうち、認識精度が高いと考えられる一部の文字パターンテンプレートのみをパターンマッチングに使用するようにしてもよい。具体的に、文字認識手段34は、所定の文字に対応する複数の文字パターンテンプレートのうち、使用回数の多い方から一定数のものだけをパターンマッチングに使用してもよい。例えば、‘0’という文字に対して、10個の文字パターンテンプレートが存在する場合、文字認識手段34は、そのうちの使用回数が多い方、すなわち、検査画像中の文字と最良の一致となった回数が多い方の5個の文字パターンテンプレートのみをパターンマッチングに使用することができる。   Further, the character recognition means 34 may use only a part of character pattern templates considered to have high recognition accuracy among the character pattern templates for pattern matching. Specifically, the character recognizing unit 34 may use only a certain number of the plurality of character pattern templates corresponding to a predetermined character from the most frequently used ones for pattern matching. For example, when there are 10 character pattern templates for the character “0”, the character recognition means 34 has the best match with the character that is used more frequently, that is, the character in the inspection image. Only the five character pattern templates with the larger number of times can be used for pattern matching.

また、文字認識手段34は、所定の文字を表す複数の文字パターンテンプレートのうち、使用回数の多い方から一定数のものだけを用いて1回目のパターンマッチングを行い、得られた一致度が何れも所定の閾値を超えない場合のみ、残りの文字パターンテンプレートを用いてパターンマッチングを行うようにしてもよい。なお、所定の閾値は、例えば、上記の(1)式で一致度を求める場合において、0.8とすることができる。このように、一部の文字パターンテンプレートのみを用いてパターンマッチングを行うことにより、パターンマッチング処理に要する計算量を減らすことができるので、文字認識に要する処理時間を短縮することができる。なお、各文字パターンテンプレートの使用回数の算出については、後述する。また、上記のように、使用回数に基づいて一部の文字パターンテンプレートのみを使用する場合、文字認識装置1は、一定期間、例えば1日、1週間といった期間、全ての文字パターンテンプレートを用いて文字認識を行って、各文字パターンテンプレートの使用回数がある程度大きな数となってから、使用する文字パターンテンプレートを選択することが好ましい。   In addition, the character recognition unit 34 performs the first pattern matching using only a certain number of the plurality of character pattern templates representing a predetermined character from the most frequently used ones. Only when the predetermined threshold value is not exceeded, pattern matching may be performed using the remaining character pattern template. The predetermined threshold value can be set to 0.8, for example, when the degree of coincidence is obtained by the above equation (1). Thus, by performing pattern matching using only some character pattern templates, the amount of calculation required for the pattern matching process can be reduced, so that the processing time required for character recognition can be shortened. The calculation of the number of times each character pattern template is used will be described later. As described above, when only a part of the character pattern template is used based on the number of times of use, the character recognition device 1 uses all the character pattern templates for a certain period, for example, a period of one day or one week. It is preferable to select a character pattern template to be used after character recognition is performed and the number of times each character pattern template is used becomes large to some extent.

文字認識手段34は、全ての文字について認識を終えると、各文字と最も一致度が高くなった文字テンプレートを表す識別情報、一致度の値及び各文字の位置を記憶手段33に記憶する。   When the recognition of all the characters is completed, the character recognition unit 34 stores the identification information indicating the character template having the highest matching degree with each character, the value of the matching degree, and the position of each character in the storage unit 33.

計数手段35は、各文字パターンテンプレートについて、文字認識手段34にて検査画像上の文字と最も一致度が高くなった、すなわち、検査画像上の文字の検出に使用された回数をカウントする。例えば、図4(e)に示した、数字の‘9’を表す文字テンプレートが、図2に示した検査画像中の2行目の‘9’の文字に対して最も一致度が高くなった場合、計数手段35は、その文字テンプレートの使用回数を1だけ増やす。また、1回の検査において、一つの文字テンプレートが、検査画像中の複数の文字に対して、最も一致度が高くなった場合には、計数手段35は、その文字テンプレートの使用回数をその文字数分だけ増やす。例えば、図2に示した検査画像中の各行に含まれる5個の‘0’の文字に対して、同一の文字テンプレートが最も一致した場合には、計数手段35は、その文字テンプレートの使用回数を5増やす。
なお、この使用回数は、各文字テンプレートの生成時からの通算としてもよく、あるいは、一定期間(例えば、1週間、1ヶ月といった固定期間、若しくは、ワーク5について、同一のロッドが検査対象となっている間)経過する毎に一旦クリアして0に戻すようにしてもよい。
For each character pattern template, the counting unit 35 counts the number of times that the character recognition unit 34 has the highest degree of coincidence with the character on the inspection image, that is, the number of times used to detect the character on the inspection image. For example, the character template representing the number “9” shown in FIG. 4E has the highest degree of matching with the character “9” in the second line in the inspection image shown in FIG. In this case, the counting means 35 increases the number of times the character template is used by one. When one character template has the highest degree of coincidence with respect to a plurality of characters in the inspection image in one inspection, the counting unit 35 sets the number of times the character template is used as the number of characters. Increase by minutes. For example, when the same character template most closely matches the five '0' characters included in each line in the inspection image shown in FIG. 2, the counting means 35 counts the number of times the character template is used. Increase by 5.
The number of times of use may be the total from the time of generation of each character template, or a fixed period (for example, a fixed period such as one week or one month, or the same rod for the work 5 is to be inspected. It may be cleared once to elapse and return to 0 each time.

計数手段35は、計数した使用回数を、文字認識手段34及び文字パターン削除手段38が参照できるようにするために、対応する文字パターンテンプレートに関連付けて記憶手段33に記憶する。   The counting means 35 stores the counted number of uses in the storage means 33 in association with the corresponding character pattern template so that the character recognition means 34 and the character pattern deletion means 38 can refer to it.

文字列情報取得手段36は、文字認識手段34で認識された全ての文字の位置関係に基づいて文字の並び順を決定する。そして、文字列情報取得手段36は、決定した文字の並び順に基づいて、製造年月日、型番などを表す文字列情報を取得する。
本実施形態では、図2に示すように、ワーク5には3行に渡って文字列が表記されている。そこで、文字列情報取得手段36は、認識された文字として記憶手段33に記憶されている文字パターンテンプレートの位置情報を参照し、各文字を、y方向(縦方向)の座標値が略等しいものが同一のグループに属するように、3個のグループに分類する。グループ分けが終了すると、文字列情報取得手段36は、同一グループに属する文字について、記憶手段33に記憶されたx方向(横方向)の位置を比較し、最も左側に位置する文字から順に配列する。その後、文字列情報取得手段36は、認識された文字を表す文字パターンテンプレートに対応する文字コードを参照して、各グループごとに文字列情報を取得する。そして、文字列情報取得手段36は、1番上の行から製造日を、2番目の行から製造年月を取得して、製造年月日情報を得る。また、文字列情報取得手段36は、3番目の行から型番情報を得る。最後に、文字列情報取得手段36は、取得した文字列情報を記憶手段33に記憶する。
The character string information acquisition means 36 determines the character arrangement order based on the positional relationship of all characters recognized by the character recognition means 34. And the character string information acquisition means 36 acquires the character string information showing a manufacturing date, a model number, etc. based on the determined arrangement order of the characters.
In the present embodiment, as shown in FIG. 2, a character string is written on the work 5 over three lines. Therefore, the character string information acquisition unit 36 refers to the position information of the character pattern template stored in the storage unit 33 as the recognized character, and each character has substantially the same coordinate value in the y direction (vertical direction). Are grouped into three groups so that they belong to the same group. When the grouping is completed, the character string information acquisition unit 36 compares the positions in the x direction (horizontal direction) stored in the storage unit 33 for the characters belonging to the same group, and arranges them in order from the leftmost character. . Thereafter, the character string information acquisition unit 36 refers to the character code corresponding to the character pattern template representing the recognized character, and acquires character string information for each group. Then, the character string information acquisition unit 36 acquires the manufacturing date from the top row and the manufacturing date from the second row to obtain the manufacturing date information. Further, the character string information acquisition unit 36 obtains the model number information from the third row. Finally, the character string information acquisition unit 36 stores the acquired character string information in the storage unit 33.

判定手段37は、文字列情報取得手段36で取得された文字列情報が、有り得ない文字列でないか否かを調べることにより、その文字列情報が正しいか否かを判定する。またその判定結果に基づいて、ワーク5の良否を判定する。そのために、判定手段37は、判定の基準となる文字列判定情報を、文字列判定情報記憶部4から通信手段32を通じて取得する。文字列判定情報は、例えば、ワーク5の型番及び現在ライン上を流れているワーク5の製造年月日の範囲である。そして、認識された文字列情報を、文字列判定情報に基づいて設定される一致条件と比較する。例えば、認識された文字列情報のうちの型番情報を、文字列判定情報に含まれる型番情報と比較する。その比較の結果、1文字でも違っていれば、判定手段37は、型番情報として認識された文字列情報が誤っていると判定する。   The determination unit 37 determines whether the character string information is correct by checking whether the character string information acquired by the character string information acquisition unit 36 is not an impossible character string. Moreover, the quality of the workpiece | work 5 is determined based on the determination result. For this purpose, the determination unit 37 acquires character string determination information serving as a determination reference from the character string determination information storage unit 4 through the communication unit 32. The character string determination information is, for example, the model number of the work 5 and the date of manufacture of the work 5 flowing on the current line. Then, the recognized character string information is compared with a matching condition set based on the character string determination information. For example, the model number information in the recognized character string information is compared with the model number information included in the character string determination information. If even one character is different as a result of the comparison, the determination unit 37 determines that the character string information recognized as the model number information is incorrect.

また、判定手段37は、認識した文字列情報に含まれる製造年月日が、実際には有り得ない日付(例えば、19月、38日など)の場合、あるいは、認識された製造年月日に相当するワーク5がライン上を流れている製造年月日の範囲を外れている場合(例えば、10月製造の部品のみがライン上に存在するはずなのに、認識された製造年月日が9月以前あるいは11月以降の場合)に、製造年月日情報として認識された文字列情報が誤っていると判定する。   In addition, the determination unit 37 determines that the date of manufacture included in the recognized character string information is an actually impossible date (for example, 19th, 38th, etc.), or the recognized date of manufacture. When the corresponding work 5 is out of the manufacturing date range flowing on the line (for example, the recognized manufacturing date is September, although only the parts manufactured in October should be on the line) It is determined that the character string information recognized as the manufacturing date information is incorrect in the case of before or after November.

そして判定手段37は、製造年月日情報及び型番情報のそれぞれに、認識結果が正しいか誤っているかを表す認識結果フラグを付与する。例えば、判定手段37は、認識結果が正しいと判定した場合、認識結果フラグの値を‘1’に設定し、認識結果が誤りと判定した場合、認識結果フラグの値を‘0’に設定する。   And the determination means 37 assign | provides the recognition result flag showing whether a recognition result is right or wrong to each of manufacture date information and model number information. For example, the determination unit 37 sets the value of the recognition result flag to “1” when determining that the recognition result is correct, and sets the value of the recognition result flag to “0” when the recognition result is determined to be incorrect. .

また、判定手段37は、全ての文字列情報が正しいと判定した場合、ワーク5を良品と判定する。一方、何れかの文字列情報が誤っていると判定した場合、ワーク5を不良品と判定する。本実施形態では、判定手段37は、認識された製造年月日又は型番の何れか一方が誤っていると判定した場合、認識に失敗したことを明示するために、製造年月日を表す文字列情報及び型番を表す文字列情報の何れも、全て‘0’の文字で書き換える。従って、文字列情報に含まれる内容を参照することにより、認識された文字列情報の正誤判定結果を知ることができる。   If the determination unit 37 determines that all the character string information is correct, the determination unit 37 determines that the workpiece 5 is a non-defective product. On the other hand, when it is determined that any of the character string information is incorrect, the workpiece 5 is determined as a defective product. In this embodiment, the determination means 37, when determining that either one of the recognized manufacturing date or model number is incorrect, a character representing the manufacturing date in order to clearly indicate that the recognition has failed. Both the column information and the character string information indicating the model number are rewritten with the characters “0”. Therefore, the correctness / incorrectness determination result of the recognized character string information can be known by referring to the contents included in the character string information.

判定手段37は、認識された文字列情報及びワーク5の良否判定結果を、通信手段32を通じて操作表示部(図示せず)に送信し、ユーザにその結果を報知する。あるいは、文字列判定情報記憶部4又は生産ラインを管理するコンピュータ(図示せず)へ認識された文字列情報及びワーク5の良否判定結果を送信し、不良と判断されたワーク5をラインから除去するようにしてもよい。このように、認識された文字情報から、ワーク5が生産ライン上を流れることが予定されているものか否かを判定することができるので、生産ライン上に誤って混入されてしまった部品を排除することができる。   The determination unit 37 transmits the recognized character string information and the quality determination result of the work 5 to the operation display unit (not shown) through the communication unit 32, and notifies the user of the result. Alternatively, the recognized character string information and the quality determination result of the work 5 are transmitted to the character string determination information storage unit 4 or a computer (not shown) managing the production line, and the work 5 determined to be defective is removed from the line. You may make it do. In this way, it is possible to determine whether or not the workpiece 5 is scheduled to flow on the production line from the recognized character information, so that parts that have been mistakenly mixed on the production line can be determined. Can be eliminated.

文字パターン削除手段38は、判定手段37で誤って認識されたと判定された文字列に含まれる文字の認識に使用した文字パターンテンプレートを削除する。そこで、文字パターン削除手段38は、認識された製造年月日情報及び型番情報に付与された認識結果フラグを参照する。そして認識結果フラグが“正答”を表す値(例えば‘1’)の場合には、文字パターン削除手段38は、その文字列に関しては特に何も行わない。一方、文字パターン削除手段38は、文字列情報に付与された認識結果フラグが“誤答”を表す値(例えば‘0’)の場合、文字列情報取得手段36により、その文字列情報に対応付けられた文字パターンテンプレートの何れか又は全てを削除する。   The character pattern deleting unit 38 deletes the character pattern template used for recognizing the character included in the character string determined to have been erroneously recognized by the determining unit 37. Therefore, the character pattern deleting unit 38 refers to the recognized manufacturing date information and the recognition result flag added to the model number information. When the recognition result flag is a value indicating “correct answer” (for example, “1”), the character pattern deleting unit 38 does nothing particularly with respect to the character string. On the other hand, when the recognition result flag given to the character string information is a value indicating “wrong answer” (for example, “0”), the character pattern deleting unit 38 responds to the character string information by the character string information acquiring unit 36. Any or all of the attached character pattern templates are deleted.

ここで、文字パターン削除手段38は、誤りとされた文字列情報中、どの文字が誤認識されたか明らかな場合には、その誤認識された文字の認識に使用された文字パターンテンプレートを削除する。例えば、製造日を表す文字列の認識結果が“61”であれば、その文字列中、‘6’は有り得ない数値である。従って、文字パターン削除手段38は、その‘6’の文字の認識に使用された文字パターンテンプレートを削除する。また、図2に示した検査画像の例において、2行目の真中に刻印された、製造月を表す‘9’の文字に対して、図3(b)の文字テンプレートとの一致度が最も高くなり、製造月が“09”でなく“06”と誤認識された場合を考える。この場合において、文字列判定情報により、ワーク5の製造月が9月しかないと分かっていれば、認識された製造年月日情報のうち、製造月を表す‘6’という文字の認識結果が誤っていることが分かる。そのため、判定手段37は、認識された製造年月日情報を誤りと判定し、文字パターン削除手段38は、図3(b)の文字テンプレートを削除する。   Here, when it is clear which character has been erroneously recognized in the character string information that has been mistaken, the character pattern deletion means 38 deletes the character pattern template used to recognize the erroneously recognized character. . For example, if the recognition result of a character string representing the date of manufacture is “61”, “6” is an impossible numerical value in the character string. Therefore, the character pattern deleting means 38 deletes the character pattern template used for recognizing the “6” character. In addition, in the example of the inspection image shown in FIG. 2, the degree of coincidence with the character template of FIG. 3B is the highest for the character “9” that is engraved in the middle of the second row and represents the manufacturing month. Consider a case where the manufacturing month is erroneously recognized as “06” instead of “09”. In this case, if it is known from the character string determination information that the manufacturing month of the workpiece 5 is only September, the recognition result of the character “6” representing the manufacturing month is included in the recognized manufacturing date information. It turns out that it is wrong. Therefore, the determination unit 37 determines that the recognized manufacturing date information is incorrect, and the character pattern deletion unit 38 deletes the character template shown in FIG.

一方、文字パターン削除手段38は、誤りとされた文字列情報中、どの文字が誤認識されたか不明な場合には、その文字列に含まれる文字の認識に使用された文字パターンテンプレートのうち、最も使用回数の少ないものを削除する。例えば、製造日を表す文字列の認識結果が“39”であれば、その文字列中、‘3’が0〜2の何れかを誤って認識したのか、‘9’が0又は1の何れかを誤って認識したのか明らかでない。そこで、文字パターン削除手段38は、‘3’という文字の認識に使用された文字テンプレートの使用回数と、‘9’という文字の認識に使用された文字テンプレートの使用回数とを比較し、使用回数の少ない方の文字テンプレートを削除する。なお、文字パターン削除手段38は、何れの文字の認識が失敗したか明らかでない場合、文字パターンテンプレートの使用回数に基づいて削除する文字パターンテンプレートを決定する代わりに、一致度を用いて削除する文字パターンテンプレートを決定してもよい。この場合、文字パターン削除手段38は、誤認識と判定された文字列情報と関連付けて記憶された文字パターンテンプレートのうち、最も一致度の値が低かったものを削除する。   On the other hand, if it is not clear which character is erroneously recognized in the character string information that is regarded as an error, the character pattern deleting means 38, among the character pattern templates used for recognition of the characters included in the character string, Delete the least frequently used one. For example, if the recognition result of the character string representing the manufacturing date is “39”, whether “3” is erroneously recognized as 0 to 2 or “9” is 0 or 1 in the character string. It is not clear whether they were mistakenly recognized. Therefore, the character pattern deleting unit 38 compares the number of times of use of the character template used for recognizing the character “3” with the number of times of use of the character template used for recognizing the character “9”. Delete the character template with the smaller number. If it is not clear which character recognition has failed, the character pattern deleting unit 38 determines the character pattern template to be deleted based on the number of times the character pattern template is used, instead of determining the character pattern template to be deleted. A pattern template may be determined. In this case, the character pattern deleting unit 38 deletes the character pattern template stored in association with the character string information determined to be misrecognized and having the lowest matching value.

なお、文字パターン削除手段38は、削除対象となる文字パターンテンプレートを、記憶手段33から消去することによって削除してもよい。また、各文字パターンテンプレートに使用可否を表す使用可否フラグを関連付けて記憶手段33に記憶しておき、制御部3の各部は、文字パターンテンプレートに関連付けられた使用可否フラグを参照して、その文字パターンテンプレートを使用するか否かを判断するように構成しておけば、文字パターン削除手段38は、削除対象の文字パターンテンプレートに対応する使用可否フラグの値を、使用不可を表す値に書き換えるだけでもよい。このように構成することで、例えば、検査対象のワークについて、ロッドが変わったときに、使用不可とされた文字パターンテンプレートについても、使用可否フラグの値を書き換えるだけで再度使用することが可能となる。そのため、状況に応じて、使用するテンプレートと使用すべきでないテンプレートを選別することができる。   The character pattern deleting unit 38 may delete the character pattern template to be deleted by deleting it from the storage unit 33. In addition, an availability flag indicating availability is associated with each character pattern template and stored in the storage unit 33, and each unit of the control unit 3 refers to the availability flag associated with the character pattern template to determine the character. If it is configured to determine whether or not to use the pattern template, the character pattern deleting unit 38 only rewrites the value of the availability flag corresponding to the character pattern template to be deleted to a value indicating that the pattern template cannot be used. But you can. By configuring in this way, for example, for a workpiece to be inspected, a character pattern template that is disabled when the rod changes can be used again simply by rewriting the value of the availability flag. Become. Therefore, a template to be used and a template that should not be used can be selected according to the situation.

また、所定の文字パターンテンプレートについては、絶対に削除されないように設定してもよい。例えば、図4(e)に示すようなデフォルトの文字パターンテンプレートを削除されないように設定することができる。このような設定を行うことにより、特定の文字を表す文字テンプレートが全て削除されてしまうという不具合を生じるおそれをなくすことができる。   Further, the predetermined character pattern template may be set so as not to be deleted. For example, a default character pattern template as shown in FIG. 4E can be set not to be deleted. By performing such a setting, it is possible to eliminate the possibility of causing a problem that all character templates representing specific characters are deleted.

図5及び図6を参照しつつ、本発明を適用した文字認識装置1の動作について説明する。なお、文字認識装置1の動作は、処理部3の制御手段31によって制御される。   The operation of the character recognition apparatus 1 to which the present invention is applied will be described with reference to FIGS. The operation of the character recognition device 1 is controlled by the control means 31 of the processing unit 3.

図5に示すように、検査が開始されると、撮像部2は、ワーク5の文字が刻印された面を撮影し、検査画像を取得する(ステップS101)。検査画像は、処理部3に送信される。そして、処理部3の文字認識手段34は、検査画像に対してノイズ除去処理を行う(ステップS102)。その後、文字認識手段34は、記憶手段33から文字パターンテンプレートを読み出す(ステップS103)。そして、文字認識手段34は、基準文字の種類に対応する文字パターンテンプレート(本実施形態では、アルファベット文字のうち、予め製造年の表記に用いられると分かっているもの)のみを用いて、検査画像とパターンマッチングを行い、基準文字を認識し、その位置を決定する(ステップS104)。   As shown in FIG. 5, when the inspection is started, the imaging unit 2 captures an image of the surface of the workpiece 5 on which characters are engraved, and acquires an inspection image (step S101). The inspection image is transmitted to the processing unit 3. Then, the character recognition unit 34 of the processing unit 3 performs noise removal processing on the inspection image (step S102). Thereafter, the character recognition unit 34 reads the character pattern template from the storage unit 33 (step S103). Then, the character recognition means 34 uses only the character pattern template corresponding to the type of the reference character (in this embodiment, an alphabetic character that is known in advance to be used for notation of the year of manufacture), and uses the inspection image. Pattern matching is performed, the reference character is recognized, and its position is determined (step S104).

基準文字の位置が決定されると、文字認識手段34は、ワーク5上に刻印されている文字列に含まれる文字のうち、所定の順番に従って認識対象とする文字の位置を決定する(ステップS105)。なお、所定の順番は、例えば左上端の文字を最初とし、その後左から右に順に選択して右端の文字に到達したら、一段下の行に移動して再度左端の文字から順に選択するものとすることができる。認識対象の文字の位置が決定されると、文字認識手段34は、基準文字からの距離及び方向に基づいて検査画像上に探索領域を設定する(ステップS106)。そして、文字認識手段34は、その探索領域内で、各文字パターンテンプレートと検査画像とのパターンマッチングを行い、最良の一致を示す文字パターンテンプレートを決定する(ステップS107)。   When the position of the reference character is determined, the character recognition unit 34 determines the position of the character to be recognized according to a predetermined order among the characters included in the character string stamped on the workpiece 5 (step S105). ). The predetermined order is, for example, starting with the upper left character first, then selecting from left to right in order and reaching the right end character, moving to the next lower row and selecting again from the left end character again can do. When the position of the character to be recognized is determined, the character recognition unit 34 sets a search area on the inspection image based on the distance and direction from the reference character (step S106). Then, the character recognition means 34 performs pattern matching between each character pattern template and the inspection image within the search area, and determines a character pattern template that shows the best match (step S107).

その後、文字認識手段34は、ワーク5上に刻印されている全ての文字が認識されたか否かを判定する(ステップS108)。まだ認識されていない文字が有る場合には、制御をステップS105の前に戻し、ステップS105〜S108の処理を繰り返す。一方、ステップS108において、全ての文字が認識されたと判定されると、処理部3の計数手段35は、検査画像中に刻印された文字の認識に使用された文字パターンテンプレートの使用回数を計数する。言い換えれば、計数手段35は、各文字パターンテンプレートについて、検査画像中に刻印された文字の何れかと最良の一致を示した回数を計数する(ステップS109)。   Thereafter, the character recognition means 34 determines whether or not all characters stamped on the workpiece 5 have been recognized (step S108). If there is an unrecognized character, the control is returned to before step S105, and the processes of steps S105 to S108 are repeated. On the other hand, if it is determined in step S108 that all characters have been recognized, the counting unit 35 of the processing unit 3 counts the number of times the character pattern template used for recognizing the characters imprinted in the inspection image is used. . In other words, the counting means 35 counts the number of times that each character pattern template shows the best match with any of the characters imprinted in the inspection image (step S109).

図6に示すように、ステップS109の後、文字列情報取得手段36は、認識された各文字に対応する文字パターンテンプレートの位置情報及びその文字パターンテンプレートの文字コードに基づいて、文字列情報(すなわち、製造年月日情報、型番情報)を検出する(ステップS110)。   As shown in FIG. 6, after step S109, the character string information acquisition unit 36 performs character string information (based on the position information of the character pattern template corresponding to each recognized character and the character code of the character pattern template. That is, manufacturing date information and model number information are detected (step S110).

文字列情報が検出されると、処理部3の判定手段37は、文字列判定情報記憶部4からワーク5の型番、製造年月日の範囲など、ワーク5に刻印されているべき文字列判定情報を取得する(ステップS111)。そして、認識された文字列情報が、文字列判定情報に基づいて定められる所定の一致条件を満たすか否かを判定する(ステップS112)。なお、所定の一致条件を満たす場合とは、上記のように、認識された文字列情報と文字列判定情報が完全に一致する場合である。あるいは、認識された文字列情報が、文字列判定情報で定められる範囲に含まれる場合である。   When the character string information is detected, the determination unit 37 of the processing unit 3 determines the character string to be imprinted on the work 5 such as the model number of the work 5, the date of manufacture, and the like from the character string determination information storage unit 4. Information is acquired (step S111). Then, it is determined whether or not the recognized character string information satisfies a predetermined matching condition determined based on the character string determination information (step S112). The case where the predetermined matching condition is satisfied is a case where the recognized character string information and the character string determination information completely match as described above. Alternatively, the recognized character string information is included in a range determined by the character string determination information.

ステップS112において、判定手段37は、認識された文字列情報が、所定の一致条件を満たすと判断した場合、ワーク5を良品と判定し、認識された文字列情報及びワーク5の良否判定結果を操作表示部などに出力する(ステップS113)。なお、認識された文字列情報に、複数の文字列情報が含まれる場合には、各文字列情報について一致条件を満たすか否か判定し、全ての文字列情報について所定の一致条件を満たす場合、ワーク5を良品と判定する。このように、複数の文字列情報を含む場合には、各文字列情報に対する一致条件は異なっていてもよい。一方、ステップS112において、認識された文字列情報が所定の一致条件を満たさない場合、判定手段37は、ワーク5を不良品と判定し、その判定結果及び全て‘0’に書き換えた文字列情報を出力する(ステップS114)。その後、文字パターン削除手段38は、誤りと判定された文字列情報に含まれる文字の認識に使用された文字パターンテンプレートから、誤認識したと考えられる文字パターンテンプレートを削除する(ステップS115)。
ステップS113若しくはステップS115の後、文字認識装置1は処理を終了する。
In step S112, when the determination unit 37 determines that the recognized character string information satisfies a predetermined matching condition, the determination unit 37 determines that the work 5 is a non-defective product, and the recognized character string information and the quality determination result of the work 5 are determined. The data is output to the operation display unit (step S113). When the recognized character string information includes a plurality of pieces of character string information, it is determined whether or not the matching condition is satisfied for each character string information, and the predetermined matching condition is satisfied for all the character string information The work 5 is determined as a non-defective product. Thus, when a plurality of character string information is included, the matching conditions for each character string information may be different. On the other hand, when the recognized character string information does not satisfy the predetermined matching condition in step S112, the determination unit 37 determines that the workpiece 5 is a defective product, and the determination result and the character string information all rewritten to “0”. Is output (step S114). Thereafter, the character pattern deleting unit 38 deletes the character pattern template that is considered to be erroneously recognized from the character pattern template used for the recognition of the character included in the character string information determined to be erroneous (step S115).
After step S113 or step S115, the character recognition device 1 ends the process.

以上説明してきたように、本発明を適用した文字認識装置1は、ワーク5に刻印された文字列201、202の認識結果を、ワーク5に刻印されていることが想定される文字列の情報と比較して、その認識結果が正しいか否かを調べることにより、ワーク5に刻印されている文字列の認識精度を高めることができる。また、文字認識装置1は、認識された文字列が誤りと判定された場合に、その文字列に含まれる文字と誤って一致したと考えられる文字パターンテンプレートを削除するので、認識精度をさらに向上させることができる。また、文字認識装置1は、各文字パターンテンプレートについて、ワーク5に刻印された何れかの文字と最良の一致を示した使用回数を計数し、使用回数の多い文字パターンテンプレートのみを用いてパターンマッチングを行うことにより、文字列の認識に要する処理時間を短縮することができる。   As described above, the character recognition device 1 to which the present invention is applied has the recognition result of the character strings 201 and 202 imprinted on the work 5 and the information on the character strings that are assumed to be imprinted on the work 5. Compared with the above, by checking whether the recognition result is correct, the recognition accuracy of the character string stamped on the workpiece 5 can be improved. In addition, when the recognized character string is determined to be incorrect, the character recognition device 1 deletes the character pattern template that is considered to be erroneously matched with the character included in the character string, thereby further improving the recognition accuracy. Can be made. In addition, the character recognition device 1 counts the number of times of use that shows the best match with any of the characters imprinted on the workpiece 5 for each character pattern template, and uses only the character pattern template that is frequently used for pattern matching. As a result, the processing time required for recognizing the character string can be shortened.

なお、上述してきた実施形態は、本発明を説明するためのものであり、本発明は、これらの実施形態に限定されるものではない。例えば、計数手段35は、文字認識手段34で文字認識を行った直後に使用回数の計数を行う代わりに、判定手段37で、認識された文字列情報が正しいか否かを判定した後に、正しいと判定された文字列に含まれる文字の認識に使用された文字パターンテンプレートについてのみ、使用回数の計数を行うようにしてもよい。
また、上記の実施形態では、判定手段37で認識された文字列情報が誤りと判定される度に、該当する文字パターンテンプレートを削除手段38で削除した。しかし、各文字パターンテンプレートについて、誤った認識に使用された回数を計数し、その回数が所定回数(例えば、3回若しくは5回)に到達した時点で削除するようにしてもよい。
The embodiments described above are for explaining the present invention, and the present invention is not limited to these embodiments. For example, instead of counting the number of times of use immediately after character recognition by the character recognition unit 34, the counting unit 35 determines whether or not the recognized character string information is correct after determining whether or not the recognized character string information is correct. Only the character pattern template used for the recognition of the character included in the character string determined to be used may be counted.
In the above embodiment, each time the character string information recognized by the determination unit 37 is determined to be erroneous, the corresponding character pattern template is deleted by the deletion unit 38. However, for each character pattern template, the number of times used for erroneous recognition may be counted and deleted when the number of times reaches a predetermined number (for example, 3 times or 5 times).

以上のように、本発明の範囲内で、実施される形態に合わせて様々な変更を行うことができる。   As described above, various modifications can be made within the scope of the present invention according to the embodiment to be implemented.

本発明を適用した文字認識装置の概略構成図である。It is a schematic block diagram of the character recognition apparatus to which this invention is applied. 被検査物のワークを撮影した検査画像の一例を示す概略図である。It is the schematic which shows an example of the test | inspection image which image | photographed the workpiece | work of the to-be-inspected object. 処理部の機能ブロック図である。It is a functional block diagram of a processing part. (a)〜(e)は、それぞれ文字パターンテンプレートの一例である。(A)-(e) is an example of a character pattern template, respectively. 本発明を適用した文字認識装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the character recognition apparatus to which this invention is applied. 本発明を適用した文字認識装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the character recognition apparatus to which this invention is applied.

符号の説明Explanation of symbols

1 文字認識装置
2 撮像部(画像取得手段)
3 処理部
31 制御手段
32 通信手段
33 記憶手段(文字パターン記憶手段)
34 文字認識手段
35 計数手段
36 文字列情報取得手段
37 判定手段
38 文字パターン削除手段
4 文字列判定情報記憶部
5 ワーク
DESCRIPTION OF SYMBOLS 1 Character recognition apparatus 2 Imaging part (image acquisition means)
3 Processing Unit 31 Control Unit 32 Communication Unit 33 Storage Unit (Character Pattern Storage Unit)
34 Character recognition means 35 Counting means 36 Character string information acquisition means 37 Determination means 38 Character pattern deletion means 4 Character string determination information storage section 5 Workpiece

Claims (6)

少なくとも一つの文字列が表記された被検査物を撮影した検査画像を取得する画像取得手段(2)と、
複数の文字パターンを記憶する文字パターン記憶手段(33)と、
前記検査画像と、前記文字パターン記憶手段(33)から読み出された前記複数の文字パターンとの一致度を求めて、前記複数の文字パターンのうちの最も一致する文字パターンが表す文字を前記少なくとも一つの文字列に含まれる文字として認識し、且つ該認識された文字の検査画像中の位置を取得する文字認識手段(34)と、
前記文字認識手段(34)で認識された複数の文字の位置関係に基づいて、該複数の文字の順序を決定することにより、前記少なくとも一つの文字列の認識結果である文字列情報を取得する文字列情報取得手段(36)と、
前記文字列情報が、前記被検査物上に表記される可能性のある文字列である場合、前記文字列情報は正しいと判定し、前記文字列情報が、前記被検査物上に表記される可能性のない文字列である場合、前記文字列情報は誤りであると判定する判定手段(37)と、
前記文字列情報が誤りであると判定された場合、前記文字列情報に含まれる何れかの文字と最も一致した文字パターンを削除する文字パターン削除手段(38)と、
を有することを特徴とする文字認識装置。
Image acquisition means (2) for acquiring an inspection image obtained by photographing an inspection object on which at least one character string is written;
A character pattern storage means (33) for storing a plurality of character patterns;
The degree of coincidence between the inspection image and the plurality of character patterns read out from the character pattern storage means (33) is obtained, and the character represented by the most coincident character pattern among the plurality of character patterns is determined as the at least Character recognition means (34) for recognizing as a character included in one character string and acquiring a position of the recognized character in an inspection image;
Based on the positional relationship of the plurality of characters recognized by the character recognition means (34), the sequence of the plurality of characters is determined to obtain character string information as a recognition result of the at least one character string. Character string information acquisition means (36);
When the character string information is a character string that may be written on the inspection object, it is determined that the character string information is correct, and the character string information is written on the inspection object. If the character string has no possibility, the determining means (37) for determining that the character string information is incorrect;
A character pattern deleting means (38) for deleting a character pattern that most closely matches any of the characters included in the character string information when the character string information is determined to be incorrect;
A character recognition device comprising:
前記文字列情報が正しいと判定された場合、前記文字列情報に含まれる何れかの文字と最も一致した文字パターンについて、その最も一致した回数を計数する計数手段(35)をさらに有する、請求項1に記載の文字認識装置。 When it is determined that the character string information is correct, it further has a counting means (35) for counting the number of times that the character pattern most closely matches any character included in the character string information. character recognition device according to 1. 前記複数の文字パターンは、所定の文字を検出するための第1の個数の文字パターンを含み、
前記文字認識手段(34)は、前記第1の個数の文字パターンのうち、前記回数が多い方から順に、前記第1の個数よりも少ない第2の個数の文字パターンを用いて前記検査画像との一致度を求める、請求項に記載の文字認識装置。
The plurality of character patterns include a first number of character patterns for detecting a predetermined character;
The character recognizing means (34) uses the second number of character patterns smaller than the first number in order from the largest number of the first number of character patterns, and the inspection image and The character recognition device according to claim 2 , wherein the degree of coincidence is calculated.
前記複数の文字パターンは、所定の文字を検出するための第1の個数の文字パターンを含み、
前記文字認識手段(34)は、前記第1の個数の文字パターンのうち、前記回数が多い方から順に、前記第1の個数よりも少ない第2の個数の文字パターンを用いて前記検査画像との一致度を求め、前記検査画像との一致度の最大値が所定の閾値未満の場合、前記第1の個数の文字パターンの全てを用いて前記検査画像との一致度を求める、請求項に記載の文字認識装置。
The plurality of character patterns include a first number of character patterns for detecting a predetermined character;
The character recognizing means (34) uses the second number of character patterns smaller than the first number in order from the largest number of the first number of character patterns, and the inspection image and sought degree of coincidence, when the maximum value of the degree of coincidence between the inspection image is less than the predetermined threshold value, determining the degree of coincidence between the inspection image by using all the character patterns of the first number, claim 2 The character recognition device described in 1.
少なくとも一つの文字列が表記された被検査物の外観を検査する外観検査装置であって、
前記被検査物を撮影した検査画像を取得する画像取得手段(2)と、
複数の文字パターンを記憶する文字パターン記憶手段(33)と、
前記検査画像と、前記文字パターン記憶手段(33)から読み出された前記複数の文字パターンとの一致度を求めて、前記複数の文字パターンのうちの最も一致する文字パターンが表す文字を前記少なくとも一つの文字列に含まれる文字として認識し、且つ該認識された文字の検査画像中の位置を取得する文字認識手段(34)と、
前記文字認識手段(34)で認識された複数の文字の位置関係に基づいて、該複数の文字の順序を決定することにより、前記少なくとも一つの文字列の認識結果である文字列情報を取得する文字列情報取得手段(36)と、
前記文字列情報が、前記被検査物上に表記される可能性のある文字列である場合、前記被検査物は良品であると判定し、前記文字列情報が、前記被検査物上に表記される可能性のない文字列である場合、前記被検査物は不良品であると判定する判定手段(37)と、
前記文字列情報が誤りであると判定された場合、前記文字列情報に含まれる何れかの文字と最も一致した文字パターンを削除する文字パターン削除手段(38)と、
を有することを特徴とする外観検査装置。
An appearance inspection apparatus for inspecting the appearance of an inspection object on which at least one character string is written,
Image acquisition means (2) for acquiring an inspection image obtained by photographing the inspection object;
A character pattern storage means (33) for storing a plurality of character patterns;
The degree of coincidence between the inspection image and the plurality of character patterns read out from the character pattern storage means (33) is obtained, and the character represented by the most coincident character pattern among the plurality of character patterns is determined as the at least Character recognition means (34) for recognizing as a character included in one character string and acquiring a position of the recognized character in an inspection image;
Based on the positional relationship of the plurality of characters recognized by the character recognition means (34), the sequence of the plurality of characters is determined to obtain character string information as a recognition result of the at least one character string. Character string information acquisition means (36);
When the character string information is a character string that may be written on the inspection object, it is determined that the inspection object is a non-defective product, and the character string information is displayed on the inspection object. Determination means (37) for determining that the object to be inspected is a defective product if the character string is not likely to be
A character pattern deleting means (38) for deleting a character pattern that most closely matches any of the characters included in the character string information when the character string information is determined to be incorrect;
An appearance inspection apparatus characterized by comprising:
少なくとも一つの文字列が表記された被検査物を撮影した検査画像を取得するステップと、
前記検査画像と、複数の文字パターンとの一致度を求めて、前記複数の文字パターンのうちの最も一致する文字パターンが表す文字を前記少なくとも一つの文字列に含まれる文字として認識し、且つ該認識された文字の検査画像中の位置を取得するステップと、
認識された複数の文字の位置関係に基づいて、該複数の文字の順序を決定することにより、前記少なくとも一つの文字列の認識結果である文字列情報を取得するステップと、
前記文字列情報が、前記被検査物上に表記される可能性のある文字列である場合、前記文字列情報は正しいと判定し、前記文字列情報が、前記被検査物上に表記される可能性のない文字列である場合、前記文字列情報は誤りであると判定するステップと、
前記文字列情報が誤りであると判定された場合、前記文字列情報に含まれる何れかの文字と最も一致した文字パターンを削除するステップと、
を有することを特徴とする文字認識方法。
Acquiring an inspection image obtained by photographing an inspection object on which at least one character string is written;
Determining the degree of coincidence between the inspection image and a plurality of character patterns, recognizing a character represented by the most matched character pattern among the plurality of character patterns as a character included in the at least one character string; and Obtaining a position of the recognized character in the inspection image;
Obtaining character string information, which is a recognition result of the at least one character string, by determining the order of the plurality of characters based on the positional relationship of the plurality of recognized characters;
When the character string information is a character string that may be written on the inspection object, it is determined that the character string information is correct, and the character string information is written on the inspection object. If the character string has no possibility, the step of determining that the character string information is incorrect;
If it is determined that the character string information is incorrect, the step of deleting a character pattern that most closely matches any character included in the character string information;
A character recognition method characterized by comprising:
JP2007115915A 2007-04-25 2007-04-25 Character recognition device, appearance inspection device, and character recognition method Expired - Fee Related JP5045211B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007115915A JP5045211B2 (en) 2007-04-25 2007-04-25 Character recognition device, appearance inspection device, and character recognition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007115915A JP5045211B2 (en) 2007-04-25 2007-04-25 Character recognition device, appearance inspection device, and character recognition method

Publications (2)

Publication Number Publication Date
JP2008276311A JP2008276311A (en) 2008-11-13
JP5045211B2 true JP5045211B2 (en) 2012-10-10

Family

ID=40054227

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007115915A Expired - Fee Related JP5045211B2 (en) 2007-04-25 2007-04-25 Character recognition device, appearance inspection device, and character recognition method

Country Status (1)

Country Link
JP (1) JP5045211B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5645730B2 (en) * 2011-03-25 2014-12-24 公益財団法人鉄道総合技術研究所 Method for detecting closed cracks on concrete surface
WO2013084731A1 (en) * 2011-12-08 2013-06-13 日本電気株式会社 Image identifying system
JP6048873B2 (en) * 2012-09-04 2016-12-21 株式会社プレックス Cloth piece inspection method and cloth piece inspection apparatus
JP6410391B2 (en) * 2014-05-30 2018-10-24 株式会社ミツバ Autonomous vehicles, autonomous systems and automation factories

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03175592A (en) * 1989-12-04 1991-07-30 Sony Corp On-line character recognizing device
JPH05159107A (en) * 1991-12-06 1993-06-25 Nec Eng Ltd Optical character reader
JPH08101129A (en) * 1994-09-29 1996-04-16 Omron Corp Method and device for producing date character pattern
JPH0935006A (en) * 1995-07-18 1997-02-07 Fujitsu Ltd Character recognition device
TW411430B (en) * 1995-07-25 2000-11-11 Komatsu Mfg Co Ltd Inspection baseline entry method and its equipment for character inspection device
JP2002222388A (en) * 2001-01-26 2002-08-09 Fujitsu Ltd Device and method for character recognition

Also Published As

Publication number Publication date
JP2008276311A (en) 2008-11-13

Similar Documents

Publication Publication Date Title
CN103714338B (en) Image processing apparatus and image processing method
TWI536277B (en) Form identification method and device
US8509571B2 (en) Pattern recognition apparatus, pattern recognition method, image processing apparatus, and image processing method
TWI669519B (en) Board defect filtering method and device thereof and computer-readabel recording medium
KR101821087B1 (en) Two-dimensional code, and two-dimensional-code analysis system
JP6900164B2 (en) Information processing equipment, information processing methods and programs
TWI608422B (en) Optical character recognition device, optical character recognition method, and recording medium
JP4574503B2 (en) Image processing apparatus, image processing method, and program
JP6959114B2 (en) Misidentification possibility evaluation device, misdiscrimination possibility evaluation method and program
JP6786874B2 (en) Needle meter detector, method and program
CN106462786A (en) Two-dimensional code, two-dimensional-code analysis system, and two-dimensional-code generation system
JP5045211B2 (en) Character recognition device, appearance inspection device, and character recognition method
JP6630341B2 (en) Optical detection of symbols
US9396389B2 (en) Techniques for detecting user-entered check marks
KR20150108118A (en) Remote automatic metering system based image recognition
CN111274961A (en) Character recognition and information analysis method for flexible IC substrate
CN116071311A (en) Equipment cleaning detection method, system and storage medium based on image recognition
CN111079480A (en) Identification method and device of identity card information and terminal equipment
CN115170501A (en) Defect detection method, system, electronic device and storage medium
JP2006285956A (en) Red eye detecting method and device, and program
CN112036391A (en) Electronic inspection method and system based on shale gas field production station
CN111008635A (en) OCR-based multi-bill automatic identification method and system
JP4872930B2 (en) Character recognition device, fuel pump module assembling device equipped with such device, and character recognition method
JP2008117126A (en) Character recognition device and method
US20130272610A1 (en) Image Processing Apparatus that Groups Objects Within Image

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090605

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120113

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120124

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120214

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120619

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120702

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150727

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 5045211

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees