JP3844594B2 - Industrial character recognition method - Google Patents

Industrial character recognition method Download PDF

Info

Publication number
JP3844594B2
JP3844594B2 JP10186598A JP10186598A JP3844594B2 JP 3844594 B2 JP3844594 B2 JP 3844594B2 JP 10186598 A JP10186598 A JP 10186598A JP 10186598 A JP10186598 A JP 10186598A JP 3844594 B2 JP3844594 B2 JP 3844594B2
Authority
JP
Japan
Prior art keywords
image
matching
template
expansion
logo
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
JP10186598A
Other languages
Japanese (ja)
Other versions
JPH11282960A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP10186598A priority Critical patent/JP3844594B2/en
Publication of JPH11282960A publication Critical patent/JPH11282960A/en
Application granted granted Critical
Publication of JP3844594B2 publication Critical patent/JP3844594B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は,工場の製造ラインにおいて製品表面あるいは部品表面に印刷されている文字(ロゴ,あるいは製品/部品を特定する英数字など)を読み取り,それを認識することにより製品/部品を識別する自動化ラインに利用される工業文字認識方法に関し,より詳細には,環境照明の変動,印字や部品の厚みに起因する見え方の精度の悪さに影響されることなく,不良出荷を阻止し,かつ認識対象画像とテンプレートの正しい組み合わせを間違った組み合わせと判断する過剰認識率を低減する工業文字認識方法に関する。
【0002】
【従来の技術】
現在,画像処理による製品の認識は半導体業界での電子部品(IC,メモリなど)表面の印字文字認識が中心に行われている。このような認識には,パターンマッチングやニューラルネットワークを用いた方式,OCR(光学的文字読取装置)を用いたものなど数多くの方式が採用されている。また,大型の製品の認識には,バーコードによる認識や,製造番号(シリアルNo.)による認識などの技術も知られている。さらに,印字されている文字の欠けや汚れなどに対応した認識技術も知られている。
【0003】
このような文字画像を認識し,製造ラインにおける製品/部品の自動認識を行うといった参考技術文献として,たとえば特開平7−175894号公報のニューラルネットワークと文字認識方法と電子部品実装検査装置及びそれを用いた管理方法』が開示されている。特に,ここでは,電子部品表面に印字された文字をニューラルネットワークを用いた認識方法で認識し,プリント基板への誤実装を防止すると共に,品質・精算管理を同時に行っている。
【0004】
また,特開平6−44375号公報の『異材判定方法』には,文字などのマーキングされた材料の物質管理において,上流側での画像データを下流の材料のデータと比較することにより,異材を検出する技術が開示されている。さらに,特開平7−296112号公報の『文字切り出し装置』には,文字を切り出す際に,文字同士の誤統合を回避し,輪郭線を取得するために重み付け膨張を実行する技術が開示されている。
【0005】
【発明が解決しようとする課題】
しかしながら,上記に示されるような従来の技術にあっては,製品の認識を,製品に印字されている文字の認識のみで行っており,製品表面に印字されているロゴ(メーカ名や製品名を示すデザイン文字で,製品外装カバーなどの表面に凹凸あるい平面状に印字されている)などは文字情報としての役割以上に製品のアピールという点においてデザイン化されたパターンとして捉える必要があるため,通常の文字の規格との整合をとることは容易ではなかった。
【0006】
また,デザイン化された文字に関しては,たとえば数字「2」と英文字「z」あるいは英文字「Z」,数字「1」と英文字「I」(大文字のアイ)あるいは英文字「l」(小文字のエル)など類似した形状が多く存在し,文意としての前後関係に依存することも可能である。ところが,OCRやパターンマッチングでは通常,認識前にサイズ,回転,位置ずれなどに対応して正規化が行われるが,生産現場で用いられる画像認識では照明の変動に影響した対象画像中の要素の周縁部分の不安定さに起因する太さの変動を考慮しなければならない。
【0007】
また,製品の表面は多様な材質(成形樹脂,フィルム状ラベルなど)からなるため,同じ条件であってもロゴなどの撮像対象が鏡面的で光沢があって光ったり,つや消しにように鮮明に取得されるなど,紙に印字された文字をスキャナで入力するのと異なり,そこで得られる画像が環境照明の変化によって影響を受けやすいという問題点があった。
【0008】
また,ニューラルネットワークなどの学習機能を用いて認識結果の検出を迅速化させる手法も提案されているが,多品種少量生産の製品を認識対象とした場合,学習させる期間で生産が終了してしまう場合も少なくない。
【0009】
また,生産ラインにおいては照明系の変動を変動閾値の2値化を応用する例は多々あるが,得られる画像自体の光学的な膨張収縮に対して画像処理における膨張収縮でキャンセルしているものはなく,マッチングの精度が低いという問題点があった。さらに,自動認識において,誤認識を抑制するのは当然行われるが,無駄に人が介在する過剰認識の確率も同時に低下させる必要があった。
【0010】
本発明は,上記に鑑みてなされたものであって,環境照明の影響などに起因する過剰認識による判定ミスを抑制し,認識品質の向上を図ることを目的とする。
【0011】
【課題を解決するための手段】
上記の目的を達成するために,請求項に係る工業文字認識方法にあっては,ロゴなどの工業文字を認識することによって生産ラインにおける製品識別を行う工業文字認識方法において,2値化された工業文字をテンプレート画像として入力する第1の工程と,識別対象製品に印字されている工業文字を撮像・2値化し撮像画像を入力する第2の工程と,前記テンプレート画像を用いて前記撮像画像に対するテンプレートマッチングを実行する第3の工程と,前記第3の工程でテンプレートマッチングを行った結果,前記テンプレート画像と前記撮像画像との一致度があらかじめ設定した閾値に対して低いか否かを判断する第4の工程と,前記第4の工程で一致度が低いと判断した場合に,ラベリング処理を行い認識対象画像か前記テンプレート画像の一方を膨張させて再度マッチング処理を実行する第5の工程と,前記第5の工程で膨張した後の画像中の要素数が膨張前より少ないか否かを判断する第6の工程と,前記第6の工程で膨張後の画像中の要素数が膨張前より少ないと判断した場合,膨張をキャンセルし,該キャンセルした側の他方を収縮し,再度マッチングを実行する第7の工程と,を含むものである。
【0012】
すなわち,画像中の要素の周縁部分の不安定性を除去するための膨張/収縮処理に対し,膨張処理後の画像にラベリングを施し,要素数が減少していれば,要素間の統合があったことを示すので膨張処理前の画像に戻し,他方の画像を収縮処理し,一方の画像の収縮処理後にラベリングを施し,要素数が増えていれば,要素の分裂を示すので収縮処理前の画像に戻し,他方の画像を膨張処理することにより,あらかじめラベリングで要素数の変化を捉え,膨張による要素同士の統合や,収縮による要素の分離を事前に回避し,誤認識の可能性を低減することができる
【0029】
また,請求項に係る工業文字認識方法にあっては,ロゴなどの工業文字を認識することによって生産ラインにおける製品識別を行う工業文字認識方法において,2値化された工業文字をテンプレート画像として入力する第1の工程と,識別対象製品に印字されている工業文字を撮像・2値化し撮像画像を入力する第2の工程と,前記テンプレート画像を用いて前記撮像画像に対するテンプレートマッチングを実行する第3の工程と,前記第3の工程でテンプレートマッチングを行った結果,前記テンプレート画像と前記撮像画像との一致度があらかじめ設定した閾値に対して低いか否かを判断する第4の工程と,前記第4の工程で一致度が低いと判断した場合に,位置補正を行い,マッチング直前の状態で前記テンプレート画像または前記撮像画像の2値画像に境界線処理を施す第5の工程と,前記第5の工程による境界線処理後の画像の重心を取得する第6の工程と,前記第6の工程による境界線画像の重心位置からマッチング後の画像の重心位置の変移より膨張/収縮方向を検出する第7の工程と,前記第7の工程で検出した膨張/収縮方向より認識対象画像か前記テンプレート画像の一方を膨張/収縮し,再度マッチングする第8の工程と,を含むものである。
【0030】
すなわち,マッチング前の境界線画像の重心とマッチング後の結果画像の重心を取得し,それらの変移を検出することにより,膨張/収縮方向を検知して試行錯誤を排除し,最適な膨張/収縮処理を実施し,再度認識することで過剰認識の確率を高速に低減可能にし,かつ過剰判定抑制ルーチンに移行する前に照明の指向性により決定する膨張または収縮の方向を取得し,限定して過剰判定抑制ルーチンを発動することが可能となる。
【0031】
また,請求項に係る工業文字認識方法にあっては,ロゴなどの工業文字を認識することによって生産ラインにおける製品識別を行う工業文字認識方法において,2値化された工業文字をテンプレート画像として入力する第1の工程と,識別対象製品に印字されている工業文字を撮像・2値化し撮像画像を入力する第2の工程と,前記テンプレート画像を用いて前記撮像画像に対するテンプレートマッチングを実行する第3の工程と,前記第3の工程でテンプレートマッチングを行った結果,前記テンプレート画像と前記撮像画像との一致度があらかじめ設定した閾値に対して低いか否かを判断する第4の工程と,前記第4の工程で一致度が低いと判断した場合に,位置補正した後,マッチング直前の状態で前記テンプレート画像または前記撮像画像の2値画像に境界線処理を施す第5の工程と,前記第5の工程による境界線処理後の画像の重心を取得する第6の工程と,前記第6の工程による境界線画像の重心位置からマッチング後の画像の重心位置の変移より膨張/収縮方向を検出する第7の工程と,各要素ごとに膨張/収縮方向を決定し,膨張/収縮を行った後,再度認識処理を実行する第8の工程と,を含むものである。
【0032】
すなわち,請求項において,再度各要素ごとに認識することにより,過剰認識の確率を高速にし,かつ隣接する要素の統合を回避し,各要素の位置的な膨張/収縮の度合いに対応して低減することができ,さらに要素間の統合の可能性を除去することにより,一致度のS/N比を向上させることが可能となる。
【0033】
【発明の実施の形態】
以下,本発明の工業文字認識方法について添付図面を参照し,詳細に説明する。
【0034】
(システムの概要)
図1は,実施の形態に係るシステムの構成を示す説明図である。図において,101および102は環境照明,103はCCDエリアセンサ,104は補助照明,105は対象製品である。
【0035】
環境照明101・102など複数の独立した環境照明の下で,CCDエリアセンサ103を用いて補助照明104を備えた撮像系で対象製品105の表面に印字されているロゴを認識する場合,以下のようにして行う。
【0036】
次に,以上のように構成されたシステムにおいて,図1に示すように,環境照明101・環境照明102など複数の独立した環境照明の下でCCDエリアセンサ103を用い,補助照明104を備えた撮像系で対象製品105の表面に印字されているロゴを認識する例について実施の形態ごとに分けて説明する。
【0037】
(実施の形態1)
この実施の形態1では,画像認識を応用して製品のロゴなどを認識・識別し,判定する際に,環境照明の変動やロゴの印字状態,表面状態,背景とロゴのコントラストなどにより,認識対象画像の要素の周縁部の画素値と閾値との不安定な相対関係による2値化後の取得画像が,認識に悪影響を及ぼし,過剰認識が生じた場合でも,要素の周縁部分を膨張させて再度マッチングさせることにより,過剰認識を避ける例について述べる。
【0038】
閉じた光学系を用いない場合,環境照明などの影響を受けやすいため,2値化の閾値決定は通常,モード法や判別分析法など変動閾値決定法を用いる。環境照明の変動がなくロバスト性への配慮を行わないで2値化閾値を固定するなら一定の2値画像を得られる可能性は十分高いものとなる。しかし,能動的な照明の他に環境の変動要因として受動的な照明が存在した場合,経時変化などにより環境が変化することも配慮する必要がある。
【0039】
図13は,正常状態におけるロゴ画像の入力状態を示す説明図である。また,図14は,環境照明が強いなどのように製品周辺が一様に明るいときに撮像されたロゴの状態を示す説明図,図15は,環境照明が一様に暗いときに撮像されたロゴの状態を示す説明図である。
【0040】
図13(正常状態のロゴ),図14(環境照明が強い場合の撮像ロゴ),図15(環境照明が暗い場合の撮像ロゴ)のそれぞれについて2値化した例を,図16(正常状態のロゴ),図17(環境照明が強い場合の撮像ロゴ),図18(環境照明が暗い場合の撮像ロゴ)に示す。そのうち,図16(正常状態のロゴ)をテンプレート画像(標準的図形)として登録(メモリに格納)しておく。
【0041】
図2は,実施の形態1に係る基本的な識別手順例を示すフローチャートである。まず,正常状態のロゴ(2値化データ)をテンプレート画像として入力する(S201)。この入力はあらかじめ格納されているロゴデータから読み出すなどにより行う。続いて,図1に示す如くシステムを用いて対象製品105に印字されているロゴを撮像し,2値化データとして入力する(S202)。そして,正常状態のロゴと対象製品105のロゴとの照合,いわゆるテンプレートマッチングを行う(S203)。
【0042】
次いで,上記テンプレートマッチングを行った結果,正常状態のロゴと対象製品105のロゴとの一致度(後述する)が低いか否かを判断する(S204)。ここで,一致度が低いと判断したならば,認識対象画像かテンプレート画像の一方を膨張させ,再度マッチング処理を実行する(S205)。
【0043】
上述の処理におけるテンプレートマッチング(一致度算出など)についてさらに詳述する。重心を画像の要素の位置を表すパラメータとして位置補正を行う。テンプレート画像と撮像画像を排他的論理和を用いて認識の指標である一致度を導出する。この場合,結果画像に残留する画素数が少なければ少ないほど一致していることになる。
【0044】
テンプレート2値画像の全画素数をA,撮像2値画像の全画素数をB,AとBとの排他的論理和をC,一致度をD(%)とすると,Dは以下に示す式(1)によって与えられる。
D=(A+BC)/(A+B)×100(%) ・・・(1)
【0045】
最初のテンプレートマッチングにより一致度D0がある設定値より小さい場合,テンプレート画像か撮像画像の一方を膨張させ,再度マッチングし,上記(1)式から一致度D1を導出する。ここでD0<D1であれば,さらに膨張して一致度D2を得る。そして,D1<D2であったならば同一作業をあらかじめ上限を設定する回数n回だけ繰り返し,Dn>Dn+1となったとき,このテンプレート画像と撮像画像との認識の指標を示す一致度DをDnとして設定値と比較する。そして,この設定値を厳しくしておくことにより一度,対象製品が間違っていると判断して,誤認識を低減し,確認ルーチンを行うことにより正常な製品の認識の場合における過剰認識率を低減することができる。
【0046】
一方,上述においてD0>D1であるならば,他方の画像を膨張し,再度マッチングすることにより得られるD1’とD0とを比較し,上述と同様の作業を繰り返し実行する。
【0047】
したがって,この実施の形態1によれば,人が活動可能な環境で,生産ライン上に流れてくる製品の認識をロゴなどを用いて画像認識で行う場合,固有の閉じた光学系を特別に設定することなく,環境照明などの変化に影響され,無駄に人を介在させる過剰判定率を低減することが可能となる。
【0048】
(実施の形態2)
この実施の形態2では,上述した実施の形態1において要素の周縁部分を膨張させた場合,隣接する要素同士が統合することを回避し,過剰認識率を低減する例について述べる。
【0049】
この実施の形態2では,実施の形態1の膨張させる処理を収縮させる処理に置き換え,膨張させた際に発生の可能性がある位置補正などに用いる重心位置の変動,要素数の変化に直接影響を与える画像中の要素の統合を回避する。
【0050】
図3は,実施の形態2に係る基本的な識別手順例を示すフローチャートである。まず,正常状態のロゴ(2値化データ)をテンプレート画像として入力する(S301)。この入力はあらかじめ格納されているロゴデータから読み出すなどにより行う。続いて,図1の如くシステムを用いて対象製品105に印字されているロゴを撮像し,2値化データとして入力する(S302)。そして,正常状態のロゴと対象製品105のロゴとの照合,いわゆるテンプレートマッチングを行う(S303)。
【0051】
次いで,上記テンプレートマッチングを行った結果,正常状態のロゴと対象製品105のロゴとの一致度(実施の形態1と同様の一致度を導出する)が低いか否かを判断する(S304)。ここで,一致度が低いと判断したならば,認識対象画像かテンプレート画像の一方を収縮させ,再度マッチング処理を実行する(S305)。
【0052】
したがって,この実施の形態2によれば,対象画像中の各要素が統合することがないため,誤認識の可能性を低減することが可能となる。
【0053】
(実施の形態3)
この実施の形態3では,画像自体の変形を回避し,過剰認識の確率を低減する例について述べる。
【0054】
画像中の要素の周縁部分の不安定性を除去するための膨張/収縮処理に対し,膨張処理後の画像にラベリングを施し,要素数が減少していれば,要素間の統合があったことを示し,膨張処理前の画像に戻し,他方の画像を収縮処理する。また,一方の画像の収縮処理後にラベリングを施し,要素数が増えていれば,要素の分裂を示し,収縮処理前の画像に戻し,他方の画像を膨張処理する。
【0055】
図4は,実施の形態3に係る基本的な識別手順例を示すフローチャートである。まず,正常状態のロゴ(2値化データ)をテンプレート画像として入力する(S401)。この入力はあらかじめ格納されているロゴデータから読み出すなどにより行う。続いて,図1の如くシステムを用いて対象製品105に印字されているロゴを撮像し,2値化データとして入力する(S402)。そして,正常状態のロゴと対象製品105のロゴとの照合,いわゆるテンプレートマッチングを行う(S403)。
【0056】
次いで,上記テンプレートマッチングを行った結果,正常状態のロゴと対象製品105のロゴとの一致度(後述する)が低いか否かを判断する(S404)。ここで,一致度が低いと判断したならば,認識対象画像かテンプレート画像の一方を膨張させて再度マッチング処理を実行する際にラベリング処理を行う(S405)。
【0057】
そして,膨張後の画像中の要素数が膨張前より少ないか否かを判断する(S406)。ここで,膨張後の画像中の要素数が膨張前より少ないと判断したならば,膨張をキャンセルし,他方を収縮し,再度マッチングを実行する(S407)。
【0058】
さらに,上述した内容について付言する。最初のテンプレートマッチングにより(1)式の一致度D0がある設定値より小さい場合,テンプレート画像および撮像画像においてラベリングを実行し,両者の要素数を確認しておく。そして,その要素数に応じて下記▲1▼,▲2▼を実行する。
【0059】
▲1▼両者の要素数が同数の場合,実施の形態1と同様の動作を行い,再度マッチングする際に要素数を確認し,変化がなければ同じ作業を繰り返し実行する。
【0060】
▲2▼一方,要素数が少ない場合,少ない方を同数になるまで収縮し,同数になった時点を最初のマッチングとする。以降,▲1▼と同様の作業を繰り返し実行し,最大値を記憶しておく。そして,多い方を同数になるまで膨張し,同数になった時点を最初のマッチングとし,以降,▲1▼の作業を繰り返してその最大値を記憶する。本処理で得られた2つの最大値を比較し,大きい方を本処理での一致度とする。
【0061】
したがって,この実施の形態3によれば,あらかじめラベリングで要素数の変化を捉え,膨張による要素同士の統合や,収縮による要素の分離を事前に回避し,誤認識の可能性を低減することができる。
【0062】
(実施の形態4)
この実施の形態4では,画像の要素を膨張/収縮して過剰認識の確率を低下させる際に,一方向からの照明系の影響や,印字のわずかな厚みの陰影に起因する過剰認識要因を個別に避けるために,要素の一方向に膨張/収縮を施す例について述べる。
【0063】
図5は,実施の形態4に係る基本的な識別手順例を示すフローチャートである。まず,正常状態のロゴ(2値化データ)をテンプレート画像として入力する(S501)。この入力はあらかじめ格納されているロゴデータから読み出すなどにより行う。続いて,図1の如くシステムを用いて対象製品105に印字されているロゴを撮像し,2値化データとして入力する(S502)。そして,正常状態のロゴと対象製品105のロゴとの照合,いわゆるテンプレートマッチングを行う(S503)。
【0064】
次いで,上記テンプレートマッチングを行った結果,正常状態のロゴと対象製品105のロゴとの一致度(後述する)が低いか否かを判断する(S504)。なお,ここでは,一致度の最大値が得られた時点で,上下左右方向に膨張あるいは収縮を順次施して一致度を確認し,最大値が得られた時点での一致度を認識の指標とする。
【0065】
上記ステップS504において,一致度が低いと判断したならば,認識対象画像かテンプレート画像の一方の上下左右方向を個々に膨張/収縮させ,各々の処理に対して再度マッチングを実行する(S505)。
【0066】
したがって,この実施の形態4によれば,照明系の指向的な変化に対応して,過剰判定率を抑制することが可能となる。
【0067】
(実施の形態5)
この実施の形態5では,他方向から独立した照明系の影響や,それに伴って 印字のわずかな厚みの陰影に起因する他方向への膨張/圧縮に対応して,過剰認識要因を個別に避けるために,要素の一方向に膨張/収縮を施して,過剰認識の確率を低減する例について述べる。
【0068】
図6は,実施の形態5に係る基本的な識別手順例を示すフローチャートである。まず,正常状態のロゴ(2値化データ)をテンプレート画像として入力する(S601)。この入力はあらかじめ格納されているロゴデータから読み出すなどにより行う。続いて,図1の如くシステムを用いて対象製品105に印字されているロゴを撮像し,2値化データとして入力する(S602)。そして,正常状態のロゴと対象製品105のロゴとの照合,いわゆるテンプレートマッチングを行う(S603)。
【0069】
次いで,上記テンプレートマッチングを行った結果,正常状態のロゴと対象製品105のロゴとの一致度(後述する)が低いか否かを判断する(S604)。
【0070】
上記ステップS604において,一致度が低いと判断したならば,認識対象画像かテンプレート画像の一方の上下左右方向を個々に膨張/収縮させ,各々の処理に対して再度マッチングを実行する(S605)。さらに膨張または収縮させる方向を組み合わせて同処理を実行する(S606)。
【0071】
すなわち,上述した処理では,上下左右方向に膨張あるいは収縮を順次施して一致度を確認し,一致度が向上した方向の膨張あるいは収縮を残して,他の方向の膨張または収縮をさらに行い,最大値が得られた時点での一致度を認識の指標とする。
【0072】
したがって,この実施の形態5によれば,実施の形態4に対し,さらに精度の高い認識が実現する。
【0073】
(実施の形態6)
この実施の形態6では,再度の認識の一致度が高い値が得られた膨張収縮の方向によって補助照明の照度を変化させることにより,環境照明の変動に起因して繰り返し生じる過剰認識を排除する例について述べる。
【0074】
図7は,実施の形態6に係る基本的な識別手順例を示すフローチャートである。まず,正常状態のロゴ(2値化データ)をテンプレート画像として入力する(S701)。この入力はあらかじめ格納されているロゴデータから読み出すなどにより行う。続いて,図1の如くシステムを用いて対象製品105に印字されているロゴを撮像し,2値化データとして入力する(S702)。そして,正常状態のロゴと対象製品105のロゴとの照合,いわゆるテンプレートマッチングを行う(S703)。次いで,上記テンプレートマッチングを行った結果,正常状態のロゴと対象製品105のロゴとの一致度が低いか否かを判断する(S704)。
【0075】
上記ステップS704において,一致度が低いと判断したならば,認識対象画像かテンプレート画像の一方の上下左右方向を個々に膨張/収縮させ,各々の処理に対して再度マッチングを実行する(S705)。さらに膨張または収縮させる方向を組み合わせて同処理を実行し(S706),膨張した側より照射する照明系の照度を上げるか,または収縮側より照射する照明系の照度を下げる(S707)。
【0076】
すなわち,あらかじめ上下左右の4方向からの補助照明を備えておき,上述した過剰判定抑制ルーチンを発動する認識回数が設定回数を超過した時点で,繰り返しの過剰判定要因として環境照明の補助を必要とすると判断し,膨張を施した側から照射する補助照明の照度を上げる。あるいは収縮を施した側から照射する補助照明の照度を下げる。そして,再度マッチングして一致度を確認し,膨張または収縮を用いる過剰判定抑制ルーチンに移行しない照度に固定する。
【0077】
したがって,過剰判定率を下げている照明の指向性を把握し,繰り返し発生する過剰判定の要因を除去することが可能となる。
【0078】
(実施の形態7)
この実施の形態7では,画像中の要素ごとに他のメモリ上にコピーして膨張/収縮を施すことにより,隣接する要素を同時に膨張/収縮することがないので,これを利用し,要素間の統合を生じさせることなく,過剰認識の確率を低減することを可能にする例について述べる。
【0079】
図8は,実施の形態7に係る基本的な識別手順例を示すフローチャートである。まず,正常状態のロゴ(2値化データ)をテンプレート画像として入力する(S801)。この入力はあらかじめ格納されているロゴデータから読み出すなどにより行う。続いて,図1の如くシステムを用いて対象製品105に印字されているロゴを撮像し,2値化データとして入力する(S802)。そして,正常状態のロゴと対象製品105のロゴとの照合,いわゆるテンプレートマッチングを行う(S803)。次いで,上記テンプレートマッチングを行った結果,正常状態のロゴと対象製品105のロゴとの一致度が低いか否かを判断する(S804)。
【0080】
上記ステップS804において,一致度が低いと判断したならば,認識対象画像かテンプレート画像の一方の各要素を順次他のメモリ上にコピーする(S805)。さらに,移動した各要素を膨張/収縮し,再度マッチングを実行する(S806)。つまり,対象の要素を切り取って他のメモリに移して太らせることにより,くっつきがなくなる。
【0081】
さらに付言すれば,テンプレート画像と撮像画像の両者にラベリングを施し,各要素ごとに順次別メモリにコピーし,初回のマッチングを行い先に述べた(1)式において一致度D0を得る。初回のマッチングの一致度D0が設定値より小さい値の場合,その要素に関しての過剰判定抑制ルーチンに移行し,一致度の最大値が得られた時点で,その要素の一致度として格納しておく。他の要素に関して同様の作業を実行し,それぞれの要素での一致度の最大値の中で,最小の値をテンプレート画像と撮像画像との一致度として認識に指標とする。
【0082】
したがって,この実施の形態7によれば,要素間の統合する可能性を排除し,かつ一致度のS/N比を向上させることが可能となる。
【0083】
(実施の形態8)
この実施の形態8では,膨張/収縮を実施するその回数または膨張/収縮の画素数を,最初に面積測定することによって決定する例について述べる。
【0084】
初回のマッチング前にテンプレート画像と撮像画像の両者の面積を計測し,膨張または収縮の度合いを導出してから,一方の画像の膨張あるいは収縮を実行する。
【0085】
図9は,実施の形態8に係る基本的な識別手順例を示すフローチャートである。まず,正常状態のロゴ(2値化データ)をテンプレート画像として入力する(S901)。この入力はあらかじめ格納されているロゴデータから読み出すなどにより行う。続いて,図1の如くシステムを用いて対象製品105に印字されているロゴを撮像し,2値化データとして入力する(S902)。そして,正常状態のロゴと対象製品105のロゴとの照合,いわゆるテンプレートマッチングを行う(S903)。次いで,上記テンプレートマッチングを行った結果,正常状態のロゴと対象製品105のロゴとの一致度が低いか否かを判断する(S904)。
【0086】
上記ステップS904において,一致度が低いと判断したならば,認識対象画像とテンプレート画像の面積を計測し(S905),上記処理後の両画像を再度マッチングする(S906)。つまり,何れかの面積を計測して一致するまで太らせるかやせさせる。
【0087】
したがって,この実施の形態8によれば,実施の形態1において,膨張あるいは収縮処理後における再マッチングを省略することにより,迅速な処理が実現する。
【0088】
(実施の形態9)
この実施の形態9では,実施の形態8において各要素ごとの面積測定を行い,膨張/収縮を実施し,各要素ごとの位置的な膨張/収縮の度合いに個別に対応することができ,かつ隣接する要素との統合を回避し,再度各要素ごとに認識することにより過剰認識の確率を高速に低減する例について述べる。
【0089】
図10は,実施の形態9に係る基本的な識別手順例を示すフローチャートである。まず,正常状態のロゴ(2値化データ)をテンプレート画像として入力する(S1001)。この入力はあらかじめ格納されているロゴデータから読み出すなどにより行う。続いて,図1の如くシステムを用いて対象製品105に印字されているロゴを撮像し,2値化データとして入力する(S1002)。そして,正常状態のロゴと対象製品105のロゴとの照合,いわゆるテンプレートマッチングを行う(S1003)。次いで,上記テンプレートマッチングを行った結果,正常状態のロゴと対象製品105のロゴとの一致度が低いか否かを判断する(S1004)。
【0090】
上記ステップS1004において,一致度が低いと判断したならば,認識対象画像かテンプレート画像の一方の各要素を順次他のメモリ上にコピーする(S1005)。そして,コピーした各要素の面積を計測する(S1006)。さらに,認識対象画像かテンプレート画像の一方の要素を膨張/収縮する(S1007)。そして,各要素の面積が一致しているか否かを判断し(S1008),各要素の面積が一致していると判断したならば,再度マッチングを実行する(S1009)。
【0091】
すなわち,テンプレート画像と撮像画像の各要素を順次別のメモリにコピーし,各要素での初回のマッチング前に面積を計測し,膨張あるいは収縮の度合いを決定し,一方の画像に実施する。
【0092】
したがって,この実施の形態9によれば,実施の形態8において要素間の統合する可能性を除去し,一致度のS/N比を向上させることが可能となる。
【0093】
(実施の形態10)
この実施の形態10では,マッチング前の境界線画像の重心とマッチング後の結果画像の重心を取得し,それらの変移を検出することにより,膨張/収縮方向を検知して試行錯誤を排除し,最適な膨張/収縮処理を実施し,再度認識するこで過剰認識の確率を高速に低減可能にする例について述べる。
【0094】
図11は,実施の形態10に係る基本的な識別手順例を示すフローチャートである。まず,正常状態のロゴ(2値化データ)をテンプレート画像として入力する(S1101)。この入力はあらかじめ格納されているロゴデータから読み出すなどにより行う。続いて,図1の如くシステムを用いて対象製品105に印字されているロゴを撮像し,2値化データとして入力する(S1102)。そして,正常状態のロゴと対象製品105のロゴとの照合,いわゆるテンプレートマッチングを行う(S1103)。次いで,上記テンプレートマッチングを行った結果,正常状態のロゴと対象製品105のロゴとの一致度が低いか否かを判断する(S1104)。
【0095】
上記ステップS1104において,一致度が低いと判断したならば,位置補正後,マッチング直前の状態でテンプレートまたは撮像画像の2値画像に境界線処理を施す(S1105)。さらに,境界線処理後の画像の重心を取得し(S1106),境界線画像の重心位置からマッチング後の画像の重心位置の変移より膨張/収縮方向を検出する(S1107)。そして,検出した膨張/収縮方向より認識対象画像かテンプレートの一方を膨張/収縮し,再度マッチングする(S1108)。
【0096】
さらに,付言する。初回のテンプレート画像と撮像画像とのマッチング前に,両者の重心,面積,各要素の高さの総和,各要素の幅の総和の各値を取得し,テンプレート画像の重心と撮像画像の重心を一致するように位置補正を行い,その位置を記憶する。位置補正後,テンプレート画像あるいは撮像画像の境界線処理を施し,境界線画像の重心を取得する。
【0097】
マッチング後に得られた結果画像の重心を位置補正に用いた重心と比較し,図19に示すようにマッチング前の境界線画像の重心6とマッチング後の重心7の位置ずれが不変で,かつ一致度が設定値より低い場合は,各方向に対して均等に膨張/収縮し,再度マッチングを行う。
【0098】
一方,図20に示すように,マッチング前の境界線画像の重心8とマッチング後の重心9の位置が上下方向に各要素の幅の総和の2分の1以上ずれているとき,その方向に膨張/収縮を行う。同様に,左右方向には各要素の高さ総和の2分の1以上ずれているとき,その方向に膨張/収縮を実施し,再度マッチングを実行する。位置補正に通常の画像の重心を用い,指向的な膨張/収縮を画像全体に対する影響を平均化している。また,膨張/収縮の方向を顕在化するために境界線画像の重心を基準としている。
【0099】
したがって,この実施の形態10によれば,過剰判定抑制ルーチンに移行する前に照明の指向性により決定する膨張または収縮の方向を取得し,限定して過剰判定抑制ルーチンを発動することが可能となる。
【0100】
(実施の形態11)
この実施の形態11では,上述した実施の形態10において再度各要素ごとに認識することにより,過剰認識の確率を高速にし,かつ隣接する要素の統合を回避し,各要素の位置的な膨張/収縮の度合いに対応して低減する例について述べる。
【0101】
図12は,実施の形態11に係る基本的な識別手順例を示すフローチャートである。まず,正常状態のロゴ(2値化データ)をテンプレート画像として入力する(S1201)。この入力はあらかじめ格納されているロゴデータから読み出すなどにより行う。続いて,図1の如くシステムを用いて対象製品105に印字されているロゴを撮像し,2値化データとして入力する(S1202)。そして,正常状態のロゴと対象製品105のロゴとの照合,いわゆるテンプレートマッチングを行う(S1203)。次いで,上記テンプレートマッチングを行った結果,正常状態のロゴと対象製品105のロゴとの一致度が低いか否かを判断する(S1204)。
【0102】
上記ステップS1104において,一致度が低いと判断したならば,位置補正後,マッチング直前の状態でテンプレートまたは撮像画像の2値画像に境界処理を施す(S1205)。さらに,境界線処理後の画像の重心を取得し(S1206),境界線画像の重心位置からマッチング後の画像の重心位置の変移より膨張/収縮方向を検出する(S1207)。そして,各要素ごとに膨張/収縮方向を決定し,膨張/収縮を行った後,再度認識処理を実行する(S1208)。
【0103】
さらに説明すると,はじめにテンプレート画像と撮像画像の両方にラベリングを実行し,両者の要素数を取得する。また,各要素の重心,高さ,面積,幅を取得し,各要素ごとにマッチングを,他のメモリに移動して行う。各要素ごとのマッチング前後の重心の位置ずれから膨張/収縮の方向を決定し,膨張または収縮処理後,再度マッチングを実施する。
【0104】
したがって,この実施の形態11によれば,上述した実施の形態10において要素間の統合の可能性を除去し,一致度のS/N比を向上させることが可能となる。
【0105】
さて,以上説明してきた各実施の形態では,製品のロゴを認識する例をとって説明した。たとえば,不規則な多種少量生産が行われている製品の前面に印字されたロゴを認識することにより,発生頻度は低いが絶対発生させてはいけない不良であるカバーの取付けミスを検出するときに,様々な環境照明が設置され,手組み主体の生産ラインで行う際に,組み付けミスの修理に人が活動するため,固有の閉じた光学系を設定することができないなど,環境の変動に影響されやすい状況であっても,過剰認識により修理者に対して誤報を発信する確率を低減することができる。
【0106】
【発明の効果】
以上説明したように,本発明に係る工業文字認識方法(請求項)によれば,画像中の要素の周縁部分の不安定性を除去するための膨張/収縮処理に対し,膨張処理後の画像にラベリングを施し,要素数が減少していれば,要素間の統合があったことを示すので膨張処理前の画像に戻し,他方の画像を収縮処理し,一方の画像の収縮処理後にラベリングを施し,要素数が増えていれば,要素の分裂を示すので収縮処理前の画像に戻し,他方の画像を膨張処理することにより,あらかじめラベリングで要素数の変化を捉え,膨張による要素同士の統合や,収縮による要素の分離を事前に回避し,誤認識の可能性を低減することができる。
【0115】
また,本発明に係る工業文字認識方法(請求項)によれば,マッチング前の境界線画像の重心とマッチング後の結果画像の重心を取得し,それらの変移を検出することにより,膨張/収縮方向を検知して試行錯誤を排除し,最適な膨張/収縮処理を実施し,再度認識することで過剰認識の確率を高速に低減可能にし,かつ過剰判定抑制ルーチンに移行する前に照明の指向性により決定する膨張または収縮の方向を取得し,限定して過剰判定抑制ルーチンを発動することができる。
【0116】
また,本発明に係る工業文字認識方法(請求項)によれば,請求項において,再度各要素ごとに認識することにより,過剰認識の確率を高速にし,かつ隣接する要素の統合を回避し,各要素の位置的な膨張/収縮の度合いに対応して低減することができ,さらに要素間の統合の可能性を除去することにより,一致度のS/N比を向上させることができる。
【図面の簡単な説明】
【図1】本発明の実施の形態に係るシステムの構成を示す説明図である。
【図2】本発明の実施の形態1に係る基本的な識別手順例を示すフローチャートである。
【図3】本発明の実施の形態2に係る基本的な識別手順例を示すフローチャートである。
【図4】本発明の実施の形態3に係る基本的な識別手順例を示すフローチャートである。
【図5】本発明の実施の形態4に係る基本的な識別手順例を示すフローチャートである。
【図6】本発明の実施の形態5に係る基本的な識別手順例を示すフローチャートである。
【図7】本発明の実施の形態6に係る基本的な識別手順例を示すフローチャートである。
【図8】本発明の実施の形態7に係る基本的な識別手順例を示すフローチャートである。
【図9】本発明の実施の形態8に係る基本的な識別手順例を示すフローチャートである。
【図10】本発明の実施の形態9に係る基本的な識別手順例を示すフローチャートである。
【図11】本発明の実施の形態10に係る基本的な識別手順例を示すフローチャートである。
【図12】本発明の実施の形態11に係る基本的な識別手順例を示すフローチャートである。
【図13】正常状態におけるロゴ画像の入力状態を示す説明図である。
【図14】環境照明が強いなどのように製品周辺が一様に明るいときに撮像されたロゴの状態を示す説明図である。
【図15】環境照明が一様に暗いときに撮像されたロゴの状態を示す説明図である。
【図16】図13のロゴ画像に対応するテンプレート2値化画像を示す説明図である。
【図17】図14(環境照明が強い場合)のロゴ撮像画像に対応する撮像2値化画像を示す説明図である。
【図18】図15(環境照明が暗い場合)のロゴ撮像画像に対応する撮像2値化画像を示す説明図である。
【図19】実施の形態10に係り,マッチング前の境界線画像の重心とマッチング後の位置ずれが不変で一致度が設定値より低い場合の画像例を示す説明図である。
【図20】実施の形態10に係り,マッチング前の境界線画像の重心とマッチング後の位置ずれが生じている場合の画像例を示す説明図である。
【符号の説明】
101,102 環境照明
103 CCDエリアセンサ
104 補助照明
105 対象製品
6,7,8,9 重心
[0001]
BACKGROUND OF THE INVENTION
The present invention automates the identification of products / parts by reading and recognizing characters (such as logos or alphanumeric characters that identify products / parts) printed on the product surface or part surface in a factory production line. More specifically, the industrial character recognition method used for the line prevents and recognizes defective shipments without being affected by fluctuations in ambient lighting, poor visibility due to printing or parts thickness, etc. The present invention relates to an industrial character recognition method for reducing an excessive recognition rate in which a correct combination of a target image and a template is determined to be an incorrect combination.
[0002]
[Prior art]
At present, recognition of products by image processing is performed mainly on the recognition of printed characters on the surface of electronic components (IC, memory, etc.) in the semiconductor industry. For such recognition, a number of methods such as a method using pattern matching and a neural network, and a method using an OCR (optical character reader) are employed. For recognition of large products, techniques such as recognition by bar code and recognition by serial number (serial number) are also known. In addition, a recognition technique for dealing with missing or dirty characters is also known.
[0003]
As a reference technical document for recognizing such a character image and automatically recognizing a product / part on a production line, for example, a neural network, a character recognition method, an electronic component mounting inspection apparatus, and an Management method used ”is disclosed. In particular, here, characters printed on the surface of electronic components are recognized by a recognition method using a neural network to prevent erroneous mounting on a printed circuit board, and at the same time, quality and settlement management is performed.
[0004]
In addition, in “Dissimilar Material Judgment Method” of Japanese Patent Laid-Open No. 6-44375, in the substance management of a material marked with characters or the like, the image data on the upstream side is compared with the data on the downstream material, so that Techniques for detection are disclosed. Furthermore, Japanese Patent Laid-Open No. 7-296112 discloses a technique for performing weighted dilation to avoid misintegration between characters and to obtain a contour line when cutting out characters. Yes.
[0005]
[Problems to be solved by the invention]
However, in the conventional technology as shown above, the product is recognized only by recognizing the characters printed on the product, and the logo (manufacturer name or product name) printed on the product surface. Design characters that are printed on the surface of a product exterior cover, etc., in an uneven or flat shape), etc., because it must be considered as a designed pattern in terms of product appeal beyond its role as character information , It was not easy to be consistent with the normal character standard.
[0006]
As for designed characters, for example, the number “2” and the English letter “z” or the English letter “Z”, the number “1” and the English letter “I” (uppercase eye) or the English letter “l” ( There are many similar shapes such as lowercase letters L), and it is possible to depend on the context as the meaning of the sentence. However, in OCR and pattern matching, normalization is usually performed corresponding to size, rotation, displacement, etc. before recognition, but in image recognition used at the production site, elements in the target image that have affected lighting fluctuations are detected. Variations in thickness due to instability of the periphery must be taken into account.
[0007]
In addition, since the product surface is made of various materials (molded resin, film-like label, etc.), even under the same conditions, the imaging object such as a logo is specular, glossy, shining and frosted. Unlike the case where characters printed on paper are input with a scanner, such as being acquired, there is a problem that the image obtained there is easily affected by changes in ambient lighting.
[0008]
In addition, a method to speed up the detection of recognition results using a learning function such as a neural network has been proposed. However, when a product of high-mix low-volume production is targeted for recognition, production ends in the learning period. There are many cases.
[0009]
In production lines, there are many examples of applying fluctuation threshold binarization to fluctuations in the illumination system, but the optical expansion and contraction of the resulting image itself is canceled by expansion and contraction in image processing. However, there was a problem that matching accuracy was low. Furthermore, in automatic recognition, it is natural to suppress erroneous recognition, but it is also necessary to simultaneously reduce the probability of excessive recognition involving humans.
[0010]
The present invention has been made in view of the above, and an object of the present invention is to suppress a determination error due to excessive recognition due to the influence of environmental lighting or the like, and to improve recognition quality.
[0011]
[Means for Solving the Problems]
In order to achieve the above object, the claims 1 In the industrial character recognition method according to the first aspect of the present invention, a binarized industrial character is input as a template image in an industrial character recognition method for identifying a product in a production line by recognizing an industrial character such as a logo. A second step of capturing and binarizing an industrial character printed on the identification target product and inputting the captured image; and a third step of executing template matching on the captured image using the template image; As a result of performing template matching in the third step, a fourth step of determining whether or not the degree of coincidence between the template image and the captured image is lower than a preset threshold value, and the fourth step If it is determined that the degree of coincidence is low in the process, labeling is performed and one of the recognition target image or the template image is expanded and matched again A fifth step of executing the processing, a sixth step of determining whether or not the number of elements in the image after the expansion in the fifth step is smaller than that before the expansion, and a expansion in the sixth step When it is determined that the number of elements in the subsequent image is smaller than that before the expansion, a seventh process is performed in which the expansion is canceled, the other of the canceled side is contracted, and matching is performed again.
[0012]
That is, In contrast to expansion / contraction processing to remove the instability of the peripheral part of the elements in the image, if the image after expansion processing is labeled and the number of elements is reduced, there is integration between the elements. As shown in the figure, the image is restored to the image before the expansion process, the other image is subjected to the contraction process, the labeling is performed after the contraction process of the one image, and if the number of elements is increased, the division of the element is indicated. By expanding the other image, the change in the number of elements can be detected in advance by labeling, and the integration of elements due to expansion and the separation of elements due to contraction can be avoided in advance, reducing the possibility of misrecognition. it can .
[0029]
Claims 2 In the industrial character recognition method according to the first aspect of the present invention, a binarized industrial character is input as a template image in an industrial character recognition method for identifying a product in a production line by recognizing an industrial character such as a logo. A second step of capturing and binarizing an industrial character printed on the identification target product and inputting the captured image; and a third step of executing template matching on the captured image using the template image; As a result of performing template matching in the third step, a fourth step of determining whether or not the degree of coincidence between the template image and the captured image is lower than a preset threshold value, and the fourth step When it is determined that the degree of coincidence is low in the process, position correction is performed, and the binary value of the template image or the picked-up image in the state immediately before matching Matching from the fifth step of performing boundary line processing on the image, the sixth step of acquiring the center of gravity of the image after the boundary line processing by the fifth step, and the center of gravity position of the boundary line image by the sixth step A seventh step of detecting an expansion / contraction direction based on a change in the center of gravity position of the subsequent image, and one of the recognition target image or the template image is expanded / contracted based on the expansion / contraction direction detected in the seventh step; And an eighth step of matching again.
[0030]
In other words, the center of gravity of the boundary line image before matching and the center of gravity of the result image after matching are acquired, and their transition is detected, thereby detecting the direction of expansion / contraction, eliminating trial and error, and optimal expansion / contraction By executing the process and re-recognizing it, the probability of over-recognition can be reduced at a high speed, and the direction of expansion or contraction determined by the directivity of the illumination is acquired before moving to the over-judgment suppression routine. It is possible to activate an excessive determination suppression routine.
[0031]
Claims 3 In the industrial character recognition method according to the first aspect of the present invention, a binarized industrial character is input as a template image in an industrial character recognition method for identifying a product in a production line by recognizing an industrial character such as a logo. A second step of capturing and binarizing an industrial character printed on the identification target product and inputting the captured image; and a third step of executing template matching on the captured image using the template image; As a result of performing template matching in the third step, a fourth step of determining whether or not the degree of coincidence between the template image and the captured image is lower than a preset threshold value, and the fourth step When it is determined that the degree of coincidence is low in the process, after the position correction, the binary value of the template image or the captured image in the state immediately before the matching Matching from the fifth step of performing boundary line processing on the image, the sixth step of acquiring the center of gravity of the image after the boundary line processing by the fifth step, and the center of gravity position of the boundary line image by the sixth step The seventh step of detecting the expansion / contraction direction from the change in the center of gravity position of the subsequent image; the expansion / contraction direction is determined for each element; after the expansion / contraction, the recognition process is executed again. These processes are included.
[0032]
That is, the claim 2 In this case, by re-recognizing each element again, the probability of overrecognition can be increased, and the integration of adjacent elements can be avoided, and can be reduced according to the degree of positional expansion / contraction of each element. Further, by removing the possibility of integration between elements, it is possible to improve the S / N ratio of the degree of coincidence.
[0033]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the industrial character recognition method of the present invention will be described in detail with reference to the accompanying drawings.
[0034]
(System overview)
FIG. 1 is an explanatory diagram illustrating a configuration of a system according to an embodiment. In the figure, reference numerals 101 and 102 denote environmental lighting, 103 denotes a CCD area sensor, 104 denotes auxiliary lighting, and 105 denotes a target product.
[0035]
When a logo printed on the surface of the target product 105 is recognized by an imaging system having an auxiliary illumination 104 using a CCD area sensor 103 under a plurality of independent environmental illuminations such as the environmental illuminations 101 and 102, the following To do so.
[0036]
Next, in the system configured as described above, as shown in FIG. 1, the CCD area sensor 103 is used under a plurality of independent environmental lights such as the environmental light 101 and the environmental light 102, and the auxiliary light 104 is provided. An example of recognizing a logo printed on the surface of the target product 105 in the imaging system will be described separately for each embodiment.
[0037]
(Embodiment 1)
In the first embodiment, image recognition is applied to recognize / identify and determine a product logo, etc., based on environmental lighting fluctuations, logo printing status, surface status, background / logo contrast, etc. The acquired image after binarization due to the unstable relative relationship between the pixel value and the threshold value of the peripheral edge of the element of the target image adversely affects the recognition and expands the peripheral edge of the element even when excessive recognition occurs. An example of avoiding over-recognition by matching again is described.
[0038]
When a closed optical system is not used, the threshold value for binarization is usually determined by a variation threshold value determination method such as a mode method or a discriminant analysis method because it is susceptible to environmental lighting. If the binarization threshold is fixed without consideration of robustness due to no variation in environmental lighting, the possibility of obtaining a constant binary image is sufficiently high. However, when passive lighting is present as an environmental fluctuation factor in addition to active lighting, it is necessary to consider that the environment changes due to changes over time.
[0039]
FIG. 13 is an explanatory diagram showing an input state of a logo image in a normal state. FIG. 14 is an explanatory diagram showing the state of a logo imaged when the periphery of the product is uniformly bright, such as when the ambient lighting is strong. FIG. 15 is an image captured when the ambient illumination is uniformly dark. It is explanatory drawing which shows the state of a logo.
[0040]
FIG. 16 (normal state logo), FIG. 14 (imaging logo when ambient lighting is strong), and FIG. 15 (imaging logo when ambient lighting is dark) are shown in FIG. Logo (), FIG. 17 (imaging logo when ambient lighting is strong), and FIG. 18 (imaging logo when ambient lighting is dark). Among them, FIG. 16 (logo in a normal state) is registered (stored in a memory) as a template image (standard figure).
[0041]
FIG. 2 is a flowchart showing an example of a basic identification procedure according to the first embodiment. First, a normal logo (binarized data) is input as a template image (S201). This input is performed by reading from prestored logo data. Subsequently, the logo printed on the target product 105 is imaged using the system as shown in FIG. 1 and input as binarized data (S202). Then, collation between the logo in the normal state and the logo of the target product 105, so-called template matching is performed (S203).
[0042]
Next, as a result of the template matching, it is determined whether or not the degree of coincidence (described later) between the logo in the normal state and the logo of the target product 105 is low (S204). If it is determined that the degree of coincidence is low, either the recognition target image or the template image is expanded and matching processing is executed again (S205).
[0043]
The template matching (e.g. coincidence calculation) in the above-described processing will be further described in detail. Position correction is performed using the center of gravity as a parameter representing the position of the element of the image. The degree of coincidence, which is an index of recognition, is derived using exclusive OR between the template image and the captured image. In this case, the smaller the number of pixels remaining in the result image, the better the match.
[0044]
Assuming that the total number of pixels of the template binary image is A, the total number of pixels of the captured binary image is B, the exclusive OR of A and B is C, and the degree of coincidence is D (%), D is an expression shown below Given by (1).
D = (A + B C) / (A + B) × 100 (%) (1)
[0045]
If the matching degree D0 is smaller than a set value by the first template matching, either the template image or the captured image is expanded and matched again, and the matching degree D1 is derived from the above equation (1). Here, if D0 <D1, further expansion is performed to obtain a matching degree D2. If D1 <D2, the same operation is repeated n times for setting the upper limit in advance, and when Dn> Dn + 1, the coincidence degree D indicating the index of recognition between the template image and the captured image is set to Dn. Compare with the set value. And by setting this setting value strict, it is judged that the target product is wrong once, and the recognition error is reduced. By performing the confirmation routine, the over-recognition rate in the case of normal product recognition is reduced. can do.
[0046]
On the other hand, if D0> D1 in the above description, D1 ′ obtained by expanding the other image and matching again is compared with D0, and the same operation as described above is repeatedly executed.
[0047]
Therefore, according to the first embodiment, when recognition of a product flowing on a production line is performed by image recognition using a logo or the like in an environment where a person can act, a special closed optical system is specially used. Without setting, it is possible to reduce the over-judgment rate that is affected by changes in environmental lighting, etc., and uses humans unnecessarily.
[0048]
(Embodiment 2)
In this second embodiment, an example will be described in which, when the peripheral portion of an element in the first embodiment described above is expanded, adjacent elements are prevented from being integrated and the excess recognition rate is reduced.
[0049]
In the second embodiment, the expansion process of the first embodiment is replaced with a contraction process, which directly affects fluctuations in the position of the center of gravity used for position correction that may occur when the expansion is performed, and changes in the number of elements. Avoid integration of elements in the image that gives
[0050]
FIG. 3 is a flowchart showing an example of a basic identification procedure according to the second embodiment. First, a normal logo (binarized data) is input as a template image (S301). This input is performed by reading from prestored logo data. Subsequently, the logo printed on the target product 105 is imaged using the system as shown in FIG. 1 and input as binarized data (S302). Then, collation between the normal logo and the logo of the target product 105, so-called template matching is performed (S303).
[0051]
Next, as a result of the template matching, it is determined whether or not the degree of coincidence between the logo in the normal state and the logo of the target product 105 (a degree of coincidence similar to that in Embodiment 1 is derived) is low (S304). If it is determined that the degree of coincidence is low, one of the recognition target image and the template image is contracted, and the matching process is executed again (S305).
[0052]
Therefore, according to the second embodiment, since elements in the target image are not integrated, the possibility of erroneous recognition can be reduced.
[0053]
(Embodiment 3)
In this third embodiment, an example will be described in which the deformation of the image itself is avoided and the probability of overrecognition is reduced.
[0054]
In contrast to expansion / contraction processing to remove the instability of the peripheral part of the elements in the image, if the image after expansion processing is labeled and the number of elements is reduced, there is integration between the elements. It returns to the image before the expansion process, and the other image is contracted. If the labeling is performed after the shrinking process of one image and the number of elements is increased, the division of the element is indicated, the image before the shrinking process is restored, and the other image is expanded.
[0055]
FIG. 4 is a flowchart showing an example of a basic identification procedure according to the third embodiment. First, a normal logo (binarized data) is input as a template image (S401). This input is performed by reading from prestored logo data. Subsequently, the logo printed on the target product 105 is imaged using the system as shown in FIG. 1 and input as binarized data (S402). Then, collation between the logo in the normal state and the logo of the target product 105, so-called template matching is performed (S403).
[0056]
Next, as a result of the template matching, it is determined whether or not the degree of coincidence (described later) between the logo in the normal state and the logo of the target product 105 is low (S404). Here, if it is determined that the degree of coincidence is low, a labeling process is performed when one of the recognition target image or the template image is expanded and the matching process is executed again (S405).
[0057]
Then, it is determined whether or not the number of elements in the image after expansion is smaller than that before expansion (S406). If it is determined that the number of elements in the image after expansion is smaller than that before expansion, the expansion is canceled, the other is contracted, and matching is executed again (S407).
[0058]
Furthermore, the above-mentioned contents are added. When the degree of coincidence D0 in the equation (1) is smaller than a set value by the first template matching, labeling is executed on the template image and the captured image, and the number of elements of both is confirmed. Then, the following (1) and (2) are executed according to the number of elements.
[0059]
(1) When the number of elements is the same, the same operation as in the first embodiment is performed, the number of elements is confirmed when matching is performed again, and if there is no change, the same operation is repeated.
[0060]
(2) On the other hand, when the number of elements is small, the smaller one is shrunk to the same number, and the time when the number becomes the same is set as the first matching. Thereafter, the same operation as (1) is repeatedly executed and the maximum value is stored. Then, the larger number is expanded to the same number, and the time when the number becomes the same is set as the first matching, and thereafter, the operation (1) is repeated and the maximum value is stored. The two maximum values obtained in this process are compared, and the larger one is used as the matching degree in this process.
[0061]
Therefore, according to the third embodiment, the change in the number of elements can be detected in advance by labeling, and the integration of elements due to expansion and the separation of elements due to contraction can be avoided in advance, thereby reducing the possibility of erroneous recognition. it can.
[0062]
(Embodiment 4)
In the fourth embodiment, when the elements of the image are expanded / contracted to reduce the probability of overrecognition, the influence of the illumination system from one direction and the overrecognition factor due to the shading of a slight thickness of printing are removed. In order to avoid this individually, an example in which expansion / contraction is performed in one direction of the element will be described.
[0063]
FIG. 5 is a flowchart showing an example of a basic identification procedure according to the fourth embodiment. First, a normal logo (binary data) is input as a template image (S501). This input is performed by reading from prestored logo data. Subsequently, the logo printed on the target product 105 is imaged using the system as shown in FIG. 1 and input as binarized data (S502). Then, the normal logo and the logo of the target product 105 are collated, so-called template matching is performed (S503).
[0064]
Next, as a result of the template matching, it is determined whether or not the degree of coincidence (described later) between the logo in the normal state and the logo of the target product 105 is low (S504). Here, when the maximum value of the degree of coincidence is obtained, the degree of coincidence is confirmed by sequentially performing expansion or contraction in the vertical and horizontal directions, and the degree of coincidence when the maximum value is obtained is used as a recognition index. To do.
[0065]
If it is determined in step S504 that the degree of coincidence is low, one of the recognition target image or the template image is individually expanded / contracted, and matching is executed again for each process (S505).
[0066]
Therefore, according to the fourth embodiment, it is possible to suppress the excess determination rate in response to the directional change of the illumination system.
[0067]
(Embodiment 5)
In the fifth embodiment, an excessive recognition factor is individually avoided corresponding to the influence of the illumination system independent from the other direction and the accompanying expansion / compression in the other direction due to the slight thickness shading of the print. Therefore, an example will be described in which the probability of overrecognition is reduced by performing expansion / contraction in one direction of the element.
[0068]
FIG. 6 is a flowchart showing an example of a basic identification procedure according to the fifth embodiment. First, a normal logo (binarized data) is input as a template image (S601). This input is performed by reading from prestored logo data. Subsequently, the logo printed on the target product 105 is imaged using the system as shown in FIG. 1 and input as binarized data (S602). Then, collation between the logo in the normal state and the logo of the target product 105, so-called template matching is performed (S603).
[0069]
Next, as a result of the template matching, it is determined whether or not the degree of coincidence (described later) between the logo in the normal state and the logo of the target product 105 is low (S604).
[0070]
If it is determined in step S604 that the degree of coincidence is low, one of the recognition target image or the template image is individually expanded / contracted, and matching is executed again for each process (S605). Further, the same processing is executed by combining the directions of expansion or contraction (S606).
[0071]
In other words, ,Up Sequentially inflate or contract in the left and right directions to check the degree of coincidence, leave the expansion or contraction in the direction in which the degree of coincidence improved, and further inflate or contract in the other direction, and when the maximum value is obtained Is the index of recognition.
[0072]
Therefore, according to the fifth embodiment, recognition with higher accuracy than the fourth embodiment is realized.
[0073]
(Embodiment 6)
In the sixth embodiment, the illuminance of the auxiliary illumination is changed in accordance with the direction of expansion and contraction in which a high recognition coincidence value is obtained again, thereby eliminating excessive recognition that occurs repeatedly due to fluctuations in environmental illumination. An example is described.
[0074]
FIG. 7 is a flowchart showing an example of a basic identification procedure according to the sixth embodiment. First, a normal logo (binarized data) is input as a template image (S701). This input is performed by reading from prestored logo data. Subsequently, the logo printed on the target product 105 is imaged using the system as shown in FIG. 1 and input as binarized data (S702). Then, the normal logo and the logo of the target product 105 are compared, so-called template matching is performed (S703). Next, as a result of the template matching, it is determined whether or not the degree of coincidence between the logo in the normal state and the logo of the target product 105 is low (S704).
[0075]
If it is determined in step S704 that the degree of coincidence is low, one of the recognition target image or the template image is individually expanded / contracted, and matching is executed again for each process (S705). Further, the same processing is executed by combining the directions of expansion or contraction (S706), and the illuminance of the illumination system irradiated from the expanded side is increased, or the illuminance of the illumination system irradiated from the contraction side is decreased (S707).
[0076]
That is, auxiliary lighting from four directions (up, down, left and right) is provided in advance, and when the number of times of recognition for invoking the above-described excessive determination suppression routine exceeds the set number of times, environmental lighting assistance is required as a repeated excessive determination factor. Judgment is made, and the illuminance of the auxiliary illumination irradiated from the expanded side is increased. Alternatively, the illuminance of the auxiliary illumination irradiated from the contracted side is lowered. Then, matching is confirmed again, and the degree of coincidence is confirmed, and the illuminance is fixed so as not to shift to the excessive determination suppression routine using expansion or contraction.
[0077]
Therefore, it is possible to grasp the directivity of the lighting that is reducing the excess determination rate, and to remove the excessive determination factor that occurs repeatedly.
[0078]
(Embodiment 7)
In the seventh embodiment, since each element in the image is copied to another memory and expanded / contracted, adjacent elements are not expanded / contracted at the same time. An example will be described that makes it possible to reduce the probability of overrecognition without causing integration of.
[0079]
FIG. 8 is a flowchart showing an example of a basic identification procedure according to the seventh embodiment. First, a normal logo (binarized data) is input as a template image (S801). This input is performed by reading from prestored logo data. Subsequently, the logo printed on the target product 105 is imaged using the system as shown in FIG. 1 and input as binarized data (S802). Then, the normal logo and the logo of the target product 105 are compared, so-called template matching is performed (S803). Next, as a result of the template matching, it is determined whether or not the degree of coincidence between the logo in the normal state and the logo of the target product 105 is low (S804).
[0080]
If it is determined in step S804 that the degree of coincidence is low, one element of either the recognition target image or the template image is sequentially copied onto another memory (S805). Further, each moved element is expanded / contracted, and matching is executed again (S806). In other words, sticking is eliminated by cutting out the target element, moving it to another memory and fattening it.
[0081]
In addition, labeling is performed on both the template image and the captured image, and each element is sequentially copied to another memory, and the first matching is performed to obtain the degree of coincidence D0 in the above-described equation (1). When the matching degree D0 of the first matching is smaller than the set value, the process proceeds to the over-judgment suppression routine for the element, and is stored as the matching degree of the element when the maximum matching degree is obtained. . The same operation is performed for the other elements, and the minimum value among the maximum values of the matching degree in each element is used as an index for recognition as the matching degree between the template image and the captured image.
[0082]
Therefore, according to the seventh embodiment, it is possible to eliminate the possibility of integration between elements and to improve the S / N ratio of the degree of coincidence.
[0083]
(Embodiment 8)
In the eighth embodiment, an example will be described in which the number of times of performing expansion / contraction or the number of pixels of expansion / contraction is determined by first measuring the area.
[0084]
Before the first matching, the areas of both the template image and the captured image are measured, the degree of expansion or contraction is derived, and then the expansion or contraction of one image is executed.
[0085]
FIG. 9 is a flowchart showing an example of a basic identification procedure according to the eighth embodiment. First, a normal logo (binary data) is input as a template image (S901). This input is performed by reading from prestored logo data. Subsequently, the logo printed on the target product 105 is imaged using the system as shown in FIG. 1 and input as binarized data (S902). Then, the normal logo and the logo of the target product 105 are compared, so-called template matching is performed (S903). Next, as a result of the template matching, it is determined whether or not the degree of coincidence between the logo in the normal state and the logo of the target product 105 is low (S904).
[0086]
If it is determined in step S904 that the degree of coincidence is low, the areas of the recognition target image and the template image are measured (S905), and the processed images are matched again (S906). In other words, any area is measured and fattened or thinned until they match.
[0087]
Therefore, according to the eighth embodiment, quick processing is realized by omitting rematching after the expansion or contraction processing in the first embodiment.
[0088]
(Embodiment 9)
In the ninth embodiment, the area of each element is measured in the eighth embodiment, the expansion / contraction is performed, and it is possible to individually cope with the degree of positional expansion / contraction for each element, and An example of reducing the probability of overrecognition at high speed by avoiding integration with adjacent elements and recognizing each element again will be described.
[0089]
FIG. 10 is a flowchart showing an example of a basic identification procedure according to the ninth embodiment. First, a normal logo (binarized data) is input as a template image (S1001). This input is performed by reading from prestored logo data. Subsequently, the logo printed on the target product 105 is imaged using the system as shown in FIG. 1 and input as binarized data (S1002). Then, the normal logo and the logo of the target product 105 are compared, so-called template matching is performed (S1003). Next, as a result of the template matching, it is determined whether or not the degree of coincidence between the logo in the normal state and the logo of the target product 105 is low (S1004).
[0090]
If it is determined in step S1004 that the degree of coincidence is low, each element of either the recognition target image or the template image is sequentially copied onto another memory (S1005). Then, the area of each copied element is measured (S1006). Further, one element of the recognition target image or the template image is expanded / contracted (S1007). Then, it is determined whether or not the areas of the elements match (S1008). If it is determined that the areas of the elements match, matching is executed again (S1009).
[0091]
In other words, each element of the template image and the captured image is sequentially copied to another memory, the area is measured before the first matching with each element, the degree of expansion or contraction is determined, and this is performed on one image.
[0092]
Therefore, according to the ninth embodiment, the possibility of integration between elements in the eighth embodiment can be eliminated, and the S / N ratio of the coincidence can be improved.
[0093]
(Embodiment 10)
In the tenth embodiment, the center of gravity of the boundary image before matching and the center of gravity of the result image after matching are obtained, and by detecting their transition, the direction of expansion / contraction is detected to eliminate trial and error, An example in which the probability of overrecognition can be reduced at high speed by performing optimal expansion / contraction processing and re-recognizing will be described.
[0094]
FIG. 11 is a flowchart showing an example of a basic identification procedure according to the tenth embodiment. First, a normal logo (binarized data) is input as a template image (S1101). This input is performed by reading from prestored logo data. Subsequently, the logo printed on the target product 105 is imaged using the system as shown in FIG. 1 and input as binarized data (S1102). Then, the normal state logo and the target product 105 are compared with each other, so-called template matching (S1103). Next, as a result of the template matching, it is determined whether or not the degree of coincidence between the logo in the normal state and the logo of the target product 105 is low (S1104).
[0095]
If it is determined in step S1104 that the degree of coincidence is low, boundary processing is performed on the binary image of the template or captured image immediately after matching after position correction (S1105). Further, the center of gravity of the image after boundary line processing is acquired (S1106), and the expansion / contraction direction is detected from the transition of the center of gravity position of the image after matching from the center of gravity position of the boundary line image (S1107). Then, one of the recognition target image or the template is expanded / contracted from the detected expansion / contraction direction, and matching is performed again (S1108).
[0096]
In addition, I will add. Before matching the template image with the captured image for the first time, obtain the values of the center of gravity, area, total height of each element, and total width of each element. The position is corrected so as to match, and the position is stored. After the position correction, the border line processing of the template image or the captured image is performed, and the center of gravity of the border line image is acquired.
[0097]
The centroid of the result image obtained after matching is compared with the centroid used for position correction. As shown in FIG. 19, the positional deviation between the centroid 6 of the border image before matching and the centroid 7 after matching is invariable and coincides. If the degree is lower than the set value, expansion / contraction is performed equally in each direction, and matching is performed again.
[0098]
On the other hand, as shown in FIG. 20, when the positions of the center of gravity 8 of the boundary line image before matching and the center of gravity 9 after matching are shifted in the vertical direction by more than one half of the total sum of the widths of the respective elements, Perform expansion / contraction. Similarly, when the horizontal direction is shifted by more than half of the total height of each element, expansion / contraction is performed in that direction, and matching is executed again. The center of gravity of a normal image is used for position correction, and the effect of directional expansion / contraction on the entire image is averaged. The center of gravity of the boundary line image is used as a reference in order to reveal the direction of expansion / contraction.
[0099]
Therefore, according to the tenth embodiment, it is possible to acquire the direction of expansion or contraction determined by the directivity of illumination before proceeding to the excessive determination suppression routine, and to activate the excessive determination suppression routine in a limited manner. Become.
[0100]
(Embodiment 11)
In the eleventh embodiment, by recognizing each element again in the tenth embodiment described above, the probability of overrecognition is increased, integration of adjacent elements is avoided, and positional expansion / An example of reduction corresponding to the degree of contraction will be described.
[0101]
FIG. 12 is a flowchart showing an example of a basic identification procedure according to the eleventh embodiment. First, a normal logo (binarized data) is input as a template image (S1201). This input is performed by reading from prestored logo data. Subsequently, the logo printed on the target product 105 is imaged using the system as shown in FIG. 1 and input as binarized data (S1202). Then, the normal state logo and the target product 105 logo are collated, so-called template matching is performed (S1203). Next, as a result of the template matching, it is determined whether or not the degree of coincidence between the logo in the normal state and the logo of the target product 105 is low (S1204).
[0102]
If it is determined in step S1104 that the degree of coincidence is low, boundary processing is performed on the binary image of the template or the captured image immediately after matching after position correction (S1205). Further, the center of gravity of the image after the boundary line processing is acquired (S1206), and the expansion / contraction direction is detected from the transition of the center of gravity position of the image after matching from the center of gravity position of the boundary line image (S1207). Then, the expansion / contraction direction is determined for each element, and after performing expansion / contraction, recognition processing is executed again (S1208).
[0103]
More specifically, first, labeling is performed on both the template image and the captured image, and the number of elements of both is acquired. Also, the center of gravity, height, area, and width of each element are acquired, and matching is performed for each element by moving it to another memory. The direction of expansion / contraction is determined from the displacement of the center of gravity before and after matching for each element, and matching is performed again after the expansion or contraction processing.
[0104]
Therefore, according to the eleventh embodiment, the possibility of integration between elements in the tenth embodiment described above can be eliminated, and the S / N ratio of coincidence can be improved.
[0105]
In each of the embodiments described above, an example of recognizing a product logo has been described. For example, by recognizing a logo printed on the front of a product that is irregularly produced in small quantities, it is possible to detect a cover installation error that is a low occurrence but must never be generated. , When various environmental lighting is installed and the production line is mainly hand-assembled, humans are active in repairing assembly mistakes, so it is not possible to set up a unique closed optical system. Even in situations where it is easy to be performed, it is possible to reduce the probability of sending false alarms to repairers due to excessive recognition.
[0106]
【The invention's effect】
As described above, the industrial character recognition method according to the present invention (claims) 1 ), In contrast to expansion / contraction processing to remove the instability of the peripheral part of the elements in the image, labeling is applied to the image after expansion processing, and if the number of elements is reduced, integration between the elements is performed. If there is an increase in the number of elements, the contraction process is performed. By reverting to the previous image and expanding the other image, the change in the number of elements can be detected in advance by labeling, and elements can be integrated by expansion and separation of elements by contraction can be avoided in advance. Can be reduced.
[0115]
Further, the industrial character recognition method according to the present invention (claims) 2 ), The centroid of the boundary image before matching and the centroid of the result image after matching are obtained, and their transition is detected to detect the expansion / contraction direction and eliminate trial and error. Performing expansion / contraction processing, re-recognizing the probability of over-recognition can be reduced at a high speed, and acquiring the direction of expansion or contraction determined by the directivity of the illumination before moving to the over-judgment suppression routine, The excessive determination suppression routine can be activated in a limited manner.
[0116]
Further, the industrial character recognition method according to the present invention (claims) 3 ) 2 In this case, by re-recognizing each element again, the probability of overrecognition can be increased, and the integration of adjacent elements can be avoided, and can be reduced according to the degree of positional expansion / contraction of each element. Further, by removing the possibility of integration between elements, the S / N ratio of the degree of coincidence can be improved.
[Brief description of the drawings]
FIG. 1 is an explanatory diagram showing a configuration of a system according to an embodiment of the present invention.
FIG. 2 is a flowchart showing an example of a basic identification procedure according to the first embodiment of the present invention.
FIG. 3 is a flowchart showing an example of a basic identification procedure according to the second embodiment of the present invention.
FIG. 4 is a flowchart showing an example of a basic identification procedure according to the third embodiment of the present invention.
FIG. 5 is a flowchart showing an example of a basic identification procedure according to the fourth embodiment of the present invention.
FIG. 6 is a flowchart showing an example of a basic identification procedure according to the fifth embodiment of the present invention.
FIG. 7 is a flowchart showing an example of a basic identification procedure according to the sixth embodiment of the present invention.
FIG. 8 is a flowchart showing an example of a basic identification procedure according to the seventh embodiment of the present invention.
FIG. 9 is a flowchart showing an example of a basic identification procedure according to the eighth embodiment of the present invention.
FIG. 10 is a flowchart showing an example of a basic identification procedure according to the ninth embodiment of the present invention.
FIG. 11 is a flowchart showing an example of a basic identification procedure according to the tenth embodiment of the present invention.
FIG. 12 is a flowchart showing an example of a basic identification procedure according to Embodiment 11 of the present invention.
FIG. 13 is an explanatory diagram showing an input state of a logo image in a normal state.
FIG. 14 is an explanatory diagram illustrating a state of a logo imaged when the periphery of the product is uniformly bright, such as when the ambient illumination is strong.
FIG. 15 is an explanatory diagram showing a state of a logo imaged when ambient illumination is uniformly dark.
16 is an explanatory diagram showing a template binarized image corresponding to the logo image of FIG.
FIG. 17 is an explanatory diagram showing a picked-up binarized image corresponding to the logo picked-up image in FIG. 14 (when environmental lighting is strong).
FIG. 18 is an explanatory diagram showing a picked-up binary image corresponding to the logo picked-up image in FIG. 15 (when ambient illumination is dark).
FIG. 19 is an explanatory diagram illustrating an image example according to the tenth embodiment when the center of gravity of a boundary line image before matching and the positional deviation after matching are invariable and the matching degree is lower than a set value.
FIG. 20 is an explanatory diagram illustrating an example of an image when a center of gravity of a boundary line image before matching and a positional shift after matching are generated according to the tenth embodiment;
[Explanation of symbols]
101,102 Environmental lighting
103 CCD area sensor
104 Auxiliary lighting
105 Target products
6, 7, 8, 9 Center of gravity

