JP5403091B2 - Reading apparatus and program - Google Patents
Reading apparatus and program Download PDFInfo
- Publication number
- JP5403091B2 JP5403091B2 JP2012061026A JP2012061026A JP5403091B2 JP 5403091 B2 JP5403091 B2 JP 5403091B2 JP 2012061026 A JP2012061026 A JP 2012061026A JP 2012061026 A JP2012061026 A JP 2012061026A JP 5403091 B2 JP5403091 B2 JP 5403091B2
- Authority
- JP
- Japan
- Prior art keywords
- reading
- image data
- dimensional space
- movement
- unit
- 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
Description
本発明は、読取装置及びプログラムに関する。 The present invention relates to a reading apparatus and a program.
印刷品質が粗悪であったり、一部が破損したりしているなど、欠陥を有するバーコード(図21参照)を、レーザ光等を光源とする一次元スキャナで読み取る場合、光が照射される位置によっては、正確に読み取ることができず、デコードすることができないことがある。しかし、実際の読取動作はユーザがスキャナを手に持った状態で行われるため、読取中のユーザの手の動きによって、バーコード面上の様々な位置が読み取られている。このため、図21に示すような欠陥を有するバーコードの場合、図22に示すように、ユーザの手の動きによって光の照射位置(照射ライン)が異なる複数回の読取でそれぞれ得られたイメージデータをメモリに記憶しておき、それぞれのイメージデータを重ね合わせるなどの合成処理によって正しいイメージデータとして再生し、デコードする処理が行われている(例えば、特許文献1参照)。 Light is emitted when a bar code (see FIG. 21) having defects such as poor print quality or partly damaged is read by a one-dimensional scanner using laser light or the like as a light source. Depending on the position, it cannot be read accurately and cannot be decoded. However, since the actual reading operation is performed with the user holding the scanner in his / her hand, various positions on the barcode surface are read by the movement of the user's hand during reading. For this reason, in the case of a barcode having a defect as shown in FIG. 21, as shown in FIG. 22, the images respectively obtained by multiple readings in which the light irradiation position (irradiation line) differs depending on the movement of the user's hand. Data is stored in a memory, and a process of reproducing and decoding as correct image data by a synthesis process such as superimposing the respective image data is performed (for example, see Patent Document 1).
しかしながら、上述のように、バーコードの読取動作は、ユーザがスキャナを手に持った状態で行われているため、ユーザの手の動きに起因して、読取中の光の照射位置が、図22に示すように上下方向へ移動するだけでなく、バーの配列方向へ移動したり、当該配列方向に対して傾斜したりするなど、様々に変化する。よって、複数回の読取で得られたイメージデータをそのまま合成しても、正確な読取結果を得ることができないという問題がある。 However, as described above, since the barcode reading operation is performed with the user holding the scanner in his / her hand, the irradiation position of the light being read is caused by the movement of the user's hand. In addition to moving up and down as shown in FIG. 22, it changes in various ways, such as moving in the bar arrangement direction or tilting with respect to the arrangement direction. Therefore, there is a problem in that an accurate reading result cannot be obtained even if image data obtained by a plurality of readings are synthesized as they are.
本発明の課題は、ジャイロセンサを用いて読取動作中における3次元空間での読取手段の加速度を検出すると共に、3次元空間での読取手段の移動によって生じる読取手段の傾きを検出し、検出された読取手段の加速度及び読取手段の傾きに対応する補正処理を行い、記憶されたイメージデータを補正することにより、正確な読取結果が得られるようにすることである。 An object of the present invention is to detect and detect the acceleration of the reading means in the three-dimensional space during the reading operation using the gyro sensor and to detect the inclination of the reading means caused by the movement of the reading means in the three-dimensional space. The correction processing corresponding to the acceleration of the reading means and the inclination of the reading means is performed, and the stored image data is corrected so that an accurate reading result can be obtained.
請求項1に記載の読取装置は、読取対象を複数回読み取り、読取毎にイメージデータを取得する読取手段と、前記読取手段により取得された各イメージデータを記憶する記憶手段と、前記読取動作中における前記読取手段の3次元空間での複数の移動状態を検出する検出手段と、前記検出手段により検出された複数の移動状態に基づいて、各々の移動状態に対応する補正処理を行い、前記記憶手段に記憶された各イメージデータを補正する補正手段と、前記補正手段により補正された各イメージデータを合成する合成手段と、を備え、前記検出手段は、ジャイロセンサを用いて前記読取手段の3次元空間での複数の移動状態を検出し、前記ジャイロセンサは、3次元空間での前記読取手段の加速度を検出する加速度センサと、3次元空間での前記読取手段の移動によって生じる当該読取手段の傾きを検出する傾きセンサと、を有する。
The reading device according to
請求項2に記載の発明は、請求項1に記載の読取装置において、前記イメージデータは、バーコードイメージデータであり、前記合成手段は、前記補正手段により補正された各バーコードイメージデータを合成し、前記合成手段により合成されたバーコードイメージデータをデコードするデコード手段をさらに備える。 According to a second aspect of the present invention, in the reading device according to the first aspect, the image data is barcode image data, and the synthesizing unit synthesizes each barcode image data corrected by the correction unit. And decoding means for decoding the barcode image data synthesized by the synthesizing means.
請求項3に記載の発明は、3次元空間での加速度を検出する加速度センサと、3次元空間での移動によって生じる傾きを検出する傾きセンサと、を有するジャイロセンサを備えたコンピュータを制御するためのプログラムであって、前記コンピュータを、読取手段により読取対象を複数回読み取り、読取毎にイメージデータを取得する手段、前記取得された各イメージデータを記憶手段に記憶させる手段、前記ジャイロセンサを用いて前記読取動作中における前記読取手段の3次元空間での複数の移動状態を検出する手段、前記検出された複数の移動状態に基づいて、各々の移動状態に対応する補正処理を行い、前記記憶手段に記憶された各イメージデータを補正する手段、前記補正された各イメージデータを合成する手段、として機能させるようにしたコンピュータ読み取り可能なプログラムである。
請求項4に記載の発明の読取装置は、読取対象を読み取り、イメージデータを取得する読取手段と、前記読取手段により取得されたイメージデータを記憶する記憶手段と、ジャイロセンサを用いて前記読取動作中における3次元空間での前記読取手段の加速度を検出すると共に、前記3次元空間での前記読取手段の移動によって生じる前記読取手段の傾きを検出する検出手段と、 前記検出手段により検出された前記読取手段の加速度及び前記読取手段の傾きに基づいて、前記読取手段の加速度及び前記読取手段の傾きに対応する補正処理を行い、前記記憶手段に記憶されたイメージデータを補正する補正手段と、を備える。
請求項5に記載の発明は、3次元空間での加速度及び3次元空間での移動によって生じる傾きを検出するジャイロセンサを備えたコンピュータを制御するためのプログラムであって、前記コンピュータを、読取手段により読取対象を読み取り、イメージデータを取得する手段、前記取得されたイメージデータを記憶手段に記憶させる手段、前記ジャイロセンサを用いて前記読取動作中における前記3次元空間での前記読取手段の加速度を検出すると共に、前記3次元空間での前記読取手段の移動によって生じる前記読取手段の傾きを検出する手段、前記検出された前記読取手段の加速度及び前記読取手段の傾きに基づいて、前記読取手段の加速度及び前記読取手段の傾きに対応する補正処理を行い、前記記憶手段に記憶されたイメージデータを補正する手段、として機能させるようにしたコンピュータ読み取り可能なプログラムである。
The invention according to
According to a fourth aspect of the present invention, there is provided a reading device that reads a reading target and acquires image data, a storage unit that stores image data acquired by the reading unit, and the reading operation using a gyro sensor. detects the acceleration of the reading section in the three-dimensional space in the middle, a detecting means for detecting inclination of the reading unit caused by movement of the reading means in the three-dimensional space, is detected by the detecting means and the Correction means for performing correction processing corresponding to the acceleration of the reading means and the inclination of the reading means based on the acceleration of the reading means and the inclination of the reading means, and correcting the image data stored in the storage means; Prepare.
According to a fifth aspect of the present invention, there is provided a program for controlling a computer including a gyro sensor that detects acceleration in a three-dimensional space and an inclination caused by movement in the three-dimensional space, and the computer is a reading unit. Means for reading the reading object and acquiring image data, means for storing the acquired image data in a storage means, and using the gyro sensor, the acceleration of the reading means in the three-dimensional space during the reading operation is determined. And detecting, based on the detected acceleration of the reading means and the inclination of the reading means, the detecting means which detects the inclination of the reading means caused by the movement of the reading means in the three-dimensional space. Image data stored in the storage means by performing correction processing corresponding to acceleration and inclination of the reading means It means for correcting, a computer-readable program to function as.
本発明によれば、ジャイロセンサを用いて読取動作中における3次元空間での読取手段の加速度を検出すると共に、3次元空間での読取手段の移動によって生じる読取手段の傾きを検出し、検出された読取手段の加速度及び読取手段の傾きに対応する補正処理を行い、記憶されたイメージデータを補正することにより、正確な読取結果を得ることができる。 According to the present invention, the acceleration of the reading means in the three-dimensional space during the reading operation is detected using the gyro sensor, and the inclination of the reading means caused by the movement of the reading means in the three-dimensional space is detected and detected. By performing correction processing corresponding to the acceleration of the reading means and the inclination of the reading means and correcting the stored image data, an accurate reading result can be obtained.
以下、図面を参照して、本発明の実施形態を説明する。
まず、本実施形態における構成を説明する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
First, the configuration in the present embodiment will be described.
図1に、本発明の実施形態に係るバーコード読取装置1の主要部構成を示す。バーコード読取装置1は、ユーザがスキャナ部分を手に持ってバーコードを読み取らせる手持ち式の読取装置であり、図1に示すように、CPU(Central Processing Unit)10、表示部11、入力部12、記憶部13、RAM(Random Access Memory)14、読取部15、ジャイロセンサ16を備え、各部はバス17を介して電気的に接続され、電源部18からの電力供給を受けている。
FIG. 1 shows a main part configuration of a
CPU10は、記憶部13に記憶された各種制御プログラムをRAM14に展開し、当該制御プログラムとの協働によって、各種の処理を行う。具体的にCPU10は、記憶部13に記憶された制御プログラムに従ってバーコード読取処理を行う(図2参照)。
The
表示部11は、LCD(Liquid Crystal Display)等のディスプレイを有し、CPU10から入力される表示制御信号に従って所要の表示処理を行う。
The
入力部12は、バーコードの読み取りを開始させるためのトリガキー等の各種のキーや、表示部11の表示画面上を覆うように設けられたタッチパネルを有し、キー操作又はタッチパネルの操作による操作信号をCPU10に出力する。
The
記憶部13は、CPU10により実行される各種制御プログラム及びこれらの制御プログラムの実行時に必要なデータを記憶している。
The
RAM14は、CPU10により実行される各種制御プログラムを展開するプログラム格納領域と、入力データ及び制御プログラムの実行時に生じる処理結果等のデータを一時的に格納するデータ格納領域とを有する。
The
読取部15は、CMOS(Complementary Metal Oxide Semiconductor)イメージセンサ又はCCD(Charge Coupled Device)イメージセンサ、A/Dコンバータ等により構成される。読取部15は、CMOSイメージセンサ又はCCDイメージセンサにより、読取対象のバーコードに照射されたレーザ光の反射光によってバーコードを読み取り、読取により得られた光画像信号を光電変換により電気信号(アナログ信号)に変換し、A/Dコンバータにより、このアナログ信号をデジタル信号に変換し、バーコードのイメージデータを取得する。
The
ジャイロセンサ16は、加速度センサ161及び傾きセンサ162を有し、バーコードの読取動作中における読取部15の3次元空間での移動状態を検出する。加速度センサ161は、3次元空間で移動した読取部15の加速度、移動した時間、移動した方向を検出する。加速度センサ161により検出された情報によって、読取部15の移動距離を算出することができる。傾きセンサ162は、3次元空間での読取部15の動きによって生じた読取部15の傾きを検出する。傾きセンサ162で検出された傾きによって、バーコード面に対する光の照射角度を算出することができる。
The
次に、本実施形態における動作を説明する。
まず、図2のフローチャートを参照して、バーコード読取装置1のCPU10の制御の下で実行されるバーコード読取処理について説明する。
Next, the operation in this embodiment will be described.
First, the barcode reading process executed under the control of the
入力部12のトリガキーが押下されると、所定のスキャン速度(例えば、100スキャン/秒)で読取部15によりバーコードの読取が開始され、読取毎にバーコードのイメージデータ(以下、「バーコードイメージデータ」という。)が取得される(ステップS1)。ステップS1で読取毎に取得された各々のバーコードイメージデータは、RAM14に保存される(ステップS2)。
When the trigger key of the
次いで、ステップS2においてRAM14に保存された各バーコードイメージデータを、予め設定された基準位置から読み取られた場合に取得されるバーコードイメージデータに補正する補正処理が行われる(ステップS3)。ステップS3の補正処理については、後に図3〜図20を参照して詳細に説明する。
Next, correction processing for correcting each barcode image data stored in the
次いで、ステップS3において補正された各バーコードイメージデータの合成が行われる(ステップS4)。ステップS4での合成では、例えば、各バーコードイメージデータを重ね合わせることにより、一のバーコードイメージデータにおけるバーの欠損箇所(擦れた箇所、印字が薄い箇所など)を他のバーコードイメージデータで補うなどの処理が行われる。 Next, the barcode image data corrected in step S3 is synthesized (step S4). In the synthesis in step S4, for example, by superimposing each barcode image data, the missing bar portion (rubbed portion, lightly printed portion, etc.) in one barcode image data is replaced with other barcode image data. Processing such as compensation is performed.
次いで、合成後のバーコードイメージデータを用いてバーコードのデコード処理が行われる(ステップS5)。ステップS5でのデコード処理では、バーコードイメージデータによって表される白色と黒色のバーの配列が、数値や文字の配列を表すデータに変換される。 Next, barcode decoding processing is performed using the combined barcode image data (step S5). In the decoding process in step S5, the array of white and black bars represented by the barcode image data is converted into data representing an array of numerical values and characters.
デコード処理が終了すると、ステップS5のデコード処理において正常にデコードすることができたか否かが判定される(ステップS6)。ステップS6において、正常にデコードすることができなかったと判定された場合(ステップS6;NO)、タイムアウトになる前であれば(ステップS7)、ステップS1に戻り、引き続きバーコードの読取動作を継続する。 When the decoding process is completed, it is determined whether or not the decoding process can be normally performed in the decoding process of step S5 (step S6). If it is determined in step S6 that decoding could not be performed normally (step S6; NO), if it is before time-out (step S7), the process returns to step S1 and continues the barcode reading operation. .
ステップS6において、正常にデコードすることができたと判定された場合(ステップS6;YES)、デコード処理の処理結果が出力(例えば、表示部11に表示)され(ステップS8)、本バーコード読取処理が終了する。 In step S6, when it is determined that the decoding can be normally performed (step S6; YES), the decoding processing result is output (for example, displayed on the display unit 11) (step S8), and the barcode reading process is performed. Ends.
次に、図3のフローチャート及び図4〜図20を参照して、バーコードイメージデータの補正処理(図2のステップS3)について詳細に説明する。 Next, barcode image data correction processing (step S3 in FIG. 2) will be described in detail with reference to the flowchart in FIG. 3 and FIGS.
本実施形態においてバーコードイメージデータの補正処理とは、ジャイロセンサ16から取得される読取部15の3次元空間(x−y−z)における移動状態に基づいて、読取部15から実際に取得されたバーコードイメージデータを、予め設定された基準位置から読み取られた場合に取得されるバーコードイメージデータに補正する処理である。以下では、バーコード面の中心部分を直交座標系の原点Oとし、バーコード面に垂直な方向をx軸方向、バーコード面上の各バーが配列する方向をy軸方向として説明する。
In the present embodiment, the barcode image data correction process is actually acquired from the
本実施形態では、ジャイロセンサ16から取得される読取部15の3次元空間における移動状態を、読取部15の光源OSからの照射状態に基づいて以下の5通りに分類し、それぞれの移動状態に対応する補正処理(補正H1〜補正H5)について説明する。
In the present embodiment, the movement state in the three-dimensional space of the
[1]バーコード面βに近づくように光を照射した状態(図4参照);
[2]バーコード面βから遠ざかるように光を照射した状態(図7参照);
[3]x−y平面内の基準方向(x軸方向に平行)に対して傾斜するように光を照射した状態(図10参照);
[4]バーコード面βに対してバーの配列方向(y軸方向)に移動するように光を照射した状態(図13参照);
[5]バーコード面β上の照射ラインがバーの配列方向(y軸方向)に対して傾斜するように光を照射した状態(図16参照);
[1] A state in which light is irradiated so as to approach the barcode surface β (see FIG. 4);
[2] A state in which light is irradiated away from the barcode surface β (see FIG. 7);
[3] A state in which light is irradiated so as to be inclined with respect to a reference direction (parallel to the x-axis direction) in the xy plane (see FIG. 10);
[4] A state in which light is irradiated so as to move in the bar array direction (y-axis direction) with respect to the barcode surface β (see FIG. 13);
[5] A state in which light is irradiated such that the irradiation line on the barcode surface β is inclined with respect to the bar arrangement direction (y-axis direction) (see FIG. 16);
なお、実際にジャイロセンサ16で検出される移動状態は、上記[1]〜[5]に対応する移動状態が複合されたものであるが、これらの複合された移動状態を上記[1]〜[5]に分離して、各々の移動状態に対する補正処理を行うことにより、最終的には複合された移動状態に対する補正処理と同等の結果が得られる。
Note that the movement state actually detected by the
図3に示すバーコードイメージデータの補正処理では、まず、ジャイロセンサ16から読取部15の移動状態が取得される(ステップS20)。そして、当該移動状態が、図4に示すようにバーコード面βに近づくように光を照射した状態(移動状態[1])又は図7に示すようにバーコード面βから遠ざかるように光を照射した状態(移動状態[2])を含むか否かが判定される(ステップS21)。
In the barcode image data correction process shown in FIG. 3, first, the movement state of the
ステップS21において、ジャイロセンサ16から取得された移動状態が、移動状態[1]又は移動状態[2]を含むと判定された場合(ステップS21;YES)、以下の補正H1又は補正H2が行われる(ステップS22)。
If it is determined in step S21 that the movement state acquired from the
[補正H1]
図4に示す移動状態[1]の場合、光源OSがバーコード面βに近づくにつれ、図5(a)に示すように、バーコード面βにおける光の照射ラインLの幅が狭くなる。よって、図5(b)に示すように、実際に読取部15が認識する各バーの幅は、図5(a)に示す元の幅よりも太くなる。図5(a)及び図5(b)において白色及び黒色それぞれに対応する「バー幅」は、バーの幅を表すカウンタ値であり、例えば、バーの配列順に、白色の幅が60、黒色の幅が10、白色の幅が20、…のように表される。以下の、図8、図11、図14、図17についても同様である。
[Correction H1]
In the moving state [1] shown in FIG. 4, as the light source OS approaches the barcode surface β, the width of the light irradiation line L on the barcode surface β becomes narrower as shown in FIG. Therefore, as shown in FIG. 5B, the width of each bar actually recognized by the
読取部15の光源OSの移動距離に応じてバー幅が太くなる割合は、読取部15で使用されるスキャナモジュールの特性により異なっており、予め設定されている。例えば、図6に示すように、1回目の読取で取得されるバー幅をB1、2回目の読取で取得されるバー幅をB2、ジャイロセンサ16から取得される光源OSの移動距離をΔD、移動距離に応じてバー幅が太くなる割合を補正係数f1とすると、補正H1での補正後のバー幅は、式(1)のように表される。
補正後のバー幅=補正前のバー幅×ΔD×f1 …(1)
The rate at which the bar width increases in accordance with the movement distance of the light source OS of the
Bar width after correction = bar width before correction × ΔD × f1 (1)
[補正H2]
図7に示す移動状態[2]の場合、光源OSがバーコード面βから遠ざかるにつれ、図8(a)に示すように、バーコード面βにおける光の照射ラインLが広くなる。よって、図8(b)に示すように実際に読取部15が認識する各バーの幅は、図8(a)に示す元の幅よりも細くなる。
[Correction H2]
In the moving state [2] shown in FIG. 7, as the light source OS moves away from the barcode surface β, the light irradiation line L on the barcode surface β becomes wider as shown in FIG. Therefore, as shown in FIG. 8B, the width of each bar actually recognized by the
移動距離に応じてバー幅が細くなる割合は、読取部15で使用されるスキャナモジュールの特性により異なっており、予め設定されている。例えば、図9に示すように、1回目の読取で取得されるバー幅をB1、2回目の読取で取得されるバー幅をB2、ジャイロセンサ16から取得される光源OSの移動距離をΔD、移動距離に応じてバー幅が細くなる割合を補正係数f2とすると、補正H2での補正後のバー幅は、式(2)のように表される。
補正後のバー幅=補正前のバー幅×ΔD×f2 …(2)
The rate at which the bar width is reduced according to the moving distance varies depending on the characteristics of the scanner module used in the
Bar width after correction = bar width before correction × ΔD × f2 (2)
図3のステップS21において、ジャイロセンサ16から取得された移動状態が、移動状態[1]若しくは移動状態[2]の何れも含まないと判定された場合(ステップS21;NO)、又はステップS22の補正H1若しくは補正H2が終了すると、ジャイロセンサ16から取得された移動状態が、図10に示すように、x−y平面内において基準方向(x軸方向に平行)に対して傾斜するように光を照射した状態(移動状態[3])を含むか否かが判定される(ステップS23)。
In step S21 of FIG. 3, when it is determined that the movement state acquired from the
ステップS23において、ジャイロセンサ16から取得された移動状態が移動状態[3]を含むと判定された場合(ステップS23;YES)、以下の補正H3が行われる(ステップS24)。
When it is determined in step S23 that the movement state acquired from the
[補正H3]
図10に示すように、光の照射方向がx軸に対して傾斜している場合、図11(a)に示すバーコード面β上の照射ラインLは、バーの位置(y座標の値)によって光源OSからの距離が異なる。従って、図10に示す移動状態[3]の場合、図11(b)に示すように、y軸の正の方向に向かって光源OSからの距離が近くなるため、バー幅が太くなり、y軸の負の方向に向かって光源OSからの距離が遠くなるため、バー幅が細くなる。
[Correction H3]
As shown in FIG. 10, when the light irradiation direction is inclined with respect to the x-axis, the irradiation line L on the barcode surface β shown in FIG. 11A is the bar position (y coordinate value). Depending on the distance from the light source OS. Therefore, in the case of the movement state [3] shown in FIG. 10, the distance from the light source OS becomes closer to the positive direction of the y-axis as shown in FIG. Since the distance from the light source OS increases toward the negative direction of the axis, the bar width becomes narrower.
図12に示すように、光の照射方向がx軸に対して傾斜角Θで傾斜している場合、バーの位置(y=Bd)に応じてバー幅が変化する割合は、読取部15で使用されるスキャナモジュールの特性により異なっており、バーの位置Bd、ジャイロセンサ16から取得される傾斜角Θの関数として予め設定されている。バー幅が変化する割合を補正係数f(Bd,Θ)とすると、補正H3での補正後のバー幅は、式(3)のように表される。
補正後のバー幅=補正前のバー幅×f(Bd,Θ) …(3)
As shown in FIG. 12, when the light irradiation direction is inclined at an inclination angle Θ with respect to the x axis, the rate at which the bar width changes according to the bar position (y = Bd) is determined by the
Bar width after correction = bar width before correction × f (Bd, Θ) (3)
図3のステップS23において、ジャイロセンサ16から取得された移動状態が、移動状態[3]を含まないと判定された場合(ステップS23;NO)、又はステップS24の補正H3が終了すると、ジャイロセンサ16から取得された移動状態が、図13に示すように、バーコード面βに対してバーの配列方向(y軸方向)に移動するように光を照射した状態(移動状態[4])を含むか否かが判定される(ステップS25)。
In step S23 of FIG. 3, when it is determined that the movement state acquired from the
ステップS25において、ジャイロセンサ16から取得された移動状態が、移動状態[4]を含むと判定された場合(ステップS25;YES)、以下の補正H4が行われる(ステップS26)。
When it is determined in step S25 that the movement state acquired from the
[補正H4]
図13に示す移動状態[4]の場合、図14(a)に示すバーコード面β上の照射ラインLは、バーの配列方向に移動するため、読取部15が認識するバーコードのスタートマージンの幅(又はエンドマージンの幅)は、図14(b)に示すように変化してしまう。そこで、補正H4では、1回目の読取で取得されたバーコードイメージデータを基準として、2回目の読取で取得されたバーコードイメージデータのスタートマージンの幅を、スタートコード等の特徴を有するバーコードイメージデータに基づいて補正する。
[Correction H4]
In the case of the movement state [4] shown in FIG. 13, the irradiation line L on the barcode surface β shown in FIG. 14A moves in the bar arrangement direction, and therefore the barcode start margin recognized by the
図15に示すように、1回目、2回目の読取でのバーコードの最初の黒色までのカウンタ値をそれぞれc1、c2とすると、スタートマージンの幅を、cx=c1−c2の分だけ補正すればよい。即ち、補正後のスタートマージンの幅は、式(4)のように表される。
補正後のスタートマージンの幅=補正前のスタートマージンの幅+cx …(4)
As shown in FIG. 15, if the counter values up to the first black of the barcode in the first and second readings are c1 and c2, respectively, the width of the start margin is corrected by cx = c1-c2. That's fine. That is, the width of the start margin after correction is expressed as Equation (4).
Width of start margin after correction = width of start margin before correction + cx (4)
図3のステップS25において、ジャイロセンサ16から取得された移動状態が、移動状態[4]を含まないと判定された場合(ステップS25;NO)、又はステップS26の補正H4が終了すると、ジャイロセンサ16から取得された移動状態が、図16に示すように、バーコード面β上の照射ラインがバーの配列方向(y軸方向)に対して傾斜するように光を照射した状態(移動状態[5])を含むか否かが判定される(ステップS27)。
In step S25 of FIG. 3, when it is determined that the movement state acquired from the
ステップS27において、ジャイロセンサ16から取得された移動状態が、移動状態[5]を含むと判定された場合(ステップS27;YES)、以下の補正H5が行われる(ステップS28)。
If it is determined in step S27 that the movement state acquired from the
[補正H5]
図16に示す移動状態[5]では、図17(a)に示すように、バーコード面β上の照射ラインLがバーの配列方向(y軸方向)に対して傾斜しているため、図17(b)に示すように、各バーの幅は図17(a)に示す元の幅よりも太くなる。
[Correction H5]
In the moving state [5] shown in FIG. 16, as shown in FIG. 17A, the irradiation line L on the barcode surface β is inclined with respect to the bar arrangement direction (y-axis direction). As shown in FIG. 17 (b), the width of each bar is larger than the original width shown in FIG. 17 (a).
例えば、図18に示すように、1回目の読取方向がバーの配列方向と平行であり(バー幅B1)、2回目の読取方向がバーの配列方向に対して角度θ傾斜している場合、2回目の読取で得られるバー幅B2を補正したバー幅Bは式(5)のように表される。
B=B2・cosθ …(5)
For example, as shown in FIG. 18, when the first reading direction is parallel to the bar arrangement direction (bar width B1), and the second reading direction is inclined at an angle θ with respect to the bar arrangement direction, The bar width B obtained by correcting the bar width B2 obtained by the second reading is expressed as shown in Expression (5).
B = B2 · cosθ (5)
しかし、実際の読取では、1回目の読取が図18のようにバーの配列方向に平行になっているとは限らないため、図19に示すように、1回目の読取もバーの配列方向に対して傾斜している場合も含めてバー幅の補正値を算出すべきである。図19に示すように、1回目の読取で得られるバー幅をB1、2回目の読取で得られるバー幅をB2、1回目と2回目の読取の間にジャイロセンサ16から取得された傾斜角をθとする。この場合、図20に示すように、二辺の長さをB1、B2とし、両辺が挟む角度をθとした三角形において、角度θに対応する頂点から対辺(長さC)に下ろした垂線の長さBが、バー幅の補正値となる。
However, in actual reading, since the first reading is not always parallel to the bar arrangement direction as shown in FIG. 18, the first reading is also performed in the bar arrangement direction as shown in FIG. The correction value of the bar width should be calculated including the case where it is inclined. As shown in FIG. 19, the bar width obtained by the first reading is B1, the bar width obtained by the second reading is B2, and the inclination angle obtained from the
図20の三角形において、長さCは式(6)のように算出される。
図3のステップS27において、ジャイロセンサ16から取得された移動状態が、移動状態[5]を含まないと判定された場合(ステップS27;NO)、又はステップS28の補正H5が終了すると、補正されたバーコードイメージデータがRAM14に保存され(ステップS29)、本補正処理が終了する。
In Step S27 of FIG. 3, when it is determined that the movement state acquired from the
以上のように、本実施形態のバーコード読取装置1によれば、ジャイロセンサ16から取得された移動状態に基づいて、読取部15により取得されたバーコードイメージデータを、予め設定された基準位置から読み取った場合のバーコードイメージデータに補正することにより、図21に示すような欠陥を有するバーコードであっても正しく合成処理を行うことができる。これにより、正確な読取結果を得ることができる。
As described above, according to the
なお、本実施形態における記述内容は、本発明の趣旨を逸脱しない範囲で適宜変更可能である。 Note that the description in the present embodiment can be changed as appropriate without departing from the spirit of the present invention.
例えば、上述の実施形態では、バーコード面βに対して光源OSが略x−y平面内を移動したときの補正処理を示したが、上記の移動状態[1]〜[5]に加えてz軸方向への移動を含めた移動状態に対応した補正処理を行うと、より精密な合成処理が可能となる。 For example, in the above-described embodiment, the correction processing when the light source OS moves in the substantially xy plane with respect to the barcode surface β has been described, but in addition to the movement states [1] to [5] described above. When correction processing corresponding to the movement state including movement in the z-axis direction is performed, more precise synthesis processing can be performed.
また、上述の実施形態では、ジャイロセンサ16を用いて読取部15の移動状態を検出する場合を示したが、3次元空間での移動状態が検出可能なものであれば、他のセンサを用いてもよい。
In the above-described embodiment, the case where the moving state of the
1 バーコード読取装置
10 CPU
11 表示部
12 入力部
13 記憶部
14 RAM
15 読取部
16 ジャイロセンサ
161 加速度センサ
162 傾きセンサ
18 電源部
1
11
DESCRIPTION OF
Claims (5)
前記読取手段により取得された各イメージデータを記憶する記憶手段と、
前記読取動作中における前記読取手段の3次元空間での複数の移動状態を検出する検出手段と、
前記検出手段により検出された複数の移動状態に基づいて、各々の移動状態に対応する補正処理を行い、前記記憶手段に記憶された各イメージデータを補正する補正手段と、
前記補正手段により補正された各イメージデータを合成する合成手段と、
を備え、
前記検出手段は、ジャイロセンサを用いて前記読取手段の3次元空間での複数の移動状態を検出し、
前記ジャイロセンサは、3次元空間での前記読取手段の加速度を検出する加速度センサと、3次元空間での前記読取手段の移動によって生じる当該読取手段の傾きを検出する傾きセンサと、を有する読取装置。 A reading means for reading a reading object a plurality of times and acquiring image data for each reading;
Storage means for storing each image data acquired by the reading means;
Detecting means for detecting a plurality of movement states in a three-dimensional space of the reading means during the reading operation;
Correction means for performing correction processing corresponding to each movement state based on a plurality of movement states detected by the detection means, and correcting each image data stored in the storage means;
Combining means for combining the image data corrected by the correcting means;
With
The detection means detects a plurality of movement states of the reading means in a three-dimensional space using a gyro sensor,
The gyro sensor includes an acceleration sensor that detects an acceleration of the reading unit in a three-dimensional space, and an inclination sensor that detects an inclination of the reading unit caused by the movement of the reading unit in a three-dimensional space. .
前記合成手段は、前記補正手段により補正された各バーコードイメージデータを合成し、
前記合成手段により合成されたバーコードイメージデータをデコードするデコード手段をさらに備える請求項1に記載の読取装置。 The image data is barcode image data,
The synthesizing unit synthesizes each barcode image data corrected by the correcting unit,
The reading apparatus according to claim 1 , further comprising decoding means for decoding the barcode image data synthesized by the synthesizing means.
前記コンピュータを、
読取手段により読取対象を複数回読み取り、読取毎にイメージデータを取得する手段、
前記取得された各イメージデータを記憶手段に記憶させる手段、
前記ジャイロセンサを用いて前記読取動作中における前記読取手段の3次元空間での複数の移動状態を検出する手段、
前記検出された複数の移動状態に基づいて、各々の移動状態に対応する補正処理を行い、前記記憶手段に記憶された各イメージデータを補正する手段、
前記補正された各イメージデータを合成する手段、
として機能させるようにしたコンピュータ読み取り可能なプログラム。 A program for controlling a computer having a gyro sensor having an acceleration sensor for detecting acceleration in a three-dimensional space and an inclination sensor for detecting an inclination caused by movement in the three-dimensional space,
The computer,
Means for reading an object to be read a plurality of times by a reading means, and acquiring image data for each reading;
Means for storing each acquired image data in a storage means;
Means for detecting a plurality of movement states in a three-dimensional space of the reading means during the reading operation using the gyro sensor ;
Means for performing correction processing corresponding to each movement state based on the detected plurality of movement states, and correcting each image data stored in the storage means;
Means for combining the corrected image data;
A computer-readable program designed to function as a computer .
前記読取手段により取得されたイメージデータを記憶する記憶手段と、Storage means for storing image data acquired by the reading means;
ジャイロセンサを用いて前記読取動作中における3次元空間での前記読取手段の加速度を検出すると共に、前記3次元空間での前記読取手段の移動によって生じる前記読取手段の傾きを検出する検出手段と、Detecting means for detecting an acceleration of the reading means in a three-dimensional space during the reading operation using a gyro sensor, and detecting an inclination of the reading means caused by movement of the reading means in the three-dimensional space;
前記検出手段により検出された前記読取手段の加速度及び前記読取手段の傾きに基づいて、前記読取手段の加速度及び前記読取手段の傾きに対応する補正処理を行い、前記記憶手段に記憶されたイメージデータを補正する補正手段と、Based on the acceleration of the reading unit and the inclination of the reading unit detected by the detection unit, correction processing corresponding to the acceleration of the reading unit and the inclination of the reading unit is performed, and the image data stored in the storage unit Correction means for correcting
を備える読取装置。A reading apparatus comprising:
前記コンピュータを、The computer,
読取手段により読取対象を読み取り、イメージデータを取得する手段、Means for reading an object to be read by a reading means and acquiring image data;
前記取得されたイメージデータを記憶手段に記憶させる手段、Means for storing the acquired image data in a storage means;
前記ジャイロセンサを用いて前記読取動作中における前記3次元空間での前記読取手段の加速度を検出すると共に、前記3次元空間での前記読取手段の移動によって生じる前記読取手段の傾きを検出する手段、Means for detecting acceleration of the reading means in the three-dimensional space during the reading operation using the gyro sensor and detecting an inclination of the reading means caused by movement of the reading means in the three-dimensional space;
前記検出された前記読取手段の加速度及び前記読取手段の傾きに基づいて、前記読取手段の加速度及び前記読取手段の傾きに対応する補正処理を行い、前記記憶手段に記憶されたイメージデータを補正する手段、Based on the detected acceleration of the reading unit and the inclination of the reading unit, a correction process corresponding to the acceleration of the reading unit and the inclination of the reading unit is performed, and the image data stored in the storage unit is corrected. means,
として機能させるようにしたコンピュータ読み取り可能なプログラム。A computer-readable program designed to function as a computer.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012061026A JP5403091B2 (en) | 2012-03-16 | 2012-03-16 | Reading apparatus and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012061026A JP5403091B2 (en) | 2012-03-16 | 2012-03-16 | Reading apparatus and program |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2007082515A Division JP5012133B2 (en) | 2007-03-27 | 2007-03-27 | Bar code reader and program |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2013160901A Division JP2013250993A (en) | 2013-08-02 | 2013-08-02 | Portable processing apparatus and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2012113759A JP2012113759A (en) | 2012-06-14 |
| JP5403091B2 true JP5403091B2 (en) | 2014-01-29 |
Family
ID=46497810
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2012061026A Expired - Fee Related JP5403091B2 (en) | 2012-03-16 | 2012-03-16 | Reading apparatus and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5403091B2 (en) |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003203198A (en) * | 2002-01-08 | 2003-07-18 | Canon Inc | Imaging device, imaging method, computer-readable storage medium, and computer program |
| JP4403750B2 (en) * | 2003-08-12 | 2010-01-27 | カシオ計算機株式会社 | Code reader |
-
2012
- 2012-03-16 JP JP2012061026A patent/JP5403091B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2012113759A (en) | 2012-06-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5012133B2 (en) | Bar code reader and program | |
| US7832642B2 (en) | Bar-code reading apparatus and computer-readable medium | |
| CN104735293B (en) | Image correcting apparatus image correcting method and recording medium | |
| JP4111166B2 (en) | 3D shape input device | |
| US8270044B2 (en) | Scanning apparatus having image correction function | |
| JP6241052B2 (en) | Image processing system and image processing program | |
| JP5087528B2 (en) | Image reading apparatus and shading correction method | |
| WO2010113450A1 (en) | Three-dimensional shape measuring device, three-dimensional shape measuring method, and three-dimensional shape measuring program | |
| US20190392607A1 (en) | Image processing apparatus, system, image processing method, article manufacturing method, and non-transitory computer-readable storage medium | |
| JP2005196543A (en) | Optical information reader | |
| JP6314688B2 (en) | Input device | |
| JP2012050013A (en) | Imaging apparatus, image processing device, image processing method, and image processing program | |
| JP2020053931A (en) | Image processing system, image scanner, and image processing method | |
| JP5403091B2 (en) | Reading apparatus and program | |
| JP4910822B2 (en) | Bar code reader and program | |
| JP6041011B2 (en) | Portable processing apparatus and program | |
| JP2013250993A (en) | Portable processing apparatus and program | |
| JP5720623B2 (en) | Two-dimensional code reader | |
| JP4275149B2 (en) | Boundary position determination apparatus, method for determining boundary position, program for causing computer to function as the apparatus, and recording medium | |
| JP4930076B2 (en) | Image information management system, image information management apparatus, image forming apparatus, image information management program, and image forming program | |
| JP2010272007A (en) | Optical information reader | |
| JP4134151B2 (en) | Image reading apparatus and shading correction data creation method | |
| US20130028535A1 (en) | Image Scanning Apparatus | |
| JP6840590B2 (en) | Calibration system, calibration jig, calibration method, and calibration program | |
| JP2007052471A (en) | Two-dimensional pattern reading device, two-dimensional pattern reading method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120413 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120413 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130523 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130618 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130802 |
|
| 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: 20131001 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20131014 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5403091 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |