JP2013140619A - Image processing apparatus and program - Google Patents

Image processing apparatus and program Download PDF

Info

Publication number
JP2013140619A
JP2013140619A JP2013049837A JP2013049837A JP2013140619A JP 2013140619 A JP2013140619 A JP 2013140619A JP 2013049837 A JP2013049837 A JP 2013049837A JP 2013049837 A JP2013049837 A JP 2013049837A JP 2013140619 A JP2013140619 A JP 2013140619A
Authority
JP
Japan
Prior art keywords
image data
distance
cpu
unit
symbol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2013049837A
Other languages
Japanese (ja)
Other versions
JP5532163B2 (en
Inventor
Toru Kitagawa
徹 北川
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2013049837A priority Critical patent/JP5532163B2/en
Publication of JP2013140619A publication Critical patent/JP2013140619A/en
Application granted granted Critical
Publication of JP5532163B2 publication Critical patent/JP5532163B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To properly achieve accuracy in read response and decoding, according to reading distance of a symbol.SOLUTION: A scanner device 10 determines whether reading distance from a scanner part 18 to a symbol is short. If the reading distance is determined to be short, the device performs at least either setting for increasing tolerance to an error of image data with respect to a threshold value for determining element width of a symbol, or setting for reducing the matching number of times of decoding result. If the reading distance is determined to be long, the device performs at least either setting for reducing the tolerance to the error of the image data with respect to the threshold value, or setting for increasing the matching number of times. Then, the device decodes the image data according to the setting.

Description

本発明は、スキャナ装置及びプログラムに関する。   The present invention relates to a scanner device and a program.

従来、レーザ光を用いて1次元のバーコードをスキャンするスキャナ装置が知られている。このスキャナ装置は、レーザ光を横方向に振って出射し、バーコードで反射された反射光を受光して得られたイメージデータを、所定の閾値を用いてデコードすることにより、バーコードをスキャンしている。   Conventionally, a scanner device that scans a one-dimensional bar code using a laser beam is known. This scanner device scans the barcode by decoding the image data obtained by oscillating the laser beam in the horizontal direction and receiving the reflected light reflected by the barcode using a predetermined threshold. doing.

バーコードの読み取りにおいて、読み取りレスポンスを向上して高速にすることと、デコードの正確性を向上することと、の要請がある。デコードの読み取りレスポンスを向上するために、二度読み防止機能を有するスキャナ装置において、加速度計により検出された加速度が所定値に変化した場合に、意図的に二度読みしたと判断し、イメージデータのデコードを行う構成が知られている(例えば、特許文献1参照)。   In reading barcodes, there is a demand for improving the reading response to increase the speed, and improving the decoding accuracy. In order to improve the decoding read response, when the acceleration detected by the accelerometer changes to a predetermined value in a scanner device having a double reading prevention function, it is determined that the image has been read twice intentionally, and image data Is known (see, for example, Patent Document 1).

また、デコードの読み取りレスポンスを向上するために、イメージデータをビット数の少ないBCDコードに変更してデコードするスキャナ装置が知られている(例えば、特許文献2参照)。   In addition, in order to improve the decoding read response, a scanner device is known that decodes image data by changing it to a BCD code having a small number of bits (see, for example, Patent Document 2).

また、デコードの正確性を向上するために、キャラクタ毎に閾値を補正し、補正した閾値を用いてイメージデータをデコードするスキャナ装置が知られている(例えば、特許文献3参照)。   In addition, in order to improve decoding accuracy, a scanner device that corrects a threshold value for each character and decodes image data using the corrected threshold value is known (for example, see Patent Document 3).

また、デコードの正確性を向上するために、バー幅が所定幅よりも小さく、読取距離が遠い場合に、イメージデータのデコードを行わないスキャナ装置が知られている(例えば、特許文献4参照)。読取距離が遠いと、デコードの正確性が低減するからである。   In order to improve decoding accuracy, a scanner device that does not decode image data when the bar width is smaller than a predetermined width and the reading distance is long is known (for example, see Patent Document 4). . This is because the accuracy of decoding is reduced when the reading distance is long.

特開平8−147403号公報JP-A-8-147403 特開平7−49919号公報JP 7-49919 A 特開平9−6885号公報JP-A-9-6885 特開平6−12514号公報JP-A-6-12514

しかし、従来のスキャナ装置では、シンボルの読み取り距離に応じて、読み取りレスポンス及びデコードの正確性を適切にすることができなかった。   However, in the conventional scanner device, the reading response and the decoding accuracy cannot be made appropriate according to the symbol reading distance.

本発明の課題は、シンボルの読み取り距離に応じて、読み取りレスポンス及びデコードの正確性を適切にすることである。   An object of the present invention is to make the reading response and decoding accuracy appropriate in accordance with the symbol reading distance.

上記課題を解決するために、本発明のスキャナ装置は、シンボルをスキャンしてイメージデータを取得するスキャナ部と、前記スキャナ部から前記シンボルまでの読み取り距離が近距離か否かを判別する判別部と、前記読み取り距離が近距離であると判別された場合に、前記イメージデータにおける前記シンボルのエレメント幅又は前記シンボルのバーコード幅を判定するための閾値に対するイメージデータの誤差の許容度を高くすること、あるいは、デコード結果の照合回数を少なくすることを設定し、前記読み取り距離が遠距離であると判別された場合に、前記閾値に対するイメージデータの誤差の許容度を低くすること、あるいは、前記照合回数を多くすることを設定し、前記設定に応じて前記イメージデータのデコードを行うデコード部と、を備える。   In order to solve the above problems, a scanner device of the present invention includes a scanner unit that scans a symbol to acquire image data, and a determination unit that determines whether a reading distance from the scanner unit to the symbol is a short distance. When the reading distance is determined to be a short distance, the tolerance of the error of the image data with respect to a threshold value for determining the element width of the symbol or the barcode width of the symbol in the image data is increased. Or setting the number of times of collation of the decoding result to be small, and when it is determined that the reading distance is a long distance, reducing the tolerance of the error of the image data with respect to the threshold value, or Set to increase the number of verifications, and decode the image data according to the setting. It comprises a part, a.

本発明によれば、シンボルの読み取り距離に応じて、読み取りレスポンス及びデコードの正確性を適切にできる。   According to the present invention, reading response and decoding accuracy can be made appropriate in accordance with the symbol reading distance.

本発明の第1の実施の形態のスキャナ装置の構成を示すブロック図である。It is a block diagram which shows the structure of the scanner apparatus of the 1st Embodiment of this invention. スキャナ部の構成を示すブロック図である。It is a block diagram which shows the structure of a scanner part. 第1のスキャン処理を示すフローチャートである。It is a flowchart which shows a 1st scanning process. 図3の続きの第1のスキャン処理を示すフローチャートである。FIG. 4 is a flowchart showing a first scan process continued from FIG. 3. FIG. 第1のスキャン処理のバーコード開始位置解析処理を示すフローチャートである。It is a flowchart which shows the barcode start position analysis process of a 1st scan process. 第1のスキャン処理のバーコード終了位置解析処理を示すフローチャートである。It is a flowchart which shows the barcode end position analysis process of a 1st scan process. 第1のスキャン処理の最小エレメント幅解析処理を示すフローチャートである。It is a flowchart which shows the minimum element width analysis process of a 1st scan process. 第1のスキャン処理のデコード処理を示すフローチャートである。It is a flowchart which shows the decoding process of a 1st scan process. デコード処理の4値化処理を示すフローチャートである。It is a flowchart which shows the quaternarization process of a decoding process. 第2の実施の形態のスキャナ装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the scanner apparatus of 2nd Embodiment. 第2のスキャン処理を示すフローチャートである。It is a flowchart which shows a 2nd scanning process.

以下、添付図面を参照して本発明に係る第1及び第2の実施の形態を順に詳細に説明する。なお、本発明は、図示例に限定されるものではない。   Hereinafter, first and second embodiments of the present invention will be described in detail with reference to the accompanying drawings. The present invention is not limited to the illustrated example.

(第1の実施の形態)
図1〜図9を参照して、本実施の形態に係る第1の実施の形態を説明する。先ず、図1及び図2を参照して、本実施の形態の装置構成を説明する。図1に、本実施の形態のスキャナ装置10の構成を示す。図2に、スキャナ部18の構成を示す。
(First embodiment)
The first embodiment according to the present embodiment will be described with reference to FIGS. First, the apparatus configuration of the present embodiment will be described with reference to FIGS. 1 and 2. FIG. 1 shows a configuration of a scanner device 10 according to the present embodiment. FIG. 2 shows the configuration of the scanner unit 18.

図1に示すように、本実施の形態のスキャナ装置10は、読み取り対象物であるシンボルとしての1次元のバーコードを読み取り管理するハンディターミナルである。スキャナ装置10は、例えば、倉庫や、小売店の店舗で使用される。バーコードは、例えば、倉庫や店舗等に並べられた商品に付されているものとする。   As shown in FIG. 1, a scanner device 10 according to the present embodiment is a handy terminal that reads and manages a one-dimensional bar code as a symbol that is an object to be read. The scanner device 10 is used in, for example, a warehouse or a retail store. For example, the barcode is attached to a product arranged in a warehouse or a store.

スキャナ装置10は、判別部、デコード部としてのCPU(Central Processing Unit)11と、操作部12と、RAM(Random Access Memory)13と、表示部14と、ROM(Read Only Memory)15と、無線通信部16と、フラッシュメモリ17と、スキャナ部18と、報知部19と、電源部20と、を備える。電源部20を除くスキャナ装置10の各部は、バス21を介して互いに接続されている。   The scanner device 10 includes a CPU (Central Processing Unit) 11 as a determination unit and a decoding unit, an operation unit 12, a RAM (Random Access Memory) 13, a display unit 14, a ROM (Read Only Memory) 15, and a wireless A communication unit 16, a flash memory 17, a scanner unit 18, a notification unit 19, and a power supply unit 20 are provided. Each unit of the scanner device 10 except for the power supply unit 20 is connected to each other via a bus 21.

CPU11は、スキャナ装置10の各部を制御する。CPU11は、各種プログラムのうち指定されたプログラムをROM15から読み出してRAM13に展開し、展開されたプログラムとの協働で各種処理を実行する。   The CPU 11 controls each unit of the scanner device 10. The CPU 11 reads a designated program out of various programs from the ROM 15 and expands it in the RAM 13 and executes various processes in cooperation with the expanded program.

CPU11は、第1のスキャンプログラム151に従い、スキャナ部18からバーコードまでの読み取り距離が近距離か否かを判別し、前記読み取り距離が近距離であると判別された場合に、前記バーコードのエレメント幅を判定するための閾値に対するイメージデータの誤差の許容度を高くし、且つデコード結果の照合回数を少なく設定する。また、CPU11は、前記読み取り距離が遠距離であると判別された場合に、前記閾値に対するイメージデータの誤差の許容度を低くし、且つ前記照合回数を多く設定する。そして、CPU11は、前記設定に応じて前記イメージデータのデコードを行う。   The CPU 11 determines whether or not the reading distance from the scanner unit 18 to the barcode is a short distance according to the first scan program 151, and when it is determined that the reading distance is a short distance, The tolerance of the image data with respect to the threshold for determining the element width is increased, and the number of times of decoding of the decoding result is set to be small. Further, when the CPU 11 determines that the reading distance is a long distance, the CPU 11 decreases the tolerance of the error of the image data with respect to the threshold value and sets the number of verifications to be large. Then, the CPU 11 decodes the image data according to the setting.

操作部12は、文字入力キー等の各種キーからなるキー群を備え、ユーザからの各キーの押下入力に応じた操作情報をCPU11に出力する。操作部12は、少なくとも、スキャナ部18を用いたバーコードスキャンのトリガキーを有する。   The operation unit 12 includes a key group including various keys such as a character input key, and outputs operation information corresponding to a pressing input of each key from the user to the CPU 11. The operation unit 12 has at least a trigger key for barcode scanning using the scanner unit 18.

RAM13は、揮発性の半導体メモリであり、各種データ及び各種プログラムを格納するワークエリアを有する。   The RAM 13 is a volatile semiconductor memory and has a work area for storing various data and various programs.

表示部14は、LCD(Liquid Crystal Display)、EL(ElectroLuminescent)ディスプレイ等の表示パネルを備える表示部であり、CPU11から入力される表示情報に応じて表示パネルに各種表示を行う。   The display unit 14 includes a display panel such as an LCD (Liquid Crystal Display) or an EL (ElectroLuminescent) display, and performs various displays on the display panel according to display information input from the CPU 11.

ROM15は、各種データ及び各種プログラムを記憶する読み出し専用の半導体メモリである。ROM15には、スキャンプログラム151が記憶されている。   The ROM 15 is a read-only semiconductor memory that stores various data and various programs. The ROM 15 stores a scan program 151.

無線通信部16は、携帯電話通信方式の無線通信部である。無線通信部16は、アンテナ、変調部、復調部、信号処理部等を備え、基地局と無線通信を行う。無線通信部16は、送信する情報の信号を、信号処理部で信号処理し、変調部により変調してアンテナから無線電波として基地局に送信する。この基地局は、通信先の機器と通信ネットワークを介して接続されている。また、無線通信部16は、アンテナにより基地局から受信した無線電波の受信信号を復調部により復調し、信号処理部で信号処理して受信情報を得る。このようにして、無線通信部16は、基地局を介して、通信先の機器と通信を行う。また、無線通信部16は、無線LAN(Local Area Network)方式の無線通信部とし、アクセスポイントを介して、通信先の機器と通信を行うこととしてもよい。   The wireless communication unit 16 is a wireless communication unit using a mobile phone communication method. The wireless communication unit 16 includes an antenna, a modulation unit, a demodulation unit, a signal processing unit, and the like, and performs wireless communication with the base station. The radio communication unit 16 processes a signal of information to be transmitted by a signal processing unit, modulates the signal by a modulation unit, and transmits the signal as a radio wave from an antenna to a base station. This base station is connected to a communication destination device via a communication network. The radio communication unit 16 demodulates a radio wave reception signal received from a base station by an antenna using a demodulation unit, and performs signal processing on the signal processing unit to obtain reception information. In this way, the wireless communication unit 16 communicates with a communication destination device via the base station. The wireless communication unit 16 may be a wireless local area network (LAN) wireless communication unit, and may communicate with a communication destination device via an access point.

フラッシュメモリ17は、情報を読み出し及び書き込み可能に記憶する不揮発性の半導体メモリである。   The flash memory 17 is a non-volatile semiconductor memory that stores information in a readable and writable manner.

スキャナ部18は、CPU11の制御信号に従い、一次元のバーコードをスキャンして、バーコードのイメージデータを取得し、そのイメージデータをCPU11に出力するレーザスキャナ部である。図2に示すように、スキャナ部18は、発光部181と、バイブレーションミラー182と、受光部183と、ゲイン回路184と、二値化回路185と、を備える。   The scanner unit 18 is a laser scanner unit that scans a one-dimensional barcode in accordance with a control signal from the CPU 11, acquires barcode image data, and outputs the image data to the CPU 11. As shown in FIG. 2, the scanner unit 18 includes a light emitting unit 181, a vibration mirror 182, a light receiving unit 183, a gain circuit 184, and a binarization circuit 185.

発光部181は、レーザ光Lを発光して出射する。バイブレーションミラー182は、CPU11の制御信号に従い、モータ(図示略)等によりバイブレートされることにより、発光部181から出射されたレーザ光Lを反射して左右に広げる。受光部183は、バイブレーションミラー182により反射されたレーザ光Lが実際に読み取り対象物(バーコード)に当たった反射光を受光して電気信号に変換するモジュールである。   The light emitting unit 181 emits the laser light L and emits it. The vibration mirror 182 is vibrated by a motor (not shown) or the like in accordance with a control signal from the CPU 11, thereby reflecting the laser light L emitted from the light emitting unit 181 and spreading it left and right. The light receiving unit 183 is a module that receives the reflected light that the laser light L reflected by the vibration mirror 182 actually hits the object to be read (bar code) and converts it into an electrical signal.

ゲイン回路184は、受光部183で受光した反射光の電気信号を増幅して波形を最適化する。二値化回路185は、ゲイン回路184で最適化された電気信号をバーコードのイメージデータとしての二値データに変換してCPU11に出力する。CPU11は、二値化回路185から入力されたイメージデータをデコードする。   The gain circuit 184 amplifies the electric signal of the reflected light received by the light receiving unit 183 and optimizes the waveform. The binarization circuit 185 converts the electrical signal optimized by the gain circuit 184 into binary data as barcode image data and outputs the binary data to the CPU 11. The CPU 11 decodes the image data input from the binarization circuit 185.

報知部19は、CPU11の制御に応じて、ブザー音を出力する報知部である。報知部19は、バーコードスキャンが成功した場合に、ブザー音出力するよう制御される。   The notification unit 19 is a notification unit that outputs a buzzer sound under the control of the CPU 11. The notification unit 19 is controlled to output a buzzer sound when the barcode scan is successful.

電源部20は、リチウム電池等の二次電池であり、スキャナ装置10の各部に電源供給を行う。電源部20は、アルカリ電池等の一次電池としてもよい。   The power supply unit 20 is a secondary battery such as a lithium battery, and supplies power to each unit of the scanner device 10. The power supply unit 20 may be a primary battery such as an alkaline battery.

次に、図3〜図9を参照して、スキャナ装置10の動作を説明する。図3に、第1のスキャン処理を示す。図4に、図3の続きの第1のスキャン処理を示す。図5に、第1のスキャン処理のバーコード開始位置解析処理を示す。図6に、第1のスキャン処理のバーコード終了位置解析処理を示す。図7に、第1のスキャン処理の最小エレメント幅解析処理を示す。図8に、第1のスキャン処理のデコード処理を示す。図9に、デコード処理の4値化処理を示す。   Next, the operation of the scanner device 10 will be described with reference to FIGS. FIG. 3 shows the first scan process. FIG. 4 shows a first scan process continued from FIG. FIG. 5 shows the barcode start position analysis process of the first scan process. FIG. 6 shows the barcode end position analysis process of the first scan process. FIG. 7 shows the minimum element width analysis process of the first scan process. FIG. 8 shows the decoding process of the first scan process. FIG. 9 shows the quaternarization process of the decoding process.

スキャナ装置10で実行される第1のスキャン処理は、読み取り対象のバーコードをスキャンして情報を読み取る処理である。予め、ユーザにより、スキャナ部18のレーザ光の出射方向に、読み取り対象のバーコードが合わせられるように、スキャナ装置10の位置及び姿勢が調整される。より具体的には、スキャナ部18のレーザ光の振れ幅の方向が、バーコードの長手方向に合わせられる。   The first scanning process executed by the scanner device 10 is a process of reading information by scanning a barcode to be read. The position and orientation of the scanner device 10 are adjusted in advance by the user so that the barcode to be read is aligned with the laser beam emission direction of the scanner unit 18. More specifically, the direction of the fluctuation width of the laser light of the scanner unit 18 is matched with the longitudinal direction of the barcode.

ここでは、バーコードに含まれる各キャラクタが6本のエレメント(3本の黒バー及び3本の白スペース)で構成される規格であるCode128のバーコードを読み取る例を説明する。しかし、これに限定されるものではなく、バーコードに含まれる各キャラクタがCode128以外の6本のエレメントからなる規格や、各キャラクタが6以外の本数のエレメントからなる規格のバーコードを読み取る構成としてもよい。   Here, an example in which a barcode of Code 128, which is a standard in which each character included in the barcode is composed of six elements (three black bars and three white spaces) is read will be described. However, the present invention is not limited to this, and a configuration in which each character included in the barcode reads a standard barcode including six elements other than Code 128, or a standard barcode including each number of elements other than six is included. Also good.

スキャナ装置10において、ユーザにより操作部12のバーコードスキャンのトリガボタンが押下されたことをトリガとして、CPU11は、ROM15から読み出されて適宜RAM13に展開された第1のスキャンプログラム151との協働で、第1のスキャン処理を実行する。CPU11は、第1のスキャン処理の開始とともに、タイマのカウントを開始する。   In the scanner device 10, triggered by the user pressing the barcode scanning trigger button on the operation unit 12, the CPU 11 cooperates with the first scan program 151 read from the ROM 15 and appropriately expanded in the RAM 13. In operation, the first scan process is executed. The CPU 11 starts counting the timer with the start of the first scan process.

図3及び図4に示すように、先ず、CPU11は、タイマのカウント値に応じて、スキャン処理開始から予め設定された所定時間を経過してタイムアウトしたか否かを判別する(ステップS11)。この所定時間は、スキャン処理を終了するためのタイムアウトの時間である。タイムアウトした場合(ステップS11;YES)、第1のスキャン処理が終了する。   As shown in FIGS. 3 and 4, first, the CPU 11 determines whether or not a predetermined time has elapsed from the start of the scanning process and timed out according to the count value of the timer (step S11). This predetermined time is a time-out time for ending the scanning process. When the time-out has occurred (step S11; YES), the first scan process ends.

タイムアウトしていない場合(ステップS11;NO)、CPU11は、スキャナ部18からバーコードのイメージデータの取得を完了する(ステップS12)。イメージデータは、バーコードのイメージの左から右へ並んだ黒バー及び白スペースの各データ幅の配列Dat[0],Dat[1],Dat[2]…を有するものとする。例えば、バーコードの左横の白スペースのデータ幅が配列Dat[0]となり、バーコードの最も左の黒バーのデータ幅が配列Dat[1]となる。   When the time-out has not occurred (step S11; NO), the CPU 11 completes the acquisition of the barcode image data from the scanner unit 18 (step S12). It is assumed that the image data has an array Dat [0], Dat [1], Dat [2]... Of data widths of black bars and white spaces arranged from left to right of the barcode image. For example, the data width of the white space on the left side of the barcode is array Dat [0], and the data width of the leftmost black bar of the barcode is array Dat [1].

そして、CPU11は、ステップS12で取得したバーコードのイメージデータについて、バーコード開始位置解析処理を行う(ステップS13)。ここで、図5を参照して、ステップS13のバーコード開始位置解析処理の説明を行う。先ず、CPU11は、イメージデータのバーコード開始位置(バーコードの左端の黒バー位置)の変数Pos1に1を設定する(ステップS41)。   Then, the CPU 11 performs a barcode start position analysis process on the barcode image data acquired in step S12 (step S13). Here, with reference to FIG. 5, the barcode start position analysis processing in step S13 will be described. First, the CPU 11 sets 1 to the variable Pos1 of the barcode start position of the image data (the black bar position at the left end of the barcode) (step S41).

そして、CPU11は、変数Pos1+1がイメージデータの全エレメントの本数DatNumより小さいか否かを判別する(ステップS42)。ステップS42では、変数Pos1+1がイメージデータのバーコードの右端を超えておらず正常か、同じく超えており異常かが判別されている。   Then, the CPU 11 determines whether or not the variable Pos1 + 1 is smaller than the number DatNum of all elements of the image data (step S42). In step S42, it is determined whether the variable Pos1 + 1 does not exceed the right end of the bar code of the image data and is normal or is also exceedingly abnormal.

Pos1+1<DatNumである場合(ステップS42;YES)、正常であり、CPU11は、配列Dat[Pos1+1]×10が配列Dat[Pos1−1]より小さいか否かを判別する(ステップS43)。ステップS43では、配列Dat[Pos1+1]の10倍の値が、これと同じ色で左隣の配列Dat[Pos1−1]より小さく、その同じ色で左隣の配列Dat[Pos1−1]がイメージデータのバーコードの左隣の大きな白スペース部分であるか否かが判別されている。   When Pos1 + 1 <DatNum is satisfied (step S42; YES), it is normal and the CPU 11 determines whether or not the array Dat [Pos1 + 1] × 10 is smaller than the array Dat [Pos1-1] (step S43). In step S43, 10 times the value of the array Dat [Pos1 + 1] is smaller than the array Dat [Pos1-1] on the left with the same color, and the array Dat [Pos1-1] on the left with the same color is an image. It is determined whether or not it is a large white space portion on the left side of the data barcode.

Dat[Pos1+1]×10≧Dat[Pos1−1]である場合(ステップS42;NO)、配列Dat[Pos1−1]が大きな白スペース部分でなく、CPU11は、変数Pos1を1インクリメントし(ステップS44)、ステップS42に移行される。   When Dat [Pos1 + 1] × 10 ≧ Dat [Pos1-1] (step S42; NO), the array Dat [Pos1-1] is not a large white space portion, and the CPU 11 increments the variable Pos1 by 1 (step S44). ), The process proceeds to step S42.

