JP2016148925A - Two-dimensional code reading apparatus and method - Google Patents

Two-dimensional code reading apparatus and method Download PDF

Info

Publication number
JP2016148925A
JP2016148925A JP2015024356A JP2015024356A JP2016148925A JP 2016148925 A JP2016148925 A JP 2016148925A JP 2015024356 A JP2015024356 A JP 2015024356A JP 2015024356 A JP2015024356 A JP 2015024356A JP 2016148925 A JP2016148925 A JP 2016148925A
Authority
JP
Japan
Prior art keywords
dimensional code
storage range
range
imaging
image
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
JP2015024356A
Other languages
Japanese (ja)
Inventor
隆弘 野津
Takahiro Nozu
隆弘 野津
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2015024356A priority Critical patent/JP2016148925A/en
Publication of JP2016148925A publication Critical patent/JP2016148925A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a two-dimensional code reading apparatus having an image memory of comparatively small capacity, while reducing probability of read failure.SOLUTION: A two-dimensional code reading apparatus includes: a two-dimensional imaging apparatus 11; memories 13, 33 for storing image data of a storage range 41 narrower than an imaging range 40 of the two-dimensional imaging apparatus, out of image data captured by the two-dimensional imaging apparatus; and an analysis section 50 which analyzes the image data of the storage range acquired by imaging, to analyze a two-dimensional code included in an image. The analysis section includes: a code search section 51 which searches an area of the two-dimensional code in the storage range; and a storage range control section 53 which controls a position of the storage range in the next imaging, in the imaging range, on the basis of a position of the area of the two-dimensional code searched by the code search section when an analysis of the two-dimensional code in the image data of the storage range fails.SELECTED DRAWING: Figure 8

Description

本発明は、二次元コード読取装置および方法に関する。   The present invention relates to a two-dimensional code reading apparatus and method.

現実の物体に情報を付加する手段としてバーコードが用いられている。一次元バーコードは商品の価格に関連付けられ、レジの作業効率の向上に寄与している。
一方、二次元コードは一次元のバーコードに比較して多くのデータを格納することができる。そのため、商品にURLなど比較的大きなデータを関連付け、消費者に対し商品案内を提供したり、作業者向けに作業支援のためのデータを格納したりするのに使用されている。
A barcode is used as a means for adding information to an actual object. The one-dimensional barcode is related to the price of the product and contributes to improving the work efficiency of the cash register.
On the other hand, a two-dimensional code can store more data than a one-dimensional barcode. Therefore, it is used to associate relatively large data such as URLs with products, provide product guidance to consumers, and store work support data for workers.

二次元コードリーダー(二次元コード読取装置)は、カメラ(撮像装置)とマイクロプロセッサを用いて構成される。昨今の半導体技術の向上は、構成部品の性能向上と価格低下をもたらしており、二次元コードリーダーをウェアラブル(身に着けることができる)実装することも可能となっている。コードリーダーがウェアラブルになることで、使用者の両手が自由になる。そのため、二次元コードを使用する現場の作業者の作業負荷の低減に起用することが期待される。   A two-dimensional code reader (two-dimensional code reader) is configured using a camera (imaging device) and a microprocessor. Recent improvements in semiconductor technology have led to improved component performance and lower prices, making it possible to wear wearable two-dimensional code readers. By making the code reader wearable, the user's hands are free. For this reason, it is expected to be used to reduce the workload of workers on the site who use the two-dimensional code.

プロセッサはカメラから得られた画像から二次元コードを解析し、コードデータを取得する。搭載されるメモリは、カメラから得られる画像を格納するカメラ画像格納領域、カメラを制御するためのカメラ制御情報格納領域、画像を解析するためのメインプログラム格納領域、およびメインプログラムが一時的にデータを格納するための作業領域を有する。   The processor analyzes the two-dimensional code from the image obtained from the camera and acquires code data. The installed memory includes a camera image storage area for storing an image obtained from the camera, a camera control information storage area for controlling the camera, a main program storage area for analyzing the image, and the main program temporarily storing data. Has a work area for storing.

二次元コードリーダーは、使用者の指示に応じて画像を撮影し、撮影した画像を解析し、解析に成功すればコードデータを出力し、解析に失敗すれば、規定回数までは連続して画像の撮影および解析を繰り返す。解析失敗が規定回数を超えたら、二次元コードリーダーは、入力待ち状態となる。   The two-dimensional code reader captures images according to the user's instructions, analyzes the captured images, outputs code data if the analysis is successful, and continuously analyzes images up to the specified number of times if the analysis fails. Repeat the shooting and analysis. If the analysis failure exceeds the specified number of times, the two-dimensional code reader enters an input waiting state.

ウェアラブル機器上に二次元コードリーダーを実装した場合、以下に示す理由で処理可能な二次元コードの画像を取得することが難しい。   When a two-dimensional code reader is mounted on a wearable device, it is difficult to obtain a two-dimensional code image that can be processed for the following reason.

1つの理由は、撮影内容をリアルタイムに確認することができないことである。ウェアラブル機器は小型・軽量であることが望まれ、大容量のバッテリの搭載が難しいので、ディスプレイを搭載することができず、使用者が撮影された画像を確認できない。   One reason is that it is not possible to check the shooting contents in real time. The wearable device is desired to be small and light, and it is difficult to mount a large-capacity battery. Therefore, it is impossible to mount a display, and the user cannot check the captured image.

そこで、撮影位置を示すガイド用光の照射部を設け、位置合わせの指針を使用者に提供することが提案されているが、上記のように大容量のバッテリの搭載が難しいので、ガイド用の光源を搭載する余裕がない。   Therefore, it has been proposed to provide a guide light irradiating unit that indicates the photographing position and provide the user with an alignment guideline. However, as described above, it is difficult to mount a large-capacity battery. There is no room to install a light source.

もう1つの理由は、画像メモリ(カメラ画像格納領域)が小さいことである。ウェアラブル機器は小型・軽量であるため、大容量のメモリの搭載は、大きさおよびバッテリ容量の関係で難しい。近年、撮像装置の画素数は飛躍的に増加しているが、上記の理由で画像メモリの容量を増加させるのが難しく、画像メモリが記憶できる記憶範囲は、撮像範囲より狭く、画像メモリは、生成された撮像範囲の画像の一部しか記憶できない。解析は、記憶範囲に記憶された画像について行われるので、二次元コードの画像が撮像範囲内に入らない場合はもちろん、撮像範囲内に入っても記憶範囲内に入らない場合には解析に失敗することになる。   Another reason is that the image memory (camera image storage area) is small. Since wearable devices are small and lightweight, it is difficult to mount a large-capacity memory because of the size and battery capacity. In recent years, the number of pixels of the imaging device has increased dramatically, but it is difficult to increase the capacity of the image memory for the above reasons, the storage range that the image memory can store is narrower than the imaging range, Only a part of the image of the generated imaging range can be stored. Since the analysis is performed on the image stored in the storage range, the analysis fails if the image of the two-dimensional code does not fall within the imaging range or if it falls within the imaging range but does not fall within the storage range. Will do.

特許第2938338号公報Japanese Patent No. 2938338 特開2000−157812号公報JP 2000-157812 A 特開2004−157812号公報JP 2004-157812 A 特開2005−084890号公報Japanese Patent Laying-Open No. 2005-084890 特許第4419269号公報Japanese Patent No. 4419269

撮影した画像での解析に失敗すると、使用者に何度も撮影をリトライさせることになり、作業の負担となる。   If the analysis of the captured image fails, the user will be asked to retry the shooting many times, which will be a burden on the work.

そのため、比較的小さな容量の画像メモリを有する二次元コード読取装置でも、確実に二次元コードの解析に成功することが望まれている。   Therefore, it is desired that a two-dimensional code reader having a relatively small capacity image memory can succeed in analyzing the two-dimensional code reliably.

本発明の第1の態様の二次元コード読取装置は、二次元撮像装置と、メモリと、解析部と、を有する。メモリは、二次元撮像装置が撮像した画像データのうち、二次元撮像装置の撮像範囲より狭い記憶範囲の画像データを記憶する。解析部は、撮像により取得した記憶範囲の画像データを解析し、画像に含まれる二次元コードを解析する。解析部は、コード探索部と、記憶範囲制御部と、を有する。コード探索部は、記憶範囲における二次元コードの領域を探索する。記憶範囲制御部は、記憶範囲の画像データでの二次元コードの解析に失敗した時に、コード探索部が探索した二次元コードの領域の位置に基づいて、次の撮像における記憶範囲の撮像範囲における位置を制御する。   The two-dimensional code reading device according to the first aspect of the present invention includes a two-dimensional imaging device, a memory, and an analysis unit. The memory stores image data in a storage range narrower than the imaging range of the two-dimensional imaging device among the image data captured by the two-dimensional imaging device. The analysis unit analyzes the image data in the storage range acquired by imaging, and analyzes the two-dimensional code included in the image. The analysis unit includes a code search unit and a storage range control unit. The code search unit searches for a two-dimensional code area in the storage range. When the storage range control unit fails to analyze the two-dimensional code in the image data of the storage range, the storage range control unit determines whether the storage range in the next imaging is based on the position of the area of the two-dimensional code searched by the code search unit. Control the position.

本発明の第2の態様の二次元コード読取方法は、二次元撮像装置が撮像した画像データのうち、二次元撮像装置の撮像範囲より狭い記憶範囲の画像データをメモリに記憶し、記憶範囲の画像データを解析し、画像に含まれる二次元コードを解析する。二次元コード読取方法によれば、記憶範囲における二次元コードの領域を探索する。さらに、記憶範囲の画像データでの二次元コードの解析を行い、解析に失敗した時に、探索した二次元コードの領域の位置に基づいて、次の撮像における記憶範囲の撮像範囲における位置を制御する。   The two-dimensional code reading method of the second aspect of the present invention stores, in a memory, image data in a storage range narrower than the imaging range of the two-dimensional imaging device among the image data captured by the two-dimensional imaging device. Analyze the image data and analyze the 2D code contained in the image. According to the two-dimensional code reading method, the area of the two-dimensional code in the storage range is searched. Further, the analysis of the two-dimensional code with the image data in the storage range is performed, and when the analysis fails, the position of the storage range in the next imaging is controlled based on the position of the area of the searched two-dimensional code. .

