JP2004054645A - Two-dimensional code reader, two-dimensional code reading method, two-dimensional code reading program and computer-readable recording medium - Google Patents

Two-dimensional code reader, two-dimensional code reading method, two-dimensional code reading program and computer-readable recording medium Download PDF

Info

Publication number
JP2004054645A
JP2004054645A JP2002211848A JP2002211848A JP2004054645A JP 2004054645 A JP2004054645 A JP 2004054645A JP 2002211848 A JP2002211848 A JP 2002211848A JP 2002211848 A JP2002211848 A JP 2002211848A JP 2004054645 A JP2004054645 A JP 2004054645A
Authority
JP
Japan
Prior art keywords
dimensional code
reading
stability
predetermined
image data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002211848A
Other languages
Japanese (ja)
Inventor
Ken Natsukari
夏苅 権
Koichi Kakubuchi
角淵 弘一
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.)
Keyence Corp
Original Assignee
Keyence Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Keyence Corp filed Critical Keyence Corp
Priority to JP2002211848A priority Critical patent/JP2004054645A/en
Publication of JP2004054645A publication Critical patent/JP2004054645A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To detect degradation in reading stability and output a signal thereon, in a two-dimensional code reading system. <P>SOLUTION: The two-dimensional code reader is connectable to an image-taking part for acquiring an image including a two-dimensional code and an illumination part for providing illumination when the image-taking part acquires the image, and includes a decoding part which performs image processing of image data acquired with the image-taking part in order to decode the two-dimensional code; a reading stability determining part which calculates the contrast of dark and light in a predetermined reading stability determining area in the two-dimensional codes, and compares the contrast with a predetermined stability threshold value in order to determine reading stability; and a reading stability output part which outputs a reading stability degradation signal for indicating the degradation of the reading stability when the reading stability is below a predetermined warning threshold value. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、二次元コード読取装置、二次元コード読取方法、二次元コード読取プログラムおよびコンピュータ読取可能な記録媒体に関する。
【0002】
【従来の技術】
今日、商品管理などの分野においてバーコード、二次元コードなど様々なシンボルが利用されている。バーコードは、1次元コード、リニアコード等とも呼ばれ、種々の幅の線条を隣接して直線的に並べてバー部分と空白部分によって英数字等の情報を表現することができ、例えばユニバーサルプロダクトコードを表現する。これに対し二次元コードは、二次元シンボル、二次元バーコード等とも呼ばれ、情報を縦横に配置したシンボルであり、情報化密度が高く、バーコードに比べてより多くの情報を格納でき、冗長コードなので誤りの訂正ができるといった特徴がある。このようなバーコードや二次元コードを読み取るために、光学式の情報読取装置としてバーコード走査装置や二次元コード読取装置が利用される。
【0003】
【発明が解決しようとする課題】
しかしながら、従来の二次元コード読取装置では、読取の安定度を知ることができず、二次元コード読取装置の読み取り性能が徐々に劣化してもその状態を把握することができず、結果として突然読み取りできなくなる事態が生じ、不意のシステムダウンが生じることがあった。二次元コードの読み取り装置、及び二次元コードの読み取りシステムにおいては、運用中、二次元コードの印字もしくは刻印状態の劣化、レンズの汚れ、照明装置、受光素子の劣化などによる読み取りの安定度が低下する。ただ、従来の二次元コードリーダでは読み取りが成功した際の読取安定度を外部に出力することがないため、読取安定度の低下を事前に検知することができなかった。このため、従来の二次元コード読取装置を使ったシステムでは、上述したような照明の光量低下や二次元コードの印字の劣化などが原因で読み取り性能の低下が起こっていてもユーザは知ることができず、その結果システムの稼働中に突如読み取り不能状態に陥る。このような事態が発生すると、二次元コードの読み取り装置が接続されたシステム全体を停止させることとなり、システムを復旧させるために例えば照明用ランプの交換や再設定など二次元コード読取装置を読み取り可能な状態に回復させる作業が必要となる。ユーザ側にしては、このような不意のシステムダウンは大きな損失となるため、二次元コード読取装置の読み取り能力の低下を事前に察知し、読み取り不能となる前に必要な措置を講じることができるようにすることが望ましい。
【0004】
本発明は、このような問題に鑑みてなされたものである。本発明の主な目的は、二次元コード読取装置の読取安定度を検出可能な二次元コード読取装置、二次元コード読取方法、二次元コード読取プログラムおよびコンピュータ読取可能な記録媒体を提供することにある。
【0005】
【課題を解決するための手段】
上記目的を解決するために、本発明の請求項1に記載される二次元コード読取装置は、二次元コードを含む画像を取得するための撮像部および前記撮像部での画像取得の際に照明を提供するための照明部に接続可能であって、前記撮像部で取得された画像データを画像処理して二次元コードを復号するための復号部を備える。この二次元コード読取装置は、二次元コード中の所定の読取安定度決定領域において濃淡のコントラストを算出し、これを所定の安定度閾値と比較して読取安定度を決定するための読取安定度決定部を備えることを特徴とする。
【0006】
また、本発明の請求項2に記載される二次元コード読取装置は、請求項1に記載される特徴に加えて、前記濃淡のコントラストを算出する所定の読取安定度決定領域が、二次元コード内の濃部と淡部との位置関係が予め定められている領域であることを特徴とする。
【0007】
さらに、本発明の請求項3に記載される二次元コード読取装置は、請求項1に記載される特徴に加えて、前記濃淡のコントラストを算出する所定の読取安定度決定領域が、二次元コードのファインダパターン、タイミングパターン、タイミングセル、アライメントパターン、フォーマット情報、セパレータ、マージンのいずれかまたはこれらのうち2以上の組み合わせであることを特徴とする。
【0008】
一方、本発明の請求項4に記載される二次元コード読取装置は、請求項1に記載される特徴に加えて、前記濃淡のコントラストを算出する所定の読取安定度決定領域が、二次元コードが含まれる画像イメージからシンボルを切り出すためのファインダパターンであることを特徴とする。
【0009】
また、本発明の請求項5に記載される二次元コード読取装置は、請求項1に記載される特徴に加えて、前記濃淡のコントラストを算出する所定の読取安定度決定領域が、二次元コードに含まれるすべての領域であることを特徴とする。
【0010】
さらに、本発明の請求項6に記載される二次元コード読取装置は、請求項1から5のいずれかに記載される特徴に加えて、前記二次元コード読取装置がさらに、前記読取安定度決定部が算出した前記読取安定度が所定の警告閾値を下回ったとき、読取安定度の低下を知らせる読取安定度低下信号を出力する読取安定度出力部を備えることを特徴とする。これによって、読取安定度が低下したことを警告することができる。読取安定度の出力方法としては、専用のI/O端子を用いる方法や、復号化処理したデータに読取安定度を付加し、シリアルデータとして転送する方法などがある。
【0011】
さらにまた、本発明の請求項7に記載される二次元コード読取方法は、二次元コードに符号化された情報を復号化する方法である。この二次元コードの読取方法は、撮像部により二次元コードを含む画像を取得するステップと、取得した画像データをA/D変換するステップと、A/D変換した画像データから、二次元コードの領域を切り出すステップと、切り出した二次元コードの画像データからセルの境界を判定し、各セルに分割するステップと、各セルの画像データを所定の閾値に基づいて二値化もしくは多値化するステップと、前記二値化もしくは多値化されたデータに対して復号処理を行うステップとを含む。この二次元コード読取方法はさらに、二次元コードの所定の読取安定度決定領域において前記A/D変換されたデータの濃淡のコントラストを算出し、濃淡のコントラストを所定の安定度閾値と比較することにより、二次元コードの読取の安定度を示す指標となる読取安定度を決定し出力するステップを含むことを特徴とする。
【0012】
さらにまた、本発明の請求項8に記載される二次元コード読取方法は、請求項7に記載される特徴に加えて、前記所定の読取安定度決定領域が、二次元コード内の濃部と淡部との位置関係が予め定められている領域であることを特徴とする。
【0013】
さらにまた、本発明の請求項9に記載される二次元コード読取方法は、請求項7に記載される特徴に加えて、前記所定の読取安定度決定領域が、二次元コードに含まれるファインダパターン、タイミングパターン、タイミングセル、アライメントパターン、フォーマット情報、セパレータ、マージンのいずれかまたはこれらのうち2以上の組み合わせであることを特徴とする。
【0014】
さらにまた、本発明の請求項10に記載される二次元コード読取方法は、請求項7に記載される特徴に加えて、前記所定の読取安定度決定領域が、二次元コードが含まれる画像イメージからシンボルを切り出すためファインダパターンであることを特徴とする。
【0015】
さらにまた、本発明の請求項11に記載される二次元コード読取方法は、請求項7に記載される特徴に加えて、前記所定の読取安定度決定領域が、二次元コードに含まれるすべての領域であることを特徴とする。
【0016】
さらにまた、本発明の請求項12に記載される二次元コード読取方法は、請求項7から11のいずれかに記載される特徴に加えて、前記読取安定度を算出するステップが、データの復号処理を行うステップの後に行われることを特徴とする。
【0017】
さらにまた、本発明の請求項13に記載される二次元コード読取方法は、請求項7から11のいずれかに記載される特徴に加えて、前記読取安定度を算出するステップが、データの復号処理を行うステップの前に行われることを特徴とする。
【0018】
さらにまた、本発明の請求項14に記載される二次元コード読取方法は、請求項7から11のいずれかに記載される特徴に加えて、前記読取安定度を算出するステップが、前記各セルの二値化もしくは多値化ステップの前に行われることを特徴とする。
【0019】
さらにまた、本発明の請求項15に記載される二次元コード読取方法は、請求項7から11のいずれかに記載される特徴に加えて、前記読取安定度を算出するステップが、前記セルの分割ステップの前に行われることを特徴とする。
【0020】
さらにまた、本発明の請求項16に記載される二次元コード読取方法は、請求項7から15のいずれかに記載される特徴に加えて、前記読取安定度を算出するステップで使用される前記閾値を、ユーザが任意に設定可能であることを特徴とする。
【0021】
さらにまた、本発明の請求項17に記載される二次元コード読取方法は、請求項7から15のいずれかに記載される特徴に加えて、前記読取安定度を算出するステップで使用される前記閾値を、二次元コード読取装置が自動的に演算して設定可能であることを特徴とする。
【0022】
さらにまた、本発明の請求項18に記載される二次元コード読取方法は、請求項7から11のいずれかに記載される特徴に加えて、前記読取安定度を算出するステップが、前記所定の読取安定度決定領域に含まれる複数の座標位置での濃淡のコントラストの平均値、最頻値、または合計値を前記閾値と比較することを特徴とする。
【0023】
さらにまた、本発明の請求項19に記載される二次元コード読取方法は、請求項7から18のいずれかに記載される特徴に加えて、前記閾値が複数の閾値を有することを特徴とする。
【0024】
さらにまた、本発明の請求項20に記載される二次元コード読取方法は、請求項7から18のいずれかに記載される特徴に加えて、前記読取安定度の出力が、所定の段階評価であることを特徴とする。
【0025】
さらにまた、本発明の請求項21に記載される二次元コード読取方法は、二次元コードに符号化された情報を復号化する二次元コードの読取方法であって、撮像部により二次元コードを含む画像を取得するステップと、取得した画像データをA/D変換するステップと、A/D変換した画像データから、二次元コードの領域を切り出すステップと、切り出した二次元コードの画像データからセルの境界を判定し、各セルに分割するステップと、各セルの画像データを所定の閾値に基づいて二値化もしくは多値化するステップと、前記二値化もしくは多値化されたデータに対して復号処理を行うステップとを含む。この二次元コード読取方法はさらに、二次元コードの所定の読取安定度決定領域において前記A/D変換されたデータの濃淡のコントラストを算出し、これを二次元コードの読取の安定度を示す指標となる読取安定度として出力するステップを含むことを特徴とする。
【0026】
また、本発明の請求項22に記載される二次元コード読取方法は、二次元コードに符号化された情報を復号化する二次元コードの読取方法であって、撮像部により二次元コードを含む画像を取得するステップと、取得した画像データをA/D変換するステップと、A/D変換した画像データから、二次元コードの領域を切り出すステップと、切り出した二次元コードの画像データからセルの境界を判定し、各セルに分割するステップと、各セルの画像データを所定の閾値に基づいて二値化もしくは多値化するステップと、前記二値化もしくは多値化されたデータに対して復号処理を行うステップとを含む。この二次元コード読取方法はさらに、二次元コードの切り出しステップ、セルの分割ステップ、各セルの二値化もしくは多値化ステップの内いずれかのステップ、またはこれらのうち2以上のステップについて、処理に要した時間を所定の安定度基準時間と比較することにより、二次元コードの読取の安定度を示す指標となる読取安定度を決定し出力するステップを含むことを特徴とする。
【0027】
さらに、本発明の請求項23に記載される二次元コード読取方法は、二次元コードに符号化された情報を復号化する二次元コードの読取方法であって、撮像部により二次元コードを含む画像を取得するステップと、取得した画像データをA/D変換するステップと、A/D変換した画像データから、二次元コードの領域を切り出すステップと、切り出した二次元コードの画像データからセルの境界を判定し、各セルに分割するステップと、各セルの画像データを所定の閾値に基づいて二値化もしくは多値化するステップと、前記二値化もしくは多値化されたデータに対して復号処理を行うステップとを含む。この二次元コード読取方法はさらに、二次元コードに含まれる誤り訂正コードの使用率に基づいて、二次元コードの読取の安定度を示す指標となる読取安定度を決定し出力するステップを含むことを特徴とする。
【0028】
さらにまた、本発明の請求項24に記載される二次元コード読取プログラムは、コンピュータに撮像部により二次元コードを含む画像を取得する機能と、取得した画像データをA/D変換する機能と、A/D変換した画像データから、二次元コードの領域を切り出す機能と、切り出した二次元コードの画像データからセルの境界を判定し、各セルに分割する機能と、各セルの画像データを所定の閾値に基づいて二値化もしくは多値化する機能と、前記二値化もしくは多値化されたデータに対して復号処理を行う機能とを実現させるための、二次元コードに符号化された情報を復号化する二次元コードの読取プログラムである。この二次元コード読取プログラムはさらに、二次元コードの所定の読取安定度決定領域において前記A/D変換されたデータの濃淡のコントラストを算出し、濃淡のコントラストを所定の安定度閾値と比較することにより、二次元コードの読取の安定度を示す指標となる読取安定度を決定し出力する機能を実現させることを特徴とする。
【0029】
さらにまた、本発明の請求項25に記載されるコンピュータ読み取り可能な記録媒体は、請求項24に記載される二次元コード読取プログラムを記録したものである。記録媒体には、CD−ROM、CD−R、CD−RWやフレキシブルディスク、磁気テープ、MO、DVD−ROM、DVD−RAM、DVD−R、DVD−RW、DVD+RW、DVD+Rなどの磁気ディスク、光ディスク、光磁気ディスク、半導体メモリその他のプログラムを格納可能な媒体が含まれる。
【0030】
【発明の実施の形態】
以下、本発明の実施例を図面に基づいて説明する。ただし、以下に示す実施例は、本発明の技術思想を具体化するための二次元コード読取装置、二次元コード読取方法、二次元コード読取プログラムおよびコンピュータ読取可能な記録媒体を例示するものであって、本発明は二次元コード読取装置、二次元コード読取方法、二次元コード読取プログラムおよびコンピュータ読取可能な記録媒体を以下のものに特定しない。また、特許請求の範囲に示される部材を、実施の形態の部材に特定するものでは決してない。また各図面が示す部材の大きさや位置関係などは、説明を明確にするため誇張していることがある。さらに、本発明を構成する各要素は、複数の要素を同一の部材で構成して一の部材で複数の要素を兼用する態様としてもよい。
【0031】
本明細書において二次元コード読取装置、二次元コード読取方法、二次元コード読取プログラムおよびコンピュータ読取可能な記録媒体は、二次元コードの読取や読取設定を行うシステムそのもの、ならびに二次元コードの読取および読取設定に関連する入出力、表示、演算、通信その他の処理をハードウェア的に行う装置や方法に限定するものではない。ソフトウェア的に処理を実現する装置や方法も本発明の範囲内に包含する。例えば汎用の回路やコンピュータにソフトウェアやプログラム、プラグイン、オブジェクト、ライブラリ、アプレット、コンパイラ、モジュール、特定のプログラム上で動作するマクロなどを組み込んで二次元コードの読取設定そのものあるいはこれに関連する処理を可能とした装置やシステムも、本発明の二次元コード読取装置または二次元コード読取プログラムに該当する。また本明細書においてコンピュータには、汎用あるいは専用の電子計算機の他、ワークステーション、端末、携帯型電子機器、PDCやCDMA、W−CDMA、FORMAなどの携帯電話、PHS、PDA、ページャ、スマートフォンその他の電子デバイスも包含する。さらに本明細書においてプログラムとは、単体で使用されるものに限られず、特定のコンピュータプログラムやソフトウェア、サービスなどの一部として機能する態様や、必要時に呼び出されて機能する態様、OSなどの環境においてサービスとして提供される態様、環境に常駐して動作する態様、バックグラウンドで動作する態様やその他の支援プログラムという位置付けで使用することもできる。
【0032】
本発明の実施例において使用されるコンピュータなどの端末同士、およびサーバやこれらに接続される操作、制御、入出力、表示、各種処理その他のためのコンピュータ、あるいはプリンタなどその他の周辺機器との接続は、例えばIEEE1394、RS−232CやRS−422、USBなどのシリアル接続、パラレル接続、あるいは10BASE−T、100BASE−TX、1000BASE−Tなどのネットワークを介して電気的に接続して通信を行う。接続は有線を使った物理的な接続に限られず、IEEE802.11b、IEEE802.11aなどの無線LANやBluetoothなどの電波、赤外線、光通信などを利用した無線接続などでもよい。さらにデータの交換や設定の保存などを行うための記録媒体には、メモリカードや磁気ディスク、光ディスク、光磁気ディスク、半導体メモリなどが利用できる。
【0033】
[実施例1]
図1に、二次元コード読取装置の構成の一例のブロック図を示す。この図に示す二次元コード読取装置は、二次元コードを復号化処理する復号部1が二次元コード読取装置本体となる。復号部1である二次元コード読取装置本体には、二次元コード15を含む画像を取得するための撮像部2と、撮像部2で画像を取得する際に照明を提供するための照明部3が接続される。照明部3は、例えば複数の赤色発光ダイオード(LED)などの光源を備え、これによって二次元コードを均一に照射する。照明部3は対象物の二次元コードを効果的に照明できる位置に配置され、例えば撮像部2のレンズ5近辺に配置される。
【0034】
撮像部2は、カメラ4やレンズ5といった撮像光学系を備えている。撮像部2は、例えばCCDイメージ素子を使ったイメージセンシングにより、二次元コードラベルの部分を含む領域の画像データを撮像し、二次元コードの像をCCDエリアセンサに映し出して電気信号に変換する。変換された信号は、撮像部2内部でメモリ上に展開され、イメージとして取り込まれる。この処理は二次元コード読取装置本体に送出されて行うこともできる。なおピンホールカメラを用いる場合は、レンズは不要にできる。
【0035】
[復号部1]
図1に示す二次元コード読取装置本体である復号部1は、画像処理回路6と、演算回路7と、読取安定度出力回路8を備える。画像処理回路6は、撮像部2で取得された画像データを受信し、所定の画像処理を行うための回路である。ここでの画像処理は、アナログの濃淡情報を含む画像データをデジタル信号に変換するA/D変換などであり、例えば8ビット256階調のデジタル信号に変換する。
【0036】
演算回路7はCPUやMPU、システムLSI、DSPや専用ハードウェアなどで構成され、カメラ4やレンズ5などの光学系や照明部3を制御する信号を送信するための制御部9と、画像処理回路6で処理されたデジタル信号をさらに処理するための画像処理部10と、画像処理部10で二値化もしくは多値化された信号を復号するための復号処理部11と、読取安定度を決定するための読取安定度決定部12と、復号された信号を外部に出力するためのシリアル入出力部13とを備える。
【0037】
画像処理部10は、A/D変換した画像データからまずファインダパターンを探しだし、これに従って画像データ中に含まれる二次元コードの領域を特定して切り出す。さらに切り出した二次元コードの画像データからセルの境界を判定し、各セルに分割して、各セルの画像データを所定の閾値に基づいて二値化する。二値化は、取り込まれたイメージに含まれる二次元コードの種類、位置、大きさ、原点、傾き、歪みなどを画像処理により検知し、二次元コードを構成する最小単位であるセルの明暗、例えば白黒を1または0の二値化データとして取得する。なお、二値化データに限られず、多値化データを利用することもできる。
【0038】
[復号処理部11]
復号処理部11は、二値化あるいは多値化されたデータを復号する。復号には符号化されたデータの対照関係を示すシンボルキャラクタテーブルが参照される。テーブルに基づいて、二値化データに対応するシンボルキャラクタデータに変換され復号化される。さらに復号処理部11は、復号されたデータが正しいかどうか、所定のチェック方式に基づいて検証する。もしデータに誤りに発見された場合は、誤り訂正機能を使って正しいデータを演算により算出する。誤り訂正機能は、使用する二次元コードが採用する方式によって決まる。
【0039】
[読取安定度決定部12]
一方、読取安定度決定部12は、切り出した二次元コードの画像データの内、所定の読取安定度決定領域における濃淡のコントラストを算出し、これを所定の安定度閾値と比較して読取安定度を決定する。ここで濃淡のコントラストとは、二次元コードが無彩色の白黒で構成されている場合は白と黒の明度の差または比を主に指すが、この他、色度、彩度の差または比をも含む概念であり、これらのいずれかまたは組み合わせでコントラスト差を表現する。これによって、カラーの二次元コードにも対応する。一の方法としては、読取安定度決定領域に含まれるA/D変換された画像データに含まれる各点の内、白(1)に属すると判定された部分と黒(0)に属すると判定された点をそれぞれ数点抽出し、白黒それぞれの濃淡情報のデジタル信号の平均値または合計値を求め、この差または比をコントラストとする。そしてコントラストを用いて、二次元コードの読取の安定度を示す指標となる読取安定度を決定する。具体的には、後述するように所定の閾値と比較してその大小により安定度を判定する。抽出する点は、設定された読取安定度決定領域の内の所定の座標点を予め数点選択しておく。例えばファインダパターンがQRコードの二重の正方形であれば、白、黒それぞれの枠の四隅の頂点や輪郭部分の点を抽出する。抽出する点数は、例えば白黒それぞれ8点とするなど、十分な平均値または合計値が算出できる数とする。数点を抽出して平均値または合計値でコントラストを決定する方法は、演算階数を少なくして高速に処理できる。
【0040】
あるいは、別の方法として読取安定度決定領域に含まれるすべての点について、白黒それぞれの平均値または最頻値を求め、この差または比をコントラストとしてもよい。この方法は、すべての点を使用して平均値または最頻値を求めるためコントラストが正確になる反面、読取の条件によっては誤読が発生して白黒の判定を誤って読み取った部分に基づいて計算することとなる。ただ、印字や照明状態が良好で誤読がほとんど生じない条件下では実用上十分に使用できる。信憑性の判定には、例えばエラー訂正機能がどの程度使用されたかを基準に判断することができる。
【0041】
二値化された画像データからは濃淡の情報を知ることができないので、ここでは二値化される前のデータを使用する。なお二値化でなく多値化されたデータを利用することもできる。また濃淡の判定は、二次元コードが白と黒で構成されておれば白と判定された領域と黒と判定された領域のコントラストを、二次元コードを構成する色がそれ以外の色の場合は、それぞれの色についてコントラストを例えば色相、明度あるいは彩度などのコントラストを調べ、読取安定度を決定する。また読取安定度決定領域は予め設定され、後述するように二次元コードのファインダパターンなどが利用できる。ファインダパターンのように予め白黒あるいは明暗のパターンが決まっている領域では、コントラストがどの程度必要かということが判りやすい。
【0042】
例えば、コントラストを所定の閾値と比較して、閾値よりも大きいときは安定度良好と判定し、閾値よりも小さくなったとき読取安定度が低下したと判断する。このように閾値の上下で2段階の評価とする他、閾値を上限閾値と下限閾値の2つとし、上限閾値以上、上限閾値〜下限閾値、下限閾値以下の3段階評価とすることもできる。さらに閾値を3以上設けて多段階評価としてもよい。
【0043】
あるいは、このような段階的な評価でなく、読取安定度を所定のアルゴリズムにより数値化して出力してもよい。例えば、コントラストと閾値との絶対値を算出し、これに基づいて読取安定度を100点満点に換算する方式や、絶対値をそのまま読取安定度として出力する方式などがある。
【0044】
あるいはまた、コントラストそのものを読取安定度として出力しても良い。コントラストは、例えば8ビット256階調にA/D変換された場合、0〜255の値で表示する。またコントラスト自体を使用する場合は閾値を別途設ける必要はなく、コントラストを見てユーザが読取の安定度を判断する。
【0045】
[閾値の設定]
閾値は、二次元コードのPCS(Print Contrast Signal)など印字、刻印状態や周囲の明るさ、照明の効果など、二次元コードを使用する環境に応じて適切な値に設定される。例えばコントラストの大きい紙に二次元コードが印字されている場合は閾値大きく設定し、逆に金属に刻印されている場合のようにコントラストが小さいときは閾値を小さく設定する。閾値はユーザが任意に設定可能である。ユーザは二次元コード読取装置に備えられた安定度閾値設定部から、デフォルト値として設定された一般的な閾値を所望の閾値に変更する。上限閾値と下限閾値を設定する場合は、(上限閾値)>(下限閾値)となるように設定する。また、二次元コード読取装置に自動設定させてもよい。この場合は、二次元コードを使用する条件をユーザに入力させ、あるいは装置側が自動で検出し、条件に応じた閾値を装置内部で演算する。さらに条件の変化に追随させて閾値を自動的に調整させることもできる。
【0046】
このようにして読取安定度決定部12により決定された読取安定度は、シリアル入出力部13または読取安定度出力回路8に送出される。これによって読取安定度が通知され、二次元コードの読取自体は可能であっても、読取安定度が低下していることがユーザに通知されるので、ユーザは読取ができなくなる前に必要な対策を講じることができ、二次元コード読取装置が不意に読取不能になる自体を回避できる。
【0047】
[読取安定度出力回路8]
さらに読取安定度出力回路8は読取安定度出力部を構成し、読取安定度決定部12に接続されており、読取安定度決定部12で決定された読取安定度を外部に出力する。出力はホストシステム14に送出する他、専用のモニタなどの表示部を別途設けて、ここに表示されることによりユーザに読取安定度を通知することもできる。また読取安定度出力回路8は、読取安定度決定部12が算出した読取安定度が所定の警告閾値を下回ったとき、読取安定度の低下を知らせる読取安定度低下信号を外部に出力し警告を発することもできる。
【0048】
読取安定度決定部12で決定された読取安定度は、このように専用のI/O端子である読取安定度出力回路8から出力する方法の他、復号化処理したデータに読取安定度を付加し、シリアル入出力部13からシリアルデータとして転送する方法も利用できる。この場合、読取安定度決定部12から復号処理部11を介して読取安定度を付加し、シリアル入出力部13に送信する他、読取安定度決定部12から直接シリアル入出力部13に読取安定度を送信してもよい。
【0049】
[ホストシステム14]
ホストシステム14は汎用もしくは専用のコンピュータなどが利用でき、復号化された二次元コードのデータを受信して所望の処理を行うものである。二次元コード読取装置本体とホストシステム14は、データ通信可能な状態に接続されている。データ通信は、二次元コード読取装置本体からホストシステム14にデータを送信する片方向の通信で足りるが、双方向通信として、ホストシステム14から二次元コード読取装置本体に対し各種設定の変更や動作命令を送信することもできる。
【0050】
本発明に利用できる二次元コードの種類としては、QRコード、マイクロQRコード、データマトリクス(Data matrix;Data code)、ベリコード(Veri code)、アズテックコード(Aztec code)、PDF417、マキシコード(Maxi code)などがある。二次元コードにはスタック型とマトリクス型があるが、本発明はいずれの二次元コードに対しても適用できる。二次元コードは、二次元コードを印刷あるいは刻印したラベルを対象物に貼付する方法や、二次元コードを対象物自体に刻印する方法などによって、対象物上に固定される。なお本発明は、その名称に拘わらず読み取り対象のシンボルを二次元コードに特定せず、一次元バーコードやその他のデータシンボル、文字認識を行うOCRなどに対しても使用できる。例えば、バーコード読取用のレーザが使用できないようなアプリケーションにおいては、光学撮像系を使ってバーコードを読み取る必要があり、本発明をバーコード読取装置として使用できる。
【0051】
図2に、様々な二次元コードを示す。図2において(a)はQRコード、(b)はマイクロQRコード、(c)はデータマトリクス、(d)はベリコード、(e)はアズテックコードをそれぞれ示す。二次元コードは、最小単位であるセルで構成されている。ここでセルとは、一般に白(淡部)または黒(濃部)の定形要素である。また濃部と淡部には白黒に限られず濃淡のコントラストがある色を用いることができる。セルの形状は、一般に矩形状もしくはドット状であるが、その他の多角形状や楕円形などとしてもよい。セルの組み合わせで二次元コードは構成され、データを構成するデータセルの他、様々なパターンを構成する。例えば、ファインダパターン、タイミングパターン、タイミングセル、アライメントパターン、フォーマット情報、セパレータ、マージンなどがセルによって構成される。
【0052】
ファインダパターンは、図2において矢印で示されるパターンであり、切り出しシンボル、切り出しパターン、切り出しマーク、ビューファインダ等とも呼ばれる。ファインダパターンは、二次元コードが含まれる画像イメージから二次元コードのシンボルを切り出すために用いられる。
【0053】
タイミングパターンやタイミングセルは、セルの大きさや領域を切り出すためのパターンであり、シンボル内のモジュール座標を決定するために使用され、これを用いて二次元コードの歪みによって生じる各セルの位置ずれを補正することができる。アライメントパターンは、セルの向きや角度の認識を支援するためのパターンである。フォーマット情報は、二次元コードのフォーマットを表すためのパターンであり、誤り訂正レベルやマスク番号などの情報を持つ。セパレータやマージンは、二次元コードに含まれた所定のパターンを認識するための余白である。
【0054】
これらのパターンは、二次元コードにおいて濃部と淡部との位置関係が予め定められている領域であるため、濃淡のコントラストを算出し易い。したがって、読取安定度決定領域として好適に利用できる。ただ、上記は例示であって、これら以外のパターンあるいは濃淡が予め設定された領域を読取安定度決定領域として利用できることはいうまでもない。
【0055】
例えばQRコードやマイクロQRコードでは、その種別や位置決めを行うために目玉状のファインダパターンが配置されている。このファインダパターン)は、図2(a)、(b)に示すように二重の正方形で構成され、中心を横切る周波数成分比が黒:白:黒:白:黒=1:1:3:1:1の図形である。ただ、ファインダパターンは正方形に限られず、円形や六角形その他の多角形とすることもでき、同心状に相似形の図形が重なり合う形に形成したものが利用できる。また、中心を横切る周波数成分比があらゆる角度で同じならば、図形を二重に限らず何重にしてもよい。さらに、ファインダパターンの数は3つに限られず、1つ、2つ、あるいは4つ以上設けることもでき、これらを二次元コード内の任意の位置に配置できる。
【0056】
ファインダパターンは、二次元コードの読取においては必ず検出される領域であり、しかも早い段階で検出されると共に元来検出が容易なように設計されているため、読取安定度の判定に好適に利用できる。既存のファインダパターンを読取安定度決定領域として利用することで、特別な読取安定度の判定のための領域を設定したりその演算を行う必要がなく、従来より行われていた処理を活用して読取安定度を決定できるため、効率的な処理が可能となる。ただ、読取安定度を決定するための読取安定度決定領域は、ファインダパターンに限定する必要はなく、二次元コード中に含まれる他の領域を単独もしくは組み合わせて利用しても良く、あるいは二次元コード全体としてもよい。ファインダパターン以外の読取安定度決定領域としては、タイミングパターン、アライメントパターン、フォーマット情報、セパレータ、マージン、さらにデータ領域などがある。濃淡のコントラストを算出するための読取安定度決定領域を、ファインダパターンまたは二次元コード全体とすれば、読取安定度を判定するための特別な処理、例えば画像データ中から特定の領域を抽出したり、二次元コードの一部のデータを取得して演算するといった余分な工程が不要となり、二次元コードの通常の読取動作において演算されるデータを利用して読取安定度を決定できるため、処理を簡素化でき装置側の負担も少なく高速に演算できるというメリットがある。
【0057】
[動作手順]
図1に示す二次元コード読取装置が二次元コードを復号する手順を、図3のフローチャートに基づいて説明する。
【0058】
(ステップS1)撮像部2により二次元コードを含む画像を取得する。照明部3が二次元コードを照射している状態で、撮像部2が二次元コードラベルの部分を含む領域の画像データを撮像し、二次元コード読取装置本体に送出する。
【0059】
(ステップS2)取得した画像データをA/D変換する。入力された画像データのアナログ信号を、A/D変換器などによりデジタル信号に変換する。
【0060】
(ステップS3)A/D変換した画像データから、二次元コードの領域を切り出す。
【0061】
(ステップS4)切り出した二次元コードの画像データからセルの境界を判定し、各セルに分割する。
【0062】
(ステップS5)各セルの画像データを所定の閾値に基づいて二値化する。
【0063】
(ステップS6)二値化されたデータに対して復号処理を行う。テーブルを参照してデータを復号化すると共に、必要に応じて誤り検出、訂正を行う。
【0064】
(ステップS7)読取安定度を決定する。読取安定度決定部12が、二次元コードの所定の読取安定度決定領域においてA/D変換されたデータの濃淡のコントラストを算出し、濃淡のコントラストを所定の安定度閾値と比較することにより、読取安定度を決定し出力する
【0065】
ステップS7の読取安定度を決定するステップは、上記の例に限られず、二次元コードの切り出しステップの後であれば、言い換えればファインダパターンやその他のパターンが確定された後であればどの時点で行ってもよい。図4および図5に、読取安定度の決定ステップの順序を変更した例を示す。これらの図において、各ステップの番号は上記図3の例と対応している。図4においては、読取安定度決定ステップを復号処理の前に行っている。また図5においては、読取安定度決定ステップを各セルの二値化の前に行っている。このように、読取安定度決定ステップは、読取安定度決定領域が判明した後、言い換えればセルの境界が確定された後であればいずれの時点においても実行することもできる。
【0066】
また、読取安定度決定領域にファインダパターンなどを使用しない、例えば二次元コード全体でコントラストを判定する場合は、図6に示すように二次元コードの切り出しステップの後、セルの境界の判定の前においても実行させることもできる。
【0067】
[実施例2]
次に、本発明の実施例2に係る二次元コード読取方法を説明する。この方法では、二次元コードの濃淡に基づいて読取安定度を決定するのでなく、処理に要した時間により判断する。安定度が悪いと処理に時間がかかるという性質を利用したものである。二次元コードの読取手順および装置は、上記実施例1と同様のものが使用できる。読取安定度決定部12は、二次元コード読取手順の内二次元コードの切り出しステップ、セルの分割ステップ、各セルの二値化もしくは多値化ステップの内いずれかのステップ、またはこれらのうち2以上のステップについて、処理に要した時間を加算する。そして、所定の安定度基準時間を閾値として、これと比較することにより読取安定度を決定する。時間の測定には、演算回路7の動作クロックをカウントする方法や専用の計時手段を設ける方法などがある。
【0068】
[実施例3]
さらに本発明の実施例3として、二次元コードに含まれる誤り訂正コードの使用率に基づいて読取安定度を決定する方法を説明する。二次元コードには、コード化したい本来の情報に加え、誤り訂正機能を持たせることができる。誤り訂正機能は、二次元コードが汚れたり部分的に欠損している場合でも、データを復元できる機能である。さらに誤り訂正機能によって、二次元コードの誤読を防止する効果も得られる。このため、一般に二次元コードには誤り訂正のための誤り訂正コードが付加される。誤り訂正コードは、使用する二次元コードの種類に応じて異なるが、一般にはリードソロモン符号が利用される。誤り訂正には、例えばQRコードの場合、シンボルの損傷許容の度合いに応じた4段階のレベルがある。
【0069】
この誤り訂正コードが二次元コードの読取においてどれだけ使用されたか、使用率に基づいて読取安定度を決定し出力する。誤り訂正コードを使用することなく読取が行われておれば、安定した読取がなされていると判断でき、逆に誤り訂正コードの使用率が高いほど読取がスムーズにされていない、すなわち読取安定度が悪いと考えられる。よって誤り訂正コードが使用される割合に基づいて、読取安定度を判断できる。誤り訂正コードの使用率と読取安定度の関係は、予め安定度閾値を設定してテーブルなどに記憶させ、これを参照して比較することによって読取安定度を判定する。誤り訂正コードの使用率は、図1の復号処理部11での復号処理において、読取安定度決定部12が検出でき、読取安定度出力回路8から出力される。
【0070】
[二次元コード読取装置設定プログラム]
次に、二次元コード読取装置の設定を行う二次元コード読取装置設定プログラムについて説明する。この二次元コード読取装置設定プログラムは、ホストシステムとして二次元コード読取装置に接続されたコンピュータにインストールされ、実行される。二次元コード読取装置設定プログラムをインストールされたコンピュータが二次元コード読取装置と通信を行い、必要な情報を送受信して設定を行う。通信は、例えばRS−232CケーブルやUSBケーブルを介してシリアル通信で行われる。
【0071】
図7〜図22に、二次元コード読取装置設定プログラムのユーザインターフェース画面のイメージの一例を示す。これらの図に示す画面は、左側に必要な手順がボタン状に表示されており、各ボタンを選択すると設定画面が右側に表示される。設定の流れは、図2のフローチャートのようになる。
【0072】
なお、これらの画面において各入力欄や各ボタンなどの配置、形状、表示の仕方、サイズ、配色、模様などは適宜変更できることはいうまでもない。デザインの変更によってより見やすく、評価や判断が容易な表示としたり操作しやすいレイアウトとすることもできる。例えば各項目をウィザード形式で入力させるようにして、ユーザは質問に答えていくだけで必要な設定ができるようにしても良い。また、以下の説明では詳細設定画面を別ウィンドウで表示させている場合や同一ウィンドウ内に詳細設定欄を設けている場合があるが、いずれか一方に変更したり両者を併用させても利用できることはいうまでもない。
【0073】
これらのプログラムのユーザインターフェース画面において、仮想的に設けられたボタン類や入力欄に対するON/OFF操作、数値や命令入力などの指定は、二次元コード読取装置設定プログラムをインストールされたコンピュータに設けられた入力デバイスで行う。本明細書において「押下する」とは、ボタン類に物理的に触れて操作する他、入力デバイスによりクリックあるいは選択して擬似的に押下することを含む。入出力デバイスはコンピュータと有線もしくは無線で接続され、あるいはコンピュータに固定されている。一般的な入力デバイスとしては、例えばマウスやキーボード、スライドパッド、トラックポイント、タブレット、ジョイスティック、コンソール、ジョグダイヤル、デジタイザ、ライトペン、テンキー、タッチパッド、アキュポイントなどの各種ポインティングデバイスが挙げられる。またこれらの入出力デバイスは、プログラムの操作のみに限られず、二次元コード読取設定装置などのハードウェアの操作にも利用できる。さらに、インターフェース画面を表示するディスプレイ自体にタッチスクリーンやタッチパネルを利用して、画面上をユーザが手で直接触れることにより入力や操作を可能としたり、または音声入力その他の既存の入力手段を利用、あるいはこれらを併用することもできる。
【0074】
なお、二次元コード読取装置設定プログラムをインストールされたコンピュータに接続された入出力デバイスから設定を行う態様の他、二次元コード読取装置設定用のプログラムやハードウェアを二次元コード読取装置に組み込み、二次元コード読取装置のみで設定を行えるようにしても良い。この場合、入出力デバイスは二次元コード読取装置に設けられあるいは接続され、必要に応じて設定用のモニタなどが接続される。
【0075】
図7〜図22に、二次元コード読取装置設定プログラムのユーザインターフェース画面のイメージの一例を示す。この図に示す画面は、左側に必要な手順が設定順にボタン状に表示されており、各ボタンを選択すると設定画面が右側に表示される。
【0076】
この二次元コード読取装置設定プログラムは、基本的な手順として図2のフローチャートに示すステップS1〜4の4つで構成されている。ただし、必ずしもこの手順どおりに設定する必要はない。後述するように、ステップS1の二次元コードの仕様決定をスキップし、ステップS2においてユーザが二次元コードの仕様を直接指定することもできる。また、ステップS3の二次元コード読取装置の動作設定は、ステップS1、S2と独立して設定可能である。したがって、プログラムを起動してステップS3のみを設定して終了するような使い方も可能である。さらに、このプログラムは設定した内容を保存でき、また起動時には前回の設定内容を自動的に呼び出すこともできるため、デフォルト設定のままでステップS4の読取調整を行うことも可能である。このように、本プログラムの使用方法はステップS1〜4を順に行う手順のみに限定されるものでない。以下、各設定画面毎に説明する。
【0077】
[条件指定]
(ステップS1 二次元コードの仕様決定)
図7に、二次元コードの仕様を演算する二次元コード読取装置設定プログラムのイメージ画面を示す。この画面では読取対象となる二次元コードの仕様を決定するため、二次元コードにエンコードするデータの種別と印字条件を選択する。入力する項目としてはコード種別、データ種別、データ量、印字可能スペースがある。二次元コードのコード種別としては、図7の例では「コード種別」指定欄16にQRコード、マイクロQRコード、正方形データマトリクス、長方形データマトリクスが選択候補として挙げられており、ラジオボタンでいずれかを選択する。なお本発明は、二次元コードの種別をこれら4種類に限定するものでなく、これ以外の二次元コードやバーコードも選択候補として挙げることが可能であることはいうまでもない。
【0078】
ユーザは使用用途や目的などに応じて二次元コードの種別およびこれに持たせる冗長性や誤り訂正機能を設定できる。例えば二次元コードが紙のようなコントラストの良い対象に印字されているのであれば、ある程度正確な読取が期待できるので誤り訂正機能は低レベルで足り、一方二次元コードが基板にシルク印刷されている場合はコントラストが不足気味であると考えられ、誤り訂正機能をある程度持たせる必要がある。このように使用条件によってどのような二次元コードの設定とするかが決まる。
【0079】
また右側には選択された二次元コードのサンプルを表示する二次元コードサンプル表示欄17が設けられており、コード種別を変更するとそれに応じてサンプルの表示も変更される。さらに、コード種別で選択された二次元コードに応じて、その下段の「データ種別」指定欄18中の選択可能な項目がグレーアウトするなど、各コード種別に応じて設定可能なデータ種別のみが選択可能となる。
【0080】
「コード種別」指定欄16の「詳細...」ボタン19を押下すると、図8に示すような二次元コード詳細設定画面20が別ウィンドウで開き、選択した二次元コードに応じた詳細設定が可能となる。図8の例では、QRコードに対応する例としてモデル、誤り訂正レベル、印字パターンがドットパターンか否かが変更可能となっている。この画面は選択された二次元コードの種別に応じて適切な画面が表示される。
【0081】
ここで印字パターンとは、主に印字のドットパターンの有無を示す。印字パターンには、ノーマルパターン(通常パターン)とドットパターンがある。ドットパターンとは、シンボルを構成するセルが円形に構成されるため、隣接するセル同士が若干離間しているものを指し、レーザマーキングあるいはダイレクトマーキングによりドット状に印字や刻印がされる場合に発生する。一般には、二次元コードがQRコードもしくはデータマトリクスの場合にこのオプションが選択可能となる。
【0082】
また「データ種別」指定欄18では、数字、英数、バイナリ、漢字の別をラジオボタンで選択する。
【0083】
さらに「データ量」指定欄21は、上記のデータ種別で特定したデータの桁数を指定する。例えば、データ種別が数字のときは桁数、英数や漢字のときは文字数、バイナリのときはバイト数で指定する。
【0084】
さらにまた、「印字可能スペース」指定欄22は、印字可能な最大範囲の縦×横のサイズを指定する。
【0085】
入力完了後、図7の画面において「計算開始」ボタン23を押下すれば、二次元コード読取装置設定プログラムはユーザが入力した条件に基づいて、条件に合致する二次元コードを作成できるか否かを演算し判定する。作成可能と判定されれば、計算結果表示欄24にセルサイズの一辺の大きさの最大値、およびシンボルの大きさの最大値を縦×横のサイズで表示する。さらに「印字の詳細」ボタン25がグレーアウトした状態から押下可能となる。
【0086】
「印字の詳細」ボタン25を押下すると、図9に示す印字の詳細設定画面26が新たにウィンドウで開き、印字されるセルサイズが指定可能となる。これは、二次元コードを印刷するプリンタの解像度に応じて、二次元コードを構成する最小単位である1セルを、プリンタが印字を行う最小単位であるドット何個分を割り当てるかを指定するものである。1セルに割り当てるドット数が大きいほど、印字が正確になり精度が向上する反面、印字される二次元コードシンボルの大きさも大きくなる。二次元コード読取装置設定プログラムは、プリンタの解像度に応じて1ドットの大きさを演算すると共に、1セルに割り当てるドット数に応じて実際に印字される1セルの大きさと二次元コードシンボルの大きさをそれぞれ演算して候補群を表示する。ユーザは使用するプリンタの解像度やシンボルの大きさに応じて、候補群から最適な組み合わせを選択する。
【0087】
なお作成できないと判定された場合は、単に作成不能である旨のエラーメッセージを計算結果表示欄24に表示する他、その理由と理由を解消する推奨値を提示して、ユーザに再入力を促すこともできる。例えば、印字可能スペースが小さすぎる、データ量が多すぎるなどの警告メッセージを表示するとともに、解決策としてデータ種別を・・・に変更する、桁数を・・・に変更する、印字可能スペースを・・・×・・・に変更する、といったどのような設定値であれば印字可能となるかを別ウィンドウで提示する。
【0088】
[二次元コードの仕様]
以下、図7の画面において「計算開始」ボタン23を押下したときに実行される二次元コードの仕様を決定するアルゴリズムの一例について説明する。
(1)まず、コード種別、データ種別、データ量に基づいて、必要なコードサイズを求める。コードサイズとは、シンボル一辺あたりのセル数であり、バージョンによりコードサイズが規定されている。ここでコード種別、データ種別、データ量とコードサイズの関係は定められており、例えば二次元コードがQRコード、モデル2、英数10桁、誤り訂正レベルMの場合、バージョン1(21セル×21セル)となる。なお、コード種別の詳細でドットパターンが選択されているときは、二次元コード読取装置の仕様によりコードサイズの最大値に制限が課されることがある。
【0089】
(2)その結果、コードサイズが理論上の最大コードサイズを超えていれば作成不可としてNGと判定する。ここで理論上の最大コードサイズは、(n×安全係数)/mで表現される。この式においてmはCCDの画素割当数であり、例えば5、8などの値とする。一般に、印字パターンがノーマルパターンの場合CCD上で5画素となり、ドットパターンの場合8画素となる。またnはCCDの画素数(X,Y)であり、例えば(640,480)とする。さらに視野内に完全に二次元コードを収めるための安全係数として、0.9などの値を入力する。
【0090】
(3)次に、印字可能スペースとコードサイズ(Data Matrixのときは外形も含む)から、印字可能スペースいっぱいにコードを印字した時のセルサイズを求める。このときのセルサイズを「暫定最大セルサイズ」とする。暫定最大セルサイズは、(暫定最大セルサイズ[mm])=(印字可能スペース[mm])/((コードサイズ)+(マージンサイズ)×2)で表される。例えば、印字可能スペースが10mm×10mm、コードサイズが21セル×21セルのとき、暫定最大セルサイズは0.345mmとなる。
【0091】
(4)さらに、(3)で求めた暫定最大セルサイズで2次元コードを印字したときの、シンボルの大きさを計算する。シンボルの大きさは、(シンボルの大きさ[mm])=(セルサイズ[mm])×((コードサイズ)+(マージンサイズ)×2)で表される。ここで、正方形コードであって正方形の印字可能スペースの場合、(シンボルの大きさ)=(印字可能スペース)となる。
【0092】
(5)全ての接写リングの組み合わせについて、(4)で求めたシンボルの大きさが視野のy方向の90%以下となるカメラの取り付け距離を求める。例えば、セルサイズ、位置分解能、視野サイズのみを考慮し、運用時のワーク(二次元コードを含む読み取り対象)の位置決定精度、ワークの回転、カメラの設置条件に制限がないことを前提とし、1セルをCCDの5または8画素に割り当てたとき、必要な視野を確保できるかどうかを計算する。一例として使用できる接写リングが0.5mm、1mm、5mm、10mm、22mmのときセルサイズが0.345mm、必要な視野が10mmのとき、接写リングの組み合わせが0.5mm、1mm、5mm、5.5mm、6mm、6.5mmのとき、条件が満たされる。
【0093】
ここで、二次元コードとして長方形データマトリクスが選択されている場合、シンボルの大きさは、長辺の長さとする。またカメラの取り付け距離は、長辺の長さが視野のx方向の90%となる時のカメラの取り付け距離とする。もし解が得られなければNGとする。解があれば、(3)で求めた「暫定最大セルサイズ」を「セルサイズの最大値」とする。なお、ここで二次元コードがデータマトリクスコードの場合、外形を変えて再計算し、外形のサイズを変更することで印字スペース、視野の制約条件を満たすのであれば、これを推奨値としてユーザーに提示する。
【0094】
一方、指定された条件を満たす仕様の二次元コードは作成できない(NG)と判定された場合、仕様を満たすための条件を再計算してユーザに提示する。ここで提示する条件としては、データ種別の変更(漢字→英数→数字の順に設定可能か否かを演算する。)、誤り訂正レベルの変更(QRコード、マイクロQRコードの場合のみH→Q→M→Lの順に演算する。)、印字スペースの変更(セルサイズの値を0.025mmとして、必要な印字スペースを再計算する。)、データ量の変更などがある。
【0095】
[印字の詳細設定]
さらに、印字の詳細設定に関するアルゴリズムの一例を以下説明する。ここでは、セルサイズおよびシンボルの大きさの最大値でなく、二次元コードを印字するプリンタの解像度に応じて最適なセルサイズおよびシンボルの大きさを演算する。
(1)図7の画面から「印字の詳細」ボタン25を押下すると、図9の印字の詳細設定画面26が表れる。
【0096】
(2)上記で求めた「セルサイズの最大値」のセルを、プリンタの解像度に相当する200dpi、300dpi、400dpi、600dpiで印字するためには、1セルあたり何ドットで印字すればよいか、1セルあたりのドット数の最大値(n(max))を求める。(n(max))の演算方法は、(セルサイズの最大値[mm])>1/(プリンタの解像度[dpi])×25.4×nを満たす最大のnとして求める。ここでセルサイズは、(セルサイズ[mm])=n×25.4/(プリンタの解像度[dpi])として演算する。また、シンボルの大きさは、(シンボルの大きさ[mm])=(セルサイズ[mm])×((コードサイズ)+(マージンサイズ)×2)として演算する。
【0097】
(3)上記(2)で求めたドット数(n(max))について、プリンタの解像度(200dpi、300dpi、400dpi、600dpi)、1セルあたりのドット数、セルサイズ、シンボルの大きさを求め、印字の詳細設定画面26に表示する。
【0098】
(4)プリンタの解像度が高く、n(max)>2となるときは、n=2からn=n(max)まで、上記(3)の計算を行い、値を表示する。ただし、n(max)が20を越える場合は、20でうち切る。図9において表示される演算結果について、各列の先頭をクリックすると、その列をキーにソートして表示される。
【0099】
さらに、図9の印字の詳細設定画面26において、ユーザが任意のセルサイズを入力した場合は、ユーザが「印字精度」の入力欄に指定した解像度について上記の演算を行い、演算結果を下部の一覧に表示する。この場合、上記演算の200dpi、300dpi、400dpi、600dpiに関する演算結果は表示しない。
【0100】
以上のようにして得られた演算結果の一覧表から、ユーザは所望の値を表示する行を選択する。その後、図9の印字の詳細設定画面26において「OK」ボタンを押下すると、印字の詳細設定画面26を閉じて図7の二次元コードの仕様を決定する画面に戻る。この際、ユーザーに選択された行の「印字されるセルサイズ」、「印字されるシンボルの大きさ」を、図7の計算結果表示欄24で表示されるセルサイズ、シンボルの大きさに反映すると共に、セルサイズの欄の「・・・mm/セル以下」の文字を「mm/セル」に変更する。なお、再度図7の「印字の詳細」ボタン25を押下したときは、表示中の[印字の詳細設定]で求めたセルサイズでなく、上記[二次元コードの仕様]で求めた「セルサイズの最大値」に基づいて計算される。
【0101】
以上のようにして演算されたセルサイズおよびシンボルの大きさの最大値に基づいて、撮像部取付条件を演算する。具体的には、パラメータとしてレンズのf値、レンズの主点間距離、レンズ長、使用する接写リングの数と厚さ、ピントリングの調整範囲、CCDの一画素サイズ、画素数などに基づいて、撮像部の取付距離、接写リングの厚さ、ピントリングの目安の推奨値を計算し、撮像部取付条件のデフォルト値とする。なお撮像部の取付距離とは、ワークからレンズの先端までの距離を指す。また撮像部の取付距離制限とはユーザの望む取付距離であって、ユーザの指定した範囲内で撮像部の取付距離を設定することを意味する。以下の実施例では、撮像部としてカメラを用いる。
【0102】
(ステップS2 カメラ取付条件決定)
ステップS2では、カメラの取付条件として、カメラの取付距離、接写リングの厚さ、ピントリングの目安を決定する。図10にカメラの取付条件を決定するためのユーザインターフェース画面を示す。ユーザはカメラを装着する際の条件として、「二次元コード仕様」27、「二次元コードラベルの位置ずれ許容範囲」28、「印字パターン」29、「希望取付距離」30を図10から指定する。
【0103】
二次元コードの仕様としては、二次元コードを構成するセルサイズ、シンボルの大きさの縦横を数値で指定する。ここで、上記ステップS1にて演算が実行されている場合は、各々演算された値がデフォルト値として入力されており、ユーザはこれらの値を調整することができる。ユーザは所望の数値を直接入力することもできるし、また右側に設けられたスライダ31をドラッグすれば、セルサイズやシンボルの大きさを連続的に変化させることができ、これに応じた数値が入力欄に自動的に入力される。ユーザがセルサイズの大きさを指定すれば、シンボルの大きさは自動的に演算できる。なおこの場合は後述する「シンボルの大きさの計算」ボタンは表示されない。
【0104】
あるいは、ステップS1を実行しないで直接ユーザが二次元コードの仕様を指定することもできる。この例を図11に示す。この場合はステップS1をスキップするため、セルサイズ、シンボルの大きさに演算値がデフォルトとして入力されておらず、ユーザが数値を各入力欄に直接入力する。
【0105】
[シンボルの大きさの計算]
さらにこの場合は、シンボルの大きさを二次元コードの仕様に基づいて演算させることもできる。図11で「シンボルの大きさ」入力欄32の右側に設けられた「シンボルの大きさの計算」ボタン33を押下すると、図12に示すように「シンボルの大きさの計算」設定画面34が別ウィンドウで表示される。この画面からコード種別、バージョン(コードサイズ)、セルサイズ、シンボルの大きさに連動させるか否かを指定し、OKボタンを押下すると、これらの情報に基づいてシンボルの大きさが演算され、図11の「シンボルの大きさ」入力欄32に演算結果が入力される。ここでの処理の流れは、以下のようになる。
(1)図11のカメラの取付条件を決定する設定画面における「シンボルの大きさの計算」ボタン33を押下すると、図12に示す「シンボルの大きさの計算」設定画面34が表示される。
(2)コード種別、バージョン(コードサイズ)、セルサイズから、シンボルの大きさを計算する。
(3)上記で演算されたシンボルの大きさを、「シンボルの大きさ」として表示する。
(4)図12において「OK」ボタンを押下すると、「シンボルの大きさの計算」設定画面34が閉じられて図11の画面に戻る。このとき、上記で得られたセルサイズ、シンボルの大きさが「二次元コードの仕様」27にて反映される。(5)図12の「シンボルの大きさをセルサイズに連動させる」欄がチェックされている場合は、図11の画面において「シンボルの大きさ」入力欄32をグレーアウトし、スライダ31を有効にする。
【0106】
以上のように、本発明の実施例は二次元コードのセルサイズやシンボルの大きさ等の項目を直接ユーザに指定させる以外にも、必要な仕様をユーザに選択させることで装置側が演算して求めることもでき、二次元コードに詳しくないユーザでも設定ができるように構成されている。また二次元コードに詳しいユーザには直接入力も可能とすることにより、知識のあるユーザにとって煩わしさを解消し、いずれのユーザに対してもユーザビリティの良さを維持している。
【0107】
図10、図11において二次元コードラベルの位置ずれ許容範囲28は、ラベルの位置ずれ範囲またはワークの位置決め精度であり、ラベルが基準位置に対して位置ずれしても許容される範囲を指定する。さらにワークの回転を許すか否かを指定し、ワークが回転するときは「回転あり」にチェックを入れる。「回転あり」にチェックが入ると、後述する図14の取付イメージ画面で表示される二次元コードが回転して斜めに表示され、「回転あり」が選択されたことがイメージでも確認できる。
【0108】
さらに印字パターン29は、ノーマルもしくはドットのいずれかを選択する。
【0109】
希望取付距離30は、二次元コードの使用条件によって物理的にカメラを離間できる距離に限界があるなど、カメラの取付距離が制限を受ける場合に設定される。
【0110】
上記以外に設定可能な条件としては、被写界深度、照明の条件、デコード(復号化処理)時間などが挙げられる。
【0111】
以上の条件が入力され、「計算開始」ボタン35を押下すると、指定された条件に基づいて、カメラ取付距離、使用する接写リングの厚さ、ピントリングの厚さが演算され、「取付仕様」表示欄36に表示される。また「取付条件の詳細」ボタン37がグレーアウトから選択可能となる。なお、上記ステップS1と同様、指定された条件ではカメラの取付距離が演算できない場合は、その旨と理由および推奨値を提示し、ユーザに再入力を促す。
【0112】
[カメラ取付距離の演算]
以下、「計算開始」ボタン35を押下したとき実行されるカメラ取付距離の演算アルゴリズムの一例について説明する。このアルゴリズムは以下のようにしてカメラ取付距離の最小値Ominおよび最大値Omaxを求める。
【0113】
[カメラ取付距離の最小値Ominの演算]
カメラを取り付けられる最も至近距離であるカメラ取付距離の最小値Ominは、以下のようにして演算される。
【0114】
(1)二次元コードのコードサイズが不明の場合、セルサイズ、シンボルの大きさからコードサイズを演算する。正方形コードの場合は、(シンボルの大きさ)/(セルサイズ)=コードサイズとする。
【0115】
(2)演算の結果得られたコードサイズが、上述した理論上の最大コードサイズを超えていれば、NGと判断する。
【0116】
(3)シンボルの大きさ、ラベルの位置ずれ範囲、ワークの回転の有り無しに基づいて、必要なy方向の視野Vyminを計算する。例えば、正方形コードで回転を許すとき、必要な視野Vymin=(印字スペースの一辺)×√2+2×(位置決め精度)となる。
【0117】
(4)Vyminを確保するための倍率Mmaxを求める。倍率Mmaxは、Mmax=s×n/Vyminで演算され、上記式においてsはCCDの画素サイズ(mm)、nはCCDのy方向画素数×安全係数、mは割り当て画素(5または8)とする。
【0118】
(5)Mmaxを満足する接写リングの組み合わせをピックアップする。ここで、実効接写リング厚f・Mはf・M=(接写リング厚)+(ピントリングの調整範囲)で演算される。Mmaxを満足する組み合わせがないときは、実現可能な接写リングの組み合わせからMmaxを決め直す。
【0119】
(6)上記(5)で得られたMmaxにおける物体からレンズ前端までの距離Ominと、そのときの視野Vyを演算する。ここでレンズ前端までの距離OminはOmin=f/M+2f+ΔH−dで演算され、上式においてΔHはレンズの主点間距離、dはレンズ長である。また視野VyはVy=s×n/Mで演算され、上式においてsはCCDの画素サイズ(mm)、nは(CCDのy方向画素数)×(安全係数)であり、Mは倍率である。この実施例では、計算パラメータとして焦点距離f=24.97[mm]、主点間距離ΔH=0.69[mm]、レンズ長(下端から焦点面まで)d=54.83[mm]、CCDの画素サイズs=0.0074[mm]、CCDのy方向画素数=480、CCDのx方向画素数=640、ピントリングの調整範囲=0〜2.5[mm]、視野の安全係数=0.9とした。
【0120】
[カメラ取付距離の最大値Omaxの演算]
カメラを取り付けられる最長距離であるカメラ取付距離の最大値Omaxは、以下のようにして演算される。
【0121】
(1)2次元シンボルの1セルがCCD上で5画素(ノーマルパターンの場合)または8画素(ドットパターンの場合)になる倍率Mminを求める。ここで、Mmin=s×m/Sで演算され、上式においてsはCCDの画素サイズ(mm)、mは割り当て画素(5または8)、Sはワーク上でのセルサイズ(mm)である。
【0122】
(2)Mminを満足する接写リングの組み合わせを抽出する。Mminを満たす組み合わせがない場合は、実現可能な接写リングの組み合わせからMminを決定し直す。
【0123】
(3)上記(2)で得られたMminにおける物体からレンズ前端までの距離Omaxと、そのときの視野Vyを求める。
【0124】
[「取付仕様」表示欄36の表示]
図11のカメラの取付条件を決定する設定画面における「取付仕様」表示欄36で表示される演算結果には、「2次元コードが視野の70%となる高さ」を表示している。これは上記最小値Ominを求める計算式において、安全係数を0.7とする場合に対応する。ただし、割り当て画素数が5未満になる場合は、二次元シンボルの1セルがCCD上で5画素(ノーマルパターン)または8画素(ドットパターン)になる高さ(Omax)を表示する。
【0125】
[取付条件の詳細]
なお、カメラの取付距離は最小値または推奨値を示している。最小値の場合、実際の取付はこの値より大きくてもよい。推奨値とは、最小値の1.1倍〜2.0倍程度である。図10、図11において「取付条件の詳細」ボタン37を押下すると、図13のカメラ取付条件の詳細画面38が表示される。この図では、カメラの取付可能な距離が図示される。図において、演算されたカメラの取付距離を最小値として、取付可能な範囲を示し、棒状のグラフで示される領域は焦点を合わせることが可能な範囲である。また組み合わせ可能な接写リングの組み合わせのパターンが例示される。さらに、カメラの取付距離および接写リングの厚さに加えて、読取セルサイズの限界値が演算され、ノーマルパターンの場合とドットパターンの場合それぞれの演算値が取付条件詳細表示欄39に表示される。
【0126】
図13において左側は「合焦点範囲」表示欄40であり、縦軸にカメラの取付距離を示し、焦点合わせが可能な範囲を棒グラフ状に示している。この図においては7本のバーが示されており、個々のバーはある接写リングの組み合わせを表す。各バーをクリックして選択すると、バーの色が赤色に変化すると共に、選択された接写リングの組み合わせに係る詳細が右側の「接写リング組み合わせ」欄41に表示される。図において「接写リング組み合わせ」欄41に「合計:6.5mm」とあるのは、現在選択されている接写リングの組み合わせによるリング厚さの合計が6.5mmであることを示す。また「(0.5+1.0+5.0)」とあるのは、接写リングの組み合わせのパターンとして0.5mm、1.0mm、5.0mmの接写リングを重ねて使用すれば6.5mmになることを示す。これによってユーザは、指定された厚さの接写リングを用意すればよく、迷うことなく接写リングの組み合わせを選択できる。また「取り付け範囲:65mm〜91mm」とあるのは、現在選択されている接写リングの組み合わせでは65mm〜91mmの範囲でピントを合わせることができることを示している。この範囲は、「合焦点範囲」表示欄40におけるバーの長さに対応している。なお、「合焦点範囲」表示欄40では一部のバーの上端および下端が一部切れているが、これは各バーがピントを合わせることができるか否かを基準に表示しており、一方、二次元コードの全体が読めるか否かの基準を考慮すると、上端および下端の領域が含まれないからである。具体的には、バーの上端のセルが判別可能かどうかで決まり、下端は二次元コード全体が読み取り可能かどうかで決まる。以上の項目は接写リングの組み合わせに依存するので、「合焦点範囲」表示欄40で異なるバーを選択すると、新たに選択されたバーが赤色で示されると共に、このバーに対応する情報に「接写リング組み合わせ」欄41、取付条件詳細表示欄39の表示が更新される。
【0127】
また取付条件詳細表示欄39の「視野:10mm×10mm」は、現在の視野を表す。ここで「合焦点範囲」表示欄40において任意の位置でマウスをクリックすると、クリックされた位置における視野、すなわち「合焦点範囲」表示欄40の縦軸に対応する位置を取り付け距離とした場合の視野を計算し、表示する。このように視野の大きさは取り付け距離に依存する。
【0128】
さらに「取り付け距離:66mm」は、読み取り対象からレンズの前端までの距離を表す。また上記同様「合焦点範囲」表示欄40でマウスをクリックすると、クリックされた位置での「合焦点範囲」表示欄40の縦軸に対応する距離が表示される。
【0129】
さらにまた、「ピント目盛:0.3m」とは、レンズに付けられたピントリングの目盛りを0.3mに合わせるとピントが合うことを意味する。この項目についても、「合焦点範囲」表示欄40でマウスをクリックすると、クリックされた位置に応じた値が計算され、表示される。この実施例では、0.3m〜∞mまでの範囲でピントが合うレンズを使用するため、この項目で表示される値は0.3m〜∞mの範囲となる。この項目は接写リングの組み合わせと取り付け距離に依存する。
【0130】
さらにまた「画素/セル:5」とは、現在設定されている取り付け距離では二次元コードの1セルがCCDの5画素に割り当てられることを意味する。この項目についても、「合焦点範囲」表示欄40でマウスをクリックすると、クリックされた位置に合わせた値が計算され、表示される。「合焦点範囲」表示欄40の下方付近をクリックすると値が大きくなり、逆に「合焦点範囲」表示欄40の上方をクリックすると値が小さくなる。この項目も取り付け距離に依存する。
【0131】
以上の取付条件詳細表示欄39で表示される各パラメータの演算は、以下のようにして行われる。
[視野]
(1)取付距離Oに基づいて倍率Mを求める。倍率Mは、M=−f/(2f+ΔH−d−O)で演算され、この式においてfは焦点距離、ΔHはレンズの主点間距離、dはレンズ長である。
【0132】
(2)倍率Mから視野Vx,Vyを求める。ここで視野VxはVx=s×n/Mで演算され、この式においてsはCCDの画素サイズ(mm)、nはCCDのx方向画素数、Mは倍率である。また視野VyはVy=s×n/Mで演算され、この式においてsはCCDの画素サイズ(mm)、nはCCDのy方向画素数、Mは倍率である。
【0133】
[ピント目盛り]
(1)倍率Mに基づいて実効接写リング厚f・Mを求める。
(2)実効接写リング厚f・Mと実際に使用する接写リング厚lringからピントリングでカバーする長さlpintを求める。ここでlpint=f・M−lringである。
(3)lpintから、ピント目盛りの値pを求める。ピント目盛りは0.1m単位で表示し、5mより大きいときは∞とする。ここでピント目盛りの値pは、p=f2/lpint+2f+ΔH+lpintで演算される。
【0134】
[割り当て画素(画素/セル)]
(1)倍率M、CCDの画素サイズs、ワーク上でのセルサイズSに基づいて割り当て画素数mを求める。求めた値は小数点以下を切り捨て、整数値で表示する。画素数mは、m=M×S/sで演算され、この式においてsはCCDの画素サイズ(mm)、Sはワーク上でのセルサイズ(mm)である。
【0135】
さらに「視野に対するコードの比率」欄42として、視野全体のどのくらいの領域を使って二次元コードが表示されるかを表示させることもできる。目安としては、二次元コードの全体が視野の中央付近で1/3以上の領域で表示されていることが好ましい。ユーザは視野に対するコードの比率を参照しながら、二次元コードの全体が視野に収められていると共に、可能な限り大きく表示される用に設定する。以上のようにして、本プログラムはカメラを取り付ける高さはどのくらいが適当か、接写リングの厚みはいくらにすべきか、ピントリングの目盛はいくつに合わせるのが適当かといった条件を、ユーザに代わって自動的に演算して表示してくれる。
【0136】
[取付イメージ]
またステップS2においては、図14に示すように取付イメージ43を表示させることもできる。これによって、演算された各値が二次元コード読取動作装置のいずれの部位に当たるかをユーザに判りやすく表示でき、特に二次元コードの設定に不慣れなユーザにも視覚的に調整すべき箇所を示すことにより、設定を容易にすることができる。イメージ表示可能な項目としては、演算に係るカメラ取付距離、接写リングのタイプ、ピントリングの目盛の目安、二次元コードのシンボルの縦横のサイズ、一セルのサイズ、二次元コードを印刷した二次元コードラベルの縦横のサイズ、ワークの位置決め精度や視野とシンボルの大きさの関係などがあり、これらの全部あるいは一部、選択された部分のみを表示することもできる。また、各部に入力あるいは演算された数値を表記しても良いし、表示される部位毎に色を変えて表示してもよい。さらに図14の取付イメージ43を図10、図11の設定画面と並べて表示し、図10、図11中の設定項目や演算結果に対応する図14の部位を同じ色で表示させることもできる。さらにまた、図10、図11で選択中の項目を図14中で反転、点滅、太字、赤文字などハイライトさせて表示する、あるいは逆に図14中で選択した部位に対応する項目や数値を図10、図11中でハイライト表示させるなどの方法も利用できる。あるいはまた、演算されたサイズに応じてイメージ表示されるサイズの大きさを変更させたり、選択された二次元コードの種別が変わるとイメージ表示された二次元コードのサンプルもこれに応じて変化するようにしても良い。さらに、取付方法を動画で表示させたり音声で各部位の解説や取付方法を説明するなどのガイダンス機能を付加してもよい。このようなイメージ表示によって、初心者でも設定を容易に行えるように補助することができる。
【0137】
(ステップS3 二次元コード読取動作設定)
図15〜図20に二次元コード読取装置本体の動作を設定する画面イメージを示す。この画面では、読取コードの設定、読取動作の設定、出力の設定、予知保全情報に関する設定、通信の設定、その他の設定を各タブ毎に切り替えて行う。以下、それぞれについて説明する。なお、ここでは二次元コード読取装置自体のハードウェア的な動作を設定するものであり、上記ステップS1、S2のような使用条件に合わせた設定とは別個に行われる。したがって、説明の便宜上ステップS3となっているものの、上述のとおり本来的に上記ステップS1、S2と独立に設定することができるものであり、その設定順序はステップS1、S2の後に限られず、これより前でも、また最中でもよい。
【0138】
図15の画面では「読取コード」44を設定する。まず読取コードとして読取対象の二次元コードの種別を「読取コードの設定」欄45で選択する。二次元コード読取装置の仕様に応じて選択可能な二次元コードの種別が列挙され、ユーザは所望の種別を複数選択することが可能である。処理能力や速度などは二次元コード読取装置の仕様に依存する。一般に多くの種類の二次元コードを設定すると読取に時間がかかるので、読取処理時間を短縮するには不要な二次元コードのチェックを外して読み取る読取コードを限定する。
【0139】
選択された二次元コードの種別に応じて、さらに詳細設定が可能である。例えばQRコードを選択したとき、別ウィンドウでQRコードの詳細設定画面が表示され、読取対象のQRコードのバージョン数を上限、下限を指定して限定する、連結コードの編集モードが可能か否かなどを設定できる。あるいは、データマトリクスを選択したときは、セル数や視野を限定することができる。セル数を限定する場合は、セル数の上限、下限を指定し、視野を限定する場合は視野の頂点座標として例えば左上の座標、右下の座標を(1,1)、(640,480)のように指定する。
【0140】
さらに「二次元コードの印字状態」指定欄46として、白黒反転や表裏反転が指定でき、さらに印字パターンとしてノーマル、ドットなどを選択する。また、「読取コードの設定」欄45で「その他のコード」を選択してチェックを入れると、右側の「その他のコードの詳細設定」欄47がグレーアウトから入力可能となり、各々の項目を設定できる。ここでの設定によって、様々な種類の二次元コードやバーコードを読取対象として設定できる。
【0141】
また、図15〜図20まではいずれも設定内容を送受信することができる。送受信先は二次元コード読取動作本体に備えられたメモリ1〜4であり、各々別個のデータを保持することができる。各画面において送受信先50を選択して「設定送信」ボタン48を押下すると設定内容が指定された先に送信され、また「設定受信」ボタン49を押下すると、指定先から設定内容が取り込まれる。
【0142】
図16では、「読取動作」タブ51で読取動作の設定を行う。ここでは、「読取モード」設定欄52でシングルラベルについてはレベルトリガ、エッジトリガ、ソフトトリガのいずれかを選択し、マルチラベルではレベルトリガか連続かを選択する。また「読取モードの詳細」53として、「入力時定数」、「ワンショット時間」、「トリガONコマンド」、トリガOFFコマンド」、「2度読み防止時間」を必要に応じて指定する。さらに、「2値化の詳細」ボタン54が押下されると、図27に示す「2値化オプション」画面83が別ウィンドウで開き、2値化方式、A/D変換基準値、デジタルスムージングサイズ、ドットパターン設定などが設定可能となる。通常の動作ではこれらの設定を変更する必要はない。
【0143】
図17の「出力」タブ55では出力の設定を行う。ここでは「出力タイミング」56として読取後、トリガOFF後のいずれかを選択し、さらにOK端子出力、NG端子出力、読取エラーコード出力の有無を設定する。また「転送データの詳細」ボタン57を押下すると、「転送データの詳細」設定画面が別ウィンドウで開き、「シンボル識別子の転送」、「桁数の転送」、「区切りキャラクタの転送」、「BCCの転送」の有無をそれぞれチェックボックスのON、OFFにより選択する。
【0144】
図18の「予知保全情報」タブ58では、予知保全情報の設定を行う。予知保全情報(Preventive Maintenance Information:PMI)とは、二次元コードの読取の安定度を示す指標である読取安定度であり、二次元コードの明暗を構成する領域でそれぞれのコントラストを調べ、所定の安定度閾値と比較することで読取が安定して行われているか否かを判定する。図18の例では、「PMI端子出力」欄59で予知保全情報をPMI端子から出力するか否かを設定する。PMI端子は予知保全情報を出力する専用のI/O端子であり、読取安定度出力回路8に相当する。
【0145】
また「予知保全情報(PMI)」設定欄60では、二次元コードを読み取った復号データに予知保全情報を付加するか否かを設定する。ここにチェックを入れた場合は予知保全情報が復号化処理したデータに付加され、シリアル入出力部13からシリアルデータとして転送される。上記PMI端子からの出力と、シリアル入出力部13からの出力を共に選択することもできる。
【0146】
さらに「予知保全情報(PMI)」設定欄60は、上限安定度閾値である予知保全設定値1および下限安定度閾値である予知保全設定値2を入力する。それぞれの予知保全設定値には、二次元コードを読み取った明暗のコントラストが悪くなって読取の安定度が低下したと判断される基準値を、ユーザが使用環境に応じて決定し入力される。この例では2つの安定度閾値による3段階評価で二次元コード読取の安定度を評価する。
【0147】
図19の「通信」タブ61は通信設定画面を示す画面イメージである。ここでは、二次元コード読取装置がホストシステムと通信を行う際の条件を設定する。この例では、ホストシステムを構成するコンピュータとRS−232Cによりシリアル通信を行う。図19において「通信速度」62は、4800bps、9600bps、19200bps、38400bps、57600bps、115200bpsのコンボボックスから選択する。また「データ長」63は7ビットか8ビットか、「ストップビット」64は1ビットか2ビットか、「パリティ」65はなしか偶数か奇数か、「ヘッダ、ターミネータ」66はSTX、ETX、CR、LFなどの種別をそれぞれ選択する。さらに「フロー制御」67はRTS/CTS制御か、「通信手段」68は無手順かACK/NAKか等をそれぞれ選択する。また「設定終了後、PCの通信設定に反映する」69をチェックすると、これらの設定が自動的にPCの通信設定に反映され、これによって二次元コード読取装置側の通信設定を変更してもホストシステムとの通信を継続することができる。
【0148】
さらに図20は「その他」タブ70によるその他の設定画面である。ここでは「外部照明出力」71としてコンボボックスより「なし」、「常時OFF」、「常時ON」、「トリガ同期ON」、「トリガ同期OFF」のいずれかから選択する。さらに「ブザー鳴動許可」、「読取データの表示」の可否をチェックボックスにより選択する。さらにまた「画像保存の設定」72として、取得された画像データの保存条件を設定する。この例では最大10画面まで保存することができ、NG画像のみ保存、OK画像のみ保存、全画像保存のいずれかから選択する。
【0149】
(ステップS4 読取調整)
図21および図22に読取調整画面を示す。この画面では、実際に二次元コードラベルを二次元コード読取装置にセットした状態で動作させて、読取テストを行うことが可能である。さらに、二次元コードをセットする前に照度分布テストを実行することもできる。このように二次元コード読取装置は、読取動作確認を行うための読取テストモードと、カメラの視野における照度分布状態を確認するための照度分布確認モードを備えている。この二次元コード読取装置は、読取テストモードと照度分布確認モードを実行するための読取調整手段を備えている。読取調整手段は、図1のブロック図に示す演算回路によって実現され、図21、図22で示すように、画面左下の「読み取り調整ボタン」を選択することによって読取調整画面となり、この画面からこれらのモードを操作することができる。まず読み取りテストモードについて説明する。
【0150】
[読取テストモード]
読取テストモードでは、二次元コード読取装置が実際に二次元コードラベルに対して連続して読み取り動作を行い、所定の試行回数毎にテスト結果を表示する。さらにこの動作を複数回繰り返して、テスト結果を一覧表示する。
図21および図22において「設定...」ボタン73を押下すると、図23に示す「読取テストの設定」画面74が別ウィンドウで開き、「デコード時間制限」、「試行回数」が指定可能となる。また「表示データ」設定欄75において、読取テストの結果として図21、図22の読取テスト結果表示欄79に表示される表示データに含めたい項目として、「読取データ」、「読取率」、「平均読取時間」、「最長読取時間」、「平均コントラスト」、「最低コントラスト」を選択でき、それぞれの項目毎にチェックボックスをチェックすることで表示データに付加される。また「表示データ」設定欄75の下段には、選択された表示データのサンプル76が表示され、各項目のチェックボックスをON、OFFすることで、これに応じて表示サンプルも変化し、現在選択された表示データがどのような形で表示されるかを確認できる。
【0151】
また図21、図22の「表示形式」指定欄77において、取得したデータを「生データ」で表示させるか「2値化データ」で表示させるかを選択する。このようにして読取テストの設定を行い、さらに実際に二次元コード読取装置に二次元コードをセットした後「テスト開始」ボタン78を押下すると、読取テストを行う確認画面が開き、「視野内に二次元コードを置き、ピント、絞り、照明の位置を調節して下さい。」とのメッセージが表示される。ここでOKボタンを押下すると二次元コードの読取が開始される。二次元コード読取装置設定プログラムは「テスト開始」ボタン78が押下されると、連続して読み取りテストを行い、上記「読取テストの設定」画面74で指定された試行回数(デフォルト10回)の試行の度にテスト結果を1行に表示し、これを繰り返して読取テスト結果表示欄79に表示する。
【0152】
図21は読取率が高い場合、図22は読取率が低い場合の例をそれぞれ示している。これらの図では、読取テスト結果表示欄79に表示される情報として、左から読み取りデータ、読み取り率、平均読取り時間、最長読取り時間、平均コントラスト、最低コントラストが表示される。読み取り率が100%となるのが読み取り安定の目安となる。読取結果の良好な図21と比べ、読取結果の低い図22では、読取率が低い場合が増えると共に、読み取り時間が長く、コントラストも低くなっていることが判る。このように、設定された条件の下で実際に読取を行って読取率や読取時間などの情報を表示させることができ、読取の安定度を知ることができる。よってユーザは、読取テストを行って安定した条件に設定することができる。
【0153】
[照度分布確認モード]
次に照度分布確認モードについて説明する。照度分布確認モードは、二次元コード読取装置に二次元コードや二次元コードを含むワークをセットしない状態で照明部を動作させて照明をあて、撮像部にて取得した画像データからバックグラウンドの照度の分布を確認する照度分布テストを実行するためのモードである。図21および図22において、メニューの「読み取り調整(T)」→「照度分布テスト」を選択すると、照度分布テストを行う確認画面が開き、「照度分布テストを行います。」とのメッセージが表示される。ここでOKボタンを押下すると、実際に二次元コードに照明を照射した状態での照度分布が測定され、測定結果を示す照度分布画面80が別ウィンドウにて表示される。照度分布テストの結果の一例を図24〜図26に示す。図24および図25は良い例、図26は悪い例をそれぞれ示す。これらの図において、左側の照度分布表示欄81では視野をブロック状に分割し照度分布を表示している。各ブロック毎に平均照度として平均明度を演算し、右下に表示されるスケールのように、照度が明るいほど白く、暗いほど黒くなるよう照度を段階的に色を変えて表示する。
【0154】
また右側には「推奨パターン」82として、好ましい照度分布の例を示している。この推奨パターン82を参考にして、設定を変更しながら照度分布確認テストを繰り返し、照度分布表示欄81にて確認することによって照度分布のパターンを推奨パターンに近付けるように設定できる。図24では十分に明るい照度で均一に分布しており、また図25では右側に若干照度が劣る部分があるものの、十分な照度が得られている。一方図26では、全体に暗く十分な照度が得られていない。よって図26のような照度分布が表示された場合は、推奨パターンに近付けるように照明の光量や取付位置、角度などを調整する。調整された状態で再度照度分布テストを行って、照度分布が改善されたかどうかを確認する。このようにして、ユーザは照度分布を確認しながら照明の調整を行うことができる。
【0155】
この例では、取得された横640×縦480画素の画像データを、横64×縦48画素とする矩形状のブロックで分割し、縦10×横10個のブロック毎に照度の平均を測定している。このブロックは、画像データの二値化方式におけるブロックと対応している。
【0156】
[二値化方式]
画像データのアナログ信号を二値化する二値化方式には、様々な方法がある。図16の画面において、「2値化の詳細」ボタン54を押下すると図27の「2値化オプション」画面83が表示され、「二値化方式」設定欄84にて二値化方式を選択、設定することができる。この例では、分割二値化1、分割二値化2、固定のいずれかが選択できる。
【0157】
「分割二値化1」とは、上述のように画像データを複数のブロック(例えば16×16画素)に分割し、各ブロックの平均明度および画像全体の固定閾値に基づいて二値化する方法である。画像全体の固定閾値は、後述するように二次元コード読取装置が自動的に演算し、ユーザは指定する必要がない。この方式は、明度ムラおよび背景ノイズのいずれもが比較的多い場合に用いられる。それぞれのムラやノイズが多い場合は、ムラやノイズに応じて以下のいずれかの方式が好ましい。
【0158】
また「分割二値化2」とは、画像データを複数のブロックに分割し、各ブロックの平均明度に基づいて二値化する方法である。この方式では、ブロック毎に明度のヒストグラムを求めて平均明度を演算しており、各ブロックで二値化の閾値が変わる。この方式は、明度ムラが多く、背景ノイズが少ない場合に用いられる。このような分割二値化は、画像全体の固定閾値に基づく二値化では問題があるような場合に効果的である。例えば照明が均一に照射されず、取得された画像データに明るい部分と暗い部分が偏在するようなグラデーションが生じている場合、画面全体に基づいて二値化を行うと偏りが生じてしまい正しく二値化できない事態が生じる。このような場合に画像を分割してそれぞれの領域で二値化の閾値を設定してやることによって、正しく二値化データが得られる。
【0159】
一方、「固定」とは、画像データ全体を一定の固定閾値で二値化する方法である。この方式では、上記「分割二値化1」と異なり、ユーザが固定閾値を直接指定することができる。図27の画面において「固定」を選択すると、「二値化レベル」入力欄85がグレーアウトから入力可能な状態となり、「二値化レベル」として固定閾値をユーザが入力する。この方式は、明度ムラが少なく、背景ノイズが多い場合に用いられる。
【0160】
固定閾値は、ユーザが直接指定する他、二次元コード読取装置に演算させることもできる。固定閾値は例えば画像全体の明度の分布を示すヒストグラムから算出することができる。ヒストグラムより、明部(白)と暗部(黒)のそれぞれの中心的な明度を求めることができ、この差のコントラストを上述の読取安定度の指標として利用することもできる。この例で固定閾値を演算させるには、図21、18の読取調整画面においてメニューの「読み取り調整(T)」から「二値化レベル自動検出」を選択する。すると、「二値化方式を固定にするときの適切な二値化レベルを自動検出します。視野内に二次元コードを置き、ピント、絞り、照明の位置を調節して下さい。」とのダイヤログボックスが表示され、OKを押下すると二値化レベル自動検出が実行される。「二値化レベル自動検出中 二値化レベルを自動検出しています。しばらくお待ち下さい。」とのメッセージが表示され、1分程度で最適な固定閾値が算出される。必要に応じて画面に演算値を表示し、さらに固定閾値として自動的に設定させることもできる。
【0161】
このように様々な二値化方式が存在しており、ユーザは二次元コード読取装置の使用条件に応じて適切な二値化方式を選択する。その際に、上述の動作テストおよび照度分布確認が有効となる。すなわち、二次元コード読取装置を運用する前に、まず照度分布を確認し、その上で実際に二次元コードの読取を試験することで、最適な二値化方式が選択されているか否かを事前に確認することができるのである。また、各二値化方式においても、各々の設定値をさらに最適な値に調整することができる。さらにまた二値化方式以外の上述した各読取条件についても適切な値に設定することができる。例えばステップS4の読取テストの結果、読取安定度が悪いことが判明すると、上記ステップS2に戻りこのような問題点を改善するような設定に変更、調整することができる。そして変更された条件で再度読取テストを行い、安定した読取ができるようになることが確認できれば設定を終了する。このように読取試行の結果をフィードバックさせることでより好ましい条件を模索し、さらに試行するという動作を繰り返しながら最終的には最適な条件に調整し、また読取精度の向上あるいは読取処理速度の向上といった所望の目的に応じた二次元コードの読取条件に設定することが可能となる。さらに、二次元コード読取装置の導入や運用前にテストを行い、実際に二次元コードを読み取らせて読取安定度などを確認できることで、運用開始後に読取率が不十分であることが判明するといったトラブルを未然に防止できるというメリットもある。
【0162】
【発明の効果】
以上説明したように、本発明の二次元コード読取装置、二次元コード読取方法、二次元コード読取プログラムおよびコンピュータ読取可能な記録媒体は、読取安定度を出力することによって、二次元コードの読取が成功している状態であっても、どの程度の安定度をもって読取が行われたのかを知ることができ、安定度の低下を事前に察知することができる。これによって、読取安定度の低下に対し必要な対策を講じることができ、突然二次元コードが読取不能になる事態を回避することができる。
【図面の簡単な説明】
【図1】本発明の一実施例に係る二次元コード読取装置の構成を示すブロック図である。
【図2】様々な二次元コードの例を示す概略図である。
【図3】本発明の実施例1に係る二次元コード読取方法の手順の一例を示すフローチャートである。
【図4】本発明の実施例1に係る二次元コード読取方法の手順の他の例を示すフローチャートである。
【図5】本発明の実施例1に係る二次元コード読取方法の手順の他の例を示すフローチャートである。
【図6】本発明の実施例1に係る二次元コード読取方法の手順の他の例を示すフローチャートである。
【図7】二次元コードの仕様決定ステップにおける二次元コードの仕様を決定する画面を示すイメージ図である。
【図8】二次元コードの仕様決定ステップにおける二次元コード詳細設定画面を示すイメージ図である。
【図9】二次元コードの仕様決定ステップにおける印字の詳細設定画面を示すイメージ図である。
【図10】カメラ取付条件の設定におけるシンボルの大きさの計算ボタンのないカメラの取付条件を決定する設定画面を示すイメージ図である。
【図11】カメラ取付条件の設定におけるシンボルの大きさの計算が可能なカメラの取付条件を決定する設定画面を示すイメージ図である。
【図12】カメラ取付条件の設定におけるシンボルの大きさの計算設定画面を示すイメージ図である。
【図13】カメラ取付条件の設定におけるカメラ取付条件の詳細を示すイメージ図である。
【図14】カメラ取付条件の設定における取付イメージを示すイメージ図である。
【図15】二次元コード読取装置の動作設定における読取コードの設定画面を示すイメージ図である。
【図16】二次元コード読取装置の動作設定における読取動作の設定画面を示すイメージ図である。
【図17】二次元コード読取装置の動作設定における出力の設定画面を示すイメージ図である。
【図18】二次元コード読取装置の動作設定における予知保全情報の設定画面を示すイメージ図である。
【図19】二次元コード読取装置の動作設定における通信の設定画面を示すイメージ図である。
【図20】二次元コード読取装置の動作設定におけるその他の設定画面を示すイメージ図である。
【図21】読取調整画面における読取テストの結果、読取率が高い例を示すイメージ図である。
【図22】読取調整画面における読取テストの結果、読取率が低い例を示すイメージ図である。
【図23】読取調整画面における読取テストの設定画面を示すイメージ図である。
【図24】読取調整画面における照度分布テストの結果、照度分布が良い一例を示すイメージ図である。
【図25】読取調整画面における照度分布テストの結果、照度分布が良い他の例を示すイメージ図である。
【図26】読取調整画面における照度分布テストの結果、照度分布が悪い一例を示すイメージ図である。
【図27】二次元コード読取装置の動作設定における2値化オプション画面を示すイメージ図である。
【符号の説明】
1・・・復号部
2・・・撮像部
3・・・照明部
4・・・カメラ
5・・・レンズ
6・・・画像処理回路
7・・・演算回路
8・・・読取安定度出力回路
9・・・制御部
10・・・画像処理部
11・・・復号処理部
12・・・読取安定度決定部
13・・・シリアル入出力部
14・・・ホストシステム
15・・・二次元コード
16・・・「コード種別」指定欄
17・・・二次元コードサンプル表示欄
18・・・「データ種別」指定欄
19・・・「詳細...」ボタン
20・・・二次元コード詳細設定画面
21・・・「データ量」指定欄
22・・・「印字可能スペース」指定欄
23・・・「計算開始」ボタン
24・・・計算結果表示欄
25・・・「印字の詳細」ボタン
26・・・印字の詳細設定画面
27・・・「二次元コードの仕様」
28・・・「二次元コードラベルの位置ずれ許容範囲」
29・・・「印字パターン」
30・・・「希望取付距離」
31・・・スライダ
32・・・「シンボルの大きさ」入力欄
33・・・「シンボルの大きさの計算」ボタン
34・・・「シンボルの大きさの計算」設定画面
35・・・「計算開始」ボタン
36・・・「取付仕様」表示欄
37・・・「取付条件の詳細」ボタン
38・・・カメラ取付条件の詳細画面
39・・・取付条件詳細表示欄
40・・・「合焦点範囲」表示欄
41・・・「接写リング組み合わせ」欄
42・・・「視野に対するコードの比率」欄
43・・・取付イメージ
44・・・「読取コード」
45・・・「読取コードの設定」欄
46・・・「二次元コードの印字状態」指定欄
47・・・「その他のコードの詳細設定」欄
48・・・「設定送信」ボタン
49・・・「設定受信」ボタン
50・・・送受信先
51・・・「読取動作」タブ
52・・・「読取モード」設定欄
53・・・「読取モードの詳細」
54・・・「2値化の詳細」ボタン
55・・・「出力」タブ
56・・・「出力タイミング」
57・・・「転送データの詳細」ボタン
58・・・「予知保全情報」タブ
59・・・「PMI端子出力」欄
60・・・「予知保全情報(PMI)」設定欄
61・・・「通信」タブ
62・・・「通信速度」
63・・・「データ長」
64・・・「ストップビット」
65・・・「パリティ」
66・・・「ヘッダ、ターミネータ」
67・・・「フロー制御」
68・・・「通信手段」
69・・・「設定終了後、PCの通信設定に反映する」
70・・・「その他」タブ
71・・・「外部照明出力」
72・・・「画像保存の設定」
73・・・「設定...」ボタン
74・・・「読取テストの設定」画面
75・・・「表示データ」設定欄
76・・・表示データのサンプル
77・・・「表示形式」指定欄
78・・・「テスト開始」ボタン
79・・・読取テスト結果表示欄
80・・・照度分布画面
81・・・照度分布表示欄
82・・・「推奨パターン」
83・・・「2値化オプション」画面
84・・・「二値化方式」設定欄
85・・・「二値化レベル」入力欄
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a two-dimensional code reading device, a two-dimensional code reading method, a two-dimensional code reading program, and a computer-readable recording medium.
[0002]
[Prior art]
Today, various symbols such as barcodes and two-dimensional codes are used in fields such as product management. A bar code is also called a one-dimensional code, a linear code, or the like. It is possible to express information such as alphanumeric characters by a bar portion and a blank portion by linearly arranging stripes of various widths adjacent to each other. Express the code. On the other hand, a two-dimensional code is also called a two-dimensional symbol, a two-dimensional barcode, or the like, and is a symbol in which information is arranged vertically and horizontally, has a high information density, and can store more information than a barcode. The feature is that the error can be corrected because it is a redundant code. In order to read such a barcode or a two-dimensional code, a barcode scanner or a two-dimensional code reader is used as an optical information reader.
[0003]
[Problems to be solved by the invention]
However, in the conventional two-dimensional code reader, the reading stability cannot be known, and even if the reading performance of the two-dimensional code reader gradually deteriorates, the state cannot be grasped. In some cases, reading became impossible, causing an unexpected system down. During operation, the reading stability of the two-dimensional code reading device and the two-dimensional code reading system deteriorates due to deterioration of the printing or engraving of the two-dimensional code, contamination of the lens, deterioration of the illumination device, light receiving element, etc. I do. However, the conventional two-dimensional code reader does not output the reading stability upon successful reading to the outside, so that it was not possible to detect a decrease in the reading stability in advance. For this reason, in the system using the conventional two-dimensional code reader, the user can know even if the reading performance is reduced due to the decrease in the light intensity of the illumination or the deterioration of the printing of the two-dimensional code as described above. As a result, the system suddenly becomes unreadable during the operation of the system. When such a situation occurs, the entire system to which the two-dimensional code reader is connected is stopped, and the two-dimensional code reader can be read to restore the system, such as replacing or resetting the lighting lamp. It is necessary to perform an operation to recover the state. On the user side, since such an unexpected system down is a great loss, it is possible to detect in advance the decrease in the reading ability of the two-dimensional code reader and take necessary measures before the reading becomes impossible. It is desirable to do so.
[0004]
The present invention has been made in view of such a problem. A main object of the present invention is to provide a two-dimensional code reader capable of detecting the reading stability of a two-dimensional code reader, a two-dimensional code reading method, a two-dimensional code reading program, and a computer-readable recording medium. is there.
[0005]
[Means for Solving the Problems]
In order to solve the above object, a two-dimensional code reader according to claim 1 of the present invention includes an imaging unit for acquiring an image including a two-dimensional code, and an illumination unit for acquiring an image by the imaging unit. And a decoding unit that can be connected to an illumination unit for providing the image data and decodes the two-dimensional code by performing image processing on the image data acquired by the imaging unit. This two-dimensional code reading device calculates a contrast of shading in a predetermined reading stability determination area in a two-dimensional code, and compares the calculated contrast with a predetermined stability threshold to determine reading stability. It is characterized by including a determining unit.
[0006]
The two-dimensional code reading device according to a second aspect of the present invention, in addition to the features described in the first aspect, further includes a predetermined reading stability determination area for calculating the contrast of light and shade. It is a region in which the positional relationship between the dark portion and the light portion is predetermined.
[0007]
Furthermore, in the two-dimensional code reading device according to a third aspect of the present invention, in addition to the features described in the first aspect, the predetermined reading stability determination area for calculating the contrast of the light and shade is a two-dimensional code reading device. Finder pattern, timing pattern, timing cell, alignment pattern, format information, separator, margin, or a combination of two or more of these.
[0008]
On the other hand, a two-dimensional code reading device according to a fourth aspect of the present invention, in addition to the features described in the first aspect, further includes a predetermined reading stability determination area for calculating the contrast of light and shade. Is a finder pattern for cutting out a symbol from an image image containing.
[0009]
In the two-dimensional code reading device according to a fifth aspect of the present invention, in addition to the features described in the first aspect, the predetermined reading stability determination area for calculating the contrast of the light and shade is a two-dimensional code reading device. Are all the regions included in.
[0010]
Furthermore, in the two-dimensional code reader according to claim 6 of the present invention, in addition to the features described in any one of claims 1 to 5, the two-dimensional code reader further includes the reading stability determination. A reading stability output section that outputs a reading stability decrease signal that indicates a decrease in reading stability when the reading stability calculated by the section falls below a predetermined warning threshold. Thus, it is possible to warn that the reading stability has decreased. As a method of outputting the reading stability, there are a method using a dedicated I / O terminal, a method of adding reading stability to the decoded data, and transferring the data as serial data.
[0011]
Furthermore, a two-dimensional code reading method according to claim 7 of the present invention is a method for decoding information encoded in a two-dimensional code. This two-dimensional code reading method includes a step of obtaining an image including the two-dimensional code by the imaging unit, a step of A / D converting the obtained image data, and a step of obtaining a two-dimensional code from the A / D converted image data. A step of cutting out a region, a step of judging a cell boundary from the cut-out image data of the two-dimensional code and dividing the cell into cells, and a step of binarizing or multi-leveling the image data of each cell based on a predetermined threshold value And a step of performing a decoding process on the binarized or multi-valued data. The two-dimensional code reading method further includes calculating a contrast of light and shade of the A / D converted data in a predetermined reading stability determination area of the two-dimensional code, and comparing the light and dark contrast with a predetermined stability threshold. And determining and outputting the reading stability as an index indicating the reading stability of the two-dimensional code.
[0012]
Still further, in the two-dimensional code reading method according to the eighth aspect of the present invention, in addition to the feature described in the seventh aspect, the predetermined reading stability determination area may include a dark portion in the two-dimensional code. It is a region where the positional relationship with the light portion is predetermined.
[0013]
Furthermore, in the two-dimensional code reading method according to the ninth aspect of the present invention, in addition to the feature described in the seventh aspect, the finder pattern in which the predetermined reading stability determination area is included in a two-dimensional code , Timing pattern, timing cell, alignment pattern, format information, separator, margin, or a combination of two or more of these.
[0014]
Furthermore, in the two-dimensional code reading method according to the tenth aspect of the present invention, in addition to the feature described in the seventh aspect, the predetermined reading stability determination area may include an image including a two-dimensional code. It is characterized in that it is a finder pattern for extracting a symbol from.
[0015]
Still further, in the two-dimensional code reading method according to claim 11 of the present invention, in addition to the features described in claim 7, all of the predetermined reading stability determination areas are included in the two-dimensional code. It is a region.
[0016]
Further, in the two-dimensional code reading method according to the twelfth aspect of the present invention, in addition to the feature according to any one of the seventh to eleventh aspects, the step of calculating the reading stability includes a step of decoding data. It is characterized in that it is performed after the step of performing processing.
[0017]
Furthermore, in the two-dimensional code reading method according to the thirteenth aspect of the present invention, in addition to the feature according to any one of the seventh to eleventh aspects, the step of calculating the reading stability includes a step of decoding data. It is characterized in that it is performed before the step of performing processing.
[0018]
Furthermore, in the two-dimensional code reading method according to claim 14 of the present invention, in addition to the feature according to any one of claims 7 to 11, the step of calculating the reading stability includes the step of: Is performed prior to the binarization or multi-value conversion step.
[0019]
Furthermore, in the two-dimensional code reading method according to claim 15 of the present invention, in addition to the features described in any one of claims 7 to 11, the step of calculating the reading stability includes the step of: It is characterized in that it is performed before the dividing step.
[0020]
Furthermore, in the two-dimensional code reading method according to claim 16 of the present invention, in addition to the features described in any one of claims 7 to 15, the two-dimensional code reading method used in the step of calculating the reading stability is used. The threshold value can be set arbitrarily by a user.
[0021]
Furthermore, in the two-dimensional code reading method according to claim 17 of the present invention, in addition to the features described in any one of claims 7 to 15, the two-dimensional code reading method used in the step of calculating the reading stability is used. The two-dimensional code reader can automatically calculate and set the threshold value.
[0022]
Further, in the two-dimensional code reading method according to claim 18 of the present invention, in addition to the feature according to any one of claims 7 to 11, the step of calculating the reading stability includes the step of: An average value, a mode value, or a total value of contrasts of light and shade at a plurality of coordinate positions included in the reading stability determination area are compared with the threshold value.
[0023]
Furthermore, a two-dimensional code reading method according to claim 19 of the present invention is characterized in that, in addition to the features described in any one of claims 7 to 18, the threshold has a plurality of thresholds. .
[0024]
Furthermore, in the two-dimensional code reading method according to claim 20 of the present invention, in addition to the features described in any one of claims 7 to 18, the output of the reading stability is evaluated by a predetermined step evaluation. There is a feature.
[0025]
Still further, a two-dimensional code reading method according to claim 21 of the present invention is a two-dimensional code reading method for decoding information encoded in a two-dimensional code, wherein the two-dimensional code is read by an imaging unit. Acquiring an image including the image, A / D converting the acquired image data, cutting out a two-dimensional code area from the A / D converted image data, and generating a cell from the cut-out two-dimensional code image data. Determining the boundary of, and dividing the image data of each cell into binarized or multi-valued based on a predetermined threshold, and for the binarized or multi-valued data And performing a decryption process. The two-dimensional code reading method further calculates a contrast of the density of the A / D-converted data in a predetermined reading stability determination area of the two-dimensional code, and uses the calculated contrast as an index indicating the stability of reading of the two-dimensional code. And outputting the reading stability.
[0026]
A two-dimensional code reading method according to claim 22 of the present invention is a two-dimensional code reading method for decoding information encoded in a two-dimensional code, wherein the two-dimensional code is read by an imaging unit. Obtaining an image, A / D converting the obtained image data, cutting out a two-dimensional code area from the A / D-converted image data, and extracting a cell from the cut-out two-dimensional code image data. Judging the boundary, dividing into cells, binarizing or multi-leveling the image data of each cell based on a predetermined threshold, and applying the binarized or multi-leveled data to the image data. Performing a decoding process. The two-dimensional code reading method further includes a step of extracting a two-dimensional code, a step of dividing cells, a step of binarizing or multi-leveling each cell, or a step of two or more of these steps. The method further comprises a step of determining and outputting a reading stability which is an index indicating the stability of reading of the two-dimensional code by comparing the time required for the reading with a predetermined stability reference time.
[0027]
Further, a two-dimensional code reading method according to claim 23 of the present invention is a two-dimensional code reading method for decoding information encoded in a two-dimensional code, wherein the imaging unit includes the two-dimensional code. Obtaining an image, A / D converting the obtained image data, cutting out a two-dimensional code area from the A / D-converted image data, and extracting a cell from the cut-out two-dimensional code image data. Judging the boundary, dividing into cells, binarizing or multi-leveling the image data of each cell based on a predetermined threshold, and applying the binarized or multi-leveled data to the image data. Performing a decoding process. The two-dimensional code reading method further includes a step of determining and outputting a reading stability which is an index indicating the stability of the reading of the two-dimensional code based on the usage rate of the error correction code included in the two-dimensional code. It is characterized by.
[0028]
Still further, a two-dimensional code reading program according to claim 24 of the present invention has a function of acquiring an image including a two-dimensional code by a computer using an imaging unit, a function of performing A / D conversion of the acquired image data, A function of cutting out a two-dimensional code area from the A / D-converted image data, a function of judging a cell boundary from the cut-out two-dimensional code image data and dividing the cell into each cell, and The function of binarizing or multi-leveling based on the threshold value and the function of performing a decoding process on the binarized or multi-leveled data are encoded into a two-dimensional code. This is a two-dimensional code reading program for decoding information. The two-dimensional code reading program further calculates the contrast of light and shade of the A / D converted data in a predetermined reading stability determination area of the two-dimensional code, and compares the light and dark contrast with a predetermined stability threshold. Thus, the function of determining and outputting the reading stability as an index indicating the stability of reading of the two-dimensional code is realized.
[0029]
Still further, a computer readable recording medium according to a twenty-fifth aspect of the present invention records the two-dimensional code reading program according to the twenty-fourth aspect. Recording media include magnetic disks such as CD-ROM, CD-R, CD-RW, flexible disk, magnetic tape, MO, DVD-ROM, DVD-RAM, DVD-R, DVD-RW, DVD + RW, and DVD + R, and optical disks. , A magneto-optical disk, a semiconductor memory, and other media capable of storing programs.
[0030]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, the embodiments described below illustrate a two-dimensional code reading device, a two-dimensional code reading method, a two-dimensional code reading program, and a computer-readable recording medium for embodying the technical idea of the present invention. Therefore, the present invention does not specify a two-dimensional code reading device, a two-dimensional code reading method, a two-dimensional code reading program, and a computer-readable recording medium as follows. Further, the members described in the claims are not limited to the members of the embodiments. Further, the size, positional relationship, and the like of the members illustrated in the drawings may be exaggerated for clarity of description. Further, each element constituting the present invention may be configured such that a plurality of elements are formed of the same member and one member also serves as the plurality of elements.
[0031]
In the present specification, a two-dimensional code reading device, a two-dimensional code reading method, a two-dimensional code reading program, and a computer-readable recording medium are a system for performing two-dimensional code reading and reading setting, and two-dimensional code reading and reading. The present invention is not limited to an apparatus or a method for performing input / output, display, calculation, communication, and other processes related to the reading setting by hardware. An apparatus and a method for realizing the processing by software are also included in the scope of the present invention. For example, by incorporating software, programs, plug-ins, objects, libraries, applets, compilers, modules, macros that operate on specific programs, etc. into general-purpose circuits or computers, the 2D code reading setting itself or related processing can be performed. The enabled device or system also corresponds to the two-dimensional code reading device or the two-dimensional code reading program of the present invention. In this specification, computers include general-purpose or special-purpose computers, workstations, terminals, portable electronic devices, mobile phones such as PDC, CDMA, W-CDMA, FORMA, PHS, PDAs, pagers, smartphones, and the like. Electronic devices. Further, in the present specification, the term “program” is not limited to a program used alone, but may be a mode that functions as a part of a specific computer program, software, service, or the like, a mode that is called when necessary and functions, or an environment such as an OS. , A mode of operating in the environment, a mode of operating in the background, and other support programs.
[0032]
Terminals such as computers used in the embodiments of the present invention, and connections between servers and computers connected thereto for operation, control, input / output, display, various processing, and other peripheral devices such as printers. Performs communication by electrically connecting, for example, a serial connection such as IEEE 1394, RS-232C, RS-422, or USB, a parallel connection, or a network such as 10BASE-T, 100BASE-TX, or 1000BASE-T. The connection is not limited to a physical connection using a wire, but may be a wireless LAN using a wireless LAN such as IEEE802.11b or IEEE802.11a, a radio wave such as Bluetooth, an infrared ray, an optical communication, or the like. Further, as a recording medium for exchanging data and storing settings, a memory card, a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like can be used.
[0033]
[Example 1]
FIG. 1 shows a block diagram of an example of the configuration of the two-dimensional code reader. In the two-dimensional code reader shown in this figure, a decoding unit 1 for decoding a two-dimensional code is a main body of the two-dimensional code reader. An imaging unit 2 for acquiring an image including the two-dimensional code 15 and a lighting unit 3 for providing illumination when the image is acquired by the imaging unit 2 are provided in the main body of the two-dimensional code reading device that is the decoding unit 1. Is connected. The illuminating unit 3 includes a light source such as a plurality of red light emitting diodes (LEDs), and irradiates the two-dimensional code uniformly. The illumination unit 3 is disposed at a position where the two-dimensional code of the target object can be effectively illuminated, and is disposed, for example, near the lens 5 of the imaging unit 2.
[0034]
The imaging unit 2 includes an imaging optical system such as a camera 4 and a lens 5. The imaging unit 2 captures image data of an area including the two-dimensional code label by, for example, image sensing using a CCD image element, and projects the two-dimensional code image on a CCD area sensor to convert the image into an electric signal. The converted signal is developed on a memory inside the imaging unit 2 and is captured as an image. This processing can also be performed by sending it to the main body of the two-dimensional code reader. When a pinhole camera is used, a lens can be omitted.
[0035]
[Decoding unit 1]
The decoding unit 1 which is the main body of the two-dimensional code reader shown in FIG. 1 includes an image processing circuit 6, an arithmetic circuit 7, and a reading stability output circuit 8. The image processing circuit 6 is a circuit for receiving image data acquired by the imaging unit 2 and performing predetermined image processing. The image processing here is, for example, A / D conversion for converting image data including analog density information into a digital signal, for example, converting it into a digital signal of 8-bit 256 gradations.
[0036]
The arithmetic circuit 7 includes a CPU, an MPU, a system LSI, a DSP, dedicated hardware, and the like, and includes a control unit 9 for transmitting an optical system such as the camera 4 and the lens 5 and a signal for controlling the illumination unit 3, and an image processing unit. An image processing unit 10 for further processing the digital signal processed by the circuit 6, a decoding processing unit 11 for decoding a signal binarized or multi-valued by the image processing unit 10, and a reading stability. It comprises a reading stability determining section 12 for determining and a serial input / output section 13 for outputting a decoded signal to the outside.
[0037]
The image processing unit 10 first searches for a finder pattern from the A / D-converted image data, and specifies and cuts out a two-dimensional code area included in the image data according to the finder pattern. Further, the boundaries of the cells are determined from the extracted image data of the two-dimensional code, the cells are divided, and the image data of each cell is binarized based on a predetermined threshold. Binarization detects the type, position, size, origin, inclination, distortion, etc. of the two-dimensional code included in the captured image by image processing, and the lightness and darkness of the cell, which is the minimum unit constituting the two-dimensional code, For example, black and white is acquired as binary data of 1 or 0. It is to be noted that the present invention is not limited to binarized data, and multi-valued data can be used.
[0038]
[Decryption processing unit 11]
The decoding processing unit 11 decodes the binarized or multi-valued data. For decoding, a symbol character table indicating the contrast of encoded data is referred to. Based on the table, it is converted into symbol character data corresponding to the binarized data and decoded. Further, the decryption processing unit 11 verifies whether the decrypted data is correct based on a predetermined check method. If an error is found in the data, correct data is calculated by calculation using an error correction function. The error correction function is determined by the method adopted by the two-dimensional code used.
[0039]
[Reading stability determining unit 12]
On the other hand, the reading stability determining unit 12 calculates the contrast of shading in a predetermined reading stability determining area in the cut-out image data of the two-dimensional code, compares the calculated contrast with a predetermined stability threshold, and To determine. Here, when the two-dimensional code is composed of achromatic black and white, the contrast of shading mainly refers to the difference or ratio of lightness between white and black, but in addition to the difference or ratio of chromaticity and saturation. And the contrast difference is expressed by any or a combination of these. Thereby, it corresponds to a color two-dimensional code. As one method, of the points included in the A / D-converted image data included in the reading stability determination area, a portion determined to belong to white (1) and a portion determined to belong to black (0) The extracted points are each extracted at several points, the average value or the total value of digital signals of density information of each of black and white is obtained, and this difference or ratio is used as contrast. Then, using the contrast, the reading stability which is an index indicating the reading stability of the two-dimensional code is determined. Specifically, as described later, the stability is determined based on the magnitude of a comparison with a predetermined threshold value. As points to be extracted, predetermined coordinate points within the set reading stability determination area are selected in advance. For example, if the finder pattern is a double square of a QR code, the vertices and the outline points of the four corners of the white and black frames are extracted. The number of points to be extracted is a number for which a sufficient average value or total value can be calculated, for example, eight points each for black and white. The method of extracting the several points and determining the contrast based on the average value or the total value can perform high-speed processing with a reduced number of operation steps.
[0040]
Alternatively, as another method, the average value or mode value of each of black and white may be obtained for all points included in the reading stability determination area, and the difference or ratio may be used as the contrast. This method uses all points to calculate the average value or mode value, so that the contrast is accurate.On the other hand, depending on the reading conditions, erroneous reading occurs and the calculation based on the erroneous reading of black and white judgment is performed. Will be done. However, it can be used practically sufficiently under conditions where printing and lighting conditions are good and erroneous reading hardly occurs. The credibility can be determined based on, for example, how much the error correction function has been used.
[0041]
Since the density information cannot be known from the binarized image data, the data before binarization is used here. Note that multi-valued data can be used instead of binarization. If the two-dimensional code is composed of white and black, the contrast of the region determined to be white and the region determined to be black is determined when the color of the two-dimensional code is any other color. Determines the reading stability by examining the contrast of each color such as hue, lightness or saturation. The reading stability determination area is set in advance, and a finder pattern of a two-dimensional code can be used as described later. In an area where a black-and-white or light-dark pattern is predetermined in advance, such as a finder pattern, it is easy to see how much contrast is required.
[0042]
For example, the contrast is compared with a predetermined threshold. If the contrast is larger than the threshold, it is determined that the stability is good. If the contrast is smaller than the threshold, it is determined that the reading stability is lowered. As described above, in addition to the two-step evaluation above and below the threshold, the threshold may be set to two thresholds, an upper threshold and a lower threshold, and the evaluation may be performed in three steps: an upper threshold or more, an upper threshold to a lower threshold, and a lower threshold. Further, three or more threshold values may be provided for multi-stage evaluation.
[0043]
Alternatively, instead of such stepwise evaluation, the reading stability may be quantified by a predetermined algorithm and output. For example, there are a method of calculating the absolute value of the contrast and the threshold and converting the reading stability into 100 points based on the calculated value, and a method of outputting the absolute value as it is as the reading stability.
[0044]
Alternatively, the contrast itself may be output as the reading stability. The contrast is displayed as a value of 0 to 255 when the A / D conversion is performed for, for example, 8-bit 256 gradations. When the contrast itself is used, it is not necessary to separately provide a threshold, and the user determines the reading stability by looking at the contrast.
[0045]
[Threshold setting]
The threshold value is set to an appropriate value according to the environment in which the two-dimensional code is used, such as printing such as PCS (Print Contrast Signal) of the two-dimensional code, engraving state, ambient brightness, and lighting effect. For example, when the two-dimensional code is printed on paper having a large contrast, the threshold is set large, and when the contrast is small, such as when the two-dimensional code is engraved on metal, the threshold is set small. The threshold can be arbitrarily set by the user. The user changes a general threshold value set as a default value to a desired threshold value from a stability threshold value setting unit provided in the two-dimensional code reader. When setting the upper threshold and the lower threshold, the setting is made so that (upper threshold)> (lower threshold). Further, the two-dimensional code reader may be set automatically. In this case, the user inputs a condition for using the two-dimensional code, or the device automatically detects the condition and calculates a threshold value according to the condition inside the device. Further, the threshold value can be automatically adjusted to follow a change in the condition.
[0046]
The reading stability determined by the reading stability determining unit 12 in this manner is sent to the serial input / output unit 13 or the reading stability output circuit 8. As a result, the reading stability is notified, and although the reading of the two-dimensional code itself is possible, the user is notified that the reading stability is reduced. Can be taken, and the two-dimensional code reader can be prevented from suddenly becoming unreadable.
[0047]
[Reading stability output circuit 8]
Further, the reading stability output circuit 8 constitutes a reading stability output unit, is connected to the reading stability determining unit 12, and outputs the reading stability determined by the reading stability determining unit 12 to the outside. In addition to sending the output to the host system 14, a display unit such as a dedicated monitor may be separately provided, and displayed here to notify the user of the reading stability. When the read stability calculated by the read stability determining unit 12 falls below a predetermined warning threshold, the read stability output circuit 8 outputs a read stability decrease signal to notify the decrease of the read stability to the outside and issues a warning. Can also be emitted.
[0048]
The read stability determined by the read stability determiner 12 is obtained by adding the read stability to the decoded data, in addition to the method of outputting the read stability from the read stability output circuit 8 which is a dedicated I / O terminal. However, a method of transferring the data as serial data from the serial input / output unit 13 can also be used. In this case, the reading stability is added from the reading stability determining unit 12 via the decoding processing unit 11 and transmitted to the serial input / output unit 13, and the reading stability is directly transmitted from the reading stability determining unit 12 to the serial input / output unit 13. The degree may be transmitted.
[0049]
[Host system 14]
The host system 14 can use a general-purpose or special-purpose computer, and receives the decoded two-dimensional code data and performs desired processing. The main body of the two-dimensional code reader and the host system 14 are connected so that data communication is possible. For the data communication, one-way communication for transmitting data from the main body of the two-dimensional code reader to the host system 14 is sufficient. However, as bidirectional communication, the host system 14 changes various operations or operates the main body of the two-dimensional code reader. Instructions can also be sent.
[0050]
Types of the two-dimensional code that can be used in the present invention include a QR code, a micro QR code, a data matrix (Data code), a Veri code (Veri code), an Aztec code (Aztec code), a PDF417, a maxi code (Maxi code). )and so on. The two-dimensional code includes a stack type and a matrix type, but the present invention can be applied to any two-dimensional code. The two-dimensional code is fixed on the object by a method of attaching a label on which the two-dimensional code is printed or stamped, or a method of stamping the two-dimensional code on the object itself. The present invention does not specify a symbol to be read as a two-dimensional code regardless of its name, and can be used for a one-dimensional barcode, other data symbols, OCR for character recognition, and the like. For example, in an application where a laser for reading a barcode cannot be used, it is necessary to read a barcode using an optical imaging system, and the present invention can be used as a barcode reader.
[0051]
FIG. 2 shows various two-dimensional codes. In FIG. 2, (a) shows a QR code, (b) shows a micro QR code, (c) shows a data matrix, (d) shows a vericode, and (e) shows an aztec code. The two-dimensional code is composed of cells, which are the minimum units. Here, the cell is generally a white (light part) or black (dark part) fixed element. The dark and light portions are not limited to black and white, and a color having a contrast of dark and light can be used. The shape of the cell is generally rectangular or dot-like, but may be other polygonal or elliptical. A two-dimensional code is formed by a combination of cells, and forms various patterns in addition to data cells forming data. For example, a finder pattern, a timing pattern, a timing cell, an alignment pattern, format information, a separator, a margin, and the like are configured by cells.
[0052]
The finder pattern is a pattern indicated by an arrow in FIG. 2 and is also called a cutout symbol, a cutout pattern, a cutout mark, a viewfinder, or the like. The finder pattern is used for extracting a symbol of the two-dimensional code from an image including the two-dimensional code.
[0053]
Timing patterns and timing cells are patterns for cutting out the size and area of a cell, and are used to determine module coordinates within a symbol, and are used to determine the displacement of each cell caused by distortion of a two-dimensional code. Can be corrected. The alignment pattern is a pattern for supporting recognition of the direction and angle of the cell. The format information is a pattern for representing the format of the two-dimensional code, and has information such as an error correction level and a mask number. The separator and the margin are margins for recognizing a predetermined pattern included in the two-dimensional code.
[0054]
Since these patterns are regions in which the positional relationship between the dark part and the light part in the two-dimensional code is predetermined, it is easy to calculate the contrast of the shade. Therefore, it can be suitably used as a reading stability determination area. However, the above is only an example, and it goes without saying that an area in which patterns or shading other than these are set in advance can be used as the reading stability determination area.
[0055]
For example, in a QR code or a micro QR code, an eyeball-shaped finder pattern is arranged to perform its type and positioning. This finder pattern is composed of double squares as shown in FIGS. 2A and 2B, and the frequency component ratio across the center is black: white: black: white: black = 1: 1: 3: It is a 1: 1 graphic. However, the finder pattern is not limited to a square, but may be a circle, a hexagon, or other polygons, and a pattern in which concentrically similar figures overlap each other can be used. Further, if the frequency component ratio across the center is the same at all angles, the figure may be not only double but also multiple. Further, the number of finder patterns is not limited to three, and one, two, or four or more finder patterns can be provided, and these can be arranged at an arbitrary position in the two-dimensional code.
[0056]
The finder pattern is an area that is always detected when reading a two-dimensional code, and it is designed to be detected at an early stage and originally easy to detect. it can. By using the existing finder pattern as the reading stability determination area, there is no need to set a special reading stability determination area or perform its calculation. Since the reading stability can be determined, efficient processing becomes possible. However, the reading stability determination area for determining the reading stability does not need to be limited to the finder pattern, and other areas included in the two-dimensional code may be used alone or in combination, or The whole code may be used. The read stability determining area other than the finder pattern includes a timing pattern, an alignment pattern, format information, a separator, a margin, and a data area. If the reading stability determination area for calculating the contrast of light and shade is the finder pattern or the entire two-dimensional code, special processing for determining the reading stability, such as extracting a specific area from image data, This eliminates the need for an extra step of acquiring and calculating a part of the data of the two-dimensional code, and the reading stability can be determined using the data calculated in the normal reading operation of the two-dimensional code. There is an advantage that simplification can be performed and calculation can be performed at high speed with less burden on the device side.
[0057]
[Operation procedure]
The procedure for decoding the two-dimensional code by the two-dimensional code reader shown in FIG. 1 will be described with reference to the flowchart in FIG.
[0058]
(Step S1) An image including a two-dimensional code is acquired by the imaging unit 2. While the illuminating unit 3 is irradiating the two-dimensional code, the imaging unit 2 captures image data of an area including the two-dimensional code label, and sends the image data to the two-dimensional code reader main body.
[0059]
(Step S2) The acquired image data is A / D converted. An analog signal of the input image data is converted into a digital signal by an A / D converter or the like.
[0060]
(Step S3) A two-dimensional code area is cut out from the A / D converted image data.
[0061]
(Step S4) A cell boundary is determined from the extracted image data of the two-dimensional code, and the cell is divided into cells.
[0062]
(Step S5) The image data of each cell is binarized based on a predetermined threshold.
[0063]
(Step S6) A decoding process is performed on the binarized data. The data is decoded with reference to the table, and error detection and correction are performed as necessary.
[0064]
(Step S7) Read stability is determined. The reading stability determination unit 12 calculates the contrast of the density of the A / D converted data in the predetermined reading stability determination area of the two-dimensional code, and compares the contrast of the density with the predetermined stability threshold. Determine and output reading stability
[0065]
The step of determining the reading stability in step S7 is not limited to the above example, but at any time after the step of cutting out the two-dimensional code, in other words, after the finder pattern or another pattern is determined. May go. 4 and 5 show an example in which the order of the reading stability determination step is changed. In these figures, the number of each step corresponds to the example of FIG. In FIG. 4, the reading stability determination step is performed before the decoding processing. In FIG. 5, the reading stability determination step is performed before binarization of each cell. As described above, the reading stability determination step can be executed at any time after the reading stability determination area is determined, in other words, after the cell boundary is determined.
[0066]
In the case where a finder pattern or the like is not used in the reading stability determination area, for example, when the contrast is determined for the entire two-dimensional code, as shown in FIG. Can also be executed.
[0067]
[Example 2]
Next, a two-dimensional code reading method according to a second embodiment of the present invention will be described. In this method, the reading stability is not determined based on the density of the two-dimensional code, but is determined based on the time required for processing. This takes advantage of the property that processing is time-consuming if the stability is poor. The procedure and apparatus for reading the two-dimensional code can be the same as in the first embodiment. The reading stability determining unit 12 determines whether a two-dimensional code is cut out of the two-dimensional code reading procedure, a cell is divided, a binarization or multi-valued step of each cell is performed, or two of these steps are performed. For the above steps, the time required for the processing is added. Then, the reading stability is determined by setting a predetermined stability reference time as a threshold value and comparing it with the threshold value. For measuring the time, there are a method of counting the operation clock of the arithmetic circuit 7 and a method of providing a dedicated time measuring means.
[0068]
[Example 3]
Third Embodiment As a third embodiment of the present invention, a method for determining the reading stability based on the usage rate of the error correction code included in the two-dimensional code will be described. The two-dimensional code can have an error correction function in addition to the original information to be coded. The error correction function is a function that can restore data even when the two-dimensional code is dirty or partially missing. Furthermore, the effect of preventing erroneous reading of the two-dimensional code can be obtained by the error correction function. Therefore, an error correction code for error correction is generally added to the two-dimensional code. The error correction code varies depending on the type of the two-dimensional code used, but generally uses a Reed-Solomon code. For example, in the case of a QR code, there are four levels of error correction in accordance with the degree of tolerance for symbol damage.
[0069]
The reading stability is determined based on the usage rate of the error correction code used in reading the two-dimensional code, and is output. If reading is performed without using the error correction code, it can be determined that stable reading has been performed. Conversely, the higher the usage rate of the error correction code, the less smooth the reading is, that is, the reading stability. Is considered bad. Therefore, the reading stability can be determined based on the rate at which the error correction code is used. The relationship between the usage rate of the error correction code and the reading stability is determined by setting a stability threshold in advance and storing the threshold in a table or the like, and comparing the reading with reference to the threshold. The use rate of the error correction code can be detected by the reading stability determining unit 12 in the decoding processing by the decoding processing unit 11 in FIG. 1 and output from the reading stability output circuit 8.
[0070]
[2D code reader setting program]
Next, a two-dimensional code reader setting program for setting the two-dimensional code reader will be described. The two-dimensional code reader setting program is installed and executed on a computer connected to the two-dimensional code reader as a host system. The computer in which the two-dimensional code reader setting program is installed communicates with the two-dimensional code reader, transmits and receives necessary information, and makes settings. The communication is performed by serial communication via, for example, an RS-232C cable or a USB cable.
[0071]
7 to 22 show examples of images of the user interface screen of the two-dimensional code reader setting program. In the screens shown in these figures, necessary procedures are displayed in a button shape on the left side, and when each button is selected, a setting screen is displayed on the right side. The setting flow is as shown in the flowchart of FIG.
[0072]
Needless to say, on these screens, the arrangement, shape, display method, size, color scheme, pattern, and the like of each input field and each button can be changed as appropriate. By changing the design, it is possible to make the display more easily viewable, easy to evaluate and judge, and a layout that is easy to operate. For example, each item may be input in a wizard format so that the user can make necessary settings only by answering questions. Also, in the following description, the detailed setting screen may be displayed in a separate window or the detailed setting column may be provided in the same window. Needless to say.
[0073]
On the user interface screens of these programs, ON / OFF operations for virtually provided buttons and input fields, designation of numerical values and command inputs, and the like are provided on a computer in which the two-dimensional code reader setting program is installed. Using an input device. In this specification, "pressing" includes physically touching buttons to perform an operation and clicking or selecting with an input device to simulately press the buttons. The input / output device is connected to the computer by wire or wirelessly, or is fixed to the computer. Examples of general input devices include various pointing devices such as a mouse, keyboard, slide pad, track point, tablet, joystick, console, jog dial, digitizer, light pen, numeric keypad, touch pad, and accu point. These input / output devices can be used not only for operation of a program but also for operation of hardware such as a two-dimensional code reading setting device. Furthermore, using a touch screen or touch panel on the display itself that displays the interface screen, the user can perform input and operation by directly touching the screen with the hand, or use voice input and other existing input means, Alternatively, these can be used in combination.
[0074]
In addition, in addition to the mode of setting from the input / output device connected to the computer in which the two-dimensional code reader setting program is installed, the two-dimensional code reader setting program and hardware are incorporated in the two-dimensional code reader, The setting may be made only by the two-dimensional code reader. In this case, the input / output device is provided or connected to the two-dimensional code reader, and a setting monitor or the like is connected as necessary.
[0075]
7 to 22 show examples of images of the user interface screen of the two-dimensional code reader setting program. In the screen shown in this figure, necessary procedures are displayed in the form of buttons on the left side in the order of setting, and when each button is selected, the setting screen is displayed on the right side.
[0076]
This two-dimensional code reader setting program is composed of four basic steps, steps S1 to S4 shown in the flowchart of FIG. However, it is not always necessary to set according to this procedure. As will be described later, the determination of the specification of the two-dimensional code in step S1 can be skipped, and the user can directly specify the specification of the two-dimensional code in step S2. Further, the operation setting of the two-dimensional code reader in step S3 can be set independently of steps S1 and S2. Therefore, it is also possible to use the program such that the program is started, only step S3 is set, and the process ends. Further, since this program can save the set contents and can automatically recall the previous set contents at the time of startup, the reading adjustment in step S4 can be performed with the default settings. As described above, the method of using the present program is not limited to the procedure of sequentially performing steps S1 to S4. Hereinafter, each setting screen will be described.
[0077]
[Condition specification]
(Step S1 Specification of two-dimensional code)
FIG. 7 shows an image screen of the two-dimensional code reader setting program for calculating the specifications of the two-dimensional code. On this screen, in order to determine the specifications of the two-dimensional code to be read, the type of data to be encoded into the two-dimensional code and the printing conditions are selected. Items to be input include a code type, a data type, a data amount, and a printable space. As the code type of the two-dimensional code, in the example of FIG. 7, a QR code, a micro QR code, a square data matrix, and a rectangular data matrix are listed as selection candidates in the “code type” designation field 16. Select The present invention does not limit the types of the two-dimensional code to these four types, and it goes without saying that other two-dimensional codes and bar codes can be listed as selection candidates.
[0078]
The user can set the type of the two-dimensional code and the redundancy and error correction function to be given to the type according to the use purpose and purpose. For example, if the two-dimensional code is printed on a high-contrast object such as paper, it is possible to expect some accurate reading, so the error correction function is sufficient at a low level. If so, the contrast is considered to be insufficient, and it is necessary to provide an error correction function to some extent. As described above, what two-dimensional code is set depends on the usage conditions.
[0079]
A two-dimensional code sample display field 17 for displaying a sample of the selected two-dimensional code is provided on the right side, and when the code type is changed, the display of the sample is changed accordingly. Further, according to the two-dimensional code selected by the code type, only selectable data types according to each code type are selected, such as selectable items in a “data type” designation column 18 at the bottom of the two-dimensional code are grayed out. It becomes possible.
[0080]
When the “Details ...” button 19 in the “code type” designation field 16 is pressed, a two-dimensional code details setting screen 20 as shown in FIG. 8 is opened in another window, and the detailed settings according to the selected two-dimensional code are made. It becomes possible. In the example of FIG. 8, the model, the error correction level, and whether the print pattern is a dot pattern can be changed as an example corresponding to the QR code. This screen displays an appropriate screen according to the type of the selected two-dimensional code.
[0081]
Here, the printing pattern mainly indicates the presence or absence of a printing dot pattern. The printing pattern includes a normal pattern (normal pattern) and a dot pattern. A dot pattern is a pattern in which the cells that make up a symbol are circular, so adjacent cells are slightly separated from each other.This occurs when dots or dots are printed or engraved by laser marking or direct marking. I do. Generally, when the two-dimensional code is a QR code or a data matrix, this option can be selected.
[0082]
In the "data type" designation field 18, a radio button is used to select numeric, alphanumeric, binary, or kanji.
[0083]
Further, the "data amount" designation field 21 designates the number of digits of the data specified by the above data type. For example, the data type is designated by the number of digits when the data type is a number, the number of characters when the data type is alphanumeric or kanji, and the number of bytes when the data type is binary.
[0084]
Furthermore, the “printable space” designation column 22 designates the vertical and horizontal size of the maximum printable range.
[0085]
After completion of the input, if the “calculation start” button 23 is pressed on the screen of FIG. 7, the two-dimensional code reader setting program determines whether or not a two-dimensional code matching the conditions can be created based on the conditions input by the user. Is calculated and determined. If it is determined that it can be created, the maximum value of the size of one side of the cell size and the maximum value of the size of the symbol are displayed in the calculation result display column 24 in a size of length × width. Further, the “print details” button 25 can be pressed from the grayed out state.
[0086]
When the “print details” button 25 is pressed, a print details setting screen 26 shown in FIG. 9 is newly opened in a window, and the cell size to be printed can be specified. This specifies how many dots, which are the minimum unit for printing, are allocated to one cell, which is the minimum unit for forming a two-dimensional code, according to the resolution of the printer that prints the two-dimensional code. It is. The larger the number of dots allocated to one cell, the more accurate the printing and the higher the accuracy, but the larger the size of the two-dimensional code symbol to be printed. The two-dimensional code reader setting program calculates the size of one dot according to the resolution of the printer, and also calculates the size of one cell and the size of the two-dimensional code symbol that are actually printed according to the number of dots allocated to one cell. Is calculated, and a candidate group is displayed. The user selects an optimal combination from the candidate group according to the resolution of the printer used and the size of the symbol.
[0087]
If it is determined that the file cannot be created, an error message indicating that the file cannot be created is simply displayed in the calculation result display field 24, and the reason and a recommended value for eliminating the reason are presented to prompt the user to input again. You can also. For example, while displaying a warning message that the printable space is too small or the data amount is too large, as a solution, change the data type to ..., change the number of digits to ... ... Are displayed in a separate window as to what setting values such as changing to...
[0088]
[2D code specifications]
Hereinafter, an example of an algorithm for determining the specification of the two-dimensional code executed when the “calculation start” button 23 is pressed on the screen of FIG. 7 will be described.
(1) First, a required code size is determined based on a code type, a data type, and a data amount. The code size is the number of cells per one side of the symbol, and the code size is defined by the version. Here, the relationship between the code type, the data type, the data amount, and the code size is determined. For example, when the two-dimensional code is a QR code, a model 2, 10 alphanumeric characters, and an error correction level M, version 1 (21 cells × 21 cells). When a dot pattern is selected in the details of the code type, the maximum value of the code size may be limited depending on the specification of the two-dimensional code reader.
[0089]
(2) As a result, if the code size exceeds the theoretical maximum code size, it is determined that creation is impossible and NG. Here, the theoretical maximum code size is represented by (n × safety coefficient) / m. In this equation, m is the number of pixels assigned to the CCD, and is, for example, a value such as 5 or 8. Generally, when the printing pattern is a normal pattern, the number of pixels is 5 on the CCD, and when the printing pattern is a dot pattern, the number of pixels is 8. Further, n is the number of pixels (X, Y) of the CCD, for example, (640, 480). Further, a value such as 0.9 is input as a safety coefficient for completely storing the two-dimensional code in the visual field.
[0090]
(3) Next, the cell size when the code is printed to fill the printable space is obtained from the printable space and the code size (including the outer shape in the case of Data Matrix). The cell size at this time is referred to as “provisional maximum cell size”. The provisional maximum cell size is represented by (provisional maximum cell size [mm]) = (printable space [mm]) / ((code size) + (margin size) × 2). For example, when the printable space is 10 mm × 10 mm and the code size is 21 cells × 21 cells, the provisional maximum cell size is 0.345 mm.
[0091]
(4) Further, the size of the symbol when the two-dimensional code is printed with the provisional maximum cell size obtained in (3) is calculated. The symbol size is represented by (symbol size [mm]) = (cell size [mm]) × ((code size) + (margin size) × 2). Here, in the case of a square code and a square printable space, (symbol size) = (printable space).
[0092]
(5) For all combinations of close-up rings, the camera installation distance at which the symbol size obtained in (4) is 90% or less of the y direction of the visual field is obtained. For example, taking into account only the cell size, positional resolution, and visual field size, assuming that there is no restriction on the position determination accuracy of the work (reading object including the two-dimensional code), rotation of the work, and camera installation conditions during operation, When one cell is assigned to 5 or 8 pixels of the CCD, it is calculated whether or not a required field of view can be secured. When the close-up rings that can be used as examples are 0.5 mm, 1 mm, 5 mm, 10 mm, and 22 mm, the cell size is 0.345 mm, and when the required visual field is 10 mm, the combination of the close-up rings is 0.5 mm, 1 mm, 5 mm,. The conditions are satisfied at 5 mm, 6 mm, and 6.5 mm.
[0093]
Here, when a rectangular data matrix is selected as the two-dimensional code, the size of the symbol is the length of the long side. The camera installation distance is the camera installation distance when the length of the long side is 90% of the x direction of the visual field. If a solution is not obtained, it is determined as NG. If there is a solution, the “provisional maximum cell size” obtained in (3) is set as the “maximum cell size”. If the two-dimensional code is a data matrix code, change the outer shape and recalculate it.If the size of the outer shape satisfies the printing space and field of view constraints, this is recommended to the user. Present.
[0094]
On the other hand, when it is determined that the two-dimensional code of the specification satisfying the specified condition cannot be created (NG), the condition for satisfying the specification is recalculated and presented to the user. Conditions presented here include a change in data type (calculation of whether or not it can be set in the order of kanji → alphanumeric → numeric), a change in error correction level (H → Q only for QR code and micro QR code) Calculation is performed in the order of → M → L), change of print space (recalculate necessary print space with cell size value being 0.025 mm), change of data amount, and the like.
[0095]
[Detailed print settings]
Further, an example of an algorithm relating to the detailed setting of printing will be described below. Here, the optimum cell size and symbol size are calculated according to the resolution of the printer that prints the two-dimensional code, not the maximum values of the cell size and the symbol size.
(1) When the “print details” button 25 is pressed from the screen of FIG. 7, a print details setting screen 26 of FIG. 9 appears.
[0096]
(2) In order to print the “maximum cell size” cell determined above at 200 dpi, 300 dpi, 400 dpi, and 600 dpi corresponding to the resolution of the printer, how many dots should be printed per cell? The maximum value (n (max)) of the number of dots per cell is obtained. The calculation method of (n (max)) is obtained as the maximum n that satisfies (maximum value of cell size [mm])> 1 / (resolution of printer [dpi]) × 25.4 × n. Here, the cell size is calculated as (cell size [mm]) = n × 25.4 / (printer resolution [dpi]). The symbol size is calculated as (symbol size [mm]) = (cell size [mm]) × ((code size) + (margin size) × 2).
[0097]
(3) For the number of dots (n (max)) obtained in the above (2), the resolution of the printer (200 dpi, 300 dpi, 400 dpi, 600 dpi), the number of dots per cell, cell size, and symbol size are obtained. It is displayed on the print detailed setting screen 26.
[0098]
(4) When the resolution of the printer is high and n (max)> 2, the above calculation (3) is performed from n = 2 to n = n (max), and the value is displayed. However, if n (max) exceeds 20, it is cut off at 20. When the head of each column is clicked on the calculation results displayed in FIG. 9, the columns are sorted and displayed using the columns as keys.
[0099]
Further, when the user inputs an arbitrary cell size on the printing detailed setting screen 26 in FIG. 9, the above calculation is performed for the resolution specified by the user in the input field of “printing accuracy”, and the calculation result is displayed in the lower part. Display in list. In this case, the calculation results for the above-described calculations for 200 dpi, 300 dpi, 400 dpi, and 600 dpi are not displayed.
[0100]
From the list of calculation results obtained as described above, the user selects a row for displaying a desired value. After that, when the "OK" button is pressed on the printing detailed setting screen 26 in FIG. 9, the printing detailed setting screen 26 is closed and the screen returns to the screen for determining the specification of the two-dimensional code in FIG. At this time, the “cell size to be printed” and the “size of the symbol to be printed” of the row selected by the user are reflected in the cell size and the symbol size displayed in the calculation result display box 24 in FIG. At the same time, the characters “... Mm / cell or less” in the cell size column are changed to “mm / cell”. When the “printing details” button 25 in FIG. 7 is pressed again, the “cell size” obtained in the above [two-dimensional code specification] is not the cell size obtained in the “printing details setting” displayed. Is calculated based on the “maximum value of
[0101]
Based on the cell size and the maximum value of the symbol size calculated as described above, the image pickup unit attachment condition is calculated. Specifically, based on parameters such as the f value of the lens, the distance between the principal points of the lens, the lens length, the number and thickness of the close-up rings to be used, the adjustment range of the focus ring, the size of one pixel of the CCD, the number of pixels, etc. Then, the recommended values of the mounting distance of the imaging unit, the thickness of the close-up ring, and the standard of the focus ring are calculated, and are set as default values of the mounting conditions of the imaging unit. Note that the mounting distance of the imaging unit refers to the distance from the work to the tip of the lens. The restriction on the mounting distance of the imaging unit is a mounting distance desired by the user, and means that the mounting distance of the imaging unit is set within a range specified by the user. In the following embodiments, a camera is used as an imaging unit.
[0102]
(Step S2 Determine camera mounting conditions)
In step S2, the camera installation distance, the thickness of the close-up ring, and the guideline of the focus ring are determined as camera installation conditions. FIG. 10 shows a user interface screen for determining camera mounting conditions. The user specifies “two-dimensional code specification” 27, “two-dimensional code label misalignment allowable range” 28, “print pattern” 29, and “desired mounting distance” 30 from FIG. 10 as conditions for mounting the camera. .
[0103]
As the specification of the two-dimensional code, the size of the cell constituting the two-dimensional code and the width and length of the symbol are designated by numerical values. Here, when the calculation is performed in step S1, the calculated values are input as default values, and the user can adjust these values. The user can directly input a desired numerical value, or by dragging the slider 31 provided on the right side, the cell size and the size of the symbol can be continuously changed, and the numerical value according to this can be changed. It is automatically entered in the input field. If the user specifies the cell size, the symbol size can be calculated automatically. In this case, a “calculate symbol size” button described below is not displayed.
[0104]
Alternatively, the user can directly specify the specification of the two-dimensional code without executing step S1. This example is shown in FIG. In this case, since step S1 is skipped, the calculated values are not input as default values for the cell size and the symbol size, and the user directly inputs numerical values into the respective input fields.
[0105]
[Calculation of symbol size]
Further, in this case, the size of the symbol can be calculated based on the specification of the two-dimensional code. When a “calculate symbol size” button 33 provided on the right side of the “symbol size” input field 32 in FIG. 11 is pressed, a “calculate symbol size” setting screen 34 is displayed as shown in FIG. Displayed in a separate window. From this screen, the code type, version (code size), cell size, and whether or not to link with the symbol size are specified, and when the OK button is pressed, the symbol size is calculated based on these information. The calculation result is input to the eleventh “symbol size” input field 32. The processing flow here is as follows.
(1) When the “calculate symbol size” button 33 on the setting screen for determining the camera attachment conditions in FIG. 11 is pressed, a “calculate symbol size” setting screen 34 shown in FIG. 12 is displayed.
(2) The symbol size is calculated from the code type, version (code size), and cell size.
(3) The symbol size calculated above is displayed as “symbol size”.
(4) Pressing the “OK” button in FIG. 12 closes the “calculate symbol size” setting screen 34 and returns to the screen of FIG. At this time, the cell size and the symbol size obtained as described above are reflected in “2D code specification” 27. (5) If the “Symbol size is linked to cell size” column in FIG. 12 is checked, the “Symbol size” input field 32 is grayed out on the screen in FIG. I do.
[0106]
As described above, in the embodiment of the present invention, in addition to the user directly specifying items such as the cell size and the symbol size of the two-dimensional code, the apparatus can perform calculations by allowing the user to select necessary specifications. It is configured so that even a user who is not familiar with the two-dimensional code can make settings. In addition, by enabling direct input to a user who is familiar with the two-dimensional code, troublesomeness is eliminated for a knowledgeable user, and good usability is maintained for any user.
[0107]
In FIGS. 10 and 11, the positional deviation allowable range 28 of the two-dimensional code label is the positional deviation range of the label or the positioning accuracy of the work, and specifies the allowable range of the positional deviation of the label with respect to the reference position. . Furthermore, it is designated whether or not the rotation of the work is permitted, and when the work is rotated, a check is made in "with rotation". When "with rotation" is checked, the two-dimensional code displayed on the attachment image screen shown in FIG. 14, which will be described later, is rotated and displayed diagonally, and it can be confirmed from the image that "with rotation" is selected.
[0108]
Further, the print pattern 29 selects either normal or dot.
[0109]
The desired mounting distance 30 is set when the mounting distance of the camera is limited, for example, there is a limit to the distance at which the camera can be physically separated depending on the use conditions of the two-dimensional code.
[0110]
Conditions that can be set other than the above include a depth of field, illumination conditions, decoding (decoding processing) time, and the like.
[0111]
When the above conditions are input and the "calculation start" button 35 is pressed, the camera mounting distance, the thickness of the close-up ring to be used, and the thickness of the focus ring are calculated based on the specified conditions, and the "mounting specifications" It is displayed in the display field 36. In addition, the “details of mounting condition” button 37 can be selected from grayed out. If the camera installation distance cannot be calculated under the specified conditions, as in step S1, the fact, reason and recommended value are presented, and the user is prompted to re-enter.
[0112]
[Calculation of camera mounting distance]
Hereinafter, an example of a calculation algorithm of the camera attachment distance executed when the “calculation start” button 35 is pressed will be described. This algorithm calculates the minimum value O of the camera mounting distance as follows. min And the maximum value O max Ask for.
[0113]
[Minimum value of camera mounting distance O min Operation]
The minimum value O of the camera mounting distance, which is the closest distance at which the camera can be mounted min Is calculated as follows.
[0114]
(1) If the code size of the two-dimensional code is unknown, the code size is calculated from the cell size and the symbol size. In the case of a square code, (symbol size) / (cell size) = code size.
[0115]
(2) If the code size obtained as a result of the calculation exceeds the theoretical maximum code size described above, it is determined to be NG.
[0116]
(3) Necessary visual field Vy in the y direction based on the size of the symbol, the range of displacement of the label, and the presence or absence of rotation of the work min Is calculated. For example, when rotation is allowed with a square code, the required field of view Vy min = (One side of print space) × √2 + 2 × (positioning accuracy).
[0117]
(4) Vy min Magnification M to secure max Ask for. Magnification M max Is M max = S × n / Vy min In the above equation, s is the pixel size (mm) of the CCD, n is the number of pixels in the y direction of the CCD × safety coefficient, and m is the assigned pixel (5 or 8).
[0118]
(5) M max Pick up a close-up ring combination that satisfies. Here, the effective close-up ring thickness f · M is calculated by f · M = (close-up ring thickness) + (adjustment range of focus ring). M max If there is no combination that satisfies max Re-determine.
[0119]
(6) M obtained in (5) above max Distance O from the object to the front end of the lens at min Then, the visual field Vy at that time is calculated. Here the distance O to the front end of the lens min Is O min = F / M + 2f + ΔH−d, where ΔH is the distance between the principal points of the lens, and d is the lens length. The visual field Vy is calculated by Vy = s × n / M. In the above equation, s is the pixel size (mm) of the CCD, n is (the number of pixels in the y direction of the CCD) × (safety coefficient), and M is the magnification. is there. In this embodiment, focal length f = 24.97 [mm], distance between principal points ΔH = 0.69 [mm], lens length (from the lower end to the focal plane) d = 54.83 [mm] as calculation parameters, CCD pixel size s = 0.0074 [mm], CCD y-direction pixel count = 480, CCD x-direction pixel count = 640, focus ring adjustment range = 0 to 2.5 [mm], visual field safety factor = 0.9.
[0120]
[Maximum value of camera mounting distance O max Operation]
The maximum value O of the camera mounting distance, which is the longest distance that the camera can be mounted max Is calculated as follows.
[0121]
(1) Magnification M in which one cell of a two-dimensional symbol becomes 5 pixels (in the case of a normal pattern) or 8 pixels (in the case of a dot pattern) on a CCD. min Ask for. Where M min = S × m / S, where s is the pixel size (mm) of the CCD, m is the assigned pixel (5 or 8), and S is the cell size (mm) on the work.
[0122]
(2) M min Is extracted. M min If there is no combination that satisfies min Is determined again.
[0123]
(3) M obtained in (2) above min Distance O from the object to the front end of the lens at max Then, the visual field Vy at that time is obtained.
[0124]
[Display of "Installation specification" display column 36]
The calculation result displayed in the “mounting specification” display field 36 on the setting screen for determining the camera mounting conditions in FIG. 11 indicates “the height at which the two-dimensional code becomes 70% of the field of view”. This is the minimum value O min Corresponds to the case where the safety factor is set to 0.7 in the formula for calculating However, when the number of assigned pixels is less than 5, the height (O) at which one cell of the two-dimensional symbol becomes 5 pixels (normal pattern) or 8 pixels (dot pattern) on the CCD. max ) Is displayed.
[0125]
[Details of mounting conditions]
The camera mounting distance indicates a minimum value or a recommended value. In the case of the minimum value, the actual mounting may be greater than this value. The recommended value is about 1.1 to 2.0 times the minimum value. When the “details of mounting conditions” button 37 is pressed in FIGS. 10 and 11, a detailed screen 38 of the camera mounting conditions shown in FIG. 13 is displayed. In this figure, the distance at which the camera can be mounted is shown. In the figure, the mountable range is shown with the calculated mounting distance of the camera as the minimum value, and the area shown by the bar-shaped graph is the range in which focus can be achieved. In addition, patterns of combinations of close-up rings that can be combined are exemplified. Further, in addition to the mounting distance of the camera and the thickness of the close-up ring, a limit value of the reading cell size is calculated, and the calculated value for the normal pattern and the calculated value for the dot pattern are displayed in the mounting condition detailed display field 39. .
[0126]
In FIG. 13, the left side is a “focusing range” display column 40, the vertical axis indicates the camera mounting distance, and the range in which focusing can be performed is shown in a bar graph shape. In this figure, seven bars are shown, each bar representing a combination of close-up rings. When each bar is clicked and selected, the color of the bar changes to red, and details on the selected combination of the close-up rings are displayed in the “close-up ring combination” column 41 on the right. In the figure, “total: 6.5 mm” in the “close-up ring combination” column 41 indicates that the total ring thickness by the currently selected close-up ring combination is 6.5 mm. In addition, “(0.5 + 1.0 + 5.0)” means that if a close-up ring of 0.5 mm, 1.0 mm, and 5.0 mm is used as a pattern of a combination of close-up rings, it becomes 6.5 mm. Is shown. This allows the user to prepare a close-up ring having a specified thickness, and can select a combination of the close-up rings without hesitation. Further, "attachment range: 65 mm to 91 mm" indicates that the focus can be adjusted in the range of 65 mm to 91 mm with the currently selected close-up ring combination. This range corresponds to the length of the bar in the “focusing range” display field 40. Note that the upper and lower ends of some of the bars are partially cut off in the “focusing range” display column 40, but this is displayed based on whether or not each bar can be focused. This is because the upper and lower regions are not included in consideration of the criterion of whether or not the entire two-dimensional code can be read. Specifically, it is determined whether or not the cell at the upper end of the bar can be determined, and the lower end depends on whether or not the entire two-dimensional code can be read. Since the above items depend on the combination of the close-up rings, if a different bar is selected in the “focusing range” display field 40, the newly selected bar is displayed in red, and the information corresponding to this bar is displayed as “close-up”. The display of the “ring combination” column 41 and the mounting condition detailed display column 39 are updated.
[0127]
In addition, “field of view: 10 mm × 10 mm” in the mounting condition details display column 39 indicates the current field of view. Here, when the mouse is clicked at an arbitrary position in the “focusing range” display field 40, the field of view at the clicked position, that is, the position corresponding to the vertical axis of the “focusing range” display field 40 is set as the mounting distance. Calculate and display the field of view. Thus, the size of the field of view depends on the mounting distance.
[0128]
Further, “attachment distance: 66 mm” represents the distance from the object to be read to the front end of the lens. Similarly, when the mouse is clicked in the “focusing point range” display field 40, the distance corresponding to the vertical axis of the “focusing point range” display field 40 at the clicked position is displayed.
[0129]
Furthermore, “focus scale: 0.3 m” means that focusing is achieved by adjusting the scale of the focus ring attached to the lens to 0.3 m. As for this item, when the mouse is clicked in the “focusing range” display field 40, a value corresponding to the clicked position is calculated and displayed. In this embodiment, since a lens that is focused in the range of 0.3 m to Δm is used, the value displayed in this item is in the range of 0.3 m to Δm. This item depends on the combination of the close-up ring and the mounting distance.
[0130]
Further, “pixel / cell: 5” means that one cell of the two-dimensional code is allocated to five pixels of the CCD at the currently set mounting distance. Also for this item, when the mouse is clicked in the "focusing range" display field 40, a value corresponding to the clicked position is calculated and displayed. Clicking near the lower part of the “focusing point range” display field 40 increases the value, and conversely, clicking above the “focusing point range” display field 40 decreases the value. This item also depends on the mounting distance.
[0131]
The calculation of each parameter displayed in the mounting condition detailed display column 39 is performed as follows.
[View]
(1) The magnification M is obtained based on the mounting distance O. The magnification M is calculated by M = −f / (2f + ΔH−d−O), where f is the focal length, ΔH is the distance between the principal points of the lens, and d is the lens length.
[0132]
(2) Obtain the visual fields Vx and Vy from the magnification M. Here, the visual field Vx is calculated by Vx = s × n / M, where s is the pixel size (mm) of the CCD, n is the number of pixels in the x direction of the CCD, and M is the magnification. The field of view Vy is calculated by Vy = s × n / M, where s is the pixel size (mm) of the CCD, n is the number of pixels in the y direction of the CCD, and M is the magnification.
[0133]
[Focus scale]
(1) The effective close-up ring thickness f · M is obtained based on the magnification M.
(2) From the effective close-up ring thickness f · M and the actually used close-up ring thickness lring, the length lpint covered by the focus ring is determined. Here, lpint = f · M-ring.
(3) The value p of the focus scale is obtained from lpint. The focus scale is displayed in units of 0.1 m. Here, the value p of the focus scale is calculated by p = f2 / lpint + 2f + ΔH + lpint.
[0134]
[Allocated pixel (pixel / cell)]
(1) The number m of allocated pixels is obtained based on the magnification M, the pixel size s of the CCD, and the cell size S on the work. The calculated value is rounded down to the nearest whole number and displayed as an integer. The number m of pixels is calculated by m = M × S / s, where s is the pixel size (mm) of the CCD, and S is the cell size (mm) on the work.
[0135]
Further, as the "code ratio to visual field" column 42, it is possible to display how much area of the entire visual field is used to display the two-dimensional code. As a guide, it is preferable that the entire two-dimensional code is displayed in an area of 1/3 or more near the center of the visual field. The user refers to the ratio of the code to the visual field, and sets so that the entire two-dimensional code is included in the visual field and displayed as large as possible. As described above, this program gives the user the conditions such as the appropriate height for mounting the camera, the thickness of the close-up ring, and the appropriate scale of the focus ring. It calculates and displays it automatically.
[0136]
[Mounting image]
In step S2, an attachment image 43 can be displayed as shown in FIG. This makes it possible for the user to easily understand which part of the two-dimensional code reading operation device corresponds to each of the calculated values, and indicates a part to be visually adjusted particularly to a user who is not used to setting the two-dimensional code. Thereby, the setting can be facilitated. Items that can be displayed as images include the camera installation distance related to the calculation, the type of close-up ring, the approximate scale of the focus ring, the vertical and horizontal size of the two-dimensional code symbol, the size of one cell, and the two-dimensional code printed on the two-dimensional code. There are the vertical and horizontal sizes of the code label, the positioning accuracy of the work, the relationship between the field of view and the size of the symbol, etc. All or some of these, or only the selected portion, can be displayed. Further, a numerical value input or calculated may be described in each part, or a color may be changed for each displayed part. Further, the attachment image 43 of FIG. 14 can be displayed side by side with the setting screens of FIGS. 10 and 11, and the parts of FIG. 14 corresponding to the setting items and calculation results in FIGS. 10 and 11 can be displayed in the same color. Further, the item being selected in FIGS. 10 and 11 is highlighted in FIG. 14, such as inverted, blinking, bold, and red characters, or conversely, the item or numerical value corresponding to the selected portion in FIG. 10 and FIG. 11 can also be used. Alternatively, when the size of the displayed image is changed according to the calculated size, or when the type of the selected two-dimensional code changes, the sample of the displayed two-dimensional code also changes accordingly. You may do it. Further, a guidance function may be added, such as displaying the attachment method as a moving image or using audio to explain each part and explain the attachment method. Such image display can assist even a beginner to easily perform the setting.
[0137]
(Step S3 Two-dimensional code reading operation setting)
15 to 20 show screen images for setting the operation of the main body of the two-dimensional code reader. On this screen, the setting of the reading code, the setting of the reading operation, the setting of the output, the setting related to the predictive maintenance information, the setting of the communication, and other settings are switched for each tab. Hereinafter, each will be described. Here, the hardware operation of the two-dimensional code reader itself is set, and is performed separately from the setting according to the use conditions as in steps S1 and S2. Therefore, although step S3 is provided for convenience of description, the setting can be originally performed independently of steps S1 and S2 as described above, and the setting order is not limited to after steps S1 and S2. It can be before or during.
[0138]
In the screen of FIG. 15, a “read code” 44 is set. First, the type of the two-dimensional code to be read is selected in the “read code setting” column 45 as the read code. The types of two-dimensional codes that can be selected according to the specifications of the two-dimensional code reader are listed, and the user can select a plurality of desired types. Processing capacity and speed depend on the specifications of the two-dimensional code reader. Generally, if many types of two-dimensional codes are set, it takes a long time to read. Therefore, in order to shorten the reading processing time, unnecessary two-dimensional codes are unchecked to limit the read codes to be read.
[0139]
Further settings can be made according to the type of the selected two-dimensional code. For example, when a QR code is selected, a detailed setting screen of the QR code is displayed in a separate window, and the number of versions of the QR code to be read is limited by designating an upper limit and a lower limit. Etc. can be set. Alternatively, when the data matrix is selected, the number of cells and the field of view can be limited. When the number of cells is limited, the upper limit and the lower limit of the number of cells are specified. When the field of view is limited, the coordinates of the top of the field of view are, for example, upper left coordinates, lower right coordinates (1, 1), (640, 480). Specify as follows.
[0140]
Further, in the "two-dimensional code printing state" designation field 46, black / white inversion or front / back inversion can be designated, and a normal, dot, or the like is selected as a printing pattern. If "Other code" is selected and checked in the "Read code setting" column 45, the "Detailed setting of other code" column 47 on the right side can be input from grayout, and each item can be set. . With this setting, various types of two-dimensional codes and barcodes can be set as reading targets.
[0141]
15 to 20, the setting contents can be transmitted and received. The transmission / reception destinations are the memories 1 to 4 provided in the two-dimensional code reading operation main body, each of which can hold separate data. When the transmission / reception destination 50 is selected on each screen and the "setting transmission" button 48 is pressed, the setting content is transmitted to the specified destination, and when the "setting reception" button 49 is pressed, the setting content is fetched from the specified destination.
[0142]
In FIG. 16, a reading operation is set on a “reading operation” tab 51. Here, in the “reading mode” setting field 52, one of a level trigger, an edge trigger, and a soft trigger is selected for a single label, and a level trigger or continuous is selected for a multi-label. As the “details of reading mode” 53, “input time constant”, “one-shot time”, “trigger ON command”, trigger OFF command ”, and“ double reading prevention time ”are designated as necessary. Further, when the “Detailed binarization” button 54 is pressed, a “Binarization option” screen 83 shown in FIG. 27 is opened in another window, and the binarization method, the A / D conversion reference value, and the digital smoothing size are displayed. , Dot pattern setting, etc. can be set. There is no need to change these settings for normal operation.
[0143]
On the “output” tab 55 in FIG. 17, output settings are made. Here, one of after reading and after the trigger is turned off is selected as the “output timing” 56, and the presence / absence of OK terminal output, NG terminal output, and reading error code output are set. When the “Transfer data details” button 57 is pressed, a “Transfer data details” setting screen opens in another window, and “Symbol identifier transfer”, “Digit number transfer”, “Separator character transfer”, “BCC Is selected by turning on and off the check box.
[0144]
In the “predictive maintenance information” tab 58 in FIG. 18, the predictive maintenance information is set. Predictive maintenance information (PMI) is reading stability which is an index indicating the stability of reading of a two-dimensional code, and examines each contrast in an area constituting the lightness and darkness of the two-dimensional code, and determines a predetermined contrast. By comparing with the stability threshold, it is determined whether the reading is being performed stably. In the example of FIG. 18, it is set in the “PMI terminal output” column 59 whether or not predictive maintenance information is output from the PMI terminal. The PMI terminal is a dedicated I / O terminal for outputting predictive maintenance information, and corresponds to the reading stability output circuit 8.
[0145]
In the “predictive maintenance information (PMI)” setting column 60, it is set whether or not to add the predictive maintenance information to the decoded data obtained by reading the two-dimensional code. If this is checked, the predictive maintenance information is added to the decrypted data and transferred from the serial input / output unit 13 as serial data. Both the output from the PMI terminal and the output from the serial input / output unit 13 can be selected.
[0146]
Further, in the “predictive maintenance information (PMI)” setting column 60, a predictive maintenance set value 1 that is an upper stability threshold and a predictive maintenance set value 2 that is a lower stability threshold are input. For each of the predictive maintenance setting values, the user determines and inputs a reference value for determining that the contrast of light and dark obtained by reading the two-dimensional code has deteriorated and the reading stability has decreased according to the use environment. In this example, the stability of two-dimensional code reading is evaluated by three-stage evaluation using two stability thresholds.
[0147]
A “communication” tab 61 in FIG. 19 is a screen image showing a communication setting screen. Here, conditions for the two-dimensional code reader to communicate with the host system are set. In this example, serial communication is performed with a computer constituting the host system using RS-232C. In FIG. 19, the “communication speed” 62 is selected from a combo box of 4800 bps, 9600 bps, 19200 bps, 38400 bps, 57600 bps, and 115200 bps. The “data length” 63 is 7 bits or 8 bits, the “stop bit” 64 is 1 bit or 2 bits, the “parity” 65 is even or odd, and the “header, terminator” 66 is STX, ETX, CR. , LF, etc. are selected. Further, "flow control" 67 selects RTS / CTS control, and "communication means" 68 selects non-procedure or ACK / NAK. If "Reflect to PC's communication settings after setting is completed" 69 is checked, these settings are automatically reflected in the PC's communication settings, thereby changing the communication settings on the two-dimensional code reader side. Communication with the host system can be continued.
[0148]
FIG. 20 shows another setting screen on the “others” tab 70. Here, one of “none”, “always OFF”, “always on”, “trigger synchronization ON”, and “trigger synchronization OFF” is selected as the “external illumination output” 71 from the combo box. Further, whether or not “permit buzzer sound” and “display read data” are selected by a check box. Furthermore, as “setting for image storage” 72, the storage condition of the acquired image data is set. In this example, a maximum of 10 screens can be stored, and any of NG images only, OK images only, and all images can be selected.
[0149]
(Step S4 reading adjustment)
FIG. 21 and FIG. 22 show the reading adjustment screen. On this screen, it is possible to perform a reading test by operating the two-dimensional code label while actually setting it in the two-dimensional code reader. Further, an illuminance distribution test can be performed before setting the two-dimensional code. As described above, the two-dimensional code reader has the reading test mode for checking the reading operation and the illuminance distribution checking mode for checking the illuminance distribution state in the field of view of the camera. The two-dimensional code reader includes a reading adjustment unit for executing a reading test mode and an illuminance distribution confirmation mode. The reading adjustment means is realized by the arithmetic circuit shown in the block diagram of FIG. 1. As shown in FIGS. 21 and 22, the reading adjustment screen is obtained by selecting a "reading adjustment button" at the lower left of the screen. Mode can be operated. First, the reading test mode will be described.
[0150]
[Reading test mode]
In the reading test mode, the two-dimensional code reader actually performs a continuous reading operation on the two-dimensional code label, and displays a test result every predetermined number of trials. Further, this operation is repeated plural times, and a list of test results is displayed.
When the “setting ...” button 73 is pressed in FIG. 21 and FIG. 22, a “read test setting” screen 74 shown in FIG. Become. In the “display data” setting column 75, as items to be included in the display data displayed in the read test result display column 79 in FIGS. 21 and 22 as a result of the read test, “read data”, “read rate”, “Average reading time”, “Longest reading time”, “Average contrast”, and “Lowest contrast” can be selected, and the check box is checked for each item to be added to the display data. In the lower part of the “display data” setting column 75, a sample 76 of the selected display data is displayed. By turning on / off the check box of each item, the display sample changes accordingly, and the currently selected sample is changed. The user can check how the displayed data is displayed.
[0151]
In the “display format” designation column 77 in FIGS. 21 and 22, it is selected whether to display the acquired data as “raw data” or “binary data”. When the reading test is set in this way and the “test start” button 78 is pressed after the two-dimensional code is actually set in the two-dimensional code reading device, a confirmation screen for performing the reading test opens, and “ Please place the two-dimensional code and adjust the focus, aperture and lighting position. " Here, when the OK button is pressed, reading of the two-dimensional code is started. When the “test start” button 78 is pressed, the two-dimensional code reader setting program continuously performs a reading test, and performs the number of trials (default 10 times) specified on the “reading test setting” screen 74. The test result is displayed on one line each time, and this is repeated and displayed in the read test result display column 79.
[0152]
FIG. 21 shows an example when the reading rate is high, and FIG. 22 shows an example when the reading rate is low. In these figures, as the information displayed in the read test result display column 79, read data, read rate, average read time, longest read time, average contrast, and minimum contrast are displayed from the left. A reading rate of 100% is a measure of reading stability. In FIG. 22 where the reading result is low as compared with FIG. 21 where the reading result is good, it can be seen that the case where the reading rate is low increases, the reading time is long, and the contrast is low. As described above, information such as the reading rate and the reading time can be displayed by actually performing reading under the set conditions, and the reading stability can be known. Therefore, the user can perform a reading test and set stable conditions.
[0153]
[Illuminance distribution check mode]
Next, the illuminance distribution confirmation mode will be described. In the illuminance distribution confirmation mode, the illuminator is operated and illuminated without setting the two-dimensional code or a work including the two-dimensional code in the two-dimensional code reader, and the illuminance of the background is obtained from the image data acquired by the imaging unit. This is a mode for executing an illuminance distribution test for confirming the distribution of. In Fig. 21 and Fig. 22, when "Reading adjustment (T)"->"Illuminance distribution test" is selected from the menu, a confirmation screen for performing the illuminance distribution test opens and a message "Perform the illuminance distribution test" is displayed. Is done. Here, when the OK button is pressed, the illuminance distribution in a state where the illumination is actually applied to the two-dimensional code is measured, and the illuminance distribution screen 80 showing the measurement result is displayed in another window. One example of the results of the illuminance distribution test is shown in FIGS. 24 and 25 show a good example, and FIG. 26 shows a bad example. In these figures, the illuminance distribution is displayed by dividing the field of view into blocks in the illuminance distribution display column 81 on the left side. The average brightness is calculated as the average illuminance for each block, and the illuminance is displayed in different colors stepwise such that the brighter the illuminance becomes white, and the darker it becomes black, as in the scale displayed at the lower right.
[0154]
On the right side, an example of a preferable illuminance distribution is shown as a “recommended pattern” 82. By referring to the recommended pattern 82 and repeating the illuminance distribution confirmation test while changing the settings, the illuminance distribution pattern can be set to be closer to the recommended pattern by checking the illuminance distribution display column 81. In FIG. 24, the illuminance is uniformly distributed with sufficiently bright illuminance. In FIG. 25, although the illuminance is slightly inferior on the right side, sufficient illuminance is obtained. On the other hand, in FIG. 26, the entire area is dark and sufficient illuminance is not obtained. Therefore, when the illuminance distribution as shown in FIG. 26 is displayed, the amount of illumination, the mounting position, the angle, and the like are adjusted so as to approach the recommended pattern. The illuminance distribution test is performed again in the adjusted state to check whether the illuminance distribution has been improved. In this way, the user can adjust the illumination while checking the illuminance distribution.
[0155]
In this example, the obtained image data of 640 × 480 pixels is divided into rectangular blocks of 64 × 48 pixels, and the average of illuminance is measured for each of 10 × 10 blocks. ing. This block corresponds to a block in the image data binarization method.
[0156]
[Binarization method]
There are various methods for binarizing an analog signal of image data. When the “Details of binarization” button 54 is pressed on the screen of FIG. 16, a “Binarization option” screen 83 of FIG. 27 is displayed, and the binarization method is selected in the “Binarization method” setting column 84. , Can be set. In this example, one of division binarization 1, division binarization 2, and fixed can be selected.
[0157]
Division binarization 1” is a method of dividing image data into a plurality of blocks (for example, 16 × 16 pixels) as described above, and binarizing based on the average brightness of each block and a fixed threshold value of the entire image. It is. The fixed threshold value of the entire image is automatically calculated by the two-dimensional code reader as described later, and need not be specified by the user. This method is used when both brightness unevenness and background noise are relatively large. When there is much unevenness or noise, one of the following methods is preferable according to the unevenness or noise.
[0158]
Division binarization 2” is a method of dividing image data into a plurality of blocks and binarizing the image data based on the average brightness of each block. In this method, a brightness histogram is calculated for each block to calculate an average brightness, and a threshold value for binarization changes in each block. This method is used when there is much lightness unevenness and little background noise. Such division binarization is effective when there is a problem with binarization based on a fixed threshold value of the entire image. For example, if the illumination is not uniformly illuminated and the acquired image data has gradations such that bright and dark parts are unevenly distributed, binarization is performed based on the entire screen, resulting in a bias and incorrect binarization. A situation that cannot be priced occurs. In such a case, by dividing the image and setting a threshold for binarization in each region, binarized data can be obtained correctly.
[0159]
On the other hand, “fixed” is a method of binarizing the entire image data with a fixed fixed threshold. In this method, the user can directly specify a fixed threshold unlike the above-described “division binarization 1”. When “fixed” is selected on the screen in FIG. 27, the “binarization level” input field 85 becomes gray-outable, and the user inputs a fixed threshold as “binarization level”. This method is used when brightness unevenness is small and background noise is large.
[0160]
The fixed threshold value can be directly designated by the user or can be calculated by the two-dimensional code reader. The fixed threshold can be calculated, for example, from a histogram indicating the distribution of the brightness of the entire image. The central brightness of each of the bright part (white) and the dark part (black) can be obtained from the histogram, and the contrast of the difference can be used as an index of the reading stability. In this example, in order to calculate the fixed threshold value, “binary level automatic detection” is selected from “reading adjustment (T)” in the menu on the reading adjustment screens of FIGS. Then, "Automatically detect the appropriate binarization level when fixing the binarization method. Place the two-dimensional code in the field of view and adjust the focus, aperture, and lighting position." When a dialog box is displayed and OK is pressed, the binarization level automatic detection is executed. The message "The binarization level is automatically detected. The binarization level is automatically detected. Please wait for a while." Is displayed, and the optimal fixed threshold value is calculated in about one minute. The calculated value can be displayed on the screen as needed, and can be automatically set as a fixed threshold.
[0161]
As described above, there are various binarization methods, and the user selects an appropriate binarization method according to the use conditions of the two-dimensional code reader. At that time, the above-described operation test and illuminance distribution confirmation are effective. In other words, before operating the two-dimensional code reader, the illuminance distribution is first checked, and then the actual reading of the two-dimensional code is tested to determine whether the optimal binarization method is selected. It can be checked in advance. In each binarization method, each set value can be adjusted to a more optimal value. Furthermore, the above-mentioned reading conditions other than the binarization method can be set to appropriate values. For example, if it is determined that the reading stability is poor as a result of the reading test in step S4, the process returns to step S2 and can be changed and adjusted to a setting that improves such a problem. Then, a reading test is performed again under the changed conditions, and if it is confirmed that stable reading can be performed, the setting is completed. In this way, by feeding back the result of the reading trial, more preferable conditions are searched for, and the operation of further trials is repeated to finally adjust to the optimal conditions, and also the reading accuracy is improved or the reading processing speed is improved. It is possible to set the two-dimensional code reading conditions according to a desired purpose. Furthermore, by conducting a test before the introduction and operation of the two-dimensional code reader, it is possible to actually read the two-dimensional code and check the reading stability, etc. There is also an advantage that trouble can be prevented beforehand.
[0162]
【The invention's effect】
As described above, the two-dimensional code reading device, the two-dimensional code reading method, the two-dimensional code reading program, and the computer-readable recording medium of the present invention can read the two-dimensional code by outputting the reading stability. Even in a successful state, it is possible to know the degree of stability with which the reading has been performed, and it is possible to detect in advance the decrease in stability. As a result, necessary measures can be taken against a decrease in the reading stability, and it is possible to avoid a situation in which the two-dimensional code becomes unreadable suddenly.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a two-dimensional code reader according to one embodiment of the present invention.
FIG. 2 is a schematic diagram showing examples of various two-dimensional codes.
FIG. 3 is a flowchart illustrating an example of a procedure of a two-dimensional code reading method according to the first embodiment of the present invention.
FIG. 4 is a flowchart illustrating another example of the procedure of the two-dimensional code reading method according to the first embodiment of the present invention.
FIG. 5 is a flowchart illustrating another example of the procedure of the two-dimensional code reading method according to the first embodiment of the present invention.
FIG. 6 is a flowchart illustrating another example of the procedure of the two-dimensional code reading method according to the first embodiment of the present invention.
FIG. 7 is an image diagram showing a screen for determining a specification of a two-dimensional code in a specification determination step of a two-dimensional code.
FIG. 8 is an image diagram showing a two-dimensional code detail setting screen in a two-dimensional code specification determining step.
FIG. 9 is an image diagram showing a detailed print setting screen in a specification step of two-dimensional code specification.
FIG. 10 is an image diagram illustrating a setting screen for determining a camera mounting condition without a button for calculating a symbol size in setting the camera mounting condition.
FIG. 11 is an image diagram showing a setting screen for determining a camera attachment condition in which a symbol size can be calculated in setting the camera attachment condition.
FIG. 12 is an image diagram showing a symbol size calculation setting screen in setting camera attachment conditions.
FIG. 13 is an image diagram showing details of camera mounting conditions in setting of camera mounting conditions.
FIG. 14 is an image diagram showing an attachment image in setting camera attachment conditions.
FIG. 15 is an image diagram showing a read code setting screen in an operation setting of the two-dimensional code reader.
FIG. 16 is an image diagram showing a setting screen of a reading operation in an operation setting of the two-dimensional code reading device.
FIG. 17 is an image diagram showing an output setting screen in an operation setting of the two-dimensional code reader.
FIG. 18 is an image diagram showing a setting screen of predictive maintenance information in an operation setting of the two-dimensional code reader.
FIG. 19 is an image diagram showing a communication setting screen in an operation setting of the two-dimensional code reader.
FIG. 20 is an image diagram showing another setting screen in the operation setting of the two-dimensional code reader.
FIG. 21 is an image diagram showing an example in which a reading rate is high as a result of a reading test on a reading adjustment screen.
FIG. 22 is an image diagram showing an example in which the reading rate is low as a result of the reading test on the reading adjustment screen.
FIG. 23 is an image diagram showing a reading test setting screen on the reading adjustment screen.
FIG. 24 is an image diagram showing an example of a good illuminance distribution as a result of an illuminance distribution test on a reading adjustment screen.
FIG. 25 is an image diagram showing another example of a good illuminance distribution as a result of the illuminance distribution test on the reading adjustment screen.
FIG. 26 is an image diagram showing an example of a poor illuminance distribution as a result of an illuminance distribution test on a reading adjustment screen.
FIG. 27 is an image diagram showing a binarization option screen in an operation setting of the two-dimensional code reader.
[Explanation of symbols]
1 ... Decoding unit
2 ... Imaging unit
3 Lighting unit
4 Camera
5 Lens
6 ... Image processing circuit
7 arithmetic circuit
8 ... Reading stability output circuit
9 Control unit
10 ... Image processing unit
11 ... Decryption processing unit
12 ... Reading stability determining unit
13 ・ ・ ・ Serial input / output unit
14 Host system
15 ... two-dimensional code
16 ... "Code type" designation field
17 ・ ・ ・ 2D code sample display field
18 ... "Data type" designation field
19 ... "Details ..." button
20: 2D code detail setting screen
21 ... "Data amount" designation field
22 ... "Printable space" designation field
23 ... "Calculation start" button
24 ・ ・ ・ Calculation result display column
25 ... "Print details" button
26 ... Detailed print setting screen
27 ... "Specification of two-dimensional code"
28 ... "Position shift tolerance of two-dimensional code label"
29 ... "Print pattern"
30 ... "desired installation distance"
31 ... Slider
32 ... "Symbol size" input field
33 ... "Calculate symbol size" button
34 ... "Calculation of symbol size" setting screen
35 ... "Start calculation" button
36 ・ ・ ・ "Mounting specification" display field
37 ... "Details of mounting conditions" button
38 ・ ・ ・ Detailed screen of camera mounting conditions
39 ・ ・ ・ Mounting condition details display column
40 ... "In-focus range" display field
41 ... "Close-up ring combination" column
42 ... "Ratio of code to field of view" column
43 ・ ・ ・ Mounting image
44 ... "Reading code"
45 ... "Reading code setting" column
46 ... "Print condition of 2D code" designation field
47 ... "Detailed setting of other codes" column
48 ... "Send settings" button
49 ... "Setting received" button
50 ... destination
51 ... "Reading operation" tab
52 "Reading mode" setting column
53 ... "Details of reading mode"
54 ... "Details of binarization" button
55 ... "Output" tab
56 ... "Output timing"
57 ... "Transfer data details" button
58 ・ ・ ・ "Predictive maintenance information" tab
59 ... "PMI terminal output" column
60: "Predictive maintenance information (PMI)" setting column
61 ... "Communication" tab
62 ... "communication speed"
63 ... "data length"
64 ... "stop bit"
65 ... "Parity"
66 ... "header, terminator"
67 ... "Flow control"
68 ... "communication means"
69 ... "After setting is completed, it is reflected in the communication setting of PC"
70 ... "Others" tab
71 ... "External lighting output"
72 ... "Setting for saving images"
73 ... "Setting ..." button
74 ... "Reading test setting" screen
75 ... "Display data" setting column
76 ... sample of display data
77 ... "Display format" designation field
78 ... "Start test" button
79 ・ ・ ・ Reading test result display field
80 ... Illuminance distribution screen
81 ・ ・ ・ Illuminance distribution display field
82 ... "Recommended pattern"
83 ... "Binarization option" screen
84: "Binarization method" setting column
85 ... "Binarization level" input field

Claims (25)

二次元コードを含む画像を取得するための撮像部および前記撮像部での画像取得の際に照明を提供するための照明部に接続可能であって、前記撮像部で取得された画像データを画像処理して二次元コードを復号するための復号部を備える二次元コード読取装置において、
二次元コード中の所定の読取安定度決定領域において濃淡のコントラストを算出し、これを所定の安定度閾値と比較して読取安定度を決定するための読取安定度決定部と、
を備えることを特徴とする二次元コード読取装置。
An image pickup unit for acquiring an image including a two-dimensional code and connectable to an illumination unit for providing illumination at the time of image acquisition by the image pickup unit, the image data acquired by the image pickup unit In a two-dimensional code reader including a decoding unit for processing and decoding a two-dimensional code,
A reading stability determining unit for calculating contrast of light and shade in a predetermined reading stability determination area in the two-dimensional code, and comparing the calculated contrast with a predetermined stability threshold to determine reading stability;
A two-dimensional code reader, comprising:
前記濃淡のコントラストを算出する所定の読取安定度決定領域が、二次元コード内の濃部と淡部との位置関係が予め定められている領域であることを特徴とする請求項1記載の二次元コード読取装置。2. The method according to claim 1, wherein the predetermined reading stability determination area for calculating the contrast of the shade is an area in which the positional relationship between the dark part and the light part in the two-dimensional code is predetermined. Dimension code reader. 前記濃淡のコントラストを算出する所定の読取安定度決定領域が、二次元コードのファインダパターン、タイミングパターン、タイミングセル、アライメントパターン、フォーマット情報、セパレータ、マージンのいずれかまたはこれらのうち2以上の組み合わせであることを特徴とする請求項1記載の二次元コード読取装置。The predetermined reading stability determination area for calculating the contrast of the shade is a finder pattern, a timing pattern, a timing cell, an alignment pattern, a format information, a separator, a margin of a two-dimensional code, or a combination of two or more of these. 2. The two-dimensional code reader according to claim 1, wherein: 前記濃淡のコントラストを算出する所定の読取安定度決定領域が、二次元コードが含まれる画像イメージからシンボルを切り出すためのファインダパターンであることを特徴とする請求項1記載の二次元コード読取装置。2. The two-dimensional code reading device according to claim 1, wherein the predetermined reading stability determination area for calculating the contrast of light and shade is a finder pattern for cutting out a symbol from an image including a two-dimensional code. 3. 前記濃淡のコントラストを算出する所定の読取安定度決定領域が、二次元コードに含まれるすべての領域であることを特徴とする請求項1記載の二次元コード読取装置。2. The two-dimensional code reading apparatus according to claim 1, wherein the predetermined reading stability determination area for calculating the contrast of light and shade is all areas included in a two-dimensional code. 前記二次元コード読取装置はさらに、前記読取安定度決定部が算出した前記読取安定度が所定の警告閾値を下回ったとき、読取安定度の低下を知らせる読取安定度低下信号を出力する読取安定度出力部を備えることを特徴とする請求項1から5のいずれか記載の二次元コード読取装置。The two-dimensional code reader further outputs a read stability reduction signal that indicates a decrease in read stability when the read stability calculated by the read stability determining unit falls below a predetermined warning threshold. The two-dimensional code reader according to any one of claims 1 to 5, further comprising an output unit. 二次元コードに符号化された情報を復号化する二次元コードの読取方法であって、
撮像部により二次元コードを含む画像を取得するステップと、
取得した画像データをA/D変換するステップと、
A/D変換した画像データから、二次元コードの領域を切り出すステップと、
切り出した二次元コードの画像データからセルの境界を判定し、各セルに分割するステップと、
各セルの画像データを所定の閾値に基づいて二値化もしくは多値化するステップと、
前記二値化もしくは多値化されたデータに対して復号処理を行うステップと
を含み、前記二次元コード読取方法はさらに
二次元コードの所定の読取安定度決定領域において前記A/D変換されたデータの濃淡のコントラストを算出し、濃淡のコントラストを所定の安定度閾値と比較することにより、二次元コードの読取の安定度を示す指標となる読取安定度を決定し出力するステップを含むことを特徴とする二次元コード読取方法。
A two-dimensional code reading method for decoding information encoded in a two-dimensional code,
Obtaining an image including a two-dimensional code by the imaging unit;
A / D converting the acquired image data;
Cutting out a two-dimensional code area from the A / D converted image data;
Judging the boundaries of the cells from the image data of the cut-out two-dimensional code, dividing the cells,
A step of binarizing or multi-leveling the image data of each cell based on a predetermined threshold,
Performing a decoding process on the binarized or multi-valued data, wherein the two-dimensional code reading method further includes performing the A / D conversion in a predetermined reading stability determination area of the two-dimensional code. Calculating a contrast of light and shade of data and comparing the contrast of light and shade with a predetermined stability threshold to determine and output reading stability as an index indicating stability of reading of the two-dimensional code. Characteristic two-dimensional code reading method.
前記所定の読取安定度決定領域が、二次元コード内の濃部と淡部との位置関係が予め定められている領域であることを特徴とする請求項7記載の二次元コード読取方法。8. The two-dimensional code reading method according to claim 7, wherein the predetermined reading stability determination area is an area in which a positional relationship between a dark part and a light part in the two-dimensional code is predetermined. 前記所定の読取安定度決定領域が、二次元コードに含まれるファインダパターン、タイミングパターン、タイミングセル、アライメントパターン、フォーマット情報、セパレータ、マージンのいずれかまたはこれらのうち2以上の組み合わせであることを特徴とする請求項7記載の二次元コード読取方法。The predetermined reading stability determination area is any one of a finder pattern, a timing pattern, a timing cell, an alignment pattern, format information, a separator, and a margin included in a two-dimensional code, or a combination of two or more of these. The two-dimensional code reading method according to claim 7, wherein 前記所定の読取安定度決定領域が、二次元コードが含まれる画像イメージからシンボルを切り出すためファインダパターンであることを特徴とする請求項7記載の二次元コード読取方法。8. The two-dimensional code reading method according to claim 7, wherein the predetermined reading stability determination area is a finder pattern for extracting a symbol from an image including a two-dimensional code. 前記所定の読取安定度決定領域が、二次元コードに含まれるすべての領域であることを特徴とする請求項7記載の二次元コード読取方法。The two-dimensional code reading method according to claim 7, wherein the predetermined reading stability determination area is all areas included in a two-dimensional code. 前記読取安定度を算出するステップが、データの復号処理を行うステップの後に行われることを特徴とする請求項7から11のいずれか記載の二次元コード読取方法。12. The two-dimensional code reading method according to claim 7, wherein the step of calculating the reading stability is performed after the step of performing a data decoding process. 前記読取安定度を算出するステップが、データの復号処理を行うステップの前に行われることを特徴とする請求項7から11のいずれか記載の二次元コード読取方法。The two-dimensional code reading method according to any one of claims 7 to 11, wherein the step of calculating the reading stability is performed before the step of performing data decoding processing. 前記読取安定度を算出するステップが、前記各セルの二値化もしくは多値化ステップの前に行われることを特徴とする請求項7から11のいずれか記載の二次元コード読取方法。12. The two-dimensional code reading method according to claim 7, wherein the step of calculating the reading stability is performed before the binarization or multi-level conversion of each cell. 前記読取安定度を算出するステップが、前記セルの分割ステップの前に行われることを特徴とする請求項7から11のいずれか記載の二次元コード読取方法。12. The two-dimensional code reading method according to claim 7, wherein the step of calculating the reading stability is performed before the cell dividing step. 前記読取安定度を算出するステップで使用される前記閾値を、ユーザが任意に設定可能であることを特徴とする請求項7から15のいずれか記載の二次元コード読取方法。16. The two-dimensional code reading method according to claim 7, wherein a user can arbitrarily set the threshold used in the step of calculating the reading stability. 前記読取安定度を算出するステップで使用される前記閾値を、二次元コード読取装置が自動的に演算して設定可能であることを特徴とする請求項7から15のいずれか記載の二次元コード読取方法。The two-dimensional code according to any one of claims 7 to 15, wherein the threshold used in the step of calculating the reading stability can be automatically calculated and set by a two-dimensional code reader. Reading method. 前記読取安定度を算出するステップが、前記所定の読取安定度決定領域に含まれる複数の座標位置での濃淡のコントラストの平均値、最頻値、または合計値を前記閾値と比較することを特徴とする請求項7から17のいずれか記載の二次元コード読取方法。The step of calculating the reading stability includes comparing an average value, a mode value, or a total value of contrasts of shades at a plurality of coordinate positions included in the predetermined reading stability determination area with the threshold value. The two-dimensional code reading method according to any one of claims 7 to 17, wherein 前記閾値が複数の閾値を有することを特徴とする請求項7から18のいずれか記載の二次元コード読取方法。19. The two-dimensional code reading method according to claim 7, wherein the threshold has a plurality of thresholds. 前記読取安定度の出力が、所定の段階評価であることを特徴とする請求項7から18のいずれか記載の二次元コード読取方法。19. The two-dimensional code reading method according to claim 7, wherein the output of the reading stability is a predetermined grade evaluation. 二次元コードに符号化された情報を復号化する二次元コードの読取方法であって、
撮像部により二次元コードを含む画像を取得するステップと、
取得した画像データをA/D変換するステップと、
A/D変換した画像データから、二次元コードの領域を切り出すステップと、切り出した二次元コードの画像データからセルの境界を判定し、各セルに分割するステップと、
各セルの画像データを所定の閾値に基づいて二値化もしくは多値化するステップと、
前記二値化もしくは多値化されたデータに対して復号処理を行うステップと
を含み、前記二次元コード読取方法はさらに
二次元コードの所定の読取安定度決定領域において前記A/D変換されたデータの濃淡のコントラストを算出し、これを二次元コードの読取の安定度を示す指標となる読取安定度として出力するステップを含むことを特徴とする二次元コード読取方法。
A two-dimensional code reading method for decoding information encoded in a two-dimensional code,
Obtaining an image including a two-dimensional code by the imaging unit;
A / D converting the acquired image data;
A step of cutting out a two-dimensional code area from the A / D-converted image data, a step of judging a cell boundary from the cut-out two-dimensional code image data, and dividing the cell into each cell;
A step of binarizing or multi-leveling the image data of each cell based on a predetermined threshold,
Performing a decoding process on the binarized or multi-valued data, wherein the two-dimensional code reading method further includes performing the A / D conversion in a predetermined reading stability determination area of the two-dimensional code. A two-dimensional code reading method, comprising calculating a contrast of light and shade of data and outputting the calculated contrast as a reading stability which is an index indicating the stability of reading of the two-dimensional code.
二次元コードに符号化された情報を復号化する二次元コードの読取方法であって、
撮像部により二次元コードを含む画像を取得するステップと、
取得した画像データをA/D変換するステップと、
A/D変換した画像データから、二次元コードの領域を切り出すステップと、
切り出した二次元コードの画像データからセルの境界を判定し、各セルに分割するステップと、
各セルの画像データを所定の閾値に基づいて二値化もしくは多値化するステップと、
前記二値化もしくは多値化されたデータに対して復号処理を行うステップと
を含み、前記二次元コード読取方法はさらに
二次元コードの切り出しステップ、セルの分割ステップ、各セルの二値化もしくは多値化ステップの内いずれかのステップ、またはこれらのうち2以上のステップについて、処理に要した時間を所定の安定度基準時間と比較することにより、二次元コードの読取の安定度を示す指標となる読取安定度を決定し出力するステップを含むことを特徴とする二次元コード読取方法。
A two-dimensional code reading method for decoding information encoded in a two-dimensional code,
Obtaining an image including a two-dimensional code by the imaging unit;
A / D converting the acquired image data;
Cutting out a two-dimensional code area from the A / D converted image data;
Judging the boundaries of the cells from the image data of the cut-out two-dimensional code, dividing the cells,
A step of binarizing or multi-leveling the image data of each cell based on a predetermined threshold,
Performing a decoding process on the binarized or multi-valued data, wherein the two-dimensional code reading method further includes a two-dimensional code cutout step, a cell division step, a binarization of each cell, An index indicating the stability of reading of a two-dimensional code by comparing the time required for processing for any of the multi-valued steps or two or more of these steps with a predetermined stability reference time. A step of determining and outputting a reading stability to be two-dimensional code.
二次元コードに符号化された情報を復号化する二次元コードの読取方法であって、
撮像部により二次元コードを含む画像を取得するステップと、
取得した画像データをA/D変換するステップと、
A/D変換した画像データから、二次元コードの領域を切り出すステップと、切り出した二次元コードの画像データからセルの境界を判定し、各セルに分割するステップと、
各セルの画像データを所定の閾値に基づいて二値化もしくは多値化するステップと、
前記二値化もしくは多値化されたデータに対して復号処理を行うステップと
を含み、前記二次元コード読取方法はさらに
二次元コードに含まれる誤り訂正コードの使用率に基づいて、二次元コードの読取の安定度を示す指標となる読取安定度を決定し出力するステップを含むことを特徴とする二次元コード読取方法。
A two-dimensional code reading method for decoding information encoded in a two-dimensional code,
Obtaining an image including a two-dimensional code by the imaging unit;
A / D converting the acquired image data;
A step of cutting out a two-dimensional code area from the A / D-converted image data, a step of judging a cell boundary from the cut-out two-dimensional code image data, and dividing the cell into each cell;
A step of binarizing or multi-leveling the image data of each cell based on a predetermined threshold,
Performing a decoding process on the binarized or multi-valued data, wherein the two-dimensional code reading method further comprises a two-dimensional code A step of determining and outputting a reading stability which is an index indicating the reading stability of the two-dimensional code.
コンピュータに
撮像部により二次元コードを含む画像を取得する機能と、
取得した画像データをA/D変換する機能と、
A/D変換した画像データから、二次元コードの領域を切り出す機能と、
切り出した二次元コードの画像データからセルの境界を判定し、各セルに分割する機能と、
各セルの画像データを所定の閾値に基づいて二値化もしくは多値化する機能と、
前記二値化もしくは多値化されたデータに対して復号処理を行う機能と、
を実現させるための、二次元コードに符号化された情報を復号化する二次元コードの読取プログラムであって、前記二次元コード読取プログラムはさらに
二次元コードの所定の読取安定度決定領域において前記A/D変換されたデータの濃淡のコントラストを算出し、濃淡のコントラストを所定の安定度閾値と比較することにより、二次元コードの読取の安定度を示す指標となる読取安定度を決定し出力する機能を実現させることを特徴とする二次元コード読取プログラム。
A function of acquiring an image including a two-dimensional code by an imaging unit in a computer,
A / D conversion function of the acquired image data;
A function of cutting out a two-dimensional code area from the A / D converted image data;
A function of determining a cell boundary from the extracted two-dimensional code image data and dividing the cell into cells;
A function of binarizing or multi-leveling the image data of each cell based on a predetermined threshold,
A function of performing a decoding process on the binarized or multi-valued data,
A two-dimensional code reading program for decoding information encoded in a two-dimensional code, wherein the two-dimensional code reading program further includes a two-dimensional code in a predetermined reading stability determination area. The contrast of the contrast of the A / D converted data is calculated, and the contrast of the contrast is compared with a predetermined stability threshold value to determine and output the reading stability as an index indicating the reading stability of the two-dimensional code. A two-dimensional code reading program characterized by realizing a function of performing two-dimensional code reading.
前記請求項24に記載の二次元コード読取プログラムを記録したコンピュータ読み取り可能な記録媒体。A computer-readable recording medium recording the two-dimensional code reading program according to claim 24.
JP2002211848A 2002-07-19 2002-07-19 Two-dimensional code reader, two-dimensional code reading method, two-dimensional code reading program and computer-readable recording medium Pending JP2004054645A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002211848A JP2004054645A (en) 2002-07-19 2002-07-19 Two-dimensional code reader, two-dimensional code reading method, two-dimensional code reading program and computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002211848A JP2004054645A (en) 2002-07-19 2002-07-19 Two-dimensional code reader, two-dimensional code reading method, two-dimensional code reading program and computer-readable recording medium

Publications (1)

Publication Number Publication Date
JP2004054645A true JP2004054645A (en) 2004-02-19

Family

ID=31934931

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002211848A Pending JP2004054645A (en) 2002-07-19 2002-07-19 Two-dimensional code reader, two-dimensional code reading method, two-dimensional code reading program and computer-readable recording medium

Country Status (1)

Country Link
JP (1) JP2004054645A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008152656A (en) * 2006-12-19 2008-07-03 Oki Electric Ind Co Ltd Medium processing system
JP2009169931A (en) * 2007-12-20 2009-07-30 Denso Wave Inc Optical information reader
JP2011186778A (en) * 2010-03-09 2011-09-22 Nippon Signal Co Ltd:The Card processor
JP2018045684A (en) * 2016-07-29 2018-03-22 タタ コンサルタンシー サービシズ リミテッドTATA Consultancy Services Limited System and method for unmanned aerial vehicle navigation for inventory management
JP2018050116A (en) * 2016-09-20 2018-03-29 カシオ計算機株式会社 Optical communication device, optical communication method, and program
EP3567513A1 (en) 2018-05-11 2019-11-13 Optoelectronics Co., Ltd. Optical information reading apparatus and optical information reading method
EP3567514A1 (en) 2018-05-11 2019-11-13 Optoelectronics Co., Ltd. Optical information reading apparatus and optical information reading method
CN112651259A (en) * 2020-12-29 2021-04-13 芜湖哈特机器人产业技术研究院有限公司 Two-dimensional code positioning method and mobile robot positioning method based on two-dimensional code
JPWO2021182038A1 (en) * 2020-03-11 2021-09-16
CN114580456A (en) * 2016-01-26 2022-06-03 手持产品公司 Enhanced matrix symbol error correction method

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008152656A (en) * 2006-12-19 2008-07-03 Oki Electric Ind Co Ltd Medium processing system
JP2009169931A (en) * 2007-12-20 2009-07-30 Denso Wave Inc Optical information reader
JP2011186778A (en) * 2010-03-09 2011-09-22 Nippon Signal Co Ltd:The Card processor
CN114580456A (en) * 2016-01-26 2022-06-03 手持产品公司 Enhanced matrix symbol error correction method
CN114580456B (en) * 2016-01-26 2024-04-05 手持产品公司 Enhanced matrix symbol error correction method
JP2018045684A (en) * 2016-07-29 2018-03-22 タタ コンサルタンシー サービシズ リミテッドTATA Consultancy Services Limited System and method for unmanned aerial vehicle navigation for inventory management
JP2018050116A (en) * 2016-09-20 2018-03-29 カシオ計算機株式会社 Optical communication device, optical communication method, and program
EP3567514A1 (en) 2018-05-11 2019-11-13 Optoelectronics Co., Ltd. Optical information reading apparatus and optical information reading method
US10706246B2 (en) 2018-05-11 2020-07-07 Optoelectronics Co., Ltd. Optical information reading apparatus and optical information reading method
EP3944130A1 (en) 2018-05-11 2022-01-26 Optoelectronics Co., Ltd. Optical information reading apparatus and optical information reading method
US10565417B2 (en) 2018-05-11 2020-02-18 Optoelectronics Co., Ltd. Optical information reading apparatus and optical information reading method
EP3567513A1 (en) 2018-05-11 2019-11-13 Optoelectronics Co., Ltd. Optical information reading apparatus and optical information reading method
JPWO2021182038A1 (en) * 2020-03-11 2021-09-16
JP7414953B2 (en) 2020-03-11 2024-01-16 株式会社日立ハイテク automatic analyzer
CN112651259A (en) * 2020-12-29 2021-04-13 芜湖哈特机器人产业技术研究院有限公司 Two-dimensional code positioning method and mobile robot positioning method based on two-dimensional code

