JP3971347B2 - Optical information reading method - Google Patents

Optical information reading method Download PDF

Info

Publication number
JP3971347B2
JP3971347B2 JP2003179640A JP2003179640A JP3971347B2 JP 3971347 B2 JP3971347 B2 JP 3971347B2 JP 2003179640 A JP2003179640 A JP 2003179640A JP 2003179640 A JP2003179640 A JP 2003179640A JP 3971347 B2 JP3971347 B2 JP 3971347B2
Authority
JP
Japan
Prior art keywords
image data
brightness difference
optical information
gray value
reading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003179640A
Other languages
Japanese (ja)
Other versions
JP2005020174A (en
Inventor
正己 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Wave Inc
Original Assignee
Denso Wave Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Wave Inc filed Critical Denso Wave Inc
Priority to JP2003179640A priority Critical patent/JP3971347B2/en
Publication of JP2005020174A publication Critical patent/JP2005020174A/en
Application granted granted Critical
Publication of JP3971347B2 publication Critical patent/JP3971347B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、バーコードのような光学的情報の読み取り方法、特には液晶画面に表示された光学的情報の読み取りに好適する光学的情報読み取り方法に関する。
【0002】
【従来の技術】
特許文献1には、バーコードラベルからバーコードを読み取る際に、その読み取り波形に含まれるノイズ成分(ラベルの汚れや擦れなどに起因したノイズ成分)を分離して除去する方法が記載されている。具体的には、このノイズ除去方法では、読み取った信号波形を量子化する工程、量子化された信号波形のピーク値を検出し、検出したピーク値相互間における波高差を検出する工程、その波高差の度数分布を検出する工程、最小の信号波高差を検出する工程、その最小の信号波高差より小さい値を基準信号として信号パターン読み取り波形より削除する工程を順次行うことにより、読み取り波形に含まれるノイズ成分を除去する構成となっている。
【0003】
【特許文献1】
特開平5−180210号公報
【0004】
【発明が解決しようとする課題】
近年では、携帯電話機などの端末機器が有する液晶画面に表示された光学的情報(例えばバーコード)を読み取るというニーズが多くなっている。この場合、液晶画面には、多数の画素の境界線部分に対応した暗い縞が格子状に存在するため、液晶画面から光学的情報を読み取る際には、当該格子状の暗い縞の影響によって、読み取り信号波形中に比較的大きいレベルのノイズ成分が含まれることになる。このようなノイズ成分は、読み取り対象がバーコードの場合、細い黒バーと認識されることになるため、そのデコードが不可能になる恐れがある。また、液晶画面に照明むらがある場合にも、読み取り信号波形中に比較的大きいレベルのノイズ成分が含まれるものであり、従って、バーコードのデコードが不可能になる可能性が高くなる。特許文献1に記載されたノイズ除去方法は、比較的低いレベルのノイズを除去する場合に有効であるが、液晶画面に表示されたバーコードを読み取るというニーズを全く考慮に入れておらず、このため、液晶画面に表示されたバーコードを読み取る場合のように読み取り信号波形中に比較的大きいレベルのノイズ成分が含まれる場合には、十分なノイズ除去効果を発揮することが困難になるという事情があった。
【0005】
本発明は上記のような事情に鑑みてなされたものであり、その目的は、液晶画面に表示された光学的情報の読み取りを確実に行うことができる光学的情報読み取り方法を提供することにある。
【0006】
【課題を解決するための手段】
請求項1記載の光学的情報読み取り方法においては、画像センサによる読み取り動作に応じてメモリに順次取り込まれたグレイ値画像データ、つまり読み取り面に表示された光学的情報に対応したグレイ値画像データの極小値及び極大値が出現順に検出されると共に、隣接する極小値及び極大値の差が明度差データとして検出される。検出された明度差データ群は、複数段階の明度差階層毎に分類され、その分類結果に基づいて明度差階層毎の明度差データ出現頻度の度数分布が検出される。
【0007】
ここで、読み取り対象の光学的情報が例えば液晶画面であった場合、画像センサは、液晶画面上に存在する格子状の暗い縞も同時に読み取るため、上述した明度差階層毎の明度差データ出現頻度の度数分布においては、画素境界線部分に対応した明度差データ、つまりグレイ値画像データに含まれるノイズ成分に対応した明度差データの出現頻度が最も多くなる。このノイズ成分に対応した明度差データは、読み取り対象のグレイ値画像データに対応した明度差データに比べて相対的に小さい明度差階層に属する。従って、明度差データ出現頻度の度数分布の包絡線に着目した場合、明度差階層が比較的低い領域に、ノイズ成分に対応したピークが相対的に大きな山部が出現し、明度差階層が比較的高い領域に、読み取り対象の光学的情報に対応したピークが相対的に小さな山部が出現することになる。
【0008】
請求項1記載の光学的情報読み取り方法においては、明度差データ出現頻度の度数分布の包絡線により形成される山部のうち、その山部のピークに対応した明度差データ出現頻度が予め決められた範囲(例えば、予め設定された基準値以下の範囲)にあり、且つ明度差階層が相対的に高い山部に属するグレイ値画像データ群を読み取り対象として区分する構成となっている。このため、液晶画面に表示された光学的情報を読み込む場合に、その液晶画面上に存在する格子状の暗い縞に起因したノイズ成分の除去を的確に行い得るようになる。そして、上記のように読み取り対象に区分されたグレイ値画像データは、予め設定されたしきい値に基づいて二値化されると共に、このように二値化されたデータ列の解析処理が行われるものであり、結果的に、液晶画面に表示された光学的情報の読み取りを確実に行い得るようになる。
【0009】
請求項2記載の光学的情報読み取り方法によれば、読み取り対象に区分されたグレイ値画像データ群が適正なものであるか否かが、当該グレイ値画像データ群についての隣接する極小値及び極大値の差を示す明度差データの大きさと極大値相互間のピッチまたは極小値相互間のピッチとに基づいてチェックされることになるから、液晶画面に表示された光学的情報の読み取り動作の信頼性を高め得るようになる。
【0010】
請求項3記載の光学的情報読み取り方法によれば、読み取り面に表示された光学的情報を読み取るための一連の動作を、複数に分割された画像領域毎に行うようになっているから、光学的情報が表示された読み取り面の明るさにばらつきがある場合であっても、そのばらつきが光学的情報の読み取り動作に及ぼす悪影響を抑制できることになる。
【0011】
請求項4記載の光学的情報読み取り法方法によれば、読み取り対象に区分されたグレイ値画像データを二値化するために必要なしきい値が、ノイズ成分に区分されたグレイ画像データ群に含まれる最も大きい明度差データを基準に設定されるから、グレイ値画像データの二値化処理がノイズ成分により不正確になる事態を未然に防止できる。
【0012】
請求項5記載の光学的情報読み取り方法によれば、ノイズ成分に区分されたグレイ画像データ群に含まれる最も大きい明度差データを基準に設定されたしきい値が、マージン領域に含まれるグレイ値画像データのレベルに基づいて調整されるから、グレイ値画像データの二値化処理の信頼性を高め得るようになる。
【0013】
【発明の実施の形態】
以下、本発明の一実施例について図1ないし図5を参照しながら説明する。
図4にはバーコードリーダの概略的な上面図が示されている。この図4において、バーコードリーダ1には、光学ヘッド部2、液晶ディスプレイ3、各種キーを備えた操作部4、トリガスイッチ5が設けられている。尚、光学ヘッド部2には、CCDイメージセンサ或いはCMOSイメージセンサのような光学素子より成る画像センサ(後述する図5に符号7を付して示す)、及びLEDなどを備えて構成された照明部(図5に符号8を付して示す)が設けられている。この場合、画像センサ7は、読み取り面から読み取ったバーコード(光学的情報)を例えば256階調のグレイ値画像データに変換して出力する構成となっている。
【0014】
図5には、バーコードリーダ1の電気的構成が機能ブロックの組合せにより概略的に示されている。この図5に示すように、バーコードリーダ1は、マイコン6を中心に構成されている。このマイコン6には、前記液晶ディスプレイ3、操作部4、トリガスイッチ5、画像センサ7及び照明部8の他に、画像センサ7が読み取ったグレイ値画像データがAD変換部9を通じて与えられる画像メモリ10、外部装置との間でデータの送受信を行うための入出力インタフェース部11、種々のデータ格納用のメモリ12が接続されている。尚、図示しないが、バーコードリーダ1内には、マイコン6などに電源を供給するための電池を含む電源回路が内蔵されている。
【0015】
マイコン6は、携帯電話機などの液晶画面に表示されたバーコード(光学的情報)を、通常の読み込み動作とは異なる解析処理方法で読み取る機能を備えたものであり、以下、その読み取り機能について図1ないし図3も参照しながら説明する。
【0016】
図1のフローチャートには、液晶画面に表示されたバーコードを読み取るときの動作内容が示されている。すなわち、このような読み取り動作を行うときには、バーコードを表示した状態の液晶画面に対して、バーコードリーダ1の光学ヘッド部2を対向させながらトリガスイッチ5を操作するものであり、これに応じて図1に示すグレイ値画像データ取込ステップS1が実行される。このステップS1では、画像センサ7が液晶画面に表示されたバーコードを走査すると共に、その走査により得られたグレイ値画像データを画像メモリ10に取り込むようになる。
【0017】
この後には、取り込まれたグレイ値画像データの極小値及び極大値を出現順に検出してメモリ12に記憶するステップS2(本発明でいう第1のステップに相当)を実行する。つまり、画像メモリ10に取り込まれたグレイ値画像データ(256階調)は、読み取り対象のバーコードの黒地部分で明度階調が低くなると共に、白地部分で明度階調が高くなるものであり、従って、図2に一例を示すように、バーコードを読み取ったときのグレイ値画像データにおいては、極小値及び極大値が交互に出現することになる。勿論、グレイ値画像データ中には、ノイズ成分に対応した極小値及び極大値も含まれることになる。ステップS2では、このようなグレイ値画像データについての極小値及び極大値がメモリ12に順次記憶される。
【0018】
再び図1において、ステップS2の実行後には、検出した極小値及び極大値群のうち隣接する極小値及び極大値の差を明度差データとして順次検出し、その検出結果をメモリ12に記憶するというステップS3(本発明でいう第2のステップに相当)を実行する。つまり、図2中に一例を示すように、極小値及びこれに隣接する極大値の差が明度差データΔLとなるものである。
【0019】
この後には、検出した明度差データ群を各明度差データの大きさに従って分類するための複数段階の明度差階層を設定するステップS4(本発明でいう第3のステップに相当)を実行する。この明度差階層は、例えば32段階に設定されるものであり、この実施例ではグレイ値画像データが256階調であるから、各明度差階層には8階調分ずつのグレイ値画像データが含まれることになる。
【0020】
次いで、ステップS3で検出した明度差データ群をステップS4で設定された明度差階層毎に分類することにより、明度差階層毎の明度差データ出現頻度の度数分布を検出するステップS5(本発明でいう第4のステップに相当)を実行する。すなわち、このステップS5では、図3に示すような明度差データ出現頻度の度数分布が作成されることになる。尚、この図3は、横軸が明度差階層(32段階)、縦軸が明度差データ出現頻度を示すものである。
【0021】
この場合、本実施例のように読み取り対象のバーコードが液晶画面に表示されたものであったときには、画像センサ7は、液晶画面上に存在する格子状の暗い縞も同時に読み取るため、図3に示すような明度差階層毎の明度差データ出現頻度の度数分布においては、液晶画面における画素境界線部分に対応した明度差データ、つまりグレイ値画像データに含まれるノイズ成分に対応した明度差データの出現頻度が最も多くなる。また、このノイズ成分に対応した明度差データは、読み取り対象となるバーコードを示すグレイ値画像データに対応した明度差データに比べて相対的に小さい明度差階層に属する。従って、明度差データ出現頻度の度数分布の包絡線に着目した場合、明度差階層が比較的低い領域(図3の例では明度差階層が「17」以下の領域)にノイズ成分に対応したピークが相対的に大きな山部が出現し、明度差階層が比較的高い領域にピークが相対的に小さな山部が出現することになる。
【0022】
そこで、ステップS5の実行後には、ステップS6(本発明でいう第5のステップに相当)を実行する。このステップS6では、明度差データ出現頻度の度数分布(図3参照)の包絡線により形成される山部のうち、その山部のピークに対応した明度差データ出現頻度が予め決められた範囲(例えば、読み取り対象のバーコードのデータ量などに応じて予め設定された基準値以下の範囲)にあり、且つ明度差階層が相対的に高い山部(図3の例では右側の山部)に属するグレイ値画像データ群を読み取り対象に区分し、その山部以外のグレイ値画像データをノイズ成分に区分する。
【0023】
この後には、読み取り対象に区分されたグレイ値画像データを予め設定されたしきい値に基づいて二値化するステップS7(本発明でいう第6のステップに相当)を実行する。当該しきい値は、ステップS6でノイズ成分に区分されたグレイ画像データ群に含まれる最も大きい明度差データを基準に設定されるものであり、図3の例では、ノイズ成分に区分された山部の最も大きな明度階層差が「17」であるから、これを8倍した「136」が上記最も大きい明度差データとなるものであり、従って、しきい値は「136」に設定されることになる。
【0024】
ステップS7で二値化されたデータ列は、引き続き行われるステップS8でのデータ解析処理に供されるものであり、このステップS8では、そのデータ列をデコードすることによりバーコードに記録された情報を読み取るものである。この後には、解析結果を出力するためのステップS9を実行して一連のバーコード読取動作を終了する。尚、ステップS9では、解析結果を液晶ディスプレイ3に表示すると共に、メモリ12に記憶する動作が行われるものであり、その解析結果は、必要に応じて入出力インタフェース11を通じて外部に出力されるものである。
【0025】
要するに、上記した本実施例によれば、液晶画面に表示されたバーコードを読み込む場合に、ステップS2〜S5の実行に応じて、その液晶画面上に存在する格子状の暗い縞に起因したノイズ成分の除去を的確に行い得るようになる。また、読み取り対象に区分されたグレイ値画像データは、ステップS6において、予め設定されたしきい値により二値化されると共に、その二値化データ列の解析処理に供されるものであり、結果的に、読み取り対象のバーコードが液晶画面に表示されたものであっても、当該バーコードの読み取りを確実に行い得るようになる。
【0026】
また、本実施例によるバーコードの読み取り法方法によれば、ステップS6において読み取り対象に区分されたグレイ値画像データを二値化するために必要なしきい値が、当該ステップS6においてノイズ成分に区分されたグレイ画像データ群に含まれる最も大きい明度差データを基準に設定されるから、グレイ値画像データの二値化処理がノイズ成分により不正確になる事態を未然に防止できるようになる。
【0027】
(他の実施の形態)
ステップS6においては、読み取り対象に区分したグレイ値画像データ群について、明度差データの大きさと極大値相互間のピッチまたは極小値相互間のピッチとをチェックし、それら明度差データの大きさ並びにピッチがそれぞれについて予め設定された範囲に収まっているときに当該グレイ値画像データ群を読み取り対象として確定する構成とすることができる。つまり、読み取り対象のバーコードに対応したグレイ値画像データにあっては、明度差データの大きさが所定の有効レベル以上あるはずであり、極大値相互間のピッチまたは極小値相互間のピッチも所定範囲で揃うはずであるから、これを利用して上述のような確定処理を行うことができる。
このようなバーコード読み取り方法によれば、読み取り対象に区分されたグレイ値画像データ群が適正なものであるか否かが、当該グレイ値画像データ群についての隣接する極小値及び極大値の差を示す明度差データと極大値相互間のピッチまたは極小値相互間のピッチとに基づいてチェックされることになるから、液晶画面に表示されたバーコードの読み取り動作が一段と確実なものになり、その信頼性を向上できるようになる。
【0028】
また、読み取り対象の領域、つまりグレイ値画像データに対応した画像領域を複数の領域に分割し、それら分割領域毎にステップS2〜S8を実行する構成とすることもできる。このようなバーコード読み取り方法によれば、液晶画面に表示されたバーコードを読み取るための一連の動作を、複数に分割された画像領域毎に行うようになっているから、バーコードが表示された液晶画面の明るさにばらつきがある場合(例えば、バックライトの位置が偏っている場合)であっても、そのばらつきがバーコードの読み取り動作に及ぼす悪影響を抑制できることになる。
【0029】
ステップS6では、明度差データ出現頻度の度数分布の特徴からバーコードのマージン領域を判別するステップと、判別されたマージン領域に含まれるグレイ値画像データのレベルに基づいてステップS7での設定しきい値を調整するステップとを行うようにしても良い。具体的には、図2と同一内容の図6に示すように、グレイ値画像データの極小値及び極大値の変化幅が設定値以下の領域をバーコードのマージン領域と判別し、そのマージン領域に含まれるグレイ値画像データの最大明度階調が設定しきい値より大きい場合に、前記しきい値を当該最大明度階調より大きい値となるように調整する構成としても良い。
このようなバーコードの読み取り方法によれば、ノイズ成分に区分されたグレイ画像データ群に含まれる最も大きい明度差データを基準に設定されたしきい値が、マージン領域に含まれるグレイ値画像データのレベルに基づいて調整されるから、グレイ値画像データの二値化処理の信頼性を高め得るようになる。
【図面の簡単な説明】
【図1】本発明の一実施例による光学的情報読取方法を示すフローチャート
【図2】画像センサで読み取ったグレイ値画像データの明度階調例を示す図
【図3】明度差データ出現頻度の度数分布図
【図4】バーコードリーダの概略的正面図
【図5】バーコードリーダの電気的構成を示す機能ブロック図
【図6】変形例を説明するための図2相当図
【符号の説明】
1はバーコードリーダ、6はマイコン、7は画像センサ、10は画像メモリ、12はメモリを示す。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method for reading optical information such as a barcode, and more particularly to an optical information reading method suitable for reading optical information displayed on a liquid crystal screen.
[0002]
[Prior art]
Patent Document 1 describes a method of separating and removing a noise component (a noise component caused by dirt or rubbing of a label) included in a read waveform when a barcode is read from a barcode label. . Specifically, in this noise removal method, a step of quantizing the read signal waveform, a step of detecting a peak value of the quantized signal waveform, a step of detecting a wave height difference between the detected peak values, Detecting the difference frequency distribution, detecting the minimum signal peak difference, and deleting the smaller signal peak difference from the signal pattern reading waveform as a reference signal are included in the read waveform. The noise component is removed.
[0003]
[Patent Document 1]
Japanese Patent Laid-Open No. 5-180210
[Problems to be solved by the invention]
In recent years, there has been an increasing need to read optical information (for example, a barcode) displayed on a liquid crystal screen of a terminal device such as a mobile phone. In this case, the liquid crystal screen has dark stripes corresponding to the boundary portions of a large number of pixels in the form of a lattice, so when reading optical information from the liquid crystal screen, due to the influence of the grid-like dark stripes, A relatively large level of noise component is included in the read signal waveform. Such a noise component may be recognized as a thin black bar when the object to be read is a bar code, and may not be decoded. Even when the liquid crystal screen has uneven illumination, a relatively large level of noise component is included in the read signal waveform, and therefore, there is a high possibility that the barcode cannot be decoded. The noise removal method described in Patent Document 1 is effective in removing relatively low level noise, but does not take into account the need to read a barcode displayed on a liquid crystal screen. Therefore, when a relatively large level of noise component is included in the read signal waveform as in the case of reading a bar code displayed on the liquid crystal screen, it is difficult to exert a sufficient noise removal effect. was there.
[0005]
The present invention has been made in view of the above circumstances, and an object thereof is to provide an optical information reading method capable of reliably reading optical information displayed on a liquid crystal screen. .
[0006]
[Means for Solving the Problems]
In the optical information reading method according to claim 1, gray value image data sequentially fetched into a memory in response to a reading operation by the image sensor, that is, gray value image data corresponding to the optical information displayed on the reading surface. The local minimum value and the local maximum value are detected in the order of appearance, and the difference between the adjacent local minimum value and local maximum value is detected as brightness difference data. The detected lightness difference data group is classified for each of the plurality of lightness difference hierarchies, and the frequency distribution of the lightness difference data appearance frequency for each lightness difference hierarchies is detected based on the classification result.
[0007]
Here, when the optical information to be read is, for example, a liquid crystal screen, the image sensor also reads the grid-like dark stripes present on the liquid crystal screen at the same time, and therefore the frequency difference data appearance frequency for each of the above-described brightness difference layers. In the frequency distribution, the lightness difference data corresponding to the pixel boundary portion, that is, the lightness difference data corresponding to the noise component included in the gray value image data has the highest frequency of appearance. The brightness difference data corresponding to the noise component belongs to a brightness difference hierarchy that is relatively smaller than the brightness difference data corresponding to the gray value image data to be read. Therefore, when paying attention to the envelope of the frequency distribution of the brightness difference data appearance frequency, a relatively high peak corresponding to the noise component appears in a region where the brightness difference hierarchy is relatively low, and the brightness difference hierarchy is compared. A peak portion having a relatively small peak corresponding to the optical information to be read appears in the target area.
[0008]
In the optical information reading method according to claim 1, among the peaks formed by the envelope of the frequency distribution of the brightness difference data appearance frequency, the brightness difference data appearance frequency corresponding to the peak of the peak is predetermined. The gray value image data group belonging to the mountain portion that is in a range (for example, a range equal to or less than a preset reference value) and that has a relatively high brightness difference hierarchy is classified as a reading target. For this reason, when the optical information displayed on the liquid crystal screen is read, it is possible to accurately remove the noise component due to the grid-like dark stripes existing on the liquid crystal screen. The gray value image data classified as a reading target as described above is binarized based on a preset threshold value, and analysis processing of the binarized data string is performed. As a result, the optical information displayed on the liquid crystal screen can be reliably read.
[0009]
According to the optical information reading method of claim 2, whether or not the gray value image data group classified as a reading target is appropriate is determined based on whether or not the adjacent local minimum value and local maximum are related to the gray value image data group. Reliability of reading optical information displayed on the liquid crystal screen is checked because it is checked based on the size of the brightness difference data indicating the difference in value and the pitch between the maximum values or the pitch between the minimum values. You can increase your sex.
[0010]
According to the optical information reading method of the third aspect, the series of operations for reading the optical information displayed on the reading surface is performed for each of the divided image areas. Even if there is a variation in the brightness of the reading surface on which the target information is displayed, the adverse effect of the variation on the optical information reading operation can be suppressed.
[0011]
According to the optical information reading method of claim 4, the threshold value necessary for binarizing the gray value image data classified as the reading target is included in the gray image data group classified into the noise components. Therefore, it is possible to prevent a situation in which the binarization processing of gray value image data becomes inaccurate due to noise components.
[0012]
6. The optical information reading method according to claim 5, wherein the threshold value set based on the largest brightness difference data included in the gray image data group divided into noise components is a gray value included in the margin area. Since the adjustment is made based on the level of the image data, the reliability of the binarization processing of the gray value image data can be improved.
[0013]
DETAILED DESCRIPTION OF THE INVENTION
An embodiment of the present invention will be described below with reference to FIGS.
FIG. 4 shows a schematic top view of the barcode reader. In FIG. 4, the barcode reader 1 is provided with an optical head portion 2, a liquid crystal display 3, an operation portion 4 having various keys, and a trigger switch 5. The optical head unit 2 includes an image sensor (shown by reference numeral 7 in FIG. 5 described later) formed of an optical element such as a CCD image sensor or a CMOS image sensor, and an illumination. (Shown with reference numeral 8 in FIG. 5). In this case, the image sensor 7 is configured to convert the barcode (optical information) read from the reading surface into, for example, 256 gray-scale image data and output the data.
[0014]
FIG. 5 schematically shows the electrical configuration of the barcode reader 1 by a combination of functional blocks. As shown in FIG. 5, the bar code reader 1 is configured around a microcomputer 6. In addition to the liquid crystal display 3, the operation unit 4, the trigger switch 5, the image sensor 7, and the illumination unit 8, the microcomputer 6 has an image memory in which gray value image data read by the image sensor 7 is given through the AD conversion unit 9. 10. An input / output interface unit 11 for transmitting / receiving data to / from an external device and a memory 12 for storing various data are connected. Although not shown, the barcode reader 1 has a built-in power supply circuit including a battery for supplying power to the microcomputer 6 and the like.
[0015]
The microcomputer 6 has a function of reading a barcode (optical information) displayed on a liquid crystal screen of a mobile phone or the like by an analysis processing method different from a normal reading operation. This will be described with reference to FIGS.
[0016]
The flowchart of FIG. 1 shows the operation contents when reading the barcode displayed on the liquid crystal screen. That is, when such a reading operation is performed, the trigger switch 5 is operated while the optical head portion 2 of the barcode reader 1 is opposed to the liquid crystal screen on which the barcode is displayed. Then, the gray value image data capturing step S1 shown in FIG. 1 is executed. In this step S1, the image sensor 7 scans the bar code displayed on the liquid crystal screen, and takes in the gray value image data obtained by the scanning into the image memory 10.
[0017]
After this, step S2 (corresponding to the first step in the present invention) of detecting the minimum value and the maximum value of the fetched gray value image data in the order of appearance and storing them in the memory 12 is executed. That is, the gray value image data (256 gradations) captured in the image memory 10 has a lightness gradation that is low in the black background portion of the barcode to be read and a high lightness gradation in the white background portion. Therefore, as shown in FIG. 2, the minimum value and the maximum value appear alternately in the gray value image data when the barcode is read. Of course, the gray value image data also includes a minimum value and a maximum value corresponding to the noise component. In step S <b> 2, the minimum value and the maximum value for such gray value image data are sequentially stored in the memory 12.
[0018]
In FIG. 1 again, after execution of step S2, the difference between adjacent local minimum values and local maximum values among the detected local minimum values and local maximum value groups is sequentially detected as brightness difference data, and the detection results are stored in the memory 12. Step S3 (corresponding to the second step in the present invention) is executed. That is, as shown in FIG. 2 as an example, the difference between the local minimum value and the local maximum value adjacent thereto is the brightness difference data ΔL.
[0019]
Thereafter, step S4 (corresponding to the third step in the present invention) for setting a plurality of levels of brightness difference for classifying the detected brightness difference data group according to the size of each brightness difference data is executed. This brightness difference layer is set, for example, in 32 stages. In this embodiment, since gray value image data has 256 gradations, gray value image data for 8 gradations is stored in each brightness difference layer. Will be included.
[0020]
Next, by classifying the brightness difference data group detected in step S3 for each brightness difference hierarchy set in step S4, step S5 for detecting the frequency distribution of the brightness difference data appearance frequency for each brightness difference hierarchy (in the present invention). Corresponding to the fourth step). That is, in this step S5, a frequency distribution of the brightness difference data appearance frequency as shown in FIG. 3 is created. In FIG. 3, the horizontal axis indicates the brightness difference hierarchy (32 levels), and the vertical axis indicates the brightness difference data appearance frequency.
[0021]
In this case, when the barcode to be read is displayed on the liquid crystal screen as in this embodiment, the image sensor 7 also reads the grid-like dark stripes present on the liquid crystal screen at the same time. In the frequency distribution of the lightness difference data appearance frequency for each lightness difference hierarchy as shown in FIG. 4, the lightness difference data corresponding to the pixel boundary portion in the liquid crystal screen, that is, the lightness difference data corresponding to the noise component included in the gray value image data Appears most frequently. Further, the brightness difference data corresponding to the noise component belongs to a brightness difference hierarchy that is relatively smaller than the brightness difference data corresponding to the gray value image data indicating the barcode to be read. Therefore, when attention is paid to the envelope of the frequency distribution of the brightness difference data appearance frequency, the peak corresponding to the noise component in the area where the brightness difference hierarchy is relatively low (the area where the brightness difference hierarchy is “17” or less in the example of FIG. 3). A relatively large peak appears, and a peak with a relatively small peak appears in a region where the brightness difference hierarchy is relatively high.
[0022]
Therefore, after step S5 is executed, step S6 (corresponding to the fifth step in the present invention) is executed. In this step S6, among the peaks formed by the envelope of the frequency distribution of the brightness difference data appearance frequency (see FIG. 3), a range in which the brightness difference data appearance frequency corresponding to the peak of the peak is determined in advance ( For example, in a peak portion (a range below a reference value set in advance according to the amount of barcode data to be read) and a relatively high brightness difference hierarchy (right peak portion in the example of FIG. 3). The gray value image data group to which it belongs belongs to the reading target, and the gray value image data other than the peak is classified into noise components.
[0023]
Thereafter, step S7 (corresponding to the sixth step in the present invention) for binarizing the gray value image data classified as the reading target based on a preset threshold value is executed. The threshold value is set based on the largest brightness difference data included in the gray image data group classified into noise components in step S6. In the example of FIG. The largest brightness hierarchy difference of the part is “17”, so that “136” obtained by multiplying this by 8 is the largest brightness difference data, and therefore the threshold value is set to “136”. become.
[0024]
The data string binarized in step S7 is used for the subsequent data analysis processing in step S8. In this step S8, the information recorded in the barcode is decoded by decoding the data string. Is to read. Thereafter, step S9 for outputting the analysis result is executed, and the series of bar code reading operations is completed. In step S9, the analysis result is displayed on the liquid crystal display 3 and stored in the memory 12. The analysis result is output to the outside through the input / output interface 11 as necessary. It is.
[0025]
In short, according to the above-described embodiment, when reading the barcode displayed on the liquid crystal screen, the noise caused by the grid-like dark stripes existing on the liquid crystal screen according to the execution of steps S2 to S5. The components can be accurately removed. In addition, the gray value image data classified as the reading target is binarized by a preset threshold value in step S6, and is subjected to an analysis process of the binarized data string. As a result, even if the barcode to be read is displayed on the liquid crystal screen, the barcode can be reliably read.
[0026]
Further, according to the barcode reading method according to the present embodiment, the threshold value necessary for binarizing the gray value image data classified as the reading target in step S6 is classified into noise components in step S6. Since the largest brightness difference data included in the gray image data group is set as a reference, it is possible to prevent a situation in which the binarization processing of gray value image data becomes inaccurate due to noise components.
[0027]
(Other embodiments)
In step S6, for the gray value image data group classified as a reading target, the size of the brightness difference data and the pitch between the maximum values or the pitch between the minimum values are checked, and the size and pitch of the brightness difference data are checked. The gray value image data group can be determined as a reading target when each is within a preset range. That is, in the gray value image data corresponding to the barcode to be read, the magnitude of the brightness difference data should be greater than or equal to a predetermined effective level, and the pitch between the maximum values or the pitch between the minimum values is also Since they should be aligned within a predetermined range, the determination process as described above can be performed using this.
According to such a barcode reading method, whether or not the gray value image data group classified as a reading target is appropriate is a difference between adjacent local minimum values and local maximum values for the gray value image data group. Will be checked on the basis of the lightness difference data and the pitch between the maximum values or the pitch between the minimum values, so the reading operation of the barcode displayed on the LCD screen will be more reliable, The reliability can be improved.
[0028]
Alternatively, a region to be read, that is, an image region corresponding to gray value image data may be divided into a plurality of regions, and steps S2 to S8 may be executed for each of the divided regions. According to such a barcode reading method, since a series of operations for reading the barcode displayed on the liquid crystal screen is performed for each of the divided image areas, the barcode is displayed. Even when the brightness of the liquid crystal screen varies (for example, when the position of the backlight is biased), the adverse effect of the variation on the barcode reading operation can be suppressed.
[0029]
In step S6, a barcode margin area is determined from the frequency distribution feature of the brightness difference data appearance frequency, and the threshold value set in step S7 is based on the level of the gray value image data included in the determined margin area. You may make it perform the step which adjusts a value. Specifically, as shown in FIG. 6 having the same contents as FIG. 2, the area where the change value of the minimum value and the maximum value of the gray value image data is equal to or less than the set value is determined as the margin area of the barcode, and the margin area When the maximum brightness gradation of the gray value image data included in is larger than a set threshold value, the threshold value may be adjusted to be a value larger than the maximum brightness gradation.
According to such a barcode reading method, the threshold value set based on the largest brightness difference data included in the gray image data group divided into noise components is the gray value image data included in the margin area. Therefore, the reliability of the binarization processing of the gray value image data can be improved.
[Brief description of the drawings]
FIG. 1 is a flowchart showing an optical information reading method according to an embodiment of the present invention. FIG. 2 is a diagram showing an example of lightness gradation of gray value image data read by an image sensor. Frequency distribution diagram [FIG. 4] Schematic front view of the barcode reader [FIG. 5] Functional block diagram showing the electrical configuration of the barcode reader [FIG. 6] FIG. ]
1 is a bar code reader, 6 is a microcomputer, 7 is an image sensor, 10 is an image memory, and 12 is a memory.

