JP2014056382A - Two-dimensional code reader and two-dimensional code reading method - Google Patents

Two-dimensional code reader and two-dimensional code reading method Download PDF

Info

Publication number
JP2014056382A
JP2014056382A JP2012200323A JP2012200323A JP2014056382A JP 2014056382 A JP2014056382 A JP 2014056382A JP 2012200323 A JP2012200323 A JP 2012200323A JP 2012200323 A JP2012200323 A JP 2012200323A JP 2014056382 A JP2014056382 A JP 2014056382A
Authority
JP
Japan
Prior art keywords
image
dimensional code
unit
luminance
reading
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
JP2012200323A
Other languages
Japanese (ja)
Inventor
Fumio Igarashi
史生 五十嵐
Seiji Okumura
誠司 奥村
Masahito Matsushita
雅仁 松下
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2012200323A priority Critical patent/JP2014056382A/en
Publication of JP2014056382A publication Critical patent/JP2014056382A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To solve the problem in which when an environment having a two-dimensional reader installed is a dark site without brightness required for reading a two-dimensional code, upon reading the two-dimensional code with an auxiliary illumination from one direction capable of reading the two-dimensional code, luminance irregularity largely occurs and thereby, binarization processing of an image having the two-dimensional code read is not well performed and the reading of the two-dimensional code cannot be performed.SOLUTION: On the basis of luminance of a predetermined area of the two-dimensional code detected from an image, brightness of a periphery of the two-dimensional code is determined, and luminance of an auxiliary illumination connected in the vicinity where the image is photographed is controlled, and thereby, even if the environment having the two-dimensional code reader installed is the dark site, the binarization processing of the image having the two-dimensional code read is made possible and thus, the two-dimensional code can be read.

Description

本発明は、2次元コードを読み取る2次元コード読取装置および2次元コード読取方法に関するものである。   The present invention relates to a two-dimensional code reading device and a two-dimensional code reading method for reading a two-dimensional code.

従来の2次元コード読取装置は、2次元コードの読取可否を行うために、2次元コード内の黒画素と白画素の濃度差に着目して、2次元コード内で必ず黒画素となる部分と白画素となる部分の輝度を測定してそれぞれ平均値あるいは最頻値を求め、白画素と黒画素の間の輝度さを算出する。この値が所定の閾値を下回った場合、読取安定度が低いと判断し、2次元コードの読取が可能であっても読み取り安定度が低下していることをユーザに通知することによって、2次元コードが読み取れなくなる自体を防ぐことができた(例えば、特許文献1)。   In order to determine whether or not a two-dimensional code can be read, a conventional two-dimensional code reader pays attention to a density difference between a black pixel and a white pixel in the two-dimensional code. The luminance of the white pixel portion is measured to obtain the average value or mode value, and the luminance between the white pixel and the black pixel is calculated. If this value falls below a predetermined threshold, it is determined that the reading stability is low, and the two-dimensional code is notified by notifying the user that the reading stability is reduced even if the two-dimensional code can be read. It was possible to prevent the code itself from becoming unreadable (for example, Patent Document 1).

また、2次元コード読取時に照明のばらつきがある環境においても2次元コードが正しく読めるように、読取前処理として行う画像を閾値によって黒と白(1と0)の2値化データにする2値化処理において、画面を小領域に分割し、その小領域ごとに輝度のヒストグラフを作成して輝度ムラの有無を確認し、輝度ムラに応じてそれぞれに適した2値化処理を行う方法も提案されている(例えば、特許文献2)。   In addition, a binary image of black and white (1 and 0) is converted into a binary data of black and white by a threshold value so that the two-dimensional code can be read correctly even in an environment where there is a variation in illumination when reading the two-dimensional code. In the digitization process, a method is also proposed in which the screen is divided into small areas, a luminance histogram is created for each small area to check for luminance irregularities, and binarization processing suitable for each luminance irregularity is performed. (For example, Patent Document 2).

特開2004−54645号公報JP 2004-54645 A 特開2001−250079号公報Japanese Patent Laid-Open No. 2001-250079

従来の2次元コード読取装置は、2次元コード読取装置が設置されている環境が2次元コードを読み取るために必要な明るさがない暗所である場合に、2次元コードを読み取り可能な1方向からの補助照明で2次元コードを読み取ろうとすると、大きく輝度ムラが発生する。そのため、2次元コードを読み込んだ画像の2値化処理が上手くいかず、2次元コードの読み取りができないという問題点があった。   A conventional two-dimensional code reader is a unidirectional one that can read a two-dimensional code when the environment in which the two-dimensional code reader is installed is a dark place where there is no brightness required to read the two-dimensional code. When an attempt is made to read a two-dimensional code with auxiliary illumination from the above, large luminance unevenness occurs. For this reason, the binarization processing of the image read from the two-dimensional code does not work, and there is a problem that the two-dimensional code cannot be read.

この発明に係る2次元コード読取装置は、撮影された画像を読み込む画像読み込み部、該画像読み込み部で読み込んだ画像の輝度を算出する算出部、前記画像読み込み部で読み込んだ画像から物体を検出する検出部、該検出部で検出した物体の画像の所定の領域について前記算出部で算出した輝度に基づいて、前記画像が撮影される周辺の明るさを判定する判定部、該判定部で判定した明るさに基づいて、画像が撮影される付近に接続された補助照明を制御する制御部を備えたものである。   The two-dimensional code reader according to the present invention detects an object from an image reading unit that reads a captured image, a calculation unit that calculates the luminance of the image read by the image reading unit, and an image read by the image reading unit. Based on the luminance calculated by the calculation unit for a predetermined area of the image of the object detected by the detection unit, a determination unit for determining the brightness of the surroundings where the image is captured, and the determination unit Based on the brightness, a control unit that controls auxiliary illumination connected in the vicinity of an image being captured is provided.

この発明は、画像により検出した物体の画像の所定の領域の輝度に基づいて、画像を撮影する周辺の明るさを判定して、画像が撮影される付近に接続された補助照明の輝度を制御するので、2次元コード読取装置が設置されている環境が暗所であっても、2次元コードを読み込んだ画像の2値化処理を可能とし、2次元コードの読み取りを行うことができる。   The present invention controls the brightness of auxiliary lighting connected in the vicinity where an image is photographed by determining the brightness of the area around which the image is photographed based on the brightness of a predetermined area of the object image detected from the image. Therefore, even when the environment where the two-dimensional code reader is installed is in a dark place, it is possible to perform binarization processing on an image read from the two-dimensional code and read the two-dimensional code.

この発明の実施の形態1における2次元コード読取装置1の構成図である。It is a block diagram of the two-dimensional code reader 1 in Embodiment 1 of this invention. この発明の実施の形態1における2次元コード読取装置1の外観例の図である。It is a figure of the example of an external appearance of the two-dimensional code reader 1 in Embodiment 1 of this invention. この発明の実施の形態1における2次元コード読取装置1の設置例の図である。It is a figure of the example of installation of the two-dimensional code reader 1 in Embodiment 1 of this invention. この発明の実施の形態1における2次元コード読取装置1の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the two-dimensional code reader 1 in Embodiment 1 of this invention. この発明の実施の形態2における2次元コード読取装置1の構成図である。It is a block diagram of the two-dimensional code reader 1 in Embodiment 2 of this invention. この発明の実施の形態2における2次元コード読取装置1の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the two-dimensional code reader 1 in Embodiment 2 of this invention. この発明の実施の形態3における2次元コード読取装置1の構成図である。It is a block diagram of the two-dimensional code reader 1 in Embodiment 3 of this invention. この発明の実施の形態3における2次元コード読取装置1の外観例の図である。It is a figure of the example of an external appearance of the two-dimensional code reader 1 in Embodiment 3 of this invention. この発明の実施の形態3における2次元読取装置1の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the two-dimensional reading apparatus 1 in Embodiment 3 of this invention. この発明の実施の形態4における2次元コード読取装置1の構成図である。It is a block diagram of the two-dimensional code reader 1 in Embodiment 4 of this invention. この発明の実施の形態4における2次元コード読取装置1の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the two-dimensional code reader 1 in Embodiment 4 of this invention. この発明の実施の形態4における2次元コード読取装置1に読み込まれた2次元コードの画像を表示した図である。It is the figure which displayed the image of the two-dimensional code read by the two-dimensional code reader 1 in Embodiment 4 of this invention. この発明の実施の形態4における2次元コード読取装置1で読み取った2次元コードの図である。It is a figure of the two-dimensional code read with the two-dimensional code reader 1 in Embodiment 4 of this invention. この発明の実施の形態4における2次元コード読取装置1で読み取った2次元コードの図である。It is a figure of the two-dimensional code read with the two-dimensional code reader 1 in Embodiment 4 of this invention.

実施の形態1.
図1はこの発明の実施の形態1における2次元コード読取装置1の構成図である。
図1の2次元コード読取装置1は、画像読み込み部2とカード検出部3と2次元コード復号部4と輝度算出部5と明るさ判定部6と補助照明制御部7と表示制御部8から構成される。
また、2次元コード読み取り装置1には、カメラ9と補助照明10が接続されている。
カード検出部3が検出部、輝度算出部5が算出部、明るさ判定部6が判定部に相当する。
Embodiment 1 FIG.
FIG. 1 is a configuration diagram of a two-dimensional code reading device 1 according to Embodiment 1 of the present invention.
1 includes an image reading unit 2, a card detection unit 3, a two-dimensional code decoding unit 4, a luminance calculation unit 5, a brightness determination unit 6, an auxiliary illumination control unit 7, and a display control unit 8. Composed.
A camera 9 and auxiliary illumination 10 are connected to the two-dimensional code reader 1.
The card detection unit 3 corresponds to a detection unit, the luminance calculation unit 5 corresponds to a calculation unit, and the brightness determination unit 6 corresponds to a determination unit.

図2は、この発明の実施の形態1における2次元コード読取装置1の外観例の図である。
図2の2次元コード読取装置1は、例えば、カメラ9と、モニタ11が接続されている。ここでは、モニタ11のバックライト(図示せず)をカメラ9で画像を撮影するための補助照明1として利用する。そして、この補助照明10は、モニタ11の上端裏側に設置されているものとする。
FIG. 2 is an external view of the two-dimensional code reading device 1 according to Embodiment 1 of the present invention.
In the two-dimensional code reader 1 of FIG. 2, for example, a camera 9 and a monitor 11 are connected. Here, the backlight (not shown) of the monitor 11 is used as the auxiliary illumination 1 for taking an image with the camera 9. The auxiliary illumination 10 is installed on the back side of the upper end of the monitor 11.

図2では、2次元コードとして、例えばQRコード(登録商標)が印刷されているQRコード(登録商標)カード(以下カードと示す)12を2次元コード読取装置1のカメラ9付近にかざすと、カメラ9で撮影される。そして、カメラ9で撮影された画像を図1の画像読み込み部2が読み込む。そして、画像読み込み部2で読み込んだ画像の例えば2次元コード13が印刷されたカード12の画像が、表示制御部8によってモニタ11に表示される。
モニタ11はタッチパネルでもあり、このタッチパネルで入力される情報や、2次元コード読取装置1で読み取った2次元コードの情報が、例えば入退室の管理に利用される。
In FIG. 2, as a two-dimensional code, for example, a QR code (registered trademark) card (hereinafter referred to as a card) 12 on which a QR code (registered trademark) is printed is held near the camera 9 of the two-dimensional code reader 1. Photographed with the camera 9. And the image reading part 2 of FIG. 1 reads the image image | photographed with the camera 9. FIG. Then, an image of the card 12 on which, for example, the two-dimensional code 13 of the image read by the image reading unit 2 is printed is displayed on the monitor 11 by the display control unit 8.
The monitor 11 is also a touch panel, and information input by the touch panel and information of a two-dimensional code read by the two-dimensional code reader 1 are used for managing entrance / exit, for example.