実施形態によれば、比較的小さな容量の画像メモリを有するが、読取失敗の確率が低い二次元コード読取装置が実現される。   According to the embodiment, a two-dimensional code reader having an image memory having a relatively small capacity but a low probability of reading failure is realized.

図1は、二次元コードリーダーの構成を示すブロック図である。FIG. 1 is a block diagram showing a configuration of a two-dimensional code reader. 図2は、ウェアラブルなコードリーダーに搭載されるカメラ(撮像装置)の構成例を示す図である。FIG. 2 is a diagram illustrating a configuration example of a camera (imaging device) mounted on a wearable code reader. 図3は、メモリの内容を示す図である。FIG. 3 is a diagram showing the contents of the memory. 図4は、メモリのカメラ画像格納領域のカメラの撮像面の撮像範囲に対する関係を示す図である。FIG. 4 is a diagram illustrating the relationship between the camera image storage area of the memory and the imaging range of the imaging surface of the camera. 図5は、二次元コードリーダー全体の処理を示すフローチャートである。FIG. 5 is a flowchart showing processing of the entire two-dimensional code reader. 図6は、二次元コード解析処理の詳細を示すフローチャートである。FIG. 6 is a flowchart showing details of the two-dimensional code analysis processing. 図7は、撮像範囲および記憶範囲に対する二次元コードの撮影位置の例を示す図である。FIG. 7 is a diagram illustrating an example of the imaging position of the two-dimensional code with respect to the imaging range and the storage range. 図8は、実施形態の二次元コードリーダーにおいて、プロセッサにより実現される解析部の機能ブロック図である。FIG. 8 is a functional block diagram of an analysis unit realized by a processor in the two-dimensional code reader of the embodiment. 図9は、実施形態の二次元コード解析処理の詳細を示すフローチャートである。FIG. 9 is a flowchart showing details of the two-dimensional code analysis processing of the embodiment. 図10は、撮像面(撮像範囲)および画像の座標系を示す図である。FIG. 10 is a diagram illustrating an imaging surface (imaging range) and an image coordinate system. 図11は、探索処理を示すフローチャートである。FIG. 11 is a flowchart showing the search process. 図12は、複数のグリッドに分割された記憶範囲を示す図である。FIG. 12 is a diagram illustrating a storage range divided into a plurality of grids. 図13は、グリッドに分割した例を示す図である。FIG. 13 is a diagram illustrating an example of division into grids.

実施形態の二次元コードリーダー(二次元コード読取装置)を説明する前に、一般的な二次元コード読取装置について説明する。   Before describing the two-dimensional code reader (two-dimensional code reader) of the embodiment, a general two-dimensional code reader will be described.

昨今の半導体技術の向上は、構成部品の性能向上と価格低下をもたらしており、二次元コードリーダーをウェアラブル(身に着けることができる)実装することも可能となっている。コードリーダーがウェアラブルになることで、使用者の両手が自由になる。そのため、二次元コードを使用する現場の作業者の作業負荷の低減に起用することが期待される。   Recent improvements in semiconductor technology have led to improved component performance and lower prices, making it possible to wear wearable two-dimensional code readers. By making the code reader wearable, the user's hands are free. For this reason, it is expected to be used to reduce the workload of workers on the site who use the two-dimensional code.

図1は、二次元コードリーダーの構成を示すブロック図である。
二次元コードリーダーは、カメラ(撮像装置)11と、マイクロプロセッサ12と、メモリ13と、DMAコントローラ14と、外部通信モジュール15と、外部入出力部16と、以上の部分を接続するバス17と、を有する。言い換えれば、二次元コードリーダーは、カメラと、コンピュータと、を有する。
FIG. 1 is a block diagram showing a configuration of a two-dimensional code reader.
The two-dimensional code reader includes a camera (imaging device) 11, a microprocessor 12, a memory 13, a DMA controller 14, an external communication module 15, an external input / output unit 16, and a bus 17 that connects the above parts. Have. In other words, the two-dimensional code reader has a camera and a computer.

図2は、ウェアラブルなコードリーダーに搭載されるカメラ(撮像装置)の構成例を示す図である。   FIG. 2 is a diagram illustrating a configuration example of a camera (imaging device) mounted on a wearable code reader.

カメラ11は、レンズ21と、撮像素子22と、コントローラ24と、接続ケーブル25と、を有する。レンズ21は、外部の物体100の光学像を撮像素子22の撮像面23上に投影する。撮像素子22は、撮像面23上に投影された光学像を電気信号に変換する。コントローラ24は、撮像面23の矩形の撮像領域における光強度に対応する電気信号をラスタ順に読み取り画像データに変換した上で、接続ケーブル25を通してコードリーダーの本体部(メモリ13)へ転送する。   The camera 11 includes a lens 21, an image sensor 22, a controller 24, and a connection cable 25. The lens 21 projects an optical image of the external object 100 onto the imaging surface 23 of the imaging element 22. The imaging element 22 converts the optical image projected on the imaging surface 23 into an electrical signal. The controller 24 reads the electrical signals corresponding to the light intensity in the rectangular imaging area of the imaging surface 23 in raster order and converts them into image data, and then transfers them to the main body (memory 13) of the code reader through the connection cable 25.

メモリ13は、プロセッサ12に画像解析を行わせるプログラムやデータを格納する。
図3は、メモリの内容を示す図である。
The memory 13 stores programs and data that cause the processor 12 to perform image analysis.
FIG. 3 is a diagram showing the contents of the memory.

メモリ13の容量は、メインプログラム格納領域31と、カメラ制御情報格納領域32と、カメラ画像格納領域33と、メインプログラム作業領域34と、に分割されて使用される。カメラ画像格納領域33は、カメラ11から得られる画像データを格納する。カメラ制御情報格納領域32は、カメラを制御するためのカメラ制御情報を格納する。メインプログラム格納領域31は、プロセッサ12に画像を解析する処理を行わせるプログラムを格納する。メインプログラム作業領域34は、メインプログラムの動作途中で生成されるデータを一時的に格納する。メモリ13は、SRAM (Static RAM)、DRAM(Dynamic RAM) などの揮発性のメモリ、フラッシュ(Flash)メモリなどの不揮発性メモリ、あるいは一部が不揮発性で一部が揮発性の構成をとる場合も考えられる。   The capacity of the memory 13 is divided into a main program storage area 31, a camera control information storage area 32, a camera image storage area 33, and a main program work area 34. The camera image storage area 33 stores image data obtained from the camera 11. The camera control information storage area 32 stores camera control information for controlling the camera. The main program storage area 31 stores a program that causes the processor 12 to perform processing for analyzing an image. The main program work area 34 temporarily stores data generated during the operation of the main program. The memory 13 is a volatile memory such as SRAM (Static RAM) or DRAM (Dynamic RAM), a nonvolatile memory such as a flash memory, or a part of which is nonvolatile and partly volatile. Is also possible.

DMAコントローラ14は、カメラ11から得られる画像データを読み取り、メモリ13のカメラ画像格納領域33に書き込む。
プロセッサ12は、カメラ画像格納領域33に書き込まれた画像データから二次元コードを解析し、コードデータを取得する。
The DMA controller 14 reads the image data obtained from the camera 11 and writes it in the camera image storage area 33 of the memory 13.
The processor 12 analyzes the two-dimensional code from the image data written in the camera image storage area 33 and acquires the code data.

外部入出力部16は、ボタンやスイッチ、電源オン(ON)状態表示用のLEDに接続される。
外部通信モジュール15は、二次元コードリーダーと外部のシステムとを接続するモジュールである。通信形態は限定されないが、USB、Bluetooth(登録商標)などが使用される。
The external input / output unit 16 is connected to buttons, switches, and LEDs for power on (ON) state display.
The external communication module 15 is a module that connects the two-dimensional code reader and an external system. Although the communication form is not limited, USB, Bluetooth (registered trademark) or the like is used.

図4は、メモリのカメラ画像格納領域のカメラの撮像面の撮像範囲に対する関係を示す図である。
ウェアラブル機器は小型・軽量であるため、大容量のメモリの搭載は、大きさおよびバッテリ容量および演算処理量の増加の関係で難しい。近年、撮像装置の画素数は飛躍的に増加しているが、上記の理由で画像メモリの容量を増加させるのが難しく、図4に示すように、画像メモリが記憶できる記憶範囲は、撮像範囲より狭く、画像メモリは、生成された撮像範囲の画像の一部しか記憶できない。解析は、記憶範囲に記憶された画像について行われるので、二次元コードの画像が撮像範囲内に入らない場合はもちろん、撮像範囲内に入っても記憶範囲内に入らない場合も解析に失敗することになる。図4では、記憶範囲の中心と撮像範囲の中心が一致する例が示されるが、記憶範囲の撮像範囲内における位置は、任意に設定可能である。
FIG. 4 is a diagram illustrating the relationship between the camera image storage area of the memory and the imaging range of the imaging surface of the camera.
Since wearable devices are small and light, it is difficult to mount a large-capacity memory because of the increase in size, battery capacity, and computational load. In recent years, the number of pixels of the imaging device has increased dramatically, but it is difficult to increase the capacity of the image memory for the above reasons, and as shown in FIG. 4, the storage range that the image memory can store is the imaging range. More narrowly, the image memory can store only a part of the image of the generated imaging range. Since the analysis is performed on the image stored in the storage range, the analysis fails not only when the image of the two-dimensional code does not fall within the imaging range but also when it enters the imaging range but does not fall within the storage range. It will be. FIG. 4 shows an example in which the center of the storage range coincides with the center of the imaging range, but the position of the storage range within the imaging range can be arbitrarily set.

図5は、二次元コードリーダー全体の処理を示すフローチャートである。
処理は、全体では、電源が供給されている間は無限ループの構造になっている。
ステップS1で、外部入出力16による指示があるまで待機しており、指示があればステップS2に進む。
FIG. 5 is a flowchart showing processing of the entire two-dimensional code reader.
The processing as a whole has an infinite loop structure while power is supplied.
In step S1, the process waits until an instruction from the external input / output 16 is received. If there is an instruction, the process proceeds to step S2.

ステップS2で、指示に応じて、カメラ11から画像を読み取って、解析を行い、ステップS3に進む。
ステップS3で、解析に成功したか、失敗したかを判定し、成功すればステップS4に進み、失敗すればステップS2に戻る。ここで、解析に失敗した場合のステップS2とS3の繰り返しは、規定回数までは連続して行い、解析失敗が規定回数を超えた場合にもステップS4に進むものとする。
In step S2, an image is read from the camera 11 according to the instruction, analyzed, and the process proceeds to step S3.
In step S3, it is determined whether the analysis is successful or unsuccessful. If successful, the process proceeds to step S4, and if unsuccessful, the process returns to step S2. Here, it is assumed that the steps S2 and S3 when the analysis fails are continuously performed up to the specified number of times, and the process proceeds to step S4 even when the analysis failure exceeds the specified number of times.

ステップS4で、二次元コードリーダーのホスト装置に解析結果を送信する。すなわち、解析成功の場合には解析した二次元コードのコードデータを、解析失敗が規定回数を超えた場合には解析失敗を、通知する。二次元コードリーダーが解析結果を表示する等の出力装置を有する場合には、出力装置から解析結果を出力する。   In step S4, the analysis result is transmitted to the host device of the two-dimensional code reader. That is, the code data of the analyzed two-dimensional code is notified when the analysis is successful, and the analysis failure is notified when the analysis failure exceeds the specified number of times. When the two-dimensional code reader has an output device for displaying the analysis result, the analysis result is output from the output device.

図6は、二次元コード解析処理の詳細を示すフローチャートである。
図6に示すステップのうち、コード探索(S13)、コード正規化(S15)、コード解読(S17)の3つが、二次元コード解析処理の主ステップである。
FIG. 6 is a flowchart showing details of the two-dimensional code analysis processing.
Among the steps shown in FIG. 6, the three steps of code search (S13), code normalization (S15), and code decoding (S17) are the main steps of the two-dimensional code analysis process.

ステップS11で、初めにカメラ11を初期化して、画像取得の大きさ、撮像素子のホワイトバランス、ガンマ値などを設定する。
ステップS12で、カメラ11で撮影を行い、DMAコントローラ14を用いて撮影したカメラ画像格納領域33に転送し、画像を取得する。
In step S11, the camera 11 is first initialized, and the image acquisition size, the white balance of the image sensor, the gamma value, and the like are set.
In step S12, the camera 11 captures an image, transfers it to the captured camera image storage area 33 using the DMA controller 14, and acquires an image.

ステップS13で、撮影画像から二次元コードがどのあたりに写っているのかを探索する。
ステップS14で、ステップS13において二次元コードを探し出すことができたかできないかを判定し、探索が成功した場合にはステップS15に、探し出すことができなかった場合には、ステップS20に進む。
In step S13, it is searched where the two-dimensional code appears from the photographed image.
In step S14, it is determined whether or not the two-dimensional code can be found in step S13. If the search is successful, the process proceeds to step S15. If the search is not successful, the process proceeds to step S20.

ステップS15で、探索に成功し、二次元コードが映っている場所がわかれば、コードを正規化する。正規化とはコードを正しい位置に回転し、コードの白黒の情報を0、1の内容に置き換えることである。   In step S15, if the search is successful and the location where the two-dimensional code is shown is known, the code is normalized. Normalization is to rotate the code to the correct position and replace the black and white information of the code with the contents of 0 and 1.

ステップS16で、ステップS15において二次元コードの正規化に成功したかを判定し、正規化が成功した場合にはステップS17に、正規化できなかった場合には、ステップS20に進む。   In step S16, it is determined whether normalization of the two-dimensional code is successful in step S15. If normalization is successful, the process proceeds to step S17. If normalization is not successful, the process proceeds to step S20.

ステップS17で、正規化した二次元コードの情報を基にコードを解読する。解読の結果、誤り検知に引っかかれば解析失敗であり、誤り検知に引っかからなければ解析成功である。   In step S17, the code is decoded based on the normalized two-dimensional code information. As a result of the decoding, if the error is detected, the analysis is unsuccessful, and if the error is not detected, the analysis is successful.

ステップS18で、ステップS17において二次元コードの解析に成功したかを判定し、解析が成功した場合にはステップS19に、解析できなかった場合には、ステップS20に進む。   In step S18, it is determined whether the analysis of the two-dimensional code is successful in step S17. If the analysis is successful, the process proceeds to step S19. If the analysis is not successful, the process proceeds to step S20.

ステップS19で、解析成功を返す。
ステップS20で、解析失敗を返す。
ステップS19およびS20の解析成功か解析失敗は、解析結果として送信される。
In step S19, the analysis success is returned.
In step S20, an analysis failure is returned.
The success or failure of analysis in steps S19 and S20 is transmitted as an analysis result.

二次元コードリーダー(読取装置)の構成および解析処理については、特許文献1等に記載され、広く知られているので、これ以上の説明は省略する。   The configuration and analysis processing of the two-dimensional code reader (reading device) are described in Patent Document 1 and are widely known, and thus further description thereof is omitted.

ウェアラブル機器上に二次元コードリーダーを実装した場合、以下に示す理由で処理可能な二次元コードの画像を取得することが難しい。   When a two-dimensional code reader is mounted on a wearable device, it is difficult to obtain a two-dimensional code image that can be processed for the following reason.

1つの理由は、ウェアラブル機器は小型・軽量であることが望まれ、大容量のバッテリの搭載が難しいので、ディスプレイを搭載することができず、使用者が撮影された画像をリアルタイムに確認することができないことである。このため、成功するまで何度も撮影と解析を繰り返すことになり、規定回数内に解析に成功しないと、読取失敗となり、使用者に何度も撮影をリトライさせることになり、作業の負担となる。   One reason is that wearable devices are desired to be small and light, and it is difficult to mount a large-capacity battery, so it is not possible to mount a display and the user can check the captured image in real time. Is not possible. For this reason, imaging and analysis are repeated many times until success, and if the analysis is not successful within the specified number of times, reading will fail, and the user will be retried to shoot many times, which is a burden on the work. Become.

そこで、特許文献4は、撮影位置を示すガイド用光の照射部を設け、位置合わせの指針を使用者に提供することを提案しているが、上記のように大容量のバッテリの搭載が難しいので、ガイド用の光源を搭載する余裕がない。   Therefore, Patent Document 4 proposes to provide a guide light irradiating unit indicating a photographing position and provide a user with an alignment guide, but it is difficult to mount a large-capacity battery as described above. Therefore, there is no room for mounting a light source for guide.

もう1つの理由は、前述のように、画像メモリ(カメラ画像格納領域)が小さいことである。ウェアラブル機器は小型・軽量であるため、大容量のメモリの搭載は、大きさ、バッテリ容量および処理量増加の関係で難しい。撮影した二次元コードの画像が、図4の記憶範囲内に入らない場合には、解析失敗になる。   Another reason is that the image memory (camera image storage area) is small as described above. Since wearable devices are small and lightweight, it is difficult to mount a large-capacity memory because of the size, battery capacity, and increased processing capacity. If the captured image of the two-dimensional code does not fall within the storage range of FIG. 4, the analysis fails.

以上2つの理由で、ウェアラブル機器に搭載する二次元コードリーダー(読取装置)は、二次元コードの画像を的確に撮影して解析するのが難しく、何度も読取に失敗するため、作業の負担となっていた。これは、ウェアラブル機器に搭載されるものに限定されず、ディスプレイを搭載しておらず、画像メモリが小さい二次元コードリーダーであれば、同様の問題を有する。   For the above two reasons, it is difficult for a two-dimensional code reader (reading device) mounted on a wearable device to accurately capture and analyze an image of a two-dimensional code, and reading fails many times. It was. This is not limited to the one mounted on the wearable device, and has the same problem as long as the display is not mounted and the two-dimensional code reader has a small image memory.

以下に説明する実施形態の二次元コードリーダー(読取装置)は、規定回数内に解析に成功する確率を向上し、使用者の作業負担を軽減する。   The two-dimensional code reader (reading device) of the embodiment described below improves the probability of successful analysis within a specified number of times, and reduces the work load on the user.

上述の問題を解決するため、図4に示した撮像範囲と記憶範囲の関係に着目する。
図2のカメラ11において、レンズ21を通して撮像素子22の撮像面23に写った像は、DMAコントローラ24を経由して、図3のカメラ画像格納領域33に転送される。このとき、すべての撮像素子22の撮像面23に写った情報がカメラ画像格納領域33に転送されるわけではなく、カメラ画像格納領域33に記憶される分のみが転送される。
In order to solve the above problem, attention is paid to the relationship between the imaging range and the storage range shown in FIG.
In the camera 11 of FIG. 2, an image reflected on the imaging surface 23 of the imaging element 22 through the lens 21 is transferred to the camera image storage area 33 of FIG. 3 via the DMA controller 24. At this time, information reflected on the imaging surfaces 23 of all the imaging elements 22 is not transferred to the camera image storage area 33, but only the amount stored in the camera image storage area 33 is transferred.

たとえば、図4に示すように、撮像素子22は、最大で640×480ピクセルの画像を取得することができる撮像範囲40を有する。しかし、カメラ画像格納領域33に転送されるのは320×240ピクセル分の大きさの記憶範囲41の画像データである。これは、前述のように、大容量のメモリの搭載は、大きさ、バッテリ容量および処理量増加の関係で難しいためであり、メモリサイズの都合であえて小さな領域の画像を転送している。   For example, as illustrated in FIG. 4, the imaging element 22 has an imaging range 40 that can acquire an image of 640 × 480 pixels at the maximum. However, what is transferred to the camera image storage area 33 is image data in the storage range 41 having a size of 320 × 240 pixels. This is because, as described above, it is difficult to mount a large-capacity memory because of the size, battery capacity, and increase in processing amount, and an image in a small area is transferred for the convenience of the memory size.

図7は、撮像範囲および記憶範囲に対する二次元コードの撮影位置の例を示す図である。
実際には、二次元コードの像は正方形でなく歪んで投影され、像のエッジと撮像範囲および記憶範囲のエッジは平行とは限らない。しかし、図7では、説明を簡単にするため、二次元コードの正方形の像のエッジが、撮像範囲および記憶範囲のエッジと平行であるように撮影された例を示す。これは以下の説明でも同様であり、取得される二次元コードの像が歪んで回転しているような場合の二次元コードの解析処理については、特許文献1および特許文献5等に記載されており、それらに開示された技術を利用可能である。
FIG. 7 is a diagram illustrating an example of the imaging position of the two-dimensional code with respect to the imaging range and the storage range.
Actually, the image of the two-dimensional code is projected in a distorted manner instead of a square, and the edge of the image and the edge of the imaging range and the storage range are not always parallel. However, FIG. 7 shows an example in which the edges of the square image of the two-dimensional code are photographed so as to be parallel to the edges of the imaging range and the storage range in order to simplify the description. This is the same in the following description, and the analysis processing of the two-dimensional code when the acquired two-dimensional code image is distorted and rotated is described in Patent Document 1, Patent Document 5, and the like. The techniques disclosed in them can be used.

図7に示すように、撮影した二次元コードの像42が記憶範囲41の境界に投影された場合、解析の対象となる画像には二次元コードの一部しか含まれない。そのため、図7に示すような画像でコード解析処理を行うと、解析失敗となる。しかし、解析対象の画像としては取得できていないが、撮像範囲40には二次元コードの像42の全体が含まれている可能性がある。   As shown in FIG. 7, when a photographed two-dimensional code image 42 is projected onto the boundary of the storage range 41, only a part of the two-dimensional code is included in the image to be analyzed. Therefore, if the code analysis process is performed on an image as shown in FIG. 7, the analysis fails. However, although it cannot be acquired as an analysis target image, the imaging range 40 may include the entire image 42 of the two-dimensional code.

前述のように、記憶範囲41の撮像範囲40内における位置は、任意に設定可能である。そこで、次のフレーム画像の取得の際、カメラ画像格納領域33に転送する範囲、すなわち記憶範囲をずらすことにより、二次元コード全体を記憶範囲の内部に含められることが期待できる。実施形態では、記憶範囲の画像に対するコード解析の結果、二次元コードの一部のみが含まれ、解析が失敗した場合、二次元コードの一部であると判定された部分の位置に応じて、次のフレーム画像の取得の際の記憶範囲の撮像範囲に対する位置を変更する。記憶範囲に記憶する画像の位置は、画像取得位置を指定することにより決定され、ここでは記憶範囲の左上のコーナーの撮像範囲における位置を、画像取得位置として指定するものとする。   As described above, the position of the storage range 41 within the imaging range 40 can be arbitrarily set. Therefore, when acquiring the next frame image, it is expected that the entire two-dimensional code can be included in the storage range by shifting the range to be transferred to the camera image storage area 33, that is, the storage range. In the embodiment, as a result of the code analysis for the image in the storage range, only a part of the two-dimensional code is included, and if the analysis fails, according to the position of the part determined to be a part of the two-dimensional code, The position of the storage range with respect to the imaging range when acquiring the next frame image is changed. The position of the image stored in the storage range is determined by designating the image acquisition position. Here, the position in the imaging range of the upper left corner of the storage range is designated as the image acquisition position.

実施形態の二次元コードリーダー(読取装置)は、上記の一般的な二次元コードリーダーと同様の構成を有し、解析に失敗した後の二次元コードの解析処理が異なり、他は同じでよい。   The two-dimensional code reader (reading device) of the embodiment has the same configuration as the above-described general two-dimensional code reader, and the analysis processing of the two-dimensional code after the analysis fails is different, and the others may be the same. .

図8は、実施形態の二次元コードリーダーにおいて、プロセッサにより実現される解析部の機能ブロック図である。
図8に示すように、カメラ(撮像装置)11で生成された画像データは、記憶範囲(画像取得位置)設定データにより設定された範囲について、メモリ13のカメラ画像格納領域33に転送される。解析部50は、コード探索部51と、解析処理部52と、記憶範囲制御部52と、を有する。コード探索部51は、カメラ画像格納領域33に記憶された画像データにおける二次元コードの領域を探索し、その探索結果である二次元コードの位置を解析処理部52に出力する。解析処理部52は、コード探索部51からの探索結果に基づいて、カメラ画像格納領域33に記憶された画像データに対してコード正規化処理及びコード解読処理を行う。記憶範囲制御部52は、通知解析処理部52からコード解析に失敗したとの通知を受けると、コード探索部51から探索した二次元コードの領域の位置に関する情報を取得して、カメラ11に出力する記憶範囲(画像取得位置)設定データを変更する。これにより、カメラ画像格納領域33に記憶する画像データの記憶範囲が変更される。なお、コード探索部51がコード探索に失敗した場合、解析処理部52は解析処理を行わないが、コード探索部51が二次元コードであると推定される領域に関する情報を生成した場合には、その情報に基づいて画像データの記憶範囲を変更してもよい。
FIG. 8 is a functional block diagram of an analysis unit realized by a processor in the two-dimensional code reader of the embodiment.
As shown in FIG. 8, the image data generated by the camera (imaging device) 11 is transferred to the camera image storage area 33 of the memory 13 for the range set by the storage range (image acquisition position) setting data. The analysis unit 50 includes a code search unit 51, an analysis processing unit 52, and a storage range control unit 52. The code search unit 51 searches a region of the two-dimensional code in the image data stored in the camera image storage region 33 and outputs the position of the two-dimensional code that is the search result to the analysis processing unit 52. Based on the search result from the code search unit 51, the analysis processing unit 52 performs code normalization processing and code decoding processing on the image data stored in the camera image storage area 33. When the storage range control unit 52 receives a notification that the code analysis has failed from the notification analysis processing unit 52, the storage range control unit 52 acquires information regarding the position of the area of the two-dimensional code searched from the code search unit 51 and outputs the information to the camera 11. The storage range (image acquisition position) setting data to be changed is changed. Thereby, the storage range of the image data stored in the camera image storage area 33 is changed. Note that when the code search unit 51 fails in the code search, the analysis processing unit 52 does not perform the analysis process, but when the code search unit 51 generates information related to the region estimated to be a two-dimensional code, The storage range of the image data may be changed based on the information.

図8において、記憶範囲制御部53を除く部分は、一般的な二次元コードリーダーと同じよい。一般的な二次元コードリーダーは、カメラ11に設定される記憶範囲設定データが固定であるか、設定可能であるが一旦設定した後は解析結果に応じて変更されることはなかった。言い換えれば、カメラ画像格納領域33が記憶する画像データの記憶範囲が、撮像範囲に対して固定であるか、設定可能であるが一旦設定した後は解析結果に応じて変更されることはなかった。   In FIG. 8, the portion excluding the storage range control unit 53 is the same as that of a general two-dimensional code reader. In a general two-dimensional code reader, the storage range setting data set in the camera 11 is fixed or can be set, but once set, it is not changed according to the analysis result. In other words, the storage range of the image data stored in the camera image storage area 33 is fixed with respect to the imaging range or can be set, but once set, it is not changed according to the analysis result. .

図9は、実施形態の二次元コード解析処理の詳細を示すフローチャートである。
図9において、ステップS33−S35およびS37−S42は、図6のS12−S20に対応し、実施形態の二次元コード解析処理は、ステップS31、S32およびS36を追加したことが、図6のフローチャートと異なる。
FIG. 9 is a flowchart showing details of the two-dimensional code analysis processing of the embodiment.
In FIG. 9, steps S33-S35 and S37-S42 correspond to S12-S20 of FIG. 6, and the two-dimensional code analysis processing of the embodiment adds steps S31, S32, and S36. And different.

ステップS31で、初めに前回のコード検出位置を取得する。この探索が初回の探索であれば、コード検出位置は、撮像範囲40の中央とする。初回とは、例えば、前回の撮影から所定時間以上経過している場合である。逆に、初回でないとは、例えば、リトライの規定回数内の場合である。   In step S31, the previous code detection position is acquired first. If this search is the first search, the code detection position is the center of the imaging range 40. The first time is, for example, a case where a predetermined time or more has elapsed since the previous shooting. On the other hand, not being the first time is, for example, a case where the number of retries is within a specified number.

ステップS32で、カメラ11を初期化し、撮像範囲40における画像データの取得範囲、すなわち記憶範囲41を設定する。このとき、前回のコード検出(推定)位置が記憶範囲41の中央付近に来るように設定する。   In step S32, the camera 11 is initialized, and an image data acquisition range in the imaging range 40, that is, a storage range 41 is set. At this time, the previous code detection (estimation) position is set to be near the center of the storage range 41.

ステップS33で、カメラ11で撮影を行い、DMAコントローラ14を用いて撮影したカメラ画像格納領域33に転送し、画像を取得する。   In step S33, the camera 11 captures an image, transfers it to the captured camera image storage area 33 using the DMA controller 14, and acquires an image.

ステップS34で、撮影画像から二次元コードがどのあたりに写っているのかを探索する。探索処理については後述する。
ステップS35で、ステップS34において二次元コードを探し出すことができたかできないかを判定し、探索が成功した場合にはステップS36に、探し出すことができなかった場合には、ステップS42に進む。
In step S34, the location where the two-dimensional code appears in the photographed image is searched. The search process will be described later.
In step S35, it is determined whether or not the two-dimensional code can be found in step S34. If the search is successful, the process proceeds to step S36. If the search is not successful, the process proceeds to step S42.

ステップS36で、探索した二次元コードの位置をメモリ13のカメラ制御情報格納領域32に保存する。保存された検出位置は、解析に失敗した場合に、次の撮影時のステップS31およびS32に利用される。   In step S 36, the searched position of the two-dimensional code is stored in the camera control information storage area 32 of the memory 13. The stored detection position is used in steps S31 and S32 at the time of the next shooting when the analysis fails.

ステップS37で、二次元コードが写っている領域のコード画像について、コードを正規化する。正規化とはコードを正しい位置に回転し、コードの白黒の情報を0、1の内容に置き換えることである。   In step S37, the code is normalized with respect to the code image in the area where the two-dimensional code is shown. Normalization is to rotate the code to the correct position and replace the black and white information of the code with the contents of 0 and 1.

ステップS38で、ステップS37において二次元コードの正規化に成功したかを判定し、正規化が成功した場合にはステップS39に、正規化できなかった場合には、ステップS42に進む。   In step S38, it is determined whether normalization of the two-dimensional code is successful in step S37. If normalization is successful, the process proceeds to step S39. If normalization is not successful, the process proceeds to step S42.

ステップS39で、正規化した二次元コードの情報を基にコードを解読する。解読の結果、誤り検知に引っかかれば解析失敗であり、誤り検知に引っかからなければ解析成功である。   In step S39, the code is decoded based on the normalized two-dimensional code information. As a result of the decoding, if the error is detected, the analysis is unsuccessful, and if the error is not detected, the analysis is successful.

ステップS40で、ステップS39において二次元コードの解析に成功したかを判定し、解析が成功した場合にはステップS41に、解析できなかった場合には、ステップS42に進む。   In step S40, it is determined whether the analysis of the two-dimensional code is successful in step S39. If the analysis is successful, the process proceeds to step S41. If the analysis is not successful, the process proceeds to step S42.

ステップS41で、解析成功を返す。
ステップS42で、解析失敗を返す。
In step S41, the analysis success is returned.
In step S42, an analysis failure is returned.

次に、撮像範囲における記憶範囲の設定処理について詳細に説明する。
図10は、撮像面(撮像範囲)および画像の座標系を示す図である。
撮像面および画像の座標系は行方向と列方向で考える。図10に示すように、行方向は画像の上から下の方向であり、図10に示すように0から始まる。ここでは、行座標をyで表す。同様に、列方向は画像の左から右の方向であり、0から始まる。ここでは、列座標をxで表す。カメラの種類によっては、行方向は画像の下から上の方向に向くことはあり得る。
Next, the storage range setting process in the imaging range will be described in detail.
FIG. 10 is a diagram illustrating an imaging surface (imaging range) and an image coordinate system.
The imaging plane and the image coordinate system are considered in the row direction and the column direction. As shown in FIG. 10, the row direction is from the top to the bottom of the image, and starts from 0 as shown in FIG. Here, the row coordinate is represented by y. Similarly, the column direction is from the left to the right of the image and starts from 0. Here, the column coordinates are represented by x. Depending on the type of camera, the row direction can be from the bottom to the top of the image.

撮像範囲40のうち画像データを取得して記憶する記憶範囲41の設定は、カメラ11内部のレジスタを設定することにより行う。このレジスタへはプロセッサとカメラとを接続するインターフェース(I2CやSPI)を経由して設定する。   The storage range 41 for acquiring and storing image data in the imaging range 40 is set by setting a register inside the camera 11. This register is set via an interface (I2C or SPI) that connects the processor and the camera.

カメラ11は、内部に取得開始行、取得開始列、取得幅、取得高さを設定するレジスタを有する。カメラの種類によっては取得幅、取得高さではなく、取得終了行、取得終了列を設定するものもある。この場合、以下の関係式により取得終了行、取得終了列を設定する。
取得終了行=取得開始行+取得高さ
取得終了列=取得開始列+取得幅
実施形態は、いずれの方式を採用してもよく、取得画像の幅、高さは変わらないため、取得幅、取得高さは変化しない。
The camera 11 has a register for setting an acquisition start row, an acquisition start column, an acquisition width, and an acquisition height. Some cameras set an acquisition end row and an acquisition end column instead of an acquisition width and acquisition height. In this case, the acquisition end row and the acquisition end column are set by the following relational expression.
Acquisition end row = acquisition start row + acquisition height Acquisition end column = acquisition start column + acquisition width The embodiment may adopt any method, and the width and height of the acquired image do not change. Acquisition height does not change.

図11は、探索処理を示すフローチャートである。
探索処理については各種の手法が提案されており、実施形態ではどのような探索処理を使用してもよい。図11に示した探索処理は、特許文献5に記載された処理例である。
FIG. 11 is a flowchart showing the search process.
Various methods have been proposed for the search process, and any search process may be used in the embodiment. The search process shown in FIG. 11 is a process example described in Patent Document 5.

ステップS101で、入力画像(記憶範囲の画像データ)を、ブロック単位に走査し、所定の条件を満たすブロックをコードブロックとして検出する。ブロックの形状は任意であり、例えば、横Mピクセル、縦Nピクセルの長方形ブロックである。所定の条件は、例えば、(1)ブロック内の黒画素率がある範囲であること、(2)白画素と黒画素の変化点の割合がある範囲であること、(3)ブロック内の黒画素の連結の仕方による識別条件、(4)ブロック内の黒画素の射影の変動による識別条件である。詳細は、特許文献5に記載されているので省略するが、上記のいずれかの条件により、二次元コードの存在確率が高いブロックであるか否か判定できる。   In step S101, the input image (image data in the storage range) is scanned in units of blocks, and a block that satisfies a predetermined condition is detected as a code block. The shape of the block is arbitrary, for example, a rectangular block having horizontal M pixels and vertical N pixels. The predetermined conditions are, for example, (1) a range in which the black pixel ratio in the block is within a certain range, (2) a range in which there is a ratio of change points between white pixels and black pixels, and (3) black in the block. An identification condition depending on how the pixels are connected, and (4) an identification condition based on the projection variation of the black pixels in the block. Although details are described in Patent Document 5 and are omitted, it can be determined whether or not the block has a high probability of existence of a two-dimensional code under any of the above conditions.

ステップS102で、ステップS101で検出したコードブロックについて連結するコードブロックにより構成される領域を検出する。
ステップS103で、連結するコードブロックにより構成される領域のうち、最大の領域を二次元コード領域として検出する。
In step S102, an area composed of code blocks to be linked with respect to the code block detected in step S101 is detected.
In step S103, the largest area among the areas constituted by the linked code blocks is detected as a two-dimensional code area.

実施形態では、ステップS104およびS105は、コード探索処理としてではなく、コード正規化処理として行われる。ステップS104で、検出した二次元コード領域から二次元コード画像を抽出する。ステップS105で、二次元コードの傾き角°を検出し、必要ならば傾き補正を行う。   In the embodiment, steps S104 and S105 are performed as a code normalization process, not as a code search process. In step S104, a two-dimensional code image is extracted from the detected two-dimensional code region. In step S105, the inclination angle of the two-dimensional code is detected, and if necessary, inclination correction is performed.

実施形態では、二次元コード領域と判定された領域の中央位置を推定する。中央位置の推定は、例えば、二次元コード領域のブロックのうちもっとも上側と下側にあるブロックの中心位置の中間を縦方向の中央位置(y座標の中央位置)とし、もっとも左側と右側にあるブロックの中心位置の中間を横方向の中央位置(x座標の中央位置)とする。また、二次元コード領域のブロックの中心位置を加算して、二次元コード領域のブロック数で除して中央位置算出してもよい。
以上のようにして、二次元コード領域の中央位置が推定される。以下、推定した中央位置を推定位置と称する。
In the embodiment, the center position of the area determined as the two-dimensional code area is estimated. The estimation of the center position is, for example, the middle position of the uppermost block and the lower block among the blocks in the two-dimensional code area as the vertical center position (the center position of the y coordinate), and the leftmost and rightmost positions. The middle of the center position of the block is defined as the horizontal center position (the center position of the x coordinate). Alternatively, the center position may be calculated by adding the center positions of the blocks in the two-dimensional code area and dividing by the number of blocks in the two-dimensional code area.
As described above, the center position of the two-dimensional code area is estimated. Hereinafter, the estimated center position is referred to as an estimated position.

次に、ステップS32における、二次元コードの推定位置に応じて、次フレーム時にカメラから画像を取得する範囲を変更する処理を説明する。   Next, the process of changing the range for acquiring an image from the camera at the next frame according to the estimated position of the two-dimensional code in step S32 will be described.

まず、差分の計算においては、行方向の差分と列方向の差分を求める。
行方向の差分=コードの行方向の推定位置−記憶範囲の中心の行方向の位置
列方向の差分=コードの列方向の推定位置−記憶範囲の中心の列方向の位置
すると、コードの推定位置が記憶範囲中心よりも上側にある場合、行方向の差分は負の値となり、コードの推定位置が記憶範囲中心よりも下側にある場合、行方向の差分は正の値となる。また、コードの推定位置が記憶範囲中心よりも左側にある場合、列方向の差分は負の値となり、コードの推定位置が記憶範囲中心よりも右側にある場合、列方向の差分は正の値となる。
First, in the difference calculation, a difference in the row direction and a difference in the column direction are obtained.
Difference in row direction = estimated position in the row direction of the code-position in the row direction at the center of the storage range Difference in the column direction = estimated position in the column direction of the code-position in the column direction at the center of the storage range Is above the storage range center, the difference in the row direction is a negative value. When the estimated position of the code is below the center of the storage range, the difference in the row direction is a positive value. If the estimated position of the code is on the left side of the storage range center, the difference in the column direction is a negative value. If the estimated position of the code is on the right side of the storage range center, the difference in the column direction is a positive value. It becomes.

この差分の値を用いて、次のフレームにおける画像取得位置を計算する。初めに、現在の取得位置(記憶範囲の左上のコーナー位置)の列方向の位置に列方向の差分を加え、次に取得する記憶範囲の列方向の取得位置とする。同様に、現在の取得位置の行方向の位置に行方向の差分を加え、次の取得位置の行方向の取得位置とする。   Using this difference value, the image acquisition position in the next frame is calculated. First, the difference in the column direction is added to the position in the column direction of the current acquisition position (the upper left corner position of the storage range) to obtain the acquisition position in the column direction of the storage range to be acquired next. Similarly, the difference in the row direction is added to the position in the row direction of the current acquisition position to obtain the acquisition position in the row direction of the next acquisition position.

さらに、次の取得位置から画像を取得しても撮像範囲に収まることを確認し、収まらない場合は取得位置を調整する。言い換えれば、次に取得する記憶範囲が、撮像範囲内に収まるか判定し、収まらない場合は、撮像範囲の境界に応じて次の取得位置を設定する。   Furthermore, even if an image is acquired from the next acquisition position, it is confirmed that it is within the imaging range, and if it does not fit, the acquisition position is adjusted. In other words, it is determined whether the storage range to be acquired next falls within the imaging range. If not, the next acquisition position is set according to the boundary of the imaging range.

