JP2012048441A - Scanner device and program - Google Patents

Scanner device and program Download PDF

Info

Publication number
JP2012048441A
JP2012048441A JP2010189126A JP2010189126A JP2012048441A JP 2012048441 A JP2012048441 A JP 2012048441A JP 2010189126 A JP2010189126 A JP 2010189126A JP 2010189126 A JP2010189126 A JP 2010189126A JP 2012048441 A JP2012048441 A JP 2012048441A
Authority
JP
Japan
Prior art keywords
image
focal position
symbol
imaging
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.)
Pending
Application number
JP2010189126A
Other languages
Japanese (ja)
Inventor
Yasuaki Ogawa
泰明 小川
Shinji Dazai
慎治 太宰
Keiichi Tanioka
恵一 谷岡
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 JP2010189126A priority Critical patent/JP2012048441A/en
Publication of JP2012048441A publication Critical patent/JP2012048441A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To focus on a symbol and increase a response speed for a subsequent symbol reading.SOLUTION: A scanner device 1 comprises: a liquid lens 212; an imaging element 211 for imaging a subject via the liquid lens 212; a flash memory 17 for storing an imaging area in a frame image corresponding to a focus position; an imager controller 19 for variably controlling a focus position of the liquid lens 212; and a CPU 11 for detecting a focus position of a symbol of the subject to move the focus position of the liquid lens 212 by the imager controller 19 to the detected focus position, reading out an imaging area corresponding to the detected focus position from the flash memory 17 to take in an image of the read-out imaging area from the imaging element 211, and decoding a symbol image included in the taken-in image of the imaging area.

Description

本発明は、シンボルを読み取るスキャナ装置及びプログラムに関する。   The present invention relates to a scanner device and a program for reading a symbol.

従来、一次元バーコード及び二次元コード等のシンボルをスキャンするスキャナ装置が知られている。このスキャナ装置には、シンボルを撮像し、その撮像した画像をデコード(解読)してシンボルを読み取る二次元のイメージャデバイスが用いられている。   Conventionally, scanner devices that scan symbols such as one-dimensional barcodes and two-dimensional codes are known. The scanner device uses a two-dimensional imager device that captures a symbol, decodes the captured image, and reads the symbol.

また、シンボルの読み取り時間の短縮を図ったイメージャデバイスのスキャナ装置が知られている。具体的には、全体領域の画像を取り込み、その全体領域の画像からシンボルの存在や外形を確認し、確認されたシンボルを含むと推定される部分領域の画像を再度取り込みデコードするスキャナ装置である(例えば、特許文献1参照)。   There is also known an imager device scanner device that shortens the symbol reading time. Specifically, it is a scanner device that captures an image of the entire area, checks the presence and outline of the symbol from the image of the entire area, and re-acquires and decodes the image of the partial area estimated to contain the confirmed symbol. (For example, refer to Patent Document 1).

特開2005−38374号公報JP 2005-38374 A

しかし、上記従来のスキャナ装置は、画像取り込みを複数回行わねばならず、画像取り込み及びデコードにかかる時間が長かった。このため、ユーザによるシンボル読み取り操作がなされてからデコードが完了するまでの応答時間が長く(読み取り応答速度が低く)、スキャナ装置の操作性が低下していた。   However, the above-described conventional scanner device has to perform image capture a plurality of times, and it takes a long time to capture and decode the image. For this reason, the response time from the user's symbol reading operation to the completion of decoding is long (the reading response speed is low), and the operability of the scanner device is lowered.

さらに、上記従来のスキャナ装置にオートフォーカスを適用すると、読み取り対象のシンボルに焦点が合うまではシンボルの存在や外形の確認ができず、読み取り応答速度がさらに遅くなり、スキャナ装置の操作性がさらに低下していた。   Furthermore, when autofocus is applied to the above conventional scanner device, the presence or outline of the symbol cannot be confirmed until the symbol to be read is focused, the reading response speed is further reduced, and the operability of the scanner device is further improved. It was falling.

本発明の課題は、シンボルに焦点を合わせるとともに、その後のシンボルの読み取り応答速度を高めることである。   It is an object of the present invention to focus on a symbol and increase the reading response speed of subsequent symbols.

上記課題を解決するために、請求項1に記載の発明のスキャナ装置は、
可変焦点レンズと、
焦点位置に応じたフレーム画像中の撮像領域を記憶する記憶部と、
可変焦点レンズの焦点位置を駆動制御する駆動部と、
被写体のシンボルの焦点位置を検出する検出部と、
前記駆動部により前記可変焦点レンズの焦点位置を前記検出された焦点位置に移動させ、前記検出された焦点位置に対応した撮像領域を前記記憶部から読み出し、当該読み出した撮像領域の画像を取り込む撮像制御部と、
前記取り込まれた撮像領域の画像に含まれるシンボル画像をデコードするデコード部と、を備える。
In order to solve the above problems, a scanner device according to claim 1 is provided.
A variable focus lens,
A storage unit for storing an imaging region in the frame image according to the focal position;
A drive unit that drives and controls the focal position of the variable focus lens;
A detection unit for detecting the focal position of the symbol of the subject;
Imaging in which the driving unit moves the focal position of the variable focus lens to the detected focal position, reads an imaging area corresponding to the detected focal position from the storage unit, and captures an image of the read imaging area A control unit;
A decoding unit that decodes a symbol image included in the captured image of the imaging region.

請求項2に記載の発明は、請求項1記載のスキャナ装置において、
前記記憶部は、シンボルの種類及び焦点位置に応じた撮像領域を記憶し、
前記撮像制御部は、前記被写体のシンボルの種類及び前記検出された焦点位置に対応した撮像領域を前記記憶部から読み出す。
The invention according to claim 2 is the scanner apparatus according to claim 1,
The storage unit stores an imaging region corresponding to a symbol type and a focal position,
The imaging control unit reads an imaging area corresponding to the type of the symbol of the subject and the detected focal position from the storage unit.

請求項3に記載の発明は、請求項1又は2記載のスキャナ装置において、
前記記憶部は、焦点位置が遠くなるほど小さくなる撮像領域を記憶する。
The invention according to claim 3 is the scanner apparatus according to claim 1 or 2,
The storage unit stores an imaging region that becomes smaller as the focal position is further away.

請求項4に記載の発明は、請求項3記載のスキャナ装置において、
前記撮像領域は、焦点位置が遠くなるほど小さくなるシンボルの大きさのシンボル領域と、当該シンボル領域の周囲のマージンと、からなり、
マージンの値の入力を受け付ける操作部を備え、
前記撮像制御部は、前記記憶部から読み出した撮像領域のマージンとして、前記操作部より入力されたマージンの値を設定して撮像領域の画像を取り込む。
According to a fourth aspect of the present invention, in the scanner device according to the third aspect,
The imaging area is composed of a symbol area having a symbol size that becomes smaller as the focal position becomes farther, and a margin around the symbol area,
It has an operation unit that accepts input of margin values,
The imaging control unit captures an image of the imaging area by setting a margin value input from the operation unit as a margin of the imaging area read from the storage unit.

請求項5に記載の発明は、請求項1から4のいずれか一項に記載のスキャナ装置において、
スポット光を照射するスポット光照射部を備え、
前記撮像制御部は、前記スポット光の映像を含む画像を撮像し、
前記検出部は、前記撮像制御部により撮像された画像中のスポット光の映像の位置から、前記被写体の焦点位置を検出する。
According to a fifth aspect of the present invention, in the scanner device according to any one of the first to fourth aspects,
Provided with a spot light irradiation unit that irradiates spot light,
The imaging control unit captures an image including an image of the spot light,
The detection unit detects a focal position of the subject from a position of a spot light image in an image captured by the imaging control unit.

請求項6に記載の発明は、請求項5に記載のスキャナ装置において、
前記撮像制御部は、前記検出部が焦点位置を検出した後に、前記スポット光照射部を消灯し、前記検出された焦点位置に対応した撮像領域の画像を取り込む。
A sixth aspect of the present invention is the scanner device according to the fifth aspect,
The imaging control unit turns off the spot light irradiation unit after the detection unit detects a focal position, and captures an image of an imaging region corresponding to the detected focal position.

請求項7に記載の発明は、請求項1から4のいずれか一項に記載のスキャナ装置において、
前記検出部は、前記撮像制御部からフレーム画像の一部の特定領域の画像を取り込み、この特定領域の画像が所定値以上のコントラストになった焦点位置を、被写体までの焦点位置として検出する。
The invention described in claim 7 is the scanner device according to any one of claims 1 to 4,
The detection unit captures an image of a specific region of a part of the frame image from the imaging control unit, and detects a focal position where the image of the specific region has a contrast of a predetermined value or more as a focal position to the subject.

請求項8に記載の発明のプログラムは、
コンピュータを、
焦点位置に応じたフレーム画像中の撮像領域を記憶する記憶部、
可変焦点レンズの焦点位置を駆動制御する駆動部、
被写体のシンボルの焦点位置を検出する検出部、
前記駆動部により前記可変焦点レンズの焦点位置を前記検出された焦点位置に移動させ、前記検出された焦点位置に対応した撮像領域を前記記憶部から読み出し、当該読み出した撮像領域の画像を取り込む撮像制御部、
前記取り込まれた撮像領域の画像に含まれるシンボル画像をデコードするデコード部、
として機能させる。
The program of the invention described in claim 8 is:
Computer
A storage unit for storing an imaging region in a frame image according to a focal position;
A drive unit that drives and controls the focal position of the variable focus lens;
A detection unit for detecting the focal position of the symbol of the subject;
Imaging in which the driving unit moves the focal position of the variable focus lens to the detected focal position, reads an imaging area corresponding to the detected focal position from the storage unit, and captures an image of the read imaging area Control unit,
A decoding unit for decoding a symbol image included in the captured image of the imaging region;
To function as.

本発明によれば、シンボルに焦点を合わせるとともに、その後のシンボルの読み取り応答速度を高めることができ、スキャナ装置の操作性を向上できる。   According to the present invention, it is possible to focus on a symbol, increase the response speed for reading a subsequent symbol, and improve the operability of the scanner device.

本発明の実施の形態のスキャナ装置の正面図である。It is a front view of the scanner apparatus of embodiment of this invention. スキャナ装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of a scanner apparatus. イメージャモジュールの平面図である。It is a top view of an imager module. 液体レンズの焦点変化を示す図である。It is a figure which shows the focus change of a liquid lens. 近い第1の焦点位置及び遠い第2の焦点位置に置かれたシンボルのスキャンの様子を示す図である。It is a figure which shows the mode of the scan of the symbol placed in the near 1st focus position and the distant 2nd focus position. (a)は、第1の焦点位置のシンボルを撮像したフレーム画像を示す図である。(b)は、第2の焦点位置のシンボルを撮像したフレーム画像を示す図である。(A) is a figure which shows the frame image which imaged the symbol of the 1st focus position. (B) is a figure which shows the frame image which imaged the symbol of the 2nd focus position. フレーム画像と、エイマーのレーザ光の映像を含む切り出し領域と、を示す図である。It is a figure which shows a frame image and the cut-out area | region containing the image | video of the aimer's laser beam. 時間経過に応じた切り出し領域画像を示す図である。It is a figure which shows the cut-out area | region image according to time passage. 第1の焦点位置にある二次元コードのシンボルを撮像したフレーム画像を示す図である。It is a figure which shows the frame image which imaged the symbol of the two-dimensional code in a 1st focus position. 第2の焦点位置にある二次元コードのシンボルを撮像したフレーム画像を示す図である。It is a figure which shows the frame image which imaged the symbol of the two-dimensional code in a 2nd focus position. 第1の焦点位置にある一次元バーコードのシンボルを撮像したフレーム画像を示す図である。It is a figure which shows the frame image which imaged the symbol of the one-dimensional barcode in a 1st focus position. 実施の形態の印加電圧テーブルの構成を示す図である。It is a figure which shows the structure of the applied voltage table of embodiment. 撮像領域テーブルの構成を示す図である。It is a figure which shows the structure of an imaging area table. 第1のシンボル読み取り処理を示すフローチャートである。It is a flowchart which shows a 1st symbol reading process. スキャン制御処理を示すフローチャートである。It is a flowchart which shows a scan control process. フレーム画像と、中心領域と、エイマーのレーザ光の映像と、を示す図である。It is a figure which shows a frame image, a center area | region, and the image | video of the aimer's laser beam. 変形例の印加電圧テーブルの構成を示す図である。It is a figure which shows the structure of the applied voltage table of a modification. 第2のシンボル読み取り処理を示すフローチャートである。It is a flowchart which shows a 2nd symbol reading process. 第2のシンボル読み取り処理の印加電圧変更処理を示すフローチャートである。It is a flowchart which shows the applied voltage change process of a 2nd symbol reading process.

以下、添付図面を参照して本発明に係る実施の形態及び変形例を順に詳細に説明する。なお、本発明は、図示例に限定されるものではない。   DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments and modifications according to 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〜図15を参照して、本発明に係る実施の形態を説明する。先ず、図1〜図4を参照して、本実施の形態の装置構成を説明する。図1に、本実施の形態のスキャナ装置1の正面の外観構成を示す。図2に、スキャナ装置1の機能構成を示す。図3に、イメージャモジュール21の平面構成を示す。図4に、液体レンズ212の焦点変化を示す。   Embodiments according to the present invention will be described with reference to FIGS. First, with reference to FIGS. 1-4, the apparatus structure of this Embodiment is demonstrated. FIG. 1 shows an external configuration of the front of the scanner device 1 according to the present embodiment. FIG. 2 shows a functional configuration of the scanner device 1. FIG. 3 shows a planar configuration of the imager module 21. FIG. 4 shows the change in focus of the liquid lens 212.

本実施の形態のスキャナ装置1は、情報の入力受付け、情報の記憶、情報の送受信、及び一次元バーコード、二次元コード等のシンボル読み取りなどの機能を有する携帯機器である。   The scanner device 1 according to the present embodiment is a portable device having functions such as information input reception, information storage, information transmission / reception, and symbol reading such as a one-dimensional barcode and a two-dimensional code.

