JP7367314B2 - Code reading device, code reading method and program - Google Patents

Code reading device, code reading method and program Download PDF

Info

Publication number
JP7367314B2
JP7367314B2 JP2019055903A JP2019055903A JP7367314B2 JP 7367314 B2 JP7367314 B2 JP 7367314B2 JP 2019055903 A JP2019055903 A JP 2019055903A JP 2019055903 A JP2019055903 A JP 2019055903A JP 7367314 B2 JP7367314 B2 JP 7367314B2
Authority
JP
Japan
Prior art keywords
code
exposure time
image
decoding
size
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.)
Active
Application number
JP2019055903A
Other languages
Japanese (ja)
Other versions
JP2020160486A (en
Inventor
知徳 入江
泰明 小川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2019055903A priority Critical patent/JP7367314B2/en
Publication of JP2020160486A publication Critical patent/JP2020160486A/en
Application granted granted Critical
Publication of JP7367314B2 publication Critical patent/JP7367314B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、コード読取装置、コード読取方法及びプログラムに関する。 The present invention relates to a code reading device , a code reading method , and a program.

従来、プレスキャンで読取られるプレスキャン画像における指定された読取範囲内の画像を解析し、プレスキャン画像の出力値の最大値が閾値より小さい場合、プレスキャン画像の出力値の最大値がスキャナ装置のダイナミックレンジの最大値となるように露光時間を調整し、本スキャンの画像読取りを行う画像読取制御方法が開示されている(例えば、特許文献1参照)。 Conventionally, when an image within a specified reading range of a prescan image read by prescan is analyzed, and if the maximum value of the output value of the prescan image is smaller than a threshold value, the maximum value of the output value of the prescan image is detected by the scanner device. An image reading control method has been disclosed in which the exposure time is adjusted to reach the maximum value of the dynamic range, and the image of the main scan is read (for example, see Patent Document 1).

特開2000-287040号公報Japanese Patent Application Publication No. 2000-287040

しかしながら、上記特許文献1に開示されている画像読取制御方法では、暗い原稿を読み取る場合、露光時間の調整によってスキャンのフレームレートが低下するため、読み取りに時間がかかってしまうという問題がある。 However, the image reading control method disclosed in Patent Document 1 has a problem in that when reading a dark original, the scanning frame rate is lowered by adjusting the exposure time, so that reading takes time.

本発明は、このような問題に鑑みてなされたものであり、暗所でも効率良く読み取りを行うことを目的とする。 The present invention has been made in view of such problems, and an object of the present invention is to efficiently perform reading even in a dark place.

上記課題を解決するため、本発明に係るコード読取装置は、光学的に読取可能なコードを読み取るコード読取装置であって、前記コードの画像を撮影する撮像手段と、前記撮像手段により撮影されたコードの画像に基づいて、当該コードをデコードするデコード手段と、前記デコード手段によるデコードに失敗した場合に、当該デコードの対象となったコードの画像に基づいて前記撮像手段による次回以降のコードの画像の撮影時の露光時間と次回以降のコードの画像の出力画像サイズとを調整し、前記次回以降のコードの画像の撮影時にこの調整された露光時間で撮影を行わせ、前記出力画像サイズのコードの画像を出力するよう制御する制御手段と、を備え、前記制御手段は、前記デコード手段によるデコードに失敗した場合であって前記デコードの対象となったコードの画像に基づいて前記撮像手段による次回以降のコードの画像の撮影時の露光時間と次回以降のコードの画像の出力画像サイズとを調整する場合には、前記デコードの対象となったコードの画像の輝度値に基づい前記次回以降のコードの画像の撮影時において候補となる露光時間を決定し、この決定された候補となる露光時間の長さが予め定めた最小露光時間の長さよりも短い場合、前記露光時間を当該最小露光時間に調整するととも前記出力画像サイズを所定のサイズに調整する、ことを特徴とする。
また、本発明に係るコード読取方法は、光学的に読取可能なコードを読み取るコード読取装置が実行するコード読取方法であって、前記コードの画像を撮影する撮像ステップと、前記撮像ステップで撮影されたコードの画像に基づいて、当該コードをデコードするデコードステップと、前記デコードステップでデコードに失敗した場合に、当該デコードの対象となったコードの画像に基づいて次回以降のコードの画像の撮影時の露光時間と次回以降のコードの画像の出力画像サイズとを調整し、前記次回以降のコードの画像の撮影時にこの調整された露光時間で撮影を行わせ、前記出力画像サイズのコードの画像を出力するよう制御する制御ステップと、を有し、前記制御ステップは、前記デコードステップでデコードに失敗した場合であって前記デコードの対象となったコードの画像に基づいて次回以降のコードの画像の撮影時の露光時間と次回以降のコードの画像の出力画像サイズとを調整する場合には、前記デコードの対象となったコードの画像の輝度値に基づい前記次回以降のコードの画像の撮影時において候補となる露光時間を決定し、この決定された候補となる露光時間の長さが予め定めた最小露光時間の長さよりも短い場合、前記露光時間を当該最小露光時間に調整するととも前記出力画像サイズを所定のサイズに調整する、ことを特徴とする。
また、本発明に係るプログラムは、光学的に読取可能なコードの画像を撮影する撮像手段を備えるコード読取装置のコンピューターを、前記撮像手段により撮影されたコードの画像に基づいて、当該コードをデコードするデコード手段、前記デコード手段によるデコードに失敗した場合に、当該デコードの対象となったコードの画像に基づいて前記撮像手段による次回以降のコードの画像の撮影時の露光時間と次回以降のコードの画像の出力画像サイズとを調整し、前記次回以降のコードの画像の撮影時にこの調整された露光時間で撮影を行わせ、前記出力画像サイズのコードの画像を出力するよう制御する制御手段として機能させ、前記制御手段は、前記デコード手段によるデコードに失敗した場合であって前記デコードの対象となったコードの画像に基づいて前記撮像手段による次回以降のコードの画像の撮影時の露光時間と次回以降のコードの画像の出力画像サイズとを調整する場合には、前記デコードの対象となったコードの画像の輝度値に基づい前記次回以降のコードの画像の撮影時において候補となる露光時間を決定し、この決定された候補となる露光時間の長さが予め定めた最小露光時間の長さよりも短い場合、前記露光時間を当該最小露光時間に調整するととも前記出力画像サイズを所定のサイズに調整する、ことを特徴とする。
In order to solve the above problems, a code reading device according to the present invention is a code reading device that reads an optically readable code, and includes an imaging means for taking an image of the code, and an image taken by the imaging means. a decoding means for decoding the code based on an image of the code, and a subsequent image of the code by the imaging means based on the image of the code to be decoded when the decoding by the decoding means fails; Adjust the exposure time at the time of shooting and the output image size of the next code image , and make the next code image shoot with this adjusted exposure time, and adjust the output image size of the next code image. control means for controlling the output of an image of the code , the control means controlling the output of the image of the code based on the image of the code to be decoded when the decoding by the decoding means fails; When adjusting the exposure time when photographing the next and subsequent code images and the output image size of the next and subsequent code images, the next and subsequent code images are adjusted based on the brightness value of the code image targeted for decoding . When taking an image of the code, determine the candidate exposure time , and if the length of the determined candidate exposure time is shorter than the predetermined minimum exposure time, the exposure time is set to the minimum exposure time. The method is characterized in that the output image size is adjusted to a predetermined size while adjusting the time.
Further, the code reading method according to the present invention is a code reading method executed by a code reading device that reads an optically readable code, and includes an imaging step of photographing an image of the code; a decoding step of decoding the code based on the image of the code that has been decoded, and when decoding fails in the decoding step, the next time the image of the code is taken based on the image of the code that is the target of decoding. and the output image size of the next and subsequent code images, and when shooting the next and subsequent code images, shooting is performed with this adjusted exposure time, and the code image of the output image size is adjusted. and a control step for controlling to output a code image from the next time onwards based on the image of the code to be decoded when decoding fails in the decoding step. When adjusting the exposure time when photographing and the output image size of subsequent code images, the next and subsequent code images are photographed based on the luminance value of the code image targeted for decoding. If the length of the determined candidate exposure time is shorter than the predetermined minimum exposure time, the exposure time is adjusted to the minimum exposure time , and The method is characterized in that the output image size is adjusted to a predetermined size.
Further, the program according to the present invention causes a computer of a code reading device equipped with an imaging means for taking an image of an optically readable code to decode the code based on an image of the code taken by the imaging means. a decoding means for decoding, and when the decoding by the decoding means fails, the exposure time of the next and subsequent code images taken by the imaging means and the next and subsequent code images are determined based on the image of the code to be decoded. a control means for adjusting the output image size of the image, causing the next and subsequent code images to be photographed using the adjusted exposure time, and controlling the image to output the code image having the output image size ; The control means controls the exposure time when the imaging means takes subsequent images of the code based on the image of the code that is the target of the decoding when decoding by the decoding means fails. When adjusting the output image size of the next code image and the output image size of the next code image, the exposure that becomes a candidate when shooting the next code image is based on the luminance value of the code image that is the target of the decoding. If the determined candidate exposure time is shorter than a predetermined minimum exposure time, the exposure time is adjusted to the minimum exposure time and the output image size is set to a predetermined value. It is characterized by being adjustable to the size of.

本発明によれば、暗所でも効率良く読み取りを行うことができる。 According to the present invention, reading can be performed efficiently even in a dark place.

本発明の実施形態のコード読取装置の全体構造を示す正面図である。1 is a front view showing the overall structure of a code reading device according to an embodiment of the present invention. コード読取装置の内部構成を示すブロック図である。FIG. 2 is a block diagram showing the internal configuration of a code reading device. イメージャモジュール及びイメージャコントローラの平面図である。FIG. 2 is a plan view of an imager module and an imager controller. コード読取装置によるコード読み取り処理の制御手順を示すフローチャートである。It is a flowchart which shows the control procedure of the code reading process by a code reading device. コード読取装置による露光時間・画像サイズ調整処理の制御手順を示すフローチャートである。It is a flowchart which shows the control procedure of exposure time and image size adjustment processing by a code reading device. (a)は撮像素子により撮影された画像全体のサイズを示す図であり、(b)は撮像素子により撮影された画像全体の半分のサイズを示す図であり、(c)はコード読み取り処理の時間配分を模式的に示した図である。(a) is a diagram showing the size of the entire image taken by the image sensor, (b) is a diagram showing half the size of the entire image taken by the image sensor, and (c) is a diagram showing the size of the entire image taken by the image sensor. FIG. 3 is a diagram schematically showing time allocation.

以下、本発明の実施の形態を図面に基づいて説明する。 Embodiments of the present invention will be described below based on the drawings.

図1は、本発明の実施形態のコード読取装置の全体構造を示す正面図である。
本実施形態のコード読取装置(コンピューター)1は、一次元バーコード、二次元コード等のコードの読み取り機能を有する携帯機器である。
FIG. 1 is a front view showing the overall structure of a code reading device according to an embodiment of the present invention.
The code reading device (computer) 1 of this embodiment is a portable device that has a function of reading codes such as one-dimensional barcodes and two-dimensional codes.

コード読取装置1は、筐体としてのケース2を備える。コード読取装置1は、ケース2の正面に、トリガキー12Aと、各種キー12Bと、表示部14と、を備える。コード読取装置1は、ケース2の側面に、トリガキー12Cを備える。また、コード読取装置1は、ケース2の先端部に、イメージャモジュール(スキャナデバイス)21を備える。 The code reading device 1 includes a case 2 as a housing. The code reading device 1 includes, on the front side of the case 2, a trigger key 12A, various keys 12B, and a display section 14. The code reading device 1 includes a trigger key 12C on the side surface of the case 2. The code reading device 1 also includes an imager module (scanner device) 21 at the tip of the case 2 .

トリガキー12A、12Cは、イメージャモジュール21によるコード読み取り動作の開始命令の入力を受け付けるトリガキーである。各種キー12Bは、数字、文字等の入力キー、機能キー等からなり、各種情報の入力操作を受け付ける。表示部14は、入力操作に係るメニューやステータスなどの情報、及び、イメージャモジュール21を用いたコード読み取り動作の実行時のステータスやデコード結果等の情報を表示する。 The trigger keys 12A and 12C are trigger keys that accept input of a command to start the code reading operation by the imager module 21. The various keys 12B include input keys for numbers, characters, etc., function keys, etc., and accept input operations for various information. The display unit 14 displays information such as menus and statuses related to input operations, and information such as statuses and decoding results when code reading operations using the imager module 21 are executed.

図2は、コード読取装置1の内部構成を示すブロック図である。 FIG. 2 is a block diagram showing the internal configuration of the code reading device 1. As shown in FIG.

コード読取装置1は、調整手段、制御手段、デコード手段、決定手段としてのCPU(Central Processing Unit)11と、操作部12と、RAM(Random Access Memory)13と、表示部14と、記憶部15と、通信部16と、イメージャコントローラ19と、イメージャモジュール21と、電源部22と、レーザ駆動電源23と、を備える。 The code reading device 1 includes a CPU (Central Processing Unit) 11 as an adjusting means, a control means, a decoding means, and a determining means, an operation section 12, a RAM (Random Access Memory) 13, a display section 14, and a storage section 15. , a communication section 16 , an imager controller 19 , an imager module 21 , a power supply section 22 , and a laser drive power supply 23 .

コード読取装置1のイメージャモジュール21及び電源部22を除く各部は、バス24を介して互いに接続されている。イメージャモジュール21は、撮像素子(撮像手段)211と、可変焦点レンズ212と、可変焦点レンズ212を駆動して焦点を調節するフォーカス機構213と、エイマー(発光手段)214と、イルミネーション(照明手段)215と、を有する。 Each section of the code reading device 1 except for the imager module 21 and the power supply section 22 is connected to each other via a bus 24. The imager module 21 includes an image sensor (imaging means) 211, a variable focus lens 212, a focus mechanism 213 that drives the variable focus lens 212 to adjust the focus, an aimer (light emitting means) 214, and an illumination (lighting means). 215.

CPU11は、コード読取装置1の各部を制御する。CPU11は、記憶部15から種々のプログラムを読み出してRAM13に展開し、RAM13に展開されたプログラムとの協働で各種処理を実行する。 The CPU 11 controls each part of the code reading device 1. The CPU 11 reads various programs from the storage unit 15, loads them into the RAM 13, and executes various processes in cooperation with the programs loaded into the RAM 13.

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

RAM13は、揮発性の半導体メモリであり、CPU11に作業用メモリ空間を提供する。また、RAM13は、各種データの一時記憶、及び、各種プログラムを実行する際の展開に用いられる。 The RAM 13 is a volatile semiconductor memory and provides the CPU 11 with a working memory space. Further, the RAM 13 is used for temporary storage of various data and for expansion when executing various programs.

表示部14は、LCD(Liquid Crystal Display)や、EL(Electro Luminescent)ディスプレイ等で構成され、CPU11から入力される表示情報に応じて各種情報を表示する。 The display unit 14 is composed of an LCD (Liquid Crystal Display), an EL (Electro Luminescent) display, etc., and displays various information according to display information input from the CPU 11.

記憶部15は、読み書きの可能な不揮発性メモリであり、例えば、フラッシュメモリである。記憶部15には、予め種々のプログラムや設定データが格納されている。或いは、記憶部15は、EEPROM(Electrically Erasable and Programmable Read Only Memory)やハードディスクであってもよい。又は、専用のコード読取装置においては、ROM(Read Only Memory)を用いることとしてもよい。この記憶部15に格納されたプログラムには、イメージャモジュール21を用いてコードをスキャンし、取得したコードの画像データをデコードする処理を行うプログラム15aが含まれる。 The storage unit 15 is a readable and writable nonvolatile memory, for example, a flash memory. The storage unit 15 stores various programs and setting data in advance. Alternatively, the storage unit 15 may be an EEPROM (Electrically Erasable and Programmable Read Only Memory) or a hard disk. Alternatively, a ROM (Read Only Memory) may be used in a dedicated code reading device. The programs stored in the storage unit 15 include a program 15a that scans a code using the imager module 21 and decodes image data of the obtained code.

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

また、通信部16は、携帯電話通信方式により、基地局を介してサーバ装置と無線通信する無線通信部としてもよい。また、通信部16は、コード読取装置1を載置するクレードル、又は通信ケーブルを介して、サーバ装置と有線通信する有線通信部としてもよい。 Furthermore, the communication unit 16 may be a wireless communication unit that wirelessly communicates with the server device via a base station using a mobile phone communication method. Further, the communication unit 16 may be a cradle on which the code reading device 1 is placed, or a wired communication unit that communicates with the server device via a communication cable.

イメージャコントローラ19は、イメージャモジュール21の各部の動作を制御し、イメージャモジュール21とコード読取装置1の他の部位との間のデータの送受信を制御する。イメージャコントローラ19は、ASIC(Application Specific Integrated Circuit)等の半導体回路により構成されている。 The imager controller 19 controls the operation of each part of the imager module 21 and controls the transmission and reception of data between the imager module 21 and other parts of the code reading device 1 . The imager controller 19 is made up of a semiconductor circuit such as an ASIC (Application Specific Integrated Circuit).

イメージャコントローラ19は、撮像素子211から、キャプチャされた画像データの1フレームの出力タイミングに同期したフレーム同期信号と、画像データの1ラインの出力タイミングに同期したライン同期信号と、画像データに同期するためのクロック信号と、が入力される。イメージャコントローラ19は、これらフレーム同期信号、ライン同期信号及びクロック信号に基づいて、RAM13への画像データの転送タイミングを監視する。イメージャコントローラ19は、撮像素子211からイメージャコントローラ19に入力された画像データを、CPU11を介さずに直接RAM13に転送するDMA(Direct Memory Access)転送機能を有する。 The imager controller 19 synchronizes with the image data from the image sensor 211 with a frame synchronization signal synchronized with the output timing of one frame of captured image data and a line synchronization signal synchronized with the output timing of one line of image data. A clock signal is input. The imager controller 19 monitors the timing of transferring image data to the RAM 13 based on these frame synchronization signals, line synchronization signals, and clock signals. The imager controller 19 has a DMA (Direct Memory Access) transfer function that directly transfers image data input to the imager controller 19 from the image sensor 211 to the RAM 13 without going through the CPU 11.

イメージャモジュール21は、可変焦点レンズ212の焦点位置を調整して被写体のコードを撮像するモジュールである。撮像素子211は、特には限られないが、CMOS(Complementary Metal Oxide Semiconductor:相補性金属酸化膜半導体)イメージセンサである。撮像素子211は、可変焦点レンズ212を含む光学系を介して入射された被写体像を光電変換して電気信号に変換することで、画像データをキャプチャ(取得)する。 The imager module 21 is a module that adjusts the focal position of the variable focus lens 212 to image the code of the subject. The image sensor 211 is, but is not particularly limited to, a CMOS (Complementary Metal Oxide Semiconductor) image sensor. The image sensor 211 captures (obtains) image data by photoelectrically converting a subject image incident through an optical system including a variable focus lens 212 into an electrical signal.

撮像素子211は、イメージャコントローラ19から入力された画像領域指定信号により指定されたラインの画像データを1ラインずつラインデータとしてイメージャコントローラ19に出力する。また、撮像素子211は、フレーム同期信号、ライン同期信号、及び、クロック信号をイメージャコントローラ19に出力する。可変焦点レンズ212は、例えば、液体レンズであり、イメージャモジュール21の光学系の一部を構成する光学素子である。この液体レンズは、フォーカス機構213に印加される電圧に応じて高速で焦点位置を変更可能な構成となっている。 The image sensor 211 outputs the image data of the line specified by the image area designation signal inputted from the imager controller 19 to the imager controller 19 one line at a time as line data. The image sensor 211 also outputs a frame synchronization signal, a line synchronization signal, and a clock signal to the imager controller 19. The variable focus lens 212 is, for example, a liquid lens, and is an optical element that constitutes a part of the optical system of the imager module 21. This liquid lens has a configuration in which the focal position can be changed at high speed according to the voltage applied to the focus mechanism 213.

フォーカス機構213は、可変焦点レンズ212の焦点位置を調節する駆動部である。可変焦点レンズ212が液体レンズである場合には、フォーカス機構213は、当該液体レンズの所定箇所に電圧を加えるための電極を含む電気回路である。また、可変焦点レンズ212としてガラスやプラスチックなどの固体レンズを用いる場合には、フォーカス機構213には、例えば、ボイスコイルモータが用いられる。 The focus mechanism 213 is a drive unit that adjusts the focal position of the variable focus lens 212. When the variable focus lens 212 is a liquid lens, the focus mechanism 213 is an electric circuit including an electrode for applying voltage to a predetermined portion of the liquid lens. Further, when a solid lens such as glass or plastic is used as the variable focus lens 212, a voice coil motor is used for the focus mechanism 213, for example.

エイマー214は、イメージャモジュール21と被写体であるコードとの距離の測定指標、及び、イメージャモジュール21の撮像方向と被写体方向とを合わせるための基準となるスポット光(目標光)としてのレーザ光ビームを出射するレーザダイオード(LD)である。イルミネーション215は、例えば、LED(Light Emitting Diode)といった光源により構成され、被写体及びその周囲の領域を明るく照らすための照射光を出射する。 The aimer 214 emits a laser light beam as a spot light (target light) that serves as an index for measuring the distance between the imager module 21 and the object code, and as a reference for aligning the imaging direction of the imager module 21 with the object direction. This is a laser diode (LD) that emits light. The illumination 215 is configured with a light source such as an LED (Light Emitting Diode), and emits irradiation light to brightly illuminate the subject and the area around it.

電源部22は、二次電池等で構成され、コード読取装置1の各部に電力供給を行う。レーザ駆動電源23は、エイマー214を駆動してスポット光を出射させる際の電力を供給する。レーザ駆動電源23は、イメージャコントローラ19と共にメイン基板上に配置される。 The power supply section 22 is composed of a secondary battery or the like, and supplies power to each section of the code reading device 1. The laser drive power supply 23 supplies power when driving the aimer 214 to emit a spot light. The laser drive power supply 23 is arranged on the main board together with the imager controller 19.

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

イメージャモジュール21において、可変焦点レンズ212を含む光学系212Aは、当該イメージャモジュール21の外側を撮像可能に配置される。また、撮像素子211は、光学系212Aの光軸に対して垂直に配置されている。エイマー214及びイルミネーション215は、光学系212A及びフォーカス機構213に並列して配置されている。エイマー214は、出射するビーム状のレーザ光が光学系212Aについて変更可能な焦点距離内においてイメージャモジュール21(光学系212A及び撮像素子211)により撮像可能な画角内に含まれる配置となっている。本実施形態では、このレーザ光のビームは、光学系212Aの光軸に平行な方向に出射される。また、イルミネーション215は、扇状に照射する光が光学系212Aについて変更可能な焦点距離内において、イメージャモジュール21(光学系212A及び撮像素子211)により撮影可能な画角内に含まれる配置となっている。 In the imager module 21, an optical system 212A including a variable focus lens 212 is arranged so as to be able to image the outside of the imager module 21. Further, the image sensor 211 is arranged perpendicular to the optical axis of the optical system 212A. The aimer 214 and the illumination 215 are arranged in parallel to the optical system 212A and the focus mechanism 213. The aimer 214 is arranged so that the emitted beam-like laser light is included within an angle of view that can be imaged by the imager module 21 (optical system 212A and image sensor 211) within a changeable focal length of the optical system 212A. . In this embodiment, this laser beam is emitted in a direction parallel to the optical axis of the optical system 212A. Further, the illumination 215 is arranged such that the fan-shaped light is included within the angle of view that can be photographed by the imager module 21 (optical system 212A and image sensor 211) within a focal length that can be changed by the optical system 212A. There is.

次いで、図4を参照して、コード読取装置1の動作を説明する。図4は、コード読取装置1によるコード読み取り処理の制御手順を示すフローチャートである。 Next, the operation of the code reading device 1 will be explained with reference to FIG. FIG. 4 is a flowchart showing a control procedure for code reading processing by the code reading device 1. As shown in FIG.

コード読み取り処理は、イメージャモジュール21を用いてコードをスキャンし、取得したコードの画像データをデコードする処理である。コード読取装置1において、トリガキー12A,12Cがユーザーにより押下入力されたことをトリガとして、CPU11は、ROM15から読み出されてRAM13に適宜展開されたプログラム15aとの協働で、コード読み取り処理を実行する。 The code reading process is a process of scanning a code using the imager module 21 and decoding the image data of the obtained code. In the code reading device 1, when the user presses and inputs the trigger keys 12A and 12C as a trigger, the CPU 11 executes the code reading process in cooperation with the program 15a read from the ROM 15 and expanded appropriately in the RAM 13. do.

図4に示すように、先ず、コード読取装置1のCPU11は、イメージャコントローラ19へ指令を送り、イメージャモジュール21を起動させる(ステップS1)。 As shown in FIG. 4, first, the CPU 11 of the code reading device 1 sends a command to the imager controller 19 to start the imager module 21 (step S1).

次いで、CPU11は、初期設定を行う(ステップS2)。具体的には、CPU11は、イメージャコントローラ19へ指令を送り、撮像素子211により被写体であるコードを撮影する際の露光時間Eを予め定められた初期値(標準的な明るさの露光値)E0に設定させるとともに、撮像素子211により撮影されたコードの画像データをRAM13に転送(出力)する際の出力画像サイズRを当該画像データの全体のサイズRfullに設定させる。また、CPU11は、コード読み取り処理のループ回数Lを初期値(L=0)に設定する。 Next, the CPU 11 performs initial settings (step S2). Specifically, the CPU 11 sends a command to the imager controller 19 to set the exposure time E when photographing the code, which is the object, using the image sensor 211 to a predetermined initial value (exposure value of standard brightness) E0. At the same time, the output image size R when transferring (outputting) the image data of the code photographed by the image sensor 211 to the RAM 13 is set to the entire size Rfull of the image data. Further, the CPU 11 sets the number of loops L of the code reading process to an initial value (L=0).

次いで、CPU11は、コード読み取り処理のループ回数Lの値を1インクリメントする(ステップS3)。 Next, the CPU 11 increments the value of the loop count L of the code reading process by 1 (step S3).

次いで、CPU11は、イメージャコントローラ19へ指令を送り、撮像素子211にコードを撮影させるとともに、撮像素子211からイメージャコントローラ19へ送られる当該コードの画像データをDMAによってRAM13へ直接転送させる(ステップS4)。また、ステップS4において、CPU11は、イメージャコントローラ19へ指令を送り、撮像素子211によるコードの撮影時にはイルミネーション215を照射させることにより、明るい画像を撮影できるようにする。また、コードの画像データの転送時にはエイマー214を照射させることにより、ユーザーに撮影位置を指し示すことができるようにする。 Next, the CPU 11 sends a command to the imager controller 19 to cause the image sensor 211 to photograph the code, and causes the image data of the code sent from the image sensor 211 to the imager controller 19 to be directly transferred to the RAM 13 by DMA (step S4). . Further, in step S4, the CPU 11 sends a command to the imager controller 19 to irradiate the illumination 215 when the image sensor 211 photographs the code, so that a bright image can be photographed. Moreover, by irradiating the aimer 214 when transmitting the image data of the code, it is possible to indicate the shooting position to the user.

次いで、CPU11は、RAM13に転送された画像データに基づいて、コードのデコード(解読)を行う(ステップS5)。 Next, the CPU 11 decodes the code based on the image data transferred to the RAM 13 (step S5).

次いで、CPU11は、コードのデコードに成功したか否かを判定する(ステップS6)。 Next, the CPU 11 determines whether or not the code has been successfully decoded (step S6).

ステップS6において、コードのデコードに成功したと判定された場合(ステップS6;YES)、CPU11は、デコードデータを表示部14に表示(出力)し(ステップS7)、コード読み取り処理を終了する。
一方、ステップS6において、コードのデコードに成功していない、すなわち失敗したと判定された場合(ステップS6;NO)、CPU11は、ループ回数Lの値が3よりも大きいか否かを判定する(ステップS8)。
If it is determined in step S6 that the code has been successfully decoded (step S6; YES), the CPU 11 displays (outputs) the decoded data on the display unit 14 (step S7), and ends the code reading process.
On the other hand, if it is determined in step S6 that the code has not been successfully decoded, that is, it has failed (step S6; NO), the CPU 11 determines whether the value of the number of loops L is greater than 3 ( Step S8).

ステップS8において、ループ回数Lの値が3よりも大きいと判定された場合(ステップS8;YES)、CPU11は、デコード失敗データ(例えば、「コードを読み取ることができません」等の文字データ)を表示部14に表示(出力)し(ステップS9)、コード読み取り処理を終了する。
一方、ステップS8において、ループ回数Lの値が3よりも大きくない、すなわち3以下であると判定された場合(ステップS8;NO)、CPU11は、露光時間・画像サイズ(出力画像サイズ)調整処理(後述)を行う(ステップS10)。そして、CPU11は、処理をステップS3へ戻し、それ以降の処理を繰り返し行う。
If it is determined in step S8 that the value of the number of loops L is greater than 3 (step S8; YES), the CPU 11 displays decoding failure data (for example, character data such as "Unable to read code"). The code is displayed (output) on the section 14 (step S9), and the code reading process is ended.
On the other hand, if it is determined in step S8 that the value of the number of loops L is not greater than 3, that is, less than or equal to 3 (step S8; NO), the CPU 11 performs an exposure time/image size (output image size) adjustment process. (described later) is performed (step S10). Then, the CPU 11 returns the process to step S3 and repeats the subsequent process.

図5は、コード読取装置1による露光時間・画像サイズ(出力画像サイズ)調整処理の制御手順を示すフローチャートである。露光時間・画像サイズ調整処理は、撮像素子211による次回以降の撮影時の露光時間と出力画像サイズとを決定する処理である。 FIG. 5 is a flowchart showing a control procedure of exposure time/image size (output image size) adjustment processing by the code reading device 1. The exposure time/image size adjustment process is a process for determining the exposure time and output image size for the next and subsequent shootings by the image sensor 211.

図5に示すように、先ず、CPU11は、露光時間候補E1を決定する(ステップS21)。具体的には、CPU11は、上述のコード読み取り処理のステップS5においてデコードがなされたコードの画像データの輝度値を導出する。そして、CPU11は、導出された輝度値を対象として露出制御処理を行い、適正な露光時間候補E1を決定する。なお、露出制御処理は公知の技術であるため、その説明は省略する。 As shown in FIG. 5, first, the CPU 11 determines an exposure time candidate E1 (step S21). Specifically, the CPU 11 derives the brightness value of the image data of the code decoded in step S5 of the code reading process described above. Then, the CPU 11 performs exposure control processing on the derived luminance value and determines an appropriate exposure time candidate E1. Note that since the exposure control process is a well-known technique, its explanation will be omitted.

次いで、CPU11は、露光時間候補E1の長さがイメージャモジュール21に設定可能な最小露光時間Eminの長さよりも短いか否かを判定する(ステップS22)。 Next, the CPU 11 determines whether the length of the exposure time candidate E1 is shorter than the length of the minimum exposure time Emin that can be set in the imager module 21 (step S22).

ステップS22において、露光時間候補E1の長さが最小露光時間Eminの長さよりも短いと判定された場合(ステップS22;YES)、CPU11は、イメージャコントローラ19へ指令を送り、出力画像サイズRを、図6(a)に示すように、撮像素子211により撮影された画像全体のサイズRfullに調整させ(ステップS23)、また、露光時間Eを最小露光時間Eminに調整させ(ステップS24)、露光時間・画像サイズ調整処理を終了する。 In step S22, if it is determined that the length of the exposure time candidate E1 is shorter than the length of the minimum exposure time Emin (step S22; YES), the CPU 11 sends a command to the imager controller 19 to change the output image size R. As shown in FIG. 6(a), the size of the entire image photographed by the image sensor 211 is adjusted to Rfull (step S23), and the exposure time E is adjusted to the minimum exposure time Emin (step S24), and the exposure time - Finish the image size adjustment process.

また、ステップS22において、露光時間候補E1の長さが最小露光時間Eminの長さよりも短くない、すなわち最小露光時間Eminの長さ以上であると判定された場合(ステップS22;NO)、CPU11は、露光時間候補E1の長さがイメージャモジュール21に設定可能な第1の最大露光時間Emax1の長さよりも短いか否かを判定する(ステップS25)。ここで、第1の最大露光時間Emax1とは、出力画像サイズRがRfullに設定されている際にイメージャモジュール21に設定可能な最大露光時間を意味する。 Further, in step S22, if it is determined that the length of the exposure time candidate E1 is not shorter than the length of the minimum exposure time Emin, that is, it is determined that it is greater than or equal to the length of the minimum exposure time Emin (step S22; NO), the CPU 11 , it is determined whether the length of the exposure time candidate E1 is shorter than the length of the first maximum exposure time Emax1 that can be set in the imager module 21 (step S25). Here, the first maximum exposure time Emax1 means the maximum exposure time that can be set in the imager module 21 when the output image size R is set to Rfull.

ステップS25において、露光時間候補E1の長さが第1の最大露光時間Emax1の長さよりも短いと判定された場合(ステップS25;YES)、CPU11は、イメージャコントローラ19へ指令を送り、出力画像サイズRを撮像素子211により撮影された画像全体のサイズRfullに調整させ(ステップS26)、また、露光時間Eを露光時間候補E1に調整させ(ステップS27)、露光時間・画像サイズ調整処理を終了する。 In step S25, if it is determined that the length of the exposure time candidate E1 is shorter than the length of the first maximum exposure time Emax1 (step S25; YES), the CPU 11 sends a command to the imager controller 19 to determine the output image size. R is adjusted to the size Rfull of the entire image photographed by the image sensor 211 (step S26), and the exposure time E is adjusted to the exposure time candidate E1 (step S27), thereby ending the exposure time/image size adjustment process. .

また、ステップS25において、露光時間候補E1の長さが第1の最大露光時間Emax1の長さよりも短くない、すなわち第1の最大露光時間Emax1の長さ以上であると判定された場合(ステップS25;NO)、CPU11は、露光時間候補E1の長さがイメージャモジュール21に設定可能な第2の最大露光時間Emax2の長さよりも短いか否かを判定する(ステップS28)。ここで、第2の最大露光時間Emax2とは、出力画像サイズRがRfullの半分のサイズRhalf(図6(b)参照)に設定されている際にイメージャモジュール21に設定可能な最大露光時間を意味する。 Further, in step S25, if it is determined that the length of the exposure time candidate E1 is not shorter than the length of the first maximum exposure time Emax1, that is, it is determined that it is greater than or equal to the length of the first maximum exposure time Emax1 (step S25 ; NO), the CPU 11 determines whether the length of the exposure time candidate E1 is shorter than the length of the second maximum exposure time Emax2 that can be set in the imager module 21 (step S28). Here, the second maximum exposure time Emax2 is the maximum exposure time that can be set in the imager module 21 when the output image size R is set to half the size Rfull (see FIG. 6(b)). means.

ステップS28において、露光時間候補E1の長さが第2の最大露光時間Emax2の長さよりも短いと判定された場合(ステップS28;YES)、CPU11は、イメージャコントローラ19へ指令を送り、出力画像サイズRを、図6(b)に示すように、Rfullの半分のサイズRhalfに調整させ(ステップS29)、また、露光時間Eを露光時間候補E1に調整させ(ステップS27)、露光時間・画像サイズ調整処理を終了する。 In step S28, if it is determined that the length of the exposure time candidate E1 is shorter than the length of the second maximum exposure time Emax2 (step S28; YES), the CPU 11 sends a command to the imager controller 19 to determine the output image size. As shown in FIG. 6(b), R is adjusted to the size Rhalf, which is half of Rfull (step S29), and the exposure time E is adjusted to the exposure time candidate E1 (step S27), and the exposure time and image size are adjusted. Finish the adjustment process.

また、ステップS28において、露光時間候補E1の長さが第2の最大露光時間Emax2の長さよりも短くない、すなわち第2の最大露光時間Emax2の長さ以上であると判定された場合(ステップS28;NO)、CPU11は、イメージャコントローラ19へ指令を送り、出力画像サイズRをRfullの半分のサイズRhalfに調整させ(ステップS30)、また、露光時間Eを第2の最大露光時間Emax2に調整させ(ステップS31)、露光時間・画像サイズ調整処理を終了する。 Further, in step S28, if it is determined that the length of the exposure time candidate E1 is not shorter than the length of the second maximum exposure time Emax2, that is, it is determined that it is greater than or equal to the length of the second maximum exposure time Emax2 (step S28 ; NO), the CPU 11 sends a command to the imager controller 19 to adjust the output image size R to half the size Rfull (step S30), and adjust the exposure time E to the second maximum exposure time Emax2. (Step S31), the exposure time/image size adjustment process ends.

次いで、暗所において実行されたコード読み取り処理の一態様について、図6(c)を参照して説明する。図6(c)は、コード読み取り処理の時間配分を模式的に示した図である。 Next, one aspect of the code reading process executed in a dark place will be described with reference to FIG. 6(c). FIG. 6(c) is a diagram schematically showing the time allocation for code reading processing.

図6(c)に示すように、先ず、コード読取装置1において、トリガキー12A,12Cがユーザーにより押下入力されたことをトリガとして、イメージャモジュール(スキャナデバイス)21が起動され、露光時間Eが初期値E0に設定されるとともに、出力画像サイズRがRfullに設定される。そして、1回目(ループ回数L=1)のコード読み取り処理が行われる。 As shown in FIG. 6(c), first, in the code reading device 1, the imager module (scanner device) 21 is activated when the trigger keys 12A, 12C are pressed and input by the user, and the exposure time E is set to the initial value. The value E0 is set, and the output image size R is set to Rfull. Then, the first code reading process (loop number L=1) is performed.

1回目のコード読み取り処理では、撮像素子211により露光時間E0でコードの撮影が行われ、撮影されたコードの画像データが出力画像サイズRfullでRAM13に転送される。そして、1回目のコード読み取り処理では、RAM13に転送された画像データの輝度値が低いためデコードに失敗し、上述の露光時間・画像サイズ調整処理が行われることとなる。ここで、露光時間E0は露光時間候補E1に調整され、出力画像サイズRは1回目のコード読み取り処理と同様にRfullに調整されるものとする。そして、2回目(ループ回数L=2)のコード読み取り処理が行われる。 In the first code reading process, the image sensor 211 photographs the code at an exposure time E0, and the image data of the photographed code is transferred to the RAM 13 at an output image size Rfull. Then, in the first code reading process, decoding fails because the brightness value of the image data transferred to the RAM 13 is low, and the above-mentioned exposure time/image size adjustment process is performed. Here, it is assumed that the exposure time E0 is adjusted to the exposure time candidate E1, and the output image size R is adjusted to Rfull as in the first code reading process. Then, the second code reading process (loop number L=2) is performed.

2回目のコード読み取り処理では、撮像素子211により露光時間候補E1でコードの撮影が行われ、撮影されたコードの画像データが出力画像サイズRfullでRAM13に転送される。そして、2回目のコード読み取り処理でも、RAM13に転送された画像データの輝度値が低いためデコードに失敗し、上述の露光時間・画像サイズ調整処理が行われることとなる。ここで、露光時間候補E1は第2の最大露光時間Emax2に調整され、出力画像サイズRはRhalfに調整されるものとする。そして、3回目(ループ回数L=3)のコード読み取り処理が行われる。 In the second code reading process, the image sensor 211 photographs the code at the exposure time candidate E1, and the image data of the photographed code is transferred to the RAM 13 in an output image size Rfull. Then, even in the second code reading process, decoding fails because the brightness value of the image data transferred to the RAM 13 is low, and the above-described exposure time/image size adjustment process is performed. Here, it is assumed that the exposure time candidate E1 is adjusted to the second maximum exposure time Emax2, and the output image size R is adjusted to Rhalf. Then, the code reading process is performed for the third time (the number of loops L=3).

3回目のコード読み取り処理では、撮像素子211により第2の最大露光時間Emax2でコードの撮影が行われ、撮影されたコードの画像データが出力画像サイズRhalfでRAM13に転送される。つまり、3回目のコード読み取り処理では、露光時間が長くなる一方で、画像転送に費やされる時間が短くなっており、1回目や2回目のコード読み取り処理に費やされる時間とほぼ同等の時間でコード読み取り処理が行われるようになっている。そして、3回目のコード読み取り処理では、露光時間候補E1よりも露光時間が長い第2の最大露光時間Emax2で撮影が行われたことによって、RAM13に転送される画像データの輝度値が高くなりデコードに成功する。 In the third code reading process, the image sensor 211 photographs the code at the second maximum exposure time Emax2, and the image data of the photographed code is transferred to the RAM 13 in the output image size Rhalf. In other words, in the third code reading process, while the exposure time is longer, the time spent on image transfer is shorter, and the code is read in approximately the same amount of time as the first and second code reading processes. Read processing is now in progress. Then, in the third code reading process, since photography was performed with the second maximum exposure time Emax2, which is longer than the exposure time candidate E1, the brightness value of the image data transferred to the RAM 13 becomes high and decoded. succeed in

以上のように、本実施形態のコード読取装置1は、光学的に読取可能なコードを読み取るコード読取装置1であって、コードの画像を撮影する撮像素子211と、撮像素子211により撮影されたコードの画像に基づいて、撮像素子211による次回以降のコードの画像の撮影時の露光時間Eと当該次回以降のコードの画像の出力画像サイズRとを調整し、次回以降のコードの画像の撮影時に、撮像素子211が調整された露光時間Eで撮影を行い、調整された出力画像サイズRのコードの画像を出力するよう制御する。
このような構成によれば、例えば、暗所においてコードの読み取り作業が行われ、次回以降のコードの画像の撮影時の露光時間Eが長くなるように調整された場合であっても、出力画像サイズRを小さくすることにより画像データの転送時間が短くなるように調整することができる。
したがって、暗所でも通常時と同等の時間でコードの読み取りを行うことができるので、暗所でも効率良くコードの読み取りを行うことができる。
As described above, the code reading device 1 of this embodiment is a code reading device 1 that reads an optically readable code, and includes an image sensor 211 that takes an image of the code, and an image taken by the image sensor 211. Based on the code image, the exposure time E and the output image size R of the next and subsequent code images are adjusted by the image sensor 211 to capture the next and subsequent code images. At the same time, the image sensor 211 is controlled to take a picture with the adjusted exposure time E and output an image of the code with the adjusted output image size R.
According to such a configuration, even if, for example, a code is read in a dark place and the exposure time E is adjusted to be longer when photographing subsequent code images, the output image By reducing the size R, the image data transfer time can be adjusted to be shorter.
Therefore, the code can be read even in a dark place in the same amount of time as in normal times, so that the code can be read efficiently even in a dark place.

また、コード読取装置1は、デコードに失敗した場合、当該デコードの対象となったコードの画像に基づいて、露光時間Eと出力画像サイズRとを調整するので、デコードの失敗が繰り返されることを抑制することができる。 Further, when the code reading device 1 fails to decode, it adjusts the exposure time E and the output image size R based on the image of the code targeted for decoding, thereby preventing repeated decoding failures. Can be suppressed.

また、コード読取装置1は、デコードの対象となったコードの画像の輝度値に基づいて、次回以降のコードの画像の撮影時において候補となる露光時間(露光時間候補E1)を決定し、決定された候補となる露光時間の長さが予め定めた最小露光時間Eminの長さよりも短い場合、露光時間Eを当該最小露光時間Eminに調整するとともに、出力画像サイズRをRfull(所定のサイズ)に調整する。
このような構成によれば、コードの読み取り精度を向上させるとともに、効率良くコードの読み取りを行うことができる。
In addition, the code reading device 1 determines an exposure time (exposure time candidate E1) that will be a candidate when photographing the next code image based on the brightness value of the image of the code that is the target of decoding, and If the length of the exposure time as a candidate is shorter than the length of the predetermined minimum exposure time Emin, the exposure time E is adjusted to the minimum exposure time Emin, and the output image size R is set to Rfull (predetermined size). Adjust to.
According to such a configuration, the code reading accuracy can be improved and the code can be read efficiently.

また、コード読取装置1は、候補となる露光時間(露光時間候補E1)の長さが最小露光時間Eminの長さ以上であり、且つ、予め定めた第1の最大露光時間Emax1の長さよりも短い場合、露光時間Eを当該候補となる露光時間に調整するとともに、出力画像サイズRをRfull(所定のサイズ)に調整する。
このような構成によれば、コードの読み取り精度を向上させるとともに、効率良くコードの読み取りを行うことができる。
Further, the code reading device 1 determines that the length of the candidate exposure time (exposure time candidate E1) is greater than or equal to the length of the minimum exposure time Emin, and is greater than the length of the predetermined first maximum exposure time Emax1. If it is short, the exposure time E is adjusted to the candidate exposure time, and the output image size R is adjusted to Rfull (predetermined size).
According to such a configuration, the code reading accuracy can be improved and the code can be read efficiently.

また、コード読取装置1は、候補となる露光時間(露光時間候補E1)の長さが第1の最大露光時間Emax1の長さ以上であり、且つ、予め定めた第2の最大露光時間Emax2の長さよりも短い場合、露光時間Eを当該候補となる露光時間に調整するとともに、出力画像サイズRをRfull(所定のサイズ)に調整する。
このような構成によれば、コードの読み取り精度を向上させるとともに、効率良くコードの読み取りを行うことができる。
Further, the code reading device 1 determines that the length of the candidate exposure time (exposure time candidate E1) is greater than or equal to the length of the first maximum exposure time Emax1, and that the length of the candidate exposure time E1 is longer than the predetermined second maximum exposure time Emax2. If it is shorter than the length, the exposure time E is adjusted to the candidate exposure time, and the output image size R is adjusted to Rfull (predetermined size).
According to such a configuration, the code reading accuracy can be improved and the code can be read efficiently.

また、コード読取装置1は、候補となる露光時間(露光時間候補E1)の長さが第2の最大露光時間Emax2の長さ以上である場合、露光時間Eを第2の最大露光時間Emax2に調整するとともに、出力画像サイズRをRhalf(所定のサイズの半分のサイズ)に調整する。
このような構成によれば、コードの読み取り精度を向上させるとともに、効率良くコードの読み取りを行うことができる。
Further, if the length of the candidate exposure time (exposure time candidate E1) is equal to or longer than the second maximum exposure time Emax2, the code reading device 1 changes the exposure time E to the second maximum exposure time Emax2. At the same time, the output image size R is adjusted to Rhalf (half the predetermined size).
According to such a configuration, the code reading accuracy can be improved and the code can be read efficiently.

また、コード読取装置1は、イルミネーション215と、エイマー214と、を備え、撮像素子211にコードの画像を撮影させる際にイルミネーション215を点灯させ、撮像素子211により撮影されたコードの画像を転送(出力)させる際にエイマー214を点灯させるので、暗所でもコードの読み取り精度を向上させることができる。 The code reading device 1 also includes an illumination 215 and an aimer 214, turns on the illumination 215 when causing the image sensor 211 to take an image of the code, and transfers the image of the code taken by the image sensor 211 ( Since the aimer 214 is turned on when the code is output (output), code reading accuracy can be improved even in a dark place.

なお、本発明は、上記実施の形態に限られるものではなく、様々な変更が可能である。
例えば、上記実施の形態では、RAM13にDMA転送された画像データに基づいて、CPU11がコードのデコードを行ったが、イメージャコントローラ19が当該デコードの機能をASIC基板上に実装してハードウェア的に演算可能としても良い。
Note that the present invention is not limited to the embodiments described above, and various changes are possible.
For example, in the above embodiment, the CPU 11 decodes the code based on the image data DMA-transferred to the RAM 13, but the imager controller 19 implements the decoding function on the ASIC board and uses hardware. It may also be possible to perform calculations.

また、上記実施の形態における可変焦点レンズとして、液体レンズ及びガラス等を用いた固体レンズを例に挙げたが、これらに限定されるものではない。例えば、印加電圧により屈折率が変化する「電気光学結晶」の一種であるKTN(タンタル酸ニオブ酸カリウム、KTa1-xNb)を用いた可変焦点レンズも利用可能である。 Furthermore, although a liquid lens and a solid lens using glass or the like have been cited as examples of the variable focus lens in the above embodiments, the present invention is not limited to these. For example, a variable focus lens using KTN (potassium tantalate niobate, KTa 1-x Nb x O 3 ), which is a type of "electro-optic crystal" whose refractive index changes depending on the applied voltage, can also be used.

また、上記実施の形態では、本発明に係るプログラムのコンピューター読み取り可能な媒体として記憶部15(例えば、フラッシュメモリ、EEPROM、ハードディスク、ROM)を使用した例を開示したが、この例に限定されない。その他のコンピューター読み取り可能な媒体として、CD-ROM等の可搬型記録媒体を適用することが可能である。また、本発明に係るプログラムのデータを通信回線を介して提供する媒体として、キャリアウエーブ(搬送波)も本発明に適用される。 Further, in the above embodiment, an example is disclosed in which the storage unit 15 (for example, flash memory, EEPROM, hard disk, ROM) is used as a computer-readable medium for the program according to the present invention, but the present invention is not limited to this example. As other computer-readable media, it is possible to apply a portable recording medium such as a CD-ROM. Moreover, a carrier wave (carrier wave) is also applied to the present invention as a medium for providing data of the program according to the present invention via a communication line.

また、上記実施の形態では、コードのデコードが成功した時点でコード読み取り処理を終了としたが、デコードに成功した際の露光時間E及び出力画像サイズRの設定値を引き継いで複数のコードを連続して読み取るようにしてもよい。
その他、上記実施の形態で示した数値、制御の順序などの具体的な細部は、本発明の趣旨を逸脱しない範囲において適宜変更可能である。
In addition, in the above embodiment, the code reading process ends when the code is successfully decoded, but the settings for the exposure time E and output image size R at the time of successful decoding are inherited to continuously read multiple codes. It may also be read by
In addition, specific details such as numerical values and control order shown in the above embodiments can be changed as appropriate without departing from the spirit of the present invention.

本発明の実施形態を説明したが、本発明の範囲は、上述の実施の形態に限定するものではなく、特許請求の範囲に記載された発明の範囲とその均等の範囲を含む。
以下に、この出願の願書に最初に添付した特許請求の範囲に記載した発明を付記する。付記に記載した請求項の項番は、この出願の願書に最初に添付した特許請求の範囲の通りである。
Although the embodiments of the present invention have been described, the scope of the present invention is not limited to the above-described embodiments, but includes the scope of the invention described in the claims and equivalent ranges thereof.
Below, the invention described in the claims first attached to the application of this application will be added. The claim numbers listed in the supplementary notes are as in the claims originally attached to the request for this application.

[付記]
<請求項1>
光学的に読取可能なコードを読み取るコード読取装置であって、
前記コードの画像を撮影する撮像手段と、
前記撮像手段により撮影された前記コードの画像に基づいて、当該撮像手段による次回以降のコードの画像の撮影時の露光時間と当該次回以降のコードの画像の出力画像サイズとを調整する調整手段と、
前記次回以降のコードの画像の撮影時に、前記撮像手段が前記調整手段により調整された前記露光時間で撮影を行い、前記出力画像サイズのコードの画像を出力するよう制御する制御手段と、
を備えることを特徴とするコード読取装置。
<請求項2>
前記撮像手段により撮影された前記コードの画像に基づいて、当該コードをデコードするデコード手段を備え、
前記調整手段は、前記デコード手段によるデコードに失敗した場合、当該デコードの対象となったコードの画像に基づいて、前記露光時間と前記出力画像サイズとを調整することを特徴とする請求項1に記載のコード読取装置。
<請求項3>
前記デコードの対象となったコードの画像の輝度値に基づいて、前記次回以降のコードの画像の撮影時において候補となる露光時間を決定する決定手段を備え、
前記調整手段は、前記決定手段により決定された前記候補となる露光時間の長さが予め定めた最小露光時間の長さよりも短い場合、前記露光時間を当該最小露光時間に調整するとともに、前記出力画像サイズを所定のサイズに調整することを特徴とする請求項2に記載のコード読取装置。
<請求項4>
前記調整手段は、前記候補となる露光時間の長さが前記最小露光時間の長さ以上であり、且つ、予め定めた第1の最大露光時間の長さよりも短い場合、前記露光時間を当該候補となる露光時間に調整するとともに、前記出力画像サイズを前記所定のサイズに調整することを特徴とする請求項3に記載のコード読取装置。
<請求項5>
前記調整手段は、前記候補となる露光時間の長さが前記第1の最大露光時間の長さ以上であり、且つ、予め定めた第2の最大露光時間の長さよりも短い場合、前記露光時間を当該候補となる露光時間に調整するとともに、前記出力画像サイズを前記所定のサイズの半分のサイズに調整することを特徴とする請求項4に記載のコード読取装置。
<請求項6>
前記調整手段は、前記候補となる露光時間の長さが前記第2の最大露光時間の長さ以上である場合、前記露光時間を前記第2の最大露光時間に調整するとともに、前記出力画像サイズを前記所定のサイズの半分のサイズに調整することを特徴とする請求項5に記載のコード読取装置。
<請求項7>
撮影位置を照らす照明手段と、
撮影位置を案内するための発光手段と、
を備え、
前記制御手段は、前記撮像手段に前記コードの画像を撮影させる際に前記照明手段を点灯させ、前記撮像手段により撮影された前記コードの画像を出力させる際に前記発光手段を点灯させることを特徴とする請求項1~6のいずれか一項に記載のコード読取装置。
<請求項8>
光学的に読取可能なコードの画像を撮影する撮像手段を備えるコード読取装置のコンピューターを、
前記撮像手段により撮影された前記コードの画像に基づいて、当該撮像手段による次回以降のコードの画像の撮影時の露光時間と当該次回以降のコードの画像の出力画像サイズとを調整する調整手段、
前記次回以降のコードの画像の撮影時に、前記撮像手段が前記調整手段により調整された前記露光時間で撮影を行い、前記出力画像サイズのコードの画像を出力するよう制御する制御手段、
として機能させることを特徴とするプログラム。
[Additional notes]
<Claim 1>
A code reading device that reads an optically readable code,
an imaging means for taking an image of the code;
Adjusting means for adjusting the exposure time when the imaging means takes subsequent images of the code and the output image size of the subsequent images of the code, based on the image of the code taken by the imaging means; ,
A control means for controlling the imaging means to take an image at the exposure time adjusted by the adjustment means and output an image of the code having the output image size when photographing the image of the code from the next time;
A code reading device comprising:
<Claim 2>
comprising a decoding means for decoding the code based on an image of the code taken by the imaging means,
2. The adjusting means adjusts the exposure time and the output image size based on the image of the code to be decoded when the decoding by the decoding means fails. Code reader as described.
<Claim 3>
comprising determining means for determining a candidate exposure time when photographing images of the code from the next time onwards, based on the luminance value of the image of the code to be decoded;
When the length of the candidate exposure time determined by the determining means is shorter than the predetermined minimum exposure time, the adjustment means adjusts the exposure time to the minimum exposure time and adjusts the output. 3. The code reading device according to claim 2, wherein the image size is adjusted to a predetermined size.
<Claim 4>
When the length of the exposure time to be the candidate is equal to or greater than the length of the minimum exposure time and shorter than the length of a predetermined first maximum exposure time, the adjustment means adjusts the exposure time to the candidate. 4. The code reading device according to claim 3, wherein the code reading device adjusts the exposure time to the predetermined size and adjusts the output image size to the predetermined size.
<Claim 5>
The adjusting means adjusts the exposure time when the candidate exposure time is equal to or greater than the first maximum exposure time and shorter than a predetermined second maximum exposure time. 5. The code reading device according to claim 4, wherein the code reading device adjusts the output image size to the candidate exposure time and adjusts the output image size to half the predetermined size.
<Claim 6>
When the length of the candidate exposure time is greater than or equal to the second maximum exposure time, the adjustment means adjusts the exposure time to the second maximum exposure time and adjusts the output image size. The code reading device according to claim 5, wherein the code reading device adjusts the size to be half the predetermined size.
<Claim 7>
lighting means for illuminating the shooting position;
a light emitting means for guiding the shooting position;
Equipped with
The control means turns on the illumination means when causing the imaging means to photograph an image of the code, and lights the light emitting means when causing the imaging means to output an image of the code photographed. The code reading device according to any one of claims 1 to 6.
<Claim 8>
A code reading device computer comprising an imaging means for taking an image of an optically readable code,
Adjusting means for adjusting the exposure time when the image capturing means shoots the next code image and the output image size of the next code image based on the image of the code captured by the image capturing means;
A control means for controlling the imaging means to perform imaging at the exposure time adjusted by the adjustment means when photographing the next code image and output the code image of the output image size;
A program characterized by functioning as

1 コード読取装置
11 CPU(調整手段、制御手段、デコード手段、決定手段)
211 撮像素子(撮像手段)
214 エイマー(発光手段)
215 イルミネーション(照明手段)
1 Code reading device 11 CPU (adjustment means, control means, decoding means, deciding means)
211 Imaging device (imaging means)
214 Aimer (light emitting means)
215 Illumination (illumination means)

Claims (7)

光学的に読取可能なコードを読み取るコード読取装置であって、
前記コードの画像を撮影する撮像手段と、
前記撮像手段により撮影されたコードの画像に基づいて、当該コードをデコードするデコード手段と、
前記デコード手段によるデコードに失敗した場合に、当該デコードの対象となったコードの画像に基づいて前記撮像手段による次回以降のコードの画像の撮影時の露光時間と次回以降のコードの画像の出力画像サイズとを調整し、前記次回以降のコードの画像の撮影時にこの調整された露光時間で撮影を行わせ、前記出力画像サイズのコードの画像を出力するよう制御する制御手段と、
を備え、
前記制御手段は、前記デコード手段によるデコードに失敗した場合であって前記デコードの対象となったコードの画像に基づいて前記撮像手段による次回以降のコードの画像の撮影時の露光時間と次回以降のコードの画像の出力画像サイズとを調整する場合には、前記デコードの対象となったコードの画像の輝度値に基づい前記次回以降のコードの画像の撮影時において候補となる露光時間を決定し、この決定された候補となる露光時間の長さが予め定めた最小露光時間の長さよりも短い場合、前記露光時間を当該最小露光時間に調整するととも前記出力画像サイズを所定のサイズに調整する、
ことを特徴とするコード読取装置。
A code reading device that reads an optically readable code,
an imaging means for taking an image of the code;
a decoding means for decoding the code based on an image of the code taken by the imaging means;
When the decoding by the decoding means fails, the exposure time and the output image of the next and subsequent code images by the imaging means based on the image of the code to be decoded. a control means for adjusting the size of the code , and controlling the image to be taken using the adjusted exposure time when taking the next code image, and outputting the code image having the output image size ;
Equipped with
The control means is configured to determine the exposure time and subsequent shooting times of the next code image by the imaging means based on the image of the code to be decoded when the decoding by the decoding means fails. When adjusting the output image size of the code image, a candidate exposure time is determined for the subsequent shooting of the code image based on the brightness value of the code image that is the target of decoding. , if the determined candidate exposure time length is shorter than a predetermined minimum exposure time length, the exposure time is adjusted to the minimum exposure time , and the output image size is adjusted to a predetermined size. do,
A code reading device characterized by:
前記制御手段は、前記決定された候補となる露光時間の長さが前記最小露光時間の長さ以上であり、且つ、予め定めた第1の最大露光時間の長さよりも短い場合、前記露光時間を当該候補となる露光時間に調整するととも前記出力画像サイズを前記所定のサイズに調整する、
ことを特徴とする請求項1に記載のコード読取装置。
If the length of the determined candidate exposure time is equal to or greater than the minimum exposure time and shorter than the predetermined first maximum exposure time, the control means controls the exposure time to to the candidate exposure time and adjust the output image size to the predetermined size;
The code reading device according to claim 1, characterized in that:
前記制御手段は、前記決定された候補となる露光時間の長さが前記第1の最大露光時間の長さ以上であり、且つ、予め定めた第2の最大露光時間の長さよりも短い場合、前記露光時間を当該候補となる露光時間に調整するととも前記出力画像サイズを前記所定のサイズの半分のサイズに調整する、
ことを特徴とする請求項2に記載のコード読取装置。
When the length of the determined candidate exposure time is greater than or equal to the first maximum exposure time and shorter than the predetermined second maximum exposure time, the control means adjusting the exposure time to the candidate exposure time and adjusting the output image size to half the predetermined size;
The code reading device according to claim 2, characterized in that:
前記制御手段は、前記決定された候補となる露光時間の長さが前記第2の最大露光時間の長さ以上である場合、前記露光時間を前記第2の最大露光時間に調整するととも前記出力画像サイズを前記所定のサイズの半分のサイズに調整する、
ことを特徴とする請求項3に記載のコード読取装置。
When the length of the determined candidate exposure time is greater than or equal to the second maximum exposure time, the control means adjusts the exposure time to the second maximum exposure time and adjusting the output image size to half the predetermined size;
The code reading device according to claim 3, characterized in that:
撮影位置を照らす照明手段と、
撮影位置を案内するための発光手段と、
を備え、
前記制御手段は、前記撮像手段に前記コードの画像を撮影させる際に前記照明手段を点灯させ、前記撮像手段により撮影された前記コードの画像を出力させる際に前記発光手段を点灯させる、
ことを特徴とする請求項1~4のいずれか一項に記載のコード読取装置。
lighting means for illuminating the shooting position;
a light emitting means for guiding the shooting position;
Equipped with
The control means turns on the illumination means when causing the imaging means to take an image of the code, and turns on the light emitting means when causing the imaging means to output an image of the code taken.
The code reading device according to any one of claims 1 to 4.
光学的に読取可能なコードを読み取るコード読取装置が実行するコード読取方法であって、A code reading method performed by a code reading device that reads an optically readable code, the method comprising:
前記コードの画像を撮影する撮像ステップと、an imaging step of taking an image of the code;
前記撮像ステップで撮影されたコードの画像に基づいて、当該コードをデコードするデコードステップと、a decoding step of decoding the code based on the image of the code taken in the imaging step;
前記デコードステップでデコードに失敗した場合に、当該デコードの対象となったコードの画像に基づいて次回以降のコードの画像の撮影時の露光時間と次回以降のコードの画像の出力画像サイズとを調整し、前記次回以降のコードの画像の撮影時にこの調整された露光時間で撮影を行わせ、前記出力画像サイズのコードの画像を出力するよう制御する制御ステップと、If decoding fails in the decoding step, the exposure time when photographing the next code image and the output image size of the next code image are adjusted based on the code image that is the target of the decoding. a control step of causing the next code image to be captured using the adjusted exposure time and outputting the code image having the output image size;
を有し、has
前記制御ステップは、前記デコードステップでデコードに失敗した場合であって前記デコードの対象となったコードの画像に基づいて次回以降のコードの画像の撮影時の露光時間と次回以降のコードの画像の出力画像サイズとを調整する場合には、前記デコードの対象となったコードの画像の輝度値に基づいて前記次回以降のコードの画像の撮影時において候補となる露光時間を決定し、この決定された候補となる露光時間の長さが予め定めた最小露光時間の長さよりも短い場合、前記露光時間を当該最小露光時間に調整するとともに前記出力画像サイズを所定のサイズに調整する、In the control step, when the decoding fails in the decoding step, the exposure time of the next and subsequent code images is determined based on the code image that is the target of the decoding, and the exposure time of the next and subsequent code images. When adjusting the output image size, a candidate exposure time is determined for photographing the next code image based on the brightness value of the code image that is the target of the decoding, and this determined exposure time is determined. If the length of the exposure time as a candidate is shorter than the length of a predetermined minimum exposure time, adjusting the exposure time to the minimum exposure time and adjusting the output image size to a predetermined size;
ことを特徴とするコード読取方法。A code reading method characterized by:
光学的に読取可能なコードの画像を撮影する撮像手段を備えるコード読取装置のコンピューターを、A code reading device computer comprising an imaging means for taking an image of an optically readable code,
前記撮像手段により撮影されたコードの画像に基づいて、当該コードをデコードするデコード手段、decoding means for decoding the code based on an image of the code taken by the imaging means;
前記デコード手段によるデコードに失敗した場合に、当該デコードの対象となったコードの画像に基づいて前記撮像手段による次回以降のコードの画像の撮影時の露光時間と次回以降のコードの画像の出力画像サイズとを調整し、前記次回以降のコードの画像の撮影時にこの調整された露光時間で撮影を行わせ、前記出力画像サイズのコードの画像を出力するよう制御する制御手段、When the decoding by the decoding means fails, the exposure time and the output image of the next and subsequent code images by the imaging means based on the image of the code to be decoded. control means for controlling the code size to be adjusted, and for controlling the next code image to be captured using the adjusted exposure time, and to output the code image having the output image size;
として機能させ、function as
前記制御手段は、前記デコード手段によるデコードに失敗した場合であって前記デコードの対象となったコードの画像に基づいて前記撮像手段による次回以降のコードの画像の撮影時の露光時間と次回以降のコードの画像の出力画像サイズとを調整する場合には、前記デコードの対象となったコードの画像の輝度値に基づいて前記次回以降のコードの画像の撮影時において候補となる露光時間を決定し、この決定された候補となる露光時間の長さが予め定めた最小露光時間の長さよりも短い場合、前記露光時間を当該最小露光時間に調整するとともに前記出力画像サイズを所定のサイズに調整する、The control means is configured to determine the exposure time and subsequent shooting times of the next code image by the imaging means based on the image of the code to be decoded when the decoding by the decoding means fails. When adjusting the output image size of the code image, a candidate exposure time is determined for the subsequent shooting of the code image based on the brightness value of the code image that is the target of decoding. , if the determined candidate exposure time length is shorter than a predetermined minimum exposure time length, the exposure time is adjusted to the minimum exposure time, and the output image size is adjusted to a predetermined size. ,
ことを特徴とするプログラム。A program characterized by:
JP2019055903A 2019-03-25 2019-03-25 Code reading device, code reading method and program Active JP7367314B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019055903A JP7367314B2 (en) 2019-03-25 2019-03-25 Code reading device, code reading method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019055903A JP7367314B2 (en) 2019-03-25 2019-03-25 Code reading device, code reading method and program

Publications (2)

Publication Number Publication Date
JP2020160486A JP2020160486A (en) 2020-10-01
JP7367314B2 true JP7367314B2 (en) 2023-10-24

Family

ID=72643298

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019055903A Active JP7367314B2 (en) 2019-03-25 2019-03-25 Code reading device, code reading method and program

Country Status (1)

Country Link
JP (1) JP7367314B2 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004102762A (en) 2002-09-11 2004-04-02 Casio Comput Co Ltd Information reading device and program
JP2004145630A (en) 2002-10-24 2004-05-20 Denso Wave Inc Optical information reader
JP2004157812A (en) 2002-11-07 2004-06-03 Casio Comput Co Ltd Information reading device and program
JP2005135149A (en) 2003-10-30 2005-05-26 Casio Comput Co Ltd Code information reader and program
JP2005295313A (en) 2004-04-01 2005-10-20 Sharp Corp Cord reader, electronic equipment, and method and program for adjusting parameter
JP2006293596A (en) 2005-04-08 2006-10-26 Casio Comput Co Ltd Code reader
JP2016015147A (en) 2015-08-03 2016-01-28 カシオ計算機株式会社 Image processing apparatus and program

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004102762A (en) 2002-09-11 2004-04-02 Casio Comput Co Ltd Information reading device and program
JP2004145630A (en) 2002-10-24 2004-05-20 Denso Wave Inc Optical information reader
JP2004157812A (en) 2002-11-07 2004-06-03 Casio Comput Co Ltd Information reading device and program
JP2005135149A (en) 2003-10-30 2005-05-26 Casio Comput Co Ltd Code information reader and program
JP2005295313A (en) 2004-04-01 2005-10-20 Sharp Corp Cord reader, electronic equipment, and method and program for adjusting parameter
JP2006293596A (en) 2005-04-08 2006-10-26 Casio Comput Co Ltd Code reader
JP2016015147A (en) 2015-08-03 2016-01-28 カシオ計算機株式会社 Image processing apparatus and program

Also Published As

Publication number Publication date
JP2020160486A (en) 2020-10-01

Similar Documents

Publication Publication Date Title
JP5252023B2 (en) Code reader and program
JP5234133B2 (en) Code reader and program
US9033241B2 (en) Barcode reading apparatus and computer program product
JP2005084890A (en) Optical information reader
JP5956941B2 (en) Optical code reading system and optical code reading control method
JP2006244139A (en) Optical information reading device
US20230336877A1 (en) Illumination control for imaging systems with multiple image sensors
JP7367314B2 (en) Code reading device, code reading method and program
JP6183421B2 (en) Image processing apparatus and program
JP5737311B2 (en) Code reader and program
JP5794336B2 (en) Image processing apparatus and program
JP6885832B2 (en) Bar code reader, image acquisition method, and program
JP2015212866A (en) Optical information reader and optical information read method
JP5515887B2 (en) Scanner device and program
JP2006129173A (en) Camera system
JPWO2021065175A5 (en)
JP7230388B2 (en) BARCODE READER, BARCODE READING METHOD AND PROGRAM
JP6799279B2 (en) Image acquisition device, image acquisition method, and program
JP5375980B2 (en) Bar code reader and program
JP2012048441A (en) Scanner device and program
JP3174476B2 (en) Data symbol reading device
JP2006222825A (en) Image pickup device
JP5223554B2 (en) Electronic camera and electronic equipment
JP2014039150A (en) Photographing device
JP2010098649A (en) Digital camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220127

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230106

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230117

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230201

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230516

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230602

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230912

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230925

R150 Certificate of patent or registration of utility model

Ref document number: 7367314

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150