Claims (5)

読み取り面に表示された光学的情報を画像センサにより読み取ってグレイ値画像データに変換すると共に、当該画像データを順次メモリに取り込み、このメモリに取り込んだグレイ値画像データを二値化したデータ列の解析処理を行うことにより前記光学的情報の読み取りを行う方法において、
前記グレイ値画像データの極小値及び極大値を出現順に検出する第1のステップと、
検出した極小値及び極大値群のうち隣接する極小値及び極大値の差を明度差データとして検出する第2のステップと、
検出した明度差データ群を各明度差データの大きさに従って分類するための複数段階の明度差階層を設定する第3のステップと、
前記明度差データ群を前記明度差階層毎に分類することにより、明度差階層毎の明度差データ出現頻度の度数分布を検出する第4のステップと、
前記明度差データ出現頻度の度数分布の特徴から前記メモリに取り込んだ前記グレイ値画像データをノイズ成分と読み取り対象とに区分する第5のステップと、
読み取り対象に区分されたグレイ値画像データを予め設定されたしきい値に基づいて二値化すると共に、二値化したデータ列を前記解析処理に供する第6のステップとを実行するように構成され、
前記第5のステップでは、前記明度差データ出現頻度の度数分布の包絡線により形成される山部のうち、その山部のピークに対応した明度差データ出現頻度が予め決められた範囲にあり、且つ明度差階層が相対的に高い山部に属するグレイ値画像データ群を読み取り対象に区分することを特徴とする光学的情報読み取り方法。
The optical information displayed on the reading surface is read by an image sensor and converted into gray value image data. The image data is sequentially taken into a memory, and the gray value image data taken into the memory is binarized. In a method of reading the optical information by performing an analysis process,
A first step of detecting a minimum value and a maximum value of the gray value image data in the order of appearance;
A second step of detecting a difference between adjacent local minimum values and local maximum values among the detected local minimum values and local maximum value groups as brightness difference data;
A third step of setting a plurality of lightness difference hierarchies for classifying the detected lightness difference data group according to the size of each lightness difference data;
A fourth step of detecting the frequency distribution of the brightness difference data appearance frequency for each brightness difference hierarchy by classifying the brightness difference data group for each brightness difference hierarchy;
A fifth step of classifying the gray value image data captured in the memory from a feature of a frequency distribution of the brightness difference data appearance frequency into a noise component and a reading target;
The gray value image data classified as the reading target is binarized based on a preset threshold value, and the sixth step of performing the binarized data string for the analysis processing is executed. And
In the fifth step, among the peaks formed by the envelope of the frequency distribution of the brightness difference data appearance frequency, the brightness difference data appearance frequency corresponding to the peak of the peak is within a predetermined range, An optical information reading method characterized in that a gray value image data group belonging to a mountain portion having a relatively high brightness difference hierarchy is classified as a reading target.
前記第5のステップでは、読み取り対象に区分したグレイ値画像データ群について、前記明度差データの大きさと前記極大値相互間のピッチまたは極小値相互間のピッチとをチェックし、それら明度差データの大きさ並びにピッチがそれぞれについて予め設定された範囲に収まっているときに当該グレイ値画像データ群を読み取り対象として確定することを特徴とする請求項1記載の光学的情報読み取り方法。In the fifth step, for the gray value image data group classified as a reading target, the size of the brightness difference data and the pitch between the maximum values or the pitch between the minimum values are checked, and the brightness difference data 2. The optical information reading method according to claim 1, wherein the gray value image data group is determined as a reading target when the size and the pitch are within a preset range. 前記グレイ値画像データに対応した画像領域を複数の領域に分割し、それら分割領域毎に前記第1ないし第6のステップを実行することを特徴とする請求項1または2記載の光学的情報読み取り方法。3. The optical information reading according to claim 1, wherein an image area corresponding to the gray value image data is divided into a plurality of areas, and the first to sixth steps are executed for each of the divided areas. Method. 前記第5のステップでは、前記第5のステップでノイズ成分に区分されたグレイ画像データ群に含まれる最も大きい明度差データを基準に前記しきい値を設定することを特徴とする請求項1ないし3の何れかに記載の光学的情報読み取り方法。The threshold value is set in the fifth step based on the largest brightness difference data included in the gray image data group divided into noise components in the fifth step. 4. The optical information reading method according to any one of 3. 請求項4記載の光学的情報読み取り方法において、
前記第5のステップでは、前記明度差データ出現頻度の度数分布の特徴から前記光学的情報のマージン領域を判別するステップと、判別されたマージン領域に含まれるグレイ値画像データのレベルに基づいて前記設定しきい値を調整するステップとを含んで成ることを特徴とする光学的情報読み取り方法。
The optical information reading method according to claim 4,
In the fifth step, a step of discriminating a margin area of the optical information from the characteristics of the frequency distribution of the brightness difference data appearance frequency, and the level of gray value image data included in the discriminated margin area, Adjusting the set threshold value, and reading the optical information.
JP2003179640A 2003-06-24 2003-06-24 Optical information reading method Expired - Fee Related JP3971347B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003179640A JP3971347B2 (en) 2003-06-24 2003-06-24 Optical information reading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003179640A JP3971347B2 (en) 2003-06-24 2003-06-24 Optical information reading method

Publications (2)

Publication Number Publication Date
JP2005020174A JP2005020174A (en) 2005-01-20
JP3971347B2 true JP3971347B2 (en) 2007-09-05

Family

ID=34180917

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003179640A Expired - Fee Related JP3971347B2 (en) 2003-06-24 2003-06-24 Optical information reading method

Country Status (1)

Country Link
JP (1) JP3971347B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102014210834B3 (en) * 2014-06-06 2015-09-03 Robert Bosch Gmbh Method for the control of a display device and display device for a particular motor vehicle

Also Published As

Publication number Publication date
JP2005020174A (en) 2005-01-20

Similar Documents

Publication Publication Date Title
JP4288756B2 (en) Information code approximate existence area estimation method, information code reading method and apparatus, and recording medium
US7333656B2 (en) Image processing method and image processing apparatus
US20080152230A1 (en) Programmable pattern matching device
KR101597739B1 (en) Image processing apparatus, image processing method, and computer readable medium
JP2015127668A (en) Measurement device, system and program
US8538191B2 (en) Image correction apparatus and method for eliminating lighting component
KR20120132314A (en) Image processing apparatus, image processing method, and computer readable medium
US8718370B2 (en) Optical information-reading apparatus and optical information-reading method
JP5782838B2 (en) Image processing apparatus and image processing program
JP5870745B2 (en) Image processing apparatus, binarization threshold value calculation method, and computer program
JP6630341B2 (en) Optical detection of symbols
CN1042981C (en) Reader for symbolic information
JP3971347B2 (en) Optical information reading method
JP4749382B2 (en) Two-dimensional code reading apparatus and method
US20090122167A1 (en) Method And Apparatus For Removing Noise By Dark Current Of Image Sensor
JP2007310675A (en) Qr code recognition device, qr code recognition device control method, qr code recognition device control program and computer-readable recording medium having program recorded thereon
JP5427828B2 (en) Two-dimensional code reading apparatus and method
JP3906221B2 (en) Image processing method and image processing apparatus
JP4947105B2 (en) Image processing apparatus, image processing program, and imaging apparatus
JP2004104635A (en) Image processing apparatus
JP2009140244A (en) Image processing program and image processor
JP2010225047A (en) Noise component removing device, and medium with noise component removing program recorded thereon
JP4122703B2 (en) Image processing device
JP5316662B2 (en) Image processing apparatus, image processing program, and imaging apparatus
JP2005295313A (en) Cord reader, electronic equipment, and method and program for adjusting parameter

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050621

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070607

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110615

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120615

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120615

Year of fee payment: 5

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

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

Free format text: PAYMENT UNTIL: 20120615

Year of fee payment: 5

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20130615

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130615

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130615

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees