JP4098481B2 - Information code reading method and apparatus - Google Patents
Information code reading method and apparatus Download PDFInfo
- Publication number
- JP4098481B2 JP4098481B2 JP2001045661A JP2001045661A JP4098481B2 JP 4098481 B2 JP4098481 B2 JP 4098481B2 JP 2001045661 A JP2001045661 A JP 2001045661A JP 2001045661 A JP2001045661 A JP 2001045661A JP 4098481 B2 JP4098481 B2 JP 4098481B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- mark
- information code
- maximum value
- minimum value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Projection-Type Copiers In General (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、情報コードの読取方法及び装置に関し、特にデータマークを走査方向に並べて構成した情報コードを読取センサで走査し、この走査信号に基づき情報コードを読み取る方法及び装置に関するものである。
【0002】
【従来の技術】
写真プリンタや感熱プリンタでは、長尺の印画紙や感熱記録紙をロール状に巻いたロール紙が使用され、例えばプリント後に規定の大きさにカットしている。これらの印画紙や感熱記録紙は、感光性や光定着性が付与されているため、保湿性と遮光性とを備えたロール紙用給紙マガジン(以下、給紙マガジンという。)に収納された状態で、プリンタにセットされている。
【0003】
この給紙マガジンは、保湿性と遮光性とを備えた材質で成形されたマガジン本体と、このマガジン本体にロール紙を装填する際に開かれる蓋とから構成されている。そして、マガジン本体内には、給紙ローラが設けられ、この周面にロール紙の外周面が押しつけられている。給紙ローラがプリンタ側からの駆動によって回転されると、ロール紙が回転され、記録紙がマガジン本体に設けられた排出口からプリンタ内の記録位置へ送り出される。
【0004】
ところで、記録紙は感度によって記録濃度が変化する。また、通常の記録紙と、シールプリント用の記録紙とではプリントする画像が異なる。そこで、例えば感熱記録紙では、ロール紙の巻芯の端面に、記録紙の種類、熱感度、メーカ名等の情報を表す情報コードを設けている。また、感熱プリンタでは、この情報コードをコード読取装置によって読み取り、この情報に基づきプリント条件を設定している。
【0005】
前記情報コードは、スタートマークと多数のデータマークとから構成されている。そして、スタートマークはデータマークの例えば3倍の長さに設定されており、このスタートマークにより、データマークの読取開始位置を特定している。また、データマークは、各ビットの記録エリアの半分の長さに設定されており、この記録エリアの前半部分にマークを記録するか、又は後半部分にマークを記録するかにより、「0」と「1」と識別している。
【0006】
【発明が解決しようとする課題】
前記情報コードの読み取りは、光学的にマークを検出する読取センサにより、記録紙の送りによる巻芯の回転時に各マークの配列方向に走査することで読み取っている。しかしながら、情報コードの巻芯端面などへの印刷不良や、情報コードの表示面へのごみの付着や汚れ等によって、ノイズが増加したり、走査信号の振幅劣化が発生したりして、読み取りエラーが発生することがあった。
【0007】
本発明は上記課題を解決するためのものであり、ノイズの増加や走査信号の振幅劣化などに起因する読み取りエラーの発生を抑え、情報コードを確実に読み取ることができる情報コードの読取方法及び装置を提供することを目的とする。
【0010】
【課題を解決するための手段】
上記目的を達成するために、本発明では、回転体の周面又は端面にスタートマークと複数個のデータマークとが円周方向に並べて構成され、スタートマークはデータマークよりも円周方向で長く形成されている情報コードを、回転体の回転時に読取センサで走査し、読取センサからの出力信号に基づき前記情報コードの各ビットを識別して情報を読み取る情報コードの読取方法において、前記回転体を複数回転させて前記情報コードを読取センサで走査し、この出力信号をA/D変換してサンプリングデータとしてデータメモリに記憶するデータサンプリング工程と、前記サンプリングデータから最大値及び最小値を抽出し、前記最大値と最小値とから許容ノイズを算出し、この許容ノイズを超えて前記サンプリングデータが変動するときにこの変動点におけるサンプリングデータを極大値又は極小値として求め、求めた極大値及び極小値の中から隣接する極大値及び極小値に基づき前記各マークに対応する個別のスレッシュレベルを決定するスレッシュレベル決定工程と、決定したスレッシュレベルにより、前記各マーク部分の長さを求め、最長長さを有するマークをスタートマークとして検出するスタートマーク検出工程と、第1のスタートマークと第2のスタートマークとの間隔によりデータマークの最小長さを求めて各マークのエッジ部分が存在する領域を決定し、このエッジ存在領域において、前記サンプリングデータがスレッシュレベルを横切るポイントと横切る方向とからデータマークのビットが「0」か「1」かを判定するデータ判定工程とを備えることを特徴とする。
【0011】
なお、前記スレッシュレベル決定工程は、前記極大値と極小値との差の1/2を各マークのスレッシュレベルと決定している。
【0012】
本発明では、前記データ判定工程において、前記エッジ存在領域を下降してスレッシュレベルと交差するときにデータマークのビットを「0」または「1」と判定し、エッジ存在領域を昇降してスレッシュレベルと交差するときにデータマークのビットを前記判定とは逆の「1」または「0」と判定し、それ以外のときに読取エラーと判定している。
【0013】
本発明では、前記読取エラーと判定されたときに、前記許容ノイズの幅を変えて再度極大値、極小値を求め、この極大値及び極小値から求めた前記スレッシュレベルによりデータマークを再判定するデータ再判定工程を有している。なお、前記読取エラーと判定されたときに、前記スレッシュレベルを単に変更してデータマークを再判定してもよい。また、前記読取エラーと判定されたときに、前記エッジ存在領域を広げてデータマークを再判定してもよい。
【0014】
本発明では、前記スレッシュレベル決定工程は、極大値検出処理と極小値検出処理とを交互に行うことで、スレッシュレベルを決定している。そして、極大値検出処理では、サンプリングデータの現在データを極大値とし、次のサンプリングデータと前記極大値とを比較し、この比較において、極大値よりもサンプリングデータが大きいときに極大値を更新し、極大値よりもサンプリングデータが小さいときに、極大値からサンプリングデータを引いた差と前記許容ノイズとを比較し、前記差が許容ノイズよりも小さいときに極大値を更新せずに維持し、前記差が許容ノイズよりも大きいときに現在の極大値をこのビットにおける極大値として決定する。また、この極大値を決定した後に、極小値検出に移る。そして、極小値検出処理では、前記極大値を検出したポイントのデータを極小値とし、次に極小値とこのポイントのデータを比較し、この比較において、極小値よりもサンプリングデータが小さいときに極小値を更新し、極小値よりもサンプリングデータが大きいときに、サンプリングデータから極小値を引いた差と前記許容ノイズとを比較し、前記差が許容ノイズよりも小さいときに極小値を更新せずに維持し、前記差が許容ノイズよりも大きいときに現在の極小値をこのビットにおける極小値として決定する。次に、極小値を決定した後に、このポイントのデータを極大値として、前記極大値検出処理に移る。
【0015】
なお、前記サンプリング工程は、予備走査と本走査とを行い、予備走査では、サンプリングデータの最大値及び最小値を求め、本走査では、前記最大値及び最小値に基づき決定した振幅範囲でサンプリングデータをメモリに記憶することが好ましい。また、前記予備走査では前記回転体を一方向に回転し、本走査では前記回転体を他方向に回転して、走査信号を得ることが好ましい。さらに、前記走査信号をA/D変換したサンプリングデータに対して、本走査では、前記決定した振幅範囲により、サンプリングデータのビット数を減らしてデータメモリに記憶することが好ましい。
【0016】
また、記録紙をロール状に巻き取った巻芯から前記回転体を構成し、前記情報コードを前記記録紙の識別情報とし、記録紙を給紙方向に送って前記予備走査を行い、記録紙を給紙方向とは逆の巻き戻し方向に送って本走査を行うことが好ましい。前記情報コードの各マークを、マークが形成される地に対して反射率または吸収率が異なるマーク材料により形成することが好ましい。また、情報コードは、記録紙の種類、熱感度、ロット番号、生産時期の各情報のうち少なくとも1つを含むことが好ましい。前記情報コードは誤り検出訂正コード部を有し、この誤り検出訂正コード部から読み取り時の誤り率を求め、この誤り率に基づき前記読取センサのスレッシュレベルを変化させて前記情報コードを読み取ることが好ましい。
【0018】
本発明は、回転体の周面又は端面にスタートマークと複数個のデータマークとを円周方向に並べて構成され、スタートマークはデータマークよりも円周方向で長く形成されている情報コードを、前記回転体の回転時に読取センサで走査し、読取センサからの出力信号に基づき前記情報コードの各ビットを識別して記録紙識別情報を読み取る情報コードの読取装置において、前記情報コードを前記回転体の回転の際に走査する読取センサと、この読取センサからの出力信号をA/D変換してサンプリングするサンプリング回路と、前記サンプリングデータをデータメモリに書き込むデータ書込手段と、前記データメモリに記憶したサンプリングデータに基づき情報コードの情報を解読する情報解読手段とを備え、前記情報解読手段は、前記サンプリングデータから最大値及び最小値を抽出し、前記最大値と最小値とから許容ノイズを算出し、この許容ノイズを超えて前記サンプリングデータが変動するときにこの変動点におけるサンプリングデータを極大値又は極小値として求め、求めた極大値及び極小値の中から隣接する極大値及び極小値に基づき前記各マークに対応する個別のスレッシュレベルを決定するスレッシュレベル決定部と、前記スレッシュレベルに基づき前記各マーク部分の長さ相当値を求め、最大長さ相当値を有するマークをスタートマークとして検出するスタートマーク検出部と、前記第1及び第2のスタートマークの間隔によりデータマークの最小長さを求め、マークのエッジ部分が存在する領域を決定するエッジ存在領域決定部と、前記エッジ存在領域において、前記サンプリングデータがスレッシュレベルを横切るポイントと横切る方向とからデータマークのビットが「0」か又は「1」かを判定するデータ判定部とから構成されていることを特徴としている。
【0019】
なお、前記巻芯を給紙方向及び給紙方向とは反対の巻き戻し方向に回転させるとともに、この回転手段による給紙方向への回転時に前記情報コードの予備走査を行い、巻き戻し方向への回転時に本走査を行う走査制御部を備え、予備走査ではサンプリングデータの振幅に基づき本走査におけるサンプリングデータの記録振幅範囲を決定し、前記データ書込部では前記記録振幅範囲に基づきサンプリングデータのビット数を減らしてデータメモリに書き込むことが好ましい。また、前記情報コードは誤り検出訂正コード部を有し、前記サンプリング回路は、この誤り検出訂正コード部から読み取り時の誤り率を求め、この誤り率に基づき前記読取センサのスレッシュレベルを変化させることが好ましい。
【0020】
【発明の実施の形態】
カラー感熱プリンタの概略を示す図1において、給紙マガジン10内にはロール紙11が収納されている。ロール紙11は、帯状のカラー感熱記録紙12を巻芯13に巻き付けて構成されている。巻芯13は紙又はプラスチック製の円筒から構成されており、これの端面13aには、情報コード14が記録されている。また、巻芯13の両端にはペーパーホルダ15が嵌め込まれている。ペーパーホルダ15は回転軸15aを有しており、この回転軸15aを介して、ロール紙11を給紙マガジン10内で回転自在に保持する。
【0021】
給紙マガジン10は、マガジン本体10aと蓋10bとから構成されている。給紙マガジン10内には、給紙ローラ16とロール紙軸受け17が設けられている。給紙ローラ16はロール紙11に接触して矢印A方向に回転することで、記録紙12を給紙マガジン10から送り出す。また、矢印B方向に回転することで、記録紙12を給紙マガジン10内に巻き取る。
【0022】
ロール紙軸受け17は、前記ペーパーホルダ15の回転軸15aを回転自在に保持する。このロール紙軸受け17は、給紙ローラ方向に移動自在に構成されており、ロール紙11の使用による減少で巻径が小さくなってもロール紙11が給紙ローラ16に常に接触するように構成されている。給紙ローラ16は給紙モータ20により駆動される。給紙モータ20は、ドライバ21を介してシステムコントローラ22により回転制御される。
【0023】
プリント時には給紙モータ20が給紙方向に回転して記録紙12をプリント部23に送り出す。プリント部23では、周知のように、サーマルヘッドにより三色面順次記録を行う。この三色面順次記録の際に、記録済みの感熱発色層が次の層の感熱発色のための印加熱エネルギで発色してしまうことがないように、感熱発色層に特有な波長域の紫外線等を照射して光定着が行われる。三色面順次記録が終了するとドライバ24を介してカッタ25が作動する。カッタ25は、記録紙12のプリント済み部分を未プリント部分から切り離すように切断する。排紙ローラ26は記録紙12をカット位置にセットする。そして、カッタ25により切断された記録紙12aはトレー27に排紙される。
【0024】
プリントを開始する前に、給紙マガジン10にセットされているロール紙11の種別を検知し、この種別等に応じてプリント条件を設定するために、情報コード14が読み取られる。
【0025】
図2に示すように、情報コード14は、巻芯13の端面13aに円周方向で構成されており、黒色の矩形状印刷パターンからなるスタートマークSMと多数のデータマークDMとから構成されている。なお、巻芯13の端面13aの地色は白とされている。本実施形態では24ビットの情報コードとしているので、データマークDMは24個設けられている。このデータマークDMにより、記録紙12の種類、熱感度、ロット番号、生産時期情報等の各種情報が表される。なお、情報コード14は、記録紙の種類、熱感度、ロット番号、生産時期情報などのうち1つを含んでいればよい。
【0026】
図3に示すように、データマークDMは、円周方向において、各ビットの記録エリアBAの長さL1の半分の長さBL(=L1/2)に設定されている。そして、図3(A)に示すように、記録エリアBAの後半部分BA1にデータマークDMを記録することにより「0」の情報を表し、(B)に示すように、記録エリアBAの前半部分BA2にデータマークDMを記録することにより「1」の情報を表している。なお、図示の情報コード14には記録エリアBAを識別するために各エリアの境界にラインが描かれている。しかし、これは説明のためのものであり、実際の情報コード14にはこのラインは無く、単にBL,2BL,3BLのいずれかの長さを有するマークが円周方向にBL又は2BLの間隔で配置されている。
【0027】
図2に示すように、スタートマークSMはデータマークDMの3倍の長さから構成されている。また、スタートマーク記録エリアSMAはデータマークの5倍の長さL2(=5×BL)に設定されている。そして、スタートマーク記録エリアSMAに対して、両側にデータマークDM1個分のスペースを開けてスタートマークSMが配置されている。
【0028】
本実施形態では巻芯の直径が50mmであり、スタートマーク記録エリアSMAとしてデータマーク5個分の長さ(BL×5)と、24個のビットを表すデータマーク記録エリアDMAとしてデータマーク48個分の長さ(BL×48)とを用いる。このため、BLは約3mmとなっている。また、データマークDMの幅も約3mmにしてある。なお、データマークDMの長さBLは、情報コード14が付される巻芯13の直径及び情報コード14のビット数に応じて適宜決定される。また、スタートマーク記録エリアSMAの長さL2や、スタートマークSMの長さ、データマークDMとの間隔なども適宜変更してよい。
【0029】
図1に示すように、情報コード14はフォトセンサ30により読み出される。フォトセンサ30は反射タイプであり、投光器と受光器とアンプとを一体化して構成されている。そして、投光器で投光されて情報マーク14で反射した光を受光センサで受け、受光センサで光電変換した電圧信号をアンプで増幅した後に、情報読取コントローラ31に送っている。なお、ロール紙11の使用による巻径の減少に伴い、ロール紙軸受け17は給紙ローラ方向にシフトするため、この動きに追随するように、フォトセンサ14はロール紙軸受け17に回動不能に取り付けられている。
【0030】
情報読取コントローラ31は、A/D変換器32を備えている。A/D変換器32は、フォトセンサ30からの走査信号を10ビットのデジタルデータに変換する。情報読取コントローラ31は、CPU33、ROM34、RAM35、バス36等を備えたマイクロコンピュータから構成されており、A/D変換器32からのサンプリングデータに基づき情報コード14を解読する。なお、本実施形態ではRAM35に設定されたデータメモリ35aの容量が増大することのないように、サンプリングデータを8ビットにしてデータメモリ35aに格納している。そして、データメモリ35aに書き込んだサンプリングデータを解析することで、各ビットの内容を解読する。この解読した情報コード14のデータは、システムコントローラ22に送られる。システムコントローラ22では、この情報コードデータに基づき、記録紙12の種別、感度、メーカー、販路等を特定する。そして、この特定データに基づきプリント条件を設定する。システムコントローラ22もマイクロコンピュータから構成されており、各種指令の入力や設定を行うキーボード28とディスプレイ29とを備えている。
【0031】
図4は情報読取コントローラ31における処理手順を示すフローチャートである。まず、給紙モータ20を一定時間、一定速度で回転させて、給紙ローラ16を介して巻芯13を給紙方向に回転し、この給紙方向送りのときに情報コード14の予備走査を行う。このときの給紙ローラ16による記録紙12の送り量は、未使用状態におけるロール紙の2周分(満巻き2周分)740mmと予備量の20mm分だけ行われる。この予備走査の後に、給紙ローラ16を満巻き2周分と予備量だけ逆転させて本走査を行う。満巻き2周分の回転により、2個のスタートマークSMにデータマークDMが挟まれた状態のサンプリングデータを確実に得ることができ、データの解読を容易に行うことができる。
【0032】
予備走査では、サンプリングデータに基づきその最大値PSVMax 及び最小値PSVMin を検出する。
【0033】
次に、この最大値PSVMax 及び最小値PSVMin を用いて、本走査時の10ビットのサンプリングデータをデータメモリ35aに書き込む際に、8ビットに丸め込む範囲を決定する。したがって、10ビットのサンプリングデータを8ビットに丸め込んで記憶するため、データメモリ35aの容量が増加することがない。
【0034】
なお、単に10ビットを8ビットに変換して記憶するのでは、サンプリングデータの記憶する範囲によってはデータ精度が低下し、情報コードを確実に解読することができなくなる。このため、最大値PSVMax 及び最小値PSVMin によって特定したサンプリングデータの振幅範囲に基づき記憶する振幅範囲を図5に示すように、3種類に分類している。
【0035】
図6は、サンプリングデータの一例を示している。サンプリングデータの記憶範囲を決定する際には、図4に示すように、最大値PSVMax 、最小値PSVMin 、及びオフセット電圧値OSVから予備走査時のサンプリングデータの振幅を求め、この振幅に基づき3種類に分類する。なお、オフセット電圧値OSVは、EEPROMに記憶されている。
【0036】
まず、最大値PSVMax から最小値PSVMin を引いた差(PSVMax −PSVMin )に、オフセット電圧値OSVを2倍して加算した判定値Hを求める。
H=(PSVMax −PSVMin )+OSV×2
次にこの判定値Hが、「512」を超えているか、「256」〜「512」の範囲内か、「256」以下かを判定する。図5は、このようにして分類されるサンプリングデータの一例を示している。
【0037】
512<Hのときには、例えば図5(A)に示すようなサンプリングデータSD1であり、この場合には、10ビットの本走査におけるサンプリングデータの内、下位の2ビットを削除して、8ビットとしてデータメモリ35aに格納する。
【0038】
256≦H≦512のときには、例えば図5(B)に示すようなサンプリングデータSD2であり、この場合には、上位1ビット及び下位1ビットを削除し、格納データ(8ビット)を、〔読み込みデータ(10ビット)−(PSVMin −OSV)〕/2とする。
【0039】
H<256のときには、例えば図5(C)に示すようなサンプリングデータSD3であり、この場合には、上位2ビットを削除し、格納データ(8ビット)を、〔読み込みデータ(10ビット)−(PSVMin −OSV)〕/4とする。
【0040】
このように、サンプリングデータを8ビットに丸め込んでデータメモリ35aに記憶することにより、データメモリ35aの容量が増大することがなく、しかも精度よく、サンプリングデータから情報を解読することができる。
【0041】
次に、データメモリ35aに格納したサンプリングデータから情報コードの内容を解読する処理について、図7〜図9のフローチャートを参照して説明する。図7は、情報コードの解読処理の全体を示すもので、まず、サンプリングデータの中から最大値FSVMax 、最小値FSVMin を抽出する。次に、この最大値FSVMax 、最小値FSVMin を用いて次式から許容ノイズKNを算出する。
KN=〔(FSVMax −FSVMin )×0.2〕
なお、「0.2」はノイズ係数αである。
【0042】
次に、図8及び図9に示すように、求めた許容ノイズKNを用いて、データメモリ35aに記憶されたサンプリングデータから各マークSM,DMによる極大値VMax と極小値VMin とを検出する。
【0043】
この極大値VMax 及び極小値VMin の検出処理は次のようにして行う。図10に示すようなサンプリングデータSDを例にとって説明する。まず、図8に示すように、極大値VMax の検出処理では、ポイント(1) における現在のサンプリングデータV(1)を極大値VMax とする。次に、ポイント(n) におけるサンプリングデータV(n)と極大値VMax とを比較し、この比較において、極大値VMax よりも次のサンプリングデータV(n)が大きいときに、この値を極大値に置き換えて極大値VMax (=V(n))を更新する(ポイント(3) 〜(5) 参照)。また、ポイント(n) において極大値VMax よりもサンプリングデータV(n)が小さいときに、極大値VMax からサンプリングデータV(n)を引いた差〔VMax −V(n)〕と許容ノイズKNとを比較し、前記差〔VMax −V(n)〕が許容ノイズKNよりも小さいときに極大値を更新せずに維持する(ポイント(6) 参照)。また、前記差〔VMax −V(n)〕が許容ノイズKNよりも大きいときに現在の極大値VMax をこのビットにおける極大値VMax として決定する(ポイント(7) 参照)。
【0044】
次に、極大値VMax を決定した後に、極小値VMin の検出に移る。図9に示すように、極小値検出処理では、前記極大値を検出したポイント(ポイント(7) 参照)のデータV(n)を極小値VMin とし、次にこの極小値VMin とこのポイントのデータV(n)を比較する。そして、この比較において、極小値VMin よりもサンプリングデータV(n)が小さいときに極小値を更新する(ポイント(9) ,(10)参照)。また、極小値VMin よりもサンプリングデータV(n)が大きいときに、サンプリングデータV(n)から極小値VMin を引いた差〔V(n)−VMin 〕と許容ノイズKNVとを比較し、前記差が許容ノイズKNVよりも小さいときに極小値VMin を更新せずに維持し(ポイント(8) 参照)、前記差が許容ノイズKNVよりも大きいときに現在の極小値VMin をこのビットにおける極小値VMin として決定する(ポイント(12)参照)。次に、この極小値VMin を決定した後に、このポイントのデータを極大値VMax として、次の極大値検出処理を行う。そして、極大値VMax を検出した後に極小値VMin を上記同様にして検出し、以下、交互に極大値VMax と極小値VMin とを検出する。
【0045】
次に、求めた極大値VMax (m)と極小値VMin (m)との中間値を次式により求め、この中間値をスレッシュレベルTL(m)とする。
TL(m)=〔VMax (m)−VMin (m)〕/2
なお、mは各極大値及び極小値を識別するために便宜上順番に付したもので、1〜mの任意の数値となる。本実施形態では1個のスタートマークと24個のデータマークとを用いて情報コードを構成しており、しかも各データマークの記録位置を前半部分または後半部分に記録して「0」か「1」かを識別するため、「0」と「1」とのビットが連続すると、2個のデータマークDMがつながったマークとなる。したがって、マークとして認識される数は必ずしもマーク総数の「25」とはなることはなく、これよりも低い数となる。また、3個のデータマークDMがつながることはないので、データマークDMの3倍の長さを有するスタートマークSMとデータマークDMとが識別不能になることはない。
【0046】
図11は、極大値VMax (1)〜VMax (3)と、極小値VMin (1),VMin (2)とから求めたスレッシュレベルTL(1a),TL(1b),TL(2a),TL(2b)の一例を示している。
【0047】
次に、上記スレッシュレベルTLを下回る区間UL(1),UL(2)・・・を抽出する。そして、図12に示すように、抽出した区間UL(1),UL(2)・・・の中から最長のものを最長区間LMax として決定し、この最長区間LMax のマークをスタートマークSMと決定する。また、この最長区間LMax とほぼ同じ長さの区間を求める。まず、最長区間LMax に「0.1」を乗じて、許容誤差LMax ×0.1を求める。そして、上記で求めたスレッシュレベルを下回る区間UL(1),UL(2)・・・の中から、この許容誤差範囲内(0.9LMax <UL<LMax )の長さULを有する区間を求め、この区間ULのマークをスタートマークSMと判定する。図12では、最長区間LMax であるUL(1)からq番目の区間UL(q)がこれに該当するので、この区間UL(q)もスタートマークSMであると判定する。なお、本実施形態では、ロール紙11の満巻き状態で巻芯13が2回転する長さ分を本走査しているので、図12に示すように、求めたサンプリングデータには少なくとも2個のスタートマークSMが含まれている。
【0048】
次に、2個のスタートマークSMの位置から、各スタートマークSM間の距離に相当するサンプリングポイント数STを求める。次に、このSTからデータマーク1個分の長さに相当するサンプリングポイント数BLを次式から求める。
BL=ST/53
なお、「53」は、スタートマークとしてのデータマーク5個分と24ビットのデータマークとして48個分とを加算したものである。
【0049】
次に、図13に示すように、最初のスタートマークSM1を基準にしてビット1から順にスレッシュ交点検出領域TLPAを求める。スタートマークSM1の中間点をSC1としたときに、スレッシュ交点検出領域TLPAの開始位置PS1、終了位置PE1を以下の式から求める。
PS1=SC1+BL×3
PE1=SC1+BL×4
上記スレッシュ交点検出領域TLPAは、各データマークDMのエッジ部分が存在する領域である。
【0050】
次に、PS1におけるサンプリングデータV(PS1)がスレッシュレベルTL(1a)を超えているとき〔V(PS1)>TL(1a)〕に、PS1〜PE1間でスレッシュレベルTL(1a)よりも小さくなるポイントPを検出する。そして、このポイント(スレッシュ交点)Pを検出することができたときに、このビット1は「0」と判定し、検出ができないときには読取エラーと判定する。
【0051】
また、スレッシュ交点検出領域TLPAの開始端PS1におけるサンプリングデータVがスレッシュレベルTLよりも低いときに、スレッシュ交点検出領域TLPA内でスレッシュレベルTLよりも大きくなるスレッシュ交点Pを検出する。このスレッシュ交点Pを検出することができたときには、このビット1は「1」と判定し、検出ができないときには読取エラーと判定する。
【0052】
ビット2以降のデータの解読も、その直前のビットのスレッシュ交点Pの位置に基づき、スレッシュ交点検出領域を特定し、上記同様にしてそのビットが「0」か「1」かを判定する。すなわち、
PSn=P+BL×1.5
PEn=P+BL×2.5
で特定されるスレッシュ交点検出領域TLPAにおいて、ビット1と同様な判定を行い、各ビットを判定する。
【0053】
そして、読取エラーのときには、スレッシュレベルTLを変更し、再度判定を繰り返す。スレッシュレベルTLの変更は、前記許容ノイズKNを求める際のノイズ係数αを「0.2」から例えば「0.3」に引き上げる、または「0.1」に引き下げることで行う。このノイズ係数αを上げることで、極大点や極小点の検出数が低下するので、余分な極大点や極小点を極大値や極小値と判定することがなく、各ビットの判定精度が向上する。また、フォトセンサ30にゴミが付着したりした場合でも、ノイズ係数を変更することで、精度よく各ビットを判定することができる。なお、ノイズ係数αは、「0.1」,「0.2」,「0.3」に限らず適宜変更してよい。また、ノイズ係数αの変更回数も1回に限らず、複数回行ってもよい。更に、許容ノイズKNを変更する代わりに、単にスレッシュレベルTLに係数を乗じて補正し、これに基づき再判定してもよい。
【0054】
許容ノイズKNやスレッシュレベルTLを変更した再判定でも、読取エラーが発生する場合には、スレッシュ交点検出領域TLPAを広げて、再度の判定を行う。例えばビット1では、その開始位置PS1、終了位置PE1を以下の式から求める。
PS1=SC1+BL×2.9
PE1=SC1+BL×4.1
また、ビット2以降であれば、
PSn=P+BL×1.4
PEn=P+BL×2.6
のように、スレッシュ交点検出領域を10%程度広げる。なお、領域の拡張率は10%に限らず、適宜変更してよい。
【0055】
なお、読取エラーのときに、許容ノイズKNやスレッシュレベルTLを変更して再判定し、この再判定でも読取エラーが発生するときに、スレッシュ交点検出領域TLPAを変更しているが、この読取エラーの対処方法及び順序は上記のものに限定されることなく、適宜変更してよい。例えば、最初にスレッシュ交点検出領域TLPAを変更し、次に許容ノイズKNやスレッシュレベルTLを変更してもよい。
【0056】
上記のようにして、各ビットについて「0」又は「1」の判定がビット24まで終了したときに、コードの解読処理を終了する。なお、上記のように再解読を行っても読取エラーが発生する場合には、図7に示すように、予備走査、本走査を再度行って、新たにサンプリングデータを採取し、これに基づき新たな読み取りを行う。このように再走査・再判定しても、再度読取エラーが発生する場合には、アラームを発しオペレータに読取エラーが発生したことを知らせた後に、情報コードの読み取りを終了する。
【0057】
なお、本実施形態では、給紙ローラ16による記録紙12の送り速度は100mm/sec であり、サンプリング間隔は2msecである。また、記録紙12の各走査における送り長さは、満巻2周分の704mm+予備分の20mmである。このときのサンプリング数は3620個であり、1サンプリング当たり1バイトでデータメモリ35aに格納される。したがって、データメモリ35aの必要メモリ数は3620バイトとなる。なお、記録紙12が満巻状態のときには記録紙送り量換算で約0.1mm送り量間隔毎に情報コード14がサンプリングされ、記録紙が残り少なくなった小巻状態では約0.2mm送り量間隔でサンプリングされる。
【0058】
上記実施形態では、情報コード14の読み取りをプリント動作毎に行うようにしたが、この他に、給紙マガジン10の交換毎に情報コード14を読み取るようにしてもよい。また、上記実施形態では、読取エラーが発生したときに、スレッシュレベル又はスレッシュ交点検出領域をその都度変更したが、これに代えて、各データマークの判定を終了した後に、読取エラーのビットに対して、スレッシュレベル又はスレッシュ交点検出領域を変更して、再判定を行ってもよい。
【0059】
上記実施形態では、情報コード14を白地部分に黒色の印刷パターンで形成したが、光学的にマークを検出することができるものであれば、他の方法で記録したものであってもよい。また、白地に黒色の組み合わせに限らず、他の配色の組み合わせであってもよい。例えば、図14に示すように、フォトセンサからの光を反射する地(例えば白色)50に対して、フォトセンサからの光を吸収するインク(例えば透明または白色)等を用いて記録したスタートマークSM、データマークDMにより、情報コード51を形成してもよい。この場合には、フォトセンサとしては赤外線タイプのものを用いる。なお、地色やインクの色は上記のものに限らず、適宜変更してよい。また、印刷パターンに代えて、例えば、穴や反射部材などを用いて情報マークを構成してもよい。また、各マークは矩形、円形、帯形、扇形などの各種形状としてよい。また、情報コード14の記録形態は上記のものに限定されることなく、種々の記録形態の情報コードに本発明を実施してもよい。例えば、円周方向に各バーを配列したバーコードの各バーの識別に本発明を実施してもよい。
【0060】
上記実施形態では、給紙ローラ16を一定量回転させることで、巻芯13を2周を少し超える程度に回転させたが、この回転は2周以上であれば、3周またはそれ以上であってもよい。
【0061】
上記実施形態では、予備走査を給紙方向への回転により行い、本走査を給紙方向とは反対の巻き戻し方向への回転により行っているが、この回転方向は特に限定されない。例えば、給紙ローラ16による記録紙12の引き出しにより巻芯13を回転させるタイプではなく、巻芯を直接に回転駆動させるタイプでは、最初に巻き戻し方向に回転させて予備走査を行い、次に給紙方向に回転させて本走査を行ってもよい。また、予備走査と本走査で回転方向を変えることなく、同じ方向に回転させ、最初の回転で予備走査を行い、予備走査終了後の同方向への回転で本走査を行ってもよい。
【0062】
上記実施形態では、情報コード14を巻芯13の端面13aに記録したが、この他に、周面に記録してもよい。また、記録紙12の裏面に記録紙12の送り方向で設けた情報コードの読み取りに対して、本発明を実施してもよい。
【0063】
上記実施形態では、感熱プリンタ用の感熱記録紙に本発明を実施したが、他の記録方式の各種記録紙、例えば写真プリンタの印画紙ロール等に対して、本発明を実施してもよい。また、記録紙に限らず、回転体に付された情報コードを読み取る場合に本発明を実施してもよい。
【0064】
前記情報コードは誤り検出訂正コード部を備えていてもよい。この場合には、誤り検出訂正コード部から読み取り時の誤り率を求め、この誤り率に基づき読取センサのスレッシュレベルを変化させて前記情報コードを読み取ることにより、より一層読取精度を上げることができる。以下に、この誤り検出訂正コード部を備えた読取方法について説明する。
【0065】
図15は誤り検出訂正コード部を有する情報コードの一例を示している。なお、図15は、走査方向に各マークを配置した情報コード60を示しており、この情報コード60は、巻き芯の外周面または内周面に形成される。使用形態が巻き芯の端面の場合には、上記実施形態と同じように円周方向に配置される。この情報コード60は、情報コード本体部(データマーク)61とこれに連続して設けられる誤り検出訂正コード部62とから構成されている。そして、情報コード本体部61をスタートマークから例えば32ビットまでとし、その次から16ビットを誤り検出訂正コード部62としている。したがって、予め情報コード本体部61と誤り検出訂正コード部62との位置が決まっているので、スタートマークからマーク数をカウントすることにより、これらの区別が可能になる。誤り検出訂正コード部62としては、例えばリード・ソロモン符号等を用いる。
【0066】
図16は、情報コード読取装置70のブロック図を示している。投光器71a及び受光器71bからなる反射型読取センサ71からの読取信号は、コンパレータ部72に送られて、ここで基準電圧信号(スレッシュレベル)Vrefと比較される。そして、読取信号が基準電圧信号よりも大きい場合には「1」のレベルがA/D変換器73に送られる。また、読取信号が基準電圧信号よりも小さい場合には「0」のレベルがA/D変換器73に送られる。A/D変換器73はこれらレベルに応じて「1」,「0」のデジタル信号をメカコントローラ(機構制御用マイコン)74を介してシステムコントローラ75に送る。
【0067】
システムコントローラ75では、誤り検出訂正コードと生成多項式とに基づいて誤りの数と位置と値とを算出し、これらの情報に基づき情報コード60の訂正を行う。これら誤り検出訂正コードと生成多項式とに基づく誤り訂正技術については「符号理論」(宮川洋・岩垂好裕・今井秀樹共著、出版社:昭晃堂)等で周知であり、詳しくはこれら文献を参照されたい。図17はこのとき処理手順を示したものである。まず、情報コード60を読むために記録紙が引き出される。この記録紙の引き出しに応じて、情報コードが読取センサ71で読み取られる。全てを読み取った後に、誤り検出訂正コードを用いて誤りの検出と個数とを演算する。そして、誤り数が一定の範囲内であるときには、誤り訂正を行い、正式に情報コードとして取り込む。このように誤り数が一定範囲内にあるときに誤り訂正を行うのは、訂正能力は無限にあるわけではなく、一定の範囲内の個数に限られていること、この訂正能力範囲を超えると誤訂正の確率が高くなることによる。そして、この読み取った情報コードは各種処理ルーチンに送られ、LUTの切り替えや、サーマルヘッドへの印加電圧の変更等が行われる。
【0068】
また、一定の範囲を超えた誤り数が検出された場合には、フラグが「ダウン」か「アップ」かによって、スレッシュレベルを変更する。また、誤り数が前回よりも下がったか否かを判定し、下がった場合には、誤りが一定の範囲内になるまで、処理を繰り返す。すなわち、例えばフラグが「ダウン」の場合で、誤りの数が前回よりも下がった場合には、D/A変換器76を介してスレッシュレベルを一定量下げた後に、フラグを「ダウン」にセットする。また、例えばフラグが「アップ」の場合で、誤りの数が前回よりも下がった場合には、D/A変換器76を介してスレッシュレベルを一定量上げた後に、フラグを「アップ」にセットする。また、誤りの数が前回よりも下がらない場合には、フラグが「ダウン」か否かを判別し、「ダウン」のときにはフラグを「ダウン」にセットし、また、「ダウン」ではないときにはフラグを「アップ」にセットする。この後に、情報コードの先端まで戻して、再度情報コードを読み取る。
【0069】
このように、D/A変換器76を介してコンパレータ72のスレッシュレベルを一定量下げることで、全体的にレベルの下がった出力に対して正常に比較することが可能になる。したがって、情報コードの検出誤り数も減少し、訂正可能範囲に入ってくるので、以後正常に情報コードの読取処理が行われる。ロール紙の斜行等によって読み取り面が読取センサ71から離れていた場合であって、何らかの条件で斜行が戻ることがある。この場合には、センサ出力が増加するため、バックグランドノイズが増えてコンパレート出力に掛かることが考えられる。この場合においても、フラグを「アップ」にセットし、D/A出力を上げることでスレッシュレベルが上がり、正常に情報コードを読み取ることができるようになる。
【0070】
次に、誤り検出訂正コードと生成多項式との内容について説明する。情報コードC1,C2,C3,C4に付き、P,Qの2つの検査ワードで構成された情報コードシステムを考える。そして、検査ワードP,Qは次の連立方程式の解として定義する。なお、2パリティの場合、最大2ワードまでの誤りの検出、イレージャ訂正が可能であり、イレージャを用いない場合には訂正能力は1ワードまでとなる。
A+B+C+D+P+Q=0・・・(1)
α6 ・A+α5 ・B+α4 ・C+α3 ・D+α2 ・P+α・Q =0・・・(2)
なお、上記数式1、2及び下記の数式3,4における「+」は、モジュロ2加算を表している。なお、A〜Dは情報コードC1〜C4それぞれのバイト単位のコードを示し、α〜α6 はガロアフィールド上の原始根を示し、A' ,B’などの「’」は誤りを含んだ情報コードを示している。
【0071】
よって、シンドロームS1,S2は以下のようになる。
【0072】
情報コードC1〜C4がそれぞれ3ビットで構成されているとすれば、生成多項式は次の式で表される。
F(X)=X3 +X+1・・・(5)
【0073】
誤りの数と位置と値とを算出する場合には、次のようになる。まず、情報コードC1のみに誤りが含まれている場合は、
α6 ・S1=S2=α6 ・EC1・・・(6)となる。
なお、EC1は誤りを含んだC1コードを示している。
また、情報コードC2のみに誤りが含まれている場合は、
α5 ・S1=S2=α5 ・EC2・・(7)となる。
なお、EC2は誤りを含んだC2コードを示している。
また、情報コードC3のみに誤りが含まれている場合は、
α4 ・S1=S2=α4 ・EC3・・(8)となる。
なお、EC3は誤りを含んだC3コードを示している。
また、情報コードC4のみに誤りが含まれている場合は、
α3 ・S1=S2=α3 ・EC4・・(9)となる。
なお、EC4は誤りを含んだC4コードを示している。
【0074】
次に、情報コードの訂正について図18を参照して説明する。まず、読取センサ71によって読み取られた各コードはスタートビット検出回路80にてスタートビットの位置が検出される。スタートビットから内部クロックによりサンプリングされた各コードは、セレクタ79によって情報コード本体部61と誤り検出訂正コード部62とに分けられ、それぞれのバッファ81,82に一時的に格納される。シンドローム演算部83では、各情報コード本体部61と訂正コード部62とからの読取データに基づきシンドロームS1,S2を算出する。ここで、各シンドロームS1,S2が「0」であれば、誤り無しであるので、何らの訂正処理も行われず、次の情報コード処理ブロックである情報読取コントローラ86に情報コードが送られる。また、S1≠0、S2≠0である場合には、情報コード本体部を含むコード列に誤りが含まれているので、各シンドロームS1,S2の値により、誤り検出部84において、誤りの値、ROMテーブルに基づき誤りの位置を演算する。誤り訂正部85では、遅延部87によって遅延された情報コードデータに対して誤りの位置をカウンタにセットし、カウント値が誤り位置に一致したところでゲートを開き、誤り値とのEORをとることで、誤り訂正を行う。
【0075】
なお、誤り検出訂正コードを有する情報コードの読み取りは単独で行ってもよく、または先に説明した情報コードの読取方法と併用してもよい。
【0076】
【発明の効果】
本発明によれば、情報コードを予備走査した後に本走査を行い、予備走査では、サンプリングデータの最大値及び最小値を求め、本走査では、前記最大値及び最小値に基づき決定した振幅範囲でサンプリングデータをメモリに記憶したから、メモリの容量を増大させることがなく、しかも精度のよいサンプリングデータを記憶することができる。
【0077】
また、回転体の周面又は端面にスタートマークと複数個のデータマークとを円周方向に並べて情報マークを構成し、前記回転体の一方向への回転時に前記予備走査を行い、回転体の他方向への回転時に前記本走査を行うことにより効率よく情報マークを走査することができる。また、走査信号をA/D変換したサンプリングデータに対して、本走査では、前記決定した振幅範囲により、サンプリングデータのビット数を減らしてデータメモリに記憶することにより、データメモリの容量が少なくて済み、この分だけコストを下げることができる。
【0078】
サンプリングデータから最大値及び最小値を抽出してスレッシュレベルを決定し、このスレッシュレベルにより、各マーク部分の長さ相当値を求め、最大長さ相当値を有するマークをスタートマークとして検出するから、各データマークの特定が容易に行える。
【0079】
第1のスタートマークと第2のスタートマークとの間隔によりデータマークの最小長さを求め、マークのエッジ部分が存在する領域を決定し、このエッジ存在領域において、サンプリングデータがスレッシュレベルを横切るポイントと横切る方向とからデータマークのビットが「0」か又は「1」かを判定するから、各ビットの判定を確実に行うことができる。
【0080】
また、データマークのビットが「0」か又は「1」かの判定ができないときに、読取エラーとし、この読取エラーのときに、前記スレッシュレベルを変更し、または前記エッジ存在領域を広げてデータマークを再判定することにより、読み取り精度を上げることができる。
【0081】
また、読取エラーの時に許容ノイズの範囲を広げることにより、極大値及び極小値を再抽出し、これに基づきスレッシュレベルを変更することで、読み取り精度を上げることができる。特に、フォトセンサなどにゴミが付着して信号レベルが低下しても、これに容易に対処することができる。
【0082】
情報コードは誤り検出訂正コード部を有し、この誤り検出訂正コード部から読み取り時の誤り率を求め、この誤り率に基づき前記読取センサのスレッシュレベルを変化させて前記情報コードを読み取るから、情報コードを安定的に読み取ることができる。
【図面の簡単な説明】
【図1】本発明の情報コード読取方法を実施したカラー感熱プリンタを示す概略図である。
【図2】情報コードの一例を示す正面図である。
【図3】データマークの記録位置を示す説明図である。
【図4】情報コードの読取処理を示すフローチャートである。
【図5】予備走査におけるサンプリングデータの種類を示すグラフである。
【図6】予備走査におけるサンプリングデータの一例を示すグラフである。
【図7】情報コードの解読処理を示すフローチャートである。
【図8】極大値決定処理を示すフローチャートである。
【図9】極小値決定処理を示すフローチャートである。
【図10】極大値及び極小値を決定する処理の具体例を示す説明図である。
【図11】情報コードとこれに対応するサンプリングデータとの一例を示す説明図である。
【図12】スタートマークの検出処理の一例を示す説明図である。
【図13】各ビットの識別処理の一例を示す説明図である。
【図14】別の実施形態における情報コードの一例を示す拡大した正面図である。
【図15】誤り検出訂正コードを有した情報コードの一例を示す拡大した正面図である。
【図16】誤り検出訂正コードを有した情報コード読取装置を示す概略図である。
【図17】同情報コード読取装置における処理手順を示すフローチャートである。
【図18】誤り検出訂正コードを用いた誤り訂正を示す機能ブロック図である。
【符号の説明】
10 給紙マガジン
11 ロール紙
12 記録紙
13 巻芯
14,51,60 情報コード
16 給紙ローラ
30 フォトセンサ
62 誤り検出訂正コード部
71 読取センサ
72 コンパレータ
DM データマーク
SM スタートマーク
BA データ記録エリア
SMA スタートマーク記録エリア[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method and apparatus for reading an information code, and more particularly to a method and apparatus for scanning an information code formed by arranging data marks in a scanning direction with a reading sensor and reading the information code based on the scanning signal.
[0002]
[Prior art]
Photo printers and thermal printers use roll paper obtained by winding long photographic paper or thermal recording paper in a roll shape, and for example, the paper is cut into a predetermined size after printing. Since these photographic paper and heat-sensitive recording paper are given photosensitivity and photofixability, they are stored in a roll paper feed magazine (hereinafter referred to as a paper feed magazine) having moisture retention and light shielding properties. Is set in the printer.
[0003]
This paper feed magazine is composed of a magazine main body formed of a material having moisture retention and light shielding properties, and a lid that is opened when roll paper is loaded into the magazine main body. A paper feed roller is provided in the magazine body, and the outer peripheral surface of the roll paper is pressed against this peripheral surface. When the paper feed roller is rotated by driving from the printer side, the roll paper is rotated, and the recording paper is sent out from a discharge port provided in the magazine body to a recording position in the printer.
[0004]
Incidentally, the recording density of the recording paper changes depending on the sensitivity. Also, the images to be printed are different between normal recording paper and recording paper for sticker printing. In view of this, for example, in heat-sensitive recording paper, an information code indicating information such as the type of recording paper, thermal sensitivity, and manufacturer name is provided on the end surface of the roll paper core. Further, in the thermal printer, this information code is read by a code reading device, and print conditions are set based on this information.
[0005]
The information code is composed of a start mark and a number of data marks. The start mark is set, for example, to be three times as long as the data mark, and the start mark of the data mark is specified by this start mark. The data mark is set to be half the length of the recording area of each bit, and “0” is set depending on whether the mark is recorded in the first half or the second half of the recording area. It is identified as “1”.
[0006]
[Problems to be solved by the invention]
The information code is read by scanning in the arrangement direction of each mark when the winding core is rotated by feeding the recording paper by a reading sensor that optically detects the mark. However, reading errors may occur due to increased printing noise or deterioration of the amplitude of the scanning signal due to poor printing of the information code on the core end face or the like, and dirt or dirt on the display surface of the information code. May occur.
[0007]
The present invention has been made to solve the above-described problems, and an information code reading method and apparatus capable of reliably reading an information code while suppressing occurrence of a reading error due to an increase in noise, amplitude deterioration of a scanning signal, or the like. The purpose is to provide.
[0010]
[Means for Solving the Problems]
In order to achieve the above object, in the present invention,A start mark and a plurality of data marks are arranged in the circumferential direction on the circumferential surface or end face of the rotator, and the start mark is an information code formed longer in the circumferential direction than the data mark. In a method of reading an information code, which is sometimes scanned by a reading sensor and identifies each bit of the information code based on an output signal from the reading sensor to read information, the information code is read by the reading sensor by rotating the rotating body a plurality of times. A data sampling step of scanning, A / D converting the output signal and storing it in a data memory as sampling data, and extracting a maximum value and a minimum value from the sampling dataCalculating the allowable noise from the maximum value and the minimum value, and when the sampling data fluctuates exceeding the allowable noise, the sampling data at the changing point is determined as a maximum value or a minimum value, and the calculated maximum value and The individual threshold level corresponding to each mark is determined based on the adjacent local maximum and local minimum values.A threshold level determining step, a length of each mark portion is determined based on the determined threshold level, a mark having the longest length is detected as a start mark, a first start mark and a second mark Find the minimum length of the data mark by the distance from the start markEachData determination for determining an area where an edge portion of a mark exists, and determining whether the bit of the data mark is “0” or “1” from the point where the sampling data crosses the threshold level and the direction in which the sampling data crosses the threshold level And a process.
[0011]
In addition,In the threshold level determination step, ½ of the difference between the maximum value and the minimum value is set to the threshold level of each mark.Has been decided.
[0012]
In the present inventionIn the data determining step, when the edge existing area is lowered and intersects the threshold level, the bit of the data mark is determined to be “0” or “1”, and the edge existing area is raised and lowered to intersect the threshold level. Sometimes the bit of the data mark is determined to be “1” or “0” which is the opposite of the above determination, and at other times it is determined as a reading error.
[0013]
In the present invention,A data re-determination step of re-determining a data mark based on the threshold level obtained from the maximum value and the minimum value when the reading error is determined, and obtaining the maximum value and the minimum value again by changing the width of the allowable noise. have. Note that when it is determined that the reading error has occurred, the data level may be determined again by simply changing the threshold level. Further, when it is determined that the reading error has occurred, the edge existence area may be widened and the data mark may be determined again.
[0014]
In the present invention,In the threshold level determination step, the threshold level is determined by alternately performing a maximum value detection process and a minimum value detection process. In the local maximum value detection process, the current data of the sampling data is set as the local maximum value, the next sampling data is compared with the local maximum value, and the local maximum value is updated when the sampling data is larger than the local maximum value in this comparison. When the sampling data is smaller than the maximum value, the difference obtained by subtracting the sampling data from the maximum value is compared with the allowable noise, and the maximum value is maintained without being updated when the difference is smaller than the allowable noise. When the difference is greater than the allowable noise, the current local maximum is determined as the local maximum at this bit. Further, after determining the maximum value, the process proceeds to minimum value detection. In the local minimum value detection process, the data at the point where the local maximum value is detected is set as the local minimum value, and then the local minimum value is compared with the data at this point. In this comparison, when the sampling data is smaller than the local minimum value, the local minimum value is detected. The value is updated, and when the sampling data is larger than the minimum value, the difference obtained by subtracting the minimum value from the sampling data is compared with the allowable noise, and the minimum value is not updated when the difference is smaller than the allowable noise. And the current local minimum is determined as the local minimum at this bit when the difference is greater than the allowable noise. Next, after determining the minimum value, the data at this point is set as the maximum value, and the process proceeds to the maximum value detection process.
[0015]
In the sampling step, preliminary scanning and main scanning are performed. In the preliminary scanning, the maximum value and the minimum value of the sampling data are obtained. In the main scanning, the sampling data is measured in the amplitude range determined based on the maximum value and the minimum value. Is preferably stored in memory. In the preliminary scanning, it is preferable to rotate the rotating body in one direction, and in the main scanning, rotate the rotating body in the other direction to obtain a scanning signal. Further, with respect to the sampling data obtained by A / D converting the scanning signal, in the main scanning, it is preferable that the number of bits of the sampling data is reduced and stored in the data memory according to the determined amplitude range.
[0016]
In addition, the rotating body is constituted by a winding core obtained by winding the recording paper into a roll shape, the information code is used as identification information of the recording paper, the recording paper is sent in the paper feeding direction, and the preliminary scanning is performed. Is preferably sent in the rewind direction opposite to the paper feed direction. Each mark of the information code is preferably formed of a mark material having a reflectance or absorptivity different from that of the ground on which the mark is formed. Further, the information code preferably includes at least one of information on the type of recording paper, heat sensitivity, lot number, and production time. The information code has an error detection / correction code part, an error rate at the time of reading is obtained from the error detection / correction code part, and the information code is read by changing a threshold level of the reading sensor based on the error rate. preferable.
[0018]
The present invention provides a rotating bodyA start mark and a plurality of data marks are arranged in the circumferential direction on the circumferential surface or end surface of the, and the start mark is an information code formed longer in the circumferential direction than the data mark,The rotating bodyIn an information code reading device that scans with a reading sensor at the time of rotation, identifies each bit of the information code based on an output signal from the reading sensor, and reads recording sheet identification information, the information code is used to rotate the rotating body. A reading sensor that scans at the same time, a sampling circuit that samples the output signal from the reading sensor by A / D conversion, data writing means for writing the sampling data into a data memory, and sampling data stored in the data memory Information decoding means for decoding the information of the information code based on the information code, wherein the information decoding means extracts the maximum value and the minimum value from the sampling dataCalculating the allowable noise from the maximum value and the minimum value, and when the sampling data fluctuates exceeding the allowable noise, the sampling data at the changing point is determined as a maximum value or a minimum value, and the calculated maximum value and The individual threshold level corresponding to each mark is determined based on the adjacent local maximum and local minimum values.A threshold level determination unit that determines a length equivalent value of each mark portion based on the threshold level, detects a mark having a maximum length equivalent value as a start mark, and the first and second The minimum length of the data mark is obtained from the start mark interval of the first and second portions, and an edge existing region determining unit that determines a region where the edge portion of the mark exists, and a point where the sampling data crosses the threshold level in the edge existing region. It is characterized by comprising a data determination unit for determining whether the bit of the data mark is “0” or “1” based on the direction.
[0019]
The winding core is rotated in a paper feeding direction and a rewinding direction opposite to the paper feeding direction, and the information code is preliminarily scanned during rotation in the paper feeding direction by the rotating means. A scanning control unit that performs main scanning at the time of rotation; in preliminary scanning, a recording amplitude range of sampling data in main scanning is determined based on the amplitude of sampling data; and in the data writing unit, bits of sampling data are determined based on the recording amplitude range It is preferable to reduce the number and write to the data memory. The information code has an error detection / correction code portion, and the sampling circuit obtains an error rate at the time of reading from the error detection / correction code portion, and changes a threshold level of the reading sensor based on the error rate. Is preferred.
[0020]
DETAILED DESCRIPTION OF THE INVENTION
In FIG. 1 showing an outline of a color thermal printer, a
[0021]
The
[0022]
The
[0023]
At the time of printing, the
[0024]
Before printing is started, the
[0025]
As shown in FIG. 2, the
[0026]
As shown in FIG. 3, the data mark DM is set to a length BL (= L1 / 2) which is half the length L1 of the recording area BA of each bit in the circumferential direction. Then, as shown in FIG. 3A, the data mark DM is recorded in the latter half part BA1 of the recording area BA to represent “0” information, and as shown in FIG. 3B, the first half part of the recording area BA. Information “1” is represented by recording a data mark DM in BA2. In the illustrated
[0027]
As shown in FIG. 2, the start mark SM has a length three times that of the data mark DM. The start mark recording area SMA is set to a length L2 (= 5 × BL) that is five times the data mark. The start mark SM is arranged with a space for one data mark DM on both sides of the start mark recording area SMA.
[0028]
In this embodiment, the diameter of the core is 50 mm, the start mark recording area SMA is 5 data marks long (BL × 5), and the data mark recording area DMA representing 24 bits is 48 data marks. Minute length (BL × 48) is used. For this reason, BL is about 3 mm. The width of the data mark DM is also about 3 mm. The length BL of the data mark DM is appropriately determined according to the diameter of the core 13 to which the
[0029]
As shown in FIG. 1, the
[0030]
The information reading controller 31 includes an A /
[0031]
FIG. 4 is a flowchart showing a processing procedure in the information reading controller 31. First, the
[0032]
In the preliminary scan, the maximum value PSVMax and the minimum value PSVMin are detected based on the sampling data.
[0033]
Next, using the maximum value PSVMax and the minimum value PSVMin, a range to be rounded to 8 bits is determined when writing 10-bit sampling data in the main scan to the data memory 35a. Accordingly, since the 10-bit sampling data is rounded to 8 bits and stored, the capacity of the data memory 35a does not increase.
[0034]
Note that if 10 bits are simply converted into 8 bits and stored, the data accuracy is lowered depending on the range in which the sampling data is stored, and the information code cannot be reliably decoded. For this reason, the amplitude ranges stored based on the amplitude range of the sampling data specified by the maximum value PSVMax and the minimum value PSVMin are classified into three types as shown in FIG.
[0035]
FIG. 6 shows an example of sampling data. When determining the storage range of the sampling data, as shown in FIG. 4, the amplitude of the sampling data at the time of preliminary scanning is obtained from the maximum value PSVMax, the minimum value PSVMin, and the offset voltage value OSV. Classify into: The offset voltage value OSV is stored in the EEPROM.
[0036]
First, a determination value H is obtained by adding the offset voltage value OSV twice to the difference obtained by subtracting the minimum value PSVMin from the maximum value PSVMax (PSVMax−PSVMin).
H = (PSVMax−PSVMin) + OSV × 2
Next, it is determined whether the determination value H exceeds “512”, is within the range of “256” to “512”, or is “256” or less. FIG. 5 shows an example of sampling data classified in this way.
[0037]
When 512 <H, for example, the sampling data SD1 is as shown in FIG. 5A. In this case, the lower 2 bits of the sampling data in the 10-bit main scan are deleted to obtain 8 bits. Store in the data memory 35a.
[0038]
When 256 ≦ H ≦ 512, for example, the sampling data SD2 is as shown in FIG. 5B. In this case, the upper 1 bit and the lower 1 bit are deleted, and the stored data (8 bits) is read. Data (10 bits) − (PSVMin−OSV)] / 2.
[0039]
When H <256, for example, sampling data SD3 as shown in FIG. 5C. In this case, the upper 2 bits are deleted, and the stored data (8 bits) is replaced with [read data (10 bits) − (PSVMin-OSV)] / 4.
[0040]
Thus, by rounding the sampling data to 8 bits and storing it in the data memory 35a, the capacity of the data memory 35a is not increased, and information can be decoded from the sampling data with high accuracy.
[0041]
Next, a process for decoding the contents of the information code from the sampling data stored in the data memory 35a will be described with reference to the flowcharts of FIGS. FIG. 7 shows the entire decoding process of the information code. First, the maximum value FSVMax and the minimum value FSVMin are extracted from the sampling data. Next, the allowable noise KN is calculated from the following equation using the maximum value FSVMax and the minimum value FSVMin.
KN = [(FSVMax−FSVMin) × 0.2]
“0.2” is the noise coefficient α.
[0042]
Next, as shown in FIGS. 8 and 9, the maximum value VMax and the minimum value VMin due to the marks SM and DM are detected from the sampling data stored in the data memory 35a using the obtained allowable noise KN.
[0043]
The detection processing of the maximum value VMax and the minimum value VMin is performed as follows. The sampling data SD as shown in FIG. 10 will be described as an example. First, as shown in FIG. 8, in the process of detecting the maximum value VMax, the current sampling data V (1) at the point (1) is set as the maximum value VMax. Next, the sampling data V (n) at the point (n) is compared with the maximum value VMax. When the next sampling data V (n) is larger than the maximum value VMax in this comparison, this value is determined as the maximum value. And the maximum value VMax (= V (n)) is updated (see points (3) to (5)). Further, when the sampling data V (n) is smaller than the maximum value VMax at the point (n), the difference [VMax−V (n)] obtained by subtracting the sampling data V (n) from the maximum value VMax and the allowable noise KN When the difference [VMax−V (n)] is smaller than the allowable noise KN, the maximum value is maintained without being updated (see point (6)). When the difference [VMax−V (n)] is larger than the allowable noise KN, the current maximum value VMax is determined as the maximum value VMax in this bit (see point (7)).
[0044]
Next, after determining the maximum value VMax, the process proceeds to detection of the minimum value VMin. As shown in FIG. 9, in the local minimum value detection process, the data V (n) at the point where the local maximum value is detected (see point (7)) is set as the local minimum value VMin, and then the local minimum value VMin and the data at this point are displayed. Compare V (n). In this comparison, the minimum value is updated when the sampling data V (n) is smaller than the minimum value VMin (see points (9) and (10)). When the sampling data V (n) is larger than the minimum value VMin, the difference [V (n) −VMin] obtained by subtracting the minimum value VMin from the sampling data V (n) is compared with the allowable noise KNV, When the difference is smaller than the allowable noise KNV, the minimum value VMin is maintained without being updated (see point (8)), and when the difference is larger than the allowable noise KNV, the current minimum value VMin is set to the minimum value in this bit. Determine as VMin (see point (12)). Next, after determining the minimum value VMin, the next maximum value detection process is performed with the data at this point as the maximum value VMax. Then, after detecting the maximum value VMax, the minimum value VMin is detected in the same manner as described above, and thereafter, the maximum value VMax and the minimum value VMin are detected alternately.
[0045]
Next, an intermediate value between the obtained maximum value VMax (m) and the minimum value VMin (m) is obtained by the following equation, and this intermediate value is set as a threshold level TL (m).
TL (m) = [VMax (m) -VMin (m)] / 2
In addition, m is given in order for convenience in order to identify each local maximum value and local minimum value, and becomes an arbitrary numerical value of 1 to m. In this embodiment, one start mark and 24 data marks are used to form an information code, and the recording position of each data mark is recorded in the first half or the second half and either “0” or “1” is recorded. "0" and "1" are consecutive, the two data marks DM are connected to each other. Therefore, the number recognized as a mark is not necessarily “25” of the total number of marks, and is a number lower than this. In addition, since the three data marks DM are not connected, the start mark SM and the data mark DM having a length three times that of the data mark DM are not made indistinguishable.
[0046]
FIG. 11 shows threshold levels TL (1a), TL (1b), TL (2a), TL obtained from the maximum values VMax (1) to VMax (3) and the minimum values VMin (1), VMin (2). An example of (2b) is shown.
[0047]
Next, the sections UL (1), UL (2)... Below the threshold level TL are extracted. As shown in FIG. 12, the longest one of the extracted sections UL (1), UL (2)... Is determined as the longest section LMax, and the mark of the longest section LMax is determined as the start mark SM. To do. In addition, a section having the same length as the longest section LMax is obtained. First, the longest interval LMax is multiplied by “0.1” to obtain an allowable error LMax × 0.1. Then, an interval having a length UL within the allowable error range (0.9LMax <UL <LMax) is obtained from the intervals UL (1), UL (2)... Below the threshold level obtained above. The mark in the section UL is determined as the start mark SM. In FIG. 12, since the longest section LMax, UL (1) to qth section UL (q) corresponds to this, it is determined that this section UL (q) is also the start mark SM. In this embodiment, since the
[0048]
Next, the number of sampling points ST corresponding to the distance between each start mark SM is obtained from the positions of the two start marks SM. Next, from this ST, the number of sampling points BL corresponding to the length of one data mark is obtained from the following equation.
BL = ST / 53
“53” is obtained by adding 5 data marks as start marks and 48 data marks as 24-bit data marks.
[0049]
Next, as shown in FIG. 13, a threshold intersection detection area TLPA is obtained in order from
PS1 = SC1 + BL × 3
PE1 = SC1 + BL × 4
The threshold intersection detection area TLPA is an area where an edge portion of each data mark DM exists.
[0050]
Next, when the sampling data V (PS1) in PS1 exceeds the threshold level TL (1a) [V (PS1)> TL (1a)], it is smaller than the threshold level TL (1a) between PS1 and PE1. A point P is detected. When this point (threshold intersection point) P can be detected, this
[0051]
Further, when the sampling data V at the start end PS1 of the threshold intersection detection area TLPA is lower than the threshold level TL, a threshold intersection P that is larger than the threshold level TL is detected in the threshold intersection detection area TLPA. When the threshold crossing point P can be detected, the
[0052]
In the decoding of the data after
PSn = P + BL × 1.5
PEn = P + BL × 2.5
In the threshold intersection detection area TLPA specified by (1), determination similar to
[0053]
When a reading error occurs, the threshold level TL is changed and the determination is repeated again. The threshold level TL is changed by raising the noise coefficient α for obtaining the allowable noise KN from “0.2” to “0.3” or lowering to “0.1”. By increasing the noise coefficient α, the number of detected local maximum points and local minimum points decreases, so that the determination accuracy of each bit is improved without determining extra local maximum points or local minimum points as local maximum values or local minimum values. . Even when dust adheres to the photosensor 30, each bit can be accurately determined by changing the noise coefficient. The noise coefficient α is not limited to “0.1”, “0.2”, and “0.3”, and may be changed as appropriate. Further, the number of changes of the noise coefficient α is not limited to one, and may be performed a plurality of times. Further, instead of changing the allowable noise KN, the threshold level TL may be simply corrected by multiplying by a coefficient, and the determination may be made again based on this.
[0054]
Even when re-determination is performed with the allowable noise KN or the threshold level TL changed, if a reading error occurs, the threshold intersection detection area TLPA is expanded and the determination is performed again. For example, in
PS1 = SC1 + BL × 2.9
PE1 = SC1 + BL × 4.1
If
PSn = P + BL × 1.4
PEn = P + BL × 2.6
As shown, the threshold intersection detection area is expanded by about 10%. The area expansion rate is not limited to 10%, and may be changed as appropriate.
[0055]
When a read error occurs, the allowable noise KN and the threshold level TL are changed and re-determination is performed. When a read error occurs even in this re-determination, the threshold intersection detection area TLPA is changed. The coping methods and order are not limited to those described above, and may be changed as appropriate. For example, the threshold intersection detection area TLPA may be changed first, and then the allowable noise KN and the threshold level TL may be changed.
[0056]
As described above, when the determination of “0” or “1” for each bit is completed up to bit 24, the code decoding process is terminated. If a read error occurs even after re-decoding as described above, as shown in FIG. 7, the preliminary scan and the main scan are performed again, and sampling data is newly collected. Reads correctly. Even if rescanning / re-determination is performed in this manner, if a reading error occurs again, an alarm is issued to inform the operator that the reading error has occurred, and then the reading of the information code is terminated.
[0057]
In this embodiment, the feeding speed of the
[0058]
In the above embodiment, the
[0059]
In the above embodiment, the
[0060]
In the above embodiment, by rotating the paper feed roller 16 by a certain amount, the winding
[0061]
In the above embodiment, the preliminary scanning is performed by rotation in the paper feeding direction, and the main scanning is performed by rotation in the rewinding direction opposite to the paper feeding direction. However, this rotational direction is not particularly limited. For example, in the type in which the winding
[0062]
In the above embodiment, the
[0063]
In the above embodiment, the present invention is applied to the thermal recording paper for the thermal printer. However, the present invention may be applied to various recording papers of other recording systems, such as photographic paper rolls of a photographic printer. Further, the present invention may be implemented not only when recording paper but also when reading an information code attached to a rotating body.
[0064]
The information code may include an error detection / correction code portion. In this case, the reading accuracy can be further improved by obtaining the error rate at the time of reading from the error detection and correction code portion, and reading the information code by changing the threshold level of the reading sensor based on the error rate. . Hereinafter, a reading method including this error detection and correction code portion will be described.
[0065]
FIG. 15 shows an example of an information code having an error detection / correction code portion. FIG. 15 shows an information code 60 in which each mark is arranged in the scanning direction. This information code 60 is formed on the outer peripheral surface or inner peripheral surface of the winding core. When the usage pattern is the end face of the winding core, they are arranged in the circumferential direction as in the above embodiment. The information code 60 is composed of an information code body portion (data mark) 61 and an error detection /
[0066]
FIG. 16 shows a block diagram of the information code reader 70. A read signal from the reflection type read
[0067]
The
[0068]
If the number of errors exceeding a certain range is detected, the threshold level is changed depending on whether the flag is “down” or “up”. Further, it is determined whether or not the number of errors has decreased from the previous time. If the number has decreased, the process is repeated until the error falls within a certain range. That is, for example, when the flag is “down” and the number of errors is lower than the previous time, the threshold level is lowered by a certain amount via the D /
[0069]
In this way, by lowering the threshold level of the
[0070]
Next, the contents of the error detection and correction code and the generator polynomial will be described. Consider an information code system composed of two check words P and Q attached to information codes C1, C2, C3 and C4. The check words P and Q are defined as solutions of the following simultaneous equations. In the case of 2 parity, error detection and erasure correction up to 2 words can be performed, and when no erasure is used, the correction capability is up to 1 word.
A + B + C + D + P + Q = 0 (1)
α6・ A + αFive・ B + αFour・ C + αThree・ D + α2・ P + α ・ Q = 0 (2)
Note that “+” in the
[0071]
Therefore, syndromes S1 and S2 are as follows.
[0072]
If the information codes C1 to C4 are each composed of 3 bits, the generator polynomial is expressed by the following equation.
F (X) = XThree+ X + 1 (5)
[0073]
When calculating the number, position and value of errors, it is as follows. First, if only the information code C1 contains an error,
α6・ S1 = S2 = α6・ EC1(6)
EC1Indicates a C1 code including an error.
In addition, if only the information code C2 contains an error,
αFive・ S1 = S2 = αFive・ EC2(7)
EC2Indicates a C2 code including an error.
Also, if only the information code C3 contains an error,
αFour・ S1 = S2 = αFour・ EC3(8)
EC3Indicates a C3 code including an error.
In addition, when only the information code C4 contains an error,
αThree・ S1 = S2 = αThree・ EC4(9)
EC4Indicates a C4 code including an error.
[0074]
Next, information code correction will be described with reference to FIG. First, the start bit position of each code read by the reading
[0075]
Note that the information code having the error detection and correction code may be read alone or in combination with the information code reading method described above.
[0076]
【The invention's effect】
According to the present invention, after the information code is pre-scanned, the main scan is performed. In the pre-scan, the maximum value and the minimum value of the sampling data are obtained. In the main scan, the amplitude is determined based on the maximum value and the minimum value. Since the sampling data is stored in the memory, it is possible to store the sampling data with high accuracy without increasing the capacity of the memory.
[0077]
Further, an information mark is formed by arranging a start mark and a plurality of data marks in a circumferential direction on a circumferential surface or an end surface of the rotating body, and the preliminary scanning is performed when the rotating body is rotated in one direction. By performing the main scanning at the time of rotation in the other direction, the information mark can be efficiently scanned. In contrast to the sampling data obtained by A / D converting the scanning signal, in the main scanning, the number of bits of the sampling data is reduced and stored in the data memory according to the determined amplitude range, thereby reducing the capacity of the data memory. That's it, you can reduce the cost by this amount.
[0078]
The maximum value and the minimum value are extracted from the sampling data to determine the threshold level, and by using this threshold level, the length equivalent value of each mark portion is obtained, and the mark having the maximum length equivalent value is detected as a start mark. Each data mark can be easily identified.
[0079]
The minimum length of the data mark is determined by the distance between the first start mark and the second start mark, the area where the edge portion of the mark exists is determined, and the sampling data crosses the threshold level in this edge existing area Since the bit of the data mark is determined to be “0” or “1” from the crossing direction, each bit can be determined reliably.
[0080]
In addition, when it is not possible to determine whether the bit of the data mark is “0” or “1”, a read error is generated, and at the time of this read error, the threshold level is changed, or the edge existing area is expanded and data is read. By re-determining the mark, the reading accuracy can be increased.
[0081]
Further, the reading accuracy can be improved by expanding the allowable noise range at the time of reading error, re-extracting the maximum value and the minimum value, and changing the threshold level based on this. In particular, even if dust adheres to a photo sensor or the like and the signal level is lowered, this can be easily dealt with.
[0082]
The information code has an error detection / correction code part, an error rate at the time of reading is obtained from the error detection / correction code part, and the information code is read by changing a threshold level of the reading sensor based on the error rate. The code can be read stably.
[Brief description of the drawings]
FIG. 1 is a schematic diagram showing a color thermal printer that implements an information code reading method of the present invention.
FIG. 2 is a front view showing an example of an information code.
FIG. 3 is an explanatory diagram showing recording positions of data marks.
FIG. 4 is a flowchart showing information code reading processing;
FIG. 5 is a graph showing types of sampling data in preliminary scanning.
FIG. 6 is a graph showing an example of sampling data in preliminary scanning.
FIG. 7 is a flowchart showing information code decoding processing;
FIG. 8 is a flowchart showing local maximum value determination processing;
FIG. 9 is a flowchart showing a minimum value determination process.
FIG. 10 is an explanatory diagram illustrating a specific example of processing for determining a maximum value and a minimum value.
FIG. 11 is an explanatory diagram showing an example of an information code and sampling data corresponding to the information code.
FIG. 12 is an explanatory diagram illustrating an example of start mark detection processing;
FIG. 13 is an explanatory diagram illustrating an example of identification processing of each bit.
FIG. 14 is an enlarged front view showing an example of an information code in another embodiment.
FIG. 15 is an enlarged front view showing an example of an information code having an error detection / correction code.
FIG. 16 is a schematic diagram showing an information code reader having an error detection and correction code.
FIG. 17 is a flowchart showing a processing procedure in the information code reader.
FIG. 18 is a functional block diagram showing error correction using an error detection / correction code.
[Explanation of symbols]
10 Paper feed magazine
11 Roll paper
12 Recording paper
13 core
14, 51, 60 Information code
16 Paper feed roller
30 Photosensor
62 Error detection and correction code part
71 Reading sensor
72 Comparator
DM data mark
SM start mark
BA data recording area
SMA start mark recording area
Claims (16)
前記回転体を複数回転させて前記情報コードを読取センサで走査し、この出力信号をA/D変換してサンプリングデータとしてデータメモリに記憶するデータサンプリング工程と、
前記サンプリングデータから最大値及び最小値を抽出し、前記最大値と最小値とから許容ノイズを算出し、この許容ノイズを超えて前記サンプリングデータが変動するときにこの変動点におけるサンプリングデータを極大値又は極小値として求め、求めた極大値及び極小値の中から隣接する極大値及び極小値に基づき前記各マークに対応する個別のスレッシュレベルを決定するスレッシュレベル決定工程と、
決定したスレッシュレベルにより、前記各マーク部分の長さを求め、最長長さを有するマークをスタートマークとして検出するスタートマーク検出工程と、
第1のスタートマークと第2のスタートマークとの間隔によりデータマークの最小長さを求めて各マークのエッジ部分が存在する領域を決定し、このエッジ存在領域において、前記サンプリングデータがスレッシュレベルを横切るポイントと横切る方向とからデータマークのビットが「0」か「1」かを判定するデータ判定工程とを備えることを特徴とするデータ読取方法。A start mark and a plurality of data marks are arranged in the circumferential direction on the circumferential surface or end face of the rotator, and the start mark is an information code formed longer in the circumferential direction than the data mark. In a method of reading an information code, which is sometimes scanned by a reading sensor, and each bit of the information code is identified based on an output signal from the reading sensor to read information.
A data sampling step of rotating the rotating body a plurality of times, scanning the information code with a reading sensor, A / D converting the output signal and storing it in a data memory as sampling data;
The maximum value and the minimum value are extracted from the sampling data, the allowable noise is calculated from the maximum value and the minimum value, and when the sampling data fluctuates beyond the allowable noise, the sampling data at the changing point is the maximum value. Alternatively, a threshold level determining step for determining an individual threshold level corresponding to each mark based on a local maximum value and a local minimum value adjacent to each other from the local maximum value and the local minimum value obtained as a local minimum value ;
According to the determined threshold level, the length of each mark portion is obtained, and a start mark detection step of detecting a mark having the longest length as a start mark;
The minimum length of the data mark is obtained by the interval between the first start mark and the second start mark to determine the area where the edge portion of each mark exists, and the sampling data has a threshold level in this edge existing area. A data reading method comprising: a data determination step of determining whether a bit of a data mark is “0” or “1” from a crossing point and a crossing direction.
前記極大値検出処理では、
前記サンプリングデータの現在データを極大値とし、次のサンプリングデータと前記極大値とを比較し、この比較において、極大値よりもサンプリングデータが大きいときに極大値を更新し、極大値よりもサンプリングデータが小さいときに、極大値からサンプリングデータを引いた差と前記許容ノイズとを比較し、前記差が許容ノイズよりも小さいときに極大値を更新せずに維持し、前記差が許容ノイズよりも大きいときに現在の極大値をこのビットにおける極大値として決定し、
この極大値を決定した後に、極小値検出に移り、
極小値検出処理では、前記極大値を検出したポイントのデータを極小値とし、次に極小値とこのポイントのデータを比較し、この比較において、極小値よりもサンプリングデータが小さいときに極小値を更新し、極小値よりもサンプリングデータが大きいときに、サンプリングデータから極小値を引いた差と前記許容ノイズとを比較し、前記差が許容ノイズよりも小さいときに極小値を更新せずに維持し、前記差が許容ノイズよりも大きいときに現在の極小値をこのビットにおける極小値として決定し、
この極小値を決定した後に、このポイントのデータを極大値として、前記極大値検出処理に移ることを特徴とする請求項1ないし6いずれか1つ記載の情報コード読取方法。The threshold level determination step alternately performs local maximum value detection processing and local minimum value detection processing,
In the maximum value detection process,
The current data of the sampling data and the maximum value is compared with the next sampling data the maximum value, in this comparison, and updates the maximum value when the sampling data is greater than the maximum value, the sampling data than the maximum value When the difference is less than the allowable noise, the difference obtained by subtracting the sampling data from the maximum value is compared with the allowable noise, and when the difference is smaller than the allowable noise, the maximum value is maintained without being updated. If it is, determine the current local maximum as the local maximum at this bit,
After determining this local maximum, we move on to local minimum detection.
In the local minimum value detection process, the data at the point where the local maximum value is detected is set as the local minimum value, and then the local minimum value is compared with the data at this point. When the sampling data is larger than the minimum value, the difference between the sampling data minus the minimum value is compared with the allowable noise, and when the difference is smaller than the allowable noise, the minimum value is not updated. And when the difference is greater than the allowable noise, determine the current local minimum as the local minimum at this bit;
7. The information code reading method according to claim 1 , wherein after determining the minimum value, the data at this point is set as a maximum value, and the process proceeds to the maximum value detection process.
前記情報コードを前記回転体の回転の際に走査する読取センサと、
この読取センサからの出力信号をA/D変換してサンプリングするサンプリング回路と、
前記サンプリングデータをデータメモリに書き込むデータ書込手段と、
前記データメモリに記憶したサンプリングデータに基づき情報コードの情報を解読する情報解読手段とを備え、
前記情報解読手段は、
前記サンプリングデータから最大値及び最小値を抽出し、前記最大値と最小値とから許容ノイズを算出し、この許容ノイズを超えて前記サンプリングデータが変動するときにこ の変動点におけるサンプリングデータを極大値又は極小値として求め、求めた極大値及び極小値の中から隣接する極大値及び極小値に基づき前記各マークに対応する個別のスレッシュレベルを決定するスレッシュレベル決定部と、
前記スレッシュレベルに基づき前記各マーク部分の長さ相当値を求め、最大長さ相当値を有するマークをスタートマークとして検出するスタートマーク検出部と、
前記第1及び第2のスタートマークの間隔によりデータマークの最小長さを求め、マークのエッジ部分が存在する領域を決定するエッジ存在領域決定部と、
前記エッジ存在領域において、前記サンプリングデータがスレッシュレベルを横切るポイントと横切る方向とからデータマークのビットが「0」か「1」かを判定するデータ判定部とから構成されていることを特徴とする情報コードの読取装置。Is composed of a start mark and a plurality of data marks on the peripheral surface or end surface of the rotary body are arranged in the circumferential direction, the information code start mark which is formed longer in the circumferential direction than the data marks of the rotating body In an information code reader that scans with a reading sensor during rotation, identifies each bit of the information code based on an output signal from the reading sensor, and reads recording paper identification information,
A reading sensor that scans the information code when the rotating body rotates;
A sampling circuit for A / D converting and sampling the output signal from the reading sensor;
Data writing means for writing the sampling data into a data memory;
Information decoding means for decoding information of the information code based on the sampling data stored in the data memory,
The information decoding means includes
Extracting maximum and minimum values from the sampled data, the maximum value and the minimum value and to calculate the allowable noise, maximum sampling data at change points of Tokiniko that the sampled data exceeds this allowable noise fluctuates A threshold level determining unit that determines an individual threshold level corresponding to each mark based on a local maximum value and a local minimum value that are adjacent to each other based on the local maximum value and the local minimum value obtained as a value or a local minimum value ;
A start mark detection unit for obtaining a length equivalent value of each mark portion based on the threshold level, and detecting a mark having a maximum length equivalent value as a start mark;
An edge presence region determining unit for determining a minimum length of a data mark according to an interval between the first and second start marks and determining a region where an edge portion of the mark exists;
In the edge presence region, the data determination unit is configured to determine whether the bit of the data mark is “0” or “1” from the point where the sampling data crosses the threshold level and the crossing direction. Information code reader.
予備走査ではサンプリングデータの振幅に基づき本走査におけるサンプリングデータの記録振幅範囲を決定し、前記データ書込部では前記記録振幅範囲に基づきサンプリングデータのビット数を減らしてデータメモリに書き込むことを特徴とする請求項14又は15記載の情報コードの読取装置。 In the preliminary scan, the recording amplitude range of the sampling data in the main scan is determined based on the amplitude of the sampling data, and the data writing unit reduces the number of bits of the sampling data based on the recording amplitude range and writes it in the data memory. 16. The information code reader according to claim 14 or 15.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001045661A JP4098481B2 (en) | 2000-02-22 | 2001-02-21 | Information code reading method and apparatus |
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000-44569 | 2000-02-22 | ||
| JP2000044569 | 2000-02-22 | ||
| JP2001045661A JP4098481B2 (en) | 2000-02-22 | 2001-02-21 | Information code reading method and apparatus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2001312688A JP2001312688A (en) | 2001-11-09 |
| JP4098481B2 true JP4098481B2 (en) | 2008-06-11 |
Family
ID=26585840
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001045661A Expired - Fee Related JP4098481B2 (en) | 2000-02-22 | 2001-02-21 | Information code reading method and apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4098481B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005292083A (en) * | 2004-04-05 | 2005-10-20 | Fuji Photo Film Co Ltd | Method and apparatus for measuring sensitivity distribution of photosensor |
| JP6056444B2 (en) * | 2012-12-17 | 2017-01-11 | カシオ計算機株式会社 | Bar code reading apparatus, bar code reading method, bar code reading program and printing apparatus |
-
2001
- 2001-02-21 JP JP2001045661A patent/JP4098481B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2001312688A (en) | 2001-11-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4731658A (en) | Facsimile machine using cut sheet of paper | |
| JP6630166B2 (en) | Detection device, printer device, and detection method | |
| JP4098481B2 (en) | Information code reading method and apparatus | |
| JPH08328447A (en) | Document reader | |
| JP2005022130A (en) | Method of positioning recording paper for printer, program for causing computer to execute this method, recording medium recording this program, recording paper for printer, printer | |
| JP3357119B2 (en) | Label printing method in label printer | |
| JP5307595B2 (en) | Label printer, paper cueing position control method and program | |
| US20250181291A1 (en) | Printing apparatus for performing printing according to type of printing paper determined by recognizing bar pattern | |
| EP4478172A1 (en) | Printing apparatus for performing printing according type of printing paper determined by recognizing bar pattern | |
| US6437814B1 (en) | Ink sheet type-printing apparatus | |
| US20020020753A1 (en) | Code reading method and device for recording material roll | |
| JP2005178093A (en) | Printer, recording paper information reading method, detection method of remaining amount of recording paper and recording paper roll | |
| US6907356B2 (en) | Encoder strip damage detector | |
| CN100548845C (en) | Threshold setting method and signal conditioning package | |
| JP2001225298A (en) | Image recording device | |
| US6715684B1 (en) | Code reading apparatus | |
| JP2001341367A (en) | Printer | |
| US20070036602A1 (en) | Apparatus and method for detecting the amount of ink ribbon used | |
| JP2002230645A (en) | Receipt printing device and receipt issuing method | |
| JPH0129096Y2 (en) | ||
| JPH03126572A (en) | image recording device | |
| JP2007067721A (en) | Image forming apparatus | |
| JPH0514590A (en) | Facsimile equipment | |
| JPH08156282A (en) | Ink jet recording device | |
| JPH05258355A (en) | Optical card and its reading method and reading device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20051220 |
|
| A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20061201 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070528 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070606 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070706 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20080305 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080313 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110321 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110321 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120321 Year of fee payment: 4 |
|
| LAPS | Cancellation because of no payment of annual fees |