Dat[Pos1+1]×10<Dat[Pos1−1]である場合(ステップS43;YES)、配列Dat[Pos1−1]が大きな白スペース部分であり、CPU11は、バーコード開始位置を取得した旨を設定し(ステップS45)、バーコード開始位置解析処理を終了する。   If Dat [Pos1 + 1] × 10 <Dat [Pos1-1] (step S43; YES), the array Dat [Pos1-1] is a large white space portion, and the CPU 11 indicates that the barcode start position has been acquired. Set (step S45), the bar code start position analysis process ends.

Pos1+1≧DatNumである場合(ステップS42;NO)、異常であり、CPU11は、バーコード開始位置を未取得の旨を設定し(ステップS46)、
バーコード開始位置解析処理を終了する。
If Pos + 1 + 1 ≧ DatNum (step S42; NO), it is abnormal, and the CPU 11 sets that the barcode start position has not been acquired (step S46),
The barcode start position analysis process is terminated.

そして、図3に戻り、CPU11は、ステップS13の取得結果に応じてバーコード開始位置Pos1の取得を成功したか否かを判別する(ステップS14)。バーコード開始位置Pos1の取得を失敗した場合(ステップS14;NO)、ステップS11に移行される。   Returning to FIG. 3, the CPU 11 determines whether or not the acquisition of the barcode start position Pos1 has succeeded according to the acquisition result of step S13 (step S14). If acquisition of the barcode start position Pos1 has failed (step S14; NO), the process proceeds to step S11.

バーコード開始位置Pos1の取得を成功した場合(ステップS14;YES)、CPU11は、バーコード終了位置解析処理を実行する(ステップS15)。ここで、図6を参照して、ステップS15のバーコード終了位置解析処理の説明を行う。先ず、CPU11は、イメージデータのバーコード終了位置(バーコードの右端の黒バー位置)の変数Pos2にバーコード開始位置Pos1+2を設定する(ステップS51)。Pos1+2は、バーコード開始位置の黒バーの右隣の黒バーの位置となる。   When the acquisition of the barcode start position Pos1 is successful (step S14; YES), the CPU 11 executes a barcode end position analysis process (step S15). Here, with reference to FIG. 6, the barcode end position analysis processing in step S15 will be described. First, the CPU 11 sets the barcode start position Pos1 + 2 in the variable Pos2 of the barcode end position (black bar position at the right end of the barcode) of the image data (step S51). Pos1 + 2 is the position of the black bar right next to the black bar at the barcode start position.

そして、CPU11は、変数Pos2+1が本数DatNumより小さいか否かを判別する(ステップS52)。ステップS52では、変数Pos2+1がイメージデータのバーコードの右端を超えておらず正常か、同じく超えており異常かが判別されている。   Then, the CPU 11 determines whether or not the variable Pos2 + 1 is smaller than the number DatNum (step S52). In step S52, it is determined whether the variable Pos2 + 1 does not exceed the right end of the bar code of the image data and is normal or is also exceedingly abnormal.

Pos2+1<DatNumである場合(ステップS52;YES)、正常であり、CPU11は、配列Dat[Pos2−1]×10が配列Dat[Pos2+1]より小さいか否かを判別する(ステップS53)。ステップS53では、配列Dat[Pos2−1]の10倍の値が、これと同じ色で右隣の配列Dat[Pos2+1]より小さく、その同じ色で右隣の配列Dat[Pos2+1]がイメージデータのバーコードの右隣の大きな白スペース部分であるか否かが判別されている。   When Pos2 + 1 <DatNum is satisfied (step S52; YES), it is normal and the CPU 11 determines whether or not the array Dat [Pos2-1] × 10 is smaller than the array Dat [Pos2 + 1] (step S53). In step S53, the value 10 times the array Dat [Pos2-1] is smaller than the right adjacent array Dat [Pos2 + 1] in the same color, and the right adjacent array Dat [Pos2 + 1] is the same color as the image data. It is determined whether or not it is a large white space portion on the right side of the barcode.

Dat[Pos2−1]×10≧Dat[Pos2+1]である場合(ステップS53;NO)、配列Dat[Pos2+1]が大きな白スペース部分でなく、CPU11は、変数Pos2を2インクリメントし(ステップS54)、ステップS52に移行される。   If Dat [Pos2-1] × 10 ≧ Dat [Pos2 + 1] (step S53; NO), the array Dat [Pos2 + 1] is not a large white space part, and the CPU 11 increments the variable Pos2 by 2 (step S54). The process proceeds to step S52.

Dat[Pos2−1]×10<Dat[Pos2+1]である場合(ステップS53;YES)、配列Dat[Pos2+1]が大きな白スペース部分であり、CPU11は、バーコード終了位置を取得した旨を設定し(ステップS55)、バーコード終了位置解析処理を終了する。   If Dat [Pos2-1] × 10 <Dat [Pos2 + 1] (step S53; YES), the array Dat [Pos2 + 1] is a large white space portion, and the CPU 11 sets that the barcode end position has been acquired. (Step S55), the barcode end position analysis process is terminated.

Pos2+1≧DatNumである場合(ステップS52;NO)、異常であり、CPU11は、バーコード終了位置を未取得の旨を設定し(ステップS56)、
バーコード終了位置解析処理を終了する。
If Pos2 + 1 ≧ DatNum (step S52; NO), it is abnormal, and the CPU 11 sets that the barcode end position has not been acquired (step S56),
The barcode end position analysis process is terminated.

そして、図3に戻り、CPU11は、ステップS15の取得結果に応じてバーコード終了位置Pos2の取得を成功したか否かを判別する(ステップS16)。バーコード終了位置Pos2の取得を失敗した場合(ステップS16;NO)、ステップS11に移行される。   Returning to FIG. 3, the CPU 11 determines whether or not the acquisition of the barcode end position Pos2 has succeeded in accordance with the acquisition result of step S15 (step S16). If acquisition of the barcode end position Pos2 has failed (step S16; NO), the process proceeds to step S11.

バーコード終了位置Pos2の取得を成功した場合(ステップS16;YES)、CPU11は、最小エレメント幅解析処理を実行する(ステップS17)。ここで、図7を参照して、ステップS17の最小エレメント幅解析処理の説明を行う。先ず、CPU11は、エレメント位置の変数sにバーコード開始位置Pos1を代入する(ステップS61)。そして、CPU11は、最小エレメント幅の変数Minに配列Dat[s]を代入する(ステップS62)。   When acquisition of the barcode end position Pos2 is successful (step S16; YES), the CPU 11 executes minimum element width analysis processing (step S17). Here, the minimum element width analysis processing in step S17 will be described with reference to FIG. First, the CPU 11 assigns the barcode start position Pos1 to the element position variable s (step S61). Then, the CPU 11 substitutes the array Dat [s] for the variable Min of the minimum element width (step S62).

そして、CPU11は、変数sがバーコード終了位置Pos2以下であるか否かを判別する(ステップS63)。s≦Pos2である場合(ステップS63;YES)、CPU11は、配列Dat[s]が変数Min以下であるか否かを判別する(ステップS64)。   Then, the CPU 11 determines whether or not the variable s is equal to or less than the barcode end position Pos2 (step S63). When s ≦ Pos2 is satisfied (step S63; YES), the CPU 11 determines whether or not the array Dat [s] is equal to or smaller than the variable Min (step S64).

Dat[s]≦Minである場合(ステップS64;YES)、CPU11は、変数Minに配列Dat[s]を代入する(ステップS65)。そして、CPU11は、変数sを1インクリメントし(ステップS66)、ステップS63に移行される。Dat[s]>Minである場合(ステップS64;NO)、ステップS66に移行される。   If Dat [s] ≦ Min (step S64; YES), the CPU 11 assigns the array Dat [s] to the variable Min (step S65). Then, the CPU 11 increments the variable s by 1 (step S66), and proceeds to step S63. If Dat [s]> Min (step S64; NO), the process proceeds to step S66.

s>Pos2である場合(ステップS63;NO)、最小エレメント幅解析処理を終了する。   If s> Pos2 (step S63; NO), the minimum element width analysis process is terminated.

そして、図3に戻り、CPU11は、最小エレメント幅Minが予め設定された基準値より小さいか否かを判別する(ステップS18)。ステップS18の基準値は、スキャナ部18によるバーコードの読み取り距離が遠距離か近距離かを判別するための基準値であり、第1のスキャンプログラムに含まれるか、ROM15に記憶されている。   Returning to FIG. 3, the CPU 11 determines whether or not the minimum element width Min is smaller than a preset reference value (step S18). The reference value in step S18 is a reference value for determining whether the barcode reading distance by the scanner unit 18 is a long distance or a short distance, and is included in the first scan program or stored in the ROM 15.

最小エレメント幅Min<基準値である場合(ステップS18;YES)、CPU11は、変数Tに0.25を代入し、照合を実施する回数の変数Cに3を代入する(ステップS19)。変数Tは、バーの比率誤差について、どこまで許容するのかを表すパラメータであり、変数Tが小さいほど誤差を許容して解析を行う。最小エレメント幅Min≧基準値である場合(ステップS18;NO)、CPU11は、変数Tに0を代入し、変数Cに1を代入する(ステップS20)。   When the minimum element width Min <reference value (step S18; YES), the CPU 11 substitutes 0.25 for the variable T, and substitutes 3 for the variable C for the number of times of collation (step S19). The variable T is a parameter indicating how much the bar ratio error is allowed. The smaller the variable T, the more error is allowed for analysis. When the minimum element width Min ≧ reference value (step S18; NO), the CPU 11 substitutes 0 for the variable T and 1 for the variable C (step S20).

そして、CPU11は、ループ回数の変数iに0を代入してクリアする(ステップS21)。そして、CPU11は、デコード処理を実行する(ステップS22)。ここで、図8を参照して、ステップS22のデコード処理を説明する。   And CPU11 substitutes 0 to the variable i of the number of loops, and clears it (step S21). And CPU11 performs a decoding process (step S22). Here, the decoding process in step S22 will be described with reference to FIG.

先ず、CPU11は、変数Posにバーコード開始位置Pos1を代入する(ステップS71)。そして、CPU11は、変数Pos+6の値が本数DatNumより小さいか否かを判別する(ステップS72)。ステップS16で加算する6は、バーコードの1キャラクタ分の黒バー及び白スペースの数である。   First, the CPU 11 substitutes the barcode start position Pos1 for the variable Pos (step S71). Then, the CPU 11 determines whether or not the value of the variable Pos + 6 is smaller than the number DatNum (step S72). 6 added in step S16 is the number of black bars and white spaces for one character of the barcode.

Pos+6<DatNumである場合(ステップS72;YES)、CPU11は、4値化処理を実行する(ステップS73)。ここで、図9を参照して、ステップS73の4値化処理を説明する。   When Pos + 6 <DatNum is satisfied (step S72; YES), the CPU 11 executes a quaternization process (step S73). Here, with reference to FIG. 9, the quaternarization process in step S73 will be described.

Code128の規格において、黒バー及び白スペースのデータ幅は、4種類の値(太さ)が設定されている。4値化処理は、1キャラクタ分のイメージデータにおいて、閾値及び変数Tを用いて、3本の各黒バー及び3本の各白スペースのデータ幅を4種類の値のいずれであるかを判定する処理である。但し、黒バー及び白スペースのデータ幅が4種類であるバーコードの規格に限定されるものではない。   In the Code128 standard, four values (thicknesses) are set for the data width of the black bar and the white space. In the quaternarization processing, in the image data for one character, the threshold value and the variable T are used to determine which of the four values is the data width of each of the three black bars and each of the three white spaces. It is processing to do. However, the bar code standard is not limited to four types of data width of the black bar and the white space.

図9に示すように、先ず、CPU11は、配列Dat[Pos],Dat[Pos+1],Dat[Pos+2],Dat[Pos+3],Dat[Pos+4],Dat[Pos+5]を加算して、1キャラクタ分のイメージデータのデータ幅の変数Charを算出する(ステップS81)。   As shown in FIG. 9, first, the CPU 11 adds the arrays Dat [Pos], Dat [Pos + 1], Dat [Pos + 2], Dat [Pos + 3], Dat [Pos + 4], and Dat [Pos + 5] for one character. The variable Char of the data width of the image data is calculated (step S81).

先ず、CPU11は、変数Charを11で除算した値を変数Mとして設定する(ステップS82)。Code128の規格において、1キャラクタ分のイメージデータのデータ幅は、11値で一定である。ステップS82では、1キャラクタ分の変数Charを11(値)で除算することにより、1値に対応するイメージデータのデータ幅を変数Mとして算出している。   First, the CPU 11 sets a value obtained by dividing the variable Char by 11 as a variable M (step S82). In the Code 128 standard, the data width of image data for one character is 11 values and constant. In step S82, the variable Char for one character is divided by 11 (value) to calculate the data width of the image data corresponding to one value as the variable M.

そして、CPU11は、変数Mを0.5倍した値を変数B05として設定し、変数Mを1.5倍した値を変数B15として設定し、変数Mを2.5倍した値を変数B25として設定し、変数Mを3.5倍した値を変数B35として設定し、変数Mを4.5倍した値を変数B45として設定する(ステップS83)。変数B05,B15,B25,B35,B45は、順に、1値の0.5、1.5、2.5、3.5、4.5倍に対応するイメージデータのデータ幅の変数である。4値化処理において、変数B05,B15,B25,B35,B45は、黒バー及び白スペースのデータ幅を判定する(4値化する)ための閾値として使用される。   Then, the CPU 11 sets a value obtained by multiplying the variable M by 0.5 as a variable B05, sets a value obtained by multiplying the variable M by 1.5 as a variable B15, and sets a value obtained by multiplying the variable M by 2.5 as a variable B25. A value obtained by multiplying the variable M by 3.5 is set as a variable B35, and a value obtained by multiplying the variable M by 4.5 is set as a variable B45 (step S83). Variables B05, B15, B25, B35, and B45 are variables of the data width of image data corresponding to 0.5, 1.5, 2.5, 3.5, and 4.5 times of one value in order. In the quaternarization process, the variables B05, B15, B25, B35, and B45 are used as thresholds for determining (quaternizing) the data width of the black bar and white space.

そして、CPU11は、ループカウンタjに変数Posを設定する(ステップS84)。そして、CPU11は、ループカウンタjが変数Pos+6よりも小さいか否かを判別する(ステップS85)。j<Pos+6である場合(ステップS85;YES)、CPU11は、配列Dat[j]が変数B15よりも小さいか否かを判別する(ステップS86)。   Then, the CPU 11 sets a variable Pos in the loop counter j (step S84). Then, the CPU 11 determines whether or not the loop counter j is smaller than the variable Pos + 6 (step S85). If j <Pos + 6 (step S85; YES), the CPU 11 determines whether or not the array Dat [j] is smaller than the variable B15 (step S86).

Dat[j]<B15である場合(ステップS86;YES)、CPU11は、ループカウンタjに対応する黒バー又は白スペースのデータ幅の4値の配列R[j]に1を設定する(ステップS87)。そして、CPU11は、配列Dat[j]から変数B05を減算した値を変数W1として設定し、変数B15から配列Dat[j]を減算した値を変数W2として設定する(ステップS88)。変数W1は、配列Dat[j]と、配列Dat[j]の左側の閾値(変数B05,B15,B25又はB35)と、の間の距離の変数である。変数W2は、配列Dat[j]の右側の閾値(変数B15,B25,B35又はB45)と、配列Dat[j]と、の間の距離の変数である。   If Dat [j] <B15 (step S86; YES), the CPU 11 sets 1 to the 4-value array R [j] of the data width of the black bar or white space corresponding to the loop counter j (step S87). ). Then, the CPU 11 sets a value obtained by subtracting the variable B05 from the array Dat [j] as a variable W1, and sets a value obtained by subtracting the array Dat [j] from the variable B15 as a variable W2 (step S88). The variable W1 is a variable of the distance between the array Dat [j] and the threshold value (variable B05, B15, B25, or B35) on the left side of the array Dat [j]. The variable W2 is a variable of the distance between the threshold (variable B15, B25, B35, or B45) on the right side of the array Dat [j] and the array Dat [j].

Dat[j]≧B15である場合(ステップS86;NO)、CPU11は、配列Dat[j]が変数B25よりも小さいか否かを判別する(ステップS89)。Dat[j]<B25である場合(ステップS89;YES)、CPU11は、配列R[j]に2を設定する(ステップS90)。そして、CPU11は、配列Dat[j]から変数B15を減算した値を変数W1として設定し、変数B25から配列Dat[j]を減算した値を変数W2として設定する(ステップS91)。   If Dat [j] ≧ B15 (step S86; NO), the CPU 11 determines whether or not the array Dat [j] is smaller than the variable B25 (step S89). If Dat [j] <B25 (step S89; YES), the CPU 11 sets 2 in the array R [j] (step S90). Then, the CPU 11 sets a value obtained by subtracting the variable B15 from the array Dat [j] as the variable W1, and sets a value obtained by subtracting the array Dat [j] from the variable B25 as the variable W2 (step S91).

Dat[j]≧B25である場合(ステップS89;NO)、CPU11は、配列Dat[j]が変数B35よりも小さいか否かを判別する(ステップS92)。Dat[j]<B35である場合(ステップS92;YES)、CPU11は、配列R[j]に3を設定する(ステップS93)。そして、CPU11は、配列Dat[j]から変数B25を減算した値を変数W1として設定し、変数B35から配列Dat[j]を減算した値を変数W2として設定する(ステップS94)。   When Dat [j] ≧ B25 (step S89; NO), the CPU 11 determines whether or not the array Dat [j] is smaller than the variable B35 (step S92). If Dat [j] <B35 (step S92; YES), the CPU 11 sets 3 in the array R [j] (step S93). Then, the CPU 11 sets a value obtained by subtracting the variable B25 from the array Dat [j] as a variable W1, and sets a value obtained by subtracting the array Dat [j] from the variable B35 as a variable W2 (step S94).

Dat[j]≧B35である場合(ステップS92;NO)、CPU11は、配列R[j]に4を設定する(ステップS95)。そして、CPU11は、配列Dat[j]から変数B35を減算した値を変数W1として設定し、変数B45から配列Dat[j]を減算した値を変数W2として設定する(ステップS96)。   When Dat [j] ≧ B35 (step S92; NO), the CPU 11 sets 4 in the array R [j] (step S95). Then, the CPU 11 sets a value obtained by subtracting the variable B35 from the array Dat [j] as a variable W1, and sets a value obtained by subtracting the array Dat [j] from the variable B45 as a variable W2 (step S96).

ステップS88,S91,S94,S96の実行後、CPU11は、変数W1が、変数Mに変数Tを乗算した値よりも小さいか否かを判別する(ステップS97)。W1≧M×Tである場合(ステップS97;NO)、比率誤差が許容範囲内にあり、CPU11は、変数W2が、変数Mに変数Tを乗算した値よりも小さいか否かを判別する(ステップS98)。   After executing steps S88, S91, S94, and S96, the CPU 11 determines whether or not the variable W1 is smaller than a value obtained by multiplying the variable M by the variable T (step S97). When W1 ≧ M × T (step S97; NO), the ratio error is within the allowable range, and the CPU 11 determines whether or not the variable W2 is smaller than a value obtained by multiplying the variable M by the variable T ( Step S98).

W2≧M×Tである場合(ステップS98;NO)、比率誤差が許容範囲内にあり、CPU11は、ループカウンタjを1インクリメントし(ステップS99)、ステップS85に移行される。W1<M×Tである場合(ステップS97;YES)、CPU11は、変数Posに対応する1キャラクタの黒バー及び白スペースの4値化が失敗した旨を設定し(ステップS100)、4値化処理を終了する。W2<M×Tである場合(ステップS98;YES)、ステップS100に移行される。   If W2 ≧ M × T (step S98; NO), the ratio error is within the allowable range, and the CPU 11 increments the loop counter j by 1 (step S99), and proceeds to step S85. If W1 <M × T (step S97; YES), the CPU 11 sets that the quaternization of the black bar and white space of one character corresponding to the variable Pos has failed (step S100), and quaternization. The process ends. When W2 <M × T (step S98; YES), the process proceeds to step S100.

変数W1,W2が小さい場合、1値と2値との差や、2値と3値との差等、本来異なるレベルとなるべきデータ幅の差異が小さく、比率があいまいになり、誤読の危険性が高くなるため、ステップS100で4値化が失敗した旨が設定されている。   When the variables W1 and W2 are small, the difference in data width that should be at a different level, such as the difference between 1 value and 2 value, or the difference between 2 value and 3 value, is small, the ratio is ambiguous, and the risk of misreading Therefore, the fact that quaternarization has failed is set in step S100.

j≧Pos+6である場合(ステップS85;NO)、CPU11は、変数Posに対応する1キャラクタの黒バー及び白スペースの4値化が成功した旨を設定し(ステップS101)、4値化処理を終了する。   If j ≧ Pos + 6 (step S85; NO), the CPU 11 sets that the quaternization of the black bar and white space of one character corresponding to the variable Pos is successful (step S101), and performs quaternization processing. finish.

図8に戻り、CPU11は、ステップS73(ステップS100,S101)の4値化処理の結果に応じて、変数Posに対応する1キャラクタの黒バー及び白スペースの4値化が成功したか否かを判別する(ステップS74)。4値化が成功した場合(ステップS74;YES)、CPU11は、ステップS73の4値化処理で得られたキャラクタの配列R[j]をキャラクタコードに変換する(ステップS75)。そして、CPU11は、ステップS75で変換したキャラクタコードが、バーコードの右端を示すストップコードであるか否かを判別する(ステップS76)。   Returning to FIG. 8, the CPU 11 determines whether or not the quaternization of the black bar and the white space of one character corresponding to the variable Pos has succeeded according to the result of the quaternization processing in step S73 (steps S100 and S101). Is determined (step S74). When the quaternarization is successful (step S74; YES), the CPU 11 converts the character array R [j] obtained by the quaternarization process of step S73 into a character code (step S75). Then, the CPU 11 determines whether or not the character code converted in step S75 is a stop code indicating the right end of the barcode (step S76).

ストップコードでない場合(ステップS76;NO)、CPU11は、変数Posを6インクリメントし(ステップS77)、ステップS74に移行される。ストップコードである場合(ステップS76;YES)、CPU11は、イメージデータのデコードが成功した旨を設定し(ステップS78)、デコード処理を終了する。   If it is not a stop code (step S76; NO), the CPU 11 increments the variable Pos by 6 (step S77), and proceeds to step S74. If it is a stop code (step S76; YES), the CPU 11 sets that the image data has been successfully decoded (step S78) and ends the decoding process.

Pos+6≧DatNumである場合(ステップS72;NO)、イメージデータのデコードが失敗した旨を設定し(ステップS79)、デコード処理を終了する。4値化が失敗した場合(ステップS74;NO)、ステップS79に移行される。なお、ストップコードである場合(ステップS76;YES)、CPU11は、ステップS75で変換されたキャラクタコードを用いてチェックデジット等のチェック処理を行い、そのチェック結果に応じて、最終的にデコードが成功したか否かを判別し、デコードが成功した場合にステップS78に移行され、デコードが失敗した場合にステップS79に移行されることとしてもよい。   If Pos + 6 ≧ DatNum (step S72; NO), the fact that the decoding of the image data has failed is set (step S79), and the decoding process is terminated. If the quaternarization has failed (step S74; NO), the process proceeds to step S79. If it is a stop code (step S76; YES), the CPU 11 performs check processing such as check digit using the character code converted in step S75, and finally decoding succeeds according to the check result. If the decoding is successful, the process may proceed to step S78. If the decoding fails, the process may proceed to step S79.

そして、図4に戻り、CPU11は、ステップS22でデコードが成功したか否かを判別する(ステップS23)。デコードが失敗した場合(ステップS23;NO)、ステップS30に移行される。デコードが成功した場合(ステップS23;YES)、CPU11は、変数iが0より大きいか否かを判別する(ステップS24)。   Returning to FIG. 4, the CPU 11 determines whether or not the decoding is successful in step S22 (step S23). When decoding fails (step S23; NO), the process proceeds to step S30. When the decoding is successful (step S23; YES), the CPU 11 determines whether or not the variable i is larger than 0 (step S24).

0<iである場合(ステップS24;YES)、CPU11は、RAM13に記憶されている前のデコード結果と最新のデコード結果との照合を実施する(ステップS25)。0≧iである場合(ステップS24;NO)、照合元のデコード結果がなく、CPU11は、ステップS22で得られたデコード結果を照合元としてRAM13に記憶する(ステップS26)。   If 0 <i (step S24; YES), the CPU 11 collates the previous decoding result stored in the RAM 13 with the latest decoding result (step S25). When 0 ≧ i (step S24; NO), there is no verification source decoding result, and the CPU 11 stores the decoding result obtained in step S22 in the RAM 13 as the verification source (step S26).

そして、CPU11は、ステップS25の照合が一致したか否かを判別する(ステップS27)。照合が一致していない場合(ステップS27;NO)、ステップS11に移行される。照合が一致した場合(ステップS27;YES)、CPU11は、変数iが変数C+1よりも小さいか否かを判別する(ステップS29)。i<C+1である場合(ステップS29;YES)、CPU11は、スキャナ部18から次のイメージデータが入力されるのを待ち、入力された次のイメージデータを取得する(ステップS30)、ステップS22に移行される。   And CPU11 discriminate | determines whether the collation of step S25 corresponded (step S27). If the verification does not match (step S27; NO), the process proceeds to step S11. When the collation matches (step S27; YES), the CPU 11 determines whether or not the variable i is smaller than the variable C + 1 (step S29). If i <C + 1 (step S29; YES), the CPU 11 waits for the next image data to be input from the scanner unit 18 and acquires the input next image data (step S30). To be migrated.

i≧C+1である場合(ステップS29;NO)、CPU11は、ステップS23で得られたキャラクタコードを含むデコード結果を表示部14に表示し、報知部19にブザー音を出力させ(ステップS31)、第1のスキャン処理を終了する。ステップS31において、デコード結果は、例えば、フラッシュメモリ17に記憶される。   When i ≧ C + 1 (step S29; NO), the CPU 11 displays the decoding result including the character code obtained in step S23 on the display unit 14 and causes the notification unit 19 to output a buzzer sound (step S31). The first scan process is terminated. In step S31, the decoding result is stored in the flash memory 17, for example.

以上、本実施の形態によれば、スキャナ装置10のCPU11は、スキャナ部18からバーコードまでの読み取り距離が近距離か否かを判別し、前記読み取り距離が近距離であると判別された場合に、前記バーコードのエレメント幅を判定するための閾値(変数B05,B15,B25,B35,B45)に対するイメージデータの誤差の許容度を高くし(変数Tを小さくし)、且つデコード結果の照合回数(変数C)を少なく設定する。また、CPU11は、前記読み取り距離が遠距離であると判別された場合に、前記閾値に対するイメージデータの誤差の許容度を低くし(変数Tを大きくし)、且つ前記照合回数(変数C)を多く設定する。そして、CPU11は、前記設定に応じて前記イメージデータのデコードを行う。   As described above, according to the present embodiment, the CPU 11 of the scanner device 10 determines whether or not the reading distance from the scanner unit 18 to the barcode is a short distance, and when it is determined that the reading distance is a short distance. In addition, the tolerance of the image data with respect to the threshold value (variables B05, B15, B25, B35, B45) for determining the element width of the barcode is increased (variable T is decreased), and the decoding result is collated. Set the number of times (variable C) small. Further, when the CPU 11 determines that the reading distance is a long distance, the CPU 11 reduces the tolerance of the error of the image data with respect to the threshold value (increases the variable T), and sets the number of collations (variable C). Set a lot. Then, the CPU 11 decodes the image data according to the setting.

このため、スキャナ装置10は、シンボルの読み取り距離が近距離である場合に、読み取りレスポンスを向上し、シンボルの読み取り距離が遠距離である場合に、デコードの正確性を向上するので、シンボルの読み取り距離に応じて、読み取りレスポンス及びデコードの正確性を適切にできる。   For this reason, the scanner device 10 improves the reading response when the symbol reading distance is a short distance, and improves the decoding accuracy when the symbol reading distance is a long distance. Depending on the distance, the read response and decoding accuracy can be made appropriate.

また、スキャナ装置10は、前記イメージデータの最小エレメント幅が基準値以上の場合に、前記読み取り距離が近距離であると判定し、前記イメージデータの最小エレメント幅が基準値よりも小さい場合に、前記読み取り距離が遠距離であると判定する。このため、読み取り距離を測定する部品を設けないので、スキャナ装置10の構成を簡単にすることができる。   Further, the scanner device 10 determines that the reading distance is a short distance when the minimum element width of the image data is equal to or larger than a reference value, and when the minimum element width of the image data is smaller than the reference value, It is determined that the reading distance is a long distance. For this reason, since the component which measures reading distance is not provided, the structure of the scanner apparatus 10 can be simplified.

(第2の実施の形態)
図10及び図11を参照して、本発明に係る第2の実施の形態を説明する。図10に、本実施の形態のスキャナ装置10Aの機能構成を示す。図11に、第2のスキャン処理を示す。
(Second Embodiment)
A second embodiment according to the present invention will be described with reference to FIGS. FIG. 10 shows a functional configuration of the scanner device 10A of the present embodiment. FIG. 11 shows the second scan process.

図10に示すスキャナ装置10Aは、スキャナ装置10の各部に加えて、測距部22を備える。スキャナ装置10と共通する部分は、同じ符号を付し、その説明を省略する。   A scanner device 10 </ b> A illustrated in FIG. 10 includes a distance measuring unit 22 in addition to the components of the scanner device 10. Portions common to the scanner device 10 are denoted by the same reference numerals and description thereof is omitted.

測距部22は、赤外線を出射してスキャン対象物(バーコード)からの反射光を受光することにより、スキャナ装置10A(スキャナ部18)からバーコードまでの読み取り距離を測定し、その読み取り距離情報をCPU11に出力する。   The distance measuring unit 22 measures the reading distance from the scanner device 10A (scanner unit 18) to the bar code by emitting infrared rays and receiving the reflected light from the scanning object (bar code), and the reading distance. Information is output to the CPU 11.

また、ROM15には、第1のスキャンプログラム151に代えて第2のスキャンプログラム152が記憶されているものとする。   It is assumed that the ROM 15 stores a second scan program 152 instead of the first scan program 151.

次に、図11を参照して、スキャナ装置10Aの動作を説明する。スキャナ装置10Aにおいて、ユーザにより操作部12のバーコードスキャンのトリガボタンが押下されたことをトリガとして、CPU11は、ROM15から読み出されて適宜RAM13に展開された第2のスキャンプログラム152との協働で、第2のスキャン処理を実行する。CPU11は、第2のスキャン処理の開始とともに、タイマのカウントを開始する。   Next, the operation of the scanner device 10A will be described with reference to FIG. In the scanner device 10 </ b> A, the CPU 11 is triggered by the user pressing the barcode scanning trigger button on the operation unit 12, and the CPU 11 cooperates with the second scan program 152 read from the ROM 15 and appropriately expanded in the RAM 13. Thus, the second scan process is executed. The CPU 11 starts counting the timer with the start of the second scanning process.

図11に示すように、ステップS111,S112は、図3及び図4の第1のスキャン処理のステップS11,S12と同様である。そして、CPU11は、測距部22によりバーコードまでの読み取り距離dを測定する(ステップS113)。そして、CPU11は、読み取り距離dが基準値より大きいか否かを判別する(ステップS114)。ステップS114の基準値は、読み取り距離dが近距離か遠距離かを判別するための基準値であり、第2のスキャンプログラムに含まれるか、ROM15に記憶されている。   As shown in FIG. 11, steps S111 and S112 are the same as steps S11 and S12 of the first scan processing in FIGS. 3 and 4. Then, the CPU 11 measures the reading distance d to the bar code by the distance measuring unit 22 (step S113). Then, the CPU 11 determines whether or not the reading distance d is larger than the reference value (step S114). The reference value in step S114 is a reference value for determining whether the reading distance d is a short distance or a long distance, and is included in the second scan program or stored in the ROM 15.

d>基準値である場合(ステップS114;YES)、ステップS115に移行される。d≦基準値である場合(ステップS114;NO)、ステップS116に移行される。ステップS115〜S127は、図3及び図4の第1のスキャン処理のステップS19〜S31と同様である。   If d> reference value (step S114; YES), the process proceeds to step S115. If d ≦ reference value (step S114; NO), the process proceeds to step S116. Steps S115 to S127 are the same as steps S19 to S31 of the first scan processing in FIGS.

以上、本実施の形態によれば、スキャナ装置10AのCPU11は、スキャナ装置10と同様に、バーコードの読み取り距離に応じて、読み取りレスポンス及びデコードの正確性を適切にできる。また、スキャナ装置10Aは、測距部22により測定された読み取り距離が基準値以下の場合に、前記読み取り距離が近距離であると判別し、前記測定された読み取り距離が基準値よりも大きい場合に、前記読み取り距離が遠距離であると判別する。このため、イメージデータにおける読み取り距離に対応するエレメント幅の解析を行わず、読み取り距離を容易に得ることができる。   As described above, according to the present embodiment, the CPU 11 of the scanner device 10 </ b> A can appropriately set the read response and the decoding accuracy according to the barcode reading distance, similarly to the scanner device 10. When the reading distance measured by the distance measuring unit 22 is equal to or less than the reference value, the scanner device 10A determines that the reading distance is a short distance, and the measured reading distance is larger than the reference value. Further, it is determined that the reading distance is a long distance. For this reason, the reading distance can be easily obtained without analyzing the element width corresponding to the reading distance in the image data.

以上の説明では、本発明に係るプログラムのコンピュータ読み取り可能な媒体としてROM15を使用した例を開示したが、この例に限定されない。
その他のコンピュータ読み取り可能な媒体として、フラッシュメモリ等の不揮発性メモリ、CD−ROM等の可搬型記録媒体を適用することが可能である。
また、本発明に係るプログラムのデータを通信回線を介して提供する媒体として、キャリアウエーブ(搬送波)も本発明に適用される。
In the above description, the example in which the ROM 15 is used as the computer-readable medium of the program according to the present invention is disclosed, but the present invention is not limited to this example.
As other computer-readable media, a non-volatile memory such as a flash memory and a portable recording medium such as a CD-ROM can be applied.
A carrier wave is also applied to the present invention as a medium for providing program data according to the present invention via a communication line.

なお、上記実施の形態における記述は、本発明に係るスキャナ装置及びプログラムの一例であり、これに限定されるものではない。   The description in the above embodiment is an example of the scanner device and the program according to the present invention, and the present invention is not limited to this.

上記実施の形態では、スキャナ装置10がハンディターミナルである構成としたが、これに限定されるものではない。スキャナ装置10としては、レーザ方式のスキャナ部を有するPDA(Personal Digital Assistant)、ECR(Electronic Cash Register)に接続されたスキャナ装置等、他のスキャナ装置を用いる構成としてもよい。   In the above embodiment, the scanner device 10 is a handy terminal. However, the present invention is not limited to this. The scanner device 10 may be configured to use another scanner device such as a PDA (Personal Digital Assistant) having a laser-type scanner unit or a scanner device connected to an ECR (Electronic Cash Register).

また、上記第1の実施の形態では、イメージデータのエレメント幅が基準値より小さいか否かに応じて、スキャナ部からシンボルまでの読み取り距離が近距離か遠距離かを判別する構成としたが、これに限定されるものではない。例えば、イメージデータのシンボル幅(バーコード幅)が基準値より小さいか否かに応じて、スキャナ部からシンボルまでの読み取り距離が近距離か遠距離かを判別する構成としてもよい。   In the first embodiment, it is configured to determine whether the reading distance from the scanner unit to the symbol is a short distance or a long distance depending on whether the element width of the image data is smaller than the reference value. However, the present invention is not limited to this. For example, it may be configured to determine whether the reading distance from the scanner unit to the symbol is a short distance or a long distance depending on whether the symbol width (barcode width) of the image data is smaller than a reference value.

また、上記第2の実施の形態では、スキャナ部からシンボルまでの読み取り距離を測定する測距部22が、赤外線を用いる測距部22としたが、これに限定されるものではない。例えば、撮像部のオートフォーカス機構を利用して焦点距離を読み取り距離とする測距部等、他の測距部としてもよい。   In the second embodiment, the distance measuring unit 22 that measures the reading distance from the scanner unit to the symbol is the distance measuring unit 22 that uses infrared rays. However, the present invention is not limited to this. For example, another distance measuring unit such as a distance measuring unit using the autofocus mechanism of the imaging unit as a reading distance may be used.

また、上記実施の形態では、スキャナ装置10,10AのCPU11は、読み取り距離が近距離であると判別された場合に、バーコードのエレメント幅を判定するための閾値に対するイメージデータの誤差の許容度を高くし、且つデコード結果の照合回数を少なく設定し、前記読み取り距離が遠距離であると判別された場合に、前記閾値に対するイメージデータの誤差の許容度を低くし、且つ前記照合回数を多く設定することとしたが、これに限定されるものではない。CPU11は、読み取り距離が近距離であると判別された場合に、前記閾値に対するイメージデータの誤差の許容度を高くすることと、デコード結果の照合回数を少なくすることとの少なくとも一方を設定し、前記読み取り距離が遠距離であると判別された場合に、前記閾値に対するイメージデータの誤差の許容度を低くすることと、前記照合回数を多く設定することとの少なくとも一方を設定することとしてもよい。   In the above embodiment, when the CPU 11 of the scanner device 10 or 10A determines that the reading distance is a short distance, the tolerance of the error of the image data with respect to the threshold value for determining the element width of the barcode. Is increased, the number of times of collation of the decoding result is set to be small, and when it is determined that the reading distance is a long distance, the tolerance of the error of the image data with respect to the threshold is lowered, and the number of times of collation is increased. However, the present invention is not limited to this. When the CPU 11 determines that the reading distance is a short distance, the CPU 11 sets at least one of increasing the tolerance of the error of the image data with respect to the threshold and decreasing the number of times of collation of the decoding result, When it is determined that the reading distance is a long distance, it is possible to set at least one of lowering the tolerance of the error of the image data with respect to the threshold and setting the number of collations more. .

また、上記実施の形態では、スキャナ部18が、シンボルとしてのバーコードを読み取るレーザ方式のスキャナ部である構成としたが、これに限定されるものではない。例えば、スキャナ部が、シンボルとしてのバーコード又は2次元コードを撮像して読み取るイメージスキャナであるとしてもよい。   In the above-described embodiment, the scanner unit 18 is a laser-type scanner unit that reads a barcode as a symbol. However, the present invention is not limited to this. For example, the scanner unit may be an image scanner that captures and reads a bar code or a two-dimensional code as a symbol.

また、上記実施の形態におけるスキャナ装置10,10Aの各構成要素の細部構成及び細部動作に関しては、本発明の趣旨を逸脱することのない範囲で適宜変更可能であることは勿論である。   In addition, it is needless to say that the detailed configuration and detailed operation of each component of the scanner devices 10 and 10A in the above embodiment can be appropriately changed without departing from the spirit of the present invention.

本発明の実施の形態を説明したが、本発明の範囲は、上述の実施の形態に限定するものではなく、特許請求の範囲に記載された発明の範囲とその均等の範囲を含む。
以下に、この出願の願書に最初に添付した特許請求の範囲に記載した発明を付記する。付記に記載した請求項の項番は、この出願の願書に最初に添付した特許請求の範囲の通りである。
〔付記〕
<請求項1>
シンボルをスキャンしてイメージデータを取得するスキャナ部と、
前記スキャナ部から前記シンボルまでの読み取り距離が近距離か否かを判別する判別部と、
前記読み取り距離が近距離であると判別された場合に、前記シンボルのエレメント幅を判定するための閾値に対するイメージデータの誤差の許容度を高くすることと、デコード結果の照合回数を少なくすることとの少なくとも一方を設定し、前記読み取り距離が遠距離であると判別された場合に、前記閾値に対するイメージデータの誤差の許容度を低くすることと、前記照合回数を多くすることとの少なくとも一方を設定し、前記設定に応じて前記イメージデータのデコードを行うデコード部と、を備えるスキャナ装置。
<請求項2>
前記判別部は、前記イメージデータのエレメント幅又はシンボル幅が基準値以上の場合に、前記読み取り距離が近距離であると判別し、前記イメージデータのエレメント幅又はシンボル幅が基準値よりも小さい場合に、前記読み取り距離が遠距離であると判別する請求項1に記載のスキャナ装置。
<請求項3>
前記スキャナ部から前記シンボルまでの読み取り距離を測定する測距部を備え、
前記判別部は、前記測距部により測定された読み取り距離が基準値以下の場合に、前記読み取り距離が近距離であると判別し、前記測定された読み取り距離が基準値よりも大きい場合に、前記読み取り距離が遠距離であると判別する請求項1に記載のスキャナ装置。
<請求項4>
コンピュータを、
シンボルをスキャンしてイメージデータを取得するスキャナ部、
前記スキャナ部から前記シンボルまでの読み取り距離が近距離か否かを判別する判別部、
前記読み取り距離が近距離であると判別された場合に、前記シンボルのエレメント幅を判定するための閾値に対するイメージデータの誤差の許容度を高くすることと、デコード結果の照合回数を少なくすることとの少なくとも一方を設定し、前記読み取り距離が遠距離であると判別された場合に、前記閾値に対するイメージデータの誤差の許容度を低くすることと、前記照合回数を多くすることとの少なくとも一方を設定し、前記設定に応じて前記イメージデータのデコードを行うデコード部、
として機能させるためのプログラム。
Although the embodiments of the present invention have been described, the scope of the present invention is not limited to the above-described embodiments, but includes the scope of the invention described in the claims and the equivalents thereof.
The invention described in the scope of claims attached to the application of this application will be added below. The item numbers of the claims described in the appendix are as set forth in the claims attached to the application of this application.
[Appendix]
<Claim 1>
A scanner unit that scans a symbol to obtain image data;
A determination unit for determining whether a reading distance from the scanner unit to the symbol is a short distance;
When it is determined that the reading distance is a short distance, increasing an error tolerance of the image data with respect to a threshold value for determining the element width of the symbol, and reducing the number of times of collating the decoding result When the reading distance is determined to be a long distance, at least one of lowering the tolerance of the error of the image data with respect to the threshold and increasing the number of matching times is set. And a decoding unit configured to set and decode the image data according to the setting.
<Claim 2>
The determination unit determines that the reading distance is a short distance when the element width or symbol width of the image data is greater than or equal to a reference value, and the element width or symbol width of the image data is smaller than a reference value The scanner device according to claim 1, wherein the reading distance is determined to be a long distance.
<Claim 3>
A distance measuring unit for measuring a reading distance from the scanner unit to the symbol;
The determining unit determines that the reading distance is a short distance when the reading distance measured by the distance measuring unit is equal to or less than a reference value, and when the measured reading distance is larger than a reference value, The scanner apparatus according to claim 1, wherein the reading distance is determined to be a long distance.
<Claim 4>
Computer
A scanner unit that scans the symbols and obtains image data,
A determination unit for determining whether or not a reading distance from the scanner unit to the symbol is a short distance;
When it is determined that the reading distance is a short distance, increasing an error tolerance of the image data with respect to a threshold value for determining the element width of the symbol, and reducing the number of times of collating the decoding result When the reading distance is determined to be a long distance, at least one of lowering the tolerance of the error of the image data with respect to the threshold and increasing the number of matching times is set. A decoding unit configured to decode the image data in accordance with the setting;
Program to function as.

10,10A スキャナ装置
11 CPU
12 操作部
13 RAM
14 表示部
15 ROM
16 無線通信部
17 フラッシュメモリ
18 スキャナ部
181 発光部
182 バイブレーションミラー
183 受光部
184 ゲイン回路
185 二値化回路
19 報知部
20 電源部
21 バス
22 測距部
10, 10A Scanner device 11 CPU
12 Operation unit 13 RAM
14 Display 15 ROM
16 wireless communication unit 17 flash memory 18 scanner unit 181 light emitting unit 182 vibration mirror 183 light receiving unit 184 gain circuit 185 binarization circuit 19 notification unit 20 power supply unit 21 bus 22 distance measuring unit

本発明は、読取手段で読み取られたシンボルイメージに対してデコード処理を行うイメージ処理装置関する。 The present invention relates to an image processing apparatus for decoding the symbols read by the reading means image.

本発明の課題は、シンボルイメージに対するデコードの正確性を適切にすることである。 An object of the present invention is to make the decoding accuracy for a symbol image appropriate.

請求項1は、読取手段で読み取られたシンボルイメージに対してデコード処理を行うイメージ処理装置であって、前記読取手段で読み取られた前記シンボルイメージ内の特定部分の幅を所定基準値と比較する比較手段と、前記比較手段による比較結果に基づいて、前記シンボルイメージに対するデコード処理時での誤差許容度を変更する変更手段と、を具備したことを特徴とする。According to another aspect of the present invention, there is provided an image processing apparatus that performs a decoding process on a symbol image read by a reading unit, and compares a width of a specific portion in the symbol image read by the reading unit with a predetermined reference value. Comparing means and changing means for changing an error tolerance at the time of decoding processing for the symbol image based on a comparison result by the comparing means.
請求項6は、読取手段で読み取られたシンボルイメージに対してデコード処理を行うイメージ処理装置であって、前記読取手段で読み取られた前記シンボルイメージ内の特定部分の幅を所定基準値と比較する比較手段と、前記比較手段による比較結果に基づいて、前記読取手段で読み取られたシンボルイメージに対するデコード結果の照合回数を変更する変更手段と、を具備したことを特徴とする。A sixth aspect of the present invention provides an image processing apparatus that performs a decoding process on a symbol image read by a reading unit, and compares a width of a specific portion in the symbol image read by the reading unit with a predetermined reference value. Comparing means and changing means for changing the number of times of collation of the decoding result with respect to the symbol image read by the reading means based on the comparison result by the comparing means.
請求項8は、読取手段で読み取られたシンボルイメージに対してデコード処理を行うイメージ処理装置であって、当該処理装置から前記シンボルイメージまでの読取距離を判別する判別手段と、前記判別手段による読取距離の結果に基づいて、前記シンボルイメージに対するデコード処理時での誤差許容度を変更する変更手段と、を具備したことを特徴とする。8. An image processing apparatus for performing a decoding process on a symbol image read by a reading means, a determination means for determining a reading distance from the processing apparatus to the symbol image, and reading by the determination means And changing means for changing an error tolerance at the time of decoding the symbol image based on the result of the distance.

本発明によれば、シンボルイメージに対するデコードの正確性を適切にできる

According to the present invention, decoding accuracy for a symbol image can be made appropriate.

Claims (4)

シンボルをスキャンしてイメージデータを取得するスキャナ部と、
前記スキャナ部から前記シンボルまでの読み取り距離が近距離か否かを判別する判別部と、
前記読み取り距離が近距離であると判別された場合に、前記イメージデータにおける前記シンボルのエレメント幅又は前記シンボルのバーコード幅を判定するための閾値に対するイメージデータの誤差の許容度を高くすること、あるいは、デコード結果の照合回数を少なくすることを設定し、前記読み取り距離が遠距離であると判別された場合に、前記閾値に対するイメージデータの誤差の許容度を低くすること、あるいは、前記照合回数を多くすることを設定し、前記設定に応じて前記イメージデータのデコードを行うデコード部と、
を備えるスキャナ装置。
A scanner unit that scans a symbol to obtain image data;
A determination unit for determining whether a reading distance from the scanner unit to the symbol is a short distance;
Increasing the tolerance of the error of the image data with respect to a threshold value for determining the element width of the symbol or the barcode width of the symbol in the image data when the reading distance is determined to be a short distance; Alternatively, it is set to decrease the number of times of collation of the decoding result, and when it is determined that the reading distance is a long distance, the tolerance of the error of the image data with respect to the threshold value is reduced, or the number of times of the collation And a decoding unit that decodes the image data according to the setting,
A scanner device comprising:
前記判別部は、前記イメージデータにおける前記シンボルの最小エレメント幅が基準値以上の場合に、前記読み取り距離が近距離であると判別し、前記イメージデータにおける前記シンボルの最小エレメント幅が基準値よりも小さい場合に、前記読み取り距離が遠距離であると判別する請求項1に記載のスキャナ装置。   The determination unit determines that the reading distance is a short distance when the minimum element width of the symbol in the image data is equal to or larger than a reference value, and the minimum element width of the symbol in the image data is smaller than a reference value. The scanner device according to claim 1, wherein when it is small, it is determined that the reading distance is a long distance. 前記スキャナ部から前記シンボルまでの読み取り距離を測定する測距部を備え、
前記判別部は、前記測距部により測定された読み取り距離が基準値以下の場合に、前記読み取り距離が近距離であると判別し、前記測定された読み取り距離が基準値よりも大きい場合に、前記読み取り距離が遠距離であると判別する請求項1に記載のスキャナ装置。
A distance measuring unit for measuring a reading distance from the scanner unit to the symbol;
The determining unit determines that the reading distance is a short distance when the reading distance measured by the distance measuring unit is equal to or less than a reference value, and when the measured reading distance is larger than a reference value, The scanner apparatus according to claim 1, wherein the reading distance is determined to be a long distance.
コンピュータを、
シンボルをスキャンしてイメージデータを取得するスキャナ部、
前記スキャナ部から前記シンボルまでの読み取り距離が近距離か否かを判別する判別部、
前記読み取り距離が近距離であると判別された場合に、前記イメージデータにおける前記シンボルのエレメント幅又は前記シンボルのバーコード幅を判定するための閾値に対するイメージデータの誤差の許容度を高くすること、あるいは、デコード結果の照合回数を少なくすることを設定し、前記読み取り距離が遠距離であると判別された場合に、前記閾値に対するイメージデータの誤差の許容度を低くすること、あるいは、前記照合回数を多くすることを設定し、前記設定に応じて前記イメージデータのデコードを行うデコード部、
として機能させるためのプログラム。
Computer
A scanner unit that scans the symbols and obtains image data,
A determination unit for determining whether or not a reading distance from the scanner unit to the symbol is a short distance;
Increasing the tolerance of the error of the image data with respect to a threshold value for determining the element width of the symbol or the barcode width of the symbol in the image data when the reading distance is determined to be a short distance; Alternatively, it is set to decrease the number of times of collation of the decoding result, and when it is determined that the reading distance is a long distance, the tolerance of the error of the image data with respect to the threshold value is reduced, or the number of times of the collation And a decoding unit that decodes the image data according to the setting,
Program to function as.
JP2013049837A 2013-03-13 2013-03-13 Image processing apparatus and program Active JP5532163B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013049837A JP5532163B2 (en) 2013-03-13 2013-03-13 Image processing apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013049837A JP5532163B2 (en) 2013-03-13 2013-03-13 Image processing apparatus and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2011069436A Division JP5223940B2 (en) 2011-03-28 2011-03-28 Scanner device and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2014079806A Division JP5768260B2 (en) 2014-04-09 2014-04-09 Image processing apparatus and symbol reading method

Publications (2)

Publication Number Publication Date
JP2013140619A true JP2013140619A (en) 2013-07-18
JP5532163B2 JP5532163B2 (en) 2014-06-25

Family

ID=49037932

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013049837A Active JP5532163B2 (en) 2013-03-13 2013-03-13 Image processing apparatus and program

Country Status (1)

Country Link
JP (1) JP5532163B2 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0612514A (en) * 1992-05-11 1994-01-21 Olympus Optical Co Ltd Method and device for decoding bar code
JPH06274674A (en) * 1993-03-19 1994-09-30 Fujitsu Ltd Method and device for reading bar code
JPH096885A (en) * 1995-06-16 1997-01-10 Nippondenso Co Ltd Bar code decoding system
JPH11232371A (en) * 1998-02-13 1999-08-27 Matsushita Electric Ind Co Ltd Bar code reader, bar code reading method and recording medium
JP2001147987A (en) * 1999-11-24 2001-05-29 Denso Corp Optical information reader
JP2003108915A (en) * 2001-09-28 2003-04-11 Sharp Corp Bar code recognition device
JP2006201921A (en) * 2005-01-19 2006-08-03 Nec Infrontia Corp Bar code reader

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0612514A (en) * 1992-05-11 1994-01-21 Olympus Optical Co Ltd Method and device for decoding bar code
JPH06274674A (en) * 1993-03-19 1994-09-30 Fujitsu Ltd Method and device for reading bar code
JPH096885A (en) * 1995-06-16 1997-01-10 Nippondenso Co Ltd Bar code decoding system
JPH11232371A (en) * 1998-02-13 1999-08-27 Matsushita Electric Ind Co Ltd Bar code reader, bar code reading method and recording medium
JP2001147987A (en) * 1999-11-24 2001-05-29 Denso Corp Optical information reader
JP2003108915A (en) * 2001-09-28 2003-04-11 Sharp Corp Bar code recognition device
JP2006201921A (en) * 2005-01-19 2006-08-03 Nec Infrontia Corp Bar code reader

Also Published As

Publication number Publication date
JP5532163B2 (en) 2014-06-25

Similar Documents

Publication Publication Date Title
US9626544B2 (en) Removable module for mobile communication terminal
JP5223940B2 (en) Scanner device and program
US5241164A (en) Method of decoding bar code symbols from partial scans
US5278398A (en) Decoding bar code symbols by determining the best alignment of partial scans
US6722565B2 (en) Data code label, a method of decoding data codes, and an optical data code decoding system
US9842232B2 (en) Wireless tag communication device and wireless tag communication program
US9619683B2 (en) Portable RFID reading terminal with visual indication of scan trace
US10509933B2 (en) Method and apparatus for optically reading out information stored in a barcode
US20140212056A1 (en) Composite Label with History Feature
JP5768260B2 (en) Image processing apparatus and symbol reading method
JP5959415B2 (en) Wireless tag communication device, wireless tag communication system, and wireless tag search program
JP5532163B2 (en) Image processing apparatus and program
KR20010006507A (en) Robust machine-readable symbology and method and apparatus for printing and reading same
US8746567B2 (en) Barcode reader and computer program product
EP3832523B1 (en) Encoded information reading terminal including multiple encoded information reading devices
US20170046547A1 (en) Validating a decoded barcode as an expected barcode
JP4591216B2 (en) Information code reading system, information code reading device, and label
JP5673208B2 (en) Mobile terminal and program
US9530039B2 (en) Identifier eligibility
US20080000975A1 (en) Audible pattern switching indicator
US20080000980A1 (en) Audible scan indicator
JP2005284800A (en) Portable optical information reading device

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130426

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130426

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131224

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140212

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140407

R150 Certificate of patent (=grant) or registration of utility model

Ref document number: 5532163

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150