図1に示すように、スキャナ装置1は、筐体としてのケース2を備える。スキャナ装置1は、ケース2の正面に、トリガキー12Aと、各種キー12Bと、表示部14と、スピーカ18Aと、を備える。スキャナ装置1は、ケース2の側面に、トリガキー12Cを備える。また、スキャナ装置1は、ケース2の先端に、イメージャモジュール21を備える。スピーカ18Aは、バーコード読み取りのデコード成功時のブザー音等を出力する。   As shown in FIG. 1, the scanner device 1 includes a case 2 as a housing. The scanner device 1 includes a trigger key 12A, various keys 12B, a display unit 14, and a speaker 18A on the front surface of the case 2. The scanner device 1 includes a trigger key 12 </ b> C on the side surface of the case 2. The scanner device 1 also includes an imager module 21 at the tip of the case 2. The speaker 18A outputs a buzzer sound or the like at the time of successful decoding of barcode reading.

トリガキー12A,12Cは、イメージャモジュール21によるスキャン開始の入力を受け付けるトリガキーである。各種キー12Bは、数字、文字等の入力キー、機能キー等からなり、各種情報の入力を受け付ける。表示部14は、イメージャモジュール21を用いたシンボル読み取り時のスルー画面、デコード結果等の表示情報を表示する。   The trigger keys 12 </ b> A and 12 </ b> C are trigger keys that receive a scan start input from the imager module 21. The various keys 12B include input keys such as numbers and characters, function keys, and the like, and accept input of various information. The display unit 14 displays display information such as a through screen at the time of symbol reading using the imager module 21 and a decoding result.

次いで、図2を参照して、スキャナ装置1の内部の機能構成を説明する。図2に示すように、スキャナ装置1は、検出部、撮像制御部、デコード部としてのCPU(central Processing Unit)11と、操作部12と、RAM(Random Access Memory)13と、表示部14と、ROM(Read Only Memory)15と、通信部16と、記憶部としてのフラッシュメモリ17と、音出力部18と、駆動部としてのイメージャコントローラ19と、電圧昇圧部20と、イメージャモジュール21と、電源部22と、を備える。   Next, an internal functional configuration of the scanner device 1 will be described with reference to FIG. As shown in FIG. 2, the scanner device 1 includes a CPU (central processing unit) 11, an operation unit 12, a RAM (Random Access Memory) 13, and a display unit 14 as a detection unit, an imaging control unit, and a decoding unit. A ROM (Read Only Memory) 15, a communication unit 16, a flash memory 17 as a storage unit, a sound output unit 18, an imager controller 19 as a driving unit, a voltage boosting unit 20, an imager module 21, And a power supply unit 22.

スキャナ装置1のイメージャモジュール21及び電源部22を除く各部は、バス23を介して接続されている。イメージャモジュール21は、撮像素子211と、可変焦点レンズとしての液体レンズ212と、スポット光照射部としてのエイマー213と、イルミネーション214と、を有する。   Each unit of the scanner device 1 except for the imager module 21 and the power supply unit 22 is connected via a bus 23. The imager module 21 includes an imaging element 211, a liquid lens 212 as a variable focus lens, an aimer 213 as a spot light irradiation unit, and an illumination 214.

CPU11は、スキャナ装置1の各部を制御する。CPU11は、ROM15からプログラムを読み出してRAM13に展開し、RAM13に展開されたプログラムとの協働で各種処理を実行する。具体的には、CPU11(コンピュータ)は、後述する処理フローで示すプログラムを実行する。   The CPU 11 controls each part of the scanner device 1. The CPU 11 reads a program from the ROM 15 and develops it in the RAM 13, and executes various processes in cooperation with the program developed in the RAM 13. Specifically, the CPU 11 (computer) executes a program shown in a processing flow described later.

CPU11は、第1のシンボル読み取りプログラム151に従って、切り出し領域のエイマー213のレーザ光の映像の位置に応じたシンボルの焦点位置をフラッシュメモリ17に記憶された印加電圧テーブルから読み出す。そして、CPU11は、液体レンズ212の焦点位置を前記読み出した焦点位置に調整し、前記読み出した焦点位置に対応したフレーム画像内の撮像領域をフラッシュメモリ17に記憶された撮像領域テーブルから読み出し、当該読み出した撮像領域の画像を撮像素子211から取り込み、当該取り込まれた撮像領域の画像に含まれるシンボル画像をデコードする。   The CPU 11 reads the focal position of the symbol corresponding to the position of the image of the laser beam of the aimer 213 in the cutout area from the applied voltage table stored in the flash memory 17 in accordance with the first symbol reading program 151. Then, the CPU 11 adjusts the focal position of the liquid lens 212 to the read focal position, reads the imaging area in the frame image corresponding to the read focal position from the imaging area table stored in the flash memory 17, The read image of the imaging area is captured from the image sensor 211, and the symbol image included in the captured image of the imaging area is decoded.

また、CPU11は、撮像素子211からイメージャコントローラ19に入力された画像のラインデータを、RAM13にDMA(Direct Memory Access)転送し記憶させるDMA転送機能を有する。なお、DMA転送機能は、イメージャコントローラ19が有する構成としてもよい。   In addition, the CPU 11 has a DMA transfer function for transferring line data of an image input from the image sensor 211 to the imager controller 19 and storing it in the RAM 13 by DMA (Direct Memory Access). Note that the DMA transfer function may be included in the imager controller 19.

操作部12は、各種キー12B、トリガキー12A,12C等のキー群を有し、当該キー群の各キーへの押下入力を受け付け、その操作情報をCPU11に出力する。   The operation unit 12 includes a key group such as various keys 12B and trigger keys 12A and 12C, receives a pressing input to each key of the key group, and outputs the operation information to the CPU 11.

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 an LCD (Liquid Crystal Display), an EL (electroluminescent) display, and the like, and displays various types of information according to display information input from the CPU 11.

ROM15は、読み出し専用の半導体メモリである。ROM15には、第1のシンボル読み取りプログラム151が記憶されている。   The ROM 15 is a read-only semiconductor memory. The ROM 15 stores a first symbol reading program 151.

通信部16は、通信アンテナ、信号処理部、変調部、復調部等を備え、アクセスポイントと無線通信する。アクセスポイントは、通信を中継する機器である。つまり、スキャナ装置1は、通信部16により、アクセスポイントを介して、当該アクセスポイントに接続されたサーバ装置等の外部機器と通信する。通信部16は、送信情報の信号を信号処理部で処理し、変調部で変調して通信アンテナから電波としてアクセスポイントに送信情報を無線送信する。また、通信部16は、通信アンテナによりアクセスポイントから送信された電波を受信して復調部で復調し、その信号を信号処理部で信号処理して受信情報を取得する。   The communication unit 16 includes a communication antenna, a signal processing unit, a modulation unit, a demodulation unit, and the like, and performs wireless communication with an access point. An access point is a device that relays communication. That is, the scanner device 1 communicates with an external device such as a server device connected to the access point via the access point by the communication unit 16. The communication unit 16 processes a signal of transmission information with a signal processing unit, modulates the signal with a modulation unit, and wirelessly transmits the transmission information as a radio wave from the communication antenna to the access point. In addition, the communication unit 16 receives radio waves transmitted from the access point through the communication antenna, demodulates them by the demodulation unit, and performs signal processing on the signals by the signal processing unit to obtain reception information.

また、通信部16は、携帯電話通信方式により、基地局を介してサーバ装置と無線通信する無線通信部としてもよい。また、通信部16は、スキャナ装置1を載置するクレードル、又は通信ケーブルを介して、サーバ装置と有線通信する有線通信部としてもよい。   Moreover, the communication part 16 is good also as a radio | wireless communication part which carries out radio | wireless communication with a server apparatus via a base station by a mobile telephone communication system. The communication unit 16 may be a cradle on which the scanner device 1 is placed, or a wired communication unit that performs wired communication with the server device via a communication cable.

フラッシュメモリ17は、各種データを読み出し及び書き込み可能な不揮発性の半導体メモリである。   The flash memory 17 is a nonvolatile semiconductor memory that can read and write various data.

音出力部18は、音源部、アンプ、スピーカ18Aを備え、デコード成功時のブザー音を出力する。音出力部18は、CPU11から入力されたブザー音出力の指示に応じて、音源部でブザー音の信号を生成し、アンプで増幅して、スピーカ18Aから音出力する。   The sound output unit 18 includes a sound source unit, an amplifier, and a speaker 18A, and outputs a buzzer sound when decoding is successful. In response to a buzzer sound output instruction input from the CPU 11, the sound output unit 18 generates a buzzer sound signal in the sound source unit, amplifies it with an amplifier, and outputs the sound from the speaker 18A.

イメージャコントローラ19は、イメージャモジュール21及び電圧昇圧部20の制御部である。イメージャコントローラ19は、ASIC(Application Specific Integrated Circuit)等の半導体回路により構成されている。   The imager controller 19 is a control unit for the imager module 21 and the voltage booster 20. The imager controller 19 is configured by a semiconductor circuit such as an ASIC (Application Specific Integrated Circuit).

イメージャコントローラ19は、撮像素子211から、キャプチャされた画像データの1フレームの出力タイミングに同期したフレーム同期信号と、画像データの1ラインの出力タイミングに同期したライン同期信号と、画像データに同期するためのクロック信号と、が入力される。イメージャコントローラ19は、これらフレーム同期信号、ライン同期信号及びクロック信号に基づいて、RAM13への画像データの転送タイミングを監視する。そして、イメージャコントローラ19は、監視状況に応じて液体レンズ212駆動用の電圧昇圧部20の昇圧レベルをPWM(Pulse Width Modulation)信号でコントロールすることにより液体レンズ212の焦点をリアルタイムに変化させる。   The imager controller 19 synchronizes with the image data from the image sensor 211, the frame synchronization signal synchronized with the output timing of one frame of the captured image data, the line synchronization signal synchronized with the output timing of one line of the image data, and the image data. And a clock signal for input. The imager controller 19 monitors the transfer timing of the image data to the RAM 13 based on the frame synchronization signal, line synchronization signal, and clock signal. Then, the imager controller 19 changes the focus of the liquid lens 212 in real time by controlling the boost level of the voltage booster 20 for driving the liquid lens 212 with a PWM (Pulse Width Modulation) signal according to the monitoring situation.

また、イメージャコントローラ19は、入力される画像データの画像領域(キャプチャ(撮像)する画像領域)を指定する画像領域指定信号を生成して撮像素子211に出力する。   In addition, the imager controller 19 generates an image area designation signal that designates an image area (image area to be captured (captured)) of input image data, and outputs the image area designation signal to the image sensor 211.

電圧昇圧部20は、イメージャコントローラ19から入力されたPWM信号に応じて、液体レンズ212に電圧を印加する。   The voltage booster 20 applies a voltage to the liquid lens 212 in accordance with the PWM signal input from the imager controller 19.

イメージャモジュール21は、焦点を調整してバーコードを撮像するモジュールである。撮像素子211は、CMOS(Complementary Metal Oxide Semiconductor Image Sensor:相補性金属酸化膜半導体)イメージセンサであり、画像領域を指定して撮像し画像データを出力することが可能な撮像素子である。撮像素子211は、液体レンズ212を含む光学系を介して入射された被写体像を光電変換して被写体の画像データの電気信号に変換する。   The imager module 21 is a module that adjusts the focal point and images a barcode. The imaging device 211 is a CMOS (Complementary Metal Oxide Semiconductor Image Sensor) image sensor, and is an imaging device capable of designating an image area and outputting image data. The image sensor 211 photoelectrically converts a subject image incident via an optical system including the liquid lens 212 and converts the subject image data into an electrical signal of subject image data.

撮像素子211は、イメージャコントローラ19から入力された画像領域指定信号により指定されたラインの画像データを1ラインずつラインデータとしてイメージャコントローラ19に出力する。また、撮像素子211は、フレーム同期信号と、ライン同期信号と、クロック信号と、をイメージャコントローラ19に出力する。液体レンズ212は、イメージャモジュール21の光学系の一部を構成する光学素子であり、印加電圧に応じて高速で焦点位置を変更可能な可変焦点レンズである。液体レンズ212については、詳細に後述する。   The image sensor 211 outputs the image data of the line designated by the image area designation signal input from the imager controller 19 to the imager controller 19 as line data line by line. Further, the image sensor 211 outputs a frame synchronization signal, a line synchronization signal, and a clock signal to the imager controller 19. The liquid lens 212 is an optical element that constitutes a part of the optical system of the imager module 21, and is a variable focus lens that can change a focal position at high speed according to an applied voltage. The liquid lens 212 will be described later in detail.

エイマー213は、LD(LASER Diode)等の光源により構成され、被写体にイメージャモジュール21の撮像方向を向けるための基準となるスポット光(目標光)としてのレーザ光を出射する。イルミネーション214は、LED(Light Emitting Diode)等の光源により構成され、被写体及びその周囲の領域を明るくするための照射光(イルミネーション光とする)を出射する。   The aimer 213 includes a light source such as an LD (LASER Diode), and emits laser light as spot light (target light) that serves as a reference for directing the imaging direction of the imager module 21 to a subject. The illumination 214 includes a light source such as an LED (Light Emitting Diode), and emits irradiation light (referred to as illumination light) for brightening the subject and the surrounding area.

電源部22は、二次電池等で構成され、スキャナ装置1の各部に電力供給を行う。   The power supply unit 22 is composed of a secondary battery or the like, and supplies power to each unit of the scanner device 1.

次いで、図3を参照して、イメージャモジュール21の各部の配置を詳細に説明する。   Next, the arrangement of each part of the imager module 21 will be described in detail with reference to FIG.

図3に示すように、イメージャモジュール21において、液体レンズ212を含む光学系212Aの光軸に対応する位置に撮像素子211が配置されている。また、液体レンズ212を含む光学系212Aの横に、エイマー213及びイルミネーション214が配置されている。エイマー213のレーザ光がイメージャモジュール21(光学系及び撮像素子211)の画角内に含まれるように、エイマー213が配置されている。また、イルミネーション214の扇状に広がる光がイメージャモジュール21(光学系及び撮像素子211)の画角を含むように、イルミネーション214が配置されている。   As shown in FIG. 3, in the imager module 21, the image sensor 211 is disposed at a position corresponding to the optical axis of the optical system 212 </ b> A including the liquid lens 212. Further, an aimer 213 and an illumination 214 are arranged beside the optical system 212A including the liquid lens 212. The aimer 213 is arranged so that the laser beam of the aimer 213 is included within the angle of view of the imager module 21 (the optical system and the image sensor 211). The illumination 214 is arranged so that the fan-shaped light of the illumination 214 includes the angle of view of the imager module 21 (optical system and image sensor 211).

エイマー213は、光学系212Aの光軸に平行な方向にレーザ光が照射されるように実装されている。このため、扇状に広がるイメージャモジュール21の画角に対するエイマー213のレーザ光の位置が距離によって異なる。   The aimer 213 is mounted so that laser light is irradiated in a direction parallel to the optical axis of the optical system 212A. For this reason, the position of the laser beam of the aimer 213 with respect to the angle of view of the imager module 21 spreading like a fan varies depending on the distance.

次いで、図4を参照して、液体レンズ212を詳細に説明する。図4に、印加電圧の変化による液体レンズ212の焦点変化を示す。   Next, the liquid lens 212 will be described in detail with reference to FIG. FIG. 4 shows a change in focus of the liquid lens 212 due to a change in applied voltage.

図4に示すように、液体レンズ212は、液体部2121,2122と、容器2123と、電極2124と、を有する。液体部2121,2122は、互いに屈折率が異なり比重が同じ水溶液及び油である。容器2123は、液体部2121,2122を密閉した容器である。電極2124は、電圧を印加するために液体部2121,2122の周囲に設けられている電極である。   As shown in FIG. 4, the liquid lens 212 includes liquid portions 2121 and 2122, a container 2123, and an electrode 2124. The liquid parts 2121 and 2122 are an aqueous solution and oil having different refractive indexes and the same specific gravity. The container 2123 is a container in which the liquid parts 2121 and 2122 are sealed. The electrode 2124 is an electrode provided around the liquid parts 2121 and 2122 in order to apply a voltage.

液体部2121側の電極2124と、液体部2122側の電極2124との間に、電源30が接続されている構成を考える。電源30により、液体部2121側の電極2124と、液体部2122側の電極2124との間に電圧を印加し、液体部2121,2122の中央部分の界面がレンズのように湾曲することでレンズ機能を実現する。また、電源30の印加電圧を高くすることで、液体部2121,2122の中央部分の界面の湾曲が大きくなる。界面の湾曲が小さい場合に、液体レンズ212の焦点が遠方の距離の位置に合う。界面の湾曲が大きくなると、液体レンズ212の焦点も近接の距離の位置に合う。   Consider a configuration in which the power supply 30 is connected between an electrode 2124 on the liquid part 2121 side and an electrode 2124 on the liquid part 2122 side. A voltage is applied between the electrode 2124 on the liquid part 2121 side and the electrode 2124 on the liquid part 2122 side by the power supply 30, and the interface at the center part of the liquid parts 2121, 2122 is curved like a lens to provide a lens function. To realize. Further, by increasing the applied voltage of the power source 30, the curvature of the interface at the central portion of the liquid parts 2121 and 2122 becomes larger. When the curvature of the interface is small, the focus of the liquid lens 212 is adjusted to a position at a far distance. When the curvature of the interface increases, the focus of the liquid lens 212 matches the position of a close distance.

また、液体レンズ212にかかる電圧の大きさに応じてレンズ曲率が変化するため、従来の機械的なオートフォーカス機構のようなレンズの物理的な移動が発生しないまま、電気的に高速に液体レンズ212のレンズ曲率を変化することができる。このように、印加電圧の調整によるレンズ曲率変化により、液体レンズ212の焦点調整を行うことができる。そのため、従来の機械的なオートフォーカス機構と比べ、焦点変更にかかる時間が短くなるという利点がある。このように、液体レンズ212の特長として、印加する電圧レベルに応じてレンズ曲率が変化できることと、物理的な可動部がないため耐久性が高いことと、印加電圧レベルは高電圧だが電流が流れないため消費電力が少ないことと、が挙げられる。   Further, since the lens curvature changes according to the voltage applied to the liquid lens 212, the liquid lens can be electrically moved at high speed without causing physical movement of the lens as in the conventional mechanical autofocus mechanism. The lens curvature of 212 can be changed. Thus, the focus adjustment of the liquid lens 212 can be performed by the lens curvature change by adjusting the applied voltage. Therefore, there is an advantage that the time required for changing the focus is shortened as compared with the conventional mechanical autofocus mechanism. As described above, the liquid lens 212 is characterized by the fact that the lens curvature can be changed according to the applied voltage level, the durability is high because there is no physical moving part, and the applied voltage level is high but the current flows. Because there is no power consumption, it can be mentioned.

次いで、図5及び図6を参照して、撮像素子211により撮像されたフレーム画像内のエイマー213のレーザ光の映像の位置と、イメージャモジュール21から被写体までの距離と、の関係を説明する。図5に、近い焦点位置D1及び遠い焦点位置D2に置かれたシンボル41のスキャンの様子を示す。図6(a)に、焦点位置D1のシンボル41を撮像したフレーム画像q1を示す。図6(b)に、焦点位置D2のシンボル41を撮像したフレーム画像q2を示す。   Next, the relationship between the position of the image of the laser beam of the aimer 213 in the frame image captured by the image sensor 211 and the distance from the imager module 21 to the subject will be described with reference to FIGS. FIG. 5 shows how the symbols 41 are scanned at the near focal position D1 and the far focal position D2. FIG. 6A shows a frame image q1 obtained by imaging the symbol 41 at the focal position D1. FIG. 6B shows a frame image q2 obtained by imaging the symbol 41 at the focal position D2.

図5に示すように、スキャナ装置1(イメージャモジュール21)からの焦点距離が近距離である焦点位置D1と、焦点距離が遠距離である焦点位置D2とに、一次元バーコードのシンボル41が置かれているものとする。一例として、この焦点位置D1及び焦点位置D2に置かれたシンボル41に対して、スキャナ装置1により画像キャプチャ(撮像)を行うケースを説明する。但し、シンボル41は、ダンボール等に貼られており、スキャナ装置1から見て、シンボル41の周りに白い領域があるものとする。   As shown in FIG. 5, a one-dimensional barcode symbol 41 is present at a focal position D1 having a short focal distance from the scanner device 1 (imager module 21) and a focal position D2 having a long focal distance. It shall be placed. As an example, a case will be described in which the scanner device 1 captures an image with respect to the symbol 41 placed at the focal position D1 and the focal position D2. However, the symbol 41 is affixed to a cardboard or the like, and it is assumed that there is a white area around the symbol 41 when viewed from the scanner device 1.

スキャナ装置1によりシンボル41を近接位置から読み取る場合、撮像素子211の画角に対してシンボル画像の相対サイズが大きくなるため、フレーム画像中でシンボル画像が大きく撮像される。図6(a)に示すように、シンボル41を近距離の焦点位置D1に置いた場合のフレーム画像q1は、シンボル画像Q1と、エイマー213のレーザ光の映像E1と、を含む。映像E1がシンボル画像Q1の端に位置しており、読み取りターゲットのシンボル41が近くにあることを示す。   When the symbol 41 is read from the proximity position by the scanner device 1, the relative size of the symbol image increases with respect to the angle of view of the image sensor 211, so that a large symbol image is captured in the frame image. As shown in FIG. 6A, the frame image q1 when the symbol 41 is placed at the focal position D1 at a short distance includes the symbol image Q1 and the image E1 of the laser light from the aimer 213. The image E1 is located at the end of the symbol image Q1, indicating that the reading target symbol 41 is nearby.

反対に、スキャナ装置1によりシンボル41を遠方位置から読み取る場合、撮像素子211の画角に対するシンボル画像の相対サイズが小さいため、フレーム画像中でシンボル画像が小さく撮像される。図6(b)に示すように、シンボル41を遠距離の焦点位置D2に置いた場合のフレーム画像q2は、シンボル画像Q2と、エイマー213のレーザ光の映像E2と、を含む。映像E2がシンボル画像Q2の外側にあるのは、シンボル画像Q2が小さいためである。フレーム画像q2の中心から映像E2までの距離は、フレーム画像q1の中心から映像E1までの距離より小さい。   On the other hand, when the symbol 41 is read from a far position by the scanner device 1, the symbol image is picked up small in the frame image because the relative size of the symbol image with respect to the angle of view of the image sensor 211 is small. As shown in FIG. 6B, the frame image q2 when the symbol 41 is placed at the focal point D2 at a long distance includes the symbol image Q2 and the image E2 of the laser light from the aimer 213. The video E2 is outside the symbol image Q2 because the symbol image Q2 is small. The distance from the center of the frame image q2 to the video E2 is smaller than the distance from the center of the frame image q1 to the video E1.

このように、フレーム画像の大きさを同じにした場合に、フレーム画像の中心からエイマー213のレーザ光の映像までの距離が小さくなるほど、スキャナ装置1から被写体(シンボル41)までの距離が大きくなっている。このことから、フレーム画像中のエイマーの映像位置によりターゲットのバーコードまでの距離を測定することができるため、それに合わせて液体レンズ212の焦点を調整することが可能となる。   Thus, when the frame images have the same size, the distance from the scanner device 1 to the subject (symbol 41) increases as the distance from the center of the frame image to the image of the laser beam of the aimer 213 decreases. ing. From this, the distance to the target barcode can be measured from the image position of the aimer in the frame image, and the focus of the liquid lens 212 can be adjusted accordingly.

次いで、図7及び図8を参照して、液体レンズ212の焦点位置調整を説明する。図7に、フレーム画像qと、エイマー213のレーザ光の映像Ea,Ebを含む切り出し領域pと、を示す。図8に、時間経過に応じた切り出し領域画像p1,p2,p3を示す。   Next, the focal position adjustment of the liquid lens 212 will be described with reference to FIGS. FIG. 7 shows a frame image q and a cutout region p including the images Ea and Eb of the laser light of the aimer 213. FIG. 8 shows cutout region images p1, p2, and p3 corresponding to the passage of time.

スキャナ装置1において、液体レンズ212に所定の電圧を印加することにより、イメージャモジュール21の焦点位置を、被写体としてのシンボルに焦点が合うターゲット位置に調整する。例えば、焦点位置D1にあるシンボル41にイメージャモジュール21の焦点を合わせる場合、焦点位置D1に焦点が合う印加電圧を液体レンズ212に印加する。   In the scanner apparatus 1, by applying a predetermined voltage to the liquid lens 212, the focal position of the imager module 21 is adjusted to a target position where the symbol as the subject is in focus. For example, when the imager module 21 is focused on the symbol 41 at the focal position D1, an applied voltage that focuses on the focal position D1 is applied to the liquid lens 212.

図7に示すように、スキャナ装置1における撮像素子211で撮像したフレーム画像qにx軸及びy軸をとり、それらの座標をx座標及びy座標とする。例えば、フレーム画像qの左上端を原点とする。ターゲットのシンボルがイメージャモジュール21から遠いときのエイマー213の映像Eaの座標を(xa,ye)とする。座標(xa,ye)に対応するイメージャモジュール21からシンボルまでの距離の焦点位置を、焦点位置Daとする。   As shown in FIG. 7, the x-axis and the y-axis are taken in the frame image q captured by the image sensor 211 in the scanner device 1, and these coordinates are taken as the x-coordinate and the y-coordinate. For example, the upper left corner of the frame image q is the origin. Assume that the coordinates of the video Ea of the aimer 213 when the target symbol is far from the imager module 21 are (xa, ye). A focal position at a distance from the imager module 21 to the symbol corresponding to the coordinates (xa, ye) is defined as a focal position Da.

ターゲットのバーコードがイメージャモジュール21から近いときのエイマー213の映像Ebの座標を(xb,ye)とする。座標(xb,ye)に対応するイメージャモジュール21からシンボルまでの距離の焦点位置を、焦点位置Dbとする。また、フレーム画像qのうち、少なくとも全ての距離のエイマー213のレーザ光の映像を含むことが可能な、映像及びその周辺の領域を切り出し領域pとする。切り出し領域pの左上端及び右下端の座標を、順に、(x1,y1)、(x2,y2)とし、これらの座標が切り出し領域pの範囲を示す。   Assume that the coordinates of the video Eb of the aimer 213 when the target barcode is close to the imager module 21 are (xb, ye). A focal position at a distance from the imager module 21 to the symbol corresponding to the coordinates (xb, ye) is defined as a focal position Db. Further, in the frame image q, an image and a surrounding area that can include an image of the laser beam of the aimer 213 at least at all distances are set as a cut-out area p. The coordinates of the upper left corner and the lower right corner of the cutout area p are (x1, y1) and (x2, y2) in this order, and these coordinates indicate the range of the cutout area p.

液体レンズ212の焦点位置をターゲット位置に調整するまでの時間は、液体レンズ212の環境温度に応じて異なる。液体レンズ212の温度が低いほど、シンボルのターゲット位置に液体レンズ212の焦点位置が安定するまでの時間が大きくなるため、常温、高温時においても、低温時における最大変化時間分の待ち時間が必要である。   The time until the focal position of the liquid lens 212 is adjusted to the target position varies depending on the environmental temperature of the liquid lens 212. The lower the temperature of the liquid lens 212, the longer the time until the focal position of the liquid lens 212 is stabilized at the target position of the symbol. Therefore, a waiting time corresponding to the maximum change time at a low temperature is required even at a normal temperature and a high temperature. It is.

ここで、スキャナ装置1及びシンボル41の位置を固定し、液体レンズ212の焦点位置をシンボルのターゲット位置に合わせるような印加電圧を液体レンズ212に印加し始めてから、実際に液体レンズ212の焦点位置が合うまでの状態を説明する。図8に示すように、図7のフレーム画像qの切り出し領域pの画像としての切り出し領域画像p1,p2,p3を考える。切り出し領域画像p1,p2,p3は、順に、エイマー213のレーザ光の映像E31,E32,E33を含む。   Here, the positions of the scanner device 1 and the symbol 41 are fixed, and after applying an applied voltage to the liquid lens 212 so as to match the focal position of the liquid lens 212 with the target position of the symbol, the focal position of the liquid lens 212 is actually set. The state until the match is explained. As shown in FIG. 8, consider cutout region images p1, p2, and p3 as images of the cutout region p of the frame image q of FIG. The cut-out area images p1, p2, and p3 include images E31, E32, and E33 of laser light from the aimer 213 in order.

切り出し領域画像p1,p2,p3は、液体レンズ212の焦点位置をシンボルのターゲット位置に合わせるような印加電圧を液体レンズ212に印加し始めてからの時間経過が順に大きくなっているものとする。液体レンズ212の焦点位置調整開始時の切り出し領域pの画像を、切り出し領域画像p1とする。   In the cut-out region images p1, p2, and p3, it is assumed that the time elapsed from the start of applying an applied voltage to the liquid lens 212 that matches the focal position of the liquid lens 212 with the target position of the symbol. An image of the cutout region p at the start of the focus position adjustment of the liquid lens 212 is referred to as a cutout region image p1.

液体レンズ212の焦点位置調整開始から、切り出し領域画像p1→切り出し領域画像p2→切り出し領域画像p3に変化するにつれて、エイマー213のレーザ光の映像は、映像E31→映像E32→映像E33と、順に焦点が合うよう変化している。また、スキャナ装置1及びシンボル41の位置を固定しているため、時間経過によらず、切り出し領域p(フレーム画像q)中のレーザ光の映像(映像E31,E32,E33)の座標は変化していない。   As the focus position adjustment of the liquid lens 212 starts and the cutout region image p1 → cutout region image p2 → cutout region image p3 changes, the image of the laser light of the aimer 213 is in the order of video E31 → video E32 → video E33. Has changed to fit. In addition, since the positions of the scanner device 1 and the symbol 41 are fixed, the coordinates of the laser light images (images E31, E32, E33) in the cutout region p (frame image q) change regardless of the passage of time. Not.

次いで、図9〜図11を参照して、フレーム画像中のシンボル画像及びそれ以外の画像を説明する。図9に、焦点位置D1にある二次元コードのシンボルを撮像したフレーム画像q4を示す。図10に、焦点位置D2にある二次元コードのシンボルを撮像したフレーム画像q5を示す。図11に、焦点位置D1にある一次元バーコードのシンボルを撮像したフレーム画像q6を示す。   Next, a symbol image in the frame image and other images will be described with reference to FIGS. FIG. 9 shows a frame image q4 obtained by imaging the symbol of the two-dimensional code at the focal position D1. FIG. 10 shows a frame image q5 obtained by imaging the symbol of the two-dimensional code at the focal position D2. FIG. 11 shows a frame image q6 obtained by imaging a one-dimensional barcode symbol at the focal position D1.

先ず、イメージャモジュール21で焦点位置D1にある二次元コードのシンボルを撮像し、図9に示すフレーム画像q4が得られた場合を考える。但し、フレーム画像q4でエイマー213のレーザ光の映像は省略されており、フレーム画像q5,q6でも同様である。   First, consider a case where the imager module 21 captures a two-dimensional code symbol at the focal position D1, and a frame image q4 shown in FIG. 9 is obtained. However, the image of the laser beam of the aimer 213 is omitted in the frame image q4, and the same applies to the frame images q5 and q6.

フレーム画像q4は、シンボル画像r4と、不要画像t4と、を含む。シンボル画像r4は、焦点位置D1にある二次元コードのシンボルのイメージ領域画像である。シンボル読み取り時には、シンボル画像r4のデコードが行われる。不要画像t4は、シンボル画像r4のデコードに不要な領域の画像である。シンボルの焦点位置D1がスキャナ装置1に比較的近いため、シンボル画像r4は、フレーム画像q4中で大きな面積を有し、不要画像t4が小さな面積を有する。   The frame image q4 includes a symbol image r4 and an unnecessary image t4. The symbol image r4 is an image area image of the symbol of the two-dimensional code at the focal position D1. When the symbol is read, the symbol image r4 is decoded. The unnecessary image t4 is an image of an area unnecessary for decoding the symbol image r4. Since the focal position D1 of the symbol is relatively close to the scanner device 1, the symbol image r4 has a large area in the frame image q4, and the unnecessary image t4 has a small area.

ここで、イメージャモジュール21で焦点位置D2にある図9と同じ二次元コードのシンボルを撮像し、図10に示すフレーム画像q5が得られた場合を考える。フレーム画像q5は、シンボル画像r5と、不要画像t5と、を含む。シンボル画像r5は、焦点位置D2にある二次元コードのシンボルのイメージ領域画像である。不要画像t5は、シンボル画像r5のデコードに不要な領域の画像である。シンボルの焦点位置D2がスキャナ装置1から比較的遠いため、シンボル画像r5は、フレーム画像q5中でシンボル画像r4よりも小さな面積を有し、不要画像t5が不要画像t4よりも大きな面積を有する。   Here, a case is considered where the imager module 21 captures the same two-dimensional code symbol as in FIG. 9 at the focal position D2 and obtains the frame image q5 shown in FIG. The frame image q5 includes a symbol image r5 and an unnecessary image t5. The symbol image r5 is an image region image of the symbol of the two-dimensional code at the focal position D2. The unnecessary image t5 is an image of an area unnecessary for decoding the symbol image r5. Since the focal position D2 of the symbol is relatively far from the scanner device 1, the symbol image r5 has a smaller area than the symbol image r4 in the frame image q5, and the unnecessary image t5 has a larger area than the unnecessary image t4.

図9及び図10に示すように、焦点位置を変えて同じ種類のシンボルを撮像した場合に、焦点位置に応じてデコードに必要な領域も変化する。このため、デコードのために撮像素子211から取り込む撮像領域(の画像データ)は、シンボルの読み取り速度を向上させるため、焦点位置に応じて、できるだけ小さい領域とすることが好ましい。但し、デコードのために撮像素子211から取り込む撮像領域は、スキャナ装置1の操作者の操作技術にも左右されるため、ある程度マージンを持たせることが好ましい。このため、撮像領域は、焦点位置に応じたシンボル画像に対応するシンボル領域と、このシンボル領域の周囲のマージンと、からなるものとする。   As shown in FIGS. 9 and 10, when the same kind of symbol is imaged by changing the focal position, the area necessary for decoding also changes in accordance with the focal position. For this reason, it is preferable that the imaging area (image data) captured from the imaging element 211 for decoding is as small as possible in accordance with the focal position in order to improve the symbol reading speed. However, since the imaging area captured from the imaging device 211 for decoding depends on the operation technique of the operator of the scanner device 1, it is preferable to provide a certain margin. For this reason, the imaging region includes a symbol region corresponding to a symbol image corresponding to the focal position, and a margin around the symbol region.

また、イメージャモジュール21で焦点位置D1にある一次元バーコードのシンボルを撮像し、図11に示すフレーム画像q6が得られた場合を考える。フレーム画像q6は、シンボル画像r6と、不要画像t6と、を含む。シンボル画像r6は、焦点位置D1にある一次元バーコードのシンボルのイメージ領域画像である。不要画像t6は、シンボル画像r6のデコードに不要な領域の画像である。シンボルの焦点位置D1がスキャナ装置1から比較的近いため、シンボル画像r6は、フレーム画像q6中で比較的大きな面積を有し、不要画像t6が小さな面積を有する。   Also, consider a case where the imager module 21 captures a one-dimensional barcode symbol at the focal position D1, and a frame image q6 shown in FIG. 11 is obtained. The frame image q6 includes a symbol image r6 and an unnecessary image t6. The symbol image r6 is an image area image of the symbol of the one-dimensional barcode at the focal position D1. The unnecessary image t6 is an image of an area unnecessary for decoding the symbol image r6. Since the focal position D1 of the symbol is relatively close to the scanner device 1, the symbol image r6 has a relatively large area in the frame image q6, and the unnecessary image t6 has a small area.

加えて、シンボルが長方形の一次元バーコードであるため、シンボル画像r6は、フレーム画像q6中で、正方形の二次元コードのシンボル画像r4に比べて小さな面積を有し、不要画像t6が比較的大きな面積を有する。   In addition, since the symbol is a rectangular one-dimensional barcode, the symbol image r6 has a smaller area in the frame image q6 than the square two-dimensional code symbol image r4, and the unnecessary image t6 is relatively small. Has a large area.

図9及び図11に示すように、同じ焦点位置で異なる種類のシンボルを撮像した場合に、シンボルの種類に応じてデコードに必要な領域も異なる。このため、デコードのために撮像素子211から取り込む撮像領域(の画像データ)は、シンボルの読み取り速度を向上させるため、シンボルの種類に応じて、できるだけ小さい領域とすることが好ましい。   As shown in FIGS. 9 and 11, when different types of symbols are imaged at the same focal position, the regions necessary for decoding differ depending on the types of symbols. For this reason, the imaging area (image data) captured from the imaging element 211 for decoding is preferably as small as possible in accordance with the type of symbol in order to improve the symbol reading speed.

次に、図12及び図13を参照して、スキャナ装置1のフラッシュメモリ17に記憶されている情報を説明する。図12に、印加電圧テーブル171の構成を示す。図13に、撮像領域テーブル172の構成を示す。   Next, information stored in the flash memory 17 of the scanner device 1 will be described with reference to FIGS. 12 and 13. FIG. 12 shows the configuration of the applied voltage table 171. FIG. 13 shows the configuration of the imaging area table 172.

図12に示すように、フラッシュメモリ17には、印加電圧テーブル171が記憶されている。印加電圧テーブル171は、エイマー位置1711と、印加電圧1712と、焦点位置1713とのフィールドを有する。   As shown in FIG. 12, the flash memory 17 stores an applied voltage table 171. The applied voltage table 171 has fields of an aimer position 1711, an applied voltage 1712, and a focus position 1713.

エイマー位置1711は、フレーム画像qにおけるエイマー213のレーザ光の映像のx座標である。印加電圧1712は、エイマー位置1711に対応する焦点位置1713に置かれたシンボルに焦点位置を合わせるための液体レンズ212への印加電圧である。焦点位置1713は、エイマー位置1711に対応するスキャナ装置1からのターゲットのシンボルの焦点位置である。   The aimer position 1711 is the x coordinate of the image of the laser beam of the aimer 213 in the frame image q. The applied voltage 1712 is an applied voltage to the liquid lens 212 for adjusting the focal position to the symbol placed at the focal position 1713 corresponding to the aimer position 1711. The focal position 1713 is a focal position of the target symbol from the scanner device 1 corresponding to the aimer position 1711.

また、図13に示すように、フラッシュメモリ17には、撮像領域テーブル172が記憶されている。撮像領域テーブル172は、焦点位置1721と、シンボルの種類1722と、撮像領域1723と、を有する。   Further, as shown in FIG. 13, an imaging area table 172 is stored in the flash memory 17. The imaging area table 172 includes a focal position 1721, a symbol type 1722, and an imaging area 1723.

焦点位置1721は、スキャナ装置1からのターゲットのシンボルの焦点位置である。シンボルの種類1722は、焦点位置1721に置かれたシンボルの種類である。シンボルの種類1722は、(マトリクス状)二次元コード、一次元バーコード、スタック型二次元コード等である。撮像領域1723は、撮像素子211の全画面の画像(フレーム画像)のうち、デコードに必要で実際に取り込む画像領域を示す座標である。   A focal position 1721 is a focal position of a target symbol from the scanner device 1. The symbol type 1722 is a type of symbol placed at the focal position 1721. The symbol type 1722 is a (matrix) two-dimensional code, a one-dimensional barcode, a stack type two-dimensional code, or the like. The imaging area 1723 is a coordinate indicating an image area that is necessary for decoding and actually captured among images (frame images) of the entire screen of the imaging element 211.

撮像領域1723に、シンボル画像を含んでいるとデコードが可能となる。撮像領域1723は、撮像領域の左上端及び右下端の座標により表されている。例えば、焦点位置Daで二次元コードの撮像領域1723は、(xa1−α,ya1−α)〜(xa2+α,ya2+α)である。ここで、(xa1,ya1)〜(xa2,ya2)は、フレーム画像の中心且つ横方向が水平(x軸方向)である焦点位置Daに対応するシンボル画像の領域(シンボル領域)を示す。マージンαは、焦点位置Daに対応するマージンの値を示す。シンボル領域からマージンαの分だけ、シンボル画像のずれ(平行ずれ及び回転ずれ)が許容される。マージンβは、焦点位置Dbに対応するマージンの値を示す。図13では、マージンが、焦点位置1721に応じて異なる値としているが、これに限定されるものではない。例えば、マージンは、焦点位置1721に応じて同じ値としてもよい。   Decoding is possible when the imaging region 1723 includes a symbol image. The imaging region 1723 is represented by the coordinates of the upper left corner and the lower right corner of the imaging region. For example, the imaging region 1723 of the two-dimensional code at the focal position Da is (xa1-α, ya1-α) to (xa2 + α, ya2 + α). Here, (xa1, ya1) to (xa2, ya2) indicate symbol image regions (symbol regions) corresponding to the focal position Da whose center in the frame image is horizontal (x-axis direction). The margin α indicates a margin value corresponding to the focal position Da. A deviation (parallel deviation and rotational deviation) of the symbol image is allowed by the margin α from the symbol area. The margin β indicates a margin value corresponding to the focal position Db. In FIG. 13, the margin has a different value depending on the focal position 1721, but the present invention is not limited to this. For example, the margin may be the same value according to the focal position 1721.

次に、図14及び図15を参照して、スキャナ装置1の動作を説明する。図14に、第1のシンボル読み取り処理を示す。図15に、スキャン制御処理を示す。   Next, the operation of the scanner device 1 will be described with reference to FIGS. 14 and 15. FIG. 14 shows the first symbol reading process. FIG. 15 shows the scan control process.

第1のシンボル読み取り処理は、エイマー213のレーザ光の映像の位置に応じて液体レンズ212の焦点位置をターゲットのシンボルの焦点位置に合わせるとともに、イメージャモジュール21にシンボルの種類に応じた撮像領域でシンボルを撮像させ、取得したシンボルの画像データをデコードする処理である。スキャナ装置1において、トリガキー12A,12Cがユーザにより押下入力されたことをトリガとして、CPU11は、ROM15から読み出されてRAM13に適宜展開された第1のシンボル読み取りプログラム151との協働で、第1のシンボル読み取り処理を実行する。   In the first symbol reading process, the focal position of the liquid lens 212 is adjusted to the focal position of the target symbol in accordance with the position of the laser beam image of the aimer 213, and the imager module 21 has an imaging region corresponding to the symbol type. This is a process of imaging a symbol and decoding the acquired symbol image data. In the scanner apparatus 1, triggered by the user pressing the trigger keys 12 </ b> A and 12 </ b> C as a trigger, the CPU 11 cooperates with the first symbol reading program 151 read from the ROM 15 and appropriately expanded in the RAM 13. 1 symbol reading process is executed.

図14に示すように、先ず、CPU11は、操作部12を介して、ユーザからの読み取るシンボルの種類及びマージンの値(マージンα,β…)の入力を受け付けてRAM13に格納し、初期設定を行い、イメージャモジュール21の起動の指示信号をイメージャコントローラ19に出力する(ステップS11)。ステップS11の初期設定は、例えば、撮像素子211からイメージャコントローラ19に入力された画像データ(ラインデータ)をRAM13にDMA転送する際のRAM13内の記憶領域の設定である。   As shown in FIG. 14, first, the CPU 11 receives input of the symbol type and margin values (margins α, β,...) From the user via the operation unit 12 and stores them in the RAM 13 for initial setting. Then, an instruction signal for starting the imager module 21 is output to the imager controller 19 (step S11). The initial setting in step S11 is, for example, the setting of the storage area in the RAM 13 when the image data (line data) input from the image sensor 211 to the imager controller 19 is DMA-transferred to the RAM 13.

そして、CPU11は、エイマー213の点灯の指示信号と、撮像素子211の切り出しキャプチャ(切り出し領域の撮像)の指示信号とを、イメージャコントローラ19に出力する(ステップS12)。切り出しキャプチャの指示信号とは、フラッシュメモリ17に記憶されている座標(x1,y1)及び座標(x2,y2)で定義された切り出し領域のラインデータの取得の指示信号である。   Then, the CPU 11 outputs an instruction signal for turning on the aimer 213 and an instruction signal for cut-out capture (image pickup of the cut-out area) of the image sensor 211 to the imager controller 19 (step S12). The clipping capture instruction signal is an instruction signal for acquiring line data of the clipping area defined by the coordinates (x1, y1) and coordinates (x2, y2) stored in the flash memory 17.

そして、CPU11は、DMA機能により、撮像素子211からイメージャコントローラ19に入力された切り出し領域のラインデータをRAM13にDMA転送して記憶させる(ステップS13)。そして、CPU11は、RAM13に記憶された切り出し領域の画像データ(ラインデータ)を読み出し、この切り出し領域の画像内のエイマー位置(フレーム画像内におけるエイマー213のレーザ光の映像のx座標)を検出する(ステップS14)。エイマー位置の検出は、スキャナ装置1からバーコードまでの距離の推定に対応する。   Then, the CPU 11 uses the DMA function to DMA transfer the line data of the cut-out area input from the image sensor 211 to the imager controller 19 and store it in the RAM 13 (step S13). Then, the CPU 11 reads out the image data (line data) of the cutout area stored in the RAM 13, and detects the aimer position in the image of the cutout area (the x coordinate of the image of the laser beam of the aimer 213 in the frame image). (Step S14). The detection of the aimer position corresponds to the estimation of the distance from the scanner device 1 to the barcode.

そして、CPU11は、フラッシュメモリ17に記憶された印加電圧テーブル171を参照し、ステップS14で検出したエイマー位置1711に対応する印加電圧1712を読み出し、液体レンズ212への印加電圧を、読み出した印加電圧1712に変更する指示信号をイメージャコントローラ19に出力する(ステップS15)。   Then, the CPU 11 refers to the applied voltage table 171 stored in the flash memory 17, reads the applied voltage 1712 corresponding to the aimer position 1711 detected in step S 14, and reads the applied voltage to the liquid lens 212 as the read applied voltage. An instruction signal to be changed to 1712 is output to the imager controller 19 (step S15).

そして、CPU11は、ステップS16,S17として、ステップS12,S13と同様の処理を実行する。そして、CPU11は、RAM13に記憶された切り出し領域の画像データ(ラインデータ)を読み出し、この切り出し領域の画像内のエイマー213のレーザ光の映像のコントラストを算出する(ステップS18)。そして、CPU11は、ステップS18で算出したコントラストが予め設定された一定値以上であるか、又は最初のステップS16の実行から予め設定された一定時間をタイムアウトしたか、否かを判別する(ステップS19)。   And CPU11 performs the process similar to step S12, S13 as step S16, S17. Then, the CPU 11 reads out the image data (line data) of the cutout area stored in the RAM 13, and calculates the contrast of the image of the laser beam of the aimer 213 in the image of this cutout area (step S18). Then, the CPU 11 determines whether or not the contrast calculated in step S18 is greater than or equal to a predetermined value set in advance, or whether a predetermined time set in advance from the execution of the first step S16 has timed out (step S19). ).

コントラストが一定値以上でなく且つタイムアウトもしていない場合(ステップS19;NO)、ステップS16に移行される。これは、液体レンズ212の焦点調整が行われている場合であり、図8の映像E31,E32のように、エイマー213のレーザ光の映像がぼやけており、ピント(焦点位置)が合っていない状態である。このような状態のときは、ステップS16からステップS19の処理を繰り返す。   If the contrast is not equal to or greater than a certain value and has not timed out (step S19; NO), the process proceeds to step S16. This is a case where the focus of the liquid lens 212 is being adjusted, and the image of the laser light from the aimer 213 is blurred as shown in the images E31 and E32 of FIG. 8, and the focus (focus position) is not in alignment. State. In such a state, the processing from step S16 to step S19 is repeated.

コントラストが一定値以上であり又はタイムアウトした場合(ステップS19;YES)、CPU11は、エイマー213の消灯の指示信号をイメージャコントローラ19に出力する(ステップS20)。そして、CPU11は、フラッシュメモリ17に記憶された印加電圧テーブル171を参照し、ステップS14で検出したエイマー位置1711に対応する焦点位置1713を読み出して取得する(ステップS21)。   When the contrast is equal to or higher than a certain value or times out (step S19; YES), the CPU 11 outputs an instruction signal for turning off the aimer 213 to the imager controller 19 (step S20). Then, the CPU 11 refers to the applied voltage table 171 stored in the flash memory 17 and reads and acquires the focal position 1713 corresponding to the aimer position 1711 detected in step S14 (step S21).

そして、CPU11は、イルミネーション214の点灯(次画像キャプチャ中のイルミネーション214の点灯及びその後の消灯)の指示信号をイメージャコントローラ19に出力する(ステップS22)。そして、CPU11は、RAM13に記憶されているステップS11で入力されたシンボルの種類及びマージンの値を読み出す(ステップS23)。   Then, the CPU 11 outputs an instruction signal for turning on the illumination 214 (turning on the illumination 214 during the next image capture and then turning it off) to the imager controller 19 (step S22). Then, the CPU 11 reads the symbol type and margin value input in step S11 stored in the RAM 13 (step S23).

そして、CPU11は、フラッシュメモリ17に記憶された撮像領域テーブル172を参照し、ステップS23で読み出したシンボルの種類1722と、ステップS21で取得した焦点位置1721とに対応した撮像領域1723を読み出す(ステップS24)。そして、CPU11は、ステップS11で読み出した撮像領域のマージンα,β…に、ステップS23で読み出したマージンの値を代入して撮像領域を算出する(ステップS25)。   Then, the CPU 11 refers to the imaging area table 172 stored in the flash memory 17 and reads the imaging area 1723 corresponding to the symbol type 1722 read out in step S23 and the focal position 1721 acquired in step S21 (step S21). S24). Then, the CPU 11 calculates the imaging region by substituting the margin value read in step S23 for the margins α, β,... Of the imaging region read in step S11 (step S25).

そして、CPU11は、デコード用に撮像素子211のステップS25で算出した撮像領域の画像キャプチャの指示信号をイメージャコントローラ19に出力する(ステップS26)。そして、ステップS27として、CPU11は、ステップS26により撮像素子211で取得された撮像領域のラインデータについてステップS13と同様の処理を実行する。そして、CPU11は、RAM13に記憶された撮像領域の画像データ(ラインデータ)を読み出し、この撮像領域の画像について、デコードをしやすくする画像処理(一つの画像データに合成する処理等)を施し、画像処理後の撮像領域の画像中のシンボル画像をデコードする(ステップS28)。   Then, the CPU 11 outputs to the imager controller 19 an image capture instruction signal for the imaging region calculated in step S25 of the imaging device 211 for decoding (step S26). In step S27, the CPU 11 executes the same processing as step S13 on the line data of the imaging region acquired by the imaging element 211 in step S26. Then, the CPU 11 reads out image data (line data) of the imaging area stored in the RAM 13, and performs image processing (such as a process of synthesizing into one image data) that facilitates decoding of the image of the imaging area. The symbol image in the image of the imaging area after the image processing is decoded (step S28).

そして、CPU11は、ステップS28のデコードが成功したか否かを判別する(ステップS29)。デコードが成功していない場合(ステップS29;NO)、ステップS12に移行される。デコードが成功した場合(ステップS29;YES)、CPU11は、イメージャモジュール21の電源オフの指示信号をイメージャコントローラ19に出力する(ステップS30)。そして、CPU11は、デコード結果を表示部14に表示し、デコード成功のブザー音を音出力部18に鳴動させ(ステップS31)、バーコード読み取り処理を終了する。   Then, the CPU 11 determines whether or not the decoding in step S28 is successful (step S29). If the decoding is not successful (step S29; NO), the process proceeds to step S12. If the decoding is successful (step S29; YES), the CPU 11 outputs a power-off instruction signal for the imager module 21 to the imager controller 19 (step S30). Then, the CPU 11 displays the decoding result on the display unit 14, causes the buzzer sound of successful decoding to sound in the sound output unit 18 (step S31), and ends the barcode reading process.

次いで、図15を参照して、イメージャコントローラ19で実行されるスキャン制御処理を説明する。スキャン制御処理は、イメージャモジュール21を用いて焦点位置を調整してシンボルをスキャンし、エイマー213のレーザ光の映像を含む切り出し領域や、シンボル画像を含む撮像領域の画像データを取得する処理である。スキャナ装置1において、イメージャコントローラ19は、第1のシンボル読み取り処理のステップS11に対応して、CPU11から起動の指示信号が入力されたことをトリガとして、スキャン制御処理を実行する。   Next, the scan control process executed by the imager controller 19 will be described with reference to FIG. The scan control process is a process of scanning the symbol by adjusting the focal position using the imager module 21 and acquiring the image data of the cutout area including the image of the laser light of the aimer 213 and the imaging area including the symbol image. . In the scanner device 1, the imager controller 19 executes a scan control process, triggered by the activation instruction signal input from the CPU 11, corresponding to step S 11 of the first symbol reading process.

図15に示すように、先ず、イメージャコントローラ19は、初期設定を行う(ステップS41)。ステップS31の初期設定は、例えば、イメージャモジュール21からの画像データの受信に関する設定である。そして、イメージャコントローラ19は、イメージャモジュール21の電源をオンする(ステップS42)。   As shown in FIG. 15, first, the imager controller 19 performs initial setting (step S41). The initial setting in step S31 is, for example, a setting relating to reception of image data from the imager module 21. Then, the imager controller 19 turns on the power of the imager module 21 (step S42).

そして、イメージャコントローラ19は、第1のシンボル読み取り処理のステップS30に対応して、CPU11からイメージャモジュール21の電源オフの指示信号が入力されたか否かを判別する(ステップS43)。電源オフの指示信号が入力されていない場合(ステップS43;NO)、イメージャコントローラ19は、第1のシンボル読み取り処理のステップS15に対応して、CPU11からの液体レンズ212への印加電圧変更の指示信号が入力されたか否かを判別する(ステップS44)。   Then, in response to step S30 of the first symbol reading process, the imager controller 19 determines whether or not an instruction signal for powering off the imager module 21 is input from the CPU 11 (step S43). When the power-off instruction signal is not input (step S43; NO), the imager controller 19 instructs the application voltage change to the liquid lens 212 from the CPU 11 in response to step S15 of the first symbol reading process. It is determined whether or not a signal has been input (step S44).

印加電圧変更の指示信号が入力された場合(ステップS44;YES)、イメージャコントローラ19は、印加電圧変更の指示信号の印加電圧値に応じたPWM信号を生成して電圧昇圧部20に出力する(ステップS45)。ステップS45において、電圧昇圧部20により、液体レンズ212の印加電圧が変更される。   When the applied voltage change instruction signal is input (step S44; YES), the imager controller 19 generates a PWM signal corresponding to the applied voltage value of the applied voltage change instruction signal and outputs the PWM signal to the voltage booster 20 ( Step S45). In step S45, the voltage booster 20 changes the voltage applied to the liquid lens 212.

ステップS45の実行後、又は印加電圧変更の指示信号が入力されていない場合(ステップS44;NO)、イメージャコントローラ19は、第1のシンボル読み取り処理のステップS12,S16,S26に対応して、CPU11から画像キャプチャの指示信号が入力されたか否かを判別する(ステップS46)。画像キャプチャの指示信号が入力されていない場合(ステップS46;NO)、ステップS43に移行される。   After execution of step S45, or when an instruction signal for changing the applied voltage is not input (step S44; NO), the imager controller 19 corresponds to steps S12, S16, and S26 of the first symbol reading process. It is determined whether or not an image capture instruction signal is input from (step S46). If no image capture instruction signal is input (step S46; NO), the process proceeds to step S43.

画像キャプチャの指示信号が入力された場合(ステップS46;YES)、イメージャコントローラ19は、ステップS46で入力された画像キャプチャの指示信号に応じて、撮像素子211の画像キャプチャ領域を設定する(ステップS47)。そして、イメージャコントローラ19は、第1のシンボル読み取り処理のステップS12,S16に対応して、CPU11からエイマー213の点灯の指示信号が入力されたか否かを判別する(ステップS48)。   When an image capture instruction signal is input (step S46; YES), the imager controller 19 sets an image capture region of the image sensor 211 in accordance with the image capture instruction signal input at step S46 (step S47). ). Then, the imager controller 19 determines whether or not an instruction signal for lighting the aimer 213 is input from the CPU 11 in response to steps S12 and S16 of the first symbol reading process (step S48).

エイマー213の点灯の指示信号が入力されている場合(ステップS48;YES)、イメージャコントローラ19は、エイマー213を点灯する(ステップS49)。エイマー213の点灯の指示信号が入力されていない場合(ステップS48;NO)、第1のシンボル読み取り処理のステップS20に対応して、CPU11からエイマー213の消灯の指示信号が入力されており、イメージャコントローラ19は、エイマー213を消灯する(ステップS50)。   When the instruction signal for lighting the aimer 213 is input (step S48; YES), the imager controller 19 lights the aimer 213 (step S49). When the instruction signal for turning on the aimer 213 is not inputted (step S48; NO), the instruction signal for turning off the aimer 213 is inputted from the CPU 11 in correspondence with step S20 of the first symbol reading process. The controller 19 turns off the aimer 213 (step S50).

そして、イメージャコントローラ19は、第1のシンボル読み取り処理のステップS22に対応して、CPU11からイルミネーション214の点灯の指示信号が入力されたか否かを判別する(ステップS51)。イルミネーション214の点灯の指示信号が入力されていない場合(ステップS51;NO)、イメージャコントローラ19は、ステップS47で設定された(切り出し領域である)画像キャプチャ領域の画像領域指定信号を生成して撮像素子211に出力し、撮像素子211に画像キャプチャさせ、撮像素子211から(切り出し領域の)画像データが入力され(ステップS52)、ステップS43に移行される。   Then, in response to step S22 of the first symbol reading process, the imager controller 19 determines whether or not an instruction signal for turning on the illumination 214 is input from the CPU 11 (step S51). When an instruction signal for lighting the illumination 214 is not input (step S51; NO), the imager controller 19 generates an image area designation signal for the image capture area (which is a cut-out area) set in step S47. The image is output to the element 211 and is captured by the image sensor 211. Image data (in the cutout area) is input from the image sensor 211 (step S52), and the process proceeds to step S43.

イルミネーション214の点灯の指示信号が入力された場合(ステップS51;YES)、イメージャコントローラ19は、イルミネーション214を点灯する(ステップS53)。そして、イメージャコントローラ19は、ステップS47で設定された(撮像領域である)画像キャプチャ領域の画像領域指定信号を生成して撮像素子211に出力し、撮像素子211に画像キャプチャさせ、撮像素子211から(撮像領域の)フレーム画像の画像データが入力される(ステップS54)。そして、イメージャコントローラ19は、イルミネーション214を消灯し(ステップS55)、ステップS43に移行される。   When an instruction signal for lighting the illumination 214 is input (step S51; YES), the imager controller 19 lights the illumination 214 (step S53). Then, the imager controller 19 generates an image area designation signal for the image capture area (which is the imaging area) set in step S47, outputs the image area designation signal to the imaging element 211, causes the imaging element 211 to capture an image, and Image data of a frame image (in the imaging area) is input (step S54). Then, the imager controller 19 turns off the illumination 214 (step S55), and proceeds to step S43.

電源オフの指示信号が入力された場合(ステップS43;YES)、イメージャコントローラ19は、イメージャモジュール21の電源をオフし(ステップS56)、スキャン制御処理を終了する。   When a power-off instruction signal is input (step S43; YES), the imager controller 19 turns off the power of the imager module 21 (step S56) and ends the scan control process.

以上、本実施の形態によれば、スキャナ装置1は、切り出し領域のエイマー213のレーザ光の映像の位置(エイマー位置1711)に応じたシンボルの焦点位置1713を印加電圧テーブル171から読み出す。そして、スキャナ装置1は、液体レンズ212の焦点位置を前記読み出した焦点位置1713に調整し、前記読み出した焦点位置1713に対応したフレーム画像内の撮像領域1723を撮像領域テーブル172から読み出し、当該読み出した撮像領域1723の画像を撮像素子211から取り込み、当該取り込まれた撮像領域の画像に含まれるシンボル画像をデコードする。   As described above, according to the present embodiment, the scanner device 1 reads the focal position 1713 of the symbol corresponding to the position of the image of the laser beam of the aimer 213 in the cutout area (the aimer position 1711) from the applied voltage table 171. Then, the scanner device 1 adjusts the focal position of the liquid lens 212 to the read focal position 1713, reads the imaging area 1723 in the frame image corresponding to the read focal position 1713, and reads the readout. The captured image of the imaging region 1723 is captured from the image sensor 211, and the symbol image included in the captured image of the captured region is decoded.

このため、シンボルに液体レンズ212の焦点位置を合わせるとともに、その後の焦点位置に応じた適切な大きさの撮像領域でシンボルを撮像できるので、シンボルの読み取り応答速度を高めることができ、スキャナ装置1の操作性を向上できる。   For this reason, since the focal position of the liquid lens 212 is adjusted to the symbol, and the symbol can be imaged in an imaging region having an appropriate size according to the subsequent focal position, the symbol read response speed can be increased, and the scanner device 1 Operability can be improved.

また、撮像領域テーブル172は、シンボルの種類1722及び焦点位置1721に応じた撮像領域1723を有する。スキャナ装置1は、シンボルの種類1722及び焦点位置1721に応じた撮像領域1723の画像を撮像素子211から取り込む。このため、シンボルの種類及び焦点位置に応じた適切な大きさの撮像領域でシンボルを撮像できるので、シンボルの読み取り応答速度をさらに高めることができ、スキャナ装置1の操作性をさらに向上できる。   Further, the imaging area table 172 includes an imaging area 1723 corresponding to the symbol type 1722 and the focal position 1721. The scanner device 1 captures an image of the imaging region 1723 corresponding to the symbol type 1722 and the focal position 1721 from the imaging element 211. For this reason, since a symbol can be imaged in an imaging region having an appropriate size according to the type and focal position of the symbol, the symbol read response speed can be further increased, and the operability of the scanner device 1 can be further improved.

また、撮像領域テーブル172の撮像領域1723は、焦点位置1721が大きく(遠く)なるほど小さくなる。このため、焦点位置に応じた適切な大きさの撮像領域を取得できる。   Further, the imaging area 1723 of the imaging area table 172 becomes smaller as the focal position 1721 becomes larger (far). For this reason, it is possible to acquire an imaging region having an appropriate size according to the focal position.

また、撮像領域テーブル172の撮像領域1723は、焦点位置1721が大きく(遠く)なるほど小さくなるシンボルの大きさのシンボル領域と、当該シンボル領域の周囲のマージンと、からなる。スキャナ装置1は、マージンの値の入力を受け付ける操作部12を備え、撮像領域テーブル172から読み出した撮像領域1723のマージンに前記入力されたマージンの値を代入し、当該マージンの値を代入した撮像領域の画像を撮像素子211から取り込む。このため、撮像領域のマージンの値を任意に設定できる。例えば、スキャナ装置1の操作の初心者はマージンの値を小さく設定でき、熟練者はマージンの値を小さく設定できる。   The imaging area 1723 of the imaging area table 172 includes a symbol area having a symbol size that decreases as the focal position 1721 increases (far), and a margin around the symbol area. The scanner device 1 includes an operation unit 12 that receives an input of a margin value, substitutes the input margin value for the margin of the imaging region 1723 read from the imaging region table 172, and substitutes the margin value for imaging. An image of the area is captured from the image sensor 211. For this reason, the value of the margin of the imaging region can be set arbitrarily. For example, a beginner operating the scanner apparatus 1 can set a margin value small, and an expert can set a margin value small.

また、スキャナ装置1は、切り出し領域のエイマー位置1711に応じたシンボルの焦点位置1713を印加電圧テーブル171から読み出す。このため、エイマー位置に応じてシンボルの焦点位置を容易に検出できる。   Further, the scanner device 1 reads the focal position 1713 of the symbol corresponding to the aimer position 1711 of the cutout area from the applied voltage table 171. For this reason, the focal position of the symbol can be easily detected according to the aimer position.

また、スキャナ装置1は、焦点位置1713を読み出した後に、エイマー213を消灯し、前記読み出された焦点位置1713に対応した撮像領域1723の画像を撮像素子211から取り込む。このため、撮像領域の画像からデコードに不要なエイマー213のレーザ光の映像を除去してデコードの失敗を防ぐことができ、シンボルの読み取り応答速度をさらに高めることができる。   Further, after reading the focal position 1713, the scanner device 1 turns off the aimer 213, and captures an image of the imaging region 1723 corresponding to the read focal position 1713 from the imaging element 211. For this reason, the image of the laser beam of the aimer 213 unnecessary for decoding can be removed from the image of the imaging region to prevent decoding failure, and the symbol read response speed can be further increased.

(変形例)
図16〜図19を参照して、上記実施の形態の変形例を説明する。本変形例の装置構成として、上記実施の形態と同様に、スキャナ装置1を用いる。このため、上記実施の形態と異なる部分を主として説明する。
(Modification)
A modification of the above embodiment will be described with reference to FIGS. As a device configuration of this modification, the scanner device 1 is used as in the above embodiment. For this reason, a different part from the said embodiment is mainly demonstrated.

スキャナ装置1のROM15には、第1のシンボル読み取りプログラム151に替えて、第2のシンボル読み取りプログラム152が記憶されているものとする。また、フラッシュメモリ17には、印加電圧テーブル171に替えて後述する印加電圧テーブル173が記憶されているものとする。   Assume that the ROM 15 of the scanner apparatus 1 stores a second symbol reading program 152 instead of the first symbol reading program 151. Further, it is assumed that an applied voltage table 173 described later is stored in the flash memory 17 instead of the applied voltage table 171.

次いで、図16を参照して、液体レンズ212の焦点位置調整を説明する。図16に、フレーム画像qと、中心領域vと、エイマー213のレーザ光の映像Ea,Ebと、を示す。   Next, the focal position adjustment of the liquid lens 212 will be described with reference to FIG. FIG. 16 shows a frame image q, a center region v, and images Ea and Eb of laser light from the aimer 213.

上記実施の形態では、エイマー213のレーザ光の映像の位置に応じた印加電圧を液体レンズ212に印加することにより、イメージャモジュール21の焦点位置を、被写体としてのシンボルに焦点が合うターゲット位置に調整した。本変形例では、フレーム画像qの中心に固定された中心領域画像のコントラストが一定値以上となる印加電圧を液体レンズ212に印加することにより、イメージャモジュール21の焦点位置を、被写体としてのシンボルに焦点が合うターゲット位置に調整する。   In the above embodiment, by applying an applied voltage corresponding to the position of the laser beam image of the aimer 213 to the liquid lens 212, the focal position of the imager module 21 is adjusted to the target position where the symbol as the subject is focused. did. In this modification, an application voltage at which the contrast of the center area image fixed at the center of the frame image q is equal to or greater than a certain value is applied to the liquid lens 212, so that the focal position of the imager module 21 is made a symbol as a subject. Adjust the target position to be in focus.

図16に示すように、スキャナ装置1における撮像素子211で撮像したフレーム画像qは、中心領域vと、エイマー213のレーザ光の映像と、を含む。中心領域vとは、予め設定されたフレーム画像qの中心に位置する固定領域である。中心領域vには、シンボルの焦点位置を変更しても、エイマー213のレーザ光の映像が含まれない領域とする。中心領域vは、例えば、80×80ピクセルの矩形領域であるものとする。中心領域vの左上端の座標を(xv1,yv1)とし、同じく右下端の座標を(xv2,yv2)とし、これらの座標が中心領域vの範囲を示す。   As shown in FIG. 16, the frame image q picked up by the image pickup device 211 in the scanner device 1 includes the center region v and the image of the laser beam from the aimer 213. The center region v is a fixed region located at the center of a preset frame image q. The center region v is a region that does not include the image of the laser beam of the aimer 213 even if the focal position of the symbol is changed. The center area v is assumed to be a rectangular area of 80 × 80 pixels, for example. The coordinates of the upper left corner of the center region v are (xv1, yv1), and the coordinates of the lower right corner are (xv2, yv2). These coordinates indicate the range of the center region v.

次に、図17を参照して、フラッシュメモリ17に記憶される情報を説明する。図17に、印加電圧テーブル173の構成を示す。   Next, information stored in the flash memory 17 will be described with reference to FIG. FIG. 17 shows the configuration of the applied voltage table 173.

図17に示すように、印加電圧テーブル173は、印加電圧1731と、焦点位置1732と、のフィールドを有する。印加電圧1731は、焦点位置1732に置かれたシンボルに焦点位置を合わせるための液体レンズ212への印加電圧である。焦点位置1732は、スキャナ装置1からのターゲットのシンボルの焦点位置である。   As shown in FIG. 17, the applied voltage table 173 has fields of an applied voltage 1731 and a focal position 1732. The applied voltage 1731 is an applied voltage to the liquid lens 212 for adjusting the focal position to the symbol placed at the focal position 1732. A focal position 1732 is a focal position of a target symbol from the scanner device 1.

また、フラッシュメモリ17には、中心領域vを示す座標(xv1,yv1)、(xv2,yv2)と、液体レンズ212に印加する印加電圧の初期値、MIN値及びMAX値と、が記憶されているものとする。印加電圧のMIN値は、調整可能な範囲で、合わせるシンボルの焦点位置が最も遠くなる(焦点距離が最大となる)印加電圧の最大値である。印加電圧のMAX値は、調整可能な範囲で、合わせるシンボルの焦点位置が最も近くなる(焦点距離が最小となる)印加電圧の最小値である。印加電圧の初期値は、MAX値とMIN値との間にある予め設定された印加電圧の値である。   The flash memory 17 stores coordinates (xv1, yv1) and (xv2, yv2) indicating the center region v, and initial values, MIN values, and MAX values of applied voltages applied to the liquid lens 212. It shall be. The MIN value of the applied voltage is the maximum value of the applied voltage in which the focal position of the symbol to be combined becomes the farthest (maximum focal length) within the adjustable range. The MAX value of the applied voltage is the minimum value of the applied voltage in which the focal position of the symbol to be matched is closest (focal length is minimized) within an adjustable range. The initial value of the applied voltage is a value of a preset applied voltage that is between the MAX value and the MIN value.

次に、図18及び図19を参照して、スキャナ装置1の動作を説明する。図18に、第2のシンボル読み取り処理を示す。図19に、第2のシンボル読み取り処理の印加電圧変更処理を示す。   Next, the operation of the scanner device 1 will be described with reference to FIGS. FIG. 18 shows the second symbol reading process. FIG. 19 shows an applied voltage changing process of the second symbol reading process.

第2のシンボル読み取り処理は、フレーム画像の中心領域のコントラストに応じて液体レンズ212の焦点位置をターゲットのシンボルの焦点位置に合わせるとともに、イメージャモジュール21にシンボルの種類に応じた撮像領域でシンボルをスキャンさせ、取得したシンボルの画像データをデコードする処理である。スキャナ装置1において、トリガキー12A,12Cがユーザにより押下入力されたことをトリガとして、CPU11は、ROM15から読み出されてRAM13に適宜展開された第2のシンボル読み取りプログラム152との協働で、第2のシンボル読み取り処理を実行する。   In the second symbol reading process, the focal position of the liquid lens 212 is adjusted to the focal position of the target symbol in accordance with the contrast of the center area of the frame image, and the symbol is displayed in the imaging area corresponding to the type of symbol in the imager module 21. This is a process of decoding the image data of the symbol obtained by scanning. In the scanner apparatus 1, triggered by the user pressing the trigger keys 12 </ b> A and 12 </ b> C as a trigger, the CPU 11 cooperates with the second symbol reading program 152 that is read from the ROM 15 and appropriately expanded in the RAM 13. 2 symbol reading processing is executed.

図18に示すように、先ず、ステップS61は、図14の第1のシンボル読み取り処理のステップS11と同様である。そして、CPU11は、フラッシュメモリ17に記憶された印加電圧の初期値を読み出し、液体レンズ212への印加電圧を、読み出した印加電圧の初期値に設定し、フラグFに0を設定する(ステップS62)。フラグFを、0とNとMとの3つの状態をとるフラグとする。フラグFの0は、印加電圧が初期値である状態を示す値とする。フラグFのNは、印加電圧を増加していく状態を示す値とする。フラグFのMは、印加電圧を減少していく状態を示す値とする。そして、CPU11は、印加電圧変更処理を実行する(ステップS63)。   As shown in FIG. 18, first, step S61 is the same as step S11 of the first symbol reading process of FIG. Then, the CPU 11 reads the initial value of the applied voltage stored in the flash memory 17, sets the applied voltage to the liquid lens 212 to the read initial value of the applied voltage, and sets 0 to the flag F (step S62). ). The flag F is a flag that takes three states of 0, N, and M. 0 of the flag F is a value indicating a state where the applied voltage is an initial value. N of the flag F is a value indicating a state in which the applied voltage is increased. M of the flag F is a value indicating a state in which the applied voltage is decreased. And CPU11 performs an applied voltage change process (step S63).

ここで、図19を参照して、ステップS63の印加電圧変更処理を説明する。先ず、CPU11は、フラグFが0であるか否かを判別する(ステップS631)。フラグFが0である場合(ステップS631;YES)、CPU11は、フラグFにNを設定する(ステップS632)。そして、CPU11は、液体レンズ212への印加電圧を、設定中の印加電圧に変更する指示信号をイメージャコントローラ19に出力し(ステップS633)、印加電圧変更処理を終了する。   Here, with reference to FIG. 19, the applied voltage changing process in step S63 will be described. First, the CPU 11 determines whether or not the flag F is 0 (step S631). When the flag F is 0 (step S631; YES), the CPU 11 sets N to the flag F (step S632). Then, the CPU 11 outputs an instruction signal for changing the applied voltage to the liquid lens 212 to the applied voltage being set to the imager controller 19 (step S633), and ends the applied voltage changing process.

フラグFが0でない場合(ステップS631;NO)、CPU11は、フラグFがNであるか否かを判別する(ステップS634)。フラグFがNである場合(ステップS634;YES)、CPU11は、液体レンズ212への印加電圧を、所定値増加するよう設定する(ステップS635)。   When the flag F is not 0 (step S631; NO), the CPU 11 determines whether or not the flag F is N (step S634). When the flag F is N (step S634; YES), the CPU 11 sets the voltage applied to the liquid lens 212 to increase by a predetermined value (step S635).

そして、CPU11は、設定中の印加電圧が、フラッシュメモリ17に記憶されたMAX値より大きいか否かを判別する(ステップS636)。設定中の印加電圧がMAX値より大きい場合(ステップS636;YES)、CPU11は、フラッシュメモリ17に記憶された印加電圧の初期値を読み出し、液体レンズ212への印加電圧を、読み出した印加電圧の初期値に設定し、フラグFにMを設定し(ステップS637)、ステップS633に移行される。設定中の印加電圧がMAX値より大きくない場合(ステップS636;NO)、ステップS633に移行される。   Then, the CPU 11 determines whether or not the applied voltage being set is larger than the MAX value stored in the flash memory 17 (step S636). When the applied voltage being set is larger than the MAX value (step S636; YES), the CPU 11 reads the initial value of the applied voltage stored in the flash memory 17, and sets the applied voltage to the liquid lens 212 to the read applied voltage. The initial value is set, M is set in the flag F (step S637), and the process proceeds to step S633. When the applied voltage being set is not larger than the MAX value (step S636; NO), the process proceeds to step S633.

フラグFがNでない場合(ステップS634;NO)、フラグFがMであり、CPU11は、液体レンズ212への印加電圧を、所定値減少するよう設定する(ステップS638)。そして、CPU11は、設定中の印加電圧が、フラッシュメモリ17に記憶されたMIN値より小さいか否かを判別する(ステップS639)。   If the flag F is not N (step S634; NO), the flag F is M, and the CPU 11 sets the voltage applied to the liquid lens 212 to be decreased by a predetermined value (step S638). Then, the CPU 11 determines whether or not the applied voltage being set is smaller than the MIN value stored in the flash memory 17 (step S639).

設定中の印加電圧がMIN値より小さい場合(ステップS639;YES)、CPU11は、フラッシュメモリ17に記憶された印加電圧の初期値を読み出し、液体レンズ212への印加電圧を、読み出した印加電圧の初期値に設定し、フラグFにNを設定し(ステップS640)、ステップS633に移行される。設定中の印加電圧がMIN値より小さくない場合(ステップS639;NO)、ステップS633に移行される。   If the applied voltage being set is smaller than the MIN value (step S639; YES), the CPU 11 reads the initial value of the applied voltage stored in the flash memory 17, and sets the applied voltage to the liquid lens 212 to the read applied voltage. The initial value is set, N is set in the flag F (step S640), and the process proceeds to step S633. When the applied voltage being set is not smaller than the MIN value (step S639; NO), the process proceeds to step S633.

図18に戻り、ステップS63の実行後、CPU11は、エイマー213の点灯の指示信号と、撮像素子211の中心領域vのキャプチャ(撮像)の指示信号とを、イメージャコントローラ19に出力する(ステップS64)。中心領域vのキャプチャの指示信号とは、フラッシュメモリ17に記憶されている座標(xv1,yv1)及び座標(xv2,yv2)で定義された中心領域vのラインデータの取得の指示信号である。   Returning to FIG. 18, after executing step S <b> 63, the CPU 11 outputs an instruction signal for lighting the aimer 213 and an instruction signal for capturing (imaging) the center region v of the image sensor 211 to the imager controller 19 (step S <b> 64). ). The instruction signal for capturing the center region v is an instruction signal for acquiring line data of the center region v defined by the coordinates (xv1, yv1) and the coordinates (xv2, yv2) stored in the flash memory 17.

そして、CPU11は、DMA機能により、撮像素子211からイメージャコントローラ19に入力された中心領域vのラインデータをRAM13にDMA転送して記憶させる(ステップS65)。そして、CPU11は、RAM13に記憶された中心領域vの画像データ(ラインデータ)を読み出し、この中心領域画像のコントラストを算出する(ステップS66)。   Then, the CPU 11 DMA-transfers and stores the line data of the center region v input from the image sensor 211 to the imager controller 19 to the RAM 13 by the DMA function (step S65). Then, the CPU 11 reads the image data (line data) of the central area v stored in the RAM 13 and calculates the contrast of the central area image (step S66).

そして、CPU11は、ステップS66で算出したコントラストが予め設定された一定値以上であるか、又は最初のステップS63の実行から予め設定された一定時間をタイムアウトしたか、否かを判別する(ステップS67)。コントラストが一定値以上でなく且つタイムアウトもしていない場合(ステップS67;NO)、ステップS63に移行される。   Then, the CPU 11 determines whether or not the contrast calculated in step S66 is greater than or equal to a predetermined value set in advance, or whether a predetermined time set in advance from the execution of the first step S63 has timed out (step S67). ). If the contrast is not equal to or greater than a certain value and has not timed out (step S67; NO), the process proceeds to step S63.

コントラストが一定値以上であり又はタイムアウトした場合(ステップS67;YES)、CPU11は、ステップS68を実行する。ステップS68は、図14の第1のシンボル読み取り処理のステップS20と同様である。そして、CPU11は、フラッシュメモリ17に記憶された印加電圧テーブル173を参照し、ステップS63で変更した印加電圧1731に対応する焦点位置1732を読み出して取得する(ステップS69)。ステップS70〜S79は、図14の第1のシンボル読み取り処理のステップS22〜S31と同様である。   If the contrast is equal to or greater than a certain value or times out (step S67; YES), the CPU 11 executes step S68. Step S68 is the same as step S20 of the first symbol reading process of FIG. Then, the CPU 11 refers to the applied voltage table 173 stored in the flash memory 17 and reads and acquires the focal position 1732 corresponding to the applied voltage 1731 changed in step S63 (step S69). Steps S70 to S79 are the same as steps S22 to S31 of the first symbol reading process of FIG.

以上、本変形例によれば、スキャナ装置1は、撮像素子211からフレーム画像の一部の中心領域vの画像を取り込み、この中心領域vの画像が一定値以上のコントラストになった焦点位置を、そのときの印加電圧1731に対応する被写体までの焦点位置1732として印加電圧テーブル173から読み出す。このため、実施の形態と同様に、シンボルに液体レンズ212の焦点位置を合わせるとともに、その後のシンボルの読み取り応答速度を高めることができ、スキャナ装置1の操作性を向上でき、さらに、中心領域vの画像のコントラストに応じてシンボルの焦点位置を容易に検出できる。   As described above, according to the present modification, the scanner device 1 captures an image of a part of the central region v of the frame image from the image sensor 211, and determines the focal position where the image of the central region v has a contrast of a certain value or more. The focus position 1732 to the subject corresponding to the applied voltage 1731 at that time is read out from the applied voltage table 173. Therefore, similarly to the embodiment, the focal position of the liquid lens 212 can be adjusted to the symbol, the reading response speed of the subsequent symbol can be increased, the operability of the scanner device 1 can be improved, and the central region v can be improved. The focal position of the symbol can be easily detected according to the contrast of the image.

以上の説明では、本発明に係るプログラムのコンピュータ読み取り可能な媒体としてROM15を使用した例を開示したが、この例に限定されない。その他のコンピュータ読み取り可能な媒体として、フラッシュメモリ17等の不揮発性メモリ、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 17 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.

なお、上記実施の形態及び変形例における記述は、本発明に係るスキャナ装置及びプログラムの一例であり、これに限定されるものではない。   Note that the descriptions in the above-described embodiments and modifications are examples of the scanner device and the program according to the present invention, and the present invention is not limited thereto.

上記実施の形態では、エイマー213のレーザ光の映像の位置からシンボルの焦点位置を取得する構成を説明したが、これに限定されるものではない。シンボルの焦点位置を特定する映像は、基準となる他のスポット光の映像でもよい。この映像は、スキャナ装置1との距離に応じて、フレーム画像全体の中でその位置が相対的に変化するものであればよい。例えば、スポット光は、光学系212Aの光軸方向に沿ってほぼ平行に照射されればよい。   In the above embodiment, the configuration in which the focal position of the symbol is acquired from the position of the image of the laser beam of the aimer 213 has been described. However, the present invention is not limited to this. The image for specifying the focal position of the symbol may be an image of another spot light serving as a reference. This video image may be any image whose position changes relative to the entire frame image according to the distance from the scanner device 1. For example, the spot light may be irradiated substantially in parallel along the optical axis direction of the optical system 212A.

また、上記実施の形態及び変形例では、焦点可変レンズとして、液体レンズ212を用いる構成としたが、これに限定されるものではない。例えば、印加電圧により屈折率が変化する「電気光学結晶」の一種であるKTN(タンタル酸ニオブ酸カリウム、KTa1−xNb)を用いた可変焦点レンズや、機械的にレンズ位置を調整して焦点を合わせる可変焦点レンズ等、他の可変焦点レンズとしてもよい。本願では、これらを総称して可変焦点レンズという。 Moreover, in the said embodiment and modification, although it was set as the structure which uses the liquid lens 212 as a focus variable lens, it is not limited to this. For example, a variable focus lens using KTN (potassium niobate tantalate, KTa 1-x Nb x O 3 ), which is a kind of “electro-optic crystal” whose refractive index changes depending on the applied voltage, or a mechanical lens position. Other variable focus lenses such as a variable focus lens for adjusting and focusing may be used. In the present application, these are collectively referred to as a variable focus lens.

また、上記実施の形態では、エイマー213の光の映像を含む切り出し領域は、予め定めた領域(座標(x1,y1)及び座標(x2,y2)で表される矩形領域)である例で説明したが、これに限定されるものではない。例えば、エイマーの光の映像を含む切り出し画像は、図14のステップS12でその位置が既に検出されているので、同図のステップS16では、エイマー213のレーザ光の映像が含まれる部分領域であればよく、前記予め定めた領域より狭い領域を決定でき、この決定された領域の画像を切り出し領域の画像として取得する構成としてもよい。この部分領域は前記予め定めた領域より狭いので、一定値以上のコントラストが検出されるまで繰り返されるステップS16〜ステップS19の処理、即ち、切り出し画像の画像データの転送処理と、コントラスト検出処理と、の時間をより短縮でき、迅速な処理が可能になる。   In the above embodiment, the cutout area including the light image of the aimer 213 is described as an example of a predetermined area (rectangular area represented by coordinates (x1, y1) and coordinates (x2, y2)). However, the present invention is not limited to this. For example, since the position of the cut-out image including the image of the aimer light has already been detected in step S12 in FIG. 14, in step S16 in FIG. The area narrower than the predetermined area may be determined, and an image of the determined area may be acquired as an image of the cutout area. Since this partial area is narrower than the predetermined area, the processes in steps S16 to S19 that are repeated until a contrast of a certain value or more is detected, that is, the image data transfer process of the cut-out image, the contrast detection process, Time can be further shortened, and rapid processing becomes possible.

また、上記実施の形態では、被写体までの距離を示すエイマー213のレーザ光の映像の位置と、液体レンズ212への印加電圧と、シンボルの焦点位置と、の関係を印加電圧テーブル171に予め記憶した例で説明したが、これに限定されるものではない。エイマー213のレーザ光の映像の位置と、液体レンズ212への印加電圧と、シンボルの焦点位置と、の関係を計算式で表し、エイマー213のレーザ光の映像の位置(エイマー位置)から液体レンズ212への印加電圧及びシンボルの焦点位置を上記計算式により直接算出する構成としてもよい。同様に、上記変形例での印加電圧テーブル173に代えて、液体レンズ212への印加電圧とシンボルの焦点位置との関係を計算式で表す構成としてもよい。上記計算式は、例えば、フラッシュメモリ17に記憶される。   In the above embodiment, the relationship between the position of the image of the laser beam of the aimer 213 indicating the distance to the subject, the voltage applied to the liquid lens 212, and the focal position of the symbol is stored in the applied voltage table 171 in advance. However, the present invention is not limited to this. The relationship between the position of the image of the laser beam of the aimer 213, the voltage applied to the liquid lens 212, and the focal position of the symbol is expressed by a calculation formula. The voltage applied to 212 and the focal position of the symbol may be directly calculated by the above formula. Similarly, instead of the applied voltage table 173 in the modified example, the relationship between the applied voltage to the liquid lens 212 and the focal position of the symbol may be expressed by a calculation formula. The above calculation formula is stored in the flash memory 17, for example.

また、上記実施の形態及び変形例では、エイマー213から照射されるスポット光(レーザ光)の映像形状を、円形として説明したが、これに限定されるものではない。スポット光の映像形状は、十字形状等、他の形状であってもよい。   Moreover, in the said embodiment and modification, although the image shape of the spot light (laser beam) irradiated from the aimer 213 was demonstrated as circular, it is not limited to this. The image shape of the spot light may be another shape such as a cross shape.

また、上記実施の形態及び変形例では、イメージャコントローラ19がASIC等の半導体回路であることとして説明したが、これに限定されるものではない。例えば、イメージャコントローラ19が、CPU、RAM及びROMにより構成され、ROMから読み出されてRAMに展開されたプログラムとCPUとの協働により、イメージャコントローラ19が処理を実行する構成としてもよい。   In the above-described embodiments and modifications, the imager controller 19 is described as a semiconductor circuit such as an ASIC, but the present invention is not limited to this. For example, the imager controller 19 may be configured by a CPU, a RAM, and a ROM, and the imager controller 19 may execute processing in cooperation with a program that is read from the ROM and expanded in the RAM.

また、上記変形例では、フレーム画像q内に固定され、エイマー213のレーザ光の映像が含まれない特定領域である中心領域vのコントラストが一定値以上の焦点位置を検出する構成であったが、これに限定されるものではない。例えば、フレーム画像q内のエイマー213のレーザ光の映像が必ず含まれる特定領域のコントラストが一定値以上の焦点位置を検出する構成としてもよい。例えば、エイマー213のレーザ光の映像を中心とした大きさが固定の特定領域である。   Further, in the above modification, the focus position is fixed in the frame image q and the focal position where the contrast of the central region v which is a specific region not including the image of the laser beam of the aimer 213 is a certain value or more is detected. However, the present invention is not limited to this. For example, it may be configured to detect a focal position where the contrast of a specific area in which the image of the laser beam of the aimer 213 in the frame image q is always included is a certain value or more. For example, the specific area is fixed in size with the image of the laser beam of the aimer 213 as the center.

また、上記変形例では、液体レンズ212への印加電圧の初期値をMAX値及びMIN値の間の値とし、この印加電圧を、初期値→MAX値、初期値→MIN値へと変化させる構成としたが、これに限定されるものではない。例えば、液体レンズ212への印加電圧の初期値をMAX値とし、この印加電圧を初期値(MAX値)→MIN値と変化させる構成としてもよい。逆に、液体レンズ212への印加電圧の初期値をMIN値とし、この印加電圧を初期値(MIN値)→MAX値と変化させる構成としてもよい。   In the above modification, the initial value of the voltage applied to the liquid lens 212 is set to a value between the MAX value and the MIN value, and the applied voltage is changed from the initial value to the MAX value and from the initial value to the MIN value. However, the present invention is not limited to this. For example, the initial value of the voltage applied to the liquid lens 212 may be the MAX value, and the applied voltage may be changed from the initial value (MAX value) to the MIN value. Conversely, the initial value of the voltage applied to the liquid lens 212 may be the MIN value, and the applied voltage may be changed from the initial value (MIN value) to the MAX value.

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

1 スキャナ装置
2 ケース
11 CPU
12 操作部
12A,12C トリガキー
12B 各種キー
13 RAM
14 表示部
15 ROM
16 通信部
17 フラッシュメモリ
18 音出力部
18A スピーカ
19 イメージャコントローラ
20 電圧昇圧部
21 イメージャモジュール
211 撮像素子
212 液体レンズ
2121,2122 液体部
2123 容器
2124 電極
212A 光学系
213 エイマー
214 イルミネーション
22 電源部
23 バス
30 電源
41 シンボル
1 Scanner device 2 Case 11 CPU
12 Operation units 12A, 12C Trigger key 12B Various keys 13 RAM
14 Display 15 ROM
16 Communication unit 17 Flash memory 18 Sound output unit 18A Speaker 19 Imager controller 20 Voltage booster unit 21 Imager module 211 Image sensor 212 Liquid lens 2121, 1222 Liquid unit 2123 Container 2124 Electrode 212A Optical system 213 Aimer 214 Illumination 22 Power supply unit 23 Bus 30 Power supply 41 symbol

Claims (8)

可変焦点レンズと、
焦点位置に応じたフレーム画像中の撮像領域を記憶する記憶部と、
可変焦点レンズの焦点位置を駆動制御する駆動部と、
被写体のシンボルの焦点位置を検出する検出部と、
前記駆動部により前記可変焦点レンズの焦点位置を前記検出された焦点位置に移動させ、前記検出された焦点位置に対応した撮像領域を前記記憶部から読み出し、当該読み出した撮像領域の画像を取り込む撮像制御部と、
前記取り込まれた撮像領域の画像に含まれるシンボル画像をデコードするデコード部と、を備えるスキャナ装置。
A variable focus lens,
A storage unit for storing an imaging region in the frame image according to the focal position;
A drive unit that drives and controls the focal position of the variable focus lens;
A detection unit for detecting the focal position of the symbol of the subject;
Imaging in which the driving unit moves the focal position of the variable focus lens to the detected focal position, reads an imaging area corresponding to the detected focal position from the storage unit, and captures an image of the read imaging area A control unit;
And a decoding unit that decodes a symbol image included in the captured image of the imaging region.
前記記憶部は、シンボルの種類及び焦点位置に応じた撮像領域を記憶し、
前記撮像制御部は、前記被写体のシンボルの種類及び前記検出された焦点位置に対応した撮像領域を前記記憶部から読み出す請求項1記載のスキャナ装置。
The storage unit stores an imaging region corresponding to a symbol type and a focal position,
The scanner device according to claim 1, wherein the imaging control unit reads an imaging region corresponding to the type of the symbol of the subject and the detected focal position from the storage unit.
前記記憶部は、焦点位置が遠くなるほど小さくなる撮像領域を記憶する請求項1又は2記載のスキャナ装置。   The scanner device according to claim 1, wherein the storage unit stores an imaging region that becomes smaller as the focal position becomes farther. 前記撮像領域は、焦点位置が遠くなるほど小さくなるシンボルの大きさのシンボル領域と、当該シンボル領域の周囲のマージンと、からなり、
マージンの値の入力を受け付ける操作部を備え、
前記撮像制御部は、前記記憶部から読み出した撮像領域のマージンとして、前記操作部より入力されたマージンの値を設定して撮像領域の画像を取り込む請求項3記載のスキャナ装置。
The imaging area is composed of a symbol area having a symbol size that becomes smaller as the focal position becomes farther, and a margin around the symbol area,
It has an operation unit that accepts input of margin values,
The scanner apparatus according to claim 3, wherein the imaging control unit captures an image of the imaging area by setting a margin value input from the operation unit as a margin of the imaging area read from the storage unit.
スポット光を照射するスポット光照射部を備え、
前記撮像制御部は、前記スポット光の映像を含む画像を撮像し、
前記検出部は、前記撮像制御部により撮像された画像中のスポット光の映像の位置から、前記被写体の焦点位置を検出する請求項1から4のいずれか一項に記載のスキャナ装置。
Provided with a spot light irradiation unit that irradiates spot light,
The imaging control unit captures an image including an image of the spot light,
5. The scanner device according to claim 1, wherein the detection unit detects a focal position of the subject from a position of a spot light image in an image captured by the imaging control unit.
前記撮像制御部は、前記検出部が焦点位置を検出した後に、前記スポット光照射部を消灯し、前記検出された焦点位置に対応した撮像領域の画像を取り込む請求項5に記載のスキャナ装置。   The scanner device according to claim 5, wherein the imaging control unit turns off the spot light irradiation unit after the detection unit detects a focal position, and captures an image of an imaging region corresponding to the detected focal position. 前記検出部は、前記撮像制御部からフレーム画像の一部の特定領域の画像を取り込み、この特定領域の画像が所定値以上のコントラストになった焦点位置を、被写体までの焦点位置として検出する請求項1から4のいずれか一項に記載のスキャナ装置。   The detection unit captures an image of a specific region of a part of a frame image from the imaging control unit, and detects a focal position where the image of the specific region has a contrast of a predetermined value or more as a focal position to a subject. Item 5. The scanner device according to any one of Items 1 to 4. コンピュータを、
焦点位置に応じたフレーム画像中の撮像領域を記憶する記憶部、
可変焦点レンズの焦点位置を駆動制御する駆動部、
被写体のシンボルの焦点位置を検出する検出部、
前記駆動部により前記可変焦点レンズの焦点位置を前記検出された焦点位置に移動させ、前記検出された焦点位置に対応した撮像領域を前記記憶部から読み出し、当該読み出した撮像領域の画像を取り込む撮像制御部、
前記取り込まれた撮像領域の画像に含まれるシンボル画像をデコードするデコード部、
として機能させるためのプログラム。
Computer
A storage unit for storing an imaging region in a frame image according to a focal position;
A drive unit that drives and controls the focal position of the variable focus lens;
A detection unit for detecting the focal position of the symbol of the subject;
Imaging in which the driving unit moves the focal position of the variable focus lens to the detected focal position, reads an imaging area corresponding to the detected focal position from the storage unit, and captures an image of the read imaging area Control unit,
A decoding unit for decoding a symbol image included in the captured image of the imaging region;
Program to function as.
JP2010189126A 2010-08-26 2010-08-26 Scanner device and program Pending JP2012048441A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010189126A JP2012048441A (en) 2010-08-26 2010-08-26 Scanner device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010189126A JP2012048441A (en) 2010-08-26 2010-08-26 Scanner device and program

Publications (1)

Publication Number Publication Date
JP2012048441A true JP2012048441A (en) 2012-03-08

Family

ID=45903246

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010189126A Pending JP2012048441A (en) 2010-08-26 2010-08-26 Scanner device and program

Country Status (1)

Country Link
JP (1) JP2012048441A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005182518A (en) * 2003-12-19 2005-07-07 Tohken Co Ltd Code reader
JP2006277481A (en) * 2005-03-30 2006-10-12 Matsushita Electric Ind Co Ltd Optical information reader

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005182518A (en) * 2003-12-19 2005-07-07 Tohken Co Ltd Code reader
JP2006277481A (en) * 2005-03-30 2006-10-12 Matsushita Electric Ind Co Ltd Optical information reader

Similar Documents

Publication Publication Date Title
JP5252023B2 (en) Code reader and program
EP3076330B1 (en) Aimer for barcode scanning
JP4905572B2 (en) Bar code reader
JP4403975B2 (en) Optical information reader
JP5234133B2 (en) Code reader and program
US8903201B2 (en) Method and apparatus for enhanced document capture
JP2005202930A (en) Optical information reading device
US20140166758A1 (en) Method of driving focusing element in barcode imaging scanner
US9241086B1 (en) Image-reading apparatus
EP3370403B1 (en) Reading device and mobile terminal
JP6658696B2 (en) Barcode reader, control method and program therefor
JP6183421B2 (en) Image processing apparatus and program
JP5794336B2 (en) Image processing apparatus and program
JP5092771B2 (en) Imaging device, photographing method, photographing program
JP6885832B2 (en) Bar code reader, image acquisition method, and program
JP5515887B2 (en) Scanner device and program
JP4293199B2 (en) Optical information reader
JP2012048441A (en) Scanner device and program
JP5737311B2 (en) Code reader and program
JP4983624B2 (en) Imaging device, photographing method, photographing program
JP7367314B2 (en) Code reading device, code reading method and program
JP3891981B2 (en) Information terminal equipment
JP5375980B2 (en) Bar code reader and program
JP2013055616A (en) Image display apparatus
JP7230388B2 (en) BARCODE READER, BARCODE READING METHOD AND PROGRAM

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130809

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140324

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140408

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140605

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20140805