Claims (3)

ロゴなどの工業文字を認識することによって生産ラインにおける製品識別を行う工業文字認識方法において,
2値化された工業文字をテンプレート画像として入力する第1の工程と,
識別対象製品に印字されている工業文字を撮像・2値化し撮像画像を入力する第2の工程と,
前記テンプレート画像を用いて前記撮像画像に対するテンプレートマッチングを実行する第3の工程と,
前記第3の工程でテンプレートマッチングを行った結果,前記テンプレート画像と前記撮像画像との一致度があらかじめ設定した閾値に対して低いか否かを判断する第4の工程と,
前記第4の工程で一致度が低いと判断した場合に,ラベリング処理を行い認識対象画像か前記テンプレート画像の一方を膨張させて再度マッチング処理を実行する第5の工程と,
前記第5の工程で膨張した後の画像中の要素数が膨張前より少ないか否かを判断する第6の工程と,
前記第6の工程で膨張後の画像中の要素数が膨張前より少ないと判断した場合,膨張をキャンセルし,該キャンセルした側の他方を収縮し,再度マッチングを実行する第7の工程と,
を含むことを特徴とする工業文字認識方法。
In an industrial character recognition method that identifies products in a production line by recognizing industrial characters such as logos,
A first step of inputting a binarized industrial character as a template image;
A second step of capturing and binarizing industrial characters printed on the identification target product and inputting a captured image;
A third step of performing template matching on the captured image using the template image;
A fourth step of determining whether or not the degree of coincidence between the template image and the captured image is lower than a preset threshold value as a result of performing template matching in the third step;
A fifth step of performing a matching process again by performing a labeling process and expanding one of the recognition target image or the template image when it is determined that the degree of coincidence is low in the fourth process;
A sixth step of determining whether or not the number of elements in the image after expansion in the fifth step is less than that before expansion;
If it is determined in the sixth step that the number of elements in the image after expansion is less than that before expansion, the seventh step cancels the expansion, contracts the other of the canceled sides, and executes matching again;
An industrial character recognition method comprising:
ロゴなどの工業文字を認識することによって生産ラインにおける製品識別を行う工業文字認識方法において,
2値化された工業文字をテンプレート画像として入力する第1の工程と,
識別対象製品に印字されている工業文字を撮像・2値化し撮像画像を入力する第2の工程と,
前記テンプレート画像を用いて前記撮像画像に対するテンプレートマッチングを実行する第3の工程と,
前記第3の工程でテンプレートマッチングを行った結果,前記テンプレート画像と前記撮像画像との一致度があらかじめ設定した閾値に対して低いか否かを判断する第4の工程と,
前記第4の工程で一致度が低いと判断した場合に,位置補正を行い,マッチング直前の状態で前記テンプレート画像または前記撮像画像の2値画像に境界線処理を施す第5の工程と,
前記第5の工程による境界線処理後の画像の重心を取得する第6の工程と,
前記第6の工程による境界線画像の重心位置からマッチング後の画像の重心位置の変移より膨張/収縮方向を検出する第7の工程と,
前記第7の工程で検出した膨張/収縮方向より認識対象画像か前記テンプレート画像の一方を膨張/収縮し,再度マッチングする第8の工程と,
を含むことを特徴とする工業文字認識方法。
In an industrial character recognition method that identifies products in a production line by recognizing industrial characters such as logos,
A first step of inputting a binarized industrial character as a template image;
A second step of capturing and binarizing industrial characters printed on the identification target product and inputting a captured image;
A third step of performing template matching on the captured image using the template image;
A fourth step of determining whether or not the degree of coincidence between the template image and the captured image is lower than a preset threshold value as a result of performing template matching in the third step;
A fifth step of performing position correction when it is determined that the degree of coincidence is low in the fourth step, and performing boundary line processing on the template image or the binary image of the captured image immediately before matching;
A sixth step of acquiring the center of gravity of the image after the boundary line processing in the fifth step;
A seventh step of detecting an expansion / contraction direction based on a change in the centroid position of the image after matching from the centroid position of the boundary line image in the sixth step;
An eighth step of expanding / contracting one of the recognition target image or the template image from the expansion / contraction direction detected in the seventh step, and matching again;
An industrial character recognition method comprising:
ロゴなどの工業文字を認識することによって生産ラインにおける製品識別を行う工業文字認識方法において,
2値化された工業文字をテンプレート画像として入力する第1の工程と,
識別対象製品に印字されている工業文字を撮像・2値化し撮像画像を入力する第2の工程と,
前記テンプレート画像を用いて前記撮像画像に対するテンプレートマッチングを実行する第3の工程と,
前記第3の工程でテンプレートマッチングを行った結果,前記テンプレート画像と前記撮像画像との一致度があらかじめ設定した閾値に対して低いか否かを判断する第4の工程と,
前記第4の工程で一致度が低いと判断した場合に,位置補正した後,マッチング直前の状態で前記テンプレート画像または前記撮像画像の2値画像に境界線処理を施す第5の工程と,
前記第5の工程による境界線処理後の画像の重心を取得する第6の工程と,
前記第6の工程による境界線画像の重心位置からマッチング後の画像の重心位置の変移より膨張/収縮方向を検出する第7の工程と,
各要素ごとに膨張/収縮方向を決定し,膨張/収縮を行った後,再度認識処理を実行する第8の工程と,
を含むことを特徴とする工業文字認識方法。
In an industrial character recognition method that identifies products in a production line by recognizing industrial characters such as logos,
A first step of inputting a binarized industrial character as a template image;
A second step of capturing and binarizing industrial characters printed on the identification target product and inputting a captured image;
A third step of performing template matching on the captured image using the template image;
A fourth step of determining whether or not the degree of coincidence between the template image and the captured image is lower than a preset threshold value as a result of performing template matching in the third step;
A fifth step of performing boundary line processing on the template image or the binary image of the captured image in a state immediately before matching after position correction when it is determined that the degree of coincidence is low in the fourth step;
A sixth step of acquiring the center of gravity of the image after the boundary line processing in the fifth step;
A seventh step of detecting an expansion / contraction direction based on a change in the centroid position of the image after matching from the centroid position of the boundary line image in the sixth step;
Determining the expansion / contraction direction for each element, performing the expansion / contraction, and then executing the recognition process again;
An industrial character recognition method comprising:
JP10186598A 1998-03-31 1998-03-31 Industrial character recognition method Expired - Fee Related JP3844594B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10186598A JP3844594B2 (en) 1998-03-31 1998-03-31 Industrial character recognition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10186598A JP3844594B2 (en) 1998-03-31 1998-03-31 Industrial character recognition method

Publications (2)

Publication Number Publication Date
JPH11282960A JPH11282960A (en) 1999-10-15
JP3844594B2 true JP3844594B2 (en) 2006-11-15

Family

ID=14311899

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10186598A Expired - Fee Related JP3844594B2 (en) 1998-03-31 1998-03-31 Industrial character recognition method

Country Status (1)

Country Link
JP (1) JP3844594B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102945368B (en) * 2012-10-17 2015-04-22 西安理工大学 Method for positioning and identifying laser character of beer bottle cap
JPWO2017141802A1 (en) 2016-02-15 2018-12-06 日本電気株式会社 Image processing apparatus, character recognition apparatus, image processing method, and program recording medium
JP7138503B2 (en) * 2018-07-26 2022-09-16 悦司 北川 Object detection system

Also Published As

Publication number Publication date
JPH11282960A (en) 1999-10-15

Similar Documents

Publication Publication Date Title
JP3124296B2 (en) How to detect the position and direction of the fiducial mark
US6339651B1 (en) Robust identification code recognition system
JP6286866B2 (en) Image processing apparatus and image processing method
US7949187B2 (en) Character string recognition method and device
CN112132163B (en) Method, system and computer readable storage medium for identifying object edges
JP2012523598A (en) Two-dimensional symbol code and method for reading the symbol code
EP2713314A2 (en) Image processing device and image processing method
JP4533836B2 (en) Fluctuating region detection apparatus and method
JP2011227636A (en) Character string recognition apparatus and character string recognition method
JP2010123090A (en) Method and device for recognizing character string
JP4574503B2 (en) Image processing apparatus, image processing method, and program
JP3844594B2 (en) Industrial character recognition method
CN107609450B (en) Bar code identification method
CN112699704B (en) Method, device, equipment and storage device for detecting bar code
JP5041775B2 (en) Character cutting method and character recognition device
JP5010627B2 (en) Character recognition device and character recognition method
WO2006080568A1 (en) Character reader, character reading method, and character reading control program used for the character reader
JPH11328311A (en) Method for extracting pattern in image, method for recognizing pattern in image, method for deciding image abnormality, and storage medium
JP2020024111A (en) Inspection device and inspection method
JP2020024110A (en) Inspection device and inspection method
JPH06139338A (en) Fingerprint pattern classifying device
JP3126491B2 (en) Pattern recognition method
JPH0520459A (en) Method and device for recognizing pattern
KR100817835B1 (en) Form editor document resistrating method using barcode
JP2805476B2 (en) Character recognition method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051027

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051101

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051222

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060425

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060612

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: 20060815

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060816

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090825

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100825

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100825

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110825

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110825

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120825

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees