JP2007172596A - Two-dimensional code, and method and apparatus for detecting the same - Google Patents

Two-dimensional code, and method and apparatus for detecting the same Download PDF

Info

Publication number
JP2007172596A
JP2007172596A JP2006317188A JP2006317188A JP2007172596A JP 2007172596 A JP2007172596 A JP 2007172596A JP 2006317188 A JP2006317188 A JP 2006317188A JP 2006317188 A JP2006317188 A JP 2006317188A JP 2007172596 A JP2007172596 A JP 2007172596A
Authority
JP
Japan
Prior art keywords
dimensional code
outer shape
bit
square
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2006317188A
Other languages
Japanese (ja)
Inventor
Shinji Uchiyama
晋二 内山
Kiyohide Sato
清秀 佐藤
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.)
Canon Inc
Original Assignee
Canon 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 Canon Inc filed Critical Canon Inc
Priority to JP2006317188A priority Critical patent/JP2007172596A/en
Publication of JP2007172596A publication Critical patent/JP2007172596A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To make denser the embedded amount of bit information in a two-dimensional code of a square shape, which is effective for deducing the position and the attitude of a camera, capable of detecting the two-dimensional code from an arbitrary direction, as well as from substantially the exactly opposite direction. <P>SOLUTION: In the two-dimensional code, having a square external shape identifiable by the background and the lightness or color, of which inside is divided into a particular size at certain intervals of the internal circumference thereof, thus representing information by the lightness or the color in each divided area, each area dividing the inside of the two-dimensional code is formed of a hexagon, having equal vertical and horizontal lengths. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、画像から検出できる2次元コードの構成、2次元コードを画像から検出する方法および装置に関するものである。   The present invention relates to a configuration of a two-dimensional code that can be detected from an image, and a method and apparatus for detecting a two-dimensional code from an image.

[従来技術1]
図9に示すMaxiCodeと呼ばれる二次元コードが従来から知られている。この二次元コードは、中心部に同心円状に半径の異なる帯状の黒領域と白領域があり、その部位を基準に、周囲に微小な正六角形領域が規則正しく並んでいる構造となっている。各正六角形を黒または白とすることによって、2値の情報を表現し、それをカメラで撮影することによって情報を読み出す。以下では、これを2次元コード1と呼ぶ。
[Prior art 1]
A two-dimensional code called “MaxiCode” shown in FIG. 9 is conventionally known. This two-dimensional code has a structure in which a central black area and a black area and a white area having different radii are arranged concentrically and minute regular hexagonal areas are regularly arranged around the area. By representing each regular hexagon as black or white, binary information is expressed, and the information is read out by photographing it with a camera. Hereinafter, this is referred to as a two-dimensional code 1.

また、図10や図11に示す二次元コードも従来から知られている。これらの二次元コードは、背景と明度によって分離できる正方形領域をもち、その内部を均等に区分した各々の小正方形領域の明暗によって情報を表現する。通常、これらのコードはカメラによって撮影され、背景からこの2次元コードの外形を識別・検出し、内部に割り当てられた各区分領域の明度に基づいて情報が読み出される。以下では、この種の2次元コードを2次元コード2と呼ぶ。   Further, the two-dimensional code shown in FIGS. 10 and 11 has been conventionally known. These two-dimensional codes have square areas that can be separated according to the background and brightness, and express information by the brightness of each small square area that is equally divided inside. Usually, these codes are photographed by a camera, the outline of the two-dimensional code is identified and detected from the background, and information is read based on the brightness of each divided area assigned to the inside. Hereinafter, this type of two-dimensional code is referred to as a two-dimensional code 2.

2次元コード1と2次元コード2は、物品等に貼り付けておき、その物品の情報、例えば、製品番号、個体番号、製造日などの製造に関わる情報や、発送元、発送先、発送日時などの輸送に関わる情報などを管理するために利用されるのが通例である。これらのコードは、コードが貼り付けられている面に対して、ほぼ正対する方向からカメラによって撮像されるのが通例であり、その撮像装置の撮像面に対して十分に大きく映るように撮影されることで認識ができることを前提としている。   The two-dimensional code 1 and the two-dimensional code 2 are affixed to an article, etc., and information on the article, for example, information related to manufacturing such as a product number, an individual number, and a manufacturing date, a shipping source, a shipping destination, and a shipping date and time. It is usually used to manage information related to transportation. These codes are usually imaged by a camera from a direction almost opposite to the surface on which the code is pasted, and are photographed so as to appear sufficiently large on the imaging surface of the imaging device. It is assumed that it can be recognized.

[従来技術2]
現実空間に仮想物体を重畳表示する複合現実感(以下MR)技術において、仮想画像を描画するために以下のような処理が行われる。現実空間にある正方形のマーカを用い、そのマーカを基準とする現実カメラの位置姿勢を推定する。そして、得られた現実カメラの位置姿勢を基にして仮想カメラのパラメータを設定することによって仮想物体を描画する。
[Prior Art 2]
In the mixed reality (hereinafter referred to as MR) technology in which a virtual object is superimposed and displayed in the real space, the following processing is performed to draw a virtual image. A square marker in the real space is used, and the position and orientation of the real camera based on the marker are estimated. Then, the virtual object is drawn by setting the parameters of the virtual camera based on the obtained position and orientation of the real camera.

その代表的な例として、非特許文献1の中に示されているARToolKitがある。ARToolKitでは、図12に示すようなマーカを利用する。このマーカは、その外形となる正方形が画像に撮影されて形成される四角形を画像から検出する。そして、その四角形が3次元空間中では正方形である元来の形に対してどのように変形しているか(透視投影の影響によって歪んでいるか)を情報源として、カメラの位置姿勢を推定する。さらに、複数のマーカを同時に利用された場合に、個々のマーカを識別するために、各マーカの内部はそれぞれ異なる図形パターンによって塗り分けられている。このマーカの識別は、画像から得られた四角形の内部の模様が予め用意されたパターンとの間でパターンマッチング技術を用いて行われる。以下ではこれを2次元コード3と呼ぶ。   A typical example is ARTToolKit shown in Non-Patent Document 1. In ARTToolKit, a marker as shown in FIG. 12 is used. This marker detects from the image a quadrangle formed by imaging the square as the outer shape of the image. Then, the position and orientation of the camera are estimated using as an information source how the square is deformed with respect to the original shape which is a square in the three-dimensional space (distorted by the influence of perspective projection). Further, when a plurality of markers are used at the same time, the inside of each marker is painted with a different graphic pattern in order to identify each marker. The identification of the marker is performed using a pattern matching technique with a pattern in which a rectangular internal pattern obtained from an image is prepared in advance. Hereinafter, this is referred to as a two-dimensional code 3.

また、MR用のマーカとしては、非特許文献1の中で示されている図13のようなマーカもある。このマーカでは、内部を4x4の格子状に区切り、各格子点を中心とする円を黒くするか否かによって、個別に識別する機能を実現している点が、2次元コード3と異なる。しかしながら、その外形である正方形を基準として、カメラの位置姿勢を推定する点に関しては二次元コード3と同様である。これを2次元コード4と呼ぶ。   Further, as a marker for MR, there is a marker as shown in FIG. This marker is different from the two-dimensional code 3 in that the inside is divided into a 4 × 4 grid and the function of individually identifying the circle is determined by whether or not the circle centered on each grid point is black. However, it is the same as the two-dimensional code 3 in that the position and orientation of the camera is estimated with reference to the outer shape of the square. This is called a two-dimensional code 4.

MR分野においては、他にも様々な正方形外形を持つマーカが提案されている。例えば、図14に示すようなマーカがある。このマーカは、正方形の外部に正方形の面内での回転方向と特定するための複数の小正方形領域を持っている。内部は、4x4領域に分割され、それぞれが小さな正方形となっており、各小正方形の明度によって個別の識別情報を表現している。これを2次元コード5と呼ぶ。   In the MR field, other markers having various square outlines have been proposed. For example, there is a marker as shown in FIG. This marker has a plurality of small square areas for specifying the rotation direction in the square plane outside the square. The interior is divided into 4 × 4 areas, each of which is a small square, and individual identification information is expressed by the brightness of each small square. This is called a two-dimensional code 5.

以上の2次元コード3、2次元コード4、2次元コード5のようなMRに利用されているマーカは、外形として正方形を有している点が共通の特徴である。
X.Zhang,S.Fronz,N.Navab: Visual marker detection and decoding in AR systems:A comparative study, Proc.of International Symposium on Mixed and Augmented Reality (ISMAR’02),2002.
The markers used for MR such as the above-described two-dimensional code 3, two-dimensional code 4, and two-dimensional code 5 have a common feature in that they have a square as an outer shape.
X. Zhang, S.M. Fronz, N.A. Navab: Visual marker detection and decoding in AR systems: A comparative study, Proc. of International Symposium on Mixed and Augmented Reality (ISMAL'02), 2002.

従来技術1で述べた2次元コード1は、その全体の領域の中心部分に同心円があり、その周囲を小さな正六角形領域が取り囲んでいる。各正六角形領域は、それぞれお互いに隙間なく接合しており、白か黒かによって塗り分けられている。この白または黒によって2値を表現しており、カメラによって撮影され読み出される。そのとき、中心の同心円を基準とし、60度の角度毎のラインを基準として、各正六角形領域の場所を特定している。言い換えると、2次元コード1にほぼ正対して撮影する場合(2次元コードの貼り付けられた面の法線とほぼ等しい光軸をもつカメラによって撮影する場合)にしか、指標を検出することができない。これは2次元コード2においても同様であり、従来技術1の2次元コードは、指標にほぼ正対した状態で撮影することを前提としたものであって、正対しない任意の方向からの撮影を考慮したものではない。   The two-dimensional code 1 described in the prior art 1 has a concentric circle at the center of the entire region, and a small regular hexagonal region surrounds the concentric circle. The regular hexagonal regions are joined to each other without a gap, and are divided depending on whether they are white or black. The binary value is expressed by white or black, and is photographed and read by the camera. At that time, the location of each regular hexagonal region is specified based on the concentric circle at the center and the line for each angle of 60 degrees. In other words, the index can be detected only when shooting with the two-dimensional code 1 facing almost directly (when shooting with a camera having an optical axis substantially equal to the normal of the surface to which the two-dimensional code is attached). Can not. The same applies to the two-dimensional code 2. The two-dimensional code of the prior art 1 is based on the premise that the image is taken in a state of being almost directly facing the index, and is taken from any direction that is not directly opposed. Is not taken into account.

従来技術2で開示されている2次元コード3、4、5は、いずれも明度の高い背景に対して、明度の低い正方形を外形の形状として持っている。従来技術2では、画像における外形の正方形の変形の仕方を情報源として、2次元コードに対するカメラの位置姿勢を推定計算する。外形の正方形が画像に捉えられたときの変形は、カメラの撮影工程で行われる、3次元空間を2次元の画像に投影する射影変換の影響によって引き起こされる。すなわち、従来技術2の指標は、指標に対してほぼ正対する向きから撮影することを前提としておらず、むしろ逆に指標の法線方向とは異なる視軸方向から撮影されることを前提とする指標である。   Each of the two-dimensional codes 3, 4, and 5 disclosed in the prior art 2 has a low-lightness square as an outer shape against a high-lightness background. In the conventional technique 2, the position and orientation of the camera with respect to the two-dimensional code are estimated and calculated using the deformation method of the square of the outer shape in the image as an information source. The deformation when the outer shape square is captured in the image is caused by the influence of the projective transformation for projecting the three-dimensional space onto the two-dimensional image performed in the photographing process of the camera. That is, the index of the conventional technique 2 is not premised on shooting from a direction almost facing the index, but on the contrary, it is premised on shooting from a visual axis direction different from the normal direction of the index. It is an indicator.

2次元コード3に関しては、指標の個体識別を行うために、正方形領域内部の任意のパターンをパターンマッチングの技術によって識別する。指標の内部のパターンは、パターンマッチングで使用するために予め別途保存されている。そして、撮影画像から指標の内部を切り出した画像を正規化した後に、保存されていたパターンとの比較を行い、似ているか否かによって個体を識別する。この方法には、利用するパターンの種類と一度に撮影される指標の数が増えてくると、パターンマッチングしなければならない組み合わせが増えてしまうため、計算時間が膨大になってしまうという問題がある。また、パターン数を増やすと、必然的に似通ったパターンが増えてしまうため、誤認識を引き起こしてしまう問題があり、実質上一度に利用できるパターンの数は数十個程度である。   With respect to the two-dimensional code 3, an arbitrary pattern within the square area is identified by a pattern matching technique in order to identify an individual indicator. The pattern inside the index is stored separately in advance for use in pattern matching. Then, after normalizing the image obtained by cutting out the inside of the index from the photographed image, the image is compared with the stored pattern, and the individual is identified based on whether or not it is similar. This method has a problem that the calculation time becomes enormous as the number of types of patterns to be used and the number of indices to be photographed at a time increase the number of combinations that must be pattern-matched. . In addition, when the number of patterns is increased, the number of similar patterns inevitably increases, which causes a problem of erroneous recognition, and the number of patterns that can be used at one time is about several tens.

それに対して、2次元コード4と2次元コード5は、正方形内部を等間隔で区切った小さな正方形領域とし、その明度(白黒)によって1ビットを表現する方法である。この方法であれば、2次元コード3で生じる問題は発生しない。しかし、以下に示すような改善の余地があった。   On the other hand, the two-dimensional code 4 and the two-dimensional code 5 are methods in which one square is expressed by the lightness (black and white) of a small square area obtained by dividing the inside of the square at equal intervals. With this method, the problem that occurs in the two-dimensional code 3 does not occur. However, there was room for improvement as shown below.

2次元コードにできるだけ多くの情報を載せるためには、ビット領域を多くする必要がある。しかし、ビット領域は画像から認識される必要があるため、一つあたりの大きさを小さくすることに限界がある。逆に言えば、一つあたりのビット領域が画像に撮像・投影されたときの大きさによって、その2次元コードが認識可能であるか否かが決定される。一般に、MR用途においては、できるだけ小さな2次元コードが利用できることが望ましい。しかし、2次元コードに載せる情報を増やすと画面上で十分に大きく映るように物理的にも大きな2次元コードとしなければならない。よって、2次元コードの大きさと載せられる情報量はトレードオフの関係にある。そのため、できるだけ全体の大きさを小さく、かつ、情報量を多くするためには、2次元コード内のビット領域を細密に配置することが望ましい。   In order to put as much information as possible on the two-dimensional code, it is necessary to increase the bit area. However, since the bit area needs to be recognized from the image, there is a limit to reducing the size of each bit area. In other words, whether or not the two-dimensional code can be recognized is determined according to the size when one bit area is captured and projected on the image. In general, in MR applications, it is desirable to use as small a two-dimensional code as possible. However, if the information to be put on the two-dimensional code is increased, the two-dimensional code must be physically large so that it appears sufficiently large on the screen. Therefore, the size of the two-dimensional code and the amount of information to be placed are in a trade-off relationship. For this reason, in order to reduce the overall size as much as possible and increase the amount of information, it is desirable to arrange the bit areas in the two-dimensional code minutely.

2次元コード4は、内部のビット領域を円形としている。そして、ビット領域である円形領域が、正方格子状に配置されている。この方法では、一つの円形領域が小さく映った場合に円形領域間の隙間が問題となる。例えば、あるひとつの領域が黒で塗られていたときに、その円形領域が画像において一画素幅相当近くまで小さくなったとき、画像上では周囲の隙間の白い領域と混在した中間明度として観測されることとなってしまう。これは、ビット読み出しの際に誤りを増やしてしまうことを意味する。すなわち、内部の領域は隙間を設けることなく隣接して並んでいることが望ましい。   The two-dimensional code 4 has a circular inner bit area. The circular areas that are bit areas are arranged in a square lattice pattern. In this method, a gap between the circular areas becomes a problem when one circular area appears small. For example, when a certain area is painted in black and the circular area is reduced to a value close to one pixel width in the image, it is observed as intermediate brightness mixed with the white area in the surrounding gap on the image. Will end up. This means that errors are increased during bit reading. That is, it is desirable that the inner regions are arranged adjacent to each other without providing a gap.

2次元コード5では、内部のビット領域は正方形として区切られていて隣接しているため、その問題は発生しない。この指標は必ずしも指標に対して正対していない方向から撮影されていても検出できることを特徴としている。正方形の内部を等間隔で区切った小さな正方形は、画像上ではどのような向きとして撮影されるのかが不定である。言い換えると、どのような形の四角形の投影像となるのかが不定である。2次元コード5は、画像上に捉えられた個々の小さな四角形領域の明度を基にして、ビット値に変換する処理を行うものであることから、明度を読み出すときにはその個々の小四角形中心点を基準として、その位置の明度を読み出すこととなる。そのとき、正しく明度を読み出すためには、どのような向きで撮影されようとも、画像中の投影された小正方形領域が読み出し位置中心に十分な一定距離を持っているように撮影されなければならない。この条件を言い換えると、元来の指標上での小領域が画像に映ったときに、その小領域の投影像が読み出し位置を中心として画像面上で円形状に近いほど、指標上での小領域の面積を小さくできることを意味する。個々のビットを表現する小領域の面積が小さいほど、指標全体の面積に占めるビット割り当て数を大きくすることができるためである。それに対して、個々の小領域が正方形であると、投影像は角の立った四角形となっていることから、必ずしも効率よく密度高く配置されているとはいえない。一方、2次元コード4は、個々の領域は円形状であるものの、領域間には無駄な隙間が存在しており、ビット領域は高密度には配置されているとはいえない。   In the two-dimensional code 5, the internal bit areas are divided as squares and are adjacent to each other, so that the problem does not occur. This index is characterized in that it can be detected even if it is taken from a direction not necessarily facing the index. The orientation of the small square obtained by dividing the inside of the square at equal intervals is undefined on the image. In other words, it is indefinite what type of quadrangle projection image will be. Since the two-dimensional code 5 performs processing of converting to a bit value based on the brightness of each small square area captured on the image, the center point of each small rectangle is read when reading the brightness. As a reference, the brightness of the position is read out. At that time, in order to correctly read out the brightness, the projected small square area in the image must be photographed so as to have a sufficient fixed distance from the center of the readout position, regardless of the direction of photographing. . In other words, when the small area on the original index is reflected in the image, the smaller the projected image of the small area is on the image plane, the smaller the small area on the index. This means that the area of the region can be reduced. This is because the smaller the area of a small region that represents each bit, the larger the number of bits allocated to the entire index area. On the other hand, if each of the small areas is a square, the projected image is a square with a corner, so it cannot always be said that the projections are efficiently and densely arranged. On the other hand, in the two-dimensional code 4, although each region is circular, there is a useless gap between the regions, and it cannot be said that the bit regions are arranged at high density.

これらのことから、2次元コード4と2次元コード5には、ビット領域の高密度化に対する改善の余地があった。   From these facts, the two-dimensional code 4 and the two-dimensional code 5 have room for improvement in increasing the density of the bit area.

本願請求項1記載の2次元コードは、背景と明度または色によって識別可能な多角形の外形形状と、該外形形状の内部の外周に一定の間隔をおいて配置された内部領域とを有し、前記内部領域を特定のサイズに分割し、該分割領域それぞれの明度または色によって、情報を表現する2次元コードであって、前記分割領域が縦横の長さが等しい六角形であること特徴とする。   The two-dimensional code according to claim 1 has a polygonal outer shape that can be identified by the background and brightness or color, and an inner region that is arranged at a predetermined interval on the inner periphery of the outer shape. A two-dimensional code that divides the inner region into a specific size and expresses information by brightness or color of each of the divided regions, wherein the divided regions are hexagons having equal vertical and horizontal lengths; To do.

また、本願請求項4記載の2次元コード検出方法は、画像から2次元コードの外形形状を検出する外形形状検出工程と、前記検出された外形形状に応じて、内部のビット領域の位置を特定するビット領域特定工程と、前記特定されたビット領域の明度または色に基づいてビット値を取得するビット値取得工程とを有し、前記2次元コードは、背景と明度または色によって識別可能な多角形の外形形状と、該外形形状の内部の外周に一定の間隔をおいて配置された内部領域とを有し、該内部領域は、縦横の長さが等しい六角形の形状を有する複数のビット領域が配置されていることを特徴とする。   The two-dimensional code detection method according to claim 4 of the present application includes an outer shape detection step for detecting an outer shape of a two-dimensional code from an image, and specifies an internal bit area position according to the detected outer shape. And a bit value acquisition step of acquiring a bit value based on the lightness or color of the specified bit region, and the two-dimensional code can be identified by the background and the lightness or color. A plurality of bits having a rectangular outer shape and an inner region arranged at a constant interval on the outer periphery of the outer shape, the inner region having a hexagonal shape with equal vertical and horizontal lengths; A region is arranged.

本発明によれば、2次元コードに対してほぼ正対する方向からだけではなく、任意の方向からその2次元コードを検出することを可能としながら、高密度にビット情報を埋め込むことが可能となり、かつ、指標からカメラ位置姿勢を推定する上で効果の高い正方形の形状を持った指標とすることができる。   According to the present invention, it becomes possible to embed bit information at a high density while enabling detection of the two-dimensional code not only from a direction directly facing the two-dimensional code but also from an arbitrary direction. In addition, it is possible to obtain an index having a square shape that is highly effective in estimating the camera position and orientation from the index.

以下、添付図面を参照して、本発明をその好適な実施形態に従って詳細に説明する。   Hereinafter, the present invention will be described in detail according to preferred embodiments with reference to the accompanying drawings.

[第1の実施形態]
図1は、本実施形態における2次元コードである。図1(a)の101は2次元コードの背景となる黒い背景であって、102のようにその上に白い正方形外形として2次元コードが形成されている。その外枠からある距離をおいて内部を縦横の長さの等しい互いに隣接し合う六角形に区分する領域を設け、それぞれが黒ないしは白に塗り分けられている。
[First Embodiment]
FIG. 1 shows a two-dimensional code in this embodiment. 101 in FIG. 1A is a black background as a background of the two-dimensional code, and a two-dimensional code is formed as a white square outline on the black background 102. A region is provided that divides the inside into hexagons that are adjacent to each other at a certain distance from the outer frame and that are equal in length and breadth, and each is painted black or white.

各区分された領域と外形正方形との関係は図1(b)に示す通りである。図1(c)に示すものが、個々の縦横の長さの等しい六角形である。この図に示すように、ひとつの六角形の縦と横の長さは、それぞれ共にsであり、右辺左辺のそれぞれ中間点に頂点をもち、上辺下辺上の右辺左辺からs/4の距離の位置に頂点をもつ。図1(d)に示す103、104、105、106は、後述するステップS303からS306で利用する正方形外形の4頂点に近接する4つの小六角形領域である。それぞれ、あらかじめ定めた白、黒、黒、黒の順で塗り分けられている。   The relationship between each segmented area and the outer square is as shown in FIG. What is shown in FIG.1 (c) is the hexagon which each length of length and width equals. As shown in this figure, the length and width of one hexagon are both s, each having a vertex at the middle point of the left side of the right side, and a distance of s / 4 from the left side of the right side on the lower side of the upper side. Has a vertex at the position. 103, 104, 105, and 106 shown in FIG. 1D are four small hexagonal areas that are close to the four vertices of the square outline used in steps S 303 to S 306 described later. Each of them is painted in the order of predetermined white, black, black, and black.

この2次元コードを読み取る2次元コード検出装置の好適な構成例に関して以下に説明する。図2は、図1で示した2次元コードを検出する2次元コード検出装置の構成例を示すブロック図である。   A preferred configuration example of a two-dimensional code detection device that reads this two-dimensional code will be described below. FIG. 2 is a block diagram illustrating a configuration example of the two-dimensional code detection apparatus that detects the two-dimensional code illustrated in FIG. 1.

図2の201はカメラであり、図1で示した2次元コードを撮像する。撮像画像は、202の画像取り込み部を通して204のバスコントローラの調停のもと、205のメモリに書き込まれる。また、205のメモリには、本実施形態の処理手順が記憶されていて、203がその処理手順に従って処理を行うCPUである。204は、203のCPU、202の画像取り込み部、205のメモリ間でデータの入出力と調停を行うバスコントローラである。   Reference numeral 201 in FIG. 2 denotes a camera that images the two-dimensional code shown in FIG. The captured image is written in the memory 205 through the image capturing unit 202 and the arbitration of the bus controller 204. A processing procedure of the present embodiment is stored in the memory 205, and a CPU 203 performs processing according to the processing procedure. Reference numeral 204 denotes a bus controller that performs input / output and arbitration of data between the CPU 203, the image capturing unit 202, and the memory 205.

この図2で示したブロック図で構成される2次元コード検出装置の処理手順を示すフローチャートを図3に示し、図3を用いて処理手順を説明する。   FIG. 3 is a flowchart showing a processing procedure of the two-dimensional code detection apparatus configured by the block diagram shown in FIG. 2, and the processing procedure will be described with reference to FIG.

まず、ステップS301にて図1に示した2次元コードを201のカメラで撮影し、撮影した画像を202の画像取り込み部を通して取得する。得られた画像からステップS302にて、画像に映った2次元コードの外形形状である四角形を検出する。カメラでの撮影は指標に正対する姿勢で撮影されるとは限らない(むしろMR用途で利用する場合、様々な角度から撮影されることになる)上に、画像の横軸縦軸と指標の外形である正方形の辺の向きもそろっていない。   First, in step S301, the two-dimensional code shown in FIG. 1 is photographed by the camera 201, and the photographed image is acquired through the image capturing unit 202. In step S302, a quadrangle that is the outer shape of the two-dimensional code shown in the image is detected from the obtained image. Shooting with a camera is not always taken in a posture that faces the index (rather, when used in MR applications, it will be shot from various angles), and the horizontal axis of the image and the index The direction of the square side that is the outer shape is not aligned.

このステップS302の外形形状を検出する処理を図4を用いて説明する。図4(a)は指標を正対する位置から見た様子であり、内部のビット領域を省略して描いたものである。ここでは、一旦、内部のビット領域に関しては無視をして説明をする。この指標を実際のカメラで撮影すると例えば図4(b)のような画像を得ることとなる。指標が図形として正方形であっても、カメラで撮影される際には正対した位置からの撮影を行わない限り、このように正方形ではない凸四角形として観察されることとなり、かつその向きは任意の向きを採り得る。さらに、図形上での白領域と黒領域は、それぞれ明度の高低として捉えられることとなり、境界領域では中間調の明度として得られる。そこで、図4(b)の画像を二値化することによって図4(c)のように二値画像化する。二値化の方法はどのような方法でも構わないが、単純な閾値処理によって実現できる。この二値画像から、白領域の外周を形成している画素を追跡検出すると、図4(d)のような一画素幅で閉ループをなす画素の並びを得ることができる。この画素の並びに対して、折れ線近似処理を行うと、図4(e)に示す四角形が得られる。このとき、元の図形が四角形以外の図形である場合、折れ線近似の結果折れ点が4点とはならないため、元の図形が四角形であったか否かを判別することができる。また、以上のS302の説明において、指標の内部のビット領域に関して無視をしたが、内部のビット領域と正方形外形との間には間隔が設けてあるため、指標が画像中で占める大きさがある一定以上ある場合(その間隔が画像上で1画素幅以上ある状態で撮影されている場合)には、このS302の処理に関して内部の領域は影響しない。   The process of detecting the outer shape in step S302 will be described with reference to FIG. FIG. 4 (a) is a view from the position where the index is directly facing, and is drawn with the internal bit area omitted. Here, the internal bit area will be ignored for explanation. When this index is photographed with an actual camera, for example, an image as shown in FIG. 4B is obtained. Even if the index is a square as a figure, it will be observed as a convex quadrangle that is not a square in this way, unless it is taken from a directly facing position, and the orientation is arbitrary The direction can be taken. Further, the white area and the black area on the figure are respectively regarded as high and low brightness, and are obtained as halftone brightness in the boundary area. Therefore, by binarizing the image of FIG. 4B, a binary image is formed as shown in FIG. Any method of binarization may be used, but it can be realized by simple threshold processing. When the pixels forming the outer periphery of the white region are tracked and detected from this binary image, it is possible to obtain an array of pixels that form a closed loop with a single pixel width as shown in FIG. When a polygonal line approximation process is performed on this pixel arrangement, a quadrangle shown in FIG. 4E is obtained. At this time, if the original figure is a figure other than a quadrangle, the number of break points is not four as a result of the broken line approximation, and therefore it can be determined whether or not the original figure is a quadrangle. Further, in the above description of S302, the internal bit area of the index is ignored, but since there is a space between the internal bit area and the square outline, there is a size that the index occupies in the image. If there is a certain distance or more (when the interval is taken with a width of one pixel or more on the image), the internal area does not affect the processing of S302.

次にステップS303にて、検出された四角形外形形状を基準として、図1(d)の103、104、105、106に示す2次元コードの4頂点に近接する小六角形領域の画像面上での中心位置を計算する。これを図5を用いて説明する。図5に示すように、指標元来の図形形状である正方形の各頂点を(Xn、Yn)(n=0、1、2、3)と表し、画面中で検出された外形形状である四角形の各頂点を(xn、yn)と表すと、それらの間には以下の式に示す2次元射影変換の関係が成り立つ。   Next, in step S303, on the image plane of the small hexagonal region adjacent to the four vertices of the two-dimensional code shown by 103, 104, 105, 106 in FIG. Calculate the center position of. This will be described with reference to FIG. As shown in FIG. 5, each vertex of a square that is the original graphic shape of the index is represented as (Xn, Yn) (n = 0, 1, 2, 3), and is a quadrilateral that is an outer shape detected on the screen. When each vertex is represented as (xn, yn), the relationship of the two-dimensional projective transformation shown in the following equation is established between them.

Figure 2007172596
Figure 2007172596

この関係式は、以下のように同次変換により行列演算によって記述することも可能である。   This relational expression can also be described by matrix operation by homogeneous transformation as follows.

Figure 2007172596
Figure 2007172596

このとき、行列   At this time, the matrix

Figure 2007172596
Figure 2007172596

は、ホモグラフィ行列と呼ばれる。(Xn、Yn)と(xn、yn)とは、対応する点が4点あるため、数1あるいは数2に示す関係式が4つ成り立つ。言い換えると連立方程式を解くことによって、数3に示すホモグラフィ行列、あるいは、数1のH11、H12、H13、H21、H22、H23、H31、H32の8つのパラメータをその4点の関係から求めることができる。 Is called a homography matrix. Since (Xn, Yn) and (xn, yn) have four corresponding points, four relational expressions shown in Equation 1 or Equation 2 hold. In other words, by solving the simultaneous equations, the homography matrix shown in Equation 3 or the eight parameters H11, H12, H13, H21, H22, H23, H31, and H32 in Equation 1 are obtained from the relationship between the four points. Can do.

以上により、一旦数1あるいは数2の関係式が得られれば、空間(X、Y)上の任意の点を空間(x、y)上の点へと写像することが可能となる。すなわち、指標の内部の任意の点が、画像に映った際に画像上でどの位置に投影されているのかを求めることができる。ここで、103、104、105、106の中心点は、正方形の対角線上にあることが重要となる。上下の辺と左右の辺との間の間隔は均等である。そのため、2次元コードの外形正方形がどのような向きで画面に撮影されていようとも、検出された四角形の外形を基準として、画像上での4つの小六角形領域の中心点を求めることができる。ただし、それぞれを外形四角形のみから区別することはできない。言い換えると、ステップS303では、103、104、105、106のそれぞれを区別することはしないまま、4つの小六角形領域の中心点を求める処理を行う。   As described above, once the relational expression 1 or 2 is obtained, an arbitrary point on the space (X, Y) can be mapped to a point on the space (x, y). That is, it is possible to determine at which position an arbitrary point inside the index is projected on the image when it appears in the image. Here, it is important that the center points of 103, 104, 105, and 106 are on the diagonal of the square. The spacing between the upper and lower sides and the left and right sides is equal. Therefore, the center point of the four small hexagonal regions on the image can be obtained on the basis of the detected quadrilateral outline, regardless of the orientation of the outline square of the two-dimensional code. . However, it is not possible to distinguish each from the outline rectangle alone. In other words, in step S303, processing for obtaining the center points of the four small hexagonal regions is performed without distinguishing each of 103, 104, 105, and 106.

次にステップS304にて、得られた4つの小六角形領域の中心位置の明度値を取得する。ステップS303にて得られている4点の位置は、撮像された四角形の外形形状を基にして、正方形が撮像されるときに起こる射影変換によって計算されたものであるため、整数値とはならない。したがって、対応する画素を直接的に表すものではない。そこで、その位置の明度を最近傍となる画素値とするか、もしくは、近傍4画素の値を基にして線形補間などの方法によって内挿することによって求める。これを図6を用いて説明する。ステップS303で得られている小領域の画像上での中心位置が601であるとする。601の座標値は整数値とはならないので、画像の画素の中心ではない。その601の点の明度値を求める処理というのが、ステップS304の処理である。最近傍点の画素値とするという処理とは、602にその中心点が最も近い画素である画素602の画素値によって601の明度値を代用するという意味である。近傍4画素の画素値から線形補間などの方法によって内挿するという処理とは、画素602、603、604、605の画素値から、601の明度値を内挿計算するという意味である。   Next, in step S304, the brightness value of the center position of the obtained four small hexagonal regions is acquired. The positions of the four points obtained in step S303 are not integer values because they are calculated by projective transformation that occurs when a square is imaged based on the imaged square outer shape. . Therefore, the corresponding pixel is not directly represented. Therefore, the lightness at that position is set to the pixel value that is the nearest neighbor, or is obtained by interpolation by a method such as linear interpolation based on the values of the four neighboring pixels. This will be described with reference to FIG. It is assumed that the center position on the image of the small area obtained in step S303 is 601. Since the coordinate value 601 is not an integer value, it is not the center of the pixel of the image. The process of obtaining the brightness value of the point 601 is the process of step S304. The process of setting the pixel value of the nearest neighbor point means that the lightness value of 601 is substituted by the pixel value of the pixel 602 whose center point is closest to 602. The process of interpolating from the pixel values of the four neighboring pixels by a method such as linear interpolation means that the lightness value of 601 is interpolated from the pixel values of the pixels 602, 603, 604, and 605.

次にステップS305にて、得られた明度値を白か黒かの二値に変換する。最も簡便な方法は、予め定めておいた閾値との比較によって、白か黒かを判定する方法である。予め定めておいた閾値として、ステップS302で行った画像の二値化の時に利用した閾値を利用してもよいし、他のいかなる方法を用いても構わない。以上のステップS303からステップS305までの処理により、2次元コードの4頂点に近接する4つの小六角形領域の白黒の判定が行えた。この結果を基にして、ステップS306にて、2次元コードの画像面内での回転方向を決定する。これは、103、104、105、106はあらかじめ白、黒、黒、黒、で塗り分けられていることを利用して、ステップS304の処理結果と照合して、それぞれを特定する処理である。   In step S305, the obtained brightness value is converted into a binary value of white or black. The simplest method is a method for determining whether the color is white or black by comparing with a predetermined threshold value. As the predetermined threshold value, the threshold value used when binarizing the image performed in step S302 may be used, or any other method may be used. Through the above processing from step S303 to step S305, it is possible to determine whether the four small hexagonal areas adjacent to the four vertices of the two-dimensional code are black and white. Based on this result, the rotation direction of the two-dimensional code in the image plane is determined in step S306. This is a process of identifying each of 103, 104, 105, and 106 by comparing with the processing result of step S304 using the fact that white, black, black, and black are pre-colored.

以上によって、2次元コードが画像面内にどのように射影変換によって変形して撮影されているか、および、画像面内でどのような回転方向となっているのかを特定できた。この結果を基にして、内部のビット領域の読み出し処理に移る。ステップS307では、図1(b)に示す個々のいずれかビット領域(図1(d)の103、104、105、106以外)の中心点を数1もしくは数2を用いて、画像上での位置を計算する。次に、ステップS308にて、その画像上での中心点の位置の明度値を取得する。この明度値を取得する処理は、ステップS304で行っている処理と同様である。得られた明度値を、ステップS309にてビット値に変換する。これは、ステップS305にて、4つの小六角形の明度値を二値に変換したときと同様な処理であり、閾値との大小判定などによって達成される。ステップS310で、すべてのビット領域の処理が終わったかどうかを判定し、ステップS307からステップS309までの処理をすべてのビット領域に対して処理がなされるまで繰り返す。また、ステップS309をステップS308とステップS310との間ではなく、ステップS310にてすべてのビット領域での処理が終わった後の工程に組み入れても良い。その場合、ステップS307、S308、S310にて、すべての内部ビット領域に渡って各内部のビット領域の明度値が取得されている状態となっているので、その後得られている明度値の分布を基準にして、それぞれをビット値への変換するといった処理を行うことも可能である。   As described above, it was possible to specify how the two-dimensional code was deformed and photographed in the image plane by the projective transformation and in what rotation direction in the image plane. Based on this result, the internal bit area reading process is started. In step S307, the center point of any one of the bit areas shown in FIG. 1B (other than 103, 104, 105, and 106 in FIG. 1D) is used on the image using Equation 1 or Equation 2. Calculate the position. Next, in step S308, the brightness value of the position of the center point on the image is acquired. The process for acquiring the brightness value is the same as the process performed in step S304. The obtained brightness value is converted into a bit value in step S309. This is the same processing as when the lightness values of the four small hexagons are converted into binary values in step S305, and is achieved by determining the size of the threshold value. In step S310, it is determined whether or not all the bit areas have been processed, and the processes from step S307 to step S309 are repeated until all the bit areas are processed. In addition, step S309 may be incorporated not in the interval between step S308 and step S310 but in the step after the processing in all the bit areas is completed in step S310. In this case, in steps S307, S308, and S310, the brightness value of each internal bit area is acquired over all the internal bit areas. It is also possible to perform processing such as converting each into a bit value based on the reference.

以上により、本実施形態における正方形を外形形状とし、内部を互いに隣接する縦横の長さの等しい小六角形領域で区分した2次元コードからビット値を読み出す処理の説明を行った。正方形外形から内部の縦横の長さの等しい六角形の検出装置および検出方法に関して説明を行ったが、このような2次元コードが従来技術にある課題を解決できる理由を図7を用いて以下に詳細に説明する。   As described above, the process of reading the bit value from the two-dimensional code in which the square in the present embodiment is the outer shape and the inside is divided by the adjacent small hexagonal regions having the same vertical and horizontal lengths has been described. The description has been given regarding the hexagonal detection device and the detection method having the same vertical and horizontal lengths from the square outer shape. The reason why such a two-dimensional code can solve the problems in the prior art will be described below with reference to FIG. This will be described in detail.

図7(a)は、図1(b)と同じ図であり、本実施形態で利用する正方形外形の内部に縦横の長さが等しい互いに隣接し合う六角形のビット領域が配置されている図である。これに対して、図7(b)は、従来技術2の2次元コード5と同様な方法でビット領域を設けた場合であり、内部が互いに隣接し合う正方形で構成されている。それぞれ1つのビット領域をハッチングしている。一見すると図7(a)の一つの領域は、図7(b)の一つの領域に比較して小さく見えるが、図7(c)に示す通り、重ねて描くと図7(b)の正方形の周囲に若干の隙間があるだけである。これらの2次元コードは、上述したように任意の向きからカメラによって撮影されることとなるので、カメラで撮像されたときのそれぞれの像を重ねて描くと、例えば、図7(d)に示すようになる。ここで、カメラは通常、格子状に並んだ画素を持っていて、それぞれの画素の画素値として外界の明度や色を取得するものであるので、図6を利用してステップS303およびステップS307の説明で述べたように、この投影領域の中心を基準として、最近傍点や4近傍点の画素値から、このビット領域の明度や色を取得することとなる。この図7(d)に示すように、ビット領域が正方形であった場合に、ビット領域が六角形であった場合と比較して画像上で面積が増える領域は、中心から離れた四角形の頂点付近となる。これは、中心の明度値や色を取得するときに、ほとんど影響を与えないことを意味する。2次元コードはカメラに対して様々な角度で撮影されることを前提としているため、中心点から一定の距離を一つのビット領域とすること、すなわち、できるだけ円に近い方が、一つあたりのビット領域の面積を少なくすることが可能である。言い換えれば、図7(a)と図7(b)の2次元コードは、様々な角度から撮影されることを前提とした場合、全体外形がカメラに映った大きさが等しいとしたときのビットを正しく読み出すことが可能な下限のサイズがほぼ等しい。それにも関わらず、図7(a)には、18個のビット領域があるのに対して、図7(b)には16個のビット領域しかない。このように本発明によれば、2次元コードの最小認識サイズを悪化させることなく、多くのビットを記録することを可能とすることができる。   FIG. 7A is the same diagram as FIG. 1B, and is a diagram in which hexagonal bit regions adjacent to each other having the same vertical and horizontal lengths are arranged inside the square outline used in the present embodiment. It is. On the other hand, FIG. 7B shows a case where a bit area is provided by the same method as that of the two-dimensional code 5 of the prior art 2, and the inside is composed of squares adjacent to each other. Each bit area is hatched. At first glance, one region in FIG. 7A looks smaller than one region in FIG. 7B, but as shown in FIG. There are only a few gaps around. Since these two-dimensional codes are photographed by the camera from an arbitrary direction as described above, when the respective images taken by the camera are overlaid, for example, as shown in FIG. It becomes like this. Here, since the camera usually has pixels arranged in a lattice pattern and acquires the brightness and color of the outside world as the pixel value of each pixel, step S303 and step S307 are performed using FIG. As described in the description, the brightness and color of this bit area are acquired from the pixel values of the nearest neighbor point and the four neighboring points with the center of the projection area as a reference. As shown in FIG. 7 (d), when the bit area is a square, the area where the area increases on the image compared to the case where the bit area is a hexagon is a vertex of a rectangle away from the center. Nearby. This means that there is little effect when obtaining the central brightness value or color. Since the two-dimensional code is premised on being photographed at various angles with respect to the camera, a certain distance from the center point is set as one bit area, that is, the one near the circle as much as possible It is possible to reduce the area of the bit region. In other words, the two-dimensional code shown in FIGS. 7A and 7B is a bit when the entire outer shape is equal to the size reflected in the camera, assuming that the images are taken from various angles. Are substantially equal in size to the lower limit that can be read correctly. Nevertheless, FIG. 7A has 18 bit areas, whereas FIG. 7B has only 16 bit areas. As described above, according to the present invention, it is possible to record many bits without deteriorating the minimum recognition size of the two-dimensional code.

また、内部の六角形の縦横の長さを等しくすることにも以下のような利点がある。MR用途でこのような2次元コードを指標として利用するとき、その形状が正方形であることには重要な意味がある。正方形であれば、カメラの位置姿勢を推定するときに、その正方形を観察する向きに特定の指向性が発生せず、様々な角度から観察することが可能となる。そこで、正方形の外形のまま、もしも、内部の六角形を正六角形とした場合、正方形外形に対して周囲の隙間を均等にしながら内部に隣接して配置することが困難になる。例えば、図15のように、上下の隙間が左右の隙間に比較して広い配置とすることとなる。言い換えると、正方形頂点に近接する小六角形領域の中心点が、図1(d)と異なり正方形の頂点を基準としたときに上下方向と左右方向とで対称な位置とならない(対角線上にない)。そのため、ステップS303からステップS306の処理によって、四角形外形の検出結果から四角形の画像面上での回転方向を決定することはできない。各ビット領域の位置は、正方形外形の上下方向と左右方向とで対称な配置ではないため、画像面内での回転方向を決定した後でなければ、外形形状の検出結果のみから各ビット領域の中心点を求めることはできない。それに対して、縦横の長さが等しい六角形を用いる場合、図1(d)に示す通り、外形の正方形に対して、正方形頂点に最も隣接するビット領域の中心点の位置を、正方形の頂点を基準としたときに上下方向と左右方向とで対称な位置とすることができる。それ以外のビット領域に関しては、その4つのビット領域によって四角形の回転方向を決定した後に、中心点を計算すればよい。なお、従来技術2で述べた2次元コード5のように、正方形外形とは別にその外部に指標を設けることによって、正方形の画面上での回転方向を決定することも可能であるが、その場合、指標の全体サイズが大きくなってしまう。そのような大きな面積を指標に割り当てることができるのであれば、より大きな正方形とすることが可能であり、本発明によればより多くのビットを割り当てることが可能になる。   In addition, making the internal hexagonal length and width equal also has the following advantages. When such a two-dimensional code is used as an index in MR applications, it is important to have a square shape. If it is a square, when the position and orientation of the camera are estimated, a specific directivity does not occur in the direction of observing the square, and it is possible to observe from various angles. Therefore, if the internal hexagon is a regular hexagon while maintaining the square outer shape, it is difficult to dispose the hexagonal shape adjacent to the inside of the square outer shape while making the peripheral gaps uniform. For example, as shown in FIG. 15, the upper and lower gaps are wider than the left and right gaps. In other words, unlike the case of FIG. 1D, the center point of the small hexagonal region adjacent to the square vertex does not have a symmetrical position in the vertical direction and the horizontal direction when the square vertex is used as a reference (not on the diagonal line). ). Therefore, the rotation direction on the quadrilateral image plane cannot be determined from the detection result of the quadrilateral outline by the processing from step S303 to step S306. Since the position of each bit area is not symmetrically arranged in the vertical and horizontal directions of the square outline, it is only after the rotation direction in the image plane is determined that only the bit area is determined based on the detection result of the outline. The center point cannot be obtained. On the other hand, when hexagons having the same vertical and horizontal lengths are used, as shown in FIG. 1D, the position of the center point of the bit area closest to the square vertex is set to the square vertex as shown in FIG. The position can be symmetrical in the vertical direction and the horizontal direction with reference to. For the other bit areas, the center point may be calculated after determining the rotation direction of the quadrangle by the four bit areas. In addition, as in the two-dimensional code 5 described in the prior art 2, it is possible to determine the rotation direction on the square screen by providing an index outside the square outer shape. , The overall size of the indicator will increase. If such a large area can be allocated to the index, it can be a larger square, and according to the present invention, more bits can be allocated.

また、より多くのビットを表現したい場合には、図16に示すようにより多くのビット領域を配置してもよい。このように、内部のビット領域を縦横の長さが等しい六角形とすることによって、正方形に配置することが容易となる。   If more bits are desired to be expressed, more bit areas may be arranged as shown in FIG. In this way, the internal bit region is formed in a hexagonal shape having equal vertical and horizontal lengths, so that it can be easily arranged in a square.

[変形例]
本発明の好適な実施形態として、個々のビット領域は白黒に塗り分けられていて、その明度を閾値判定することによって1/0である二値に変換する方法を説明したが、複数の明度を利用してn値に変換する方法であってもよいし、個々のビット領域を複数の色によって塗り分けても良い。その場合であっても、ニアレストネイバー法、あるいは双一次補間法などの近傍画素からの補間法によって、個々の領域の色を取得できることに変わりはない。得られた色を複数(m個)の登録済み色候補の中から最も確からしいものとして選択することによって、m個の状態に変換することができる。
[Modification]
As a preferred embodiment of the present invention, a method has been described in which individual bit areas are separately painted in black and white, and the lightness is converted to a binary value of 1/0 by determining a threshold value. It may be a method of converting it into n values by using it, or each bit area may be painted with a plurality of colors. Even in such a case, the color of each region can still be acquired by the interpolation method from neighboring pixels such as the nearest neighbor method or the bilinear interpolation method. By selecting the obtained color as the most probable color from a plurality (m) of registered color candidates, it is possible to convert it to m states.

また、背景から分離する外形形状である正方形の地を白とし、内部のビット領域を白黒によって表現する場合に関して説明を行ったが、地は黒であってもよいし、他の明度や色であってもよい。さらには、図8に示すように、地を白とした2次元コードと地を黒とした2次元コードを混在利用し、地の色により1ビットを追加表現するようにしてもよい。   In addition, a case has been described in which a square ground, which is an outer shape separated from the background, is white, and an internal bit area is expressed in black and white. However, the ground may be black, or other brightness or color. There may be. Further, as shown in FIG. 8, a two-dimensional code in which the ground is white and a two-dimensional code in which the ground is black may be used together to additionally express one bit depending on the color of the ground.

また、2次元コードの回転方向を決定するための103、104、105、106を、それぞれ白、黒、黒、黒として説明を行ったが、これは、黒、白、白、白などの他のパターンでもよい。さらには、白、黒、黒、黒の2次元コードと、黒、白、白、白の2次元コードを混在利用し、その違いによって1ビットを追加表現するようにしてもよい。   In addition, although 103, 104, 105, and 106 for determining the rotation direction of the two-dimensional code have been described as white, black, black, and black, this is not limited to black, white, white, white, etc. The pattern of Furthermore, a white, black, black, black two-dimensional code and a black, white, white, white two-dimensional code may be mixedly used, and one bit may be additionally expressed depending on the difference.

[他の実施例]
また、上述の実施形態で説明した指標識別装置と同等の機能を複数の機器から構成されるシステムによって実現しても良い。
[Other embodiments]
Moreover, you may implement | achieve the function equivalent to the parameter | index identification apparatus demonstrated by the above-mentioned embodiment with the system comprised from several apparatus.

尚、前述した実施形態の機能を実現するソフトウェアのプログラムを、記録媒体から直接、或いは有線/無線通信を用いて当該プログラムを実行可能なコンピュータを有するシステム又は装置に供給し、そのシステム或いは装置のコンピュータが該供給されたプログラムを実行することによって同等の機能が達成される場合も本発明に含む。   A software program that realizes the functions of the above-described embodiments is supplied directly from a recording medium or to a system or apparatus having a computer that can execute the program using wired / wireless communication. The present invention includes a case where an equivalent function is achieved by a computer executing the supplied program.

従って、本発明の機能処理をコンピュータで実現するために、該コンピュータに供給、インストールされるプログラムコード自体も本発明を実現するものである。つまり、本発明の機能処理を実現するためのコンピュータプログラム自体も本発明に含まれる。   Accordingly, the program code itself supplied and installed in the computer in order to implement the functional processing of the present invention by the computer also realizes the present invention. That is, the computer program itself for realizing the functional processing of the present invention is also included in the present invention.

その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等、プログラムの形態を問わない。   In this case, the program may be in any form as long as it has a program function, such as an object code, a program executed by an interpreter, or script data supplied to the OS.

プログラムを供給するための記録媒体としては、例えば、フレキシブルディスク、ハードディスク、磁気テープ等の磁気記録媒体、MO、CD−ROM、CD−R、CD−RW、DVD−ROM、DVD−R、DVD−RW等の光/光磁気記憶媒体、不揮発性の半導体メモリなどがある。   As a recording medium for supplying the program, for example, a magnetic recording medium such as a flexible disk, a hard disk, a magnetic tape, MO, CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-R, DVD- There are optical / magneto-optical storage media such as RW, and non-volatile semiconductor memory.

有線/無線通信を用いたプログラムの供給方法としては、コンピュータネットワーク上のサーバに本発明を形成するコンピュータプログラムそのもの、もしくは圧縮され自動インストール機能を含むファイル等、クライアントコンピュータ上で本発明を形成するコンピュータプログラムとなりうるデータファイル(プログラムデータファイル)を記憶し、接続のあったクライアントコンピュータにプログラムデータファイルをダウンロードする方法などが挙げられる。この場合、プログラムデータファイルを複数のセグメントファイルに分割し、セグメントファイルを異なるサーバに配置することも可能である。   As a program supply method using wired / wireless communication, a computer program forming the present invention on a server on a computer network, or a computer forming the present invention on a client computer such as a compressed file including an automatic installation function A method of storing a data file (program data file) that can be a program and downloading the program data file to a connected client computer can be used. In this case, the program data file can be divided into a plurality of segment files, and the segment files can be arranged on different servers.

つまり、本発明の機能処理をコンピュータで実現するためのプログラムデータファイルを複数のユーザに対してダウンロードさせるサーバ装置も本発明に含む。   That is, the present invention includes a server device that allows a plurality of users to download a program data file for realizing the functional processing of the present invention on a computer.

また、本発明のプログラムを暗号化してCD−ROM等の記憶媒体に格納してユーザに配布し、所定の条件を満たしたユーザに対して暗号化を解く鍵情報を、例えばインターネットを介してホームページからダウンロードさせることによって供給し、その鍵情報を使用することにより暗号化されたプログラムを実行してコンピュータにインストールさせて実現することも可能である。   In addition, the program of the present invention is encrypted, stored in a storage medium such as a CD-ROM, distributed to the user, and key information for decrypting the encryption for a user who satisfies a predetermined condition is provided via a homepage via the Internet, for example. It is also possible to realize the program by downloading it from the computer and executing the encrypted program using the key information and installing it on the computer.

また、コンピュータが、読み出したプログラムを実行することによって、前述した実施形態の機能が実現される他、そのプログラムの指示に基づき、コンピュータ上で稼動しているOSなどが、実際の処理の一部または全部を行ない、その処理によっても前述した実施形態の機能が実現され得る。   In addition to the functions of the above-described embodiments being realized by the computer executing the read program, the OS running on the computer based on the instruction of the program is a part of the actual processing. Alternatively, the functions of the above-described embodiment can be realized by performing all of them and performing the processing.

さらに、記録媒体から読み出されたプログラムが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行ない、その処理によっても前述した実施形態の機能が実現され得る。   Furthermore, after the program read from the recording medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion board or The CPU of the function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments can also be realized by the processing.

第1の実施形態の2次元コードの構成図である。It is a block diagram of the two-dimensional code of 1st Embodiment. 第1の実施形態の2次元コード検出装置を表すブロック図である。It is a block diagram showing the two-dimensional code detection apparatus of 1st Embodiment. 第1の実施形態の2次元コード検出装置が行う処理のフローチャートである。It is a flowchart of the process which the two-dimensional code detection apparatus of 1st Embodiment performs. 2次元コードの外形正方形を検出する方法を説明するための模式図である。It is a schematic diagram for demonstrating the method to detect the external shape square of a two-dimensional code. 元来の2次元コードの外形正方形と、それが画像映ったときの形状との対応を示し、その間の射影変換を説明するための模式図である。FIG. 6 is a schematic diagram for illustrating the correspondence between the original square shape of the two-dimensional code and the shape when the image is projected, and explaining the projective transformation between them. 2次元コード面上でのある特定のビット領域の中心点とその近傍画素との関係を示す模式図である。It is a schematic diagram which shows the relationship between the center point of a certain specific bit area on a two-dimensional code surface, and its vicinity pixel. 第一の実施形態の2次元コードと従来技術の2次元コードの一つあたりのビット領域の比較を説明する模式図である。It is a schematic diagram explaining the comparison of the bit area | region per one of the two-dimensional code of 1st Embodiment, and the two-dimensional code of a prior art. 2次元コードとして、白い地の色の上にビット領域をもつ場合と、黒い地の色の上にビット領域とをもつ場合を示す図である。It is a figure which shows the case where it has a bit area | region on the color of a white background, and the case where it has a bit area | region on the color of a black background as a two-dimensional code. 従来利用されていた正方形形状を基本とした指標の例であり、2次元コードの一種である。It is an example of an index based on a square shape that has been conventionally used, and is a kind of two-dimensional code. 従来利用されていた正方形形状を基本とした指標の例であり、2次元コードの一種である。It is an example of an index based on a square shape that has been conventionally used, and is a kind of two-dimensional code. 従来利用されていた正方形形状を基本とした指標の例であり、2次元コードの一種である。It is an example of an index based on a square shape that has been conventionally used, and is a kind of two-dimensional code. 従来利用されていた正方形形状を基本とした指標の例であり、2次元コードの一種である。It is an example of an index based on a square shape that has been conventionally used, and is a kind of two-dimensional code. 従来利用されていた正方形形状を基本とした指標の例であり、2次元コードの一種である。It is an example of an index based on a square shape that has been conventionally used, and is a kind of two-dimensional code. 従来利用されていた正方形形状を基本とした指標の例であり、2次元コードの一種である。It is an example of an index based on a square shape that has been conventionally used, and is a kind of two-dimensional code. 正方形外形に正六角形のビット領域を配置した場合の構成図である。It is a block diagram at the time of arrange | positioning the bit area of a regular hexagon to a square external shape. 多ビット化したの2次元コードの構成例を示す図である。It is a figure which shows the structural example of the two-dimensional code made multi-bit.

Claims (9)

背景と明度または色によって識別可能な多角形の外形形状と、該外形形状の内部の外周に一定の間隔をおいて配置された内部領域とを有し、前記内部領域を特定のサイズに分割し、該分割領域それぞれの明度または色によって、情報を表現する2次元コードであって、
前記分割領域が縦横の長さが等しい六角形であること特徴とする2次元コード。
A polygonal outer shape that can be identified by the background and brightness or color, and an inner region arranged at a predetermined interval on the outer periphery of the outer shape, and dividing the inner region into a specific size , A two-dimensional code representing information by the brightness or color of each of the divided areas,
The two-dimensional code characterized in that the divided regions are hexagons having equal vertical and horizontal lengths.
前記外形形状は四角形であることを特徴とする請求項1記載の2次元コード。   The two-dimensional code according to claim 1, wherein the outer shape is a quadrangle. 前記四角形の外形形状の4頂点のそれぞれに近接する6角形の形状を有する4つの分割領域は、前記2次元コードの回転方向を決定するために使用されることを特徴とする請求項1記載の2次元コード。   The four divided regions having a hexagonal shape adjacent to each of the four vertices of the quadrangular outer shape are used to determine a rotation direction of the two-dimensional code. Two-dimensional code. 画像から2次元コードの外形形状を検出する外形形状検出工程と、
前記検出された外形形状に応じて、内部のビット領域の位置を特定するビット領域特定工程と、
前記特定されたビット領域の明度または色に基づいてビット値を取得するビット値取得工程とを有し、
前記2次元コードは、背景と明度または色によって識別可能な多角形の外形形状と、該外形形状の内部の外周に一定の間隔をおいて配置された内部領域とを有し、該内部領域は、縦横の長さが等しい六角形の形状を有する複数のビット領域が配置されていることを特徴とする2次元コード検出方法。
An outer shape detecting step for detecting the outer shape of the two-dimensional code from the image;
According to the detected outer shape, a bit area specifying step for specifying the position of the internal bit area;
A bit value acquisition step of acquiring a bit value based on the brightness or color of the identified bit region,
The two-dimensional code has a polygonal outer shape that can be identified by a background and brightness or color, and an inner region arranged at a predetermined interval on the outer periphery of the outer shape, A two-dimensional code detection method, wherein a plurality of bit areas having a hexagonal shape with equal vertical and horizontal lengths are arranged.
前記外形形状は四角形であることを特徴とする請求項4記載の2次元コード検出方法。   The two-dimensional code detection method according to claim 4, wherein the outer shape is a quadrangle. さらに、四角形の外形形状の4頂点のそれぞれに近接する6角形の形状を有する4つのビット領域のビット値に基づき、前記2次元コードの回転方向を決定する回転方向決定工程を有することを特徴とする請求項4記載の2次元コード検出方法。   And a rotation direction determining step for determining a rotation direction of the two-dimensional code based on bit values of four bit areas having a hexagonal shape adjacent to each of the four vertices of the quadrangular outer shape. The two-dimensional code detection method according to claim 4. 前記ビット領域特定工程は、前記外形形状検出工程において検出された外形形状と物理的な外形形状との間の関係から、2次元射影変換に相当する情報を算出し、該2次元射影変換相当の情報からビット領域の画像における位置を計算することを特徴とする請求項4に記載の2次元コード検出方法。   The bit area specifying step calculates information corresponding to the two-dimensional projective transformation from the relationship between the outer shape detected in the outer shape detecting step and the physical outer shape, and corresponds to the two-dimensional projective transformation. 5. The two-dimensional code detection method according to claim 4, wherein the position of the bit region in the image is calculated from the information. コンピュータに、請求項4乃至7のいずれかに記載の2次元コード検出方法を実行させるためのコンピュータプログラム。   A computer program for causing a computer to execute the two-dimensional code detection method according to claim 4. 請求項8記載のコンピュータプログラムを、コンピュータ読み取り可能に格納した記録媒体。   A recording medium storing the computer program according to claim 8 in a computer-readable manner.
JP2006317188A 2005-11-24 2006-11-24 Two-dimensional code, and method and apparatus for detecting the same Withdrawn JP2007172596A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006317188A JP2007172596A (en) 2005-11-24 2006-11-24 Two-dimensional code, and method and apparatus for detecting the same

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005339079 2005-11-24
JP2006317188A JP2007172596A (en) 2005-11-24 2006-11-24 Two-dimensional code, and method and apparatus for detecting the same

Publications (1)

Publication Number Publication Date
JP2007172596A true JP2007172596A (en) 2007-07-05

Family

ID=38299018

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006317188A Withdrawn JP2007172596A (en) 2005-11-24 2006-11-24 Two-dimensional code, and method and apparatus for detecting the same

Country Status (1)

Country Link
JP (1) JP2007172596A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2423883A2 (en) 2010-08-26 2012-02-29 Canon Kabushiki Kaisha Information processing device and method for mixed reality
JP2013196470A (en) * 2012-03-21 2013-09-30 Denso Wave Inc Two-dimensional code reader
WO2016121126A1 (en) * 2015-01-30 2016-08-04 株式会社日立製作所 Two-dimensional code, two-dimensional code read device, and encoding method
US9548014B2 (en) 2014-08-04 2017-01-17 Canon Kabushiki Kaisha Information processing apparatus and information processing method
CN113781590A (en) * 2021-09-15 2021-12-10 江苏航空职业技术学院 AprilTag code arrangement and identification method suitable for different camera view angles

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2423883A2 (en) 2010-08-26 2012-02-29 Canon Kabushiki Kaisha Information processing device and method for mixed reality
US8797355B2 (en) 2010-08-26 2014-08-05 Canon Kabushiki Kaisha Information processing device and method of processing information
JP2013196470A (en) * 2012-03-21 2013-09-30 Denso Wave Inc Two-dimensional code reader
US9548014B2 (en) 2014-08-04 2017-01-17 Canon Kabushiki Kaisha Information processing apparatus and information processing method
WO2016121126A1 (en) * 2015-01-30 2016-08-04 株式会社日立製作所 Two-dimensional code, two-dimensional code read device, and encoding method
CN113781590A (en) * 2021-09-15 2021-12-10 江苏航空职业技术学院 AprilTag code arrangement and identification method suitable for different camera view angles
CN113781590B (en) * 2021-09-15 2023-08-01 江苏航空职业技术学院 Arrangement and identification method of april tag codes suitable for different camera angles

Similar Documents

Publication Publication Date Title
US7942340B2 (en) Two-dimensional code, and method and apparatus for detecting two-dimensional code
US7438232B2 (en) Two-dimensional code and information processing method
JP4916167B2 (en) Index identification method and index identification device
KR101801217B1 (en) Two-dimensional code
US7146036B2 (en) Multiframe correspondence estimation
JP4868186B2 (en) Marker generation and marker detection system, method and program
JP4739004B2 (en) Information processing apparatus and information processing method
US20110157179A1 (en) Method and system for providing augmented reality based on marker tracking, and computer program product thereof
JP2007129709A (en) Method for calibrating imaging device, method for calibrating imaging system including arrangement of imaging devices, and imaging system
JP5773436B2 (en) Information terminal equipment
JP5791826B2 (en) 2D code
JP2000227309A (en) Three-dimensional position posture sensing device
JP2007142495A (en) Planar projector and planar projection program
JP4502361B2 (en) Index attitude detection method and apparatus
US20210407189A1 (en) Information processing apparatus, information processing method, and program
JP2007172596A (en) Two-dimensional code, and method and apparatus for detecting the same
Joris et al. HemoVision: An automated and virtual approach to bloodstain pattern analysis
WO2019188316A1 (en) Image processing device, image processing method, and program
JP4804125B2 (en) Two-dimensional code, two-dimensional code detection method, and two-dimensional code detection apparatus
US8121389B2 (en) System, apparatus, method and computer program product for optical position recognition
JP4282067B2 (en) Index identification method and apparatus
JP5056063B2 (en) Image processing apparatus and image processing program
JP4351090B2 (en) Image processing apparatus and image processing method
WO2019188194A1 (en) Method for determining center of pattern on lens marker, device for same, program for causing computer to execute said determination method, and recording medium for program
JP4497880B2 (en) Index identification method and apparatus

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20100202