具体的には、次の取得位置の列方向の位置が0よりも小さい場合は、次の取得位置の列方向の位置を0とする。次の取得位置の列方向の位置が、(撮像範囲の列方向の長さ)−(記憶範囲の列方向の長さ)よりも大きい場合は、次の取得位置を、(撮像範囲の列方向の長さ)−(記憶範囲の列方向の長さ)に設定する。   Specifically, when the position in the column direction of the next acquisition position is smaller than 0, the position in the column direction of the next acquisition position is set to 0. When the position in the column direction of the next acquisition position is larger than (length in the column direction of the imaging range) − (length in the column direction of the storage range), the next acquisition position is set to (column direction of the imaging range). The length of the storage range in the column direction).

次の取得位置の行方向の位置が0よりも小さい場合は、次の取得位置の行方向の位置を0とする。次の取得位置の行方向の位置が、(撮像範囲の行方向の長さ)−(記憶範囲の行方向の長さ)よりも大きい場合は、次の取得位置の行方向の位置を、(撮像範囲の行方向の長さ)−(記憶範囲の行方向の長さ)に設定する。   When the position in the row direction of the next acquisition position is smaller than 0, the position in the row direction of the next acquisition position is set to 0. When the position in the row direction of the next acquisition position is larger than (length in the row direction of the imaging range) − (length in the row direction of the storage range), the position in the row direction of the next acquisition position is ( The length of the imaging range in the row direction) − (the length of the storage range in the row direction).

例えば、撮像範囲の大きさが640×480(列方向座標値が0から639、行方向座標値0から479)であり、記憶範囲の大きさが320×240(列方向座標値が0から319、行方向座標値が0から239)であったとする。   For example, the size of the imaging range is 640 × 480 (column direction coordinate values 0 to 639, row direction coordinate values 0 to 479), and the storage range size is 320 × 240 (column direction coordinate values 0 to 319). Assume that the row direction coordinate value is 0 to 239).

このとき、撮像範囲の中心は、列方向位置が320、行方向位置が240となり、記憶範囲の中心は、列方向位置が160、行方向位置が120となる。
初回の撮影時には、取得位置を、列方向位置を撮像範囲の160に、行方向位置を撮像範囲の120に設定し、撮像範囲の中心と記憶範囲の中心が一致するようにする。
At this time, the center of the imaging range is 320 in the column direction and 240 in the row direction, and the center of the storage range is 160 in the column direction and 120 in the row direction.
At the time of the first shooting, the acquisition position is set to 160 in the imaging range for the column direction position and 120 to the imaging range for the row direction so that the center of the imaging range matches the center of the storage range.

次に、コード探索の結果、コード中心の推定位置が、列方向100、行方向100であることが判明し、コードの正規化、解読に失敗したとする。このとき、次のフレームで取得位置を、次のように変更する。   Next, as a result of code search, it is determined that the estimated position of the code center is in the column direction 100 and the row direction 100, and code normalization and decoding have failed. At this time, the acquisition position is changed as follows in the next frame.

行方向の差分=コード中心の行方向の推定位置−記憶範囲中心の行方向の位置=100−160=−60
列方向の差分=コード中心の列方向の推定位置−記憶範囲中心の列方向の位置=100−120=−20
Difference in row direction = estimated position in the row direction at the code center−position in the row direction at the center of the storage range = 100−160 = −60
Difference in column direction = estimated position in the column direction at the code center−position in the column direction at the center of the storage range = 100−120 = −20

次の取得位置の列方向の位置=現在の取得位置の列方向の位置+列方向の差分=160+(−60)=100
次の取得位置の行方向の位置=現在の取得位置の行方向の位置+行方向の差分=120+(−20)=100
Column direction position of next acquisition position = column direction position of current acquisition position + column direction difference = 160 + (− 60) = 100
Next acquisition position in row direction = Current acquisition position in row direction + Row direction difference = 120 + (− 20) = 100

この場合、どちらの方向の位置も撮像範囲内に収まるため、次のフレームはこの位置のまま撮影を行う。   In this case, since the position in either direction is within the imaging range, the next frame is imaged at this position.

さらに、変更したこの取得位置での画像でコード探索をした結果、コード中心の推定位置が列方向位置10、行方向位置10であると算出され、コードの正規化、解読に失敗したとする。このとき、次のフレームで取得位置をさらに変更する。   Further, as a result of code search using the image at the changed acquisition position, it is assumed that the estimated position of the code center is calculated to be the column direction position 10 and the row direction position 10, and code normalization and decoding have failed. At this time, the acquisition position is further changed in the next frame.

行方向の差分=コードの行方向の推定位置−記憶範囲中心の行方向の位置=10−160=−150
列方向の差分=コードの列方向の推定位置−記憶範囲中心の列方向の位置=10−120=−110
Difference in row direction = estimated position in the row direction of the code−position in the row direction at the center of the storage range = 10−160 = −150
Difference in column direction = estimated position in the column direction of the code−position in the column direction at the center of the storage range = 10−120 = −110

次の取得位置の列方向の位置=現在の取得位置の列方向の位置+列方向の差分=100+(−150)=−50
次の取得位置の行方向の位置=現在の取得位置の行方向の位置+行方向の差分=100+(−110)=−10
Column direction position of next acquisition position = column direction position of current acquisition position + column direction difference = 100 + (− 150) = − 50
Next acquisition position in the row direction = current acquisition position in the row direction + difference in the row direction = 100 + (− 110) = − 10

この場合、取得位置が、撮像範囲を超えているため、補正する必要があり、補正の結果、次の取得位置の列方向の位置=0、次の取得位置の行方向の位置=0とする。   In this case, since the acquisition position exceeds the imaging range, correction is necessary. As a result of correction, the position of the next acquisition position in the column direction = 0 and the position of the next acquisition position in the row direction = 0. .

上記の二次元コードの中央位置の推定処理および画像取得位置の変更処理は、ピクセル単位で行われたが、演算量を削減するために、複数のピクセルからなるグリッド単位で行うことも可能である。以下、グリッド単位で処理する変形例を説明する。   The processing for estimating the center position of the two-dimensional code and the processing for changing the image acquisition position are performed in units of pixels. However, in order to reduce the amount of calculation, it is also possible to perform the processing in units of grids including a plurality of pixels. . Hereinafter, a modified example of processing in grid units will be described.

この変形例では、記憶範囲41を複数のグリッドに分割する。
図12は、複数のグリッドに分割された記憶範囲を示す図である。
In this modification, the storage range 41 is divided into a plurality of grids.
FIG. 12 is a diagram illustrating a storage range divided into a plurality of grids.

図12では、記憶範囲41を、行方向の線(縦線)グリッドx0、x1、…xm(m:1以上の整数)および列方向の線(横線)グリッドy0、y1、…、yn(n:1以上の整数)で、m×nの同じ長方形のグリッド領域に分割される。ただし、グリッドx0とxmは、記憶範囲41の左右のエッジの値(x0=0、xm=画像の幅)とし、グリッドy0とynは、記憶範囲41の上下のエッジの値(y0=0、yn=画像の高さ)とする。   In FIG. 12, the storage range 41 is divided into row-direction line (vertical line) grids x0, x1,... Xm (m: integer of 1 or more) and column-direction line (horizontal line) grids y0, y1,. Is an integer greater than or equal to: 1) and is divided into the same rectangular grid area of m × n. However, the grids x0 and xm are the values of the left and right edges of the storage range 41 (x0 = 0, xm = the width of the image), and the grids y0 and yn are the values of the upper and lower edges of the storage range 41 (y0 = 0, yn = image height).

図12では、撮像範囲40は、記憶範囲41の外部および内部含めて格子状に分割される。つまり、列方向については、は記憶範囲41の外部、内部を含めて以下のようなm+2の領域に分割される。   In FIG. 12, the imaging range 40 is divided into a grid including the outside and inside of the storage range 41. That is, the column direction is divided into the following m + 2 areas including the outside and inside of the storage range 41.

グリッドx0より小さい領域
グリッドx0以上、グリッドx1より小さい領域
グリッドx1以上、グリッドx2より小さい領域
・・・
グリッドxi以上、グリッドx(i+1)より小さい領域
・・・
グリッドx(m−1)以上、グリッドxmより小さい領域
グリッドxmより大きい領域
Area smaller than grid x0 Area smaller than grid x0, smaller than grid x1 Area larger than grid x1 and smaller than grid x2 ...
Area greater than or equal to grid xi and smaller than grid x (i + 1)
Area greater than grid x (m-1) and smaller than grid xm Area larger than grid xm

同様に、行方向については、は記憶範囲41の外部、内部を含めて以下のようなn+2の領域に分割される。
グリッドy0より小さい領域
グリッドy0以上、グリッドy1より小さい領域
グリッドy1以上、グリッドy2より小さい領域
・・・
グリッドyi以上、グリッドy(i+1)より小さい領域
・・・
グリッドy(n−1)以上、グリッドynより小さい領域
グリッドynより大きい領域
したがって、記憶範囲41の内部、外部を含めて(m+2)×(n+2)の領域に分割される。
Similarly, the row direction is divided into the following n + 2 areas including the outside and inside of the storage range 41.
Area smaller than grid y0 Area larger than grid y0 and area smaller than grid y1 Area larger than grid y1 and smaller than grid y2 ...
Area greater than or equal to grid yi and smaller than grid y (i + 1)
Area greater than or equal to grid y (n−1) and smaller than grid yn Area larger than grid yn Therefore, the area is divided into (m + 2) × (n + 2) areas including the inside and outside of the storage range 41.

図13は、グリッドに分割した例を示す図である。
図13では、m=3、n=3とし、グリッドx0=0、x1=106、x2=212、x3=320、y0=0、y1=80、y2=160、y3=240としている。これにより、図13に示すように、記憶範囲41内部で行方向に3つ、列方向に3つ分割され、合計9個のグリッド領域が形成され、外部も含めると行方向、列方向にそれぞれ5つに分割されるため合計25個のグリッド領域になる。
FIG. 13 is a diagram illustrating an example of division into grids.
In FIG. 13, m = 3 and n = 3, and the grids are x0 = 0, x1 = 106, x2 = 212, x3 = 320, y0 = 0, y1 = 80, y2 = 160, and y3 = 240. As a result, as shown in FIG. 13, it is divided into three in the row direction and three in the column direction inside the storage range 41 to form a total of nine grid areas, including the outside, respectively in the row direction and the column direction. Since it is divided into five, there are a total of 25 grid areas.

グリッド領域は、前述のコード探索のブロックより大きく、複数個のブロックを含むようにすることが望ましい。
前述の二次元コード領域の中央値の推定は、推定した中央値がどのグリッド領域に入るか判明すればよい。そこで、上記の方法で推定された二次元コード領域の中央値が、どのグリッド領域に含まれるか判定する。各グリッド領域には、あらかじめ差分が割り当てられており、そのグリッド領域に割り当てられた差分に応じて、次の画像取得位置を変更する。
The grid area is preferably larger than the code search block described above and includes a plurality of blocks.
The above-described estimation of the median value of the two-dimensional code area may be made by determining which grid area the estimated median value falls into. Therefore, it is determined in which grid area the median value of the two-dimensional code area estimated by the above method is included. A difference is assigned to each grid area in advance, and the next image acquisition position is changed according to the difference assigned to the grid area.

また、前述の二次元コードのブロックの探索で、二次元コードの存在確率が高いブロックをもっとも多く含むグリッド領域を、「コードの推定中央位置を含むグリッド領域」とみなす。そして、そのグリッド領域に割り当てられた差分に応じて、次の画像取得位置を変更するようにしてもよい。   In addition, in the above-described search for the block of the two-dimensional code, the grid area including the most blocks having a high probability of existence of the two-dimensional code is regarded as the “grid area including the estimated central position of the code”. Then, the next image acquisition position may be changed according to the difference assigned to the grid area.

グリッド領域は、該当するブロックを含むか否かは、該当するブロックの中心座標をグリッド領域が含むか否かで判定する。
次に、グリッド領域への差分の割り当てについて説明する。
Whether or not the grid area includes the corresponding block is determined by whether or not the grid area includes the center coordinates of the corresponding block.
Next, the assignment of the difference to the grid area will be described.

図12に示すように、記憶領域41の内部、外部を含めて(m+2)×(m+2)の分割されたグリッド領域に対し、行方向、列方向の差分をそれぞれ割り当てる。ただし、以下の条件を満たす必要がある。   As shown in FIG. 12, the difference in the row direction and the column direction is respectively assigned to the (m + 2) × (m + 2) divided grid areas including the inside and the outside of the storage area 41. However, the following conditions must be satisfied.

(1)列方向の位置(x座標)が異なる任意の2つの分割されたグリッド領域に対し、左側のグリッド領域に対応付けられた列方向の差分は、右側のグリッド領域に対応付けられた列方向の差分に等しいか、より小さい。   (1) For any two divided grid areas with different positions (x coordinates) in the column direction, the difference in the column direction associated with the left grid area is the column associated with the right grid area. Less than or equal to the direction difference.

(2)行方向の位置(y座標)が異なる任意の2つの分割されたグリッド領域に対し、上側のグリッド領域に対応付けられた行方向の差分は、下側の領域に対応付けられた行方向の差分に等しいか、より小さい。   (2) For any two divided grid areas having different positions (y coordinates) in the row direction, the difference in the row direction associated with the upper grid area is the line associated with the lower area. Less than or equal to the direction difference.

図13には、上記の(1)および(2)の条件を満たすように割り当てた差分の例が示される。この差分の値を用いて、次のフレームにおける画像取得位置を計算する。   FIG. 13 shows an example of the difference assigned so as to satisfy the above conditions (1) and (2). Using this difference value, the image acquisition position in the next frame is calculated.

初めに、現在の画像取得位置の列方向の位置に列方向の差分を加え、次の取得位置の列方向の位置とする。
さらに、現在の画像取得位置の行方向の位置に行方向の差分を加え、次の取得位置の行方向の位置とする。
First, the difference in the column direction is added to the position in the column direction of the current image acquisition position to obtain the column direction position of the next acquisition position.
Further, the difference in the row direction is added to the position in the row direction of the current image acquisition position to obtain the position in the row direction of the next acquisition position.

次に、次の取得位置から画像を取得しても撮像面に収まることを確認し、収まらない場合は取得位置を調整する。
具体的には、次の取得位置の列方向の位置が0よりも小さい場合は、次の取得位置の列方向の位置を0とする。
Next, even if an image is acquired from the next acquisition position, it is confirmed that it will fit on the imaging surface, and if it does not fit, the acquisition position is adjusted.
Specifically, when the position in the column direction of the next acquisition position is smaller than 0, the position in the column direction of the next acquisition position is set to 0.

次の取得位置の列方向の位置が、(撮像範囲の列方向の長さ)−(記憶範囲の列方向の長さ)よりも大きい場合は、次の取得位置の列方向の位置を、(撮像範囲の列方向の長さ)−(記憶範囲の列方向の長さ)に設定する。   When the position in the column direction of the next acquisition position is larger than (length in the column direction of the imaging range) − (length in the column direction of the storage range), the position in the column direction of the next acquisition position is ( The length of the imaging range in the column direction) − (the length of the storage range in the column direction).

次の取得位置の行方向の位置が0よりも小さい場合は、次の取得位置の行方向の位置を0とする。
次の取得位置の行方向の位置が、(撮像範囲の行方向の長さ)−(記憶範囲の行方向の長さ)よりも大きい場合は、次の取得位置の行方向の位置を、(撮像範囲の行方向の長さ)−(記憶範囲の行方向の長さ)に設定する。
When the position in the row direction of the next acquisition position is smaller than 0, the position in the row direction of the next acquisition position is set to 0.
When the position in the row direction of the next acquisition position is larger than (length in the row direction of the imaging range) − (length in the row direction of the storage range), the position in the row direction of the next acquisition position is ( The length of the imaging range in the row direction) − (the length of the storage range in the row direction).

この方法での処理例を、図13を参照して説明する。
初めに、撮像範囲からの画像取得位置(記憶範囲の左上コーナーの位置))を列方向位置160、行方向位置120とする。
A processing example using this method will be described with reference to FIG.
First, let the image acquisition position from the imaging range (the position of the upper left corner of the storage range)) be the column direction position 160 and the row direction position 120.

コード探索の結果、コード中心の推定位置が列方向位置100、行方向位置100であると算出され、コードの正規化、解読に失敗したとする。このとき、次のフレームでの画像の取得位置を変更する。   As a result of the code search, it is assumed that the estimated position of the code center is calculated as the column direction position 100 and the row direction position 100, and the code normalization and decoding have failed. At this time, the image acquisition position in the next frame is changed.

まず、コード中心の推定位置が列方向位置100、行方向位置100で見つかったことにより、図13のグリッドx0とx1およびグリッドy1とy2で囲まれたグリッド領域が、推定位置のグリッドの領域となる。このグリッド領域に割り当てられた差分は列方向の差分が−160、行方向の差分が0となる。   First, since the estimated position of the code center is found at the column direction position 100 and the row direction position 100, the grid area surrounded by the grids x0 and x1 and the grids y1 and y2 in FIG. Become. The difference assigned to the grid area is −160 in the column direction and 0 in the row direction.

現在の取得位置に差分を加えると、次のフレームでの画像取得位置は、列方向位置が0、行方向位置が120となる。この位置は撮像面の範囲内であるため、この位置を次のフレームの画像取得位置とする。   When a difference is added to the current acquisition position, the image acquisition position in the next frame is 0 in the column direction position and 120 in the row direction position. Since this position is within the range of the imaging surface, this position is set as an image acquisition position for the next frame.

さらに、この取得位置で記憶範囲に記憶した画像についてコード探索をした結果、コードの中心の推定位置が列方向位置10、行方向位置10に見つかり、コードの正規化、解読に失敗したとする。このとき、次のフレームで撮影画像の取得位置をさらに変更する。   Further, as a result of code search for the image stored in the storage range at this acquisition position, it is assumed that the estimated position of the code center is found at the column direction position 10 and the row direction position 10 and the code normalization and decoding have failed. At this time, the captured image acquisition position is further changed in the next frame.

この位置に対応するグリッド領域は、図13のグリッドx0とx1およびグリッドy0とy1で囲まれたグリッド領域であり、このグリッド領域に割り当てられた差分は列方向の差分が−160、行方向の差分が−120となる。   The grid area corresponding to this position is a grid area surrounded by the grids x0 and x1 and the grids y0 and y1 in FIG. 13, and the difference assigned to this grid area is −160 in the column direction and the difference in the row direction. The difference is -120.

現在の取得位置(0,120)に差分を加えると、次のフレームでの画像取得位置は列方向位置が−160、行方向位置が0となる。この位置は撮像面の外であるため、取得位置を調整する。調整の結果、画像取得位置は、列方向位置が0、行方向位置が0となる。   When a difference is added to the current acquisition position (0, 120), the image acquisition position in the next frame is -160 in the column direction and 0 in the row direction. Since this position is outside the imaging surface, the acquisition position is adjusted. As a result of the adjustment, the image acquisition position is 0 in the column direction position and 0 in the row direction position.

以上説明したように、実施形態によれば、撮影リトライの回数を減らすことができ、検出時間を短縮することができる。この結果、プロセッサの動作時間の短縮につながり、システムの消費電力の削減に貢献する。   As described above, according to the embodiment, the number of shooting retries can be reduced, and the detection time can be shortened. As a result, the operation time of the processor is shortened and the power consumption of the system is reduced.

以上、実施形態の二次元コードリーダー(読取装置)について説明したが、各種の変形例が可能であるのは言うまでもない。上記の例では、リトライの規定回数内の撮影以外は初回の撮影として、撮像範囲と記憶範囲の中心が一致するように画像の取得位置を設定するとしたが、例えば、二次元コードリーダーを同じ使用者が使用する場合には、前回の解析に成功した時の画像の取得位置を保存しておき、それを使用してもよい。これにより、使用者が二次元コードリーダーを使用する場合の癖を反映することができ、1回目の撮影で取得した画像で二次元コードを解析することができる可能性が向上する。   The two-dimensional code reader (reading device) of the embodiment has been described above, but it goes without saying that various modifications are possible. In the above example, the image acquisition position is set so that the center of the imaging range coincides with the center of the storage range as the first shooting except for shooting within the specified number of retries, but for example, the same use of a two-dimensional code reader When the user uses it, the image acquisition position when the previous analysis was successful may be stored and used. As a result, the trap when the user uses the two-dimensional code reader can be reflected, and the possibility that the two-dimensional code can be analyzed with the image acquired by the first photographing is improved.

以上、実施形態を説明したが、ここに記載したすべての例や条件は、発明および技術に適用する発明の概念の理解を助ける目的で記載されたものである。特に記載された例や条件は発明の範囲を制限することを意図するものではなく、明細書のそのような例の構成は発明の利点および欠点を示すものではない。発明の実施形態を詳細に記載したが、各種の変更、置き換え、変形が発明の精神および範囲を逸脱することなく行えることが理解されるべきである。   The embodiment has been described above, but all examples and conditions described herein are described for the purpose of helping understanding of the concept of the invention applied to the invention and technology. In particular, the examples and conditions described are not intended to limit the scope of the invention, and the construction of such examples in the specification does not indicate the advantages and disadvantages of the invention. Although embodiments of the invention have been described in detail, it should be understood that various changes, substitutions and modifications can be made without departing from the spirit and scope of the invention.

11 カメラ(撮像装置)
12 プロセッサ
13 メモリ
14 DMAコントローラ
22 撮像素子
23 撮像面
24 コントローラ
33 カメラ画像格納領域
40 撮像範囲
41 記憶範囲
50 解析部
51 コード探索部
52 解析処理部
53 記憶範囲制御部
11 Camera (imaging device)
DESCRIPTION OF SYMBOLS 12 Processor 13 Memory 14 DMA controller 22 Image sensor 23 Imaging surface 24 Controller 33 Camera image storage area 40 Imaging range 41 Storage range 50 Analysis part 51 Code search part 52 Analysis processing part 53 Storage range control part

Claims (8)

二次元撮像装置と、
前記二次元撮像装置が撮像した画像データのうち、前記二次元撮像装置の撮像範囲より狭い記憶範囲の画像データを記憶するメモリと、
撮像により取得した前記記憶範囲の画像データを解析し、画像に含まれる二次元コードを解析する解析部と、を備え、
前記解析部は、
前記記憶範囲における二次元コードの領域を探索するコード探索部と、
前記記憶範囲の画像データでの二次元コードの解析に失敗した時に、前記コード探索部が探索した前記二次元コードの領域の位置に基づいて、次の撮像における前記記憶範囲の前記撮像範囲における位置を制御する記憶範囲制御部と、を備えることを特徴とする二次元コード読取装置。
A two-dimensional imaging device;
Of the image data captured by the two-dimensional imaging device, a memory that stores image data in a storage range narrower than the imaging range of the two-dimensional imaging device;
Analyzing the image data of the storage range acquired by imaging, and analyzing a two-dimensional code included in the image,
The analysis unit
A code search unit for searching a region of a two-dimensional code in the storage range;
Based on the position of the region of the two-dimensional code searched by the code search unit when the analysis of the two-dimensional code in the image data of the storage range fails, the position in the imaging range of the storage range in the next imaging A two-dimensional code reading device comprising: a storage range control unit that controls
前記コード探索部は、前記記憶範囲を複数のブロックに分割し、前記二次元コードの画像が含まれるブロックをコードブロックと判定する請求項1に記載の二次元コード読取装置。   The two-dimensional code reading device according to claim 1, wherein the code search unit divides the storage range into a plurality of blocks and determines a block including the image of the two-dimensional code as a code block. 前記記憶範囲制御部は、前記コードブロックの集合から二次元コードの領域を決定し、次の撮像で、決定した前記二次元コードの領域が前記記憶範囲内に入るように、前記記憶範囲の前記撮像範囲における位置を制御する請求項2に記載の二次元コード読取装置。   The storage range control unit determines a region of a two-dimensional code from the set of code blocks, and in the next imaging, the determined region of the two-dimensional code falls within the storage range. The two-dimensional code reader according to claim 2, wherein the position in the imaging range is controlled. 前記記憶範囲制御部は、前記コードブロックの集合の中央位置を推定し、推定した前記中央位置が前記記憶範囲の中心に位置するように制御する請求項3に記載の二次元コード読取装置。   The two-dimensional code reader according to claim 3, wherein the storage range control unit estimates a central position of the set of code blocks, and controls the estimated central position to be positioned at the center of the storage range. 前記記憶範囲制御部は、前記コードブロックの集合の中央位置の推定を、推定した前記中央位置を含む前記ブロックの中心が前記記憶範囲の中心に位置するように制御する請求項3に記載の二次元コード読取装置。   The storage range control unit controls the estimation of the center position of the set of code blocks so that the center of the block including the estimated center position is positioned at the center of the storage range. Dimensional code reader. 前記記憶範囲制御部は、前記記憶範囲を複数のブロックに分割し、前記二次元コードの画像の存在確率が高いブロックを中央ブロックと判定し、次の撮像で、決定した前記中央ブロックの中心が前記記憶範囲の中心になるように、前記記憶範囲の前記撮像範囲における位置を制御する請求項1に記載の二次元コード読取装置。   The storage range control unit divides the storage range into a plurality of blocks, determines a block having a high existence probability of the image of the two-dimensional code as a central block, and determines the center of the central block determined in the next imaging. The two-dimensional code reading device according to claim 1, wherein the position of the storage range in the imaging range is controlled so as to be the center of the storage range. 前記記憶範囲制御部は、前記記憶範囲を、隣接する前記ブロックを複数含むグリッド領域に分割し、前記グリッド領域単位で、前記記憶範囲の前記撮像範囲における位置を制御する請求項3から6のいずれか1項に記載の二次元コード読取装置。   The storage range control unit divides the storage range into grid regions including a plurality of adjacent blocks, and controls the position of the storage range in the imaging range in units of the grid regions. The two-dimensional code reader according to claim 1. 二次元撮像装置が撮像した画像データのうち、二次元撮像装置の撮像範囲より狭い記憶範囲の画像データをメモリに記憶し、記憶範囲の画像データを解析し、画像に含まれる二次元コードを解析する二次元コード読取方法であって、
前記記憶範囲における二次元コードの領域を探索し、
前記記憶範囲の画像データでの二次元コードの解析を行い、解析に失敗した時に、探索した前記二次元コードの領域の位置に基づいて、次の撮像における前記記憶範囲の前記撮像範囲における位置を制御する、ことを特徴とする二次元コード読取方法。
Among the image data captured by the 2D imaging device, the image data in the storage range narrower than the imaging range of the 2D imaging device is stored in the memory, the image data in the storage range is analyzed, and the 2D code included in the image is analyzed A two-dimensional code reading method
Search for the area of the two-dimensional code in the storage range,
The analysis of the two-dimensional code in the image data of the storage range, and when the analysis fails, based on the position of the area of the two-dimensional code searched for, the position of the storage range in the imaging range in the next imaging A two-dimensional code reading method characterized by controlling.
JP2015024356A 2015-02-10 2015-02-10 Two-dimensional code reading apparatus and method Pending JP2016148925A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015024356A JP2016148925A (en) 2015-02-10 2015-02-10 Two-dimensional code reading apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015024356A JP2016148925A (en) 2015-02-10 2015-02-10 Two-dimensional code reading apparatus and method

Publications (1)

Publication Number Publication Date
JP2016148925A true JP2016148925A (en) 2016-08-18

Family

ID=56691703

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015024356A Pending JP2016148925A (en) 2015-02-10 2015-02-10 Two-dimensional code reading apparatus and method

Country Status (1)

Country Link
JP (1) JP2016148925A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020161106A (en) * 2019-03-22 2020-10-01 株式会社デンソーウェーブ Information reading device and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020161106A (en) * 2019-03-22 2020-10-01 株式会社デンソーウェーブ Information reading device and program
JP7283312B2 (en) 2019-03-22 2023-05-30 株式会社デンソーウェーブ Information reader and program

Similar Documents

Publication Publication Date Title
US11010985B2 (en) Electronic device and method for adjusting size of three-dimensional object in augmented reality
US9208579B2 (en) Object tracking device
US8792727B2 (en) Image processing device, image processing method, and program
US10733705B2 (en) Information processing device, learning processing method, learning device, and object recognition device
US20150116314A1 (en) Display control method, system and medium
WO2017120223A1 (en) Optical reading of external segmented display
CN105208263B (en) Image processing apparatus and its control method
CN114640833A (en) Projection picture adjusting method and device, electronic equipment and storage medium
CN115514897A (en) Method and device for processing image
KR20200096426A (en) Moving body detecting device, moving body detecting method, and moving body detecting program
JP6564136B2 (en) Image processing apparatus, image processing method, and program
US9773188B2 (en) Information processing apparatus, imaging apparatus, information processing system, information processing method, and program for removing unwanting objects from images
JP2016148925A (en) Two-dimensional code reading apparatus and method
CN109788199B (en) Focusing method suitable for terminal with double cameras
JP2019175112A (en) Image processing device, photographing device, image processing method, and program
US10880457B2 (en) Image processing apparatus, image capturing apparatus, image processing method, and storage medium
CN101690168A (en) Image processing device, image processing method, and integrated circuit for processing images
JP2018125658A (en) Portable information processing device having camera function, display control method thereof, and program
JP2019220073A (en) Object tracing device, object tracing system, and object tracing method
JP2014071818A (en) Two-dimensional code reader and two-dimensional code reading method
US11790483B2 (en) Method, apparatus, and device for identifying human body and computer readable storage medium
JP2004062103A (en) Image processing device and method, information processing device and method, recording medium and program
JP2021140459A (en) Image processing system
CN110674863B (en) Hamming code identification method and device and electronic equipment
CN115086539B (en) Shooting point positioning method and system