Similar Documents

Publication Publication Date Title
JP3923866B2 (en) Two-dimensional code reading device setting method, two-dimensional code reading setting device, two-dimensional code reading device setting program, and computer-readable recording medium
US6966495B2 (en) Devices method and computer program for position determination
EP2921997B1 (en) Two-dimensional code
KR101348494B1 (en) Optical symbol, article to which the optical symbol is attached, method for attaching optical symbol to article, optical symbol decoding method, related device, and related program
US6830197B2 (en) Compact matrix code and one-touch device and method for code reading
US8879832B2 (en) Color matrix code
US9734443B2 (en) Two-dimensional code, two-dimensional-code analysis system, and two-dimensional-code generation system
JP4226291B2 (en) Two-dimensional code reader
EP2544128A1 (en) Method for creating and method for decoding two-dimensional colour code
JP2004234318A (en) Two-dimension information code, and display method, generation method and reading method thereof
JP7263423B2 (en) Improved matrix symbol error fix
US20160283763A1 (en) Two-dimensional code
JP2004054645A (en) Two-dimensional code reader, two-dimensional code reading method, two-dimensional code reading program and computer-readable recording medium
JP5673257B2 (en) Code reading apparatus, code reading method and code reading program
JP4342936B2 (en) Position determining device, method and computer program
JP4404224B2 (en) Optical recognition code recognition apparatus, method and program
CN110188854B (en) Color bar code, code judging method and code judging system
CN107979710B (en) Read control device, control method, and storage medium
JP2008305058A (en) Code reading device and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050616

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071119

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071127

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080422