JP5251854B2 - Optical information reader - Google Patents
Optical information reader Download PDFInfo
- Publication number
- JP5251854B2 JP5251854B2 JP2009281182A JP2009281182A JP5251854B2 JP 5251854 B2 JP5251854 B2 JP 5251854B2 JP 2009281182 A JP2009281182 A JP 2009281182A JP 2009281182 A JP2009281182 A JP 2009281182A JP 5251854 B2 JP5251854 B2 JP 5251854B2
- Authority
- JP
- Japan
- Prior art keywords
- code
- dimensional code
- decoding
- data area
- measurement
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000003287 optical effect Effects 0.000 title claims description 51
- 238000005259 measurement Methods 0.000 claims description 71
- 238000001514 detection method Methods 0.000 claims description 28
- 238000012937 correction Methods 0.000 claims description 15
- 238000000034 method Methods 0.000 description 36
- 230000008569 process Effects 0.000 description 31
- 238000003384 imaging method Methods 0.000 description 25
- 230000007246 mechanism Effects 0.000 description 15
- 238000012545 processing Methods 0.000 description 11
- 238000005286 illumination Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 4
- 230000014509 gene expression Effects 0.000 description 3
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 3
- 239000004973 liquid crystal related substance Substances 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000010365 information processing Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000003321 amplification Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000011109 contamination Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Description
本発明は、光学的情報読取装置に関するものである。 The present invention relates to an optical information reader.
従来、光学的情報読取装置に関する技術として、下記特許文献1に示す二次元コードが知られている。この二次元コードは、データ領域が位置決め用シンボルを構成するセルと同じセルサイズのセルを用いて表現された第1データ領域と、その位置決め用シンボルを構成するセルより小さなセルサイズのセルを用いて表現された第2データ領域とから構成されている。これにより、比較的大きなセルサイズが必要な高速移動時読取用や、比較的小さなセルサイズで読取可能な手持ちの読取装置用など、用途に合わせたセルサイズを混在させてコードを形成している。 2. Description of the Related Art Conventionally, as a technique related to an optical information reading apparatus, a two-dimensional code shown in Patent Document 1 below is known. This two-dimensional code uses a first data area expressed using a cell having a data area having the same cell size as a cell constituting a positioning symbol, and a cell having a smaller cell size than a cell constituting the positioning symbol. The second data area is expressed as follows. As a result, codes are formed by mixing cell sizes according to applications, such as for high-speed moving reading that requires a relatively large cell size and for hand-held readers that can read with a relatively small cell size. .
また、下記特許文献2に示す二次元コードの読取方法では、上述のようにセルサイズの異なるデータ領域を有する二次元コードが読取対象であって、撮像した二次元コードの画像内での第1データ領域あるいは第2データ領域の少なくともいずれか一方のデータ領域の位置を、位置決め用シンボルの位置及び各データ領域のセルサイズに基づいて検出し、第1データ領域あるいは第2データ領域のうちの少なくともいずれか一方のコード情報を読み取っている。 Further, in the two-dimensional code reading method shown in Patent Document 2 below, a two-dimensional code having a data area having a different cell size as described above is a reading target, and the first two-dimensional code in the image of the captured two-dimensional code is used. The position of at least one of the data area and the second data area is detected based on the position of the positioning symbol and the cell size of each data area, and at least one of the first data area and the second data area is detected. Either one of the code information is read.
ところで、近年、伝票などに表示されている近くの二次元コードや、フォークリフトや棚の上にある商品に表示されている遠くの二次元コードを単一の読取装置で円滑に読み取るために、自動焦点調節機能(オートフォーカス機能)を搭載した読取装置の必要性が高くなってきている。オートフォーカスで焦点を合わす方法としてコントラスト検出方式が主に用いられており、長所として撮影用CCDを流用するので、機構を簡略化でき小型化および低コスト化を図ることができる。 By the way, recently, in order to smoothly read a nearby two-dimensional code displayed on a slip or a remote two-dimensional code displayed on a forklift or a product on a shelf with a single reading device, There is an increasing need for a reading apparatus equipped with a focus adjustment function (autofocus function). A contrast detection method is mainly used as a method of focusing by autofocus, and since a photographing CCD is used as an advantage, the mechanism can be simplified, and the size and cost can be reduced.
しかしながら、コントラスト検出方式の短所としては、コントラストのない被写体には焦点が合わせられないことや、暗いと焦点が合わないことなどに加えて、合焦までに時間がかかることがあげられる。合焦に時間がかかる理由は、この方式では瞬間に被写体までの距離を求めることができないために、物理的に集光レンズを移動させることでコントラストの高い位置、すなわち焦点が合う集光レンズの位置を探索するためであり、レンズを頻繁に移動させることからレンズの駆動機構の耐久性も問題になる。 However, the disadvantages of the contrast detection method are that it is not possible to focus on an object with no contrast, that it is not focused when it is dark, and that it takes time to focus. The reason why it takes a long time to focus is that the distance to the subject cannot be obtained instantaneously with this method. This is in order to search for the position, and since the lens is frequently moved, the durability of the lens driving mechanism also becomes a problem.
セルサイズの大きな二次元コードであれば、焦点を正確に合わせなくても読み取ることができるが、当該二次元コードのコードサイズが大きくなってしまうという問題がある。また、上記特許文献1,2に記載の発明のように、二次元コードのデータ領域がセルサイズの異なる2つのデータ領域から構成されていると、焦点が正確に合っていない場合に大きなセルサイズのデータ領域が読み取れても、小さなセルサイズのデータ領域が読み取れない可能性がある。 A two-dimensional code having a large cell size can be read without accurately focusing, but there is a problem that the code size of the two-dimensional code becomes large. In addition, as in the inventions described in Patent Documents 1 and 2, if the data area of the two-dimensional code is composed of two data areas having different cell sizes, a large cell size can be obtained when the focus is not accurately achieved. Even if the data area can be read, the data area having a small cell size may not be read.
本発明は、上述した課題を解決するためになされたものであり、その目的とするところは、セルサイズの異なる2つのデータ領域を有する二次元コードからの反射光を集光レンズを介して受光手段に好適に合焦させ得る光学的情報読取装置を提供することにある。 The present invention has been made in order to solve the above-described problems, and an object of the present invention is to receive reflected light from a two-dimensional code having two data areas having different cell sizes via a condenser lens. It is an object of the present invention to provide an optical information reading apparatus that can be suitably focused on a means.
上記目的を達成するため、特許請求の範囲に記載の請求項1の光学的情報読取装置では、複数のセルから構成される第1データ領域とこの第1データ領域を構成するセルよりも小さなセルから構成される第2データ領域とを有する二次元コードを光学的に読み取る光学的情報読取装置であって、前記第1データ領域には前記二次元コードの大きさに関する情報が含まれており、前記二次元コードから反射されて集光レンズにて集光された反射光を受光する受光手段と、前記受光手段による受光結果に基づいて画像データを生成する生成手段と、前記生成手段により前記二次元コードを含んで生成された前記画像データに基づいて当該二次元コードの前記第1データ領域をデコードする第1デコード手段と、前記第1デコード手段により取得された前記二次元コードの大きさとこの二次元コードが前記画像データに占めるコード領域とに基づいて当該二次元コードまでの距離を測定する距離測定手段と、前記距離測定手段により測定された測定距離に応じて合焦させるように前記集光レンズを移動させるレンズ移動手段と、前記測定距離に応じて合焦させた状態において前記二次元コードの反射光を受光した前記受光手段からの受光結果に応じて生成された画像データに基づいて当該二次元コードの前記第2データ領域をデコードする第2デコード手段と、を備えることを特徴とする。 In order to achieve the above object, in the optical information reading apparatus according to claim 1, the first data area composed of a plurality of cells and a cell smaller than the cells constituting the first data area. An optical information reading device for optically reading a two-dimensional code having a second data area comprising: information relating to the size of the two-dimensional code is included in the first data area; Light receiving means for receiving reflected light reflected from the two-dimensional code and collected by a condenser lens, generation means for generating image data based on a light reception result by the light receiving means, and the generation means First decoding means for decoding the first data area of the two-dimensional code based on the image data generated including the dimension code, and obtained by the first decoding means. Further, distance measuring means for measuring the distance to the two-dimensional code based on the size of the two-dimensional code and the code area occupied by the two-dimensional code in the image data, and the measurement distance measured by the distance measuring means According to the light reception result from the light receiving means that received the reflected light of the two-dimensional code in the state of being focused according to the measurement distance and the lens moving means that moves the condenser lens so as to be focused in response And second decoding means for decoding the second data area of the two-dimensional code based on the image data generated in this way.
請求項2の発明は、請求項1に記載の光学的情報読取装置において、前記第1データ領域および前記第2データ領域には誤り訂正を行うための情報が含まれることを特徴とする。 According to a second aspect of the present invention, in the optical information reading apparatus according to the first aspect, the first data area and the second data area include information for error correction.
請求項3の発明は、請求項1または2に記載の光学的情報読取装置において、前記第1データ領域は、前記二次元コードの位置を特定するための位置検出パターンの近傍に配置されることを特徴とする。 According to a third aspect of the present invention, in the optical information reading device according to the first or second aspect, the first data area is arranged in the vicinity of a position detection pattern for specifying a position of the two-dimensional code. It is characterized by.
請求項4の発明は、請求項1〜3のいずれか一項に記載の光学的情報読取装置において、前記距離測定手段は、前記測定距離を、前記二次元コードの大きさと、前記受光手段の画角と、前記画像データにおいて前記画角に対応する画角方向にて当該二次元コードが占める測定用画素数とに基づいて測定することを特徴とする。 According to a fourth aspect of the present invention, in the optical information reading device according to any one of the first to third aspects, the distance measuring unit includes the measurement distance, the size of the two-dimensional code, and the light receiving unit. The measurement is performed based on the angle of view and the number of measurement pixels occupied by the two-dimensional code in the angle of view corresponding to the angle of view in the image data.
請求項5の発明は、請求項4に記載の光学的情報読取装置において、前記測定用画素数は、前記コード領域の外縁を構成する四辺のうち前記画角方向にて対向する両辺の中央同士を当該画角方向に結ぶ線分に基づいて算出され、前記距離測定手段は、前記測定距離を、前記線分に基づき算出された測定用画素数と、前記二次元コードの大きさおよび前記画角とに基づいて測定することを特徴とする。 According to a fifth aspect of the present invention, in the optical information reading device according to the fourth aspect, the number of pixels for measurement is equal to the center of both sides facing in the field angle direction among the four sides constituting the outer edge of the code area. Is calculated based on a line segment that connects the image angle direction, and the distance measuring unit calculates the measurement distance, the number of pixels for measurement calculated based on the line segment, the size of the two-dimensional code, and the image. Measured based on the angle.
請求項6の発明は、請求項4に記載の光学的情報読取装置において、前記測定用画素数は、前記コード領域の四隅のうち近接する2つを結ぶ線分に基づいて算出され、前記距離測定手段は、前記測定距離を、前記線分に基づき算出された測定用画素数と、前記二次元コードの大きさおよび前記画角とに基づいて測定することを特徴とする。 According to a sixth aspect of the present invention, in the optical information reading device according to the fourth aspect, the number of pixels for measurement is calculated based on a line segment that connects two adjacent corners of the code area, and the distance The measuring unit measures the measurement distance based on the number of pixels for measurement calculated based on the line segment, the size of the two-dimensional code, and the angle of view.
請求項7の発明は、請求項1〜5のいずれか一項に記載の光学的情報読取装置において、前記画像データに含まれる前記コード領域を、当該二次元コードの各セルの配列方向が当該画像データの水平方向および垂直方向に等しくなるように回転して補正する補正手段を備え、前記距離測定手段は、前記測定距離を、前記補正手段により補正された前記コード領域に基づいて測定することを特徴とする。 The invention of claim 7 is the optical information reading device according to any one of claims 1 to 5, wherein the code region included in the image data is arranged in such a manner that the arrangement direction of each cell of the two-dimensional code is Correction means for rotating and correcting the image data so as to be equal to the horizontal direction and the vertical direction is provided, and the distance measurement means measures the measurement distance based on the code area corrected by the correction means. It is characterized by.
請求項8の発明は、請求項1〜7のいずれか一項に記載の光学的情報読取装置において、前記第1デコード手段によるデコードが失敗したときには、現時点における前記受光手段の被写界深度の近点側を遠点側にするように前記レンズ移動手段により前記集光レンズを移動させた後に、前記第1デコード手段によるデコードを実施することを特徴とする。 According to an eighth aspect of the present invention, in the optical information reader according to any one of the first to seventh aspects, when the decoding by the first decoding unit fails, the depth of field of the light receiving unit at the present time is reduced. Decoding by the first decoding unit is performed after the condenser lens is moved by the lens moving unit so that the near point side becomes the far point side.
請求項9の発明は、請求項8に記載の光学的情報読取装置において、前回の前記第1デコード手段によるデコードが成功したときには、前記集光レンズを移動させることなく前記第1デコード手段によるデコードを実施することを特徴とする。 According to a ninth aspect of the present invention, in the optical information reading apparatus according to the eighth aspect, when the previous decoding by the first decoding means is successful, the decoding by the first decoding means is performed without moving the condenser lens. It is characterized by implementing.
請求項1の発明では、第1デコード手段により、二次元コードを含んで生成された画像データに基づいて当該二次元コードの第1データ領域がデコードされて、当該二次元コードの大きさに関する情報が取得されると、二次元コードの大きさとこの二次元コードが画像データに占めるコード領域とに基づいて当該二次元コードまでの距離が測定される。そして、この測定距離に応じて合焦させるようにレンズ移動手段により集光レンズが移動された状態において、二次元コードの反射光を受光した受光手段からの受光結果に応じて生成された画像データに基づいて、デコード手段により、当該二次元コードの第2データ領域がデコードされる。 In the first aspect of the invention, the first decoding unit decodes the first data area of the two-dimensional code based on the image data generated including the two-dimensional code, and information on the size of the two-dimensional code. Is obtained, the distance to the two-dimensional code is measured based on the size of the two-dimensional code and the code area occupied by the two-dimensional code in the image data. Then, image data generated according to the light reception result from the light receiving means receiving the reflected light of the two-dimensional code in a state where the condenser lens is moved by the lens moving means so as to be focused according to the measurement distance Then, the second data area of the two-dimensional code is decoded by the decoding means.
このように、第1データ領域は、第2データ領域に対してセルサイズが大きいため、焦点が正確に合っていない場合でもデコード成功の可能性を高めることができる。また、二次元コードが画像データに占める割合は、当該二次元コードまでの距離に応じて変化するので、取得した二次元コードの大きさとこの二次元コードが画像データに占めるコード領域とから、当該二次元コードまでの距離を求めることができる。そして、この測定距離に応じて集光レンズを移動させることで正確に合焦させることができ、この合焦状態で生成された画像データでは、焦点が合っているので、比較的小さなセルサイズの第2データ領域であっても確実にデコードすることができる。
したがって、セルサイズの異なる2つのデータ領域を有する二次元コードからの反射光を集光レンズを介して受光手段に好適に合焦させることができる。
Thus, since the cell size of the first data area is larger than that of the second data area, it is possible to increase the possibility of successful decoding even when the focus is not accurately achieved. Further, since the ratio of the two-dimensional code to the image data changes according to the distance to the two-dimensional code, the size of the acquired two-dimensional code and the code area occupied by the two-dimensional code in the image data The distance to the two-dimensional code can be obtained. The focusing lens can be accurately focused by moving the focusing lens according to the measurement distance, and the image data generated in this focused state is in focus, so a relatively small cell size. Even the second data area can be reliably decoded.
Therefore, the reflected light from the two-dimensional code having two data areas having different cell sizes can be suitably focused on the light receiving means via the condenser lens.
請求項2では、第1データ領域および第2データ領域には誤り訂正を行うための情報が含まれているため、各データ領域の一部が汚れの付着等などにより誤った情報となる場合であっても、誤り訂正情報に基づいて訂正することができるので、当該二次元コードに対する読取精度を向上させることができる。 In claim 2, since the information for performing error correction is included in the first data area and the second data area, a part of each data area becomes erroneous information due to contamination or the like. Even if it exists, since it can correct based on error correction information, the reading precision with respect to the said two-dimensional code can be improved.
請求項3では、第1データ領域は、二次元コードの位置を特定するための位置検出パターンの近傍に配置される。位置検出パターンを基準に各セルの位置が検出されるため、第1データ領域を位置検出パターンの近傍に配置することで、第1データ領域の位置検出精度が高まるので、当該二次元コードに対する読取精度を向上させることができる。 According to a third aspect of the present invention, the first data area is arranged in the vicinity of the position detection pattern for specifying the position of the two-dimensional code. Since the position of each cell is detected on the basis of the position detection pattern, the accuracy of position detection of the first data area is increased by arranging the first data area in the vicinity of the position detection pattern. Accuracy can be improved.
請求項4では、距離測定手段により、二次元コードまでの測定距離が、二次元コードの大きさと、受光手段の画角と、画像データにおいて画角に対応する画角方向にて当該二次元コードが占める測定用画素数とに基づいて測定される。特定の画角方向において、測定用画素数と実際の二次元コードの長さとの比は、当該特定の画角方向での画像データの外縁間の画素数と二次元コードの位置での上記外縁間に相当する実際の長さ(以下、外縁間長さともいう)との比に等しくなる。この外縁間長さは、二次元コードまでの測定距離と受光手段の画角とにより一義的に決まるので、二次元コードの大きさと受光手段の画角と測定用画素数とに基づいて、二次元コードまでの測定距離を正確に測定することができる。 According to a fourth aspect of the present invention, the distance measuring means measures the distance to the two-dimensional code in the two-dimensional code size, the angle of view of the light receiving means, and the angle of view corresponding to the angle of view in the image data. Is measured on the basis of the number of pixels for measurement. In a specific angle of view direction, the ratio between the number of pixels for measurement and the actual length of the two-dimensional code is the number of pixels between the outer edges of the image data in the specific angle of view direction and the outer edge at the position of the two-dimensional code. It is equal to the ratio to the actual length corresponding to the interval (hereinafter also referred to as the length between the outer edges). Since the length between the outer edges is uniquely determined by the measurement distance to the two-dimensional code and the angle of view of the light receiving means, it is determined based on the size of the two-dimensional code, the angle of view of the light receiving means, and the number of pixels for measurement. The measurement distance to the dimension code can be accurately measured.
請求項5では、上記測定用画素数は、コード領域の外縁を構成する四辺のうち画角方向にて対向する両辺の中央同士を当該画角方向に結ぶ線分に基づいて算出される。受光手段に対して二次元コードが傾斜していると、画像データにはコード領域が歪んだ状態で含まれることとなる。そこで、上記線分に基づいて測定用画素数を算出することで、例えば上述のように対向する両辺の端部同士を結ぶ線分に基づいて測定用画素数を算出する場合と比較して歪みの影響が抑制されるので、コード領域の歪みに起因する測定距離の測定精度の低下を抑制することができる。 According to a fifth aspect of the present invention, the number of pixels for measurement is calculated based on a line segment that connects the centers of both sides facing each other in the field angle direction among the four sides constituting the outer edge of the code area. If the two-dimensional code is inclined with respect to the light receiving means, the image data will be included in a distorted state of the code area. Therefore, by calculating the number of pixels for measurement based on the above line segment, for example, as compared with the case where the number of pixels for measurement is calculated based on the line segment connecting the ends of both sides facing each other as described above, Therefore, it is possible to suppress a decrease in the measurement accuracy of the measurement distance due to the distortion of the code area.
請求項6では、上記測定用画素数は、コード領域の四隅のうち近接する2つを結ぶ線分に基づいて算出される。これにより、二次元コードの各セルの配列方向の双方が当該画像データの水平方向および垂直方向に対して傾いている状態(以下、回転状態ともいう)であっても、上記線分、すなわち、当該二次元コードの一辺に相当する画素数に基づいて上記測定用画素数を容易に算出することができる。 According to a sixth aspect of the present invention, the number of pixels for measurement is calculated based on a line segment connecting two adjacent corners of the code area. As a result, even when both the arrangement directions of the cells of the two-dimensional code are inclined with respect to the horizontal direction and the vertical direction of the image data (hereinafter, also referred to as a rotation state), the line segment, that is, The number of pixels for measurement can be easily calculated based on the number of pixels corresponding to one side of the two-dimensional code.
請求項7では、画像データに含まれるコード領域を、当該二次元コードの各セルの配列方向が当該画像データの水平方向および垂直方向に等しくなるように回転して補正するため、画像データにおいて画角に対応する画角方向が二次元コードの各セルの配列方向の一方に一致する。これにより、コード領域の大きさが画素数を用いることで求めやすくなるので、二次元コードまでの測定距離を正確に測定することができる。 According to the seventh aspect of the present invention, since the code area included in the image data is corrected by rotating so that the arrangement direction of the cells of the two-dimensional code is equal to the horizontal direction and the vertical direction of the image data, The field angle direction corresponding to the corner coincides with one of the array directions of the cells of the two-dimensional code. Thereby, since the size of the code area can be easily obtained by using the number of pixels, the measurement distance to the two-dimensional code can be accurately measured.
請求項8では、第1デコード手段によるデコードが失敗したときには、現時点における受光手段の被写界深度の近点側を遠点側にするようにレンズ移動手段により集光レンズを移動させた後に、第1デコード手段によるデコードを実施する。このように焦点が合っていないために第1デコード手段によるデコードが失敗する場合には、被写界深度を遠点側から近点側に変化させるように集光レンズを移動させることで、集光レンズをランダムに移動させたり近点側から遠点側へ徐々に移動させる場合と比較して、焦点を合わせるための時間および集光レンズの移動回数を低減することができる。 In claim 8, when the decoding by the first decoding unit fails, after moving the condenser lens by the lens moving unit so that the near point side of the depth of field of the light receiving unit at the present time is the far point side, Decoding is performed by the first decoding means. If the decoding by the first decoding means fails due to out of focus in this way, the condenser lens is moved so as to change the depth of field from the far point side to the near point side. Compared with the case where the optical lens is moved randomly or gradually moved from the near point side to the far point side, the time for focusing and the number of movements of the condenser lens can be reduced.
請求項9の発明のように、前回の第1デコード手段によるデコードが成功したときには、現時点でもセルサイズが大きな第1データ領域を読み取れる焦点である可能性が高いので、請求項8の発明のように集光レンズを移動させることなく第1デコード手段によるデコードを実施してもよい。これにより、不要な集光レンズの移動をなくすことができる。 As in the ninth aspect of the present invention, when the previous decoding by the first decoding means is successful, there is a high possibility that the first data area having a large cell size can be read at the present time. Decoding by the first decoding means may be performed without moving the condenser lens. Thereby, unnecessary movement of the condenser lens can be eliminated.
以下、本発明の光学的情報読取装置を具現化した一実施形態について、図面を参照して説明する。
図1に示すように、光学的情報読取装置10は、後述するQRコード(登録商標)等の二次元コードを光学的に読み取る携帯型の読取装置として構成されている。この光学的情報読取装置10は、筐体(図示略)の内部に回路部20が収容されてなるものであり、回路部20は、主に、照明光源21、受光センサ28、結像レンズ27等の光学系と、メモリ35、制御回路40等のマイクロコンピュータ(以下「マイコン」という)系と、から構成されている。
DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, an embodiment of an optical information reading device according to the invention will be described with reference to the drawings.
As shown in FIG. 1, the
光学系は、投光光学系と、受光光学系とに分かれている。投光光学系を構成する照明光源21は、照明光Lfを発光可能な照明光源として機能するもので、例えば、赤色のLEDとこのLEDの出射側に設けられるレンズとから構成されている。なお、図1では、QRコード50が表示された読取対象Rに向けて照明光Lfを照射する例を概念的に示している。
The optical system is divided into a light projecting optical system and a light receiving optical system. The
受光光学系は、受光センサ28、結像レンズ27、反射鏡(図示略)などによって構成されている。受光センサ28は、画素数が640×480(VGA)のCCDエリアセンサとして構成されるものであり、QRコード50または読取対象Rに照射されて反射した反射光Lrを受光可能に構成されている。この受光センサ28は、結像レンズ27を介して入射する入射光を受光可能にプリント配線板(図示略)に実装されている。なお、受光センサ28は、特許請求の範囲に記載の「受光手段」の一例に相当し得るものである。
The light receiving optical system includes a
結像レンズ27は、外部から読取口13を介して入射する入射光を集光して受光センサ28の受光面28aに像を結像可能な集光レンズとして機能するものである。本実施形態では、照明光源21から照射された照明光LfがQRコード50にて反射した後、この反射光Lrを結像レンズ27で集光し、受光センサ28の受光面28aにコード像を結像させている。
The
この結像レンズ27は、レンズ移動機構29により受光センサ28の光軸Lに沿い移動可能に支持されている。レンズ移動機構29は、図略のモータ等により構成されて、制御回路40からの駆動信号に応じて結像レンズ27を所定量光軸方向に移動させる機能を有する。なお、結像レンズ27およびレンズ移動機構29は、特許請求の範囲に記載の「集光レンズ」および「レンズ移動手段」の一例に相当し得るものである。
The
また、上述したマイコン系は、増幅回路31、A/D変換回路33、メモリ35、アドレス発生回路36、同期信号発生回路38、制御回路40、発光部43、ブザー44、バイブレータ45、液晶表示器46、通信インタフェース48等から構成されている。
The microcomputer system described above includes an
光学系の受光センサ28から出力される画像信号(アナログ信号)は、増幅回路31に入力されることで所定の増幅率で増幅された後、A/D変換回路33に入力されると、アナログ信号からディジタル信号に変換される。そして、ディジタル化された画像信号、つまり画像データ(画像情報)は、生成されてメモリ35に入力されると、所定のコード画像情報格納領域に蓄積される。なお、同期信号発生回路38は、受光センサ28およびアドレス発生回路36に対する同期信号を発生可能に構成されており、またアドレス発生回路36は、この同期信号発生回路38から供給される同期信号に基づいて、メモリ35に格納される画像データの格納アドレスを発生可能に構成されている。
The image signal (analog signal) output from the
メモリ35は、半導体メモリ装置で、例えばRAM(DRAM、SRAM等)やROM(EPROM、EEPROM等)がこれに相当する。このメモリ35のうちのRAMには、前述した画像データ蓄積領域のほかに、制御回路40が算術演算や論理演算等の各処理時に利用する作業領域や読取条件テーブルなども確保されるようになっている。またROMには、後述する読取処理等を実行可能な所定のプログラムや、照明光源21、受光センサ28等の各ハードウェアを制御可能なシステムプログラムなどが予め格納されている。
The
制御回路40は、光学的情報読取装置10全体を制御可能なマイコンで、CPU、システムバス、入出力インタフェース等からなるもので、メモリ35とともに情報処理装置を構成し得るもので情報処理機能を有する。この制御回路40は、内蔵された入出力インタフェースを介して種々の入出力装置と接続可能に構成されており、本実施形態の場合、発光部43、ブザー44、バイブレータ45、液晶表示器46、通信インタフェース48等が接続されている。
The
これにより、制御回路40は、例えば、QRコード50の読み取りに関する情報を通知するインジケータとして機能する発光部43の点灯・消灯、ビープ音やアラーム音を発生可能なブザー44の鳴動のオンオフ、当該光学的情報読取装置10の作業者に伝達し得る振動を発生可能なバイブレータ45の駆動制御、液晶表示器46の表示制御や外部装置とのシリアル通信を可能にする通信インタフェース48の通信制御等を可能にしている。なお、通信インタフェース48に接続される外部装置には、当該光学的情報読取装置10の上位システムに相当するホストコンピュータ等が含まれる。
Thereby, for example, the
次に、読取対象であるQRコード50の構成について以下に説明する。
図2に示すように、QRコード50は、複数の情報表示単位セル(以下、単にセルとも称する)が集合したセル集合体として構成されている。図2では、各セルが2種類のセル(明色セルおよび暗色セル)のうちのいずれかとされており、各セル領域が正方形領域として構成されている。そして、このようなセルがマトリックス状に配置されることで、セルが配置される領域全体が矩形領域として構成されている。具体的には、QRコード50は、3つの位置検出パターン51a,51b,51c、アライメントパターン52、タイミングセル53a,53b、フォーマットコード54およびデータ領域60などから構成されている。
Next, the configuration of the
As shown in FIG. 2, the
データ領域60は、複数のセルから構成される第1データ領域61と、この第1データ領域61を構成するセルをn分割した小さなセルサイズのセルから構成される第2データ領域62とが図2に例示する所定の位置に配置されるように構成されている。ここで、第2データ領域62で用いられているデータセルのセルサイズは、第1データ領域61に用いられているデータセルのセルサイズを縦横それぞれ2分割するように設定されている。また、QRコード50全体のサイズは、第1データ領域61で用いられているデータセルを基準として、25セル×25セルの正方形状とされている。なお、図2では、便宜上、ハッチング領域で第1データ領域61が配置される領域を示し、白領域で第2データ領域62が配置される領域を示しており、各データ領域61,62での本来の明色セルおよび暗色セルの記載を省略している。また、第1データ領域61および第2データ領域62は、特許請求の範囲に記載の「第1データ領域」および「第2データ領域」の一例に相当し得る。
The
具体的には、第1データ領域61は、QRコード50の大きさに関する情報、例えば、QRコード50の一辺の長さの情報や、第2データ領域62の第1データ領域61に対する分割数などの所定の情報が含まれるように、複数の明色セルおよび暗色セルから構成されている。なお、QRコード50の大きさに関する情報としては、例えば、単位セルの大きさに関する情報であってもよい。
Specifically, the
また、第2データ領域62は、当該QRコード50に要求される必要な情報が含まれるように複数の明色セルおよび暗色セルから構成されている。そのため、第2データ領域62の分割数を多くすることで第2データ領域62に含まれる情報量、すなわち、QRコード50に含まれる情報量を多くすることができる。この第2データ領域62には、後述する誤り訂正を行うための誤り訂正領域も含まれているものとする。
The second data area 62 is composed of a plurality of light cells and dark cells so that necessary information required for the
また、各位置検出パターン51a,51b,51cは、QRコード50の4つの頂点のうち、3つに配置されており、所定のパターンに応じて第1データ領域61にて採用されるセルサイズと同じ大きさのデータセルにて構成されている。また、アライメントパターン52は、図2に示すごとく、データ領域60の内部に配置されており、所定のパターンに応じて第1データ領域61にて採用されるセルサイズと同じ大きさのデータセルにて構成されている。
Each of the
また、タイミングセル53a,53bは、位置検出パターン51a,51b,51c間に配置されており、第1データ領域61にて採用されるセルサイズと同じ大きさのデータセルにて構成されている。このタイミングセル53a,53bは、明色セルおよび暗色セルが交互に組み合わせられた各データセル位置の指標となる基準パターンとして用いられる。
The
また、フォーマットコード54は、位置検出パターン51aの近傍に配置されており、所定のパターンに応じて第1データ領域61にて採用されるセルサイズと同じ大きさのデータセルにて構成されている。このフォーマットコード54は、第1データ領域61および第2データ領域62についての存在領域、使用しているコード種類、セルサイズ等が特定可能な内容となっている。
The
次に、本実施形態に係る光学的情報読取装置10において、上述のように構成されるQRコード50を光学的に読み取る読取処理について、図3および図4に示すフローチャートを用いて説明する。
Next, reading processing for optically reading the
まず、電源が投入されて所定の初期設定等が実施されると、図3のステップS101において、前回のデコードが成功したか否かについて判定される。ここで、前回のデコードが成功していなければ(S101でNo)、ステップS103にてレンズ移動処理がなされて、後述する所定の遠方の位置に焦点を合わせるように駆動信号がレンズ移動機構29に出力されて結像レンズ27が移動する。
First, when the power is turned on and predetermined initial setting or the like is performed, it is determined in step S101 in FIG. 3 whether or not the previous decoding has succeeded. If the previous decoding is not successful (No in S101), lens movement processing is performed in step S103, and a drive signal is sent to the
前回のデコードが成功であるか(S101でYes)、ステップS103にて結像レンズ27が移動されると、ステップS105にて画像データ生成処理がなされる。この処理では、作業者が照明光源21からの照明光Lfを読取対象であるQRコード50に向けることで、QRコード50にて反射した反射光Lrが結像レンズ27を介して受光センサ28にて受光されると、この受光結果に基づいて画像データが生成される。なお、ステップS105および後述するステップS127を実行する制御回路40は、特許請求の範囲に記載の「生成手段」の一例に相当し得る。
If the previous decoding is successful (Yes in S101) or if the
続いて、ステップS107にて、上述のように生成された画像データから位置検出パターン51a,51b,51cが検出されるか否かについて判定される。ここで、焦点が合っていないために位置検出パターン51a,51b,51cが検出されない場合には(S107でNo)、ステップS109にて被写界深度調整処理がなされる。この処理では、現時点における受光センサ28の被写界深度の近点(以下、近点被写界深度Dnともいう)を新たな被写界深度の遠点(以下、遠点被写界深度Dfともいう)に一致させるように、駆動信号がレンズ移動機構29に出力される。これにより、レンズ移動機構29は、制御回路40からの駆動信号に基づいて受光センサ28の光軸Lに沿い被写界深度が近点側に変化するように結像レンズ27を移動させる。
Subsequently, in step S107, it is determined whether or not the
ここで、上述した遠点被写界深度Dfおよび近点被写界深度Dnは、以下の式により演算される。
Df=X×(H−f)/(H+X−2×f) ・・・(1)
Dn=X×(H−f)/(H−X) ・・・(2)
ここで、Hは、f2/(F×d)で表される係数、fは、レンズの焦点距離、Fは、絞りである。また、dは、許容錯乱円(ぼけ量)であり、デコード可能な最小分解能(読み取りに必要なセルの最小割当て画素)から決定される。
Here, the far point depth of field Df and the near point depth of field Dn described above are calculated by the following equations.
Df = X × (H−f) / (H + X−2 × f) (1)
Dn = X × (H−f) / (H−X) (2)
Here, H is a coefficient represented by f 2 / (F × d), f is a focal length of the lens, and F is a stop. Further, d is an allowable circle of confusion (amount of blur), and is determined from the minimum resolvable resolution (the minimum allocated pixel of the cell necessary for reading).
このように、結像レンズ27を移動させた後に、再度ステップS105からの処理がなされ、位置検出パターン51a,51b,51cが検出されるまで、ステップ109における処理が繰り返される。
As described above, after the
ここで、ステップS109における被写界深度調整処理について、図5を用いて説明する。図5に示すように、ステップS103にて焦点を合わせた所定の遠方の位置をP1点とすると、最初のステップS109では、このP1点で焦点を合わせた近点被写界深度Dn1が遠点被写界深度Df2となるP2点に焦点を合わせるように駆動信号がレンズ移動機構29に出力されて結像レンズ27が移動する。この焦点位置で位置検出パターン51a,51b,51cが検出されない場合には、再びステップS109にて、P2点で焦点を合わせた近点被写界深度Dn2が遠点被写界深度Df3となるP3点に焦点を合わせるように駆動信号がレンズ移動機構29に出力されて結像レンズ27が移動する。この焦点位置でも位置検出パターン51a,51b,51cが検出されない場合には、さらにステップS109にて、P3点で焦点を合わせた近点被写界深度Dn3が遠点被写界深度Df4となるP4点に焦点を合わせるように駆動信号がレンズ移動機構29に出力されて結像レンズ27が移動する。
Here, the depth-of-field adjustment process in step S109 will be described with reference to FIG. As shown in FIG. 5, when a predetermined distant position focused at step S103 and a point P, in first step S109, a near point the depth of field focussed by the P 1 point Dn 1 A drive signal is output to the
上述のように結像レンズ27を移動させて被写界深度を調整することにより位置検出パターン51a,51b,51cが検出されると(S107でYes)、ステップS111において、第1デコード処理がなされる。この処理では、位置検出パターン51a,51b,51cやフォーマットコード54等に応じて、データ領域60では大きなセルサイズの第1データ領域61についてデコード処理がなされて、QRコード50の大きさに関する情報等が取得される。この段階では、位置検出パターン51a,51b,51cを検出できる程度に焦点が合っているので、同じセルサイズの第1データ領域61を確実にデコードすることができる。なお、ステップS111を実行する制御回路40は、特許請求の範囲に記載の「第1デコード手段」の一例に相当し得る。
When the
次に、ステップS113にて、画像データにおいてQRコード50が占める領域(以下、コード領域という)での各セルの配列方向の双方が当該画像データの水平方向(画角βに対応する画角方向)に対して傾いている回転状態であるか否かについて判定される。ここで、コード領域での両配列方向のいずれかが当該画像データの水平方向に等しく回転状態でない場合には(S113でNo)、ステップS115にてコード領域が歪んでいるか否かについて判定される。ここで、コード領域が正方形状であって歪んでいなければ、ステップS115にてNoと判定される。
Next, in step S113, the arrangement direction of each cell in the area occupied by the
そして、ステップS117において、第1測定用画素数検出処理がなされる。この処理では、図6に例示するように、ステップS105にて生成された画像データにおいて、受光センサ28の画角βに対応する画角方向にて当該QRコード50が占める画素数(以下、測定用画素数Nという)が検出される。なお、本実施形態では、画角βに対応する画角方向は水平方向に設定されており、画角βは、例えば、30°に設定されている。また、測定用画素数Nは、特許請求の範囲に記載の「測定用画素数」の一例に相当し得るものである。
In step S117, a first measurement pixel number detection process is performed. In this process, as exemplified in FIG. 6, in the image data generated in step S105, the number of pixels occupied by the
一方、上述したステップS113において、図7に例示するようにコード領域が回転状態である場合には(S113でYes)、ステップS119にて第2測定用画素数検出処理がなされる。この処理では、コード領域の四隅のうち近接する2つを結ぶ線分に基づいて、測定用画素数Nが検出される。具体的には、図7に示すように、画像データにおいてコード領域の四隅のうち近接する2つの位置に応じて水平方向の画素数Nxと垂直方向の画素数Nyとを検出することで、コード領域の外縁の一辺に対応する線分における測定用画素数Nが算出される。 On the other hand, in step S113 described above, when the code area is in a rotated state as illustrated in FIG. 7 (Yes in S113), the second measurement pixel number detection process is performed in step S119. In this process, the number N of measurement pixels is detected based on a line segment connecting two adjacent corners of the four corners of the code area. Specifically, as shown in FIG. 7, by detecting the number of pixels Nx in the horizontal direction and the number of pixels Ny in the vertical direction according to two adjacent positions in the four corners of the code area in the image data, The number N of measurement pixels in the line segment corresponding to one side of the outer edge of the region is calculated.
また、上述したステップS115において、図8(A)に例示するように、コード領域の外縁を構成する四辺のうち水平方向(画角方向)にて対向する両辺を水平方向に沿い結ぶ線分の長さが垂直方向一側ほど小さく(大きく)なっていることから、コード領域が歪んでいると判定される場合には、Yesと判定される。そして、ステップS119において、第3測定用画素数検出処理がなされる。この処理では、コード領域の水平方向にて対向する両辺の中央同士を当該水平方向(画角方向)に結ぶ線分に基づいて、上述した測定用画素数Nが検出される。具体的には、図8(A)におけるe点とf点とを結ぶ線分に基づいて測定用画素数Nが算出されることとなる。 In step S115 described above, as illustrated in FIG. 8A, among the four sides constituting the outer edge of the code area, a line segment connecting both sides facing each other in the horizontal direction (field angle direction) along the horizontal direction. Since the length is smaller (larger) on one side in the vertical direction, when it is determined that the code area is distorted, Yes is determined. In step S119, a third measurement pixel number detection process is performed. In this process, the number N of measurement pixels described above is detected based on a line segment connecting the centers of both sides facing each other in the horizontal direction of the code area in the horizontal direction (field angle direction). Specifically, the number N of measurement pixels is calculated based on a line segment connecting the points e and f in FIG.
ここで、上述のように測定用画素数Nを算出する理由について説明する。
受光センサ28に対してQRコード50が傾斜していると、画像データにはコード領域が歪んだ状態で含まれることとなる。そこで、上記線分に基づいて測定用画素数Nを算出することで、例えば上述のように対向する両辺の端部同士を結ぶ線分(図8(A)におけるa点とb点とを結ぶ線分やc点とd点とを結ぶ線分)に基づいて測定用画素数を算出する場合と比較して歪みの影響が抑制することができる。
Here, the reason for calculating the number N of measurement pixels as described above will be described.
When the
なお、画角方向が垂直方向である場合には、図8(B)に例示するように、コード領域の垂直方向にて対向する両辺を垂直方向に沿い結ぶ線分の長さが水平方向一側ほど小さく(大きく)なっていることから、コード領域が歪んでいると判定され、このとき、コード領域の垂直方向にて対向する両辺の中央同士を当該垂直方向(画角方向)に結ぶ線分に基づいて、上述した測定用画素数Nが検出される。具体的には、図8(B)におけるe点とf点とを結ぶ線分に基づいて測定用画素数Nが算出されることとなる。 When the angle of view is the vertical direction, as illustrated in FIG. 8B, the length of the line segment connecting the opposite sides in the vertical direction of the code area along the vertical direction is equal to the horizontal direction. Since it is smaller (larger) toward the side, it is determined that the code area is distorted. At this time, a line connecting the centers of both sides facing each other in the vertical direction of the code area in the vertical direction (view angle direction) Based on the minutes, the above-described measurement pixel number N is detected. Specifically, the number N of measurement pixels is calculated based on a line segment connecting the points e and f in FIG.
次に、図4のステップS123において、画像データ内のQRコード50が占める領域の大きさを利用して、距離測定処理がなされる。特定の画角方向において、測定用画素数Nと実際のQRコード50の長さYとの比は、当該特定の画角方向での画像データの外縁間の画素数とQRコード50の位置での上記外縁間に相当する実際の長さ(以下、外縁間長さYaともいう)との比に等しくなる。この外縁間長さYaは、QRコード50までの距離Xと受光センサ28の画角βとにより一義的に決まるので、QRコード50の長さYと受光センサ28の画角βと測定用画素数Nとに基づいて、QRコード50までの距離Xを測定することができる。
Next, in step S123 of FIG. 4, a distance measurement process is performed using the size of the area occupied by the
具体的には、特定の画角方向が水平方向(図6で上下方向)である場合に、この画角方向での画像データの外縁間の画素数は640であることから、図6に例示するように、以下の式3,4の関係が成立する。
Ya:Y=640:N ・・・(3)
Ya=2×X×tan(β/2) ・・・(4)
そこで、上記式3,4の関係からYaを消去することで、距離Xに関する以下の式5が成立する。
X=(320×Y)/(N×tan(β/2)) ・・・(5)
したがって、上記距離測定処理では、上記式5により、ステップS111にて取得したQRコード50の一辺の長さYと、ステップS117〜121のいずれかにて検出された測定用画素数Nとに基づいて、QRコード50までの距離Xが演算される。なお、ステップS123を実行する制御回路40は、特許請求の範囲に記載の「距離測定手段」の一例に相当し、距離Xは、特許請求の範囲に記載の「測定距離」の一例に相当し得るものである。
Specifically, when the specific field angle direction is the horizontal direction (vertical direction in FIG. 6), the number of pixels between the outer edges of the image data in this field angle direction is 640. Thus, the following expressions 3 and 4 are satisfied.
Ya: Y = 640: N (3)
Ya = 2 × X × tan (β / 2) (4)
Therefore, by eliminating Ya from the relationship of the above expressions 3 and 4, the following expression 5 regarding the distance X is established.
X = (320 × Y) / (N × tan (β / 2)) (5)
Therefore, in the distance measurement process, the length Y of one side of the
上述のようにステップS123にて距離Xが測定されると、ステップS125にて合焦処理がなされ、ステップS123にて演算された距離Xに応じて合焦させるように駆動信号がレンズ移動機構29に出力される。これにより、レンズ移動機構29は、制御回路40からの駆動信号に基づいて受光センサ28の光軸Lに沿い結像レンズ27を移動させて合焦させる。そして、ステップS127にて画像データ生成処理がなされて、焦点のあった新たな画像データが生成された後に、ステップS129にて第2デコード処理がなされる。この処理では、比較的小さなセルサイズの第2データ領域62についてデコード処理がなされて、必要な情報が取得される。この段階では、測定された距離Xに応じて合焦されているので、小さなセルサイズの第2データ領域62であっても確実にデコードすることができる。なお、ステップS129を実行する制御回路40は、特許請求の範囲に記載の「第2デコード手段」の一例に相当し得る。
As described above, when the distance X is measured in step S123, focusing processing is performed in step S125, and the driving signal is sent to the
続いて、ステップS131にて誤り訂正処理がなされ、公知の誤り訂正方法により、上記ステップS129にてデコードができなかった情報領域に対して誤り訂正を実施する処理がなされる。そして、デコード処理が成功した場合には(S133でYes)、当該読取処理を終了し、デコード処理が失敗した場合には(S133でNo)、上記ステップS127からの処理が繰り返される。 Subsequently, error correction processing is performed in step S131, and error correction processing is performed on the information area that could not be decoded in step S129 by a known error correction method. If the decoding process is successful (Yes in S133), the reading process is terminated. If the decoding process is unsuccessful (No in S133), the processes from Step S127 are repeated.
以上説明したように、本実施形態に係る光学的情報読取装置10では、QRコード50を含んで生成された画像データに基づいて当該QRコード50の第1データ領域61がデコードされて、当該QRコード50の大きさに関する情報が取得されると、QRコード50の大きさとこのQRコード50が画像データに占めるコード領域とに基づいて当該QRコード50までの距離Xが測定される。そして、この距離Xに応じて合焦させるように結像レンズ27が移動された状態において、QRコード50の反射光を受光した受光センサ28からの受光結果に応じて生成された画像データに基づいて、当該QRコード50の第2データ領域62がデコードされる。
As described above, in the optical
このように、第1データ領域61は、第2データ領域62に対してセルサイズが大きいため、焦点が正確に合っていない場合でもデコード成功の可能性を高めることができる。また、第1データ領域61のデコードにより取得したQRコード50の大きさとこのQRコード50が画像データに占めるコード領域とから当該QRコード50までの距離Xを求め、この距離Xに応じて結像レンズ27を移動させることで正確に合焦させることができる。この合焦状態で生成された画像データでは、焦点が合っているので、比較的小さなセルサイズの第2データ領域62であっても確実にデコードすることができる。
したがって、セルサイズの異なる2つのデータ領域61,62を有するQRコード50からの反射光Lrを結像レンズ27を介して受光センサ28に好適に合焦させることができる。
Thus, since the cell size of the
Therefore, the reflected light Lr from the
また、本実施形態に係る光学的情報読取装置10では、第2データ領域62には誤り訂正を行うための情報が含まれているため、第2データ領域62の一部が汚れの付着等などにより誤った情報となる場合であっても、誤り訂正情報に基づいて訂正することができるので、当該QRコード50に対する読取精度を向上させることができる。なお、第1データ領域61に誤り訂正を行うための情報が含まれる場合も同様の効果を奏する。
Further, in the optical
さらに、本実施形態に係る光学的情報読取装置10では、QRコード50までの距離Xが、QRコード50の一辺の長さYと、受光センサ28の画角βと、測定用画素数Nとを用いることで正確に測定することができる。
Furthermore, in the optical
さらにまた、本実施形態に係る光学的情報読取装置10では、コード領域が歪んでいる場合、上記測定用画素数Nは、コード領域の外縁を構成する四辺のうち画角方向にて対向する両辺の中央同士を当該画角方向に結ぶ線分に基づいて算出される。これにより、例えば対向する両辺の端部同士を結ぶ線分に基づいて測定用画素数を算出する場合と比較して、そのコード領域の歪みに起因する距離Xの測定精度の低下を抑制することができる。
Furthermore, in the optical
また、本実施形態に係る光学的情報読取装置10では、コード領域が回転状態である場合には、測定用画素数Nは、コード領域の四隅のうち近接する2つを結ぶ線分に基づいて算出されるので、回転状態のQRコード50であってもその一辺に相当する画素数に基づいて上記測定用画素数Nを容易に算出することができる。
Further, in the optical
さらに、本実施形態に係る光学的情報読取装置10では、第1デコード処理によるデコードが失敗したときには、現時点における受光センサ28の被写界深度の近点側を遠点側にするように結像レンズ27を移動させた後に、再度第1デコード処理を実施する。このように焦点が合っていないために第1デコード処理が失敗する場合には、被写界深度を遠点側から近点側に変化させるように結像レンズ27を移動させることで、結像レンズ27をランダムに移動させたり近点側から遠点側へ徐々に移動させる場合と比較して、焦点を合わせるための時間および結像レンズ27の移動回数を低減することができる。特に、読取対象がQRコード50等の二次元コードであるため、被写体の状態が予測困難な通常のカメラ等と異なり、ぼけ量(許容錯乱円d)が予め分かっているので、精度良く被写界深度を演算することができる。
Further, in the
さらにまた、本実施形態に係る光学的情報読取装置10では、前回の第1デコード処理が成功したときには、現時点でもセルサイズが大きな第1データ領域61を読み取れる焦点である可能性が高いので、ステップS103における結像レンズ27を移動させることなく第1デコード処理を実施する。これにより、不要な結像レンズ27の移動をなくすことができる。
Furthermore, in the optical
本実施形態の変形例として、図9に例示するように、第1データ領域61を、位置検出パターン51aの近傍に配置してもよい。これにより、位置検出パターン51aを基準に各セルの位置が検出されるため、第1データ領域61を位置検出パターン51aの近傍に配置することで、第1データ領域61の位置検出精度が高まるので、当該QRコード50に対する読取精度を向上させることができる。また、第1データ領域61を、位置検出パターン51b,51cの近傍に配置しても同様の効果を奏する。
As a modification of the present embodiment, as illustrated in FIG. 9, the
なお、本発明は上記実施形態に限定されるものではなく、以下のように具体化してもよく、その場合でも、上記実施形態と同等の作用・効果が得られる。
(1)受光センサ28として、画素数が640×480(VGA)のセンサを採用することに限らず、この画素数と異なる仕様の受光センサを採用してもよい。この場合、ステップS123における距離測定処理では、この受光センサの画素数に基づいて距離Xが演算されることになる。
In addition, this invention is not limited to the said embodiment, You may actualize as follows, and even in that case, an effect | action and effect equivalent to the said embodiment are acquired.
(1) The
(2)第2データ領域62で用いられているデータセルのセルサイズは、第1データ領域61に用いられているデータセルのセルサイズを縦横それぞれ2分割するように設定されることに限らず、第2データ領域62の情報量を多くするために、例えば、縦横それぞれ4分割するように設定されてもよい。この場合、この分割情報は、第1データ領域61またはフォーマットコード54等から特定されてもよい。
(2) The cell size of the data cell used in the second data area 62 is not limited to being set to divide the cell size of the data cell used in the
(3)上記ステップS119では、コード領域における両配列方向の一方が当該画像データの水平方向(画角βに対応する画角方向)に一致するように、当該コード領域を回転補正した後に、測定用画素数Nを測定してもよい。これにより、コード領域における配列方向、すなわち、QRコード50の一辺の長さYに対応する方向と、受光センサ28の画角βに対応する画角方向とが一致するので、容易に測定用画素数Nを測定することができる。また、上述のようにコード領域を回転補正した後に、ステップS115における処理を実施することで、コード領域の回転状態と歪み状態の双方の影響をなくすことができる。
(3) In step S119, the measurement is performed after the code area is rotationally corrected so that one of the two arrangement directions in the code area coincides with the horizontal direction of the image data (the angle of view corresponding to the angle of view β). The number of pixels N may be measured. As a result, the arrangement direction in the code area, that is, the direction corresponding to the length Y of one side of the
10…光学的情報読取装置
27…結像レンズ(集光レンズ)
28…受光センサ(受光手段)
29…レンズ移動機構(レンズ移動手段)
40…制御回路(生成手段、距離測定手段、第1デコード手段,第2デコード手段)
50,50a…QRコード(二次元コード)
60…データ領域
61…第1データ領域
62…第2データ領域
Df…遠点被写界深度
Dn…近点被写界深度
L…光軸
Lr…反射光
N…測定用画素数
X…距離(測定距離)
β…画角
DESCRIPTION OF
28. Light receiving sensor (light receiving means)
29 ... Lens moving mechanism (lens moving means)
40. Control circuit (generating means, distance measuring means, first decoding means, second decoding means)
50, 50a ... QR code (two-dimensional code)
60 ...
β ... Angle of view
Claims (9)
前記第1データ領域には前記二次元コードの大きさに関する情報が含まれており、
前記二次元コードから反射されて集光レンズにて集光された反射光を受光する受光手段と、
前記受光手段による受光結果に基づいて画像データを生成する生成手段と、
前記生成手段により前記二次元コードを含んで生成された前記画像データに基づいて当該二次元コードの前記第1データ領域をデコードする第1デコード手段と、
前記第1デコード手段により取得された前記二次元コードの大きさとこの二次元コードが前記画像データに占めるコード領域とに基づいて当該二次元コードまでの距離を測定する距離測定手段と、
前記距離測定手段により測定された測定距離に応じて合焦させるように前記集光レンズを移動させるレンズ移動手段と、
前記測定距離に応じて合焦させた状態において前記二次元コードの反射光を受光した前記受光手段からの受光結果に応じて生成された画像データに基づいて当該二次元コードの前記第2データ領域をデコードする第2デコード手段と、
を備えることを特徴とする光学的情報読取装置。 An optical information reader for optically reading a two-dimensional code having a first data area composed of a plurality of cells and a second data area composed of cells smaller than the cells constituting the first data area There,
The first data area includes information on the size of the two-dimensional code,
A light receiving means for receiving reflected light reflected from the two-dimensional code and collected by a condenser lens;
Generating means for generating image data based on a light reception result by the light receiving means;
First decoding means for decoding the first data area of the two-dimensional code based on the image data generated by the generating means including the two-dimensional code;
Distance measuring means for measuring the distance to the two-dimensional code based on the size of the two-dimensional code acquired by the first decoding means and the code area occupied by the two-dimensional code in the image data;
Lens moving means for moving the condenser lens so as to be focused according to the measurement distance measured by the distance measuring means;
The second data area of the two-dimensional code based on the image data generated according to the light reception result from the light receiving means that has received the reflected light of the two-dimensional code in the focused state according to the measurement distance Second decoding means for decoding
An optical information reading apparatus comprising:
前記距離測定手段は、前記測定距離を、前記線分に基づき算出された測定用画素数と、前記二次元コードの大きさおよび前記画角とに基づいて測定することを特徴とする請求項4に記載の光学的情報読取装置。 The number of pixels for measurement is calculated based on a line segment that connects the centers of both sides facing each other in the field angle direction among the four sides constituting the outer edge of the code region in the field angle direction,
5. The distance measuring unit measures the measurement distance based on the number of pixels for measurement calculated based on the line segment, the size of the two-dimensional code, and the angle of view. An optical information reading device described in 1.
前記距離測定手段は、前記測定距離を、前記線分に基づき算出された測定用画素数と、前記二次元コードの大きさおよび前記画角とに基づいて測定することを特徴とする請求項4に記載の光学的情報読取装置。 The number of pixels for measurement is calculated based on a line segment connecting two adjacent corners of the four corners of the code area,
5. The distance measuring unit measures the measurement distance based on the number of pixels for measurement calculated based on the line segment, the size of the two-dimensional code, and the angle of view. An optical information reading device described in 1.
前記距離測定手段は、前記測定距離を、前記補正手段により補正された前記コード領域に基づいて測定することを特徴とする請求項1〜5のいずれか一項に記載の光学的情報読取装置。 Correction means for rotating and correcting the code region included in the image data so that the arrangement direction of the cells of the two-dimensional code is equal to the horizontal direction and the vertical direction of the image data;
The optical information reading apparatus according to claim 1, wherein the distance measuring unit measures the measurement distance based on the code area corrected by the correcting unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009281182A JP5251854B2 (en) | 2009-12-11 | 2009-12-11 | Optical information reader |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009281182A JP5251854B2 (en) | 2009-12-11 | 2009-12-11 | Optical information reader |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011123694A JP2011123694A (en) | 2011-06-23 |
JP5251854B2 true JP5251854B2 (en) | 2013-07-31 |
Family
ID=44287520
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009281182A Active JP5251854B2 (en) | 2009-12-11 | 2009-12-11 | Optical information reader |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5251854B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10679024B2 (en) * | 2018-07-24 | 2020-06-09 | Cognex Corporation | System and method for auto-focusing a vision system camera on barcodes |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3760594B2 (en) * | 1997-10-13 | 2006-03-29 | 株式会社デンソー | Optical information reader |
JP3887947B2 (en) * | 1998-05-12 | 2007-02-28 | 株式会社デンソー | Two-dimensional code reading method and recording medium |
JP4122629B2 (en) * | 1998-09-03 | 2008-07-23 | 株式会社デンソー | 2D code generation method |
JP2002056348A (en) * | 2000-08-07 | 2002-02-20 | Tohken Co Ltd | Hand readout device with autofocus function, autofocus method, and distance measuring method |
-
2009
- 2009-12-11 JP JP2009281182A patent/JP5251854B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2011123694A (en) | 2011-06-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108700662B (en) | Distance image acquisition device and application thereof | |
EP3040906B1 (en) | Visual feedback for code readers | |
US9557166B2 (en) | Dimensioning system with multipath interference mitigation | |
US20170160441A1 (en) | Autofocus lens system | |
JP5525636B2 (en) | Optoelectronic device and calibration method for measuring the size of a structure or object | |
JP4186915B2 (en) | Optical information reader | |
JP2015507795A (en) | Imaging device having a bright field image sensor | |
EP2507741B1 (en) | Imaging-based scanner including border searching for image acquisition | |
JP2008146653A (en) | Method, system and apparatus for multiple path image scanner | |
JP2006244139A (en) | Optical information reading device | |
CN107092848B (en) | Method, device and system for programming bar code symbol scanning terminal by using two-dimensional programming code | |
EP3370403B1 (en) | Reading device and mobile terminal | |
WO2022076295A1 (en) | Method and apparatus for in-field stereo calibration | |
JP5251854B2 (en) | Optical information reader | |
EP3156825B1 (en) | Dimensioning system with multipath interference mitigation | |
JP5445064B2 (en) | Image processing apparatus and image processing program | |
JP5556684B2 (en) | Information code reader | |
JP5402587B2 (en) | Optical information reader | |
JP7167553B2 (en) | Two-dimensional code | |
JP5786784B2 (en) | Information code reader | |
JP5888199B2 (en) | Bar code reader | |
JP2011008574A (en) | Optical information reader | |
JP6645393B2 (en) | Optical information reader | |
JP2006092263A (en) | Automatic code reading device | |
US12026916B2 (en) | Method and apparatus for in-field stereo calibration |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120131 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130308 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20130319 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130401 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5251854 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160426 Year of fee payment: 3 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |