JP5251854B2 - Optical information reader - Google Patents

Optical information reader Download PDF

Info

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
Application number
JP2009281182A
Other languages
Japanese (ja)
Other versions
JP2011123694A (en
Inventor
昌宏 原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Wave Inc
Original Assignee
Denso Wave Inc
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 Denso Wave Inc filed Critical Denso Wave Inc
Priority to JP2009281182A priority Critical patent/JP5251854B2/en
Publication of JP2011123694A publication Critical patent/JP2011123694A/en
Application granted granted Critical
Publication of JP5251854B2 publication Critical patent/JP5251854B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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.

特許第3873450号公報Japanese Patent No. 3873450 特許第3887947号公報Japanese Patent No. 3888947

ところで、近年、伝票などに表示されている近くの二次元コードや、フォークリフトや棚の上にある商品に表示されている遠くの二次元コードを単一の読取装置で円滑に読み取るために、自動焦点調節機能(オートフォーカス機能)を搭載した読取装置の必要性が高くなってきている。オートフォーカスで焦点を合わす方法としてコントラスト検出方式が主に用いられており、長所として撮影用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.

本実施形態に係る光学的情報読取装置10の電気的構成を示すブロック図である。1 is a block diagram showing an electrical configuration of an optical information reading apparatus 10 according to the present embodiment. 本実施形態に係るQRコード50の概要を示す構成図である。It is a block diagram which shows the outline | summary of the QR code 50 which concerns on this embodiment. 制御回路40にて行われる読取処理の流れを例示するフローチャートの一部である。6 is a part of a flowchart illustrating the flow of a reading process performed by the control circuit 40. 制御回路40にて行われる読取処理の流れを例示するフローチャートの一部である。6 is a part of a flowchart illustrating the flow of a reading process performed by the control circuit 40. 被写界深度調整処理における結像レンズ27の移動状態を説明するための説明図である。It is explanatory drawing for demonstrating the movement state of the imaging lens 27 in a depth-of-field adjustment process. 距離測定処理におけるQRコード50の大きさおよび測定用画素数Nと距離Xとの関係を示す概念図である。It is a conceptual diagram which shows the relationship between the magnitude | size of QR code 50 in the distance measurement process, the number N of pixels for a measurement, and distance X. FIG. 回転状態のQRコード50を示す概念図である。It is a conceptual diagram which shows the QR code 50 of a rotation state. 図8(A)は、水平方向の線分の長さが異なるように歪んだ状態のQRコード50を示す概念図であり、図8(B)は、垂直方向の線分の長さが異なるように歪んだ状態のQRコード50を示す概念図である。FIG. 8A is a conceptual diagram showing a QR code 50 that is distorted so that the lengths of the horizontal line segments are different, and FIG. 8B is different in the length of the vertical line segments. It is a conceptual diagram which shows the QR code 50 of the state distorted like this. 本実施形態の変形例に係るQRコード50aの概要を示す構成図である。It is a block diagram which shows the outline | summary of the QR code 50a which concerns on the modification of this embodiment.

以下、本発明の光学的情報読取装置を具現化した一実施形態について、図面を参照して説明する。
図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 optical information reader 10 is configured as a portable reader that optically reads a two-dimensional code such as a QR code (registered trademark) described later. The optical information reading apparatus 10 includes a circuit unit 20 housed in a housing (not shown). The circuit unit 20 mainly includes an illumination light source 21, a light receiving sensor 28, and an imaging lens 27. And a microcomputer (hereinafter referred to as “microcomputer”) system such as a memory 35 and a control circuit 40.

光学系は、投光光学系と、受光光学系とに分かれている。投光光学系を構成する照明光源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 illumination light source 21 constituting the light projecting optical system functions as an illumination light source capable of emitting the illumination light Lf, and includes, for example, a red LED and a lens provided on the emission side of the LED. FIG. 1 conceptually shows an example in which the illumination light Lf is irradiated toward the reading target R on which the QR code 50 is displayed.

受光光学系は、受光センサ28、結像レンズ27、反射鏡(図示略)などによって構成されている。受光センサ28は、画素数が640×480(VGA)のCCDエリアセンサとして構成されるものであり、QRコード50または読取対象Rに照射されて反射した反射光Lrを受光可能に構成されている。この受光センサ28は、結像レンズ27を介して入射する入射光を受光可能にプリント配線板(図示略)に実装されている。なお、受光センサ28は、特許請求の範囲に記載の「受光手段」の一例に相当し得るものである。   The light receiving optical system includes a light receiving sensor 28, an imaging lens 27, a reflecting mirror (not shown), and the like. The light receiving sensor 28 is configured as a CCD area sensor having a pixel number of 640 × 480 (VGA), and is configured to receive the reflected light Lr irradiated and reflected on the QR code 50 or the reading target R. . The light receiving sensor 28 is mounted on a printed wiring board (not shown) so as to be able to receive incident light incident through the imaging lens 27. The light receiving sensor 28 may correspond to an example of “light receiving means” recited in the claims.

結像レンズ27は、外部から読取口13を介して入射する入射光を集光して受光センサ28の受光面28aに像を結像可能な集光レンズとして機能するものである。本実施形態では、照明光源21から照射された照明光LfがQRコード50にて反射した後、この反射光Lrを結像レンズ27で集光し、受光センサ28の受光面28aにコード像を結像させている。   The imaging lens 27 functions as a condensing lens capable of condensing incident light incident from the outside through the reading port 13 and forming an image on the light receiving surface 28 a of the light receiving sensor 28. In the present embodiment, after the illumination light Lf emitted from the illumination light source 21 is reflected by the QR code 50, the reflected light Lr is condensed by the imaging lens 27, and a code image is formed on the light receiving surface 28 a of the light receiving sensor 28. The image is formed.

この結像レンズ27は、レンズ移動機構29により受光センサ28の光軸Lに沿い移動可能に支持されている。レンズ移動機構29は、図略のモータ等により構成されて、制御回路40からの駆動信号に応じて結像レンズ27を所定量光軸方向に移動させる機能を有する。なお、結像レンズ27およびレンズ移動機構29は、特許請求の範囲に記載の「集光レンズ」および「レンズ移動手段」の一例に相当し得るものである。   The imaging lens 27 is supported by a lens moving mechanism 29 so as to be movable along the optical axis L of the light receiving sensor 28. The lens moving mechanism 29 is configured by a motor (not shown) or the like, and has a function of moving the imaging lens 27 in the optical axis direction by a predetermined amount in accordance with a drive signal from the control circuit 40. The imaging lens 27 and the lens moving mechanism 29 can correspond to an example of “condensing lens” and “lens moving means” recited in the claims.

また、上述したマイコン系は、増幅回路31、A/D変換回路33、メモリ35、アドレス発生回路36、同期信号発生回路38、制御回路40、発光部43、ブザー44、バイブレータ45、液晶表示器46、通信インタフェース48等から構成されている。   The microcomputer system described above includes an amplifier circuit 31, an A / D conversion circuit 33, a memory 35, an address generation circuit 36, a synchronization signal generation circuit 38, a control circuit 40, a light emitting unit 43, a buzzer 44, a vibrator 45, and a liquid crystal display. 46, a communication interface 48, and the like.

光学系の受光センサ28から出力される画像信号(アナログ信号)は、増幅回路31に入力されることで所定の増幅率で増幅された後、A/D変換回路33に入力されると、アナログ信号からディジタル信号に変換される。そして、ディジタル化された画像信号、つまり画像データ(画像情報)は、生成されてメモリ35に入力されると、所定のコード画像情報格納領域に蓄積される。なお、同期信号発生回路38は、受光センサ28およびアドレス発生回路36に対する同期信号を発生可能に構成されており、またアドレス発生回路36は、この同期信号発生回路38から供給される同期信号に基づいて、メモリ35に格納される画像データの格納アドレスを発生可能に構成されている。   The image signal (analog signal) output from the light receiving sensor 28 of the optical system is input to the amplifier circuit 31 and amplified with a predetermined amplification factor, and then input to the A / D conversion circuit 33. The signal is converted to a digital signal. When the digitized image signal, that is, image data (image information) is generated and input to the memory 35, it is stored in a predetermined code image information storage area. The synchronization signal generation circuit 38 is configured to generate a synchronization signal for the light receiving sensor 28 and the address generation circuit 36, and the address generation circuit 36 is based on the synchronization signal supplied from the synchronization signal generation circuit 38. Thus, the storage address of the image data stored in the memory 35 can be generated.

メモリ35は、半導体メモリ装置で、例えばRAM(DRAM、SRAM等)やROM(EPROM、EEPROM等)がこれに相当する。このメモリ35のうちのRAMには、前述した画像データ蓄積領域のほかに、制御回路40が算術演算や論理演算等の各処理時に利用する作業領域や読取条件テーブルなども確保されるようになっている。またROMには、後述する読取処理等を実行可能な所定のプログラムや、照明光源21、受光センサ28等の各ハードウェアを制御可能なシステムプログラムなどが予め格納されている。   The memory 35 is a semiconductor memory device, and corresponds to, for example, a RAM (DRAM, SRAM, etc.) or a ROM (EPROM, EEPROM, etc.). In the RAM of the memory 35, in addition to the image data storage area described above, a work area and a reading condition table used by the control circuit 40 in each processing such as arithmetic operation and logical operation are secured. ing. The ROM stores in advance a predetermined program that can execute a reading process and the like that will be described later, a system program that can control each piece of hardware such as the illumination light source 21 and the light receiving sensor 28, and the like.

制御回路40は、光学的情報読取装置10全体を制御可能なマイコンで、CPU、システムバス、入出力インタフェース等からなるもので、メモリ35とともに情報処理装置を構成し得るもので情報処理機能を有する。この制御回路40は、内蔵された入出力インタフェースを介して種々の入出力装置と接続可能に構成されており、本実施形態の場合、発光部43、ブザー44、バイブレータ45、液晶表示器46、通信インタフェース48等が接続されている。   The control circuit 40 is a microcomputer that can control the entire optical information reading apparatus 10 and includes a CPU, a system bus, an input / output interface, and the like. The control circuit 40 can constitute an information processing apparatus together with the memory 35 and has an information processing function. . The control circuit 40 is configured to be connectable to various input / output devices via a built-in input / output interface. In the case of this embodiment, the light emitting unit 43, the buzzer 44, the vibrator 45, the liquid crystal display 46, A communication interface 48 or the like is connected.

これにより、制御回路40は、例えば、QRコード50の読み取りに関する情報を通知するインジケータとして機能する発光部43の点灯・消灯、ビープ音やアラーム音を発生可能なブザー44の鳴動のオンオフ、当該光学的情報読取装置10の作業者に伝達し得る振動を発生可能なバイブレータ45の駆動制御、液晶表示器46の表示制御や外部装置とのシリアル通信を可能にする通信インタフェース48の通信制御等を可能にしている。なお、通信インタフェース48に接続される外部装置には、当該光学的情報読取装置10の上位システムに相当するホストコンピュータ等が含まれる。   Thereby, for example, the control circuit 40 turns on / off the light emitting unit 43 that functions as an indicator for notifying information relating to reading of the QR code 50, on / off of the buzzer 44 that can generate a beep sound and an alarm sound, Drive control of the vibrator 45 capable of generating vibration that can be transmitted to the operator of the information reading device 10, display control of the liquid crystal display 46, communication control of the communication interface 48 enabling serial communication with an external device, and the like are possible I have to. The external device connected to the communication interface 48 includes a host computer or the like corresponding to the host system of the optical information reading device 10.

次に、読取対象であるQRコード50の構成について以下に説明する。
図2に示すように、QRコード50は、複数の情報表示単位セル(以下、単にセルとも称する)が集合したセル集合体として構成されている。図2では、各セルが2種類のセル(明色セルおよび暗色セル)のうちのいずれかとされており、各セル領域が正方形領域として構成されている。そして、このようなセルがマトリックス状に配置されることで、セルが配置される領域全体が矩形領域として構成されている。具体的には、QRコード50は、3つの位置検出パターン51a,51b,51c、アライメントパターン52、タイミングセル53a,53b、フォーマットコード54およびデータ領域60などから構成されている。
Next, the configuration of the QR code 50 to be read will be described below.
As shown in FIG. 2, the QR code 50 is configured as a cell aggregate in which a plurality of information display unit cells (hereinafter also simply referred to as cells) are aggregated. In FIG. 2, each cell is one of two types of cells (light cell and dark cell), and each cell region is configured as a square region. By arranging such cells in a matrix, the entire area where the cells are arranged is configured as a rectangular area. Specifically, the QR code 50 includes three position detection patterns 51a, 51b, 51c, an alignment pattern 52, timing cells 53a, 53b, a format code 54, a data area 60, and the like.

データ領域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 data area 60 includes a first data area 61 composed of a plurality of cells and a second data area 62 composed of cells having a small cell size obtained by dividing the cells constituting the first data area 61 into n parts. It is comprised so that it may arrange | position in the predetermined | prescribed position illustrated to 2. Here, the cell size of the data cell used in the second data area 62 is set to divide the cell size of the data cell used in the first data area 61 vertically and horizontally. The size of the entire QR code 50 is a square shape of 25 cells × 25 cells with reference to the data cells used in the first data area 61. In FIG. 2, for convenience, the hatched area indicates the area where the first data area 61 is disposed, and the white area indicates the area where the second data area 62 is disposed. The description of the original light cell and dark cell is omitted. The first data area 61 and the second data area 62 may correspond to an example of “first data area” and “second data area” recited in the claims.

具体的には、第1データ領域61は、QRコード50の大きさに関する情報、例えば、QRコード50の一辺の長さの情報や、第2データ領域62の第1データ領域61に対する分割数などの所定の情報が含まれるように、複数の明色セルおよび暗色セルから構成されている。なお、QRコード50の大きさに関する情報としては、例えば、単位セルの大きさに関する情報であってもよい。   Specifically, the first data area 61 is information on the size of the QR code 50, for example, information on the length of one side of the QR code 50, the number of divisions of the second data area 62 with respect to the first data area 61, and the like. Are formed of a plurality of light-color cells and dark-color cells. Note that the information related to the size of the QR code 50 may be information related to the size of the unit cell, for example.

また、第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 QR code 50 is included. Therefore, by increasing the number of divisions of the second data area 62, the amount of information included in the second data area 62, that is, the amount of information included in the QR code 50 can be increased. It is assumed that the second data area 62 also includes an error correction area for performing error correction described later.

また、各位置検出パターン51a,51b,51cは、QRコード50の4つの頂点のうち、3つに配置されており、所定のパターンに応じて第1データ領域61にて採用されるセルサイズと同じ大きさのデータセルにて構成されている。また、アライメントパターン52は、図2に示すごとく、データ領域60の内部に配置されており、所定のパターンに応じて第1データ領域61にて採用されるセルサイズと同じ大きさのデータセルにて構成されている。   Each of the position detection patterns 51a, 51b, 51c is arranged at three of the four vertices of the QR code 50, and the cell size adopted in the first data area 61 according to a predetermined pattern It is composed of data cells of the same size. Further, as shown in FIG. 2, the alignment pattern 52 is arranged inside the data area 60, and is formed into a data cell having the same size as the cell size adopted in the first data area 61 according to a predetermined pattern. Configured.

また、タイミングセル53a,53bは、位置検出パターン51a,51b,51c間に配置されており、第1データ領域61にて採用されるセルサイズと同じ大きさのデータセルにて構成されている。このタイミングセル53a,53bは、明色セルおよび暗色セルが交互に組み合わせられた各データセル位置の指標となる基準パターンとして用いられる。   The timing cells 53a and 53b are arranged between the position detection patterns 51a, 51b and 51c, and are configured by data cells having the same size as the cell size employed in the first data area 61. The timing cells 53a and 53b are used as a reference pattern serving as an index of each data cell position in which bright cells and dark cells are alternately combined.

また、フォーマットコード54は、位置検出パターン51aの近傍に配置されており、所定のパターンに応じて第1データ領域61にて採用されるセルサイズと同じ大きさのデータセルにて構成されている。このフォーマットコード54は、第1データ領域61および第2データ領域62についての存在領域、使用しているコード種類、セルサイズ等が特定可能な内容となっている。   The format code 54 is arranged in the vicinity of the position detection pattern 51a, and is composed of data cells having the same size as the cell size adopted in the first data area 61 according to a predetermined pattern. . The format code 54 has contents that can specify the existence area, the type of code used, the cell size, and the like for the first data area 61 and the second data area 62.

次に、本実施形態に係る光学的情報読取装置10において、上述のように構成されるQRコード50を光学的に読み取る読取処理について、図3および図4に示すフローチャートを用いて説明する。   Next, reading processing for optically reading the QR code 50 configured as described above in the optical information reading apparatus 10 according to the present embodiment will be described with reference to flowcharts shown in FIGS. 3 and 4.

まず、電源が投入されて所定の初期設定等が実施されると、図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 lens moving mechanism 29 so as to focus on a predetermined far position to be described later. As a result, the imaging lens 27 moves.

前回のデコードが成功であるか(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 imaging lens 27 is moved in step S103, image data generation processing is performed in step S105. In this process, the operator directs the illumination light Lf from the illumination light source 21 toward the QR code 50 to be read, so that the reflected light Lr reflected by the QR code 50 passes through the imaging lens 27 to the light receiving sensor 28. Then, image data is generated based on the light reception result. Note that the control circuit 40 that executes Step S105 and Step S127 described later can correspond to an example of a “generation unit” recited in the claims.

続いて、ステップ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 position detection patterns 51a, 51b, 51c are detected from the image data generated as described above. If the position detection patterns 51a, 51b, and 51c are not detected because they are out of focus (No in S107), the depth of field adjustment process is performed in step S109. In this process, the near point of the depth of field of the light receiving sensor 28 at the present time (hereinafter also referred to as the near point depth of field Dn) is used as the far point of the new depth of field (hereinafter referred to as the far point depth of field Df). The driving signal is output to the lens moving mechanism 29 so as to coincide with the lens moving mechanism 29. Thereby, the lens moving mechanism 29 moves the imaging lens 27 based on the drive signal from the control circuit 40 so that the depth of field changes toward the near point along the optical axis L of the light receiving sensor 28.

ここで、上述した遠点被写界深度Dfおよび近点被写界深度Dnは、以下の式により演算される。
Df=X×(H−f)/(H+X−2×f) ・・・(1)
Dn=X×(H−f)/(H−X) ・・・(2)
ここで、Hは、f/(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 imaging lens 27 is moved, the processing from step S105 is performed again, and the processing in step 109 is repeated until the position detection patterns 51a, 51b, 51c are detected.

ここで、ステップS109における被写界深度調整処理について、図5を用いて説明する。図5に示すように、ステップS103にて焦点を合わせた所定の遠方の位置をP点とすると、最初のステップS109では、このP点で焦点を合わせた近点被写界深度Dnが遠点被写界深度DfとなるP点に焦点を合わせるように駆動信号がレンズ移動機構29に出力されて結像レンズ27が移動する。この焦点位置で位置検出パターン51a,51b,51cが検出されない場合には、再びステップS109にて、P点で焦点を合わせた近点被写界深度Dnが遠点被写界深度DfとなるP点に焦点を合わせるように駆動信号がレンズ移動機構29に出力されて結像レンズ27が移動する。この焦点位置でも位置検出パターン51a,51b,51cが検出されない場合には、さらにステップS109にて、P点で焦点を合わせた近点被写界深度Dnが遠点被写界深度DfとなるP点に焦点を合わせるように駆動信号がレンズ移動機構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 lens moving mechanism 29 so that the focusing lens 27 moves so that the focal point is at the point P 2 where the far point depth of field Df 2 becomes. Position detection pattern 51a in this focal position, 51b, when 51c is not detected again in step S109, P near point focused in two points the depth of field Dn 2 is far point the depth of field Df 3 drive signals to focus on P 3 points a is outputted to the lens moving mechanism 29 imaging lens 27 is moved. Position detection pattern 51a in this focal position, 51b, when 51c is not detected, further at step S109, a near point the depth of field Dn 3 is far point the depth of field Df 4 focused at three points P drive signals to focus the P 4 points a is outputted to the lens moving mechanism 29 imaging lens 27 is moved.

上述のように結像レンズ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 position detection patterns 51a, 51b, and 51c are detected by moving the imaging lens 27 and adjusting the depth of field as described above (Yes in S107), the first decoding process is performed in step S111. The In this process, in accordance with the position detection patterns 51a, 51b, 51c, the format code 54, and the like, the first data area 61 having a large cell size is decoded in the data area 60, information on the size of the QR code 50, etc. Is acquired. At this stage, since the focus is high enough to detect the position detection patterns 51a, 51b, and 51c, the first data area 61 having the same cell size can be reliably decoded. The control circuit 40 that executes step S111 may correspond to an example of a “first decoding unit” recited in the claims.

次に、ステップS113にて、画像データにおいてQRコード50が占める領域(以下、コード領域という)での各セルの配列方向の双方が当該画像データの水平方向(画角βに対応する画角方向)に対して傾いている回転状態であるか否かについて判定される。ここで、コード領域での両配列方向のいずれかが当該画像データの水平方向に等しく回転状態でない場合には(S113でNo)、ステップS115にてコード領域が歪んでいるか否かについて判定される。ここで、コード領域が正方形状であって歪んでいなければ、ステップS115にてNoと判定される。   Next, in step S113, the arrangement direction of each cell in the area occupied by the QR code 50 in the image data (hereinafter referred to as the code area) is the horizontal direction of the image data (the angle of view corresponding to the angle of view β). It is determined whether or not the rotation state is inclined with respect to. Here, if either of the arrangement directions in the code area is equal to the horizontal direction of the image data and is not rotated (No in S113), it is determined in step S115 whether or not the code area is distorted. . Here, if the code area is square and not distorted, it is determined No in step S115.

そして、ステップ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 QR code 50 in the field angle direction corresponding to the field angle β of the light receiving sensor 28 (hereinafter referred to as measurement). Is detected). In the present embodiment, the field angle direction corresponding to the field angle β is set to the horizontal direction, and the field angle β is set to 30 °, for example. Further, the number N of measurement pixels may correspond to an example of “number of measurement pixels” described in the claims.

一方、上述したステップ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 QR code 50 is inclined with respect to the light receiving sensor 28, the code data is included in a distorted state in the image data. Therefore, by calculating the number N of measurement pixels based on the above line segment, for example, as described above, the line segment connecting the ends of both sides facing each other (the points a and b in FIG. 8A are connected). Compared with the case where the number of pixels for measurement is calculated based on a line segment or a line segment connecting the c point and the d point), the influence of distortion can be suppressed.

なお、画角方向が垂直方向である場合には、図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 QR code 50 in the image data. In a specific angle of view direction, the ratio of the number of measurement pixels N to the actual length Y of the QR code 50 is determined by the number of pixels between the outer edges of the image data and the position of the QR code 50 in the specific angle of view direction. To the actual length corresponding to the distance between the outer edges (hereinafter also referred to as the outer edge length Ya). Since the length Ya between the outer edges is uniquely determined by the distance X to the QR code 50 and the angle of view β of the light receiving sensor 28, the length Y of the QR code 50, the angle of view β of the light receiving sensor 28, and the measurement pixel. Based on the number N, the distance X to the QR code 50 can be measured.

具体的には、特定の画角方向が水平方向(図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 QR code 50 acquired in Step S111 and the number N of measurement pixels detected in any of Steps S117 to 121 are calculated based on Equation 5 above. Thus, the distance X to the QR code 50 is calculated. The control circuit 40 that executes step S123 corresponds to an example of “distance measuring means” recited in the claims, and the distance X corresponds to an example of “measurement distance” recited in the claims. To get.

上述のようにステップ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 lens moving mechanism 29 so as to be focused according to the distance X calculated in step S123. Is output. As a result, the lens moving mechanism 29 moves the imaging lens 27 along the optical axis L of the light receiving sensor 28 based on the drive signal from the control circuit 40 to bring it into focus. Then, after image data generation processing is performed in step S127 and new focused image data is generated, second decoding processing is performed in step S129. In this process, the second data area 62 having a relatively small cell size is decoded and necessary information is acquired. At this stage, since focusing is performed according to the measured distance X, even the second data area 62 having a small cell size can be reliably decoded. The control circuit 40 that executes step S129 may correspond to an example of “second decoding means” recited in the claims.

続いて、ステップ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 information reading apparatus 10 according to the present embodiment, the first data area 61 of the QR code 50 is decoded based on the image data generated including the QR code 50, and the QR When information regarding the size of the code 50 is acquired, the distance X to the QR code 50 is measured based on the size of the QR code 50 and the code area occupied by the QR code 50 in the image data. Based on the image data generated according to the light reception result from the light receiving sensor 28 that receives the reflected light of the QR code 50 in a state where the imaging lens 27 is moved so as to be focused according to the distance X. Thus, the second data area 62 of the QR code 50 is decoded.

このように、第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 first data area 61 is larger than that of the second data area 62, it is possible to increase the possibility of successful decoding even when the focus is not accurately achieved. Further, a distance X from the size of the QR code 50 acquired by decoding the first data area 61 and the code area occupied by the QR code 50 to the image data to the QR code 50 is obtained, and image formation is performed according to the distance X. By moving the lens 27, it is possible to focus accurately. Since the image data generated in this focused state is in focus, even the second data area 62 having a relatively small cell size can be reliably decoded.
Therefore, the reflected light Lr from the QR code 50 having two data areas 61 and 62 having different cell sizes can be suitably focused on the light receiving sensor 28 via the imaging lens 27.

また、本実施形態に係る光学的情報読取装置10では、第2データ領域62には誤り訂正を行うための情報が含まれているため、第2データ領域62の一部が汚れの付着等などにより誤った情報となる場合であっても、誤り訂正情報に基づいて訂正することができるので、当該QRコード50に対する読取精度を向上させることができる。なお、第1データ領域61に誤り訂正を行うための情報が含まれる場合も同様の効果を奏する。   Further, in the optical information reading apparatus 10 according to the present embodiment, since the second data area 62 contains information for error correction, a part of the second data area 62 is contaminated. Therefore, even if the information is incorrect, it can be corrected based on the error correction information, so that the reading accuracy for the QR code 50 can be improved. The same effect can be obtained when the first data area 61 includes information for error correction.

さらに、本実施形態に係る光学的情報読取装置10では、QRコード50までの距離Xが、QRコード50の一辺の長さYと、受光センサ28の画角βと、測定用画素数Nとを用いることで正確に測定することができる。   Furthermore, in the optical information reading apparatus 10 according to the present embodiment, the distance X to the QR code 50 is such that the length Y of one side of the QR code 50, the angle of view β of the light receiving sensor 28, the number N of measurement pixels, and the like. Can be measured accurately.

さらにまた、本実施形態に係る光学的情報読取装置10では、コード領域が歪んでいる場合、上記測定用画素数Nは、コード領域の外縁を構成する四辺のうち画角方向にて対向する両辺の中央同士を当該画角方向に結ぶ線分に基づいて算出される。これにより、例えば対向する両辺の端部同士を結ぶ線分に基づいて測定用画素数を算出する場合と比較して、そのコード領域の歪みに起因する距離Xの測定精度の低下を抑制することができる。   Furthermore, in the optical information reading apparatus 10 according to the present embodiment, when the code area is distorted, the number N of measurement pixels is equal to 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 connecting the centers of the two in the direction of the angle of view. Thereby, for example, compared with the case where the number of pixels for measurement is calculated based on a line segment connecting the ends of both sides facing each other, a decrease in measurement accuracy of the distance X due to distortion of the code region is suppressed. Can do.

また、本実施形態に係る光学的情報読取装置10では、コード領域が回転状態である場合には、測定用画素数Nは、コード領域の四隅のうち近接する2つを結ぶ線分に基づいて算出されるので、回転状態のQRコード50であってもその一辺に相当する画素数に基づいて上記測定用画素数Nを容易に算出することができる。   Further, in the optical information reading apparatus 10 according to the present embodiment, when the code area is rotated, the number N of measurement pixels is based on a line segment connecting two adjacent corners of the code area. Thus, even if the QR code 50 is in the rotated state, the number N of pixels for measurement can be easily calculated based on the number of pixels corresponding to one side.

さらに、本実施形態に係る光学的情報読取装置10では、第1デコード処理によるデコードが失敗したときには、現時点における受光センサ28の被写界深度の近点側を遠点側にするように結像レンズ27を移動させた後に、再度第1デコード処理を実施する。このように焦点が合っていないために第1デコード処理が失敗する場合には、被写界深度を遠点側から近点側に変化させるように結像レンズ27を移動させることで、結像レンズ27をランダムに移動させたり近点側から遠点側へ徐々に移動させる場合と比較して、焦点を合わせるための時間および結像レンズ27の移動回数を低減することができる。特に、読取対象がQRコード50等の二次元コードであるため、被写体の状態が予測困難な通常のカメラ等と異なり、ぼけ量(許容錯乱円d)が予め分かっているので、精度良く被写界深度を演算することができる。   Further, in the optical information reader 10 according to the present embodiment, when the decoding by the first decoding process fails, the image is formed so that the near point side of the depth of field of the light receiving sensor 28 at the present time is the far point side. After the lens 27 is moved, the first decoding process is performed again. If the first decoding process fails due to the out-of-focus state, the imaging lens 27 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 lens 27 is moved randomly or gradually moved from the near point side to the far point side, it is possible to reduce the time for focusing and the number of movements of the imaging lens 27. In particular, since the object to be read is a two-dimensional code such as the QR code 50, the blur amount (allowable circle of confusion d) is known in advance, unlike a normal camera or the like in which the subject state is difficult to predict. The depth of field can be calculated.

さらにまた、本実施形態に係る光学的情報読取装置10では、前回の第1デコード処理が成功したときには、現時点でもセルサイズが大きな第1データ領域61を読み取れる焦点である可能性が高いので、ステップS103における結像レンズ27を移動させることなく第1デコード処理を実施する。これにより、不要な結像レンズ27の移動をなくすことができる。   Furthermore, in the optical information reading apparatus 10 according to the present embodiment, when the previous first decoding process is successful, there is a high possibility that the focal point can read the first data area 61 having a large cell size at the present time. The first decoding process is performed without moving the imaging lens 27 in S103. Thereby, unnecessary movement of the imaging lens 27 can be eliminated.

本実施形態の変形例として、図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 first data area 61 may be arranged in the vicinity of the position detection pattern 51a. Thereby, since the position of each cell is detected on the basis of the position detection pattern 51a, the position detection accuracy of the first data area 61 is increased by arranging the first data area 61 in the vicinity of the position detection pattern 51a. The reading accuracy for the QR code 50 can be improved. The same effect can be obtained even if the first data area 61 is arranged in the vicinity of the position detection patterns 51b and 51c.

なお、本発明は上記実施形態に限定されるものではなく、以下のように具体化してもよく、その場合でも、上記実施形態と同等の作用・効果が得られる。
(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 light receiving sensor 28 is not limited to a sensor having a number of pixels of 640 × 480 (VGA), but may be a light receiving sensor having a specification different from the number of pixels. In this case, in the distance measurement process in step S123, the distance X is calculated based on the number of pixels of the light receiving sensor.

(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 first data area 61 vertically and horizontally. In order to increase the amount of information in the second data area 62, for example, it may be set to be divided into four parts in the vertical and horizontal directions. In this case, the division information may be specified from the first data area 61 or the format code 54.

(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 QR code 50 coincides with the angle of view corresponding to the angle of view β of the light receiving sensor 28. The number N can be measured. In addition, by performing the process in step S115 after correcting the rotation of the code area as described above, it is possible to eliminate the influence of both the rotation state and the distortion state of the code area.

10…光学的情報読取装置
27…結像レンズ(集光レンズ)
28…受光センサ(受光手段)
29…レンズ移動機構(レンズ移動手段)
40…制御回路(生成手段、距離測定手段、第1デコード手段,第2デコード手段)
50,50a…QRコード(二次元コード)
60…データ領域
61…第1データ領域
62…第2データ領域
Df…遠点被写界深度
Dn…近点被写界深度
L…光軸
Lr…反射光
N…測定用画素数
X…距離(測定距離)
β…画角
DESCRIPTION OF SYMBOLS 10 ... Optical information reader 27 ... Imaging lens (condensing lens)
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 ... Data area 61 ... First data area 62 ... Second data area Df ... Far-field depth of field Dn ... Near-field depth of field L ... Optical axis Lr ... Reflected light N ... Number of pixels for measurement X ... Distance ( Measured distance)
β ... Angle of view

Claims (9)

複数のセルから構成される第1データ領域とこの第1データ領域を構成するセルよりも小さなセルから構成される第2データ領域とを有する二次元コードを光学的に読み取る光学的情報読取装置であって、
前記第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:
前記第1データ領域および前記第2データ領域には誤り訂正を行うための情報が含まれることを特徴とする請求項1に記載の光学的情報読取装置。   The optical information reading apparatus according to claim 1, wherein the first data area and the second data area include information for performing error correction. 前記第1データ領域は、前記二次元コードの位置を特定するための位置検出パターンの近傍に配置されることを特徴とする請求項1または2に記載の光学的情報読取装置。   The optical information reader according to claim 1, wherein the first data area is arranged in the vicinity of a position detection pattern for specifying a position of the two-dimensional code. 前記距離測定手段は、前記測定距離を、前記二次元コードの大きさと、前記受光手段の画角と、前記画像データにおいて前記画角に対応する画角方向にて当該二次元コードが占める測定用画素数とに基づいて測定することを特徴とする請求項1〜3のいずれか一項に記載の光学的情報読取装置。   The distance measuring means is for measuring the measurement distance occupied by the two-dimensional code in the size of the two-dimensional code, the angle of view of the light receiving means, and the angle of view corresponding to the angle of view in the image data. The optical information reading apparatus according to claim 1, wherein measurement is performed based on the number of pixels. 前記測定用画素数は、前記コード領域の外縁を構成する四辺のうち前記画角方向にて対向する両辺の中央同士を当該画角方向に結ぶ線分に基づいて算出され、
前記距離測定手段は、前記測定距離を、前記線分に基づき算出された測定用画素数と、前記二次元コードの大きさおよび前記画角とに基づいて測定することを特徴とする請求項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.
前記測定用画素数は、前記コード領域の四隅のうち近接する2つを結ぶ線分に基づいて算出され、
前記距離測定手段は、前記測定距離を、前記線分に基づき算出された測定用画素数と、前記二次元コードの大きさおよび前記画角とに基づいて測定することを特徴とする請求項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.
前記第1デコード手段によるデコードが失敗したときには、現時点における前記受光手段の被写界深度の近点側を遠点側にするように前記レンズ移動手段により前記集光レンズを移動させた後に、前記第1デコード手段によるデコードを実施することを特徴とする請求項1〜7のいずれか一項に記載の光学的情報読取装置。   When the decoding by the first decoding unit fails, the condensing lens is moved 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, 8. The optical information reading apparatus according to claim 1, wherein decoding is performed by a first decoding unit. 前回の前記第1デコード手段によるデコードが成功したときには、前記集光レンズを移動させることなく前記第1デコード手段によるデコードを実施することを特徴とする請求項8に記載の光学的情報読取装置。   9. The optical information reader according to claim 8, wherein 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.
JP2009281182A 2009-12-11 2009-12-11 Optical information reader Active JP5251854B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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