図3は、この発明の実施の形態1における2次元コード読取装置1の設置例の図である。
図3では、図2で示した2次元コード読取装置1が、例えば入退室を管理するドア付近に設置されている。周りが壁となっているドア付近に2次元コード読取装置1が設置されると、2次元コード読取装置1が設置されている周辺が暗く、カメラ9で撮影された画像から2次元コードを読み取るには十分な明るさではない場合がある。
FIG. 3 is a diagram of an installation example of the two-dimensional code reader 1 according to Embodiment 1 of the present invention.
In FIG. 3, the two-dimensional code reader 1 shown in FIG. 2 is installed in the vicinity of, for example, a door that manages entry / exit. When the two-dimensional code reader 1 is installed near a door that is a wall, the area around the two-dimensional code reader 1 is dark, and the two-dimensional code is read from the image taken by the camera 9. May not be bright enough.

以下は、このように2次元コード読取装置1が設置されている周辺が暗く、カメラ9で撮影された画像から2次元コードを読み取るために十分な明るさがない場合に、モニタ11のバックライト(図示せず)を補助照明10として利用し、撮影された画像から2次元コードを読み取る場合について説明する。
また、補助照明10は、2次元コードを読み取ることができる明るさに調整可能であるとする。
The following describes the backlight of the monitor 11 when the periphery where the two-dimensional code reader 1 is installed is dark and there is not enough brightness to read the two-dimensional code from the image captured by the camera 9. A case where a two-dimensional code is read from a photographed image using (not shown) as the auxiliary illumination 10 will be described.
Further, it is assumed that the auxiliary illumination 10 can be adjusted to such a brightness that a two-dimensional code can be read.

図1の画像読み込み部2は、カメラ9で撮影された画像を2次元コード読取装置1に読み込み、一時記憶メモリに記憶する。また、画像読み込み部2は、読み込んだ画像を表示制御部8に出力する。   The image reading unit 2 in FIG. 1 reads an image taken by the camera 9 into the two-dimensional code reading device 1 and stores it in a temporary storage memory. Further, the image reading unit 2 outputs the read image to the display control unit 8.

カード検出部3は、画像読み込み部2で読み込まれ一時記憶メモリ(図示せず)に記憶されている第1の画像(2次元コードが印刷されているカード12がかざされる直前の画像)と第2の画像(図2に示すカード12がかざされた時の画像)の差分を算出して、動きを検出し、カメラ9の前にカード12(何らかの物体)がかざされたことを検知する。   The card detecting unit 3 reads the first image (the image just before the card 12 on which the two-dimensional code is printed) read by the image reading unit 2 and stored in a temporary storage memory (not shown) and the first image. The difference between the two images (the image when the card 12 shown in FIG. 2 is held over) is calculated, the movement is detected, and it is detected that the card 12 (some object) is held in front of the camera 9.

2次元コード復号部4は、カード検出部3がカード12がかざされたことを検知すると画像読み込み部2で読み込んだ画像から2次元コードを検出して2値化処理を行い、2次元コードを復号する。   When the card detection unit 3 detects that the card 12 is held over, the two-dimensional code decoding unit 4 detects a two-dimensional code from the image read by the image reading unit 2 and performs a binarization process. Decrypt.

輝度算出部5は、カード検出部3でカード12がかざされたとする画像から輝度を算出する。
ここでの輝度算出部5は、例えば、2次元読取装置1の補助照明10が照らされている位置に近い部分のカード12の画像の領域、例えば上端中央付近(上端の領域)の平均輝度と、補助照明10が照らされている位置から遠いカード12の画像の領域、例えば下端中央付近(下端の領域)の平均輝度を算出する。
The luminance calculation unit 5 calculates the luminance from the image that the card detection unit 3 holds over the card 12.
Here, the luminance calculation unit 5 is, for example, an average luminance in the area of the image of the card 12 near the position where the auxiliary illumination 10 of the two-dimensional reading device 1 is illuminated, for example, near the upper center (upper area). Then, the average luminance of the image area of the card 12 far from the position where the auxiliary illumination 10 is illuminated, for example, the vicinity of the lower end center (lower end area) is calculated.

明るさ判定部6は、輝度算出部5で算出したカード12が映っている画像の上端の領域の輝度と、カード12が映っている画像の下端の領域の輝度との差分から、2次元コード読取装置1が設置されている周辺の環境の明るさを判定する。   The brightness determination unit 6 calculates a two-dimensional code from the difference between the luminance at the upper end area of the image in which the card 12 is calculated calculated by the luminance calculation unit 5 and the luminance at the lower end area of the image in which the card 12 is reflected. The brightness of the surrounding environment where the reading apparatus 1 is installed is determined.

補助照明制御部7は、明るさ判定部6で判定した2次元コードの周辺の明るさに応じて、図2に示した補助照明10として利用する モニタ11のバックライトの明るさを制御する。
表示制御部8は、カメラ9で撮影され、画像読み込み部2から入力された画像を図2のモニタ11に表示するように制御する。
The auxiliary illumination control unit 7 controls the brightness of the backlight of the monitor 11 used as the auxiliary illumination 10 shown in FIG. 2 according to the brightness around the two-dimensional code determined by the brightness determination unit 6.
The display control unit 8 controls to display the image captured by the camera 9 and input from the image reading unit 2 on the monitor 11 of FIG.

次に、2次元コード読取装置1の動作について説明する。
図4は、この発明の実施の形態1における2次元読取装置1の動作を示すフローチャートである。
まず、画像読み込み部2が、カメラ9により撮影された画像を読み込む(ステップS1)。そして、読み込んだ画像を一次記憶メモリ(図示せず)に記憶する。
Next, the operation of the two-dimensional code reader 1 will be described.
FIG. 4 is a flowchart showing the operation of the two-dimensional reading device 1 according to Embodiment 1 of the present invention.
First, the image reading unit 2 reads an image taken by the camera 9 (step S1). The read image is stored in a primary storage memory (not shown).

次に、カード検出部3が、一次記憶メモリに記憶されている画像読み込み部2で読み込んだ画像について、第1の画像(例えば、2次元コードが印刷されているカード12がかざされる直前の画像)と第2の画像(例えば、カード12がかざされた時の画像)の差分を算出する(ステップS2)。
そして、カード検出部3は、第1の画像と第2の画像の差分から動きを検出して、カメラ9の前にカード12がかざされたか否かを検知する(ステップS3)。
Next, with respect to the image read by the image reading unit 2 stored in the primary storage memory by the card detection unit 3, a first image (for example, an image immediately before the card 12 on which a two-dimensional code is printed is held) is displayed. ) And a second image (for example, an image when the card 12 is held over) are calculated (step S2).
Then, the card detection unit 3 detects a movement from the difference between the first image and the second image, and detects whether or not the card 12 is held in front of the camera 9 (step S3).

更に、カード検出部3は、カード12がかざされた画像のカード12が映っている範囲(動きを検出して物体が映っている範囲)を検出して、輝度算出部5に通知する。
この時、カード検出部3は、画像読み込み部2で読み込んだ画像からカード12が映っている範囲を検出して、カード12(なんらかの物体)が映っている範囲の上端中央(モニタ上端の補助照明10に近い方の端部中央)の位置と下端中央(モニタ下端の補助照明10から遠い方の端部中央)の位置も検出して輝度算出部5に出力する(ステップS4)。
Furthermore, the card detection unit 3 detects a range in which the card 12 of the image in which the card 12 is held up (a range in which an object is reflected by detecting motion) and notifies the luminance calculation unit 5 of the detected range.
At this time, the card detection unit 3 detects the range in which the card 12 is reflected from the image read by the image reading unit 2, and the upper center of the range in which the card 12 (some object) is reflected (auxiliary illumination at the upper end of the monitor). The position of the end center closer to 10) and the position of the lower end center (end center far from the auxiliary illumination 10 at the lower end of the monitor) are also detected and output to the luminance calculation unit 5 (step S4).

次に、輝度算出部5が、カード検出部3によって検出されたカード12が映っている範囲の上端中央部分の例えば16×16ピクセル分の領域の平均輝度(A)を算出する。また、同様に2次元コードの下端中央部分の平均輝度(B)を算出する(ステップS5)。   Next, the luminance calculation unit 5 calculates the average luminance (A) of an area corresponding to, for example, 16 × 16 pixels in the upper center portion of the range where the card 12 detected by the card detection unit 3 is reflected. Similarly, the average luminance (B) at the center of the lower end of the two-dimensional code is calculated (step S5).

そして、明るさ判定部6が、平均輝度(A)と平均輝度(B)の差分を算出し(ステップS5)、差分が所定の閾値以上か否かを判定する(ステップS6)。
明るさ判定部6は、平均輝度(A)と平均輝度(B)の差分が所定の閾値以上であれば、2次元コード読取装置1が設置された周辺の環境は暗いと判定する(ステップS7)。
Then, the brightness determination unit 6 calculates the difference between the average luminance (A) and the average luminance (B) (step S5), and determines whether the difference is equal to or greater than a predetermined threshold (step S6).
If the difference between the average luminance (A) and the average luminance (B) is equal to or greater than a predetermined threshold, the brightness determination unit 6 determines that the surrounding environment where the two-dimensional code reader 1 is installed is dark (step S7). ).

そして、明るさ判定部6が周辺の環境が暗いと判定すると、補助照明制御部7がモニタ11の補助照明10の明るさを2次元コードの情報を読み取れる明るさに制御する(ステップS8)。
そして、2次元コード復号部4が、補助照明10の明るさが制御されて撮影された画像で、カード検出部3で検出したカード12が映っている画像から2次元コードの2値化処理を行い、2次元コードの画像を復号する(2次元コードの情報を読み取る)(ステップS9)。
When the brightness determination unit 6 determines that the surrounding environment is dark, the auxiliary illumination control unit 7 controls the brightness of the auxiliary illumination 10 of the monitor 11 to such a brightness that the information of the two-dimensional code can be read (step S8).
Then, the two-dimensional code decoding unit 4 performs binarization processing of the two-dimensional code from the image that is captured with the brightness of the auxiliary illumination 10 controlled and the card 12 detected by the card detection unit 3 is reflected. Then, the image of the two-dimensional code is decoded (reading the information of the two-dimensional code) (step S9).

一方、明るさ判定部6で、平均輝度(A)と平均輝度(B)の差分が所定の閾値以上ないと、2次元コード読取装置1の設置された周辺の環境は明るいと判定する(ステップS10)。
そして、S9の処理、2次元コード復号部4がカード検出部3でカード12がかざされたとする画像から2次元コードの2値化処理を行い、2次元コードを復号する処理を行う。
On the other hand, if the difference between the average luminance (A) and the average luminance (B) is not equal to or greater than a predetermined threshold, the brightness determination unit 6 determines that the surrounding environment where the two-dimensional code reader 1 is installed is bright (step) S10).
In step S9, the two-dimensional code decoding unit 4 performs binarization processing of the two-dimensional code from the image that the card detection unit 3 holds over the card 12, and decodes the two-dimensional code.

具体的な例として、カメラ9の下方50mmの所に縦50mm横70mm面の液晶モニタがあり、そのモニタ11に補助照明10である光源(例えばバックライト)があるとする。そして、2次元カード読み取り装置1に、そのカメラ9と補助照明10があるモニタ11が接続されているとする。
この装置に対して2次元コードが印刷されたカード12をカメラ9から20mm離れた位置にかざした場合を考える。
As a specific example, it is assumed that there is a liquid crystal monitor having a vertical 50 mm and horizontal 70 mm surface 50 mm below the camera 9, and that the monitor 11 has a light source (for example, a backlight) as the auxiliary illumination 10. It is assumed that the monitor 9 having the camera 9 and the auxiliary illumination 10 is connected to the two-dimensional card reader 1.
Consider a case in which the card 12 on which a two-dimensional code is printed is held over a position 20 mm away from the camera 9.

このとき、補助照明10がなくても2次元コード読取装置1の設置された周辺の環境が明るい場合(例えば照度300ルクス)は、2次元コードが印刷されたカード12面は補助照明10の光の影響をほとんど受けず、カード12が映っている範囲の上端中央付近の平均輝度と2次元コードの下端中央付近の平均輝度はほとんど差が発生しない。   At this time, even if there is no auxiliary illumination 10, if the surrounding environment where the two-dimensional code reader 1 is installed is bright (for example, illuminance of 300 lux), the surface of the card 12 on which the two-dimensional code is printed is the light of the auxiliary illumination 10 The average luminance near the center of the upper end of the range where the card 12 is reflected and the average luminance near the center of the lower end of the two-dimensional code are hardly different.

しかし、図3のように、2次元コード読取装置1の設置された場所が壁で囲まれているなど周辺の環境が暗く、2次元コード読取装置1が設置されている場所の照度が、2次元カード読取装置1が2次元コードを読取可能な最小照度(例えば30ルクス)を下回る場合、2次元コードが印刷されたカード12面は補助照明10の光の影響を受ける。
そのため、補助照明10に近いカード12が映っている画像の上端は明るいが、一方補助照明10から遠いカード12が映っている画像の下端は暗くなる。
However, as shown in FIG. 3, the surrounding environment is dark, for example, the place where the two-dimensional code reader 1 is installed is surrounded by a wall, and the illuminance at the place where the two-dimensional code reader 1 is installed is 2 When the two-dimensional code is less than the minimum illuminance (for example, 30 lux) at which the two-dimensional code can be read, the surface of the card 12 on which the two-dimensional code is printed is affected by the light of the auxiliary illumination 10.
Therefore, the upper end of the image showing the card 12 close to the auxiliary illumination 10 is bright, while the lower end of the image showing the card 12 far from the auxiliary illumination 10 is dark.

従って、画像上でもカード12面の映っている範囲の上端部分の平均輝度と、カード12面の映っている範囲の下端部分の平均輝度に輝度差が発生する。
そこで、カメラ9の付近に補助照明10であるモニタ11のバックライトがあり、読み取り可能な最小照度(例えば30ルクス)であれば、2次元コード読取装置1のカメラ9にかざした画像から、カード12が映っている範囲の上端の平均輝度とカード12が映っている範囲の下端の平均輝度との輝度差を算出し、例えば、輝度差が0から256のレンジ幅中の100以上あれば周辺環境は暗い、そうでなければ周辺環境は明るいと判断するとする。
Accordingly, a difference in luminance occurs between the average luminance at the upper end portion of the area where the card 12 surface is reflected and the average luminance at the lower end portion of the area where the card surface 12 is reflected.
Therefore, if there is a backlight of the monitor 11 as the auxiliary illumination 10 in the vicinity of the camera 9 and the minimum illuminance (for example, 30 lux) that can be read, the card is obtained from the image held over the camera 9 of the two-dimensional code reader 1. The luminance difference between the average luminance at the upper end of the range where 12 is reflected and the average luminance at the lower end of the range where the card 12 is reflected is calculated. For example, if the luminance difference is 100 or more in the range width of 0 to 256, Assume that the environment is dark, otherwise the surrounding environment is bright.

ただし、上記の周辺環境の明るさの判断は一例であり、カメラ9と補助照明10の距離、カメラ9と2次元コードの印刷されたカード12との距離によって変更するとする。
また、カメラ9自体の性能や補助照明10の明るさ、周辺の光環境、壁の色など、様々な要因によっても変更するとする。
However, the determination of the brightness of the surrounding environment is an example, and it is assumed that the brightness is changed according to the distance between the camera 9 and the auxiliary illumination 10 and the distance between the camera 9 and the card 12 on which the two-dimensional code is printed.
It is also assumed that the camera 9 itself changes due to various factors such as the performance of the camera 9 itself, the brightness of the auxiliary illumination 10, the ambient light environment, and the color of the wall.

尚、ここでは、カード12に2次元コードが印刷されているとして説明したが、携帯端末のような表示画面に表示されている2次元コードを2次元コード読取装置1にかざすような場合にも利用できる。携帯端末の表示画面がかざされたことを検知し、その画像の範囲の補助照明10に近い領域の輝度と、補助照明10から遠い領域の輝度との差分から周辺の明るさを判定してもよい。   Here, the two-dimensional code is printed on the card 12. However, the two-dimensional code displayed on the display screen such as a portable terminal is also held over the two-dimensional code reader 1. Available. Even if it is detected that the display screen of the portable terminal is held over, and the brightness of the surroundings is determined from the difference between the luminance of the area close to the auxiliary illumination 10 in the range of the image and the luminance of the area far from the auxiliary illumination 10 Good.

また、ここでは、カード12がかざされたことを検出してカード12が映っている範囲の異なる領域の輝度の差分から周辺の環境の明るさを判定しているが、2次元コードを検出した時に、2次元コードの映っている範囲の画像の異なる領域の輝度の差分から周辺の環境の明るさを判定するようにしてもよい。   Here, it is detected that the card 12 is held over, and the brightness of the surrounding environment is determined from the luminance difference of different areas where the card 12 is reflected, but a two-dimensional code is detected. Sometimes, the brightness of the surrounding environment may be determined from the difference in luminance between different areas of the image in the range where the two-dimensional code is reflected.

以上のように、2次元コードの印刷されたカード12を2次元コード読取装置1に接続されたカメラ9にかざしたときに、モニタ11のバックライトを補助照明10として利用すると、カード12が映っている範囲のバックライトの位置から近い端部の領域の明るさ(平均輝度)と、カード12が映っている範囲のバックライトの位置から遠い端部の領域の明るさ(平均輝度)との差分に基づいて、2次元コード読取装置1の設置された周辺の環境の明るさを判定する。   As described above, when the card 12 on which the two-dimensional code is printed is held over the camera 9 connected to the two-dimensional code reader 1, if the backlight of the monitor 11 is used as the auxiliary illumination 10, the card 12 is reflected. Brightness of the end area near the backlight position in the range where the card 12 is located (average luminance) and brightness of the end area far from the backlight position in the range where the card 12 is reflected (average brightness) Based on the difference, the brightness of the surrounding environment where the two-dimensional code reader 1 is installed is determined.

この様に、画像に移った物体の範囲の補助照明10に近い領域の平均輝度と、画像に移った物体の範囲の補助照明10に遠い領域の平均輝度との差分に基づいて、周辺の環境の明るさを判定し、周辺の環境が暗いと判定すると、補助照明10の照度を上げるなどの制御をおこなって、2次元コードの情報を読み取るので、2次元コード読取装置1の設置された周辺の環境が暗い場合でも、1方向からの補助照明10の照度を制御して2次元コードの画像の輝度ムラを少なくし、2次元コードを読み込んだ画像の2値化処理が可能となり、2次元コードの復号(読み取り)を行うことができる。
また、周辺の環境の明るさを判定して、明るさに応じて補助照明10の照度を上げるため、補助照明10の消費電力、待機電力を小さくすることができる。
In this way, based on the difference between the average brightness of the area near the auxiliary illumination 10 in the range of the object moved to the image and the average brightness of the area far from the auxiliary illumination 10 in the range of the object moved to the image, the surrounding environment If the surrounding environment is determined to be dark, the control of increasing the illuminance of the auxiliary illumination 10 is performed and the information of the two-dimensional code is read, so that the periphery where the two-dimensional code reader 1 is installed Even when the environment is dark, it is possible to control the illuminance of the auxiliary illumination 10 from one direction to reduce luminance unevenness of the image of the two-dimensional code, and to perform binarization processing of the image read with the two-dimensional code. The code can be decoded (read).
Moreover, since the brightness of the surrounding environment is determined and the illuminance of the auxiliary illumination 10 is increased according to the brightness, the power consumption and standby power of the auxiliary illumination 10 can be reduced.

実施の形態2.
以上の実施の形態1では、2次元コードが印刷されたカード12がカメラ9の前にかざされた際に生じる補助照明10による画像の輝度の違いから、2次元コード読取装置1の設置された周辺の環境の明るさを判定して、2次元コードを読み取るために必要な明るさに補助照明制御部7が補助照明10を制御する例について説明した。次に、実施の形態2では、2次元コードがかざされた時に、補助照明制御部7が補助照明10を点滅させて、2次元コードの印刷されたカード12の画像の異なる領域の輝度の差分に基づいて、周囲の環境が2次元コードの読み取りに適した明るさになっているか否かをより正確に判断して、2値化処理を可能にし、2次元コードの情報の読み取りを可能にする例について説明する。
Embodiment 2. FIG.
In the first embodiment described above, the two-dimensional code reader 1 is installed due to the difference in image brightness due to the auxiliary illumination 10 generated when the card 12 on which the two-dimensional code is printed is held in front of the camera 9. An example in which the auxiliary illumination control unit 7 controls the auxiliary illumination 10 to the brightness necessary for determining the brightness of the surrounding environment and reading the two-dimensional code has been described. Next, in the second embodiment, when the two-dimensional code is held over, the auxiliary illumination control unit 7 causes the auxiliary illumination 10 to blink, and the difference in luminance between different areas of the image of the card 12 on which the two-dimensional code is printed. Based on the above, it is possible to more accurately determine whether or not the surrounding environment has a brightness suitable for reading a two-dimensional code, to enable binarization processing and to read information of the two-dimensional code An example will be described.

図5は、この発明の実施の形態2における2次元コード読取装置1の構成図である。
図5は、図1の構成と同様であるが、カード検出部3によってカード12がかざされたことを検出して、カード12が検出された範囲をカード検出部3が輝度算出部5に通知する。そして、カード12がかざされたことを輝度算出部5が補助照明制御部7に通知して、補助照明制御部7が補助照明10の点滅を行って、輝度算出部5が補助照明10の点灯時と消灯時のカード12が映っている画像の範囲の異なる領域の輝度を算出し、その差分に基づいて、明るさ判定部6が周辺の環境の明るさを判定するところが実施の形態1と異なる。
FIG. 5 is a configuration diagram of the two-dimensional code reader 1 according to Embodiment 2 of the present invention.
FIG. 5 is similar to the configuration of FIG. 1, but the card detection unit 3 detects that the card 12 is held over and the card detection unit 3 notifies the luminance calculation unit 5 of the detected range of the card 12. To do. Then, the luminance calculation unit 5 notifies the auxiliary lighting control unit 7 that the card 12 is held over, the auxiliary lighting control unit 7 blinks the auxiliary lighting 10, and the luminance calculation unit 5 turns on the auxiliary lighting 10. The brightness of the area in which the range of the image in which the card 12 is displayed is different from that at the time of turning off, and the brightness determination unit 6 determines the brightness of the surrounding environment based on the difference, as in the first embodiment. Different.

次に、実施の形態2における2次元コード読取装置1の動作について説明する。
図6は、この発明の実施の形態2における2次元コード読取装置1の動作を示すフローチャートである。
実施の形態1の図4のS4、カード12の上端中央の位置と下端中央の位置を検出するまでの動作は同じである。
Next, the operation of the two-dimensional code reading device 1 in the second embodiment will be described.
FIG. 6 is a flowchart showing the operation of the two-dimensional code reader 1 according to Embodiment 2 of the present invention.
In S4 of FIG. 4 of the first embodiment, the operation until the center position of the upper end of the card 12 and the position of the center of the lower end are detected is the same.

まず、画像読み込み部2でカメラ9により撮影された画像を読み込む(ステップS101)。そして、読み込んだ画像を一次記憶メモリ(図示せず)に記憶する。
次に、カード検出部3が、一次記憶メモリに記憶されている画像読み込み部2で読み込んだ画像について、第1の画像(例えば、2次元コードが印刷されているカード12がかざされる直前の画像)と第2の画像(例えば、カード12がかざされた時の画像)の差分を算出する(ステップS102)。
First, an image taken by the camera 9 is read by the image reading unit 2 (step S101). The read image is stored in a primary storage memory (not shown).
Next, with respect to the image read by the image reading unit 2 stored in the primary storage memory by the card detection unit 3, a first image (for example, an image immediately before the card 12 on which a two-dimensional code is printed is held) is displayed. ) And a second image (for example, an image when the card 12 is held over) are calculated (step S102).

そして、カード検出部3は、第1の画像と第2の画像の差分から動きを検出して、カメラ9の前にカード12がかざされたか否かを検知する(ステップS103)。   Then, the card detection unit 3 detects a movement from the difference between the first image and the second image, and detects whether or not the card 12 is held in front of the camera 9 (step S103).

更に、カード検出部3は、カード12がかざされた画像のカード12が映っている範囲(動きを検出して物体が映っている範囲)を検出して、輝度算出部5に通知する。
この時、カード検出部3は、画像読み込み部2で読み込んだ画像からカード12が映っている範囲を検出して、カード12(なんらかの物体)が映っている範囲の上端中央(モニタ上端の補助照明10に近い方の端部中央)の位置と下端中央(モニタ下端の補助照明10から遠い方の端部中央)の位置も検出して輝度算出部5に出力する(ステップS4)。
Furthermore, the card detection unit 3 detects a range in which the card 12 of the image in which the card 12 is held up (a range in which an object is reflected by detecting motion) and notifies the luminance calculation unit 5 of the detected range.
At this time, the card detection unit 3 detects the range in which the card 12 is reflected from the image read by the image reading unit 2, and the upper center of the range in which the card 12 (some object) is reflected (auxiliary illumination at the upper end of the monitor). The position of the end center closer to 10) and the position of the lower end center (end center far from the auxiliary illumination 10 at the lower end of the monitor) are also detected and output to the luminance calculation unit 5 (step S4).

そして、カード12が検出されたこと通知された輝度算出部5は、補助照明制御部7にカード12(何らかの物体)がかざされたことを通知する(ステップS105)。
そして、補助照明制御部7は、2次元コード読取装置1に接続されている補助照明10(モニタ11のバックライト)を点灯から一旦消灯し、その後再び点灯させる(ステップS106)。ただし、2次元コードを検出した時に、補助照明10が消灯であった場合は、消灯から点灯させる。
Then, the luminance calculation unit 5 notified that the card 12 is detected notifies the auxiliary illumination control unit 7 that the card 12 (some object) is held over (step S105).
Then, the auxiliary illumination control unit 7 temporarily turns off the auxiliary illumination 10 (backlight of the monitor 11) connected to the two-dimensional code reader 1 from being turned on, and then turns it on again (step S106). However, if the auxiliary illumination 10 is off when the two-dimensional code is detected, the auxiliary illumination 10 is turned on from the off state.

そして、輝度算出部5が、一次記憶メモリに記憶されている画像読み込み部2から読み込んだ画像から、補助照明10の消灯時の画像(a)と、再び点灯させたときの画像(b)を取得する。
その後、輝度算出部5は、カード検出部3から取得したカード12が映っている範囲の上端中央(モニタ上端の補助照明10に近い方の端部中央)の例えば16×16プクセル分の領域の平均輝度(A)を算出する。また、同様に2次元コードの下端中央(モニタ下端の補助照明10から遠い方の端部中央)についても同様な方法で平均輝度(B)を算出する。
輝度算出部5は、このように2次元コードの上端中央の平均輝度(A)と2次元コードの下端中央の平均輝度(B)の算出を、画像(a)と画像(b)に対して行う(ステップS106)。
Then, from the image read from the image reading unit 2 stored in the primary storage memory by the luminance calculation unit 5, an image (a) when the auxiliary illumination 10 is turned off and an image (b) when the auxiliary lighting 10 is turned on again. get.
After that, the luminance calculation unit 5 is, for example, an area corresponding to 16 × 16 pixels in the center of the upper end of the range where the card 12 acquired from the card detection unit 3 is reflected (the end center near the auxiliary illumination 10 at the upper end of the monitor). Average luminance (A) is calculated. Similarly, the average luminance (B) is calculated by the same method for the lower end center of the two-dimensional code (end center far from the auxiliary illumination 10 at the lower end of the monitor).
The luminance calculation unit 5 calculates the average luminance (A) at the center of the upper end of the two-dimensional code and the average luminance (B) at the center of the lower end of the two-dimensional code in this way for the image (a) and the image (b). This is performed (step S106).

次に、明るさ判定部6が、補助照明10の点灯時の画像(a)に対して、カード12が映っている範囲の上端中央の領域の平均輝度(A)と、下端中央の領域の平均輝度(B)との差分(α)を算出する。更に、補助照明10の消灯時の画像(b)に対して、カード12が映っている範囲の上端中央の領域の平均輝度(A)と、下端中央の領域の平均輝度(B)との差分(β)を算出する。   Next, the brightness determination unit 6 determines the average luminance (A) of the upper center area of the area where the card 12 is reflected and the lower center area of the image (a) when the auxiliary illumination 10 is turned on. A difference (α) from the average luminance (B) is calculated. Further, with respect to the image (b) when the auxiliary illumination 10 is turned off, the difference between the average luminance (A) in the upper center area of the area where the card 12 is reflected and the average luminance (B) in the lower center area. (β) is calculated.

その後、明るさ判定部6は、差分(α)と差分(β)の差分を算出し、差分(α)と差分(β)の差分が所定の値以内か否かを判定する(ステップS107)。
差分(α)と差分(β)との差分が所定の値以内であれば、2次元コード読取装置1が設置されている周辺の環境は明るいと判定し、(ステップS108)、2次元コード復号部4が、2次元コードの画像を復号する(ステップS109)。
Thereafter, the brightness determination unit 6 calculates the difference between the difference (α) and the difference (β), and determines whether or not the difference between the difference (α) and the difference (β) is within a predetermined value (step S107). .
If the difference between the difference (α) and the difference (β) is within a predetermined value, it is determined that the surrounding environment where the two-dimensional code reader 1 is installed is bright (step S108), and the two-dimensional code decoding is performed. The unit 4 decodes the image of the two-dimensional code (Step S109).

差分(α)と差分(β)の差分が所定の値以内でなければ、2次元コード読取装置1が設置されている周辺の環境は暗いと判定し(ステップS110)、補助照明制御部7がモニタ11の補助照明10であるバックライトを2次元コードの情報が読み取れる明るさに制御する(ステップ111)。
そして、2次元コード復号部4が、明るさが制御されて撮影された画像から2次元コードの画像を復号する(ステップS109)。
If the difference between the difference (α) and the difference (β) is not within a predetermined value, it is determined that the surrounding environment where the two-dimensional code reader 1 is installed is dark (step S110), and the auxiliary illumination control unit 7 The backlight which is the auxiliary illumination 10 of the monitor 11 is controlled to a brightness at which the information of the two-dimensional code can be read (step 111).
Then, the two-dimensional code decoding unit 4 decodes the image of the two-dimensional code from the image shot with the brightness controlled (step S109).

以上のように、2次元コードの印刷されたカード12をかざしたときに、補助照明10を点灯から消灯に遷移させ、そのときのカード12の面の2次元コードの部分に生じる輝度差を元に2次元コード読取装置の設置された周辺の環境の明るさを判断するので、2次元コード読取装置1が設置された周辺の環境の明るさをより正確に判断することができる。そして、周辺の環境が暗ければ、補助照明10の照度を上げて2次元コードの情報を読み取るので、2次元コード読取装置1の設置された周辺の環境が暗い場合でも2次元コードの画像の輝度ムラを少なくして2値化処理が可能となり、2次元コードの復号(読み取り)を行うことができる。   As described above, when the card 12 on which the two-dimensional code is printed is held, the auxiliary illumination 10 is switched from on to off, and the luminance difference generated in the portion of the two-dimensional code on the surface of the card 12 at that time is Since the brightness of the surrounding environment where the two-dimensional code reader is installed is determined, the brightness of the surrounding environment where the two-dimensional code reader 1 is installed can be determined more accurately. If the surrounding environment is dark, the illuminance of the auxiliary illumination 10 is increased and the information of the two-dimensional code is read. Therefore, even if the surrounding environment where the two-dimensional code reader 1 is installed is dark, the image of the two-dimensional code is read. It is possible to perform binarization processing with less luminance unevenness, and to decode (read) a two-dimensional code.

また、補助照明10を消灯から点灯に遷移させて、周辺環境の明るさを判断して補助照明10の明るさを制御するので、入退室を管理するために2次元コード読取装置1を暗所に設置する場合でも、補助照明10の照度の初期設定を行うことなく、または、予め所定の初期設定を行っても、設置場所の明るさに合わせて補助照明10の明るさを制御することができる。このように、2次元コード読取装置1を設置した周辺の環境の明るさに応じて補助照明10を制御するので、2次元コードの画像の輝度ムラを少なくして2値化処理が可能になり、2次元コードの読み取りを行うことができる。   In addition, since the auxiliary illumination 10 is changed from off to on, the brightness of the surrounding environment is determined and the brightness of the auxiliary illumination 10 is controlled, the two-dimensional code reader 1 is placed in a dark place to manage entry / exit. Even in the case where the auxiliary illumination 10 is installed, the brightness of the auxiliary illumination 10 can be controlled in accordance with the brightness of the installation location without performing the initial setting of the illuminance of the auxiliary illumination 10 or by performing the predetermined initial setting in advance. it can. Thus, since the auxiliary illumination 10 is controlled according to the brightness of the surrounding environment where the two-dimensional code reader 1 is installed, the luminance unevenness of the two-dimensional code image can be reduced and binarization processing can be performed. A two-dimensional code can be read.

実施の形態3.
実施の形態1では、カード12が映っている範囲の異なる領域の平均輝度の差分により、2次元コード読取装置1の設置された周辺の環境の明るさを検出し、補助照明10の照度を2次元コードが読み取れるように制御する例について説明した。次に、実施の形態3では、周辺の環境の明るさに応じて、2次元コードをかざす位置を示すガイドの位置をモニタ11に指定して表示し、2次元コードをかざす人に補助照明10に近い方に2次元コードをかざすように促すことにより、2次元コードの画像の輝度ムラを少なくして2値化処理を可能にし、2次元コードの情報を読み取りやすくする例について説明する。
Embodiment 3 FIG.
In the first embodiment, the brightness of the surrounding environment where the two-dimensional code reader 1 is installed is detected based on the difference in average luminance in different areas where the card 12 is reflected, and the illuminance of the auxiliary illumination 10 is set to 2 An example of controlling so that a dimension code can be read has been described. Next, in the third embodiment, the position of the guide indicating the position where the two-dimensional code is held is designated and displayed on the monitor 11 according to the brightness of the surrounding environment, and the auxiliary illumination 10 is provided to the person holding the two-dimensional code. An example will be described in which the two-dimensional code is urged to be held close to the two to reduce the luminance unevenness of the image of the two-dimensional code, thereby enabling the binarization process and making the information of the two-dimensional code easy to read.

図7は、この発明の実施の形態3における2次元コード読取装置1の構成図である。
また、図8はこの発明の実施の形態3における2次元コード読取装置1の外観例の図である。
図7は、図1の全体構成に対して、補助照明制御部7がなく、図2のモニタ11に表示する2次元コードをかざす位置を示すガイドの位置を指示するガイド位置指示部14が明るさ判定部6に接続され、ガイド位置指示部14が表示制御部8に接続されていることが異なる。
FIG. 7 is a configuration diagram of the two-dimensional code reading device 1 according to Embodiment 3 of the present invention.
FIG. 8 is an external view of the two-dimensional code reading device 1 according to Embodiment 3 of the present invention.
7 does not have the auxiliary illumination control unit 7 with respect to the entire configuration of FIG. 1, and the guide position instruction unit 14 that indicates the position of the guide indicating the position where the two-dimensional code displayed on the monitor 11 of FIG. The difference is that the guide position indicating unit 14 is connected to the display control unit 8.

図8は、図2の外観例の構成と同じで、2次元コードをかざす位置を示すガイド15が モニタ11に表示されている。
そして、実施の形態3では、明るさ判定部6で2次元コード読取装置1が設置されている周辺の環境の明るさが暗いと判定されると、カメラ9で撮像して画像読み込み部2で読み込まれた画像に、ガイド位置指示部14によって位置が指定されたガイド15を重ねてモニタ11に表示するところが実施の形態1と異なる。
8 is the same as the configuration of the external appearance example of FIG. 2, and a guide 15 indicating the position where the two-dimensional code is held is displayed on the monitor 11.
In the third embodiment, when the brightness determination unit 6 determines that the brightness of the surrounding environment where the two-dimensional code reader 1 is installed is dark, the image is captured by the camera 9 and is read by the image reading unit 2. The difference from Embodiment 1 is that the guide 15 whose position is specified by the guide position instruction unit 14 is superimposed on the read image and displayed on the monitor 11.

次に、実施の形態3における2次元コード読取装置1の動作について説明する。
図9は、この発明の実施の形態3における2次元読取装置1の動作を示すフローチャートである。
実施の形態1の図4のS6、カード12が映っている範囲の上端と下端の平均輝度が所定の閾値以上か否かを判断するところまでの動作は同じである。
まず、画像読み込み部2が、カメラ9により撮影された画像を読み込む(ステップS201)。そして、読み込んだ画像を一次記憶メモリ(図示せず)に記憶する。
Next, the operation of the two-dimensional code reading device 1 in the third embodiment will be described.
FIG. 9 is a flowchart showing the operation of the two-dimensional reading apparatus 1 according to Embodiment 3 of the present invention.
The operation up to S6 in FIG. 4 in the first embodiment, up to determining whether the average luminance at the upper end and the lower end of the range in which the card 12 is shown is equal to or higher than a predetermined threshold value, is the same.
First, the image reading unit 2 reads an image taken by the camera 9 (step S201). The read image is stored in a primary storage memory (not shown).

次に、カード検出部3が、一次記憶メモリに記憶されている画像読み込み部2で読み込んだ画像について、第1の画像(例えば、2次元コードが印刷されているカード12がかざされる直前の画像)と第2の画像(例えば、カード12がかざされた時の画像)の差分を算出する(ステップS202)。
そして、カード検出部3は、第1の画像と第2の画像の差分から動きを検出して、カメラ9の前にカード12がかざされたか否かを検知する(ステップS203)。
Next, with respect to the image read by the image reading unit 2 stored in the primary storage memory by the card detection unit 3, a first image (for example, an image immediately before the card 12 on which a two-dimensional code is printed is held) is displayed. ) And a second image (for example, an image when the card 12 is held over) are calculated (step S202).
Then, the card detection unit 3 detects a motion from the difference between the first image and the second image, and detects whether or not the card 12 is held in front of the camera 9 (step S203).

更に、カード検出部3は、カード12がかざされた画像のカード12が映っている範囲(動きを検出して物体が映っている範囲)を検出して、輝度算出部5に通知する。
この時、カード検出部3は、画像読み込み部2で読み込んだ画像からカード12が映っている範囲を検出して、カード12(なんらかの物体)が映っている範囲の上端中央(モニタ上端の補助照明10に近い方の端部中央)の位置と下端中央(モニタ下端の補助照明10から遠い方の端部中央)の位置も検出して輝度算出部5に出力する(ステップS204)。
Furthermore, the card detection unit 3 detects a range in which the card 12 of the image in which the card 12 is held up (a range in which an object is reflected by detecting motion) and notifies the luminance calculation unit 5 of the detected range.
At this time, the card detection unit 3 detects the range in which the card 12 is reflected from the image read by the image reading unit 2, and the upper center of the range in which the card 12 (some object) is reflected (auxiliary illumination at the upper end of the monitor). The position of the center of the end closer to 10 and the position of the center of the lower end (center of the end farther from the auxiliary illumination 10 at the lower end of the monitor) are also detected and output to the luminance calculation unit 5 (step S204).

次に、輝度算出部5が、カード検出部3によって検出されたカード12が映っている範囲の上端中央部分の例えば16×16ピクセル分の領域の平均輝度(A)を算出する。また、同様に2次元コードの下端中央部分の平均輝度(B)を算出する(ステップS205)。   Next, the luminance calculation unit 5 calculates the average luminance (A) of an area corresponding to, for example, 16 × 16 pixels in the upper center portion of the range where the card 12 detected by the card detection unit 3 is reflected. Similarly, the average luminance (B) at the center of the lower end of the two-dimensional code is calculated (step S205).

そして、明るさ判定部6が、平均輝度(A)と平均輝度(B)の差分を算出し(ステップS5)、差分が所定の閾値以上か否かを判定する(ステップS206)。
明るさ判定部6は、平均輝度(A)と平均輝度(B)の差分が所定の閾値以上であれば、2次元コード読取装置1が設置された周辺の環境は暗いと判定し(ステップS207)、判定した結果をガイド位置指定部14に通知する。
Then, the brightness determination unit 6 calculates the difference between the average luminance (A) and the average luminance (B) (step S5), and determines whether or not the difference is equal to or greater than a predetermined threshold (step S206).
If the difference between the average luminance (A) and the average luminance (B) is equal to or greater than a predetermined threshold, the brightness determination unit 6 determines that the surrounding environment where the two-dimensional code reader 1 is installed is dark (step S207). ), And notifies the determined result to the guide position specifying unit 14.

ガイド位置指定部14は、周辺の環境が暗いという結果であれば、ガイド15の位置を補助照明10に近い明るい方向へ(2次元コードの画像の輝度が高い方向へ、ここでは モニタ11の上端側に補助照明が設置されているとしているのでモニタ11の上端方向へ)表示するように表示制御部8に指示する(ステップS208)。   If the result is that the surrounding environment is dark, the guide position specifying unit 14 moves the position of the guide 15 in a bright direction close to the auxiliary illumination 10 (in the direction in which the luminance of the image of the two-dimensional code is high, in this case, the upper end of the monitor 11 Since the auxiliary illumination is installed on the side, the display control unit 8 is instructed to display (toward the upper end of the monitor 11) (step S208).

そして、表示制御部8がカメラ9で撮影された画像にガイド15を重ねて表示し、そのガイド15の位置をガイド位置指定部14が指定した補助照明10の付いている明るい方向に表示する。
すると、2次元コード復号部4が、カード12が映っている範囲の画像から2次元コードの2値化処理を行い、2次元コードの画像を復号する(ステップS209)。
The display control unit 8 displays the guide 15 superimposed on the image captured by the camera 9 and displays the position of the guide 15 in a bright direction with the auxiliary illumination 10 specified by the guide position specifying unit 14.
Then, the two-dimensional code decoding unit 4 binarizes the two-dimensional code from the image in the range where the card 12 is reflected, and decodes the two-dimensional code image (step S209).

一方、明るさ判定部6が、平均輝度(A)と平均輝度(B)の差分が所定の閾値以上でなければ、2次元コード読取装置1が設置された周辺の環境は明るいと判定し(ステップS207)、判定した結果をガイド位置指定部14に通知する。   On the other hand, if the difference between the average luminance (A) and the average luminance (B) is not equal to or greater than a predetermined threshold, the brightness determination unit 6 determines that the surrounding environment where the two-dimensional code reader 1 is installed is bright ( In step S207), the determined result is notified to the guide position specifying unit 14.

ガイド位置指定部14は、周辺の環境が明るいという結果であれば、2次元コードをかざす位置を示すガイド15の位置を モニタ11の中央部分に表示するよう表示制御部8に指示する。
そして、S209の処理(2次元コード復号部4が、カード12が映っている範囲の画像から2次元コードの2値化処理を行い、2次元コードの画像を復号する処理)を行う。
If the result is that the surrounding environment is bright, the guide position specifying unit 14 instructs the display control unit 8 to display the position of the guide 15 indicating the position where the two-dimensional code is held over in the central portion of the monitor 11.
Then, the process of S209 (the process in which the two-dimensional code decoding unit 4 binarizes the two-dimensional code from the image in the range where the card 12 is reflected and decodes the image of the two-dimensional code) is performed.

なお、ここでは、ガイド位置指定部14によってモニタ11にガイド15を表示するとして説明したが、ガイド位置指定部14によって指定された2次元コードをかざす位置を音声によって2次元コードをかざす人に知らせるようにしてもよい。   Here, it has been described that the guide 15 is displayed on the monitor 11 by the guide position specifying unit 14, but the position where the two-dimensional code specified by the guide position specifying unit 14 is held over is notified to the person holding the two-dimensional code by voice. You may do it.

以上のように、2次元コードの印刷されたカード12を2次元コード読取装置1に接続されたカメラ9にかざしたときに、カード12が映っている画像の異なる領域の平均輝度の差分に基づいて、2次元コード読取装置1が設置された周辺の環境の明るさを判定し、判定した結果が暗いと2次元コードをかざす位置を示すガイド15の位置を補助照明10の位置に近い方向に表示するように指示する。この様にして、カード12をかざしている人に対して、2次元コードが印刷されているカード12を補助照明10に近い明るい方向へ移動を促すので、2次元コードの画像の輝度ムラを少なくして2値化処理が可能となり、2次元コードの読み取りを行うことができる。   As described above, when the card 12 on which the two-dimensional code is printed is held over the camera 9 connected to the two-dimensional code reader 1, it is based on the difference in average luminance of different areas of the image on which the card 12 is reflected. Then, the brightness of the surrounding environment where the two-dimensional code reader 1 is installed is determined. If the determination result is dark, the position of the guide 15 indicating the position where the two-dimensional code is held is set in a direction close to the position of the auxiliary illumination 10. Instruct to display. In this way, the person holding the card 12 is urged to move the card 12 on which the two-dimensional code is printed in a bright direction close to the auxiliary illumination 10, so that the luminance unevenness of the image of the two-dimensional code is reduced. Thus, binarization processing becomes possible, and a two-dimensional code can be read.

また、実施の形態2のように、2次元コード読取装置1が設置された周辺の環境の明るさを補助照明制御部7が補助照明10を点滅させることにより、より正確に周辺の環境の明るさを正確に判断して、ガイド15の位置を指示するようにしてもよい。 Further, as in the second embodiment, the auxiliary illumination control unit 7 blinks the auxiliary illumination 10 so that the brightness of the surrounding environment where the two-dimensional code reader 1 is installed, so that the brightness of the surrounding environment is more accurately detected. The position of the guide 15 may be indicated by accurately determining the length.

実施の形態4.
以上の実施の形態3では、2次元コード読取装置1の設置されている周辺の環境の明るさに応じて、2次元コードをかざす位置を示すガイド15の位置を指示する例について説明した。次に、実施の形態4では、周辺の環境が暗いため、2次元コードの画像から情報の読み取る範囲が狭くなり、2次元コード全体が読み取れない場合に、2次元コードの読取可能な部分を読み取りそのデータを記録して、更にガイド15を表示する位置を移動することで、更に別の読み取り可能な部分を読み取り、記録した画像と合成する。そうすることにより、読み取り可能な部分の2次元コードの画像の輝度ムラをなくして2値化処理を可能にし、2次元コード全体の情報を読み取る例について説明する。
Embodiment 4 FIG.
In the third embodiment described above, the example in which the position of the guide 15 indicating the position where the two-dimensional code is held is indicated according to the brightness of the surrounding environment where the two-dimensional code reader 1 is installed. Next, in Embodiment 4, when the surrounding environment is dark, the range of reading information from the image of the two-dimensional code is narrowed, and when the entire two-dimensional code cannot be read, the readable portion of the two-dimensional code is read. By recording the data and moving the position where the guide 15 is further displayed, another readable portion is read and combined with the recorded image. By doing so, a description will be given of an example in which the luminance unevenness of the image of the readable portion of the two-dimensional code is eliminated and binarization processing is enabled to read the information of the entire two-dimensional code.

図10は、この発明の実施の形態4における2次元コード読取装置1の構成図である。
図10は、図7の全体構成に対して、2次元コード画像取得部16と、取得画像判断部17と、部分画像保存部18と、部分画像合成可否判断部19と、部分画像合成部20が追加されている。
FIG. 10 is a configuration diagram of the two-dimensional code reading device 1 according to Embodiment 4 of the present invention.
FIG. 10 shows a two-dimensional code image acquisition unit 16, an acquired image determination unit 17, a partial image storage unit 18, a partial image composition availability determination unit 19, and a partial image composition unit 20 with respect to the entire configuration of FIG. 7. Has been added.

2次元コード画像取得部16は、カード検出部3によってカード12が検出された時に画像読み込み部2で読み込み、一時保存された画像から2次元コードの画像を取得する。
取得画像判断部17は、2次元コード画像取得部16で取得した2次元コードの画像から、2次元コード全体の画像が取得できているのか、一部の画像の取得ができているのかを判断する。
The two-dimensional code image acquisition unit 16 acquires an image of a two-dimensional code from an image read by the image reading unit 2 when the card 12 is detected by the card detection unit 3 and temporarily stored.
The acquired image determination unit 17 determines whether an image of the entire two-dimensional code has been acquired or a partial image has been acquired from the image of the two-dimensional code acquired by the two-dimensional code image acquisition unit 16. To do.

部分画像保存部18は、取得画像判断部17で2次元コードの一部の画像の取得ができていると判断された場合に、2次元コードの一部の画像(部分画像)を一時的に保存する。
部分画像合成可否判断部19は、部分画像保存部18に一時保存されている複数の2次元コードの部分画像を組み合わせることによって2次元コードとして合成可能か否かを判断する。
部分画像合成部20は、部分画像合成可否判断部19が合成可能を判断した場合に、合成可能と判断した部分画像を組み合わせて、1つの2次元コードの画像として合成する。
The partial image storage unit 18 temporarily stores a partial image (partial image) of the two-dimensional code when the acquired image determination unit 17 determines that the partial image of the two-dimensional code has been acquired. save.
The partial image composition availability determination unit 19 determines whether or not it can be combined as a two-dimensional code by combining partial images of a plurality of two-dimensional codes temporarily stored in the partial image storage unit 18.
When the partial image composition determination unit 19 determines that composition is possible, the partial image composition unit 20 combines the partial images that are determined to be compositable and composes an image of one two-dimensional code.

次に、実施の形態4における2次元コード読取装置1の動作について説明する。
図11は、この発明の実施の形態4における2次元コード読取装置1の動作を示すフローチャートである。
実施の形態3の図9のS206、カード12が映っている範囲の上端と下端の平均輝度が所定の閾値以上か否かを判定する動作までは同じである。
まず、画像読み込み部2が、カメラ9により撮影された画像を読み込む(ステップS301)。そして、読み込んだ画像を一時記憶メモリ(図示せず)に記憶する。
Next, the operation of the two-dimensional code reading device 1 in the fourth embodiment will be described.
FIG. 11 is a flowchart showing the operation of the two-dimensional code reader 1 according to Embodiment 4 of the present invention.
The operation is the same up to S206 in FIG. 9 of the third embodiment, and the operation for determining whether the average luminance at the upper end and the lower end of the range in which the card 12 is shown is equal to or higher than a predetermined threshold value.
First, the image reading unit 2 reads an image taken by the camera 9 (step S301). The read image is stored in a temporary storage memory (not shown).

次に、カード検出部3が、一次記憶メモリに記憶されている画像読み込み部2で読み込んだ画像について、第1の画像(例えば、2次元コードが印刷されているカード12がかざされる直前の画像)と第2の画像(例えば、カード12がかざされた時の画像)の差分を算出する(ステップS302)。
そして、カード検出部3は、第1の画像と第2の画像の差分から動きを検出して、カメラ9の前にカード12がかざされたか否かを検知する(ステップS303)。
Next, with respect to the image read by the image reading unit 2 stored in the primary storage memory by the card detection unit 3, a first image (for example, an image immediately before the card 12 on which a two-dimensional code is printed is held) is displayed. ) And a second image (for example, an image when the card 12 is held over) are calculated (step S302).
Then, the card detection unit 3 detects a motion from the difference between the first image and the second image, and detects whether or not the card 12 is held in front of the camera 9 (step S303).

更に、カード検出部3は、カード12がかざされた画像のカード12が映っている範囲(動きを検出して物体が映っている範囲)を検出して、輝度算出部5に通知する。
この時、カード検出部3は、画像読み込み部2で読み込んだ画像からカード12が映っている範囲を検出して、カード12(なんらかの物体)が映っている範囲の上端中央(モニタ上端の補助照明10に近い方の端部中央)の位置と下端中央(モニタ下端の補助照明10から遠い方の端部中央)の位置も検出して輝度算出部5に出力する(ステップS304)。
Furthermore, the card detection unit 3 detects a range in which the card 12 of the image in which the card 12 is held up (a range in which an object is reflected by detecting motion) and notifies the luminance calculation unit 5 of the detected range.
At this time, the card detection unit 3 detects the range in which the card 12 is reflected from the image read by the image reading unit 2, and the upper center of the range in which the card 12 (some object) is reflected (auxiliary illumination at the upper end of the monitor). The position of the end center closer to 10) and the position of the lower end center (end center far from the auxiliary illumination 10 at the lower end of the monitor) are also detected and output to the luminance calculation unit 5 (step S304).

次に、輝度算出部5が、カード検出部3によって検出されたカード12が映っている範囲の上端中央部分の例えば16×16ピクセル分の領域の平均輝度(A)を算出する。また、同様に2次元コードの下端中央部分の平均輝度(B)を算出する(ステップS305)。
そして、明るさ判定部6が、平均輝度(A)と平均輝度(B)の差分を算出し(ステップS5)、差分が所定の閾値以上か否かを判定する(ステップS306)。
Next, the luminance calculation unit 5 calculates the average luminance (A) of an area corresponding to, for example, 16 × 16 pixels in the upper center portion of the range where the card 12 detected by the card detection unit 3 is reflected. Similarly, the average luminance (B) at the center of the lower end of the two-dimensional code is calculated (step S305).
Then, the brightness determination unit 6 calculates the difference between the average luminance (A) and the average luminance (B) (step S5), and determines whether the difference is equal to or greater than a predetermined threshold (step S306).

明るさ判定部6は、平均輝度(A)と平均輝度(B)の差分が所定の閾値以上であれば、2次元コード読取装置1が設置された周辺の環境は暗いと判定し(ステップS307)、2次元コード画像取得部16に判定結果を通知する。   If the difference between the average luminance (A) and the average luminance (B) is equal to or greater than a predetermined threshold, the brightness determination unit 6 determines that the surrounding environment where the two-dimensional code reader 1 is installed is dark (step S307). ) Notify the determination result to the two-dimensional code image acquisition unit 16.

明るさ判定部6から通知された判定結果が「周辺の環境は暗い」であれば、2次元コード画像取得部16は、カード検出部3でカード12がかざされたとされる画像から、2次元コードの画像を取得する(ステップS308)。   If the determination result notified from the brightness determination unit 6 is “the surrounding environment is dark”, the two-dimensional code image acquisition unit 16 determines that the card detection unit 3 holds the card 12 over the two-dimensional An image of the code is acquired (step S308).

そして、取得画像判断部17が、2次元コード画像取得部16で取得した2次元コードの画像に対して、縦横のドットの個数から2次元コードの大きさを算出し、2次元コードの全体が取得できているか否かを判断する(ステップS309)。   Then, the acquired image determination unit 17 calculates the size of the two-dimensional code from the number of vertical and horizontal dots for the two-dimensional code image acquired by the two-dimensional code image acquisition unit 16, and the entire two-dimensional code is obtained. It is determined whether or not it has been acquired (step S309).

そして、取得画像判断部17が、2次元コードの全体が取得できていると判断すると、取得画像判断部17が2次元コード画像取得部16で取得した2次元コードの画像を2次元コード復号部4に出力する。
そして、2次元コード復号部4がデータを復号し(ステップ310)、部分画像保存部18に保存した画像が残っていれる場合は削除を行い(ステップS311)、本処理を終了する。
When the acquired image determining unit 17 determines that the entire two-dimensional code has been acquired, the acquired image determining unit 17 converts the two-dimensional code image acquired by the two-dimensional code image acquiring unit 16 into a two-dimensional code decoding unit. 4 is output.
Then, the two-dimensional code decoding unit 4 decodes the data (step 310), and deletes the image stored in the partial image storage unit 18 (step S311), thus ending this process.

ステップS306に戻り、明るさ判定部6が、平均輝度(A)と平均輝度(B)の差分が所定の閾値以上ではなく、「周辺の環境は明るい」と判定すると(ステップS312)、ガイド位置指示部14は、2次元コードをかざす位置を示すガイド15の位置を中央に指示し(ステップS313)、表示制御部8がガイド15の位置を中央に表示するように制御する。そして、ステップS308の2次元コード画像の取得の処理以降を行う。   Returning to step S306, if the brightness determination unit 6 determines that the difference between the average luminance (A) and the average luminance (B) is not equal to or greater than the predetermined threshold value and “the surrounding environment is bright” (step S312), the guide position The instruction unit 14 instructs the center of the position of the guide 15 indicating the position where the two-dimensional code is held (step S313), and controls the display control unit 8 to display the position of the guide 15 at the center. Then, the processing of acquiring the two-dimensional code image in step S308 is performed.

また、ステップS309に戻り、取得画像判断部17が2次元コードの画像は2次元コードの全体ではないと判断して、部分画像を部分画像保存部18に保存する。すると、部分画像合成可否判断部19がその保存された部分画像を取得する(ステップS314)。   Returning to step S309, the acquired image determination unit 17 determines that the image of the two-dimensional code is not the entire two-dimensional code, and stores the partial image in the partial image storage unit 18. Then, the partial image composition availability determination unit 19 acquires the stored partial image (step S314).

そして、部分画像合成可否判断部19は、取得した部分画像の4辺のパターンマッチング検索を行い(ステップS315)、複数画像を組み合わせて1つの2次元コードに合成可能か否かの判断を行う(ステップS316)。   Then, the partial image composition availability determination unit 19 performs a pattern matching search on the four sides of the acquired partial image (step S315), and determines whether it is possible to combine a plurality of images into one two-dimensional code (step S315). Step S316).

2次元コードに合成可能と判断すると、部分画像合成可否判断部19が部分画像合成部20にパターンマッチングの結果を通知し、部分画像合成部20が部分画像保存部18に保存されている部分画像を組み合わせて1つの2次元コードの画像を合成する(ステップS317)。そして、S310の2次元コードの復号以降の処理を行う。   When it is determined that the image can be combined with the two-dimensional code, the partial image combination determination unit 19 notifies the partial image combination unit 20 of the pattern matching result, and the partial image combination unit 20 stores the partial image stored in the partial image storage unit 18. Are combined to synthesize one two-dimensional code image (step S317). Then, the processing after the decoding of the two-dimensional code in S310 is performed.

また、ステップS316に戻り、部分画像合成可否判断部19が、2次元コードに合成不可と判断すると、ガイド位置指示部14がガイド15を補助照明10に近い位置に移動して表示するように指示し、表示制御部8がその指示でガイド15の表示を移動して、S308の2次元コード画像の取得以降の処理を行う。   Returning to step S316, when the partial image composition determination unit 19 determines that the two-dimensional code cannot be combined, the guide position instruction unit 14 instructs the guide 15 to move to a position close to the auxiliary illumination 10 and display it. Then, the display control unit 8 moves the display of the guide 15 according to the instruction, and performs the processing after the acquisition of the two-dimensional code image in S308.

例えば、大きな2次元コードの読み込みを例に説明する。
図12は、この発明の実施の形態4における2次元コード読取装置1に読み込まれた2次元コードの画像とガイド15をモニタ11に表示した図である。
また、図13、図14は、この発明の実施の形態4における2次元コード読取装置1で読み取った2次元コードの図である。
図12の モニタ11に表示した画像101aにおいて、ガイド102aに沿って2次元コード103aをかざしたところ、2次元コード103aの上部のみ読み取れて図13の部分画像201のような画像が得られたとする。
For example, reading a large two-dimensional code will be described as an example.
FIG. 12 is a diagram in which an image of the two-dimensional code read by the two-dimensional code reader 1 and the guide 15 are displayed on the monitor 11 according to Embodiment 4 of the present invention.
FIGS. 13 and 14 are diagrams of two-dimensional codes read by the two-dimensional code reader 1 according to Embodiment 4 of the present invention.
In the image 101a displayed on the monitor 11 of FIG. 12, when the two-dimensional code 103a is held over the guide 102a, only the upper part of the two-dimensional code 103a is read and an image like the partial image 201 of FIG. 13 is obtained. .

このとき、部分画像201を部分画像保存部に保存するが、その際に4辺のパターンマッチング用の部分画像(201a、201b、201c、201d)を切り出して、同時に保存しておく。   At this time, the partial image 201 is stored in the partial image storage unit. At this time, the partial images for pattern matching (201a, 201b, 201c, 201d) on four sides are cut out and stored at the same time.

その後、図12のガイド102b、ガイド102cを表示して、補助照明10に近い明るい方向(2次元コードの読取可能な範囲)に2次元コードを誘導し(103b、103c)、それぞれの画像も同様にパターンマッチング用画像を切り出して保存する。   Thereafter, the guide 102b and the guide 102c in FIG. 12 are displayed, and the two-dimensional code is guided in the bright direction (the range in which the two-dimensional code can be read) close to the auxiliary illumination 10 (103b, 103c). The pattern matching image is cut out and saved.

その後、例えば、図14のように、パターマッチング用画像301を元に合致する組み合わせ(311aと312a)、パターマッチング用画像302を元に合致する組み合わせ(312b、313a)を探し、311aを含む311の部分画像、312aと312bを含む部分画像312、313aを含む部分画像313を組み合わせて1つの2次元コードとなるのであれば、311,312,313から1つの2次元コード320を合成する。そして、この合成した2次元コード320の画像で2次元コードを復号する。   After that, for example, as shown in FIG. 14, a matching combination (311a and 312a) based on the pattern matching image 301 and a matching combination (312b and 313a) based on the pattern matching image 302 are searched for 311 including 311a. If the partial image 313 including the partial images 312a and 312b including the partial images 312a and 312b is combined into one two-dimensional code, the two-dimensional code 320 is synthesized from 311, 312 and 313. Then, the two-dimensional code is decoded with the synthesized two-dimensional code 320 image.

以上のように、ガイド15の位置を補助照明10のある方向、明るい方向に指定することにより、輝度ムラがない2値化処理が可能な2次元コードの部分画像を取得して、その部分画像を合成することで、一度に読み取れないような大きな2次元コードも読み取る(復号する)ことができる。   As described above, by specifying the position of the guide 15 in a direction in which the auxiliary illumination 10 is present and in a bright direction, a partial image of a two-dimensional code that can be binarized without luminance unevenness is acquired, and the partial image is acquired. By synthesizing, a large two-dimensional code that cannot be read at once can be read (decoded).

また、暗所における読取範囲が狭く、2次元コード全体が読み取れない場合でも、 モニタ11のガイド15の位置を複数回移動するように指示し、その都度、2次元コードの読取可能な範囲のみを部分保存するようにしているので、暗所でも2次元コードの画像の輝度ムラをなくして2値化処理を可能とし、少し大きな2次元コードを読取ることができる。   Even when the reading range in a dark place is narrow and the entire two-dimensional code cannot be read, the instruction is given to move the position of the guide 15 of the monitor 11 a plurality of times. Since partial storage is performed, it is possible to perform binarization processing by eliminating luminance unevenness of an image of a two-dimensional code even in a dark place, and a slightly larger two-dimensional code can be read.

なお、本実施の形態では、2次元コードを並行に移動して部分画像を取得したが、2次元コードを180度回転させて残りの部分画像を読み込ませても良い。
また180度回転以外にも90度回転やそれ以外の角度に回転させて部分画像を読み込ませても良い。
また180度回転させた2次元コードを並べて印字して同時に読み取らせるなどの方法を使っても良い。
In this embodiment, the partial image is acquired by moving the two-dimensional code in parallel. However, the remaining partial image may be read by rotating the two-dimensional code by 180 degrees.
Further, in addition to rotation by 180 degrees, partial images may be read by rotating by 90 degrees or by other angles.
Alternatively, a method may be used in which two-dimensional codes rotated by 180 degrees are arranged and printed and simultaneously read.

1 2次元コード読取装置、2 画像読み込み部、3 カード検出部、4 2次元コード復号部、5 輝度算出部、6 明るさ判定部、7 補助照明制御部、8 表示制御部、9 カメラ、10 補助照明、11 モニタ、12 QRコード(登録商標)カード(カード)、13 2次元コード、14 ガイド位置指示部、15 ガイド、16 2次元コード画像取得部、17 取得画像判断部、18 部分画像保存部、19 部分画像合成可否判断部、20 部分画像合成部。 1 2D code reader, 2 image reading unit, 3 card detection unit, 4 2D code decoding unit, 5 brightness calculation unit, 6 brightness determination unit, 7 auxiliary illumination control unit, 8 display control unit, 9 camera, 10 Auxiliary illumination, 11 monitor, 12 QR code (registered trademark) card (card), 13 two-dimensional code, 14 guide position indicating unit, 15 guide, 16 two-dimensional code image acquisition unit, 17 acquired image determination unit, 18 partial image storage Part, 19 partial image composition availability determination part, 20 partial image composition part.

Claims (12)

撮影された画像を読み込む画像読み込み部、
該画像読み込み部で読み込んだ画像の輝度を算出する算出部、
前記画像読み込み部で読み込んだ画像から物体を検出する検出部、
該検出部で検出した物体の画像の所定の領域について前記算出部で算出した輝度に基づいて、前記画像が撮影される周辺の明るさを判定する判定部、
該判定部で判定した明るさに基づいて、画像が撮影される付近に接続された補助照明を制御する制御部
を備えたことを特徴とする2次元コード読取装置。
An image reading unit that reads the captured image,
A calculation unit for calculating the luminance of the image read by the image reading unit;
A detection unit for detecting an object from the image read by the image reading unit;
A determination unit that determines the brightness of the periphery where the image is captured based on the luminance calculated by the calculation unit for a predetermined region of the image of the object detected by the detection unit;
A two-dimensional code reading device comprising: a control unit that controls auxiliary illumination connected in the vicinity where an image is captured based on the brightness determined by the determination unit.
前記判定部は、前記検出部で検出した物体の画像の第1の領域について前記算出部で算出した輝度と、前記検出部で検出した物体の画像の第2の領域について前記算出部で算出した輝度に基づいて、前記画像を撮影する周辺の明るさを判定することを特徴とする請求項1記載の2次元コード読取装置。   The determination unit calculates the luminance calculated by the calculation unit for the first region of the object image detected by the detection unit and the calculation unit calculates the second region of the object image detected by the detection unit. The two-dimensional code reading device according to claim 1, wherein brightness of a periphery around which the image is captured is determined based on luminance. 前記判定部は、前記第1の領域の輝度と、前記第2の領域の輝度との差分に基づいて、前記画像を撮影する周辺の明るさを判定することを特徴とする請求項2記載の2次元コード読取装置。   The said determination part determines the brightness of the circumference | surroundings which image | photographs the said image based on the difference of the brightness | luminance of the said 1st area | region, and the brightness | luminance of the said 2nd area | region. Two-dimensional code reader. 前記制御部は、前記検出部で物体が検出されると前記補助照明を点滅する制御を行い、
前記判定部は、前記制御部が前記補助照明を点灯した時の前記第1の領域の輝度と、前記第2の領域の輝度との差分と、前記制御部が前記補助照明を消灯した時の前記第1の領域の輝度と、前記第2の領域の輝度との差分と、の差分に基づいて、前記画像を撮影する周辺の明るさを判定することを特徴とする請求項2または請求項3に記載の2次元コード読取装置。
The control unit performs control to blink the auxiliary illumination when an object is detected by the detection unit,
The determination unit includes a difference between the luminance of the first region when the control unit turns on the auxiliary illumination and the luminance of the second region, and when the control unit turns off the auxiliary illumination. The brightness of the periphery where the image is captured is determined based on the difference between the luminance of the first region and the luminance of the second region. The two-dimensional code reader according to 3.
撮影された画像を読み込む画像読み込み部、
該画像読み込み部で読み込んだ画像の輝度を算出する算出部、
前記画像読み込み部で読み込んだ画像から物体を検出する検出部、
該検出部で検出した物体の画像の所定の領域について前記算出部で算出した輝度に基づいて、前記画像が撮影される周辺の明るさを判定する判定部、
該判定部で判定した明るさに基づいて、2次元コードの読み取り位置を指定する読み取り位置指定部
を備えたことを特徴とする2次元読み取り装置。
An image reading unit that reads the captured image,
A calculation unit for calculating the luminance of the image read by the image reading unit;
A detection unit for detecting an object from the image read by the image reading unit;
A determination unit that determines the brightness of the periphery where the image is captured based on the luminance calculated by the calculation unit for a predetermined region of the image of the object detected by the detection unit;
A two-dimensional reading apparatus comprising: a reading position specifying unit that specifies a reading position of a two-dimensional code based on the brightness determined by the determining unit.
前記判定部は、前記検出部で検出した物体の画像の第1の領域について前記算出部で算出した輝度と、前記検出部で検出した物体の画像の第2の領域について前記算出部で算出した輝度に基づいて、前記画像を撮影する周辺の明るさを判定し、
前記位置指定部は、前記算出した輝度の高い領域の方向へ2次元コードの読み取り位置を指定することを特徴とする請求項5記載の2次元コード読取装置。
The determination unit calculates the luminance calculated by the calculation unit for the first region of the object image detected by the detection unit and the calculation unit calculates the second region of the object image detected by the detection unit. Based on the brightness, determine the brightness of the area surrounding the image,
6. The two-dimensional code reading device according to claim 5, wherein the position specifying unit specifies a reading position of the two-dimensional code in the direction of the calculated high luminance region.
前記判定部は、前記検出部で検出した物体の画像の第1の領域の輝度と、前記第2の領域の輝度との差分に基づいて、前記画像を撮影する周辺の明るさを判定し、
前記位置指定部は、前記算出した輝度の高い領域の方向へ2次元コードの読み取り位置を指定することを特徴とする請求項6記載の2次元コード読取装置。
The determination unit determines the brightness of the periphery of the image based on the difference between the luminance of the first region of the image of the object detected by the detection unit and the luminance of the second region,
The two-dimensional code reader according to claim 6, wherein the position specifying unit specifies a reading position of the two-dimensional code in a direction of the calculated high luminance region.
接続された表示装置に前記撮影された画像を表示する制御を行う表示制御部を更に備え、
該表示制御部は、前記読み取り位置指定部で指定された2次元コードの読み取り位置を前記撮影した画像と重ねて表示する制御を行うことを特徴とする請求項5〜7のいずれかに記載の2次元コード読取装置。
A display control unit for performing control to display the photographed image on a connected display device;
8. The control according to claim 5, wherein the display control unit performs control to display the reading position of the two-dimensional code designated by the reading position designation unit so as to overlap the photographed image. Two-dimensional code reader.
前記判定部で判定した明るさに基づいて、画像が撮影される付近に接続された補助照明を制御する制御部を更に備え、
該制御部は、前記検出部で物体が検出されると前記補助照明を点滅する制御を行い、
前記判定部は、前記制御部が前記補助照明を点灯した時の前記第1の領域の輝度と、前記第2の領域の輝度との差分と、前記制御部が前記補助照明を消灯した時の前記第1の領域の輝度と、前記第2の領域の輝度との差分と、の差分に基づいて、前記画像を撮影する周辺の明るさを判定することを特徴とする請求項6〜8のいずれかに記載の2次元コード読取装置。
Based on the brightness determined by the determination unit, further comprising a control unit for controlling auxiliary illumination connected in the vicinity where the image is captured,
The control unit performs control to blink the auxiliary illumination when an object is detected by the detection unit,
The determination unit includes a difference between the luminance of the first region when the control unit turns on the auxiliary illumination and the luminance of the second region, and when the control unit turns off the auxiliary illumination. The brightness of the periphery where the image is captured is determined based on the difference between the luminance of the first region and the luminance of the second region. The two-dimensional code reader according to any one of the above.
前記検出部で物体を検出すると、前記画像読み込み部から読み込んだ画像から2次元コードの画像を取得する2次元コード画像取得部と、
該2次元コード画像取得部で取得した2次元コードの画像が2次元コードの全体であるか一部であるかを判断する取得画像判断部と、
該取得画像判断部で2次元コードの画像が一部であると判断すると、前記2次元コード画像取得部で取得した2次元コードの部分画像を保存する画像保存部と、
該画像保存部で保存した画像を組み合わせることにより2次元コードとして合成可能か否かを判断する部分画像合成可否判断部と、
該部分画像合成可否判断部が合成可能と判断すると前記画像保存部で保存した画像から1つの2次元コードの画像として合成する部分画像合成部とを更に備え、
前記読取位置指定部は、前記取得画像判断部が2次元コードの画像が一部であると判断すると該判定部で判定した明るさに基づいて、2次元コードの読み取り位置を指定し、
前記2次元コード画像取得部は、前記読取位置指定部で2次元コードの読み取り位置を指定した後の画像を取得し、前記画像保存部に保存することを特徴とする請求項5〜9のいずれかに記載の2次元コード読取装置。
A two-dimensional code image acquisition unit that acquires an image of a two-dimensional code from an image read from the image reading unit when an object is detected by the detection unit;
An acquired image determination unit that determines whether the image of the two-dimensional code acquired by the two-dimensional code image acquisition unit is the whole or a part of the two-dimensional code;
When the acquired image determination unit determines that the image of the two-dimensional code is a part, an image storage unit that stores the partial image of the two-dimensional code acquired by the two-dimensional code image acquisition unit;
A partial image composition availability determination unit that determines whether or not the image can be combined as a two-dimensional code by combining the images stored in the image storage unit;
A partial image synthesis unit that synthesizes an image of the two-dimensional code from the image stored in the image storage unit when the partial image synthesis possibility determination unit determines that the image can be combined;
The reading position designating unit designates the reading position of the two-dimensional code based on the brightness determined by the determining unit when the acquired image determining unit determines that the image of the two-dimensional code is a part.
The said two-dimensional code image acquisition part acquires the image after designating the reading position of a two-dimensional code in the said reading position designation | designated part, and preserve | saves it in the said image storage part, The any one of Claims 5-9 A two-dimensional code reading device according to claim 1.
2次元コード読取装置による2次元コードを読み取る方法において、
撮影された画像を読み込む画像読み込みステップ、
該画像読み込みステップで読み込んだ画像の輝度を算出する輝度算出ステップ、
前記画像読み込みステップで読み込んだ画像から物体を検出する検出ステップ、
該検出ステップで検出した物体の画像の所定の領域について前記輝度算出ステップで算出した輝度に基づいて、前記画像が撮影される周辺の明るさを判定する判定ステップ、
該判定ステップで判定した明るさに基づいて、画像が撮影される付近に接続された補助照明の輝度を制御する制御ステップ
を備えたことを特徴とする2次元コード読取方法。
In a method of reading a two-dimensional code by a two-dimensional code reader,
An image reading step for reading the captured image,
A luminance calculating step for calculating the luminance of the image read in the image reading step;
A detection step of detecting an object from the image read in the image reading step;
A determination step of determining brightness of a periphery where the image is captured based on the luminance calculated in the luminance calculation step for a predetermined region of the image of the object detected in the detection step;
A two-dimensional code reading method comprising: a control step for controlling the luminance of auxiliary illumination connected in the vicinity of an image to be photographed based on the brightness determined in the determination step.
2次元コード読取装置による2次元コードを読み取る方法において、
撮影された画像を読み込む画像読み込みステップ、
該画像読み込みステップで読み込んだ画像の輝度を算出する輝度算出ステップ、
前記画像読み込みステップで読み込んだ画像から物体を検出する検出ステップ、
該検出ステップで検出した物体の画像の所定の領域について前記輝度算出ステップで算出した輝度に基づいて、前記画像が撮影される周辺の明るさを判定する判定ステップ、
該判定ステップで判定した明るさに基づいて、2次元コードの読み取り位置を指定する読み取り位置指定ステップ
を備えたことを特徴とする2次元コード読取方法。
In a method of reading a two-dimensional code by a two-dimensional code reader,
An image reading step for reading the captured image,
A luminance calculating step for calculating the luminance of the image read in the image reading step;
A detection step of detecting an object from the image read in the image reading step;
A determination step of determining brightness of a periphery where the image is captured based on the luminance calculated in the luminance calculation step for a predetermined region of the image of the object detected in the detection step;
A two-dimensional code reading method comprising a reading position specifying step for specifying a reading position of a two-dimensional code based on the brightness determined in the determining step.
JP2012200323A 2012-09-12 2012-09-12 Two-dimensional code reader and two-dimensional code reading method Pending JP2014056382A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012200323A JP2014056382A (en) 2012-09-12 2012-09-12 Two-dimensional code reader and two-dimensional code reading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012200323A JP2014056382A (en) 2012-09-12 2012-09-12 Two-dimensional code reader and two-dimensional code reading method

Publications (1)

Publication Number Publication Date
JP2014056382A true JP2014056382A (en) 2014-03-27

Family

ID=50613645

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012200323A Pending JP2014056382A (en) 2012-09-12 2012-09-12 Two-dimensional code reader and two-dimensional code reading method

Country Status (1)

Country Link
JP (1) JP2014056382A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019026513A1 (en) * 2017-08-01 2019-02-07 パナソニックIpマネジメント株式会社 Image monitoring device, image monitoring method, image monitoring program, and recording medium
JP2020161106A (en) * 2019-03-22 2020-10-01 株式会社デンソーウェーブ Information reading device and program
JP2021140649A (en) * 2020-03-09 2021-09-16 セイコーソリューションズ株式会社 Information processing apparatus and information processing program
CN117236859A (en) * 2023-11-10 2023-12-15 青岛冠成软件有限公司 Cold chain logistics storage monitoring method

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004054581A (en) * 2002-07-19 2004-02-19 Denso Wave Inc Method for displaying information code and method for reading the information code
JP2004213331A (en) * 2002-12-27 2004-07-29 Optoelectronics Co Ltd Optical information reading device
JP2004287808A (en) * 2003-03-20 2004-10-14 Olympus Corp Portable information terminal device
US20050258252A1 (en) * 2004-05-21 2005-11-24 Intermec Ip Corp. Indicators of optimum positioning of a data collection device for reading data carriers, such as RFID tags and machine-readable symbols
JP2006081087A (en) * 2004-09-13 2006-03-23 Matsushita Electric Ind Co Ltd Imaging apparatus and method
JP2006163858A (en) * 2004-12-08 2006-06-22 Omron Corp Optical information code reader
JP2006270218A (en) * 2005-03-22 2006-10-05 Nikon Corp Electronic camera and electronic camera system
US20070002163A1 (en) * 2005-06-29 2007-01-04 Dariusz Madej Imager settings
JP2007207085A (en) * 2006-02-03 2007-08-16 Denso Wave Inc Optical information reader

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004054581A (en) * 2002-07-19 2004-02-19 Denso Wave Inc Method for displaying information code and method for reading the information code
JP2004213331A (en) * 2002-12-27 2004-07-29 Optoelectronics Co Ltd Optical information reading device
JP2004287808A (en) * 2003-03-20 2004-10-14 Olympus Corp Portable information terminal device
US20050258252A1 (en) * 2004-05-21 2005-11-24 Intermec Ip Corp. Indicators of optimum positioning of a data collection device for reading data carriers, such as RFID tags and machine-readable symbols
JP2006081087A (en) * 2004-09-13 2006-03-23 Matsushita Electric Ind Co Ltd Imaging apparatus and method
JP2006163858A (en) * 2004-12-08 2006-06-22 Omron Corp Optical information code reader
JP2006270218A (en) * 2005-03-22 2006-10-05 Nikon Corp Electronic camera and electronic camera system
US20070002163A1 (en) * 2005-06-29 2007-01-04 Dariusz Madej Imager settings
JP2007207085A (en) * 2006-02-03 2007-08-16 Denso Wave Inc Optical information reader

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019026513A1 (en) * 2017-08-01 2019-02-07 パナソニックIpマネジメント株式会社 Image monitoring device, image monitoring method, image monitoring program, and recording medium
US20200084356A1 (en) * 2017-08-01 2020-03-12 Panasonic Intellectual Property Management Co., Ltd. Image monitoring device, image monitoring method, and recording medium
US10791252B2 (en) 2017-08-01 2020-09-29 Panasonic Intellectual Property Management Co., Ltd. Image monitoring device, image monitoring method, and recording medium
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
JP2021140649A (en) * 2020-03-09 2021-09-16 セイコーソリューションズ株式会社 Information processing apparatus and information processing program
CN117236859A (en) * 2023-11-10 2023-12-15 青岛冠成软件有限公司 Cold chain logistics storage monitoring method
CN117236859B (en) * 2023-11-10 2024-01-26 青岛冠成软件有限公司 Cold chain logistics storage monitoring method

Similar Documents

Publication Publication Date Title
CN107534751B (en) Display apparatus and image display method thereof
US9491370B2 (en) Methods and apparatuses for providing guide information for a camera
US5949052A (en) Object sensor system for stationary position optical reader
US9292722B2 (en) Apparatus comprising image sensor array and illumination control
JP2010004118A (en) Digital photograph frame, information processing system, control method, program, and information storage medium
JP5012872B2 (en) Display mode control device and display mode control program
JP2014056382A (en) Two-dimensional code reader and two-dimensional code reading method
CN101406047A (en) Projector based ambient lighting system
JP7018915B2 (en) Portable information code display device
JP2019508780A (en) Coded information reader
US8903201B2 (en) Method and apparatus for enhanced document capture
JP2007287009A (en) Information code reader
US10489621B2 (en) Reading device and mobile terminal
CN105373770B (en) Image acquisition device, terminal and image acquisition method
CN114760410A (en) Systems, methods, and apparatus for focus selection using image disparity
TWI745699B (en) Optical communication device and method for transmitting and receiving information
JP2012033073A (en) Additional information service system and image pickup device
JP6380095B2 (en) Portable information code display device
US9955130B2 (en) Image display control device, image display system, and image display control method
JP5962720B2 (en) Light irradiation apparatus and program
US10621746B2 (en) Methods and apparatus for rapidly dimensioning an object
CN114630122A (en) Decoding and encoding method based on adaptive intra-frame refreshing mechanism and related equipment
JP2016125917A (en) Three-dimensional shape measurement device, method and program
JP2018078508A (en) Display control device, display control method and program
JP5605627B2 (en) Pattern or image reading apparatus, control method thereof, and program

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20140327

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140930

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150520

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150526

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150707

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150915

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151117

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20160315