JP2006110888A - Object - Google Patents

Object Download PDF

Info

Publication number
JP2006110888A
JP2006110888A JP2004301311A JP2004301311A JP2006110888A JP 2006110888 A JP2006110888 A JP 2006110888A JP 2004301311 A JP2004301311 A JP 2004301311A JP 2004301311 A JP2004301311 A JP 2004301311A JP 2006110888 A JP2006110888 A JP 2006110888A
Authority
JP
Japan
Prior art keywords
image
code
game card
cell
corner
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004301311A
Other languages
Japanese (ja)
Inventor
Masanori Takano
政徳 高野
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.)
Sony Interactive Entertainment Inc
Original Assignee
Sony Computer Entertainment 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 Sony Computer Entertainment Inc filed Critical Sony Computer Entertainment Inc
Priority to JP2004301311A priority Critical patent/JP2006110888A/en
Publication of JP2006110888A publication Critical patent/JP2006110888A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a two-dimensional code which can be accurately recognized. <P>SOLUTION: This game card 4 is equipped with a first image part which puts a prescribed image into a visually recognizable state in a first direction, and a second image part which puts the two-dimensional code into a visually recognizable state in a second direction. The first image part is formed by displaying a character image etc. on the surface of an object, and the second image part is formed of a light reflection restricting member which puts the two-dimensional code into the visually recognizable state in the second direction by permitting the reflection of light in the first direction, and restricting the reflection of the light in the second direction. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、2次元コードを保持した物体に関する。   The present invention relates to an object holding a two-dimensional code.

近年、2次元コードをカメラで撮像してコードデータを認識し、そのコードデータに対応付けられた所定の処理を実行させる技術が普及している。1次元バーコードと比較すると、2次元コードの方がコード化できる情報量が多く、現在では様々な種類の2次元コードが登場するようになっている。2次元コードのコードデータは、画像データから効率よく且つ正確に読み取られる必要がある。このような状況をふまえて、従来、2次元コードの画像認識に関する技術を提案するものがある(例えば、特許文献1参照)。
特開2000−82108号公報
In recent years, a technique for recognizing code data by capturing a two-dimensional code with a camera and executing a predetermined process associated with the code data has become widespread. Compared to one-dimensional barcodes, two-dimensional codes have more information that can be encoded, and various types of two-dimensional codes are now available. The code data of the two-dimensional code needs to be read efficiently and accurately from the image data. In view of such a situation, there has been proposed a technique related to image recognition of a two-dimensional code (for example, see Patent Document 1).
JP 2000-82108 A

2次元コードの読取精度を向上させるためには、コードデータ自体を大きく表現すればよいが、一方で、2次元コードを印刷する対象物の大きさに制限がある場合、必然的にコードの大きさも制限されることになる。そのため、例えばカードのような必ずしも大きくはない物体に2次元コードを印刷すると、カード全面に2次元コードを配置する必要が生じ、他の画像などを印刷するスペースがなくなって、デザイン性が優れているとは言い難い。また、2次元コードは印刷することでカードに記録されるため、複写機により簡単にコピーすることができ、偽造物が出回ることでカードの価値が下がるという問題もある。   In order to improve the reading accuracy of the two-dimensional code, the code data itself may be expressed in a large size. On the other hand, if the size of the object on which the two-dimensional code is printed is limited, the size of the code is inevitably increased. It will also be limited. Therefore, for example, when a two-dimensional code is printed on an object that is not necessarily large, such as a card, it is necessary to place the two-dimensional code on the entire surface of the card, and there is no space for printing other images and the design is excellent. It ’s hard to say. In addition, since the two-dimensional code is recorded on the card by printing, there is a problem that the card can be easily copied by a copying machine, and the value of the card is lowered when counterfeit goods are circulated.

本発明は、デザイン性の向上および/または偽造防止に配慮した2次元コードを保持する物体を提供することを目的とする。   An object of the present invention is to provide an object that holds a two-dimensional code in consideration of improvement in design and / or prevention of forgery.

上記課題を解決するために、本発明のある態様は、少なくとも第1の方向において所定の画像を視認可能な状態とする第1画像部と、第1の方向とは異なる第2の方向において2次元コードを視認可能な状態とする第2画像部とを備える物体を提供する。この物体はカードなどの2次元的なオブジェクトであってもよく、また3次元オブジェクトであってもよい。第1画像部はユーザから視認可能であればよく、第2画像は撮像装置から視認可能であればよい。第1画像部は、第1の方向においてユーザから視認可能であればよいが、第2の方向においてもユーザから視認可能であってよい。また、第2画像部は、第1の方向において僅かに視認可能とされてもよいが、第2の方向における視認性の方が高いことが必要である。   In order to solve the above-described problem, an aspect of the present invention includes a first image portion that makes a predetermined image visible in at least a first direction, and a second direction that is different from the first direction. An object is provided that includes a second image portion that makes the dimension code visible. This object may be a two-dimensional object such as a card or a three-dimensional object. The first image portion only needs to be visible from the user, and the second image only needs to be visible from the imaging device. The first image unit may be visible from the user in the first direction, but may be visible from the user in the second direction. The second image portion may be slightly visible in the first direction, but it is necessary that the visibility in the second direction is higher.

本発明によると、デザイン性の向上および/または偽造防止に配慮した2次元コードを提供することができる。   According to the present invention, it is possible to provide a two-dimensional code in consideration of improvement in design and / or prevention of forgery.

図1は、本発明の実施例にかかるゲームシステム1の構成を示す。ゲームシステム1は、撮像装置2、画像処理装置10および出力装置6を備える。画像処理装置10は、画像解析装置20およびゲーム装置30を備える。画像解析装置20およびゲーム装置30は別装置として構成されてもよいが、一体として構成されてもよい。撮像装置2は、CCD撮像素子またはMOS撮像素子などから構成されるビデオカメラであり、例えば320画素×240画素の解像度を有する。撮像装置2は実空間を所定の周期で撮像して、周期ごとのフレーム画像を生成する。撮像領域5は撮像装置2により撮像される範囲であり、撮像装置2の高さや向きを調整することで、撮像領域5の位置や大きさが調整される。ゲームプレイヤは、撮像領域5において、実オブジェクトであるゲームカード4を指で動かす。ゲームカード4は、自身を一意に識別するための2次元コードを有して構成される。本実施例において、ゲームカード4は、見る角度によって少なくとも2種類の異なる見え方を提供する。本実施例では、ゲームカード4が、第1の方向において所定の画像を視認可能な状態とする第1画像部と、第2の方向において2次元コードを視認可能な状態とする第2画像部とを有して構成される。   FIG. 1 shows a configuration of a game system 1 according to an embodiment of the present invention. The game system 1 includes an imaging device 2, an image processing device 10, and an output device 6. The image processing device 10 includes an image analysis device 20 and a game device 30. The image analysis device 20 and the game device 30 may be configured as separate devices, but may be configured as a single unit. The imaging device 2 is a video camera configured by a CCD imaging device or a MOS imaging device, and has a resolution of 320 pixels × 240 pixels, for example. The imaging device 2 images the real space at a predetermined cycle and generates a frame image for each cycle. The imaging region 5 is a range where the imaging device 2 captures an image, and the position and size of the imaging region 5 are adjusted by adjusting the height and direction of the imaging device 2. The game player moves the game card 4 that is a real object with a finger in the imaging area 5. The game card 4 has a two-dimensional code for uniquely identifying itself. In this embodiment, the game card 4 provides at least two different appearances depending on the viewing angle. In the present embodiment, the game card 4 has a first image portion in which a predetermined image is visible in the first direction, and a second image portion in which the two-dimensional code is visible in the second direction. And is configured.

図2は、ゲームプレイヤおよび撮像装置がゲームカードを異なる方向から見ている状態を示す。ユーザがゲームカード4を第1の方向、例えば正面から見た場合、ゲームカード4は、所定の画像を視認可能な状態とする。なお正面から見ることは、ゲームカード4を台3に載置した状態で、ユーザが上方からゲームカード4を見る状態に相当し、すなわちゲーム中にゲームカード4を操作する通常の状況である。この画像は、例えばキャラクタ画像であってよく、これによりゲームプレイヤにとってのゲームカード4の価値を高めることができ、また複数のゲームカード4が存在する場合に、ユーザが容易にゲームカード4を区別することが可能となる。   FIG. 2 shows a state where the game player and the imaging device are looking at the game card from different directions. When the user views the game card 4 from the first direction, for example, from the front, the game card 4 is in a state where a predetermined image can be visually recognized. Note that viewing from the front corresponds to a state where the user views the game card 4 from above with the game card 4 placed on the table 3, that is, a normal situation in which the game card 4 is operated during the game. This image may be, for example, a character image, which can increase the value of the game card 4 for the game player, and when there are a plurality of game cards 4, the user can easily distinguish the game card 4. It becomes possible to do.

図3は、ゲームカードにおける第1画像部を示す。第1画像部22は、ユーザがゲームカード4を正面から見た場合に、キャラクタ画像を視認可能な状態とする。具体的に、第1画像部22は、ゲームカード4の表面にキャラクタ画像を表示(描画)することで形成される。このキャラクタは、ゲームアプリケーションに登場するキャラクタであってもよく、また一般に人気のあるキャラクタであってもよい。このようなキャラクタをゲームカード4に描くことで、ユーザのゲームカード4に対する愛着を高め、ゲームカード4の価値を高くする。これにより、ゲームカード4自体に商品価値を持たせることができ、単にゲームアプリケーションと抱き合わせた販売形態だけでなく、ゲームカード単独の販売流通も可能となる。   FIG. 3 shows a first image portion in the game card. The first image unit 22 makes the character image visible when the user views the game card 4 from the front. Specifically, the first image portion 22 is formed by displaying (drawing) a character image on the surface of the game card 4. This character may be a character appearing in a game application, or may be a generally popular character. By drawing such a character on the game card 4, the user's attachment to the game card 4 is enhanced and the value of the game card 4 is increased. Thereby, the game card 4 itself can be given commercial value, and it is possible to sell and distribute the game card alone as well as a sales form simply tying it with the game application.

図2に戻って、撮像装置2がゲームカード4を第2の方向、例えばゲームカード4に対して約30度の角度から見た場合、ゲームカード4は2次元コードを撮像装置2に対して視認可能な状態とする。撮像装置2をゲームカード4の正面に配置すると、撮像装置2は図3に示すキャラクタ画像を撮像することになるが、本実施例では、ゲームカード4に対して撮像方向が正面(90度)以外の角度となるように撮像装置2を配置する。   Returning to FIG. 2, when the imaging device 2 views the game card 4 in the second direction, for example, an angle of about 30 degrees with respect to the game card 4, the game card 4 sends a two-dimensional code to the imaging device 2. Make it visible. When the imaging device 2 is arranged in front of the game card 4, the imaging device 2 captures the character image shown in FIG. 3, but in this embodiment, the imaging direction is the front (90 degrees) with respect to the game card 4. The imaging device 2 is arranged so as to have an angle other than.

図4は、ゲームカードにおける第2画像部を示す。第2画像部24は、撮像装置2がゲームカード4を斜め方向から見た場合に、2次元コードを視認可能な状態とする。2次元コードは撮像装置2から視認可能であればよく、必ずしもユーザにより視認可能な状態で存在していなくてもよい。なお、図4に示す第2画像部24は、実際には斜め方向から撮像装置2により撮像されるものであるため、ゲームカード4の縦横の比率は正面から見た図3のゲームカード4とは異なってくるが、ここでは便宜上、縦横比率を同一のものとして示している。   FIG. 4 shows a second image portion in the game card. The second image unit 24 makes the two-dimensional code visible when the imaging device 2 views the game card 4 from an oblique direction. The two-dimensional code need only be visible from the imaging device 2 and does not necessarily exist in a state that can be visually recognized by the user. Note that the second image section 24 shown in FIG. 4 is actually picked up by the image pickup device 2 from an oblique direction, so the aspect ratio of the game card 4 is the same as that of the game card 4 of FIG. However, for the sake of convenience, the aspect ratio is shown as the same.

本実施例において、第2画像部24は、ゲームカード4の表面に、正面からの光の反射を許容し、且つ斜め方向における光の反射を制限することで、斜め方向において2次元コードを視認可能な状態とする光反射制限部材を配置することにより形成される。2次元コードは、図中に示す黒色部分と白色部分の位置関係により表現される。この光反射制限部材は偏光部材であってよく、斜め方向における光の反射を遮断することで、2次元コードの黒色部分を見せる役割を果たす。偏光部材は、例えば樹脂材料により形成されてもよい。また、光反射制限部材は、テレビ石(鉱物名:ウレックサイト(ulexite))のような光学特性を有する材料で形成することも可能であり、テレビ石の代わりに、極細の細線を縦方向に束ねて、縦方向からの透明性を実現し、縦方向以外からの非透明性を実現するものを利用してもよい。図4のゲームカード4において、黒色で示す部分に偏光部材が配置され、白色で示す部分には偏光部材が配置されていない。この偏光部材は、例えば、その平行面(0度)から所定の角度までの間の角度から見られたときに、ゲームカード4の表面を不可視状態にし、所定の角度から垂直(90度)までの間の角度から見られたときに、ゲームカード4の表面を可視状態にする。すなわち、光反射制限部材は、ゲームカード4の表面の視野角を制限し、不可視となる角度において撮像装置2から撮像されることで、光を反射しない黒色部分が2次元コードのエレメントとして処理される。   In the present embodiment, the second image unit 24 allows the front surface of the game card 4 to reflect light from the front and restricts light reflection in the oblique direction, thereby visually recognizing the two-dimensional code in the oblique direction. It is formed by disposing a light reflection limiting member that is in a possible state. The two-dimensional code is expressed by the positional relationship between the black part and the white part shown in the drawing. This light reflection limiting member may be a polarizing member and plays a role of showing a black portion of the two-dimensional code by blocking light reflection in an oblique direction. The polarizing member may be formed of a resin material, for example. The light reflection limiting member can also be formed of a material having optical characteristics such as TV stone (mineral name: ulexite). It is also possible to use a material that realizes transparency from the vertical direction and realizes non-transparency from other than the vertical direction. In the game card 4 of FIG. 4, the polarizing member is arranged in the portion shown in black, and the polarizing member is not arranged in the portion shown in white. For example, when the polarizing member is viewed from an angle between the parallel plane (0 degrees) and a predetermined angle, the surface of the game card 4 is made invisible, and from the predetermined angle to the vertical (90 degrees). When viewed from an angle between, the surface of the game card 4 is made visible. In other words, the light reflection limiting member limits the viewing angle of the surface of the game card 4 and is imaged from the imaging device 2 at an invisible angle, so that a black portion that does not reflect light is processed as an element of a two-dimensional code. The

光反射制限部材が配置されたゲームカード4の表面は、ユーザからは視認可能とされ、一方で撮像装置2からは視認不可とされる必要があるため、可視および不可視の境界となる角度は、ユーザが通常ゲームカード4を見る角度、および撮像装置2が通常ゲームカード4を撮像する角度を基準として定められることが好ましい。本実施例では、光反射制限部材として、可視および不可視の境界となる角度が例えば30度から45度の間にある偏光特性を有する偏光部材を利用する。なお、この角度は、ゲームカード4の向きにかかわらず一定であることが好ましく、すなわち、撮像装置2に対してゲームカード4を台3上で回転させた場合であっても、偏光部材が存在する領域は、撮像装置2により常に黒色と認識されることが好ましい。   Since the surface of the game card 4 on which the light reflection limiting member is arranged needs to be visible from the user, but cannot be viewed from the imaging device 2, the angle that becomes the boundary between visible and invisible is It is preferable that the angle at which the user views the normal game card 4 and the angle at which the imaging device 2 images the normal game card 4 are determined as a reference. In this embodiment, as the light reflection limiting member, a polarizing member having a polarization characteristic in which an angle that becomes a visible and invisible boundary is between 30 degrees and 45 degrees, for example, is used. Note that this angle is preferably constant regardless of the orientation of the game card 4, that is, even when the game card 4 is rotated on the table 3 with respect to the imaging device 2, there is a polarizing member. It is preferable that the area to be recognized is always recognized as black by the imaging device 2.

図5は、図4に示す2次元コードの黒色部分を偏光部材で形成して、ゲームカード4を正面から見た状態を示す。現在、市販されている偏光部材には、第2の方向への光反射をほぼ100%遮断するものはあるが、第1の方向への光反射をほぼ100%許容するものはあまりない。そのため、そのような偏光部材を使用すると、正面からゲームカード4を見た場合に、図示のように表面からの反射光の一部が遮断され、偏光部材を配置した部分が少し灰色がかって見えることになる。しかしながら、これは、キャラクタ画像の視認性に影響を与えるものではない。すなわち、正面からゲームカード4を見た場合に、偏光部材は薄い半透明部材として視認され、斜め方向から見た場合に偏光部材が黒い非透明部材として視認されることとは一線を画する。第2画像部24の生成方法として、例えば、偏光部材を所定の位置に配した一枚のシートをゲームカード4の表面に貼り付けてもよく、また、所定の形状に作成した偏光部材のそれぞれを、ゲームカード4の表面に貼り付けてもよい。   FIG. 5 shows a state in which the black portion of the two-dimensional code shown in FIG. 4 is formed with a polarizing member and the game card 4 is viewed from the front. Currently, some commercially available polarizing members block almost 100% of light reflection in the second direction, but few allow light reflection in the first direction of almost 100%. Therefore, when such a polarizing member is used, when the game card 4 is viewed from the front, a part of the reflected light from the surface is blocked as shown in the figure, and the portion where the polarizing member is arranged appears a little grayish. It will be. However, this does not affect the visibility of the character image. That is, the polarizing member is visually recognized as a thin translucent member when the game card 4 is viewed from the front, and the polarizing member is visually recognized as a black non-transparent member when viewed from an oblique direction. As a method for generating the second image portion 24, for example, a single sheet in which a polarizing member is arranged at a predetermined position may be attached to the surface of the game card 4, and each polarizing member created in a predetermined shape is used. May be affixed to the surface of the game card 4.

図6は、図4に示した2次元コードにおける各セルの位置関係を説明するための図である。既述したように、これらのセルは偏光部材により構成されており、ここでは、複数の所定形状をもつ多角形セルが所定の配列規則にしたがって2次元的に配置されている状態を示している。   FIG. 6 is a diagram for explaining the positional relationship between the cells in the two-dimensional code shown in FIG. As described above, these cells are composed of polarizing members, and here, a state is shown in which polygon cells having a plurality of predetermined shapes are two-dimensionally arranged according to a predetermined arrangement rule. .

具体的に、ゲームカード4の2次元コードは、撮像装置2により撮像された画像データからゲームカード4の認識処理を行うための基準となる基準セル100、複数の方形セル106を2次元配置することでコードデータを構成するコードデータ部分102、コードデータ部分102を取り囲むように配置される複数のコーナーセル104a、104b、104c、104d(以下、総称する場合は、「コーナーセル104」と呼ぶ)を備えている。コードデータ部分102およびコーナーセル104は、2次元コードにおけるコード部110に存在している。   Specifically, the two-dimensional code of the game card 4 is a two-dimensional arrangement of a reference cell 100 and a plurality of rectangular cells 106 serving as a reference for performing recognition processing of the game card 4 from image data captured by the imaging device 2. Code data portion 102 constituting the code data, and a plurality of corner cells 104a, 104b, 104c, 104d arranged to surround the code data portion 102 (hereinafter collectively referred to as “corner cell 104”) It has. The code data portion 102 and the corner cell 104 exist in the code portion 110 in the two-dimensional code.

基準セル100、方形セル106およびコーナーセル104は、それぞれ所定の形状を有して構成される。領域108は、複数の方形セル106が連結して構成されたものであり、他の方形セル106とともにコードデータを構成している。実施例のゲームカード4が複数存在する場合に、基準セル100およびコーナーセル104の配置および大きさは共通とされ、コードデータ部分102における方形セル106の配列により、ゲームカード4を一意に特定することができる。   The reference cell 100, the square cell 106, and the corner cell 104 are each configured to have a predetermined shape. The area 108 is formed by connecting a plurality of rectangular cells 106 and constitutes code data together with other rectangular cells 106. When there are a plurality of game cards 4 in the embodiment, the arrangement and size of the reference cell 100 and the corner cell 104 are common, and the game card 4 is uniquely specified by the arrangement of the rectangular cells 106 in the code data portion 102. be able to.

以下に、本実施例における2次元コードの詳細を説明する。正方形状の方形セル106の1辺を1ブロックとすると、基準セル100は、7ブロック分の横方向の長辺と1.5ブロック分の縦方向の短辺で形成される長方形状のセル(エレメント)として構成される。実施例において、縦1ブロックと横1ブロックで形成される正方形状の領域をブロック領域と呼ぶ。   Details of the two-dimensional code in this embodiment will be described below. Assuming that one side of the square-shaped square cell 106 is one block, the reference cell 100 is a rectangular cell (with a long side in the horizontal direction of 7 blocks and a short side in the vertical direction of 1.5 blocks ( Element). In the embodiment, a square area formed by one vertical block and one horizontal block is called a block area.

コードデータ部分102は、7ブロック×7ブロックで囲まれる領域に形成される。この領域の一辺は、基準セル100の長辺に平行であり且つ長辺から1ブロック離れた位置に配置される。図示のように、コード部110は、8ブロック×8ブロックで囲まれる領域であり、コードデータ部分102は、コード部110が形成される領域に含まれる。実際に方形セル106が配置される領域は、7ブロック×7ブロックで囲まれる領域の4隅における2ブロック×2ブロックの領域を除いた部分とする。すなわち、4隅の2ブロック×2ブロックの領域には方形セル106を配置させないこととし、したがって、(7×7−2×2×4)=33のブロック領域に方形セル106が配置されて、コードデータを構成する。   The code data portion 102 is formed in an area surrounded by 7 blocks × 7 blocks. One side of this region is parallel to the long side of the reference cell 100 and is arranged at a position one block away from the long side. As shown in the figure, the code part 110 is an area surrounded by 8 blocks × 8 blocks, and the code data part 102 is included in the area where the code part 110 is formed. The area where the square cells 106 are actually arranged is a portion excluding the area of 2 blocks × 2 blocks at the four corners of the area surrounded by 7 blocks × 7 blocks. That is, the rectangular cell 106 is not arranged in the area of 2 blocks × 2 blocks at the four corners. Therefore, the rectangular cell 106 is arranged in the block area of (7 × 7−2 × 2 × 4) = 33, Configure code data.

コーナーセル104aは、コード部110の左上隅の領域に配置される。この左上隅の領域は、コードデータ部分102として7ブロック×7ブロックで囲まれる領域の左上隅の2ブロック×2ブロックの領域の範囲内であってよく、またその範囲内からはみ出してもよい。図示の例では、コーナーセル104aが、コードデータ部分102における左上隅の2ブロック×2ブロックの領域から縦に0.5ブロック分、横に0.5ブロック分だけはみ出して配置されている。すなわち、コーナーセル104aは、コード部110において2.5ブロック×2.5ブロックで囲まれる左上隅の領域に存在している。同様に、コーナーセル104bはコード部110の右上隅の領域に配置され、コーナーセル104cはコード部110の右下隅の領域に配置され、コーナーセル104dはコード部110の左下隅の領域に配置される。図示の例では、各コーナーセル104は方形に形成され、具体的には1辺を1.5ブロック分の長さとする正方形のセルとして形成されている。   The corner cell 104 a is disposed in the upper left corner area of the code portion 110. This upper left corner area may be within the range of the area of 2 blocks × 2 blocks at the upper left corner of the area surrounded by 7 blocks × 7 blocks as the code data portion 102, or may extend beyond the range. In the example shown in the figure, the corner cell 104a is arranged to protrude 0.5 blocks vertically and 0.5 blocks horizontally from the 2 block × 2 block region in the upper left corner of the code data portion 102. That is, the corner cell 104a exists in the upper left corner region surrounded by 2.5 blocks × 2.5 blocks in the code portion 110. Similarly, the corner cell 104b is disposed in the upper right corner region of the code portion 110, the corner cell 104c is disposed in the lower right corner region of the code portion 110, and the corner cell 104d is disposed in the lower left corner region of the code portion 110. The In the example shown in the drawing, each corner cell 104 is formed in a square shape, specifically, a square cell with one side having a length of 1.5 blocks.

コードデータ部分102は、1ブロック領域を1ビットとすると、合計で33ビット分の情報をコード化することができる。この33ビット中、9ビット分は、コードデータが、正しいコードデータであることを確かめるためのチェックデータを構成する。従って、コードデータ部分102には、24ビット分の情報がコード化されている。   In the code data portion 102, if one block area is 1 bit, information of 33 bits in total can be encoded. Of these 33 bits, 9 bits constitute check data for confirming that the code data is correct code data. Therefore, information for 24 bits is encoded in the code data portion 102.

方形セル106は、コードデータを表現する重要なエレメントであり、画像解析装置20において正確に画像認識される必要がある。そのためには、全ての方形セル106を大きく形成することが理想的であるが、当然のことながらゲームカード4の大きさには制約があり、方形セル106を大きくすることは、それだけコードデータ部分102を構成する方形セル106の数を減じる結果となる。これは情報のビット数を減らすことに相当し、好ましくない。   The rectangular cell 106 is an important element that expresses code data, and needs to be accurately recognized by the image analysis apparatus 20. For that purpose, it is ideal to make all the square cells 106 large, but naturally the size of the game card 4 is limited, and the enlargement of the square cells 106 is equivalent to the code data portion. As a result, the number of rectangular cells 106 constituting the number 102 is reduced. This corresponds to reducing the number of bits of information and is not preferable.

以上のことから、本実施例において、コーナーセル104は、方形セル106よりも大きな面積を有して構成される。後述するが、本実施例の画像解析装置20において、4隅のコーナーセル104は、コードデータ部分102を検出するために利用される。逆に言えば、4隅のコーナーセル104を検出できなければ、方形セル106を検出することもできないため、この2次元コードでは、方形セル106よりもコーナーセル104をまず確実に認識する必要がある。4隅のコーナーセル104を方形セル106よりも大きく形成することで、4隅のコーナーセル104の認識率を高めることができる。   From the above, in this embodiment, the corner cell 104 is configured to have a larger area than the square cell 106. As will be described later, in the image analysis apparatus 20 of this embodiment, the corner cells 104 at the four corners are used to detect the code data portion 102. In other words, if the corner cells 104 at the four corners cannot be detected, the square cell 106 cannot be detected. Therefore, in this two-dimensional code, it is necessary to first reliably recognize the corner cells 104 rather than the square cells 106. is there. By forming the four corner cells 104 larger than the square cells 106, the recognition rate of the four corner cells 104 can be increased.

図1に戻って、出力装置6は、表示装置であるディスプレイ7を有する。出力装置6は、さらにスピーカ(図示せず)を有して構成されてもよい。基本的に画像処理装置10は、撮像装置2により撮像されたフレーム画像をディスプレイ7に表示させ、その際に、ゲームカード4上に仮想オブジェクトであるキャラクタを重畳するように表示制御する。プレイヤは、ディスプレイ7を見ることで、ゲームカード4が撮像領域5に入っているか容易に確認でき、入っていない場合には、ゲームカード4の位置をずらしたり、また撮像装置2の向きを調整して、撮像装置2にゲームカード4を撮像させるようにする。   Returning to FIG. 1, the output device 6 includes a display 7 which is a display device. The output device 6 may further include a speaker (not shown). Basically, the image processing apparatus 10 displays the frame image captured by the imaging apparatus 2 on the display 7, and controls display so that a character that is a virtual object is superimposed on the game card 4. The player can easily check whether or not the game card 4 is in the imaging area 5 by looking at the display 7. If not, the player can shift the position of the game card 4 or adjust the orientation of the imaging device 2. Then, the imaging device 2 is caused to image the game card 4.

実施例のゲームアプリケーションでは、プレイヤがゲームカード4に対して所定の操作を施すことにより、キャラクタを動作させる。このゲームアプリケーションの性質上、プレイヤにゲームカード4とキャラクタとの一体性を認識させることが好ましく、そのため、キャラクタの画像を、ゲームカード4に重ね合わせて表示させている。撮像領域5内でゲームカード4をゆっくりと移動させると、キャラクタは、ゲームカード4の上に乗った状態を維持しながら、ゲームカード4の動きに追従して一緒に移動する。   In the game application of the embodiment, the player operates the character by performing a predetermined operation on the game card 4. Due to the nature of the game application, it is preferable that the player recognize the unity between the game card 4 and the character, and therefore, the character image is displayed superimposed on the game card 4. When the game card 4 is slowly moved within the imaging area 5, the character moves together following the movement of the game card 4 while maintaining the state of riding on the game card 4.

以上のキャラクタの動きは、画像処理装置10により制御される。まず、画像解析装置20は、撮像装置2において取得されたフレーム画像から、ゲームカード4の画像情報を抽出する。さらに、画像解析装置20は、ゲームカード4の画像情報から、ゲームカード4に配置された2次元コードを抽出する。このとき、画像解析装置20は、ゲームカード4の2次元コードから、ゲームカード4の空間における位置情報、方向情報、距離情報などを決定する。   The movement of the above characters is controlled by the image processing apparatus 10. First, the image analysis device 20 extracts image information of the game card 4 from the frame image acquired by the imaging device 2. Further, the image analysis device 20 extracts a two-dimensional code arranged on the game card 4 from the image information of the game card 4. At this time, the image analysis device 20 determines position information, direction information, distance information, and the like in the space of the game card 4 from the two-dimensional code of the game card 4.

後述するが、画像解析装置20は、フレーム画像中のゲームカード4の画像における基準セル100および4隅のコーナーセル104を用いて、撮像装置2とゲームカード4との距離やゲームカード4の向きなどを計算して求める。これにより、キャラクタは、ゲームカード4上にて前方を向くように表示制御される。また、2次元コードにおける複数の方形セルの配列から、ゲームカード4のコードデータを取得する。   As will be described later, the image analysis device 20 uses the reference cell 100 and the four corner cells 104 in the image of the game card 4 in the frame image to determine the distance between the imaging device 2 and the game card 4 and the orientation of the game card 4. Calculate and so on. As a result, the character is controlled to face forward on the game card 4. Further, the code data of the game card 4 is acquired from the array of a plurality of rectangular cells in the two-dimensional code.

画像解析装置20において画像解析された結果は、ゲーム装置30に送られる。なお、撮像装置2において撮像されたフレーム画像が、ゲーム装置30に送られて、ゲーム装置30側で画像解析を行ってもよい。この場合、画像処理装置10は、ゲーム装置30のみで構成されることになる。   The result of the image analysis performed by the image analysis device 20 is sent to the game device 30. Note that the frame image captured by the imaging device 2 may be sent to the game device 30 and image analysis performed on the game device 30 side. In this case, the image processing apparatus 10 is configured by only the game apparatus 30.

ゲーム装置30は、画像解析装置20における画像解析結果をもとに、ディスプレイ7の表示画面上で、キャラクタをゲームカード4の上に位置するように表示制御する。キャラクタは、ゲームカード4から抽出したコードデータに対応付けられて、ゲームシーンごとに適宜割り当てられてもよい。この場合、ゲームシーンが切り替わると、表示されるキャラクタも切り替わることになる。なお、ゲームカード4の表面に印刷されているキャラクタとコードデータにより割り当てられるキャラクタとを同一のものとしてもよく、この場合には、プレイヤがゲームカード4とゲーム中のキャラクタとの関係を容易に認識することができる。   The game apparatus 30 performs display control so that the character is positioned on the game card 4 on the display screen of the display 7 based on the image analysis result in the image analysis apparatus 20. The character may be associated with the code data extracted from the game card 4 and appropriately assigned for each game scene. In this case, when the game scene is switched, the displayed character is also switched. Note that the character printed on the surface of the game card 4 and the character assigned by the code data may be the same. In this case, the player can easily relate the relationship between the game card 4 and the character in the game. Can be recognized.

画像解析装置20は、フレーム画像中の基準セル100の候補を抽出して所定の基準を満たすものを基準セル100として仮定し、その仮定した基準セル100の近傍に4つのコーナーセル104が存在しているか否かを判定する。4つのコーナーセル104を認識すると、画像解析装置20は、4つのコーナーセル104により囲まれた領域、すなわちコードデータ部分102における方形セル106の配置を読み取り、コードデータを取得する。これにより、仮定した基準セル100が真の基準セル100であったことが判断され、ゲームカード4を認識することができる。画像解析装置20は、撮像装置2を基準(原点)とするゲームカード4の仮想3次元座標系における位置と方向を計算して求める。   The image analysis apparatus 20 extracts candidates for the reference cell 100 in the frame image and assumes a reference cell 100 that satisfies a predetermined reference, and there are four corner cells 104 in the vicinity of the assumed reference cell 100. It is determined whether or not. When the four corner cells 104 are recognized, the image analysis apparatus 20 reads the area surrounded by the four corner cells 104, that is, the arrangement of the rectangular cells 106 in the code data portion 102, and acquires code data. Thereby, it is determined that the assumed reference cell 100 is the true reference cell 100, and the game card 4 can be recognized. The image analysis device 20 calculates and obtains the position and direction of the game card 4 in the virtual three-dimensional coordinate system with the imaging device 2 as a reference (origin).

図7は、画像解析装置の構成を示す。画像解析装置20は、フレーム画像取得部40、実オブジェクト抽出部42および状態決定部44を備える。実オブジェクト抽出部42は、2値化処理部50、基準セル検出部52、コード部検出部54、検証処理部56を備える。本実施例における画像解析装置20の処理機能は、CPU、メモリ、メモリにロードされたプログラムなどによって実現され、ここではそれらの連携によって実現される構成を描いている。プログラムは、画像解析装置20に内蔵されていてもよく、また記録媒体に格納された形態で外部から供給されるものであってもよい。したがってこれらの機能ブロックがハードウエアのみ、ソフトウエアのみ、またはそれらの組合せによっていろいろな形で実現できることは、当業者に理解されるところである。図示の例では、画像解析装置20のCPUが、フレーム画像取得部40、実オブジェクト抽出部42、状態決定部44としての機能をもつ。   FIG. 7 shows the configuration of the image analysis apparatus. The image analysis device 20 includes a frame image acquisition unit 40, a real object extraction unit 42, and a state determination unit 44. The real object extraction unit 42 includes a binarization processing unit 50, a reference cell detection unit 52, a code unit detection unit 54, and a verification processing unit 56. The processing function of the image analysis apparatus 20 in the present embodiment is realized by a CPU, a memory, a program loaded in the memory, and the like, and here, a configuration realized by cooperation thereof is illustrated. The program may be built in the image analysis apparatus 20 or may be supplied from the outside in a form stored in a recording medium. Accordingly, those skilled in the art will understand that these functional blocks can be realized in various forms by hardware only, software only, or a combination thereof. In the illustrated example, the CPU of the image analysis device 20 has functions as a frame image acquisition unit 40, a real object extraction unit 42, and a state determination unit 44.

フレーム画像取得部40が、撮像装置2にて撮像された実空間のフレーム画像を取得する。撮像装置2は、周期的にフレーム画像を取得し、好適には1/60秒間隔でフレーム画像を生成する。   The frame image acquisition unit 40 acquires a real space frame image captured by the imaging device 2. The imaging device 2 periodically acquires frame images, and preferably generates frame images at 1/60 second intervals.

実オブジェクト抽出部42は、フレーム画像から実オブジェクト画像、すなわちゲームカード4の画像を抽出する。具体的に、2値化処理部50がフレーム画像を2進数のビット表現に変換して、フレーム画像の情報をビットのオンとオフで表現する。基準セル検出部52は、フレーム画像の2値化データから、基準セル100を検出する。基準セル100を検出すると、コード部検出部54が、基準セル100の位置をもとにコード部110を検出し、検証処理部56が、コード部110に含まれるコードデータの検証処理を行う。   The real object extraction unit 42 extracts a real object image, that is, an image of the game card 4 from the frame image. Specifically, the binarization processing unit 50 converts the frame image into binary bit representation, and expresses the frame image information by turning the bit on and off. The reference cell detection unit 52 detects the reference cell 100 from the binarized data of the frame image. When the reference cell 100 is detected, the code part detection unit 54 detects the code part 110 based on the position of the reference cell 100, and the verification processing unit 56 performs verification processing of the code data included in the code part 110.

状態決定部44は、設定した座標系における実オブジェクトの状態を決定し、具体的には、ゲームカード4の位置、方向および撮像装置2からの距離を決定する。状態決定部44において決定された位置情報、方向情報、距離情報は、2次元コードから取得されたコードデータにそれぞれ関連付けされて、ゲーム装置30に送られる。なお、複数のゲームカード4が撮像領域5に存在する場合には、それぞれのゲームカード4ごとに、位置情報、方向情報、距離情報、コードデータが関連付けされてゲーム装置30に送られる。また、ゲームシステム1では、撮像装置2により撮像されたフレーム画像をディスプレイ7に表示させるため、フレーム画像自体もゲーム装置30に送られる。ゲーム装置30は、コードデータに対応付けられたキャラクタを読み出し、3次元の仮想空間においてゲームカード4とキャラクタとを重畳させて表示させる。   The state determination unit 44 determines the state of the real object in the set coordinate system, and specifically determines the position and direction of the game card 4 and the distance from the imaging device 2. The position information, direction information, and distance information determined by the state determination unit 44 are respectively associated with code data acquired from the two-dimensional code and sent to the game apparatus 30. When a plurality of game cards 4 are present in the imaging area 5, position information, direction information, distance information, and code data are associated with each game card 4 and sent to the game apparatus 30. In the game system 1, the frame image itself is also sent to the game device 30 in order to display the frame image captured by the imaging device 2 on the display 7. The game apparatus 30 reads the character associated with the code data and displays the game card 4 and the character superimposed on each other in a three-dimensional virtual space.

図8は、2次元コードの認識処理の処理手順を示すフローチャートである。2次元コードが撮像装置2により撮像され、その結果得られた1フレーム分の画像データが、フレーム画像取得部40により取得される。2値化処理部50は、画像データに対して2値化処理を行う(S10)。2値化処理では、所定の閾値より大きい輝度を保持する画素の画素値が"0"に符号化され、表示上、その画素は白色とされる。以下においては、このように、画素値が"0"に符号化された画素を、白色画素と称する。一方、閾値以下の輝度値を保持する画素の画素値は、"1"に符号化され、表示上、その画素は黒色とされる。以下においては、このように、画素値が"1"に符号化された画素を、黒色画素と称する。2値化処理部50は、黒色画素が連続して存在する領域を1つの連結領域としてまとめ、抽出された複数の黒色画素連結領域に対して、番号を1から順に昇順で設定(ラベリング)する(S12)。例えば、ラベリングの番号は、連結領域として抽出した順すなわち特定した順に設定されてもよい。番号は、その座標データとともにRAM(図示せず)に記憶させる。図2に示す2次元コードを利用すると、コーナーセル104が方形セル106よりも大きく表示されているため、コーナーセル104を黒色画素連結領域として検出できる確率および座標位置の精度を高くすることができる。   FIG. 8 is a flowchart showing the processing procedure of the recognition process of the two-dimensional code. The two-dimensional code is imaged by the imaging device 2, and image data for one frame obtained as a result is acquired by the frame image acquisition unit 40. The binarization processing unit 50 performs binarization processing on the image data (S10). In the binarization process, the pixel value of a pixel holding a luminance greater than a predetermined threshold is encoded to “0”, and the pixel is white on display. Hereinafter, a pixel whose pixel value is encoded as “0” in this way is referred to as a white pixel. On the other hand, the pixel value of the pixel holding the luminance value below the threshold is encoded as “1”, and the pixel is black on display. Hereinafter, a pixel whose pixel value is encoded as “1” in this way is referred to as a black pixel. The binarization processing unit 50 collects areas in which black pixels are continuously present as one connected area, and sets (labels) the extracted black pixel connected areas in ascending order from 1 in order. (S12). For example, the labeling numbers may be set in the order in which they are extracted as connected regions, that is, in the specified order. The number is stored in a RAM (not shown) together with the coordinate data. When the two-dimensional code shown in FIG. 2 is used, since the corner cell 104 is displayed larger than the square cell 106, the probability that the corner cell 104 can be detected as a black pixel connection region and the accuracy of the coordinate position can be increased. .

本実施例において、2次元コードにおける各セルは、フレーム画像において黒色として取得されるため、2値化処理部50により、黒色画素連結領域として認識される。一方、図3および図5に示したように、ゲームカード4の表面にはキャラクタ画像が表示されている。2値化処理した結果、キャラクタ画像が黒色画素連結領域に含められることは、2次元コードのノイズ成分となって、コード認識に悪影響を与えるため、好ましくない。したがってキャラクタ画像は、2値化処理により白色画素と認識されることが好ましい。   In this embodiment, since each cell in the two-dimensional code is acquired as black in the frame image, the binarization processing unit 50 recognizes it as a black pixel connection region. On the other hand, as shown in FIGS. 3 and 5, a character image is displayed on the surface of the game card 4. As a result of the binarization process, it is not preferable that the character image is included in the black pixel connection region because it becomes a noise component of the two-dimensional code and adversely affects code recognition. Therefore, the character image is preferably recognized as a white pixel by binarization processing.

撮像装置2の受光面の前面にはRGBのカラーフィルタが配置されており、フレーム画像ごとに、RGBのそれぞれの画素値が256階調で表現されたデータとして記録される。2値化処理に際して、例えば赤色(R)の画素値が0〜100、緑色(G)の画素値が0〜100、青色(B)の画素値が0〜100となる複合画素の画素値が"1"に符号化され、2値画像としての色が黒色に設定されるようにする。一方、RGBの少なくとも1つの画素値がこれらの範囲内にない複合画素の画素値は"0"に符号化され、2値画像としての色が白色に設定される。この場合、RGBの画素値の少なくとも1つが閾値である100を上回るようにキャラクタ画像に色づけすることで、キャラクタ画像を白色画素として2値化処理することができる。   An RGB color filter is arranged in front of the light receiving surface of the imaging device 2, and each pixel value of RGB is recorded as data expressed in 256 gradations for each frame image. In the binarization process, for example, the pixel values of the composite pixels in which the red (R) pixel value is 0 to 100, the green (G) pixel value is 0 to 100, and the blue (B) pixel value is 0 to 100 are obtained. It is encoded to “1” so that the color as a binary image is set to black. On the other hand, the pixel value of a composite pixel in which at least one pixel value of RGB is not within these ranges is encoded as “0”, and the color as a binary image is set to white. In this case, the character image can be binarized as a white pixel by coloring the character image so that at least one of the RGB pixel values exceeds the threshold value of 100.

基準セル検出部52は、今回対象とする画像データより前に実行された2次元コード認識処理において、認識された2次元コードの表示上の位置、例えば、基準セル100の中央点が、RAMに記憶されているか否かを判定する(S14)。前フレームにおける基準セル100の中央点がRAMに記憶されている場合(S14のY)、記憶されている位置を基準セル検出処理の開始点として設定する(S16)。前の画像フレームにおいて基準セル100が検出されている場合、今回の画像フレームにおいてもゲームカード4の位置は大きく変化していないことが多いため、前フレームの基準セル100の中央点を利用することで、今回のフレームにおいて効率的に基準セル100を検出することが可能となる。一方、2次元コードの位置がRAMに記憶されていない場合(S14のN)、基準セル検出部52は、ディスプレイ7の表示上の中心点を基準セル検出処理の開始点に設定する(S18)。開始点を設定した後、基準セル検出部52は、基準セル100の検出処理を実行する(S20)。   In the two-dimensional code recognition process executed before the current target image data, the reference cell detection unit 52 displays the recognized position on the display of the two-dimensional code, for example, the center point of the reference cell 100 in the RAM. It is determined whether it is stored (S14). When the center point of the reference cell 100 in the previous frame is stored in the RAM (Y in S14), the stored position is set as the start point of the reference cell detection process (S16). When the reference cell 100 is detected in the previous image frame, the position of the game card 4 is often not changed greatly in the current image frame, so the center point of the reference cell 100 in the previous frame is used. Thus, the reference cell 100 can be efficiently detected in the current frame. On the other hand, when the position of the two-dimensional code is not stored in the RAM (N in S14), the reference cell detection unit 52 sets the center point on the display 7 as the start point of the reference cell detection process (S18). . After setting the starting point, the reference cell detection unit 52 executes the detection process of the reference cell 100 (S20).

図9は、基準セルの検出処理を示すフローチャートである。なお、本フローにて示す画素数は撮像装置2の解像度などに依存し、ここでは理解を容易にするため、一例としての画素数を示すこととする。まず、基準セル検出部52は、図8のS12においてラベリングした黒色画素連結領域の総数Mを読み出し、カウンタの値jを1に初期設定する(S100)。次に、図8のS16またはS18において設定した開始点から、ディスプレイ7の画面上を左回りの渦巻の軌跡に沿って、黒色画素連結領域を探索し、始めに検出した黒色画素連結領域を基準セル候補領域として選択する(S102)。基準セル検出部52は、選択した基準セル候補領域の縁部分を抽出して、短辺および長辺を決定する(S104)。   FIG. 9 is a flowchart showing reference cell detection processing. Note that the number of pixels shown in this flow depends on the resolution of the imaging device 2, and the number of pixels is shown as an example here for easy understanding. First, the reference cell detection unit 52 reads the total number M of black pixel connected regions labeled in S12 of FIG. 8, and initializes a counter value j to 1 (S100). Next, from the start point set in S16 or S18 of FIG. 8, the black pixel connection area is searched along the trace of the counterclockwise spiral on the screen of the display 7, and the black pixel connection area detected first is used as a reference. A cell candidate area is selected (S102). The reference cell detection unit 52 extracts the edge portion of the selected reference cell candidate region, and determines the short side and the long side (S104).

基準セル検出部52は、短辺が所定画素数、例えば20画素以上の画素で構成されているか否かを判定する(S106)。短辺は1.5ブロック分の長さで構成されているが、短辺が20画素より少ない画素で構成されている基準セル100である場合、1ブロックの長さは、さらに少ない数の画素から構成されることとなる。そのため、2次元コードにおける最小の構成要素である方形セル106の一辺は約13画素以下となり、撮像装置2で適切に撮像することはできない。このことより、短辺が20画素より少ない画素で構成されていると判定された場合(S106のN)、S102で選択された黒色画素連結領域は、基準セル100ではないと判断することとし、S116に進む。   The reference cell detection unit 52 determines whether or not the short side includes a predetermined number of pixels, for example, 20 pixels or more (S106). The short side is configured with a length corresponding to 1.5 blocks, but when the short side is the reference cell 100 configured with less than 20 pixels, the length of one block is a smaller number of pixels. It will be composed of. Therefore, one side of the rectangular cell 106, which is the smallest component in the two-dimensional code, is about 13 pixels or less, and the image pickup apparatus 2 cannot capture images appropriately. From this, when it is determined that the short side is configured by fewer than 20 pixels (N in S106), it is determined that the black pixel connection region selected in S102 is not the reference cell 100. The process proceeds to S116.

短辺が20画素以上の画素で構成されていると判定された場合(S106のY)、基準セル検出部52は、基準セル候補領域の長辺が所定画素数、例えば300画素以下の画素で構成されているか否かを判定する(S108)。例えば、長辺が300画素より多い画素で構成されている基準セル100であるとすると、長辺の長さが7に対して1の割合で求められる1ブロックの長さが大きくなり、基準セル100から、8.5ブロック分離れて位置する右下コーナーセル104cおよび左下コーナーセル104dが、撮像装置2にて撮像されなくなる。このことより、長辺が300画素より多い画素で構成されていると判定された場合(S108のN)、S102で選択された黒色画素連結領域は、基準セル100ではないと判断することとし、S116に進む。   When it is determined that the short side is composed of 20 or more pixels (Y in S106), the reference cell detection unit 52 uses a pixel whose long side of the reference cell candidate region is a predetermined number of pixels, for example, 300 pixels or less. It is determined whether or not it is configured (S108). For example, if the reference cell 100 is composed of more than 300 pixels on the long side, the length of one block obtained at a ratio of 1 to 7 on the long side becomes large. The lower right corner cell 104c and the lower left corner cell 104d located 8.5 blocks apart from 100 are no longer imaged by the imaging device 2. From this, when it is determined that the long side is composed of more than 300 pixels (N in S108), it is determined that the black pixel connection region selected in S102 is not the reference cell 100. The process proceeds to S116.

長辺が300画素以下の画素で構成されていると判定された場合(S108のY)、基準セル検出部52は、基準セル候補領域の黒色画素の総数が、20画素以上かつ1500画素未満であるか否かを判定する(S110)。黒色画素の総数が20画素未満の場合(S110のN)、短辺が20画素より少ない画素で構成された場合と同様の問題が発生し、また、1500画素以上である場合(S110のN)、長辺が300画素より多い画素で構成された場合と同様の問題が発生する。したがって、これらの場合には、基準セル候補領域が基準セル100である可能性が小さいと判断することとし、S116に進む。   When it is determined that the long side is composed of pixels of 300 pixels or less (Y in S108), the reference cell detection unit 52 determines that the total number of black pixels in the reference cell candidate region is 20 pixels or more and less than 1500 pixels. It is determined whether or not there is (S110). When the total number of black pixels is less than 20 pixels (N in S110), the same problem occurs when the short side is composed of less than 20 pixels, and when the total number is 1500 pixels or more (N in S110). The same problem occurs when the long side is composed of more than 300 pixels. Therefore, in these cases, it is determined that the possibility that the reference cell candidate region is the reference cell 100 is small, and the process proceeds to S116.

基準セル候補領域の黒色画素の総数が20画素以上かつ1500画素未満である場合(S110のY)、基準セル検出部52が、基準セル候補領域の方形らしさを判定する(S112)。方形らしさは、既述した特許文献1に記載されるように、基準セル候補領域のモーメントをもとに求められる。方形でないと判定する場合(S112のN)、基準セル候補領域が基準セル100でないと判断することとし、S116に進む。方形であると判定される場合(S112のY)、基準セル検出部52は、基準セル候補領域を基準セル100として設定し(S114)、基準セル候補領域とされた黒色画素連結領域のラベリング番号を、RAMに記憶させる。このようにして、基準セル100を検出することができる。画像データ中に1枚のゲームカード4しか含まれていない場合、基準セル100を検出した時点で、基準セルの検出処理を終了する。一方、ゲームカード4が複数含まれている可能性がある場合には、S116に進む。   When the total number of black pixels in the reference cell candidate region is 20 pixels or more and less than 1500 pixels (Y in S110), the reference cell detection unit 52 determines the squareness of the reference cell candidate region (S112). The squareness is obtained based on the moment of the reference cell candidate region as described in Patent Document 1 described above. When it is determined that it is not a square (N in S112), it is determined that the reference cell candidate region is not the reference cell 100, and the process proceeds to S116. When it is determined that the pixel is a square (Y in S112), the reference cell detection unit 52 sets the reference cell candidate region as the reference cell 100 (S114), and the labeling number of the black pixel connection region that is set as the reference cell candidate region Is stored in the RAM. In this way, the reference cell 100 can be detected. When only one game card 4 is included in the image data, the reference cell detection process ends when the reference cell 100 is detected. On the other hand, if there is a possibility that a plurality of game cards 4 are included, the process proceeds to S116.

基準セル検出部52は、カウント値jが基準セル候補領域の総数Mに等しいか否かを判定する(S116)。カウント値jが総数Mに達していない場合(S116のN)、カウント値jを1インクリメントして(S118)、S102のステップに戻る。一方、カウント値jが総数Mに達すると(S116のY)、この基準セル検出処理を終了する。   The reference cell detection unit 52 determines whether or not the count value j is equal to the total number M of reference cell candidate areas (S116). If the count value j has not reached the total number M (N in S116), the count value j is incremented by 1 (S118), and the process returns to the step of S102. On the other hand, when the count value j reaches the total number M (Y in S116), the reference cell detection process is terminated.

図8に戻って、S20の基準セル検出処理において基準セル100が検出されない場合(S22のN)、ゲームカード4の存在を確認できないため、2次元コードの認識処理を終了する。一方、基準セル100が検出されると(S22のY)、コード部検出処理が実行される(S24)。   Returning to FIG. 8, when the reference cell 100 is not detected in the reference cell detection process of S20 (N of S22), since the presence of the game card 4 cannot be confirmed, the two-dimensional code recognition process is terminated. On the other hand, when the reference cell 100 is detected (Y in S22), a code part detection process is executed (S24).

図10は、コード部の検出処理を示すフローチャートである。まず、コード部検出部54は、図9のS114において設定された基準セル100の総数Nを読み出し、カウンタの値kを1に初期設定する(S200)。なお、S114において設定した基準セル100には、設定した順に番号をふっているものとする。続いて、図8のS12においてラベリングした黒色画素連結領域の総数Mを読み出し、カウンタの値jを1に初期設定する(S202)。コード部検出部54は、カウント値jに対応する番号の黒色画素連結領域を検出し、それを左下隅のコーナーセル候補領域として選択する(S204)。   FIG. 10 is a flowchart illustrating the code portion detection process. First, the code part detection unit 54 reads the total number N of the reference cells 100 set in S114 of FIG. 9, and initially sets the counter value k to 1 (S200). Note that the reference cells 100 set in S114 are numbered in the order set. Subsequently, the total number M of the black pixel connection regions labeled in S12 of FIG. 8 is read, and the counter value j is initialized to 1 (S202). The code part detection part 54 detects the black pixel connection area of the number corresponding to the count value j, and selects it as a corner cell candidate area in the lower left corner (S204).

次に、コード部検出部54は、選択した左下隅コーナーセル候補領域が、図8のS20において検出してカウント値kに対応する番号の基準セル100に対して予め設定された探索範囲内に存在するか否かを判定する(S206)。基準セル100と左下隅のコーナーセル104dとの位置関係は図6に示すように予め定められているため、基準セル100の座標データから、左下隅コーナーセルを探索する範囲を絞ることが可能である。なお、基準セル100は横長の矩形状を有するため、長辺側を挟んで対向する2つの位置に探索範囲を設定することが可能となる。探索範囲内に存在しない場合(S206のN)、その黒色画素連結領域は左下コーナーセル104dではないと判断され、S232に進む。探索範囲内に存在する場合(S206のY)、その黒色画素連結領域を左下コーナーセル104dとして設定する(S208)。   Next, the code portion detection unit 54 detects that the selected lower left corner cell candidate region is within the search range set in advance for the reference cell 100 of the number corresponding to the count value k detected in S20 of FIG. It is determined whether or not it exists (S206). Since the positional relationship between the reference cell 100 and the corner cell 104d in the lower left corner is predetermined as shown in FIG. 6, it is possible to narrow down the search range for the lower left corner cell from the coordinate data of the reference cell 100. is there. Since the reference cell 100 has a horizontally long rectangular shape, it is possible to set a search range at two positions facing each other across the long side. When it does not exist within the search range (N in S206), it is determined that the black pixel connected region is not the lower left corner cell 104d, and the process proceeds to S232. If it exists within the search range (Y in S206), the black pixel connection region is set as the lower left corner cell 104d (S208).

左下コーナーセル104を設定した後、コード部検出部54は、黒色画素連結領域の番号をカウントする他のカウンタの値lを1に初期設定する(S210)。コード部検出部54は、カウント値lに対応する番号の黒色画素連結領域を検出し、それを右下隅のコーナーセル候補領域として選択する(S212)。   After setting the lower left corner cell 104, the code portion detection unit 54 initializes the value l of another counter for counting the number of the black pixel connection region to 1 (S210). The code part detection part 54 detects the black pixel connection area of the number corresponding to the count value l and selects it as a corner cell candidate area in the lower right corner (S212).

次に、コード部検出部54は、S208で設定した左下コーナーセル104dの画素数(面積)と、S212で選択した右下コーナーセル候補領域の画素数(面積)の比を算出し、その比(面積比)が例えば1/6以上または6倍以下であるか否かを判定する(S214)。コーナーセル104は撮像装置2からの距離に応じて取得される画素数が変化する。具体的に、撮像装置2に近ければ大きい面積を有し、離れれば面積は小さくなる。そのため、コーナーセル同士であっても画像データ中の面積は異なるケースが想定される。しかしながら、例えば左下コーナーセルと右下コーナーセルの比が1/6より小さく、または6倍よりも大きくなるようなケース(S214のN)は通常想定しえないため、これらは一つの2次元コードにおけるコーナーセルであるとみなすことはできず、S226に進む。   Next, the code part detection unit 54 calculates the ratio between the number of pixels (area) of the lower left corner cell 104d set in S208 and the number of pixels (area) of the lower right corner cell candidate region selected in S212, and the ratio It is determined whether (area ratio) is, for example, 1/6 or more or 6 times or less (S214). In the corner cell 104, the number of pixels acquired changes according to the distance from the imaging device 2. Specifically, it has a large area if it is close to the imaging device 2, and the area is small if it is far away. Therefore, it is assumed that the areas in the image data are different even in the corner cells. However, for example, a case where the ratio of the lower left corner cell to the lower right corner cell is smaller than 1/6 or larger than 6 times (N in S214) cannot normally be assumed. Cannot be regarded as a corner cell in step S226, and the process proceeds to step S226.

面積比が例えば1/6以上、6倍以下である場合(S214のY)、コード部検出部54は、左下コーナーセル104dの中心点と、S212で選択した右下コーナーセル候補領域の中心点の距離が所定の条件を満たすか否かを判定する(S216)。ここで所定の条件とは、中心点同士の距離が例えば基準セル100の長辺の長さに近似していることであってもよい。所定の条件が成立しなければ(S216のN)、S226にすすみ、所定の条件が成立すると(S216のY)、コード部検出部54は、その黒色画素連結領域を右下コーナーセル104cとして設定する(S218)。   When the area ratio is, for example, 1/6 or more and 6 times or less (Y in S214), the code part detection unit 54 determines the center point of the lower left corner cell 104d and the center point of the lower right corner cell candidate region selected in S212. It is determined whether or not the distance of (2) satisfies a predetermined condition (S216). Here, the predetermined condition may be that the distance between the center points approximates the length of the long side of the reference cell 100, for example. If the predetermined condition is not satisfied (N in S216), the process proceeds to S226, and if the predetermined condition is satisfied (Y in S216), the code portion detection unit 54 sets the black pixel connection region as the lower right corner cell 104c. (S218).

以上のように左下コーナーセル104d、右下コーナーセル104cを設定すると、コード部検出部54が、設定した基準セル100、左下コーナーセル104d、右下コーナーセル104cを、ディスプレイ7の画面上のX軸方向およびY軸方向にアフィン変換する(S220)。なお、1ブロックの長さは、S20で設定した基準セル100の長辺または短辺の長さに基づいて算出される。コード部検出部54は、アフィン変換して得られた画像から、コード部110の領域に含まれる黒色画素連結領域をセルとしてマッピングし、コードマップを生成する(S222)。   When the lower left corner cell 104d and the lower right corner cell 104c are set as described above, the code part detection unit 54 changes the set reference cell 100, lower left corner cell 104d, and lower right corner cell 104c to X on the screen of the display 7. Affine transformation is performed in the axial direction and the Y-axis direction (S220). The length of one block is calculated based on the length of the long side or short side of the reference cell 100 set in S20. The code part detection part 54 maps the black pixel connection area included in the area of the code part 110 as a cell from the image obtained by the affine transformation, and generates a code map (S222).

コード部検出部54は、生成したコードマップのセルのうち、4隅のコーナーセル104を検出し、その周りの3ブロック領域が、白色画素とされているか否かを判定する(S224)。コーナーセル104の周囲の3ブロック領域が白色画素で構成されている場合(S224のY)、そのコードマップを2次元コードのコード部110と設定して(S230)、S236に進む。コーナーセル104の周囲の3ブロック領域が白色画素でない場合、S226に進む。   The code part detection unit 54 detects the corner cells 104 at the four corners from the generated code map cells, and determines whether or not the surrounding three block areas are white pixels (S224). If the three block areas around the corner cell 104 are composed of white pixels (Y in S224), the code map is set as the code part 110 of the two-dimensional code (S230), and the process proceeds to S236. When the three block areas around the corner cell 104 are not white pixels, the process proceeds to S226.

S226では、カウント値lが黒色画素連結領域の総数Mに等しいか否かを判定し、カウント値lがMに等しければ(S226のY)、S232に進み、等しくなければ(S226のN)、カウント値lを1インクリメントして(S228)、S212に戻る。   In S226, it is determined whether or not the count value l is equal to the total number M of black pixel connected regions. If the count value l is equal to M (Y in S226), the process proceeds to S232, and if not equal (N in S226), The count value l is incremented by 1 (S228), and the process returns to S212.

S232では、カウント値jが黒色画素連結領域の総数Mに等しいか否かを判定し、カウント値jがMに等しければ(S232のY)、S236に進み、等しくなければ(S232のN)、カウント値jを1インクリメントして(S234)、S204に戻る。   In S232, it is determined whether or not the count value j is equal to the total number M of the black pixel connected regions. If the count value j is equal to M (Y in S232), the process proceeds to S236, and if not equal (N in S232), The count value j is incremented by 1 (S234), and the process returns to S204.

S236では、カウント値kが設定した基準セル100の総数Nに等しいか否かを判定し、カウント値kがNに等しくなければ(S236のN)、カウント値kを1インクリメントして(S238)、S202に戻る。これにより、画像データにおいて複数の2次元コードを探索することが可能となる。カウント値kがNに等しくなると(S236のY)、以上により、コード部110の検出処理が終了する。   In S236, it is determined whether or not the count value k is equal to the set total number N of reference cells 100. If the count value k is not equal to N (N in S236), the count value k is incremented by 1 (S238). , Return to S202. This makes it possible to search for a plurality of two-dimensional codes in the image data. When the count value k is equal to N (Y in S236), the detection process of the code unit 110 is finished as described above.

図8に戻って、S24のコード部検出処理においてコード部110が検出されない場合(S26のN)、2次元コードの存在を確認できないため、2次元コードの認識処理を終了する。一方、コード部110が検出されると(S26のY)、コードデータの検証処理が実行される(S28)。   Returning to FIG. 8, when the code part 110 is not detected in the code part detection process of S24 (N of S26), since the presence of the two-dimensional code cannot be confirmed, the two-dimensional code recognition process is terminated. On the other hand, when the code part 110 is detected (Y in S26), a code data verification process is executed (S28).

図11は、コードデータの検証処理を示すフローチャートである。既述したように、33ビットのコードデータ中、所定のアルゴリズムで生成された9ビットのチェックデータと、24ビットの情報データとが存在し、この処理ではチェックデータを用いて、コードデータを検証する。以下では、所定のアルゴリズムで生成したチェックデータを、そのアルゴリズムに基づいてコードデータからチェックデータを生成して照合することで、コードデータを検証する処理を行う。   FIG. 11 is a flowchart showing a code data verification process. As described above, 9-bit check data generated by a predetermined algorithm and 24-bit information data exist in 33-bit code data. In this process, the check data is used to verify the code data. To do. In the following, a process for verifying code data is performed by generating check data from code data based on the check data generated by a predetermined algorithm and collating the check data.

まず、検証処理部56は、後のステップであるS304、S308で算出される基準値を、1ビット右方向にシフトする回数をカウントするカウンタの値pを1に初期設定する(S300)。次に、検証処理部56は、コード部110のコードマップから、コードデータおよびチェックデータの値を算出する(S302)。   First, the verification processing unit 56 initially sets a value p of a counter that counts the number of times the reference value calculated in subsequent steps S304 and S308 is shifted to the right by 1 bit to 1 (S300). Next, the verification processing unit 56 calculates code data and check data values from the code map of the code unit 110 (S302).

検証処理部56は、算出したコードデータの値(ビットストリーム)と、0xFFFFFFとの排他的論理和演算を行い(S304)、その結果得られた値(ビットストリーム)を基準値(基準ビットストリーム)とする。基準ビットストリームのLSB(Least Significant Bit)に"1"が立っているか否かを判定し(S306)、"1"が立っていないと判定した場合(S306のN)、検証処理部56は、基準値(基準ビットストリーム)と、0x8408との排他的論理和演算を行い(S308)、その結果得られた値(ビットストリーム)を新たな基準値(基準ビットストリーム)とし、S310に進む。LSBに"1"がたっている場合(S306のY)、同様にS310に進む。   The verification processing unit 56 performs an exclusive OR operation between the calculated code data value (bit stream) and 0xFFFFFF (S304), and uses the obtained value (bit stream) as a reference value (reference bit stream). And It is determined whether or not “1” is set in the LSB (Least Significant Bit) of the reference bitstream (S306). When it is determined that “1” is not set (N in S306), the verification processing unit 56 An exclusive OR operation of the reference value (reference bit stream) and 0x8408 is performed (S308), and the value (bit stream) obtained as a result is set as a new reference value (reference bit stream), and the process proceeds to S310. If “1” is in the LSB (Y in S306), the process proceeds to S310 in the same manner.

検証処理部56は、S304またはS308において算出した基準値(基準ビットストリーム)を1ビットだけ右にシフトさせ(S310)、カウント値pが、予め定めたシフト回数である24に等しいか否かを判定する(S312)。p=24ではないと判定した場合(S312のN)、カウント値pを1だけインクリメントした後(S314)、S306に戻る。   The verification processing unit 56 shifts the reference value (reference bit stream) calculated in S304 or S308 to the right by 1 bit (S310), and determines whether or not the count value p is equal to 24 which is a predetermined number of shifts. Determination is made (S312). If it is determined that p is not 24 (N in S312), the count value p is incremented by 1 (S314), and the process returns to S306.

p=24であると判定した場合(S312のY)、算出されたビットストリームと、0x1FFとの論理積演算を行う(S316)。検証処理部56は、論理積演算より得られ値が、算出したチェックデータの値と等しいか否かを判定し(S318)、等しいと判定した場合(S318のY)、図8のS24で検出されたコード部110が、2次元コードとして適正なパターンであるとし、2次元コードのコード部110を確定する(S320)。チェックコードと等しくなければ(S318のN)、コード部110の読み取りに誤りがあったことを判定して、コードデータの検証処理を終了する。なお、図11では1つのコード部110の検証処理のみを示しているが、複数のコード部110が検出されている場合は、それぞれについてこの検証処理を実行する。   When it is determined that p = 24 (Y in S312), a logical product operation of the calculated bit stream and 0x1FF is performed (S316). The verification processing unit 56 determines whether or not the value obtained by the logical product operation is equal to the calculated value of the check data (S318). If it is determined that the value is equal (Y in S318), it is detected in S24 of FIG. The code part 110 thus determined is an appropriate pattern as a two-dimensional code, and the code part 110 of the two-dimensional code is determined (S320). If it is not equal to the check code (N in S318), it is determined that there is an error in reading the code part 110, and the code data verification process is terminated. In FIG. 11, only the verification process for one code unit 110 is shown, but when a plurality of code units 110 are detected, this verification process is executed for each.

図8に戻って、S28のコードデータ検出処理においてコード部110が確定されない場合(S30のN)、2次元コードの存在を確認できないため、2次元コードの認識処理を終了する。一方、コード部110が確定されると(S30のY)、コードデータの値、すなわち、2次元コードの値を、例えばRAMに記憶させ、保持し(S32)、2次元コードの認識処理を終了する。   Returning to FIG. 8, when the code part 110 is not fixed in the code data detection process of S28 (N of S30), since the presence of the two-dimensional code cannot be confirmed, the two-dimensional code recognition process is terminated. On the other hand, when the code part 110 is confirmed (Y in S30), the value of the code data, that is, the value of the two-dimensional code is stored in, for example, the RAM and held (S32), and the two-dimensional code recognition process is finished. To do.

以上のように、図2〜図4に関連して説明したゲームカード4を利用することで、撮像装置2が2次元コードを認識できるだけでなく、ユーザにキャラクタ画像を提示できるため、ゲームカード4のデザイン性を高めることができる。また、偏光部材により2次元コードを構成することで、単純にコピーするだけではゲームカード4を偽造することができず、ゲームカード4の稀少価値を高めることができる。   As described above, by using the game card 4 described with reference to FIGS. 2 to 4, the imaging device 2 can not only recognize the two-dimensional code but also present a character image to the user. The design can be improved. Further, by configuring the two-dimensional code with the polarizing member, the game card 4 cannot be forged simply by copying, and the rarity value of the game card 4 can be increased.

また、2次元コードのコーナーセル104を大きく構成することで、コード部110におけるコーナーセル104の認識率を高めることができるとともに、2次元座標系におけるコーナーセル104の座標位置を正確に求めることが可能となる。具体的には、コーナーセル104の中心位置を正確に求めることができるため、ゲームカード4の位置を正確に特定できる。また、複数のコーナーセル104の中心位置を正確に求めることで、基準セル100とコーナーセル104との位置関係を正確に把握して、アフィン変換の精度を高めることができ、ゲームカード4の位置やゲームカード4が向いている方向などを正確に特定できる。   Further, by making the corner cell 104 of the two-dimensional code large, the recognition rate of the corner cell 104 in the code part 110 can be increased, and the coordinate position of the corner cell 104 in the two-dimensional coordinate system can be accurately obtained. It becomes possible. Specifically, since the center position of the corner cell 104 can be accurately obtained, the position of the game card 4 can be accurately identified. In addition, by accurately determining the center positions of the plurality of corner cells 104, the positional relationship between the reference cell 100 and the corner cells 104 can be accurately grasped, and the accuracy of affine transformation can be improved. And the direction in which the game card 4 is facing can be accurately specified.

以下に、3次元座標系におけるゲームカード4の位置および方向の求め方について説明する。ゲームカード4の仮想3次元座標系の位置および方向を求めるために、本実施例では、撮像装置2の画角、スクリーン解像度、4つのコーナーセル104のスクリーン座標位置、実際のコーナーセル104間の距離を利用する。なお、スクリーンとは、撮像装置2により撮像された画像を表示するディスプレイ7の画面である。   Hereinafter, a method for obtaining the position and direction of the game card 4 in the three-dimensional coordinate system will be described. In order to determine the position and direction of the virtual three-dimensional coordinate system of the game card 4, in this embodiment, the angle of view of the imaging device 2, the screen resolution, the screen coordinate positions of the four corner cells 104, and the actual corner cells 104 Use distance. The screen is a screen of the display 7 that displays an image captured by the imaging device 2.

(ステップ1)
まず、視点からスクリーン投影面までの距離を求める。ここでは、カメラの画角とスクリーン解像度により、視点からスクリーン投影面までの距離を求める。
カメラの水平方向の画角:θ
スクリーンの水平方向の解像度:W
視点からスクリーン投影面までの距離:P
とすると、以下の計算式が成り立つ。
P=(W×0.5)/tan(θ×0.5)
(Step 1)
First, the distance from the viewpoint to the screen projection plane is obtained. Here, the distance from the viewpoint to the screen projection plane is obtained from the angle of view of the camera and the screen resolution.
Camera horizontal angle of view: θ
Screen horizontal resolution: W
Distance from viewpoint to screen projection plane: P
Then, the following calculation formula holds.
P = (W × 0.5) / tan (θ × 0.5)

(ステップ2)
次に、視点から各コーナーセル104に伸びる3次元ベクトルを求める。
コーナーセルのスクリーン座標位置:SX、SY
視点からスクリーン投影面までの距離:P
コーナーセルへ伸びる3次元ベクトル:V
とすると、以下の計算式が成り立つ。
V=(SX,SY,P)
なお、スクリーン座標位置は、スクリーンの中央を原点としている。
(Step 2)
Next, a three-dimensional vector extending from the viewpoint to each corner cell 104 is obtained.
Corner cell screen coordinate position: SX, SY
Distance from viewpoint to screen projection plane: P
3D vector extending to the corner cell: V
Then, the following calculation formula holds.
V = (SX, SY, P)
Note that the screen coordinate position has the origin at the center of the screen.

(ステップ3)
視点と、隣り合う2つのコーナーセルの3点が形成する平面の法線ベクトルを求める。この法線ベクトルは、合計で4つ生成される。
視点からコーナーセル104aへ伸びる3次元ベクトル:V1
視点からコーナーセル104bへ伸びる3次元ベクトル:V2
視点からコーナーセル104cへ伸びる3次元ベクトル:V3
視点からコーナーセル104dへ伸びる3次元ベクトル:V4
視点とコーナーセル104a、104bが形成する平面の法線ベクトル:S12
視点とコーナーセル104b、104cが形成する平面の法線ベクトル:S23
視点とコーナーセル104c、104dが形成する平面の法線ベクトル:S34
視点とコーナーセル104d、104aが形成する平面の法線ベクトル:S41
とすると、以下の計算式が成り立つ。
S12=V1×V2
S23=V2×V3
S34=V3×V4
S41=V4×V1
なお、「×」は、外積を指す。
(Step 3)
A normal vector of a plane formed by the viewpoint and three points of two adjacent corner cells is obtained. A total of four normal vectors are generated.
A three-dimensional vector extending from the viewpoint to the corner cell 104a: V1
A three-dimensional vector extending from the viewpoint to the corner cell 104b: V2
A three-dimensional vector extending from the viewpoint to the corner cell 104c: V3
A three-dimensional vector extending from the viewpoint to the corner cell 104d: V4
Normal vector of the plane formed by the viewpoint and the corner cells 104a and 104b: S12
Normal vector of the plane formed by the viewpoint and the corner cells 104b and 104c: S23
Normal vector of the plane formed by the viewpoint and the corner cells 104c and 104d: S34
Normal vector of the plane formed by the viewpoint and the corner cells 104d and 104a: S41
Then, the following calculation formula holds.
S12 = V1 × V2
S23 = V2 × V3
S34 = V3 × V4
S41 = V4 × V1
“X” indicates an outer product.

(ステップ4)
続いて、ゲームカード4の3次元上での方向(座標軸)を求める。ステップ3で求めた4つの法線ベクトルをもとに、カードの座標軸が求まる。
カードのローカル座標X軸(カード表面に対して左右方向):VX
カードのローカル座標Y軸(カード表面に対して貫く方向):VY
カードのローカル座標Z軸(カード表面に対して上下方向):VZ
とすると、以下の計算式が成り立つ。
VX=S12×S34
VZ=S23×S41
VY=VZ×VX
(Step 4)
Subsequently, the direction (coordinate axis) of the game card 4 in three dimensions is obtained. Based on the four normal vectors obtained in step 3, the coordinate axes of the card are obtained.
Card local coordinate X-axis (horizontal direction with respect to the card surface): VX
Card local coordinate Y-axis (direction penetrating the card surface): VY
Card local coordinate Z-axis (vertical direction with respect to the card surface): VZ
Then, the following calculation formula holds.
VX = S12 × S34
VZ = S23 × S41
VY = VZ × VX

(ステップ5)
最後に、ゲームカード4の3次元上での位置を求める。ステップ4では、ゲームカード4のローカル座標変換マトリクスを求めたが、現実のコーナーセル間の距離が分かれば、カードの位置は容易に求められる。コーナーセル104aの3次元座標位置を変数として表現すると、その変数を使ってコーナーセル104b、104c、104dの3次元座標位置を表すことができる。4つのコーナーセルのスクリーン座標位置は判明しているため、これらの計算式の連立方程式を解くことで、ゲームカード4の3次元座標位置を特定できる。
(Step 5)
Finally, the three-dimensional position of the game card 4 is obtained. In step 4, the local coordinate transformation matrix of the game card 4 is obtained. If the actual distance between corner cells is known, the position of the card can be easily obtained. If the three-dimensional coordinate position of the corner cell 104a is expressed as a variable, the three-dimensional coordinate positions of the corner cells 104b, 104c, and 104d can be expressed using the variable. Since the screen coordinate positions of the four corner cells are known, the three-dimensional coordinate position of the game card 4 can be specified by solving the simultaneous equations of these calculation formulas.

以上、本発明を実施例をもとに説明した。この実施例は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。   In the above, this invention was demonstrated based on the Example. This embodiment is an exemplification, and it will be understood by those skilled in the art that various modifications can be made to the combination of each component and each processing process, and such modifications are also within the scope of the present invention. .

実施例では、偏光部材を用いて2次元コードを視認可能な状態として設定することとしたが、例えば、ホログラムを利用して2次元コードを生成することも可能である。ホログラムの種類には、例えばレインボーホログラムやリップマンホログラムなどが存在する。ホログラムの記録材料に、物体の情報をもつ物体光と、参照光とを導き、物体光と参照光とが干渉してできる干渉縞を記録することで、ホログラムは生成される。したがって、ホログラムの記録材料上に参照光の入射角を変えながら複数のホログラムを多重記録することで、第1の方向においてキャラクタ画像を視認可能な状態とし、第2の方向において2次元コードを視認可能な状態とすることが可能となる。   In the embodiment, the two-dimensional code is set so as to be visually recognized using the polarizing member. However, for example, the two-dimensional code can be generated using a hologram. For example, there are rainbow holograms and Lippmann holograms as types of holograms. A hologram is generated by guiding an object beam having object information and a reference beam on the hologram recording material and recording interference fringes formed by the interference between the object beam and the reference beam. Therefore, a plurality of holograms are recorded on the hologram recording material while changing the incident angle of the reference light so that the character image can be visually recognized in the first direction, and the two-dimensional code is visually recognized in the second direction. It becomes possible to make it possible.

実施例にかかるゲームシステムの構成を示す図である。It is a figure which shows the structure of the game system concerning an Example. ゲームカードを異なる方向からユーザおよび撮像装置が見ている状態を示す図である。It is a figure which shows the state which the user and the imaging device are looking at from different directions. ゲームカードにおける第1画像部を示す図である。It is a figure which shows the 1st image part in a game card. ゲームカードにおける第2画像部を示す図である。It is a figure which shows the 2nd image part in a game card. 図4に示す2次元コードを偏光部材で形成して、ゲームカードを正面から見た状態を示す図である。It is a figure which shows the state which formed the two-dimensional code shown in FIG. 4 with a polarizing member, and looked at the game card from the front. 2次元コードを示す図である。It is a figure which shows a two-dimensional code. 画像解析装置の構成を示す図である。It is a figure which shows the structure of an image analyzer. 2次元コードの認識処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the recognition process of a two-dimensional code. 基準セルの検出処理を示すフローチャートである。It is a flowchart which shows the detection process of a reference | standard cell. コード部の検出処理を示すフローチャートである。It is a flowchart which shows the detection process of a code part. コードデータの検証処理を示すフローチャートである。It is a flowchart which shows the verification process of code data.

符号の説明Explanation of symbols

1・・・ゲームシステム、4・・・ゲームカード、6・・・出力装置、7・・・ディスプレイ、10・・・画像処理装置、20・・・画像解析装置、22・・・第1画像部、24・・・第2画像部、30・・・ゲーム装置、40・・・フレーム画像取得部、42・・・実オブジェクト抽出部、44・・・状態決定部、50・・・2値化処理部、52・・・基準セル検出部、54・・・コード部検出部、56・・・検証処理部。

DESCRIPTION OF SYMBOLS 1 ... Game system, 4 ... Game card, 6 ... Output device, 7 ... Display, 10 ... Image processing device, 20 ... Image analysis device, 22 ... 1st image Part, 24 ... second image part, 30 ... game device, 40 ... frame image acquisition part, 42 ... real object extraction part, 44 ... state determination part, 50 ... binary Conversion processing unit, 52... Reference cell detection unit, 54... Code unit detection unit, 56.

Claims (5)

少なくとも第1の方向において所定の画像を視認可能な状態とする第1画像部と、
第1の方向とは異なる第2の方向において2次元コードを視認可能な状態とする第2画像部と、
を備えることを特徴とする物体。
A first image portion that renders a predetermined image visible in at least the first direction;
A second image portion that renders the two-dimensional code visible in a second direction different from the first direction;
An object characterized by comprising:
前記第1画像部は、物体の表面に所定の画像を表示することで形成され、
前記第2画像部は、物体の表面に、第1の方向における光の反射を許容し、且つ第2の方向における光の反射を制限することで、第2の方向において2次元コードを視認可能な状態とする光反射制限部材を配置することにより形成されることを特徴とする請求項1に記載の物体。
The first image portion is formed by displaying a predetermined image on the surface of the object,
The second image section allows a two-dimensional code to be visually recognized in the second direction by allowing light reflection in the first direction on the surface of the object and restricting light reflection in the second direction. The object according to claim 1, wherein the object is formed by arranging a light reflection limiting member that is in a stable state.
前記光反射制限部材は偏光部材であることを特徴とする請求項2に記載の物体。   The object according to claim 2, wherein the light reflection limiting member is a polarizing member. 前記偏光部材は、樹脂材料で形成されることを特徴とする請求項3に記載の物体。   The object according to claim 3, wherein the polarizing member is made of a resin material. 前記第1画像部および前記第2画像部は、物体上にホログラムを異なる角度から多重記録して生成されることを特徴とする請求項1に記載の物体。

The object according to claim 1, wherein the first image portion and the second image portion are generated by multiplex recording of holograms on the object from different angles.

JP2004301311A 2004-10-15 2004-10-15 Object Pending JP2006110888A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004301311A JP2006110888A (en) 2004-10-15 2004-10-15 Object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004301311A JP2006110888A (en) 2004-10-15 2004-10-15 Object

Publications (1)

Publication Number Publication Date
JP2006110888A true JP2006110888A (en) 2006-04-27

Family

ID=36379797

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004301311A Pending JP2006110888A (en) 2004-10-15 2004-10-15 Object

Country Status (1)

Country Link
JP (1) JP2006110888A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008084056A (en) * 2006-09-28 2008-04-10 Dainippon Printing Co Ltd Image, printed matter, image generation device and program
CN103342053A (en) * 2013-05-31 2013-10-09 深圳劲嘉彩印集团股份有限公司 Image-based two-dimension code and image-based two-dimension code generating system and method
JP2016004332A (en) * 2014-06-13 2016-01-12 オムロン株式会社 Model image generation device and model image generation method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008084056A (en) * 2006-09-28 2008-04-10 Dainippon Printing Co Ltd Image, printed matter, image generation device and program
CN103342053A (en) * 2013-05-31 2013-10-09 深圳劲嘉彩印集团股份有限公司 Image-based two-dimension code and image-based two-dimension code generating system and method
JP2016004332A (en) * 2014-06-13 2016-01-12 オムロン株式会社 Model image generation device and model image generation method

Similar Documents

Publication Publication Date Title
EP1801735B1 (en) Card and image data transmission method
US20120024952A1 (en) System and method for identifying qr code
US8891815B2 (en) Invisible information embedding apparatus, invisible information detecting apparatus, invisible information embedding method, invisible information detecting method, and storage medium
US20080044079A1 (en) Object-based 3-dimensional stereo information generation apparatus and method, and interactive system using the same
US9792732B2 (en) Systems and methods for activities solver development in augmented reality applications
US20120257787A1 (en) Computer-readable storage medium having information processing program stored therein, information processing method, information processing apparatus, and information processing system
JP5756322B2 (en) Information processing program, information processing method, information processing apparatus, and information processing system
KR100702534B1 (en) Id judgment method by using extension type visual marker including direrction information
CN109697444B (en) Object identification method and device based on depth image, equipment and storage medium
CN107613239B (en) Video communication background display method and device
JP6429483B2 (en) Information processing apparatus, imaging apparatus, information processing system, information processing method, and program
JP2006110888A (en) Object
WO2016120776A1 (en) Hybrid visual tagging using customized colored tiles
JP4312185B2 (en) Game mat, card game system, image analysis apparatus, and image analysis method
JP4364186B2 (en) card
KR101900797B1 (en) Method for providing augmented reality using rubik&#39;s cube
JP3827694B2 (en) Object, image data, and image data transmission method
JP4252519B2 (en) Image analysis apparatus, object recognition method, card, image data, image data transmission method, and image analysis system
US20240143960A1 (en) Method for recognizing 2d code information
KR102527390B1 (en) A Method for recognizing 2D code information
CN116546180B (en) Naked eye suspension 3D video generation method, device, equipment and storage medium
US20230092468A1 (en) Stacked object recognition method, apparatus and device, and computer storage medium
US20230394704A1 (en) Optically Readable Markers
JP6622886B2 (en) Information processing apparatus, information processing method, and program
TW201201108A (en) QR code identity system and identification method with the same