JP2004213455A - Two-dimensional code reader - Google Patents
Two-dimensional code reader Download PDFInfo
- Publication number
- JP2004213455A JP2004213455A JP2003001013A JP2003001013A JP2004213455A JP 2004213455 A JP2004213455 A JP 2004213455A JP 2003001013 A JP2003001013 A JP 2003001013A JP 2003001013 A JP2003001013 A JP 2003001013A JP 2004213455 A JP2004213455 A JP 2004213455A
- Authority
- JP
- Japan
- Prior art keywords
- dimensional code
- data
- specified
- output
- specifying
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、物流ラベル、納品ラベル等に好適に用いられる2次元コードの読取装置に係り、特に、2次元コードに表される情報と共に、2次元コードの姿勢に基づく情報を併せて出力するようにした2次元コード読取装置に関するものである。
【0002】
【従来の技術】
2次元コードには、スタック式コードとマトリクス式コードとがあり、昨今では、従前のバーコードに代わる新たな情報伝達媒介手段としてその普及が広まりつつある。例えば、『PDF414』、『QRコード』、『CODE16k』、『CODE49』、『マキシコード』、『データマトリクス』、『コードワゴン』等と称される2次元コードが既に規格化され一般公開されている。
【0003】
このような2次元コードの普及に伴い、2次元コード読取装置の改良も進み、近年では、2次元コードの撮像時の姿勢に起因する読取エラー等の回避(自動補正)を可能とした2次元コード読取装置が実用化され始めている。具体的には、例えば、2次元コードが表裏反転状態や水平面内において回転した状態にあっても読取(デコード)可能な2次元コード読取装置等が知られている(例えば特許文献1参照)。
【0004】
ここで、『表裏反転』が生ずる物品搬送例を図8に示す。同図において、符号aはイメージセンサ内蔵のカメラを、符号bは物品搬送手段としてのコンベアを、符号cは搬送対象となる物品(この例では液晶用ガラス基板)を、符号dはガラス基板cに貼付された2次元コード(印刷、刻印等によるものも含む、以下同様)をそれぞれ示している。
【0005】
図8に示される例では、ガラス基板c1(同図中左側)は、2次元コードが貼付された面(表面)を上に向けた状態(この例では本来あるべき状態とされる)でコンベアb上に載置され、ガラス基板c2(同図中右側)は、表面に2次元コードが貼付されているが、裏面を上に向けた状態でコンベアb上に載置されている。このような場合、それぞれのガラス基板c1,c2に貼付された2次元コードd1,d2をカメラaで撮像すると、図9(a)、(b)に示されるように、互いに表裏が反転した正像(図9(a))並びに鏡像(図9(b))が得られる。尚、このような事態は、例えば作業者がコンベアbにガラス基板cを誤って表裏を逆にして流してしまったような場合に発生する。
【0006】
『水平面内における回転』が生ずる物品搬送例を図10に示す。同図において、符号aはイメージセンサ内蔵のカメラを、符号bは物品搬送手段としてのコンベアを、符号cは搬送対象となる物品(この例では段ボール箱)を、符号dは段ボール箱cに貼付された2次元コードをそれぞれ示している。
【0007】
図10に示される例では、直方体状の段ボール箱c3(同図中左側)は正面(表)を図中手前に向けた状態(この例では本来あるべき状態とされる)でコンベアb上に載置され、段ボール箱c4(同図中右側)は正面を図中右側方に向けた状態でコンベアb上に載置されている。このような場合、それぞれの段ボール箱に貼付された2次元コードd3,d4をカメラaで撮像すると、図11(a)、(b)に示されるように、回転角度が0度の画像(本来得られるべき画像)(図11(a))と、反時計回りに見て角度が90度回転した画像(図11(b))が得られる。尚、このような事態は、同様に、例えば作業者がコンベアbに段ボール箱cの向きを誤った状態で流してしまったような場合に発生する。
【0008】
先述したように、2次元コードの撮像時の姿勢に起因する読取エラー等の回避(表裏反転の自動補正や回転角度(角度ずれ)の自動補正)を可能とした2次元コード読取装置にあっては、図8乃至図10に示したような表裏反転や角度ずれが生じている場合にも、2次元コードを的確に読取可能であり、このため、そのような場合にあっても、その都度エラー信号が生成されて生産ラインが停止等されることもなく、生産性の向上にも寄与することができる。
【0009】
より詳細には、表裏反転の自動補正や回転角度の自動補正が可能とされた2次元コード読取装置には、一般的には、『正像モード』、『鏡像モード』、『自動検出モード』の3種が用意されている。『正像モード』が選択された場合には、カメラで取得された画像データに対して通常通りデコード処理が実行され、2次元コード(シンボル)で表現される情報が取得される。一方、『鏡像モード』が選択された場合には、例えば読取走査方向を反転させることによりデコード処理が実行されて同情報が取得される。また、『自動検出モード』が選択された場合には、例えば、『正像モード』と同様のデコード処理を行うと共に『鏡像モード』と同様のデコード処理を行い、デコードが成功したいずれか一方の情報を選択することで、表裏反転有無に拘わらず正常な情報が取得される(表裏反転補正)。尚、何れのモードが選択された場合にあっても、デコード処理が正常に行われなかった場合には、所定の読取エラー信号が生成される。
【0010】
また、水平面内における回転に対しては、例えば、画像データから検出されるファインダパターン(一般的には、“L型ガイドセル”や“切り出しシンボル”)の所定座標上の位置情報を取得し、これと予め定められた基準位置情報との比較を通じて回転ずれの自動補正(角度補正)が行われる。
【0011】
理解を容易とするため、上記従来の2次元コード読取装置におけるデコード処理内容(制御プログラム)を図12のフローチャートに示す。尚、同フローチャートは、先述した『自動検出モード』における処理内容を示すものである。
【0012】
同フローチャートに示されるように、従来のこの種の2次元コード読取装置にあっては、所定のトリガ入力により読取が開始され(ステップ1201)、これにより、イメージセンサを内蔵するカメラ(図8,図10参照)が動作して所定エリアの画像が取得される(ステップ1202)。次いで、取得された画像に対して、エッジ抽出、直線抽出、ノイズ除去等の画像前処理が施され(ステップ1203)、これにより2次元コード部分を抽出した(切り出した)画像データが取得される。
【0013】
画像前処理(ステップ1203)が終了すると、先に取得された画像データに対して、先述したような表裏反転補正(ステップ1204)、角度補正(ステップ1205)が施される。これら自動補正を通じて、デコードが正常に行われると(ステップ1206OK)、読取データ(2次元コードに表される情報)が出力され(ステップ1207)、例えば所定モニタ上に読取データに対応する文字、図形、記号等が表示される。一方、デコードが失敗した場合には(ステップ1206NG)、読取エラー信号が出力され、例えば生産ライン(コンベア等)が自動停止される。
【0014】
【特許文献1】
特許第3169527号公報
【0015】
【発明が解決しようとする課題】
ところで、上述したように、2次元コードの撮像時の姿勢に起因する検出エラーの回避を可能とした2次元コード読取装置、より具体的には、上記した表裏反転の自動補正又は角度ずれの自動補正を可能とする2次元コード読取装置の場合には、以下に示す問題が生じることが発明者により知見されている。
【0016】
(1)例えば『自動検出モード』が選択された場合、2次元コードに表裏反転が生じていても正常に情報出力がなされ、作業者等がその旨に気づくことなく製品(物品)が生産ライン上を通過してしまうため、後段処理(例えばライン通過後の製品への加工処理)において不具合が生じる場合が多々あった。この問題は『角度補正』が自動で行われる場合によっても同様である。
【0017】
(2)例えば『正像モード』又は『鏡像モード』が選択された場合、読取エラー出力がなされても、それが、「表裏反転」によるものなのか、2次元コードの印字品質の劣化等によるものなのかを判別することができなかった。そのため、読取エラー出力が生成されるたびに生産ラインを停止させてエラー原因を探る等の手間を要していた。
【0018】
この発明は、上述の問題点に着目して成されたものであり、その目的とするところは、2次元コードの姿勢に適宜対応したデコードを可能とする一方で、2次元コードの姿勢に異常が生じたときには、その旨を適宜に作業者等に通知可能とした2次元コード読取装置を提供することにある。
【0019】
本発明の他の目的並びに効果については、実施の形態の記載等を参照することにより、当業者であれば容易に理解されるであろう。
【0020】
【課題を解決するための手段】
本発明の2次元コード読取装置は、撮像手段と、撮像手段を介して取得される画像に基づいて2次元コードの姿勢に適宜対応したデコード処理を行うデコード手段と、デコードの過程において、2次元コードの姿勢に相当する姿勢データを取得する姿勢データ取得手段と、前記デコード情報に基づく出力と前記姿勢データに基づく出力とを併せて生成する出力生成手段と、を有することを特徴とする。
【0021】
『撮像手段』とは、ラインセンサや2次元センサ等、2次元コードの各種の姿勢を認識するのに適当なセンサを内蔵したカメラ等を意味している。
【0022】
『2次元コードの姿勢』とは、表裏状態、水平面内における回転状態、垂直方向への傾斜状態、等々、様々な観点に基づく姿勢を意味している。もっとも、本発明は、「撮像手段を介して取得される画像に基づいて2次元コードの姿勢に適宜対応したデコード処理を可能とする2次元コード読取装置」を前提とするため、そのようなデコードを不可能にする極端な姿勢(例えば折れ曲がり等により2次元コードの大半が隠れてしまい、元より読取が不可能とされるような姿勢)は自ずと排除される。
【0023】
『デコード情報に基づく出力』としては、例えば、デコード情報を文字・図形・記号等により所定モニタ上に表すための画像データ出力が挙げられる。また、例えば、デコード情報に基づく外部機器制御信号の出力等を挙げることもできる。
【0024】
『姿勢データに基づく出力』としては、例えば、2次元コードの表・裏の別、水平面内における回転度合い(回転角度等)、垂直方向への傾斜状態(傾斜角度等)等を、文字・図形・記号により所定モニタ上に表すための画像信号や、各状態に基づき警告ランプの点灯等を行うためのランプ制御信号等、種々のものを挙げることができる。
【0025】
このような実施形態によれば、デコード情報に加えて、2次元コードの姿勢に基づく出力を得ることができるから、2次元コードの姿勢に適宜対応したデコードが行われる一方で、2次元コードの姿勢に所定の異常が認められたときには、その旨を適宜に作業者等に通知することが可能となる。
【0026】
好ましい実施の形態(以下、第1実施形態と言う)では、姿勢データは、2次元コードの表裏を特定する表裏判別データとされる。
【0027】
このような形態によれば、2次元コードの表・裏の別を文字・図形・記号により所定モニタ上に表したり、表・裏の別に基づいて所定の警告ランプの点灯等を行うといったことが可能となる。
【0028】
第1実施形態において、より好ましくは、2次元コードの基準面の指定を、表又は裏から2者択一的に受け付ける基準面指定受付手段が更に設けられ、出力生成手段は、前記指定された基準面と、前記表裏判別データで特定される読取面とが不一致のとき、所定のエラー出力を生成するようにされる。
【0029】
このような形態によれば、指定された基準面と、表裏判別データで特定される読取面とが不一致のときに限り、所定のエラー出力が生成されるから、例えば、『2次元コードが裏(又は表)を向いているときにのみ、生産ラインをストップさせて、2次元コードが貼付された製品の配置状態を変更したい』といったニーズにも対応させることができる。
【0030】
また、第1実施形態において、より好ましくは、所定のトリガタイミングに応答してそのとき撮像手段とデコード手段とを通じて得られるデコード結果に基づき、2次元コードの基準面を、表又は裏から2者択一的に特定する基準面特定手段が更に設けられ、出力生成手段は、前記特定された基準面と、表裏判別データで特定される読取面とが不一致のとき、所定のエラー出力を生成するようにされる。
【0031】
このような形態によれば、例えば、デコード対象となる2次元コード(モデルコード)を、表裏について所望な状態(基本位置として理想とする状態)で所定エリア(撮像範囲内)に配置し、トリガタイミングを発生させることで、基準面を自動的に特定することができる。すなわち、所謂、基準面のティーチングが可能となる。
【0032】
また、他の好ましい実施の形態(以下、第2実施形態と言う)では、姿勢データは、2次元コードの水平面内における回転度合いを特定する回転度合い判別データとされる。
【0033】
このような形態によれば、2次元コードの回転度合いを数値等により所定モニタ上に表したり、回転度合いに基づいて所定の警告ランプの点灯等を行うといったことが可能となる。尚、『回転度合い』とあるように、ここで言う「回転度合い判別データ」は、数値(角度)で表されるもののみに限定されない。例えば、360度(一回転分)を幾つかの区分に分け、どの区分に2次元コードの回転状態が属しているかを示す情報等であってもよい。
【0034】
第2実施形態において、より好ましくは、回転度合いの許容範囲の指定を受け付ける許容範囲受付手段が更に設けられ、出力生成手段は、回転度合い判別データで特定される回転度合いが前記指定された許容範囲を超えたとき、所定のエラー出力を生成するようにされる。尚、ここで言う『所定のエラー出力』とは、回転度合いが許容範囲を超えている旨を単に通知するためだけのものに限定されず、例えば、許容範囲からの超過度合いを数値表示するための出力が含まれるようにしてもよい。
【0035】
このような形態によれば、回転度合い判別データで特定される回転度合いが指定された許容範囲を超えたときに限り、所定のエラー出力が生成されるから、例えば、『2次元コードが所望の範囲を超えて回転しているときにのみ、生産ラインをストップさせて、2次元コードが貼付された製品の配置状態を変更したい』といったニーズにも対応することができる。
【0036】
また、第2実施形態において、より好ましくは、所定のトリガタイミングに応答してそのとき撮像手段を通じて得られる2次元コードのファインダパターンの位置情報に基づいて回転度合いの許容範囲を特定する許容範囲特定手段が更に設けられ、出力生成手段は、回転度合い判別データで特定される回転度合いが前記特定された許容範囲を超えたとき、所定のエラー出力を生成するようにされる。
【0037】
このような形態によれば、例えば、デコード対象となる2次元コード(モデルコード)を、所定エリア(撮像範囲内)に所望な状態(基本位置として理想とする状態)で配置し、トリガタイミングを発生させることで、回転許容範囲を自動的に特定することができる。すなわち、所謂、回転許容範囲のティーチングが可能となる。
【0038】
尚、上述した第1実施形態と第2実施形態とは、1つの2次元コード読取装置により同時に実現することもできる。すなわち、本発明の第3実施形態では、姿勢データには、2次元コードの表裏を特定する表裏判別データと、2次元コードの水平面内における回転度合いを特定する回転度合い判別データとの双方が含まれる。
【0039】
したがって、第3実施形態においては、以下に示す好ましい実施の形態が存在する。
【0040】
好ましい実施の一形態では、2次元コードの基準面の指定を、表又は裏から2者択一的に受け付ける基準面指定受付手段が更に設けられ、出力生成手段は、前記指定された基準面と、前記表裏判別データで特定される読取面とが不一致のとき、所定のエラー出力を生成するようにされる。
【0041】
好ましい実施の一形態では、所定のトリガタイミングに応答してそのとき撮像手段とデコード手段とを通じて得られるデコード結果に基づき、2次元コードの基準面を、表又は裏から2者択一的に特定する基準面特定手段が更に設けられ、出力生成手段は、前記特定された基準面と、表裏判別データで特定される読取面とが不一致のとき、所定のエラー出力を生成するようにされる。
【0042】
また、他の好ましい実施の一形態では、回転度合いの許容範囲の指定を受け付ける許容範囲受付手段が更に設けられ、出力生成手段は、回転度合い判別データで特定される回転度合いが前記指定された許容範囲を超えたとき、所定のエラー出力を生成するようにされる。
【0043】
また、他の好ましい実施の一形態では、所定のトリガタイミングに応答してそのとき撮像手段を通じて得られる2次元コードのファインダパターンの位置情報に基づいて回転度合いの許容範囲を特定する許容範囲特定手段が更に設けられ、出力生成手段は、回転度合い判別データで特定される回転度合いが前記特定された許容範囲を超えたとき、所定のエラー出力を生成するようにされる。
【0044】
次に、先述した課題は、本発明の2次元コード読取装置における情報処理方法によっても解決することができる。
【0045】
本発明の2次元コード読取装置における情報処理方法は、撮像手段と、撮像手段を介して取得される画像に基づいて2次元コードの姿勢に適宜対応したデコード処理を行うデコード手段と、前記デコードの過程において、2次元コードの姿勢に相当する姿勢データを取得する姿勢データ取得手段と、を具備する2次元コード読取装置における情報処理方法であって、デコードの過程において、2次元コードの姿勢データを生成するデータ生成ステップと、デコード情報に基づく出力と前記表裏判別データに基づく出力とを併せて生成する出力生成ステップと、を具備する。
【0046】
尚、本発明の2次元コード読取装置における情報処理方法においても、各種の好ましい実施の形態が存在する。すなわち、先述したように、姿勢データは、2次元コードの表裏を特定する表裏判別データ、及び/又は、2次元コードの水平面内における回転度合いを特定する回転度合い判別データとすることができる。
【0047】
本発明の2次元コード読取装置における情報処理方法についての更に好ましい実施の形態については、先述した本発明の2次元コード読取装置に係る記載により自明であるため、詳細説明は省略する。
【0048】
【発明の実施の形態】
以下に、この発明の好適な実施の一形態を添付図面を参照しながら詳細に説明する。尚、以下の実施形態は本発明の一例を示すものに過ぎず、本発明の及ぶ範囲は、明細書の特許請求の範囲の記載によってのみ規定されることは言うまでもない。
【0049】
本発明の一実施形態である2次元コード読取装置のハードウェア構成が図1に示されている。
【0050】
同図に示されるように、この2次元コード読取装置100は、本体部(コントローラ)1に、カメラ2、コンソール3、モニタ4並びに上位システム5とを接続してなるものである。
【0051】
カメラ2には、CCD等のイメージセンサが内蔵されており、コントローラ1の制御に基づいて、生産ライン上を流れてくるワーク(この例では液晶用ガラス基板)に貼付された2次元コードを所定のタイミング(トリガタイミング)で撮像する。尚、トリガタイミングは、図示されない公知のトリガセンサがワークの到来を検出したときや、コンソール3において撮影開始指令操作が行われたとき、上位システム5から送られてきた撮影開始コマンドが解読されたときなどに発生する。
【0052】
コンソール3及びモニタ4は、本装置100のヒューマンマシンインタフェースとして機能するものであり、これらを用いて本装置100とオペレータとの対話が適切に行われる。
【0053】
上位システム5は、本装置100に対する上位システムを構成するものであり、例えば、PLC(プログラマブル・ロジック・コントローラ)やパソコン等が適用される。これにより、生産ライン全体の統括制御等が可能とされている。
【0054】
一方、コントローラ1には、CPU101と、メインメモリ102と、画像処理部103と、モデルメモリ104と、画像メモリ105と、入出力制御部106と、コンソールインタフェース107と、カメラインタフェース108と、モニタインタフェース109と、通信インターフェース110と、CPUバス111と、画像バス112とが含まれている。
【0055】
CPU101はマイクロプロセッサを主体として構成されており、メインメモリ102に格納されたシステムプログラムを実行することによって、コントローラ1全体の制御を司る。
【0056】
コントローラ1は、通信インタフェース110を介して上位システム5と接続される他、コンソールインタフェース107、カメラインタフェース108、モニタインタフェース109をそれぞれ介して、コンソール3、カメラ2、モニタ4のそれぞれと接続される。
【0057】
カメラ2の撮影動作により得られた画像は、カメラインターフェース108を介してコントローラ1に取り込まれ、最終的に画像メモリ105に格納される。また、モデルメモリ104には、後述する表裏反転補正や角度補正のための各種のモデル情報(基準位置情報、表裏指定情報、角度範囲指定情報等)が格納される。
【0058】
画像メモリ105に格納された画像データは、適宜読み出されて、画像処理部103へ与えられ、モデルメモリ104に格納されたモデル情報に基づく表裏反転補正や角度補正を含む各種の画像処理が行われた後、所定の規則に従ってデコードが試みられる。詳細は適宜説明する。
【0059】
また、オペレータの所定操作によりコンソール3で発生される各種の指令は、コンソールインタフェース107を介してコントローラ1内に取り込まれる。コントローラ1からオペレータに対する各種の指示は、モニタインタフェース109を介してモニタ4へと与えられ、モニタ4の画面上には該当する情報に相当する文字、図形、記号等が表示される。
【0060】
尚、内部における高速の画像データ転送は画像バス112を介して行われ、CPUが取り扱う各種のデータはCPUバス111を介して該当する回路要素に与えられる。
【0061】
本装置100の要部となる2次元コードの読取処理の内容(制御プログラムの構成)が図2のフローチャートにより示されている。
【0062】
この2次元コード読取処理は、トリガ入力の到来により開始される。読取命令が解読(トリガ入力)されると(ステップ201)、まずカメラ2を動作させてコンベア上の所定エリアの撮像が行われ、これにより画像が取得され、一旦、画像メモリ105に格納される(ステップ202)。
【0063】
続いて、取得された画像(画像メモリ105に格納された画像)に対し画像前処理が施される(ステップ203)。この前処理は、取得された画像に対して、エッジ抽出、直線抽出、ノイズ除去等を行うことにより、取得された画像から、2次元コード部分の画像データを抽出する(切り出す)ための処理である。
【0064】
次いで、公知の手法により、ステップ203により得られた画像データについての表裏反転補正が行われるのであるが、本実施の形態では、このとき、表裏反転情報が所定メモリ領域に格納される。この処理は、詳細には、先ず、取得された画像データが正像に基づくものと仮定して公知の手法によりデコードを試みる。このデコードが成功すれば、正像と判定され、この場合、正像である旨(“表裏情報=表”)を示すフラグ“0”がメインメモリ102の所定領域に格納される。一方、このデコードが失敗すれば、次いで得られた画像データが鏡像に基づくものと仮定して公知の手法によりデコードを試みる。このデコードが成功すれば、鏡像と判定され、この場合、鏡像である旨(表裏情報=裏)を示すフラグ“1”がメインメモリ102の所定領域に格納される。
【0065】
メインメモリ102のメモリ領域の内容が図3に示されている。同図に示されるように、メインメモリ102には、演算用領域R1、各種演算用フラグ領域R2の他、表裏情報登録領域Rnが用意されている。上記した表裏情報を示すフラグは、この表裏情報登録領域Rnに格納される。尚、同図中、符号Rn+1で示される角度情報登録領域は、以下に示す角度情報のための記憶領域である。
【0066】
図2のフローチャートに戻り、表裏反転補正並びに表裏反転情報の登録が終了すると、次いで、公知の手法により、表裏反転補正後の画像データについての角度補正が行われる(ステップ205)。本実施形態では、このとき、先に図3で示した角度情報登録領域Rn+1に角度情報が格納される。この処理は、詳細には、対象となる画像データからファインダパターンを検出し、このファインダパターンの所定座標上の位置情報を取得する。これと、モデルメモリ104に予め格納された基準位置情報とを比較(ずれを検出)することにより、角度ずれを算出し、算出された角度が角度情報として角度情報登録領域Rn+1に格納される。
【0067】
上述の表裏反転補正並びに角度補正を通じて、デコードが正常に行われると(ステップ206OK)、次いで、メインメモリ102に記憶された表裏反転情報並びに角度情報に基づくエラー出力生成処理が行われる(ステップ207乃至210)。
【0068】
尚、デコードが失敗した場合には(ステップ206NG)、所定の読取エラー出力が生成され(ステップ212)、この例では、モニタ4に、読取エラー発生の旨を示す表示が成される。このことからも明らかなように、本実施の形態では、読取エラーは、2次元コードの表裏反転、角度ずれ以外の理由、すなわち、例えば2次元コードの印字品質が悪い等の理由により生成されるものであり、従前の2次元コード読取装置とは異なり、表裏反転、角度ずれにより生じる読み取りエラーとは区別されている。
【0069】
表裏反転情報並びに角度情報に基づくエラー出力生成処理(ステップ207乃至210)では、まず、モデルメモリ104に登録された表裏指定情報(詳細は後述する)と、ステップ204で登録された表裏反転情報とが一致するか否かを判別する(ステップ207)。
【0070】
ここでは、モデルメモリ104に格納された表裏指定情報を示すフラグ(詳細は後述する)と、メインメモリ102で格納された表裏情報登録領域Rnのフラグとが不一致であると(ユーザによる表裏指定と実際の表裏とが不一致であると)(ステップ207不一致)、所定の表裏反転エラー出力が生成され、この例では、モニタ4上に表裏反転エラーを示す所定の表示(図7(b)参照)が成される。
【0071】
一方、ステップ207において、表裏指定情報を示すフラグと、メインメモリ102(表裏情報登録領域Rn)に格納されたフラグとが一致した場合には(ユーザによる表裏指定と実際の表裏とが一致すると)(ステップ207一致)、表裏反転エラー出力は生成されず、次いで、ステップ205で算出(登録)された角度(角度ずれ)が、モデルメモリ104に格納された角度範囲指定情報(詳細は後述する)の範囲内にあるか否かが判別される(ステップ209)。
【0072】
ここでは、ステップ205で算出された角度が、指定された角度範囲内にないときには(ステップ209範囲外)、所定の角度エラー出力が生成され、この例では、モニタ4上に角度エラーを示す所定の表示(図7(c)参照)が成される。一方、ステップ205で算出された角度(角度ずれ)が、指定された角度範囲内にあるときには(ステップ209範囲内)、角度エラーは生成されない。
【0073】
これら表裏反転情報並びに角度情報に基づくエラー出力生成処理(ステップ207乃至210)が終了すると、デコードにより取得された読取データ(2次元コードに表される情報)が文字、図形、記号等によりモニタ4に表示され(ステップ211)、これにより2次元コードの読み取り処理は一旦終了する。
【0074】
次に、表裏指定情報並びに角度範囲指定情報の詳細について説明する。
【0075】
オペレータ操作を介して行われる表裏指定情報並びに角度範囲指定情報の登録処理の内容が図4のフローチャートにより示されている。同図に示される内容は、先述した「表裏指定情報」並びに「角度範囲指定情報」の登録を、ユーザ(オペレータ)が、コンソール3(並びにモニタ4)を通じて行う際の処理内容を示すものである。尚、フローチャートの左側のボックス(ステップ411乃至414)は、CPU101を通じてコントローラ1側で実行される内部処理を、同フローチャートの右側のボックス(ステップ401乃至404)は、ユーザ側の操作手順をそれぞれ示している。
【0076】
同フローチャートに示されるように、表裏指定情報並びに角度範囲指定情報の登録処理では、先ず、ユーザの側で、コンソール3を使用して表裏反転判別機能の有効化命令が行われる(ステップ401)。すなわち、先の図2のフローチャートの説明では省略したが、本実施形態では、先のステップ207、208で示される処理は、この「表裏反転判別機能」が“有効化”されていることを条件として行われるようにされている。この表裏反転判別機能の有効化命令がなされると、コントローラ1の側では、表裏反転判別機能有効を示すフラグ“1”が所定のメモリ領域(この例ではモデルメモリ104)に書き込まれる(ステップ411)。
【0077】
次いで、ユーザが、コンソール3を使用して表裏指定情報(正像又は鏡像)の入力を行うと(ステップ402)、コントローラ1の側では、表裏指定情報がモデルメモリ104に登録される(ステップ412)。
【0078】
尚、先にも触れたが、この表裏指定情報の登録処理(ステップ412)では、ユーザ側での入力が“正像”(表裏指定情報=“表”)のとき、モデルメモリ104の所定メモリ領域にフラグ“0”が書き込まれ、ユーザ側での入力が“鏡像”(表裏指定情報=“裏”)のとき、モデルメモリ104の所定メモリ領域にフラグ“1”が書き込まれる。これらフラグは、先述したように、表裏反転情報に基づくエラー出力生成処理(ステップ207、208)で使用される。
【0079】
次いで、ユーザの側では、コンソール3を使用して角度判別機能の有効化命令が行われる(ステップ403)。すなわち、先の図2のフローチャートの説明では省略したが、本実施形態では、先のステップ209、210に示される処理は、この「角度判別機能」が“有効化”されていることを条件として行われるようにされている。この角度判別機能の有効化命令がなされると、コントローラ1の側では、角度判別機能有効化を示すフラグ“1”が所定のメモリ領域(この例ではモデルメモリ104)に書き込まれる(ステップ413)。
【0080】
次いで、ユーザが、コンソール3を使用して角度範囲指定情報の入力を行うと(ステップ404)、コントローラ1の側で角度範囲指定情報がメインメモリ102に登録される(ステップ414)。尚、この角度範囲指定情報は、先述したように、角度情報に基づくエラー出力生成処理(ステップ209、210)で使用される。
【0081】
上述の表裏指定情報並びに角度範囲指定情報の登録処理の際、モニタ4に表示される操作案内画面の一例が図5に示されている。同図(a)は表裏反転機能設定用の案内画面を、同図(b)は角度判別機能設定用の案内画面をそれぞれ示している。
【0082】
図4のフローチャート中、ステップ401、402で示したユーザ側の処理は、図5(a)に示される表裏反転機能設定画面を通じて行われる。同図(a)に示されるように、表裏反転機能設定画面には、表裏反転判別機能の有効化、無効化命令をコントローラ1側に与えるためのON・OFF選択用ボタン503,504(何れか一方のみ選択可)と、表裏指定情報の入力のための正像・鏡像選択ボタン505,506(何れか一方のみ選択可)と、これら選択を実行する(コントローラ1の側に登録させる)ための登録ボタン501と、設定を中断するための取消ボタン502とが表示される。これらボタンは、例えばカーソル等で適宜選択(押下)可能とされている。
【0083】
図4のフローチャート中、ステップ403、404で示したユーザ側の処理は、図5(b)に示される角度判別機能設定画面を通じて行われる。同図(b)に示されるように、角度判別機能設定画面には、角度判別機能の有効化、無効化命令をコントローラ1側に与えるためのON・OFF選択用ボタン510,511(何れか一方のみ選択可)と、角度範囲指定情報の入力のための角度範囲選択ボタン512乃至515並びに角度範囲詳細設定値入力欄516(±0〜90の範囲で数値入力可)と、これら選択乃至設定を実行する(コントローラ1の側に登録させる)ための登録ボタン508と、設定を中断するための取消ボタン509とが表示される。
【0084】
同図5(b)からも分かるように、本実施形態では、角度範囲指定情報のオペレータ操作による入力は、先ず、角度範囲選択ボタン512乃至515を介して、0°,90°,180°,270°の4つの中から何れか1つを選択し、これに、角度範囲詳細設定値入力欄516に入力された数値を加算した数値(角度)が、角度範囲指定情報として登録される。
【0085】
尚、この角度範囲指定情報により規定される回転許容範囲は、先述した基準位置情報で規定される位置から左右両方向への回転にそれぞれ対応する許容範囲とされる。
【0086】
次に、表裏指定情報並びに角度範囲指定情報の登録処理を、ティーチングにより行う場合のコントローラ1における処理内容が図6のフローチャートにより示されている。同図に示される内容は、上述した「表裏指定情報」並びに「角度範囲指定情報」の登録を、任意の2次元コードを撮像することにより自動的に行う(ティーチングにより行う)際の処理内容を示したものである。
【0087】
この例では、先ず、デコード対象となる2次元コード(モデルコード)を、生産ライン(コンベア等)上の所定の位置(カメラ2の撮像範囲内)に、表裏・角度について所望な状態(基本位置として理想とする状態)で配置し、カメラ2を動作させて画像を取得する(ステップ601)。次いで、先に説明した画像前処理を行い、それにより取得される画像から、2次元コード部分の画像データを抽出する(ステップ602)。
【0088】
続くステップ603では、ステップ602で取得された画像データから表裏反転指定情報が取得される。この処理は、詳細には、先ず、取得された画像データが正像に基づくものと仮定して公知の手法によりデコードを試みる。このデコードが成功すれば、正像と判定され、この場合、指定が正像である旨(“表裏指定情報=表”)を示すフラグ“0”がメインメモリ102に一時的に格納される。
【0089】
一方、このデコードが失敗すれば、次いで得られた画像データが鏡像に基づくものと仮定して公知の手法によりデコードを試みる。このデコードが成功すれば、鏡像と判定され、この場合、指定が鏡像である旨(表裏指定情報=裏)を示すフラグ“1”がメインメモリ102に一時的に格納される(ステップ603)。
【0090】
続くステップ604では、画像データから角度範囲指定情報が取得される。この処理は、詳細には、対象となる画像データからファインダパターンを検出し、このファインダパターンの所定座標上の位置情報を取得する。これと、モデルメモリ104に予め格納された基準位置情報とを比較(ずれを検出)することにより、角度差が算出され、角度範囲指定情報としてメインメモリ102に一時的に格納される(ステップ604)。
【0091】
次いで、先のステップ603を通じて、デコードが正常に行われたときには(ステップ605OK)、メインメモリ102に一時的に格納された表裏指定情報並びに角度範囲指定情報が、モデルメモリ104の所定領域にそれぞれ格納され(ステップ606)、ティーチング処理は一旦終了される。
【0092】
一方、デコードが失敗した場合には(ステップ605NG)、所定のティーチングエラー出力が生成され(ステップ607)、この例では、モニタ4に、ティーチング読取エラー発生の旨を示す表示がなされる。
【0093】
最後に、表裏反転エラー出力生成時(ステップ208参照)、並びに角度エラー生成時(ステップ210参照)に、モニタ4に表示されるエラー表示の一例を図7に示す。
【0094】
同図(a)は、図6で示したティーチング処理を通じて取得されるモデルコードの画像データの一例を示すものである。同図(a)左側に示されるように、この例では、ティーチング処理により取得された画像データ901から、“表裏指定情報=表(正像)”、“角度範囲指定情報=10度”が取得されているものとする。尚、同図(a)の右側に示される画像データ902は、画像データ901に対応する鏡像の一例を参照までに示すものである
【0095】
同図(b)は、表裏反転エラー出力生成時にモニタ4に表示される表裏反転エラー表示の一例を示すものである。同図(a)との比較から明らかなように、同図(b)に示す例では、デコード処理(ステップ204参照)の結果、表裏情報=“裏”が取得されたため、表裏反転エラー表示として、そのとき取得された画像データ903と、表裏反転エラーが生成された旨を示す表示『Inv Err』(符号904)がモニタ4に示される。
【0096】
同図(c)は、角度エラー出力生成時にモニタ4に表示される角度エラー表示の一例を示すものである。同図(a)との比較から明らかなように、同図(b)に示す例では、デコード処理(ステップ205参照)の結果、“角度情報=−90度(基準位置から見て時計回りに90度回転している状態)”が取得されている。
【0097】
尚、この例で算出される角度情報は、鏡像データ902との比較に基づくものである。すなわち、2次元コードの読取の結果、取得された表裏情報が、表裏指定情報と異なるときには、取得された画像(ここでは正像画像データ901)の反転画像(ここでは鏡像データ902)を基準として角度情報が算出される。そして、この例では、角度情報『−90度』は、角度範囲指定情報『基準位置から±10度』の範囲外であるため、角度エラー表示として、そのとき取得された画像データ905と、角度エラーが生成された旨を示す表示『Deg Err』(符号906)がモニタ4に示される。
【0098】
このように、本実施形態の2次元コード読取装置によれば、表裏反転や回転角度(角度ずれ)に適宜対応してデコードを可能とする一方で、エラー出力が生成されたときには、それが「表裏反転」や「角度ずれ」によるものなのか、それ以外の理由(2次元コードの印字品質の劣化等)によるものなのかを判別可能となる。そのため、従前のように、表裏反転や角度ずれのために読取エラー出力が生成されて、生産ラインが不要に停止されること等を解消することも可能であり、生産性の向上により一層寄与することができる。
【0099】
尚、上述した実施形態では、2次元コードの姿勢として、「表裏状態」や「水平面内における回転状態」のみを示したが、本発明に係る2次元コード読取装置は、上述した姿勢に対応したものに限定されず、例えば「垂直方向への傾き」等、様々な姿勢に対応したデコードを可能とするものにも適用可能である。
【0100】
また、上述した実施形態では、ティーチング処理(図6参照)における角度範囲指定情報(ステップ604参照)は、対象となる画像データから検出されるファインダパターンの所定座標上の位置情報と、モデルメモリ104に格納された基準位置情報との差を、角度範囲指定情報としてそのまま使用したが、ティーチング処理により得られる角度範囲指定情報は、図5(b)に示したような設定画面を通じて、更に変更(調整)を行えるようにすることも可能である。
【0101】
また、上述の実施形態では、2次元コードとして、マトリクス式のものを示したが、本発明の2次元コード読取装置は、スタック式の2次元コードにも対応可能である。
【0102】
【発明の効果】
以上の説明で明らかなように、この発明によれば、2次元コードの姿勢に適宜対応したデコードを可能とする一方で、2次元コードの姿勢に異常が生じたときには、その旨を適宜に作業者等に通知可能とした2次元コード読取装置が提供される。
【図面の簡単な説明】
【図1】本発明装置のハードウェア構成を示すブロック図である。
【図2】本発明装置の制御プログラムの構成を示すフローチャートである。
【図3】メインメモリにおけるメモリ領域の内容を示す図である。
【図4】オペレータ操作を介して行われる表裏指定情報並びに角度範囲指定情報の登録処理の内容を示すフローチャートである。
【図5】モニタ上の表示される機能設定案内画面の一例を示す図である。
【図6】ティーチングによる表裏指定情報並びに角度範囲指定情報の登録処理の内容を示すフローチャートである。
【図7】モニタ上に表示されるエラー表示画面の一例を示す図である。
【図8】2次元コードに表裏反転が生ずる物品搬送例を説明するための図である。
【図9】2次元コードの表裏反転例を示す図である。
【図10】2次元コードに角度回転が生ずる物品搬送例を説明するための図である。
【図11】2次元コードの角度回転例を示す図である。
【図12】従来装置の制御プログラムの構成を示すフローチャートである。
【符号の説明】
1 コントローラ
2 カメラ
3 コンソール
4 モニタ
5 上位システム
100 2次元コード読取装置
101 CPU
102 メインメモリ
103 画像処理部
104 モデルメモリ
105 画像メモリ
106 入出力制御部
107 コンソールインタフェース
108 カメラインタフェース
109 モニタインタフェース
110 通信インターフェース
111 CPUバス
112 画像バス
a カメラ
b コンベア
c ワーク
d 2次元コード[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a two-dimensional code reader suitably used for a distribution label, a delivery label, and the like, and in particular, outputs information based on the posture of the two-dimensional code together with information represented in the two-dimensional code. And a two-dimensional code reader.
[0002]
[Prior art]
Two-dimensional codes include a stack-type code and a matrix-type code. In recent years, the two-dimensional code has been widely used as a new information transmission medium instead of a conventional bar code. For example, two-dimensional codes called “PDF414”, “QR code”, “CODE16k”, “CODE49”, “Maxicode”, “data matrix”, “code wagon” and the like have already been standardized and made publicly available. I have.
[0003]
With the spread of such two-dimensional codes, improvements in two-dimensional code readers have been advanced, and in recent years, two-dimensional code readers have been able to avoid (automatically correct) reading errors and the like caused by postures at the time of imaging of two-dimensional codes. Code readers have begun to be put into practical use. Specifically, for example, there is known a two-dimensional code reader that can read (decode) a two-dimensional code even when the two-dimensional code is in a reversed state or rotated in a horizontal plane (for example, see Patent Document 1).
[0004]
Here, FIG. 8 shows an example of an article conveyance in which “upside down” occurs. In the figure, reference numeral a denotes a camera with a built-in image sensor, reference numeral b denotes a conveyor as an article conveying means, reference numeral c denotes an article to be conveyed (a glass substrate for liquid crystal in this example), and reference numeral d denotes a glass substrate c. 2D codes (including those by printing, engraving, etc., the same applies hereinafter), respectively.
[0005]
In the example shown in FIG. 8, the glass substrate c 1 (Left in the figure) is placed on the conveyor b with the surface (front surface) to which the two-dimensional code is attached facing upward (in this example, it should be in the original state), and the glass substrate c 2 The right side in the figure has a two-dimensional code affixed to the front surface, but is placed on the conveyor b with the back surface facing upward. In such a case, each glass substrate c 1 , C 2 Two-dimensional code d attached to 1 , D 2 9A and 9B, a normal image (FIG. 9 (a)) and a mirror image (FIG. 9 (b)) are obtained, as shown in FIGS. 9 (a) and 9 (b). Such a situation occurs, for example, when an operator mistakenly flows the glass substrate c upside down on the conveyor b.
[0006]
FIG. 10 shows an example of article conveyance in which “rotation in a horizontal plane” occurs. In the figure, reference numeral a denotes a camera with a built-in image sensor, reference numeral b denotes a conveyor as an article transporting unit, reference numeral c denotes an article to be transported (in this example, a cardboard box), and reference numeral d denotes a cardboard box c. Respectively shown two-dimensional codes.
[0007]
In the example shown in FIG. 10, a rectangular parallelepiped cardboard box c 3 (Left side in the figure) is placed on the conveyor b with the front (front) facing toward the front in the figure (in this example, it should be in the original state), and the cardboard box c 4 (Right side in the figure) is placed on the conveyor b with the front side facing the right side in the figure. In such a case, the two-dimensional code d attached to each cardboard box 3 , D 4 When the image is captured by the camera a, as shown in FIGS. 11A and 11B, an image having a rotation angle of 0 ° (an image that should be obtained) (FIG. 11A) is viewed counterclockwise. Thus, an image whose angle is rotated by 90 degrees (FIG. 11B) is obtained. Such a situation similarly occurs, for example, when an operator has caused the cardboard box c to flow onto the conveyor b in an incorrect direction.
[0008]
As described above, in a two-dimensional code reading apparatus capable of avoiding a reading error or the like due to a posture at the time of imaging of a two-dimensional code (automatic correction of front / back inversion and automatic correction of a rotation angle (angle deviation)). Can read the two-dimensional code accurately even when the front and back are reversed or the angle is shifted as shown in FIGS. 8 to 10, and therefore, even in such a case, An error signal is not generated and the production line is not stopped, which contributes to an improvement in productivity.
[0009]
More specifically, two-dimensional code readers capable of automatic correction of front / back inversion and automatic correction of a rotation angle generally include “normal image mode”, “mirror image mode”, and “automatic detection mode”. Are prepared. When the “normal image mode” is selected, decoding processing is performed on image data acquired by the camera as usual, and information expressed by a two-dimensional code (symbol) is acquired. On the other hand, when the “mirror image mode” is selected, the decoding process is executed by, for example, reversing the reading scanning direction to acquire the same information. When the “automatic detection mode” is selected, for example, the same decoding processing as in the “normal image mode” and the same decoding processing as in the “mirror image mode” are performed. By selecting the information, normal information is obtained regardless of the presence or absence of the front / back inversion (front / back inversion correction). Regardless of which mode is selected, a predetermined reading error signal is generated if the decoding process is not performed normally.
[0010]
For rotation in a horizontal plane, for example, position information on predetermined coordinates of a finder pattern (generally, “L-shaped guide cell” or “cutout symbol”) detected from image data is acquired, Automatic correction (angle correction) of the rotational deviation is performed by comparing this with predetermined reference position information.
[0011]
FIG. 12 is a flowchart showing the details of a decoding process (control program) in the above-described conventional two-dimensional code reader for easy understanding. This flowchart shows the processing contents in the above-mentioned “automatic detection mode”.
[0012]
As shown in the flowchart, in this type of conventional two-dimensional code reader, reading is started by input of a predetermined trigger (step 1201), whereby the camera (FIG. 8, FIG. 10) operates to acquire an image of a predetermined area (step 1202). Next, the obtained image is subjected to image preprocessing such as edge extraction, straight line extraction, and noise removal (step 1203), thereby obtaining image data from which a two-dimensional code portion has been extracted (cut out). .
[0013]
When the image pre-processing (Step 1203) is completed, the previously acquired image data is subjected to the front / back reversal correction (Step 1204) and the angle correction (Step 1205) as described above. If decoding is normally performed through these automatic corrections (
[0014]
[Patent Document 1]
Japanese Patent No. 3169527
[0015]
[Problems to be solved by the invention]
By the way, as described above, a two-dimensional code reading device capable of avoiding a detection error caused by a posture at the time of imaging of a two-dimensional code, more specifically, an automatic correction of the above-mentioned front / back inversion or an automatic correction of an angle shift. It has been found by the inventor that the following problem occurs in the case of a two-dimensional code reader that enables correction.
[0016]
(1) For example, when the "automatic detection mode" is selected, information is normally output even if the two-dimensional code is inverted, and the product (article) is produced on the production line without the operator or the like noticing that fact. Since it passes above, there are many cases in which a problem occurs in the subsequent processing (for example, processing of a product after passing the line). This problem is the same even when "angle correction" is performed automatically.
[0017]
(2) For example, when the "normal image mode" or the "mirror image mode" is selected, even if a reading error is output, it may be due to "reverse inversion" or deterioration of the printing quality of the two-dimensional code. Could not be determined. Therefore, every time a read error output is generated, it is necessary to stop the production line and find the cause of the error.
[0018]
SUMMARY OF THE INVENTION The present invention has been made in view of the above-described problems, and an object of the present invention is to enable decoding appropriately corresponding to the posture of a two-dimensional code, while at the same time making the posture of the two-dimensional code abnormal. The present invention is to provide a two-dimensional code reading device which can notify a worker or the like appropriately when such a problem occurs.
[0019]
Other objects and effects of the present invention will be easily understood by those skilled in the art by referring to the description of the embodiments and the like.
[0020]
[Means for Solving the Problems]
The two-dimensional code reading device according to the present invention includes: an imaging unit; a decoding unit that performs a decoding process appropriately corresponding to a posture of the two-dimensional code based on an image acquired through the imaging unit; It is characterized by having attitude data obtaining means for obtaining attitude data corresponding to the attitude of the code, and output generating means for generating an output based on the decode information and an output based on the attitude data.
[0021]
The “imaging means” means a camera or the like having a built-in sensor suitable for recognizing various postures of a two-dimensional code, such as a line sensor or a two-dimensional sensor.
[0022]
The “posture of the two-dimensional code” means a posture based on various viewpoints such as a front / back state, a rotation state in a horizontal plane, a vertical inclination state, and the like. However, the present invention presupposes a “two-dimensional code reader that can perform a decoding process appropriately corresponding to the posture of a two-dimensional code based on an image obtained via an imaging unit”. An extreme posture (for example, a posture in which most of the two-dimensional code is hidden by a bend or the like and cannot be read from the beginning) that makes the reading impossible is naturally eliminated.
[0023]
The “output based on decode information” includes, for example, image data output for displaying the decode information on a predetermined monitor using characters, graphics, symbols, and the like. Further, for example, an output of an external device control signal based on the decode information can be mentioned.
[0024]
The “output based on the posture data” includes, for example, whether the two-dimensional code is a front side or a back side, the degree of rotation in a horizontal plane (rotation angle, etc.), the state of inclination in the vertical direction (inclination angle, etc.), and the like. Various examples can be given, such as an image signal for representing on a predetermined monitor by a symbol and a lamp control signal for lighting a warning lamp based on each state.
[0025]
According to such an embodiment, in addition to the decode information, an output based on the orientation of the two-dimensional code can be obtained. When a predetermined abnormality is recognized in the posture, it is possible to appropriately notify a worker or the like of the abnormality.
[0026]
In a preferred embodiment (hereinafter, referred to as a first embodiment), the posture data is front / back discrimination data that specifies front / back of a two-dimensional code.
[0027]
According to such an embodiment, the two-dimensional code can be displayed on a predetermined monitor using characters, graphics, or symbols, or a predetermined warning lamp can be lit based on the front or back. It becomes possible.
[0028]
In the first embodiment, more preferably, there is further provided a reference plane designation receiving means for alternately accepting the designation of the reference plane of the two-dimensional code from the front or back, and the output generating means further comprises: When the reference surface does not match the reading surface specified by the front / back discrimination data, a predetermined error output is generated.
[0029]
According to such an embodiment, a predetermined error output is generated only when the designated reference surface and the reading surface specified by the front / back discrimination data do not match. Only when it is facing (or table), it is desired to stop the production line and change the arrangement state of the product to which the two-dimensional code is attached. "
[0030]
Further, in the first embodiment, more preferably, in response to a predetermined trigger timing, the reference plane of the two-dimensional code is changed from the front or the back based on a decoding result obtained through the imaging means and the decoding means at that time. Further provided is a reference plane specifying means for alternatively specifying, and the output generating means generates a predetermined error output when the specified reference plane does not match the reading surface specified by the front / back discrimination data. Is to be.
[0031]
According to such an embodiment, for example, a two-dimensional code (model code) to be decoded is arranged in a predetermined area (within an imaging range) in a desired state (ideal as a basic position) on the front and back sides, and a trigger is generated. By generating the timing, the reference plane can be automatically specified. That is, teaching of a so-called reference surface becomes possible.
[0032]
In another preferred embodiment (hereinafter, referred to as a second embodiment), the posture data is rotation degree determination data that specifies the rotation degree of the two-dimensional code in the horizontal plane.
[0033]
According to such an embodiment, the degree of rotation of the two-dimensional code can be represented on a predetermined monitor by a numerical value or the like, or a predetermined warning lamp can be turned on based on the degree of rotation. It should be noted that the “rotation degree determination data” referred to here as “rotation degree” is not limited to data represented by numerical values (angles). For example, 360 degrees (one rotation) may be divided into several sections, and information indicating which section the rotation state of the two-dimensional code belongs to may be used.
[0034]
In the second embodiment, more preferably, there is further provided an allowable range accepting unit for accepting the designation of the allowable range of the rotation degree, and the output generation unit determines that the rotation degree specified by the rotation degree determination data is the specified allowable range. , A predetermined error output is generated. Note that the “predetermined error output” here is not limited to merely providing notification that the rotation degree is out of the allowable range, but is, for example, a numerical display of the excess degree from the allowable range. May be included.
[0035]
According to such an embodiment, a predetermined error output is generated only when the rotation degree specified by the rotation degree determination data exceeds the specified allowable range. We only want to stop the production line and change the arrangement state of the product to which the two-dimensional code is affixed only when rotating beyond the range. "
[0036]
Further, in the second embodiment, more preferably, in response to a predetermined trigger timing, an allowable range specification for specifying an allowable range of the degree of rotation based on position information of a finder pattern of a two-dimensional code obtained through an imaging unit at that time. Means are further provided, and the output generation means generates a predetermined error output when the rotation degree specified by the rotation degree determination data exceeds the specified allowable range.
[0037]
According to such an embodiment, for example, a two-dimensional code (model code) to be decoded is arranged in a predetermined area (within an imaging range) in a desired state (an ideal state as a basic position), and the trigger timing is set. By causing the rotation, the rotation allowable range can be automatically specified. That is, teaching in a so-called rotation allowable range becomes possible.
[0038]
The first embodiment and the second embodiment described above can be simultaneously realized by one two-dimensional code reader. That is, in the third embodiment of the present invention, the posture data includes both the front and back discrimination data for specifying the front and back of the two-dimensional code and the rotation degree discrimination data for specifying the rotation of the two-dimensional code in the horizontal plane. It is.
[0039]
Therefore, in the third embodiment, there are the following preferred embodiments.
[0040]
In a preferred embodiment, there is further provided a reference plane designation receiving means for alternately accepting the designation of the reference plane of the two-dimensional code from the front or the back, and the output generation means comprises: When the reading surface specified by the front / back discrimination data does not match, a predetermined error output is generated.
[0041]
In a preferred embodiment, the reference plane of the two-dimensional code is specified alternatively from the front or the back based on a decoding result obtained through the imaging means and the decoding means at that time in response to a predetermined trigger timing. And a reference plane specifying unit for generating a predetermined error output when the specified reference plane does not match the reading plane specified by the front / back discrimination data.
[0042]
Further, in another preferred embodiment, there is further provided an allowable range accepting unit that accepts a designation of an allowable range of the rotation degree, and the output generation unit determines that the rotation degree specified by the rotation degree determination data is the specified allowable range. When the range is exceeded, a predetermined error output is generated.
[0043]
In another preferred embodiment, a permissible range specifying unit that specifies a permissible range of the degree of rotation based on position information of a finder pattern of a two-dimensional code obtained through an imaging unit at that time in response to a predetermined trigger timing Is further provided, and the output generation means generates a predetermined error output when the rotation degree specified by the rotation degree determination data exceeds the specified allowable range.
[0044]
Next, the above-mentioned problem can also be solved by the information processing method in the two-dimensional code reader of the present invention.
[0045]
An information processing method in the two-dimensional code reading device according to the present invention includes: an imaging unit; a decoding unit that performs a decoding process appropriately corresponding to a posture of the two-dimensional code based on an image acquired via the imaging unit; And a posture data acquisition unit for acquiring posture data corresponding to the posture of the two-dimensional code in the process. A data generating step of generating, and an output generating step of generating an output based on the decoding information and an output based on the front / back discrimination data together.
[0046]
Note that there are various preferred embodiments in the information processing method in the two-dimensional code reader of the present invention. That is, as described above, the posture data can be front / back discrimination data that specifies the front and back of the two-dimensional code, and / or rotation degree discrimination data that specifies the rotation degree of the two-dimensional code in the horizontal plane.
[0047]
Since a further preferred embodiment of the information processing method in the two-dimensional code reader of the present invention is obvious from the above description of the two-dimensional code reader of the present invention, a detailed description will be omitted.
[0048]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, a preferred embodiment of the present invention will be described in detail with reference to the accompanying drawings. The following embodiment is merely an example of the present invention, and it goes without saying that the scope of the present invention is defined only by the description of the claims in the specification.
[0049]
FIG. 1 shows a hardware configuration of a two-dimensional code reader according to an embodiment of the present invention.
[0050]
As shown in FIG. 1, the two-
[0051]
The
[0052]
The
[0053]
The
[0054]
On the other hand, the
[0055]
The
[0056]
The
[0057]
The image obtained by the photographing operation of the
[0058]
The image data stored in the
[0059]
Various commands generated in the
[0060]
It should be noted that high-speed internal image data transfer is performed via the
[0061]
The content of the two-dimensional code reading process (the configuration of the control program), which is the main part of the
[0062]
This two-dimensional code reading process is started when a trigger input arrives. When the reading command is decoded (trigger input) (step 201), first, the
[0063]
Subsequently, image pre-processing is performed on the obtained image (the image stored in the image memory 105) (Step 203). This preprocessing is a process for extracting (cutting out) image data of a two-dimensional code portion from the obtained image by performing edge extraction, straight line extraction, noise removal, and the like on the obtained image. is there.
[0064]
Next, the front / back inversion correction is performed on the image data obtained in
[0065]
The contents of the memory area of the
[0066]
Returning to the flowchart of FIG. 2, when the front / back inversion correction and the registration of the front / back inversion information are completed, then, the angle correction is performed on the image data after the front / back inversion correction by a known method (step 205). In this embodiment, at this time, the angle information registration area R shown in FIG. n + 1 Stores angle information. In this process, in detail, a finder pattern is detected from target image data, and position information of the finder pattern on predetermined coordinates is obtained. By comparing this with reference position information stored in the
[0067]
If decoding is normally performed through the above-described front / back inversion correction and angle correction (OK in step 206), an error output generation process is performed based on the front / back inversion information and the angle information stored in the main memory 102 (
[0068]
If the decoding has failed (NG at step 206), a predetermined reading error output is generated (step 212). In this example, a display indicating that a reading error has occurred is made on the
[0069]
In the error output generation processing based on the front / back inversion information and the angle information (
[0070]
Here, a flag indicating the front and back designation information stored in the model memory 104 (details will be described later) and the front and back information registration area R stored in the main memory 102 n (If the front / back designation by the user does not match the actual front / back) (step 207 mismatch), a predetermined front / back inversion error output is generated. In this example, the front / back inversion is output on the
[0071]
On the other hand, in
[0072]
Here, when the angle calculated in
[0073]
When the error output generation processing (
[0074]
Next, details of the front and back designation information and the angle range designation information will be described.
[0075]
The contents of the registration processing of the front and back designation information and the angle range designation information performed through the operator's operation are shown in the flowchart of FIG. The contents shown in the figure show the processing contents when the user (operator) registers the above-mentioned “front and back specification information” and “angle range specification information” through the console 3 (and the monitor 4). . The boxes on the left side of the flowchart (
[0076]
As shown in the flowchart, in the registration process of the front / back designation information and the angle range designation information, first, the user issues a command to activate the front / back inversion discrimination function using the console 3 (step 401). That is, although omitted in the description of the flowchart of FIG. 2, in the present embodiment, the processing shown in the
[0077]
Next, when the user inputs front / back designation information (normal image or mirror image) using the console 3 (step 402), the
[0078]
As described above, in the registration process of the front / back designation information (step 412), when the input on the user side is “normal image” (front / back designation information = “front”), the predetermined memory of the
[0079]
Next, the user uses the
[0080]
Next, when the user inputs angle range designation information using the console 3 (step 404), the
[0081]
FIG. 5 shows an example of an operation guide screen displayed on the
[0082]
In the flowchart of FIG. 4, the processing on the user side shown in
[0083]
In the flowchart of FIG. 4, the processing on the user side shown in
[0084]
As can be seen from FIG. 5B, in the present embodiment, the input of the angle range designation information by the operator's operation is first performed through the angle
[0085]
The rotation allowable range defined by the angle range designation information is an allowable range corresponding to each of the left and right rotations from the position defined by the above-described reference position information.
[0086]
Next, the processing contents of the
[0087]
In this example, first, a two-dimensional code (model code) to be decoded is placed at a predetermined position (within the imaging range of the camera 2) on a production line (such as a conveyor) in a desired state (basic position, front / back / angle). The
[0088]
In the
[0089]
On the other hand, if this decoding fails, then decoding is attempted by a known method, assuming that the obtained image data is based on a mirror image. If the decoding is successful, it is determined that the image is a mirror image. In this case, a flag “1” indicating that the designation is a mirror image (front / back designation information = back) is temporarily stored in the main memory 102 (step 603).
[0090]
In the
[0091]
Next, when decoding is normally performed through the previous step 603 (OK in step 605), the front / back designation information and the angle range designation information temporarily stored in the
[0092]
On the other hand, if decoding has failed (step 605NG), a predetermined teaching error output is generated (step 607), and in this example, a display indicating that a teaching reading error has occurred is made on the
[0093]
Finally, FIG. 7 shows an example of an error display displayed on the
[0094]
FIG. 7A shows an example of image data of a model code obtained through the teaching processing shown in FIG. As shown on the left side of FIG. 9A, in this example, “front and back designation information = front (normal image)” and “angle range designation information = 10 degrees” are acquired from the
[0095]
FIG. 4B shows an example of a front / back inversion error display displayed on the
[0096]
FIG. 3C shows an example of an angle error display displayed on the
[0097]
Note that the angle information calculated in this example is based on comparison with the
[0098]
As described above, according to the two-dimensional code reading device of the present embodiment, decoding can be appropriately performed in response to front / back inversion and a rotation angle (angle shift). It is possible to determine whether the change is due to “front / back inversion” or “angle shift” or to a reason other than the above (such as deterioration of print quality of the two-dimensional code). For this reason, it is possible to eliminate a case where a reading error output is generated due to a front / back inversion or an angle shift as in the past and the production line is stopped unnecessarily, which further contributes to improvement in productivity. be able to.
[0099]
In the above-described embodiment, only the “front and back state” and the “rotation state in the horizontal plane” are shown as the posture of the two-dimensional code. However, the two-dimensional code reading device according to the present invention corresponds to the posture described above. The present invention is not limited to this, and is also applicable to those that can perform decoding corresponding to various postures such as “tilt in the vertical direction”.
[0100]
In the above-described embodiment, the angle range designation information (see step 604) in the teaching process (see FIG. 6) includes the position information on the predetermined coordinates of the finder pattern detected from the target image data and the
[0101]
Further, in the above-described embodiment, the matrix type is shown as the two-dimensional code. However, the two-dimensional code reading device of the present invention can also handle a stack type two-dimensional code.
[0102]
【The invention's effect】
As is apparent from the above description, according to the present invention, it is possible to perform decoding appropriately corresponding to the posture of a two-dimensional code. A two-dimensional code reading device capable of notifying a person or the like is provided.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a hardware configuration of a device of the present invention.
FIG. 2 is a flowchart showing a configuration of a control program of the device of the present invention.
FIG. 3 is a diagram showing contents of a memory area in a main memory.
FIG. 4 is a flowchart showing the contents of a registration process of front / back designation information and angle range designation information performed through an operator operation.
FIG. 5 is a diagram showing an example of a function setting guide screen displayed on a monitor.
FIG. 6 is a flowchart showing the contents of registration processing of front / back designation information and angle range designation information by teaching.
FIG. 7 is a diagram illustrating an example of an error display screen displayed on a monitor.
FIG. 8 is a diagram for explaining an example of article conveyance in which a two-dimensional code is turned over.
FIG. 9 is a diagram illustrating an example of a two-dimensional code being turned over.
FIG. 10 is a diagram for explaining an example of article conveyance in which an angular rotation occurs in a two-dimensional code.
FIG. 11 is a diagram illustrating an example of angle rotation of a two-dimensional code.
FIG. 12 is a flowchart showing a configuration of a control program of a conventional device.
[Explanation of symbols]
1 Controller
2 Camera
3 console
4 Monitor
5 Host system
100 two-dimensional code reader
101 CPU
102 Main memory
103 Image processing unit
104 model memory
105 Image memory
106 I / O controller
107 Console interface
108 Camera Interface
109 Monitor interface
110 Communication interface
111 CPU bus
112 Image Bus
a camera
b conveyor
c work
d 2D code
Claims (12)
撮像手段を介して取得される画像に基づいて2次元コードの姿勢に適宜対応したデコード処理を行うデコード手段と、
前記デコードの過程において、2次元コードの姿勢に相当する姿勢データを取得する姿勢データ取得手段と、
前記デコード情報に基づく出力と、前記姿勢データに基づく出力とを、併せて生成する出力生成手段と、
を有することを特徴とする2次元コード読取装置。Imaging means;
Decoding means for performing a decoding process appropriately corresponding to the attitude of the two-dimensional code based on an image obtained via the imaging means;
Posture data acquiring means for acquiring posture data corresponding to the posture of the two-dimensional code in the decoding process;
Output based on the decode information, and an output based on the attitude data, output generation means for generating together,
A two-dimensional code reader, comprising:
出力生成手段は、前記指定された基準面と、前記表裏判別データで特定される読取面とが不一致のとき、所定のエラー出力を生成する、
ことを特徴とする請求項2に記載の2次元コード読取装置。A reference plane designation receiving means for alternately accepting the designation of the reference plane of the two-dimensional code from the front or the back;
An output generation unit configured to generate a predetermined error output when the designated reference surface does not match the reading surface specified by the front / back determination data;
3. The two-dimensional code reader according to claim 2, wherein:
出力生成手段は、前記特定された基準面と、表裏判別データで特定される読取面とが不一致のとき、所定のエラー出力を生成する、ことを特徴とする請求項2又は3に記載の2次元コード読取装置。A reference plane specifying means for specifying the reference plane of the two-dimensional code alternatively from the front or back based on a decoding result obtained through the imaging means and the decoding means at that time in response to a predetermined trigger timing; Have
4. The output device according to claim 2, wherein the output generation unit generates a predetermined error output when the specified reference surface does not match the read surface specified by the front / back determination data. 5. Dimensional code reader.
出力生成手段は、回転度合い判別データで特定される回転度合いが前記指定された許容範囲を超えたとき、所定のエラー出力を生成する、ことを特徴とする請求項5に記載の2次元コード読取装置。Further comprising an allowable range receiving means for receiving the specification of the allowable range of the rotation degree,
The two-dimensional code reading device according to claim 5, wherein the output generation means generates a predetermined error output when the rotation degree specified by the rotation degree determination data exceeds the specified allowable range. apparatus.
出力生成手段は、回転度合い判別データで特定される回転度合いが前記特定された許容範囲を超えたとき、所定のエラー出力を生成する、ことを特徴とする請求項5又は6に記載の2次元コード読取装置。In response to a predetermined trigger timing, further comprising an allowable range specifying means for specifying an allowable range of the degree of rotation based on the position information of the finder pattern of the two-dimensional code obtained through the imaging means at that time,
7. The two-dimensional output device according to claim 5, wherein the output generation unit generates a predetermined error output when the rotation degree specified by the rotation degree determination data exceeds the specified allowable range. 8. Code reader.
出力生成手段は、
前記指定された基準面と前記表裏判別データで特定される読取面とが不一致のとき、及び/又は、回転度合い判別データで特定される回転度合いが前記指定された許容範囲を超えたとき、所定のエラー出力を生成する、
ことを特徴とする請求項8に記載の2次元コード読取装置。Reference surface specification receiving means for receiving the specification of the reference plane of the two-dimensional code from the front or back alternatively, and allowable range receiving means for receiving the specification of the allowable range of the rotation degree, further comprising:
The output generation means,
When the specified reference surface does not match the reading surface specified by the front / back determination data and / or when the rotation degree specified by the rotation degree determination data exceeds the specified allowable range, Produces the error output of
9. The two-dimensional code reader according to claim 8, wherein:
出力生成手段は、
前記特定された基準面と表裏判別データで特定される読取面とが不一致のとき、及び/又は、回転度合い判別データで特定される回転度合いが前記特定された許容範囲を超えたとき、所定のエラー出力を生成する、
ことを特徴とする請求項8又は請求項9に記載の2次元コード読取装置。A reference plane specifying means for specifying the reference plane of the two-dimensional code from the front or the back based on a decoding result obtained through the imaging means and the decoding means at that time in response to a predetermined trigger timing; and Further comprising an allowable range specifying unit that specifies an allowable range of the degree of rotation based on the position information of the finder pattern of the two-dimensional code obtained through the imaging unit in response to the predetermined trigger timing,
The output generation means,
When the specified reference surface does not match the reading surface specified by the front / back determination data and / or when the rotation degree specified by the rotation degree determination data exceeds the specified allowable range, Generate error output,
The two-dimensional code reader according to claim 8 or 9, wherein:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003001013A JP3815564B2 (en) | 2003-01-07 | 2003-01-07 | Two-dimensional code reader |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003001013A JP3815564B2 (en) | 2003-01-07 | 2003-01-07 | Two-dimensional code reader |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004213455A true JP2004213455A (en) | 2004-07-29 |
JP3815564B2 JP3815564B2 (en) | 2006-08-30 |
Family
ID=32819143
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003001013A Expired - Lifetime JP3815564B2 (en) | 2003-01-07 | 2003-01-07 | Two-dimensional code reader |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3815564B2 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007265354A (en) * | 2006-03-30 | 2007-10-11 | Denso Wave Inc | Method for displaying two-dimensional code, qr code, display medium, program and two-dimensional code reader |
JP2009289286A (en) * | 2009-09-08 | 2009-12-10 | Toshiba Tec Corp | Data code reading apparatus and reading method thereof |
JP2017045108A (en) * | 2015-08-24 | 2017-03-02 | 株式会社東芝 | Two-dimensional code reader and two-dimensional code display medium |
JP7469624B2 (en) | 2019-04-26 | 2024-04-17 | 株式会社デンソーウェーブ | Two-dimensional code reader, installation position adjustment device, program |
-
2003
- 2003-01-07 JP JP2003001013A patent/JP3815564B2/en not_active Expired - Lifetime
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007265354A (en) * | 2006-03-30 | 2007-10-11 | Denso Wave Inc | Method for displaying two-dimensional code, qr code, display medium, program and two-dimensional code reader |
JP2009289286A (en) * | 2009-09-08 | 2009-12-10 | Toshiba Tec Corp | Data code reading apparatus and reading method thereof |
JP2017045108A (en) * | 2015-08-24 | 2017-03-02 | 株式会社東芝 | Two-dimensional code reader and two-dimensional code display medium |
JP7469624B2 (en) | 2019-04-26 | 2024-04-17 | 株式会社デンソーウェーブ | Two-dimensional code reader, installation position adjustment device, program |
Also Published As
Publication number | Publication date |
---|---|
JP3815564B2 (en) | 2006-08-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106466768B (en) | For providing the system of visual cues to welder | |
WO2020211499A1 (en) | Self-checkout method and device for commodities | |
WO2011129113A1 (en) | Form processing device, form processing method, and recording medium | |
CN108491870B (en) | Electronic device, physical seal recognition method, and computer-readable storage medium | |
US6912325B2 (en) | Real time electronic registration of scanned documents | |
JP2007245283A (en) | Workpiece attitude detecting device, workpiece attitude detecting method, picking system, and picking method | |
JP2004090183A (en) | Article position and orientation detecting device and article taking-out device | |
JP2016009223A (en) | Optica character recognition device and optical character recognition method | |
US10664939B2 (en) | Position control system, position detection device, and non-transitory recording medium | |
JP2004213455A (en) | Two-dimensional code reader | |
JP6982275B2 (en) | Control device and computer program | |
US9659226B2 (en) | Image processing apparatus, image processing method, and computer-readable recording medium storing image processing program | |
JP6470595B2 (en) | Image processing apparatus, image processing method, and program | |
JPH10111906A (en) | Information symbol print medium, information symbol printer, and information symbol reader | |
JP3843895B2 (en) | Two-dimensional code reading method and two-dimensional code reading apparatus | |
JP2021158645A5 (en) | ||
KR20170027149A (en) | Apparatus for projecting drawing image | |
JP6638541B2 (en) | Inspection image display device | |
JP2786044B2 (en) | Optical character reader | |
KR100734068B1 (en) | Character direction recognition apparatus for steel material | |
JP2009069951A (en) | Character recognition device and character recognition method in character recognition device | |
JP6802107B2 (en) | Information processing equipment, methods and programs | |
JPH10269357A (en) | Method for inspecting printed matter | |
JP6107851B2 (en) | Program and image processing apparatus | |
JP2023125675A (en) | position estimation device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20051227 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060111 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060208 |
|
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: 20060517 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060530 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 3815564 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090616 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100616 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100616 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110616 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110616 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120616 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130616 Year of fee payment: 7 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
EXPY | Cancellation because of completion of term |