JP5496991B2 - Image display program, image display apparatus, image display system, and image display method - Google Patents

Image display program, image display apparatus, image display system, and image display method Download PDF

Info

Publication number
JP5496991B2
JP5496991B2 JP2011269711A JP2011269711A JP5496991B2 JP 5496991 B2 JP5496991 B2 JP 5496991B2 JP 2011269711 A JP2011269711 A JP 2011269711A JP 2011269711 A JP2011269711 A JP 2011269711A JP 5496991 B2 JP5496991 B2 JP 5496991B2
Authority
JP
Japan
Prior art keywords
image
recognition
captured image
recognition process
display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2011269711A
Other languages
Japanese (ja)
Other versions
JP2012059292A (en
JP2012059292A5 (en
Inventor
浩一 河本
慎治 北原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nintendo Co Ltd
Original Assignee
Nintendo Co Ltd
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 Nintendo Co Ltd filed Critical Nintendo Co Ltd
Priority to JP2011269711A priority Critical patent/JP5496991B2/en
Publication of JP2012059292A publication Critical patent/JP2012059292A/en
Publication of JP2012059292A5 publication Critical patent/JP2012059292A5/ja
Application granted granted Critical
Publication of JP5496991B2 publication Critical patent/JP5496991B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Description

本発明は、拡張現実感技術を用いて画像を表示する画像表示プログラム、画像表示装置、画像表示システム、および画像表示方法に関する。   The present invention relates to an image display program, an image display apparatus, an image display system, and an image display method for displaying an image using augmented reality technology.

従来、現実空間の画像(カメラによる撮像画像)に仮想空間の画像(CG画像)を合成して表示する拡張現実感技術がある。非特許文献1には、拡張現実感技術の基本的な画像生成方法が記載されている。拡張現実感技術においては、現実空間にマーカを配置しておき、マーカ周辺をカメラで撮像する。撮像された画像内のマーカは画像認識処理によって検出され、マーカの3次元位置が計算される。計算された3次元位置を用いて仮想空間内の物体の画像(CG画像)を生成して、その画像をカメラ画像中のマーカの位置に合成して表示することで、現実空間の撮像画像に仮想の物体が合成された画像を表示することができる。   Conventionally, there is an augmented reality technology that synthesizes and displays a virtual space image (CG image) with a real space image (image captured by a camera). Non-Patent Document 1 describes a basic image generation method of augmented reality technology. In augmented reality technology, a marker is placed in real space, and the periphery of the marker is imaged with a camera. The marker in the captured image is detected by image recognition processing, and the three-dimensional position of the marker is calculated. An image (CG image) of an object in the virtual space is generated using the calculated three-dimensional position, and the image is synthesized and displayed at the position of the marker in the camera image. An image in which a virtual object is synthesized can be displayed.

加藤博一、Mark Billinghurst,「拡張現実感システムにおけるマーカー追跡とHMDキャリブレーション(Marker Tracking andHMD Calibration for a video-based Augmented Reality Conferencing System)」,IWAR99(拡張現実感に関する第2回国際ワークショップ(the 2nd InternationalWorkshop on Augmented Reality))における会報,米国,1999年10月Hirokazu Kato, Mark Billinghurst, “Marker Tracking and HMD Calibration for a Video-based Augmented Reality Conferencing System”, IWAR99 (2nd International Workshop on Augmented Reality (the 2nd International Workshop on Augmented Reality)), USA, October 1999

従来の拡張現実感技術では、現実の撮像画像と仮想のCG画像との間に位置ずれが生じて表示されたり、CG画像がちらついて表示されたりするという問題があった。   In the conventional augmented reality technology, there is a problem in that a positional deviation occurs between the actual captured image and the virtual CG image, or the CG image is displayed in a flickering manner.

拡張現実感技術では、撮像画像に含まれるマーカを認識してマーカの3次元位置を計算する必要があり、これら認識および計算の処理には時間を要する。そのため、認識および計算の処理結果に基づいて生成されるCG画像は、撮像画像に対して時間的に遅れてしまう。したがって、カメラが動かされて撮像画像が変化する場合、その撮像画像に合成されるべきCG画像は時間的に遅れるために変化前の位置に合成されてしまうので、撮像画像内のマーカの位置とCG画像が合成される位置とがずれてしまう。   In the augmented reality technology, it is necessary to recognize the marker included in the captured image and calculate the three-dimensional position of the marker, and the recognition and calculation processing takes time. Therefore, the CG image generated based on the recognition and calculation processing results is delayed with respect to the captured image. Therefore, when the captured image changes when the camera is moved, the CG image to be combined with the captured image is delayed in time and is therefore combined with the position before the change. The position where the CG image is synthesized is shifted.

また、実際にはマーカが撮像されていても、撮像画像からマーカをうまく認識することができず、認識処理が失敗する場合もある。認識処理が失敗した場合には、その認識処理の対象となった撮像画像からCG画像を生成することはできないので、撮像画像のみが表示されることとなる。そのため、認識処理の失敗が断続的に起こると、CG画像がちらついて表示されてしまう。   Even if the marker is actually imaged, the marker may not be recognized well from the captured image, and the recognition process may fail. If the recognition process fails, a CG image cannot be generated from the captured image that is the target of the recognition process, and only the captured image is displayed. For this reason, if the recognition process fails intermittently, the CG image flickers and is displayed.

このように、従来においては、CG画像は位置がずれて表示されたり、ちらついて表示されたりするおそれがあったため、撮像画像とCG画像とを合成した合成画像は現実味(リアルさ)に欠けるおそれがあった。そのため、拡張現実感技術の特徴である「CG画像が実際に存在するかのような感覚を与える」効果を十分に発揮することができなかった。   As described above, in the past, the CG image may be displayed with a shifted position or may flicker. Therefore, the composite image obtained by combining the captured image and the CG image may lack realism (realism). was there. Therefore, the effect of “giving a sensation as if a CG image actually exists”, which is a feature of augmented reality technology, cannot be sufficiently exhibited.

それ故、本発明の目的は、拡張現実感技術において合成画像をより現実味を増して表示することができる画像表示プログラム、画像表示装置、画像表示システム、および画像表示方法を提供することである。   SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide an image display program, an image display device, an image display system, and an image display method that can display a composite image with increased realism in augmented reality technology.

本発明は、上記の課題を解決するために、以下の(1)〜(15)の構成を採用した。   The present invention employs the following configurations (1) to (15) in order to solve the above problems.

(1)
本発明は、撮像手段から撮像画像を取得可能な情報処理装置のコンピュータを、認識手段と、合成手段と、表示制御手段として機能させる画像表示プログラムである。認識手段は、取得された撮像画像に対して、当該撮像画像に含まれる所定の対象を認識する認識処理を繰り返し実行する。合成手段は、認識処理の処理結果を用いて生成される仮想オブジェクトの画像と、当該認識処理の対象となった撮像画像とを合成した合成画像を繰り返し生成する。表示制御手段は、合成画像を表示手段に表示させる。また、合成手段は、認識処理が失敗した場合、以前に成功した認識処理の対象となった撮像画像と、当該認識処理の処理結果を用いて生成される仮想オブジェクトの画像とを合成する。
(1)
The present invention is an image display program that causes a computer of an information processing apparatus that can acquire a captured image from an imaging unit to function as a recognition unit, a synthesis unit, and a display control unit. The recognition unit repeatedly executes a recognition process for recognizing a predetermined target included in the captured image with respect to the acquired captured image. The synthesizing unit repeatedly generates a synthesized image obtained by synthesizing the image of the virtual object generated using the processing result of the recognition process and the captured image that is the target of the recognition process. The display control means displays the composite image on the display means. Further, when the recognition process fails, the synthesizing unit synthesizes the captured image that has been the target of the previously successful recognition process and the image of the virtual object that is generated using the processing result of the recognition process.

上記「情報処理装置」とは、後述する実施形態に記載のゲーム装置の他、コンピュータプログラムを実行することによって情報処理を行う任意のコンピュータを含む概念である。また、上記「情報処理装置」は、携帯型か否かを問わない。
上記「画像表示プログラム」とは、一例としては、後述する実施形態に記載のゲームプログラムであるが、パーソナルコンピュータや携帯端末において実行されるアプリケーションプログラムを含む概念である。
上記「所定の対象」とは、後述する実施形態におけるマーカ52の他、認識処理によって認識することが可能な物であれば、どのような物であってもよい。例えば、ユーザ(プレイヤ)の顔等を所定の対象として認識するようにしてもよい。
上記「仮想オブジェクト」は、撮像画像と合成されるために生成される画像であればよく、仮想オブジェクトの画像の生成方法や内容はどのようなものであってもよい。
上記「認識手段」および上記「合成手段」は、繰り返し処理を実行するものであるが、両者の処理が繰り返される頻度(周期)は、同じである必要はない。例えば、下記(7)の構成や後述する実施形態のように、認識手段による認識処理の頻度は、合成手段による合成処理の頻度よりも少なくてもよい。
The “information processing apparatus” is a concept including an arbitrary computer that performs information processing by executing a computer program, in addition to the game apparatus described in the embodiments described later. Further, it does not matter whether the “information processing apparatus” is portable.
The “image display program” is, for example, a game program described in an embodiment described later, but includes an application program executed on a personal computer or a portable terminal.
The “predetermined object” may be any object as long as it can be recognized by the recognition process in addition to the marker 52 in the embodiment described later. For example, the user's (player) face or the like may be recognized as a predetermined target.
The “virtual object” may be an image generated to be combined with the captured image, and any method and content for generating the virtual object image may be used.
The “recognizing means” and the “synthesizing means” execute repeated processing, but the frequency (cycle) at which both processes are repeated need not be the same. For example, as in the configuration (7) below and an embodiment described later, the frequency of recognition processing by the recognition unit may be less than the frequency of synthesis processing by the synthesis unit.

上記(1)の構成によれば、合成手段は、認識処理の処理結果を用いて生成される仮想オブジェクトの画像と撮像画像との合成画像を生成する。ここで、認識処理が失敗した場合、合成手段は、前回に成功した認識処理の対象となった撮像画像を用いて合成画像を生成する。したがって、認識に失敗した場合でも仮想オブジェクトの画像を含む合成画像が表示されるので、認識が失敗する度に仮想オブジェクトが消えてしまう(表示されない)ことによって仮想オブジェクトがちらついて表示されることを防止することができる。また、認識処理が失敗した場合に合成される仮想オブジェクトの画像は、撮像画像に合わせて、前回に成功した認識処理の処理結果を用いて生成される。したがって、仮想オブジェクトの画像は、その画像が生成される元となった撮像画像と合成されるので、撮像画像と仮想オブジェクトとの間で位置ずれが生じることがない。以上のように、上記(1)の構成によれば、画像のちらつきや位置ずれが生じないので、仮想オブジェクトが実世界にいるような実在感が増す。すなわち、上記(1)の構成によれば、拡張現実感技術において合成画像をより現実味を増して表示することができる。   According to the configuration of (1) above, the synthesizing unit generates a synthesized image of the image of the virtual object and the captured image that are generated using the processing result of the recognition process. Here, when the recognition process fails, the synthesizing unit generates a synthesized image using the captured image that is the target of the recognition process that succeeded last time. Therefore, even if the recognition fails, a composite image including the virtual object image is displayed, so that each time the recognition fails, the virtual object disappears (is not displayed), and the virtual object flickers and is displayed. Can be prevented. In addition, the image of the virtual object that is synthesized when the recognition process fails is generated using the result of the recognition process that was successful last time, in accordance with the captured image. Therefore, since the image of the virtual object is combined with the captured image from which the image is generated, there is no positional shift between the captured image and the virtual object. As described above, according to the configuration of the above (1), flickering and displacement of the image do not occur, and the realism that the virtual object is in the real world increases. That is, according to the configuration of (1) above, it is possible to display the composite image with a higher realism in the augmented reality technology.

(2)
合成手段は、認識処理の処理結果にかかわらず、仮想オブジェクトの画像を更新して合成画像を生成してもよい。
(2)
The synthesizing unit may generate the synthesized image by updating the image of the virtual object regardless of the processing result of the recognition process.

上記「認識処理の処理結果にかかわらず」とは、認識処理が成功した場合であっても失敗した場合であっても合成手段は仮想オブジェクトの画像を更新して合成画像を生成する意味である。また、合成画像の生成間隔が認識処理の処理時間よりも短い場合には、認識処理の処理結果が得られていない状況であっても、(合成画像を生成すべきタイミングが到来すると)合成手段は仮想オブジェクトの画像を更新して合成画像を生成する。   The above “regardless of the processing result of the recognition process” means that the synthesizing unit updates the virtual object image to generate a synthesized image regardless of whether the recognition process is successful or unsuccessful. . In addition, when the composite image generation interval is shorter than the processing time of the recognition processing, the synthesis means (when the timing for generating the composite image arrives) even if the recognition processing result is not obtained. Updates the image of the virtual object to generate a composite image.

上記(2)の構成によれば、合成画像のうち、仮想オブジェクトの画像に関しては、一定の頻度で画像が更新される。そのため、仮想オブジェクトに関しては、認識処理の成功/失敗にかかわらず、滑らかな動画で表示することができる。ここで、上記(1)の構成によれば、認識処理が失敗した場合には撮像画像は更新されないので、撮像画像のみに関して言えば、動画が滑らかに表示されないためにユーザが違和感を抱くおそれがある。しかし、上記(2)の構成によれば、撮像画像に合成する仮想オブジェクトの動画が滑らかに表示されることによって、合成画像全体としては滑らかな印象をユーザに与えることができ、撮像画像に対してユーザが抱く違和感を軽減・抑止することができる。   According to the configuration of (2) above, the image of the virtual object in the composite image is updated at a certain frequency. Therefore, the virtual object can be displayed as a smooth moving image regardless of the success / failure of the recognition process. Here, according to the configuration of (1) above, when the recognition process fails, the captured image is not updated. Therefore, in terms of only the captured image, the user may feel uncomfortable because the moving image is not displayed smoothly. is there. However, according to the configuration of (2) above, the moving image of the virtual object to be combined with the captured image is smoothly displayed, so that the user can have a smooth impression as the entire combined image. This can reduce or deter the user's uncomfortable feeling.

(3)
画像表示プログラムは、認識処理が成功した場合、成功した認識処理の対象となった撮像画像と当該認識処理の処理結果とを、コンピュータがアクセス可能な記憶手段に記憶させる記憶制御手段としてコンピュータをさらに機能させてもよい。このとき、合成手段は、記憶手段に記憶される撮像画像と、当該記憶手段に記憶される処理結果に基づいて生成される合成画像とを合成する。
(3)
When the recognition process is successful, the image display program further stores the computer as a storage control unit that stores the captured image that is the target of the successful recognition process and the processing result of the recognition process in a storage unit accessible by the computer. May function. At this time, the synthesizing unit synthesizes the captured image stored in the storage unit and the synthesized image generated based on the processing result stored in the storage unit.

上記(3)の構成によれば、認識処理が成功した場合、処理対象の撮像画像と処理結果とを記憶手段に記憶しておくので、その撮像画像を用いた合成画像を容易に生成することができる。   According to the configuration of (3) above, when the recognition process is successful, the captured image to be processed and the processing result are stored in the storage unit, so that a composite image using the captured image can be easily generated. Can do.

(4)
記憶制御手段は、認識処理が成功した場合、成功した認識処理の対象となった撮像画像と当該認識処理の処理結果とが記憶されるように、記憶手段の記憶内容を更新してもよい。
(4)
When the recognition process is successful, the storage control unit may update the storage content of the storage unit so that the captured image that is the target of the successful recognition process and the processing result of the recognition process are stored.

上記(4)の構成によれば、認識処理が成功した最新の撮像画像とその処理結果とを記憶することができるので、その撮像画像を用いた合成画像を確実に生成することができる。   According to the configuration of (4) above, the latest captured image that has been successfully recognized and the processing result thereof can be stored, so that a composite image using the captured image can be reliably generated.

(5)
認識手段は、認識処理が成功する場合、当該認識処理によって認識された所定の対象と撮像手段もしくは情報処理装置との位置関係を処理結果として算出してもよい。このとき、合成手段は、認識処理が成功した場合、成功した認識処理の対象となった撮像画像から算出される位置関係に基づいて仮想オブジェクトの画像を生成する。また、認識処理が失敗した場合、合成手段は、以前に成功した認識処理の対象となった撮像画像から算出される位置関係に基づいて仮想オブジェクトの画像を生成する。
(5)
When the recognition process is successful, the recognizing unit may calculate a positional relationship between the predetermined target recognized by the recognition process and the imaging unit or the information processing apparatus as a processing result. At this time, if the recognition process is successful, the synthesizing unit generates an image of the virtual object based on the positional relationship calculated from the captured image that is the target of the successful recognition process. If the recognition process fails, the composing unit generates an image of the virtual object based on the positional relationship calculated from the captured image that has been the target of the previously successful recognition process.

上記(5)の構成によれば、仮想オブジェクトの画像は、認識処理の処理結果として、所定の対象と撮像手段との位置関係に基づいて生成される。したがって、所定の対象と撮像手段との位置関係を反映した向きから見たときの仮想オブジェクトの画像を生成することができるので、仮想オブジェクトの画像をよりリアルに生成・表示することができる。また、上記(5)の構成によれば、仮想オブジェクトの画像は、認識処理が失敗した場合、前回に成功した認識処理の対象となった撮像画像から算出される位置関係に基づいて生成されるので、撮像画像と仮想オブジェクトとの間の位置ずれは生じない。特に、上記(2)の構成と上記(5)の構成とを組み合わせる場合には、仮想オブジェクトの画像は、仮想オブジェクトの動作や姿勢は毎回更新されつつ、仮想オブジェクトが表示される位置はずれが生じないので、合成画像をより現実味を増して表示することができる。   According to the configuration of (5) above, the image of the virtual object is generated based on the positional relationship between the predetermined target and the imaging means as the processing result of the recognition process. Therefore, the image of the virtual object when viewed from the direction reflecting the positional relationship between the predetermined target and the imaging unit can be generated, and thus the image of the virtual object can be generated and displayed more realistically. According to the configuration of (5) above, when the recognition process fails, the virtual object image is generated based on the positional relationship calculated from the captured image that has been the target of the recognition process that succeeded last time. Therefore, there is no positional deviation between the captured image and the virtual object. In particular, when the configuration of (2) and the configuration of (5) are combined, the virtual object image is updated each time the motion and orientation of the virtual object are updated, and the position where the virtual object is displayed shifts. Therefore, it is possible to display the composite image with a more realistic appearance.

(6)
画像表示プログラムは、認識処理の処理結果をゲーム入力として用いて、仮想空間に登場するオブジェクトの動作を制御する所定のゲーム制御処理を実行するゲーム制御処理手段としてコンピュータをさらに機能させてもよい。
(6)
The image display program may further cause the computer to function as a game control processing unit that executes a predetermined game control process for controlling an operation of an object appearing in the virtual space, using the processing result of the recognition process as a game input.

上記(6)の構成によれば、拡張現実感技術による画像をゲームに用いることができる。また、上記(6)の構成によれば、認識処理の処理結果がゲーム入力として用いられるので、ユーザ(プレイヤ)は、カメラ自体を動かすことによってゲーム操作を行うことができる。これによれば、あたかも仮想オブジェクトが存在するかのような現実空間においてプレイヤ自身が実際に動いて遊ぶという、拡張現実感技術を用いた新規なゲームを提供することができる。   With configuration (6) above, an image based on augmented reality technology can be used in a game. Further, according to the configuration of (6) above, since the processing result of the recognition process is used as a game input, the user (player) can perform a game operation by moving the camera itself. According to this, it is possible to provide a new game using augmented reality technology in which the player himself actually moves and plays in a real space as if a virtual object exists.

(7)
ゲーム制御処理手段は、認識処理が失敗した場合、以前に成功した認識処理の処理結果を用いてゲーム制御処理を実行してもよい。
(7)
If the recognition process fails, the game control processing means may execute the game control process using the processing result of the previously successful recognition process.

上記(7)の構成によれば、ゲーム制御処理手段は認識処理が失敗した場合でもゲーム制御処理を実行することができる。そのため、認識処理が断続的に失敗した場合でもゲーム制御処理を継続して実行することができ、ゲーム制御処理の制御対象であるオブジェクトをスムーズに動作させることができる。   With configuration (7) above, the game control processing means can execute the game control processing even when the recognition processing fails. Therefore, even when the recognition process fails intermittently, the game control process can be continuously executed, and the object that is the control target of the game control process can be operated smoothly.

(8)
画像表示プログラムは、認識処理の処理結果にかかわらず所定のゲーム処理を実行するゲーム処理手段としてコンピュータをさらに機能させてもよい。
(8)
The image display program may further cause the computer to function as game processing means for executing a predetermined game process regardless of the processing result of the recognition process.

上記「ゲーム処理」は、ゲームを進行するための処理であればよく、例えば後述する実施形態におけるステップS24の処理のように、認識処理の処理結果をゲーム入力として用いない処理を含む概念である。   The “game process” may be a process for progressing the game, and is a concept including a process that does not use the processing result of the recognition process as a game input, such as the process of step S24 in the embodiment described later. .

上記(8)の構成によれば、認識処理が仮に失敗した場合であってもゲームの進行は継続されるので、認識処理が断続的に失敗することによってゲームが頻繁に中断されることがない。そのため、プレイヤに不快感を与えることなく、拡張現実感技術を用いたゲームをスムーズに進行させることができる。   According to the configuration of (8) above, since the progress of the game is continued even if the recognition process fails, the game is not frequently interrupted by the intermittent failure of the recognition process. . Therefore, the game using the augmented reality technology can be smoothly advanced without causing the player to feel uncomfortable.

(9)
ゲーム処理手段は、上記仮想オブジェクトの動作を制御する処理をゲーム処理として実行してもよい。
(9)
The game processing means may execute a process for controlling the operation of the virtual object as a game process.

なお、上記「仮想オブジェクトの動作を制御する処理」は、ユーザによる入力に従って仮想オブジェクトの動作を制御する処理であってもよいし、ゲームプログラムにおいて予め定められたアルゴリズムに従って仮想オブジェクトの動作を制御する処理であってもよい。   The “process for controlling the motion of the virtual object” may be a process for controlling the motion of the virtual object according to an input by the user, or the motion of the virtual object is controlled according to a predetermined algorithm in the game program. It may be a process.

上記(9)の構成によれば、ゲーム処理の結果として仮想オブジェクトが動作する画像(動画)を拡張現実感技術によって表示することができる。さらに、ゲーム処理は認識処理の処理結果にかかわらず実行されるので、上記(2)の構成と同様、仮想オブジェクトは一定の頻度で画像が更新される。そのため、仮想オブジェクトの動画が滑らかに表示されることによって、合成画像(ゲーム画像)全体としては滑らかな印象をユーザに与えることができる。   According to the configuration of (9) above, an image (moving image) in which a virtual object operates as a result of the game process can be displayed using augmented reality technology. Furthermore, since the game process is executed regardless of the processing result of the recognition process, the image of the virtual object is updated at a constant frequency as in the configuration (2). Therefore, by smoothly displaying the moving image of the virtual object, it is possible to give the user a smooth impression as the entire composite image (game image).

(10)
表示制御手段は、認識処理が連続して失敗した結果、所定の条件が満たされたことに応じて、撮像画像とは異なる警告画像を表示手段に表示させてもよい。
(10)
The display control unit may cause the display unit to display a warning image different from the captured image in response to a predetermined condition being satisfied as a result of the continuous failure of the recognition process.

上記(10)の構成によれば、(所定の条件を満たす程度に)認識処理が連続して失敗した場合には、合成画像から警告画像へと表示が変化することになる。したがって、所定の条件を適切に設定することによって、認識処理が成功する見込みが少ないことをユーザに通知することができる。ここで、認識処理が連続して失敗した場合には、仮想オブジェクトの画像のみを消去し、撮像画像のみを表示する方法も考えられる。しかし、この方法では、仮想オブジェクト自体が変化したことが原因で、仮想オブジェクトの画像が消えた(例えば、ゲームを例とすれば、敵オブジェクトが倒されて消える場合もある)のか、認識処理が失敗したことが原因で仮想オブジェクトの画像が消えたのか、判断がつきにくいこともある。これに対して、上記(10)の構成によれば、撮像画像とは異なる警告画像を表示することで、認識処理が連続して失敗していることをユーザに明確に通知することができる。   According to the configuration of (10) above, when the recognition process fails continuously (to a predetermined condition), the display changes from the composite image to the warning image. Therefore, by appropriately setting the predetermined condition, it is possible to notify the user that the probability that the recognition process will be successful is low. Here, when the recognition process fails continuously, a method of deleting only the image of the virtual object and displaying only the captured image is also conceivable. However, with this method, the virtual object image has disappeared due to the change in the virtual object itself (for example, in the case of a game, the enemy object may be killed and disappear), It may be difficult to determine whether the virtual object image has disappeared due to failure. On the other hand, according to the configuration of (10) above, it is possible to clearly notify the user that the recognition process has failed continuously by displaying a warning image different from the captured image.

(11)
表示制御手段は、認識処理が所定時間の間連続して失敗したことを所定の条件として、警告画像を表示手段に表示させてもよい。
(11)
The display control means may display the warning image on the display means on the condition that the recognition processing has failed continuously for a predetermined time.

上記(11)の構成によれば、認識処理が所定時間連続して失敗した場合、警告画像が表示される。このような場合には認識処理が再度成功する見込みが少ないと推測されるので、上記(11)の構成によれば、適切なタイミングでユーザに対して警告を行うことができる。   With configuration (11) above, a warning image is displayed when the recognition process fails continuously for a predetermined time. In such a case, it is estimated that the recognition process is unlikely to succeed again. According to the configuration (11), a warning can be given to the user at an appropriate timing.

(12)
画像表示プログラムは、撮像手段または情報処理装置の動きを検知する動き検知手段としてコンピュータをさらに機能させてもよい。このとき、表示制御手段は、動き検知手段によって撮像手段が所定の基準以上動いていることが検知されたことを所定の条件として、警告画像を表示手段に表示させてもよい。
(12)
The image display program may further cause the computer to function as a motion detection unit that detects the movement of the imaging unit or the information processing apparatus. At this time, the display control means may display a warning image on the display means on the condition that the motion detection means detects that the imaging means is moving beyond a predetermined reference.

上記(12)の構成によれば、撮像手段が所定の基準以上動かされた場合、警告画像が表示される。このような場合には認識処理が再度成功する見込みが少ないと推測されるので、上記(12)の構成によれば、適切なタイミングでユーザに対して警告を行うことができる。   With configuration (12) above, a warning image is displayed when the imaging means is moved beyond a predetermined reference. In such a case, it is estimated that the recognition process is unlikely to succeed again. According to the configuration (12), a warning can be given to the user at an appropriate timing.

(13)
画像表示プログラムは、認識処理の処理結果をゲーム入力として用いて、仮想オブジェクトの動作を制御する所定のゲーム制御処理を実行するゲーム制御処理手段としてコンピュータをさらに機能させてもよい。このとき、ゲーム制御処理手段は、警告画像が表示されることに応じて、ゲームの進行を中断する。
(13)
The image display program may further cause the computer to function as game control processing means for executing a predetermined game control process for controlling the operation of the virtual object using the processing result of the recognition process as a game input. At this time, the game control processing means interrupts the progress of the game in response to the display of the warning image.

上記(13)の構成によれば、警告画像が表示された場合、ゲームが中断される。したがって、ゲーム画像(合成画像)ではない警告画像が表示されている間にゲームが進行する不都合を防止することができる。   According to the configuration of (13) above, when a warning image is displayed, the game is interrupted. Therefore, it is possible to prevent inconvenience that the game progresses while a warning image that is not a game image (composite image) is displayed.

(14)
表示制御手段は、警告画像が表示された後において認識処理が連続して失敗した結果、所定の条件が満たされたことに応じて、撮像画像を表示手段に表示させてもよい。
(14)
The display control unit may cause the display unit to display the captured image in response to a predetermined condition being satisfied as a result of the continuous failure of the recognition process after the warning image is displayed.

上記(14)の構成によれば、警告画像が表示された後、所定の条件が満たされると、撮像画像が表示される。ここで、警告画像を表示し続けると、ユーザは撮像手段が撮像している画像を把握できないため、所定の対象を正しく撮像することができなくなってしまい、認識が成功する状態に戻すことが困難になる。これに対して、上記(14)の構成によれば、警告画像の後に撮像画像を表示することによって、ユーザは、所定の対象を正しく撮像できるように撮像手段の向きを修正しやすくなるので、認識が成功する状態に容易に戻すことができる。   According to the configuration of (14) above, the captured image is displayed when a predetermined condition is satisfied after the warning image is displayed. Here, if the warning image continues to be displayed, the user cannot grasp the image captured by the imaging unit, so that the predetermined target cannot be captured correctly, and it is difficult to return to a state where recognition is successful. become. On the other hand, according to the configuration of (14) above, by displaying the captured image after the warning image, the user can easily correct the orientation of the imaging unit so that the predetermined target can be captured correctly. It is possible to easily return to a state where recognition is successful.

(15)
表示制御手段は、認識処理が連続して失敗した結果、所定の条件が満たされたことに応じて、現時点で取得された撮像画像を表示手段に表示させてもよい。
(15)
The display control means may cause the display means to display the captured image acquired at the present time in response to the predetermined condition being satisfied as a result of the continuous failure of the recognition process.

上記(15)の構成によれば、(所定の条件を満たす程度に)認識処理が連続して失敗した場合には、合成画像から警告画像へと表示が変化することになる。したがって、所定の条件を適切に設定することによって、認識処理が成功する見込みが少ないことをユーザに通知することができる。   According to the configuration of (15) above, if the recognition process fails continuously (to the extent that a predetermined condition is satisfied), the display changes from the composite image to the warning image. Therefore, by appropriately setting the predetermined condition, it is possible to notify the user that the probability that the recognition process will be successful is low.

また、本発明は、上記各手段と同等の手段を備える画像表示装置の形態で実施されてもよい。この画像表示装置においては、画像表示プログラムを実行するコンピュータによって上記各手段が実現されてもよいし、専用回路によって上記各手段の一部または全部が実現されてもよい。また、本発明は、上記各手段を備える1以上の情報処理装置からなる画像表示システムの形態で実施されてもよい。このとき、1以上の情報処理装置は、有線または無線通信によって直接通信を行ってもよいし、ネットワークを介して通信を行ってもよい。さらに、本発明は、上記各手段によって行われる画像表示方法の形態で実施されてもよい。   The present invention may also be implemented in the form of an image display device that includes means equivalent to the above-described means. In this image display apparatus, each of the above means may be realized by a computer that executes an image display program, or a part or all of each of the above means may be realized by a dedicated circuit. Moreover, the present invention may be implemented in the form of an image display system including one or more information processing apparatuses including the above-described units. At this time, the one or more information processing apparatuses may perform direct communication via wired or wireless communication, or may perform communication via a network. Furthermore, the present invention may be implemented in the form of an image display method performed by each of the above means.

本発明は、撮像画像に対する認識処理が失敗した場合に、前回に成功した認識処理の対象となった撮像画像と、その認識処理の処理結果を用いて生成される仮想オブジェクトの画像との合成画像を表示することによって、画像のちらつきや位置ずれを防止することができ、合成画像をより現実味を増して表示することができる。   The present invention provides a composite image of a captured image that has been the target of a previously successful recognition process and a virtual object image that is generated using the processing result of the recognition process when the recognition process for the captured image fails. By displaying, it is possible to prevent the image from flickering and displacement, and it is possible to display the composite image with more realism.

本実施形態に係るゲーム装置の外観図External view of game device according to this embodiment ゲーム装置の内部構成の一例を示すブロック図Block diagram showing an example of the internal configuration of the game device ゲーム装置を使用する例を示す図The figure which shows the example which uses a game device ゲーム装置に表示されるゲーム画像の一例を示す図The figure which shows an example of the game image displayed on a game device 合成画像の生成処理を説明するための図The figure for demonstrating the production | generation process of a composite image 認識が失敗した場合における合成画像の生成処理を説明するための図The figure for demonstrating the production | generation process of a composite image when recognition fails 撮像画像の取得間隔および認識処理に要する時間を、CG画像の生成間隔と同じとした場合における合成処理を示す図The figure which shows the compositing process when the acquisition interval of a captured image and the time required for recognition processing are the same as the generation interval of a CG image ゲームプログラムによる処理において用いられる各種データを示す図The figure which shows the various data which are used in the processing with the game program ゲーム装置において実行されるゲーム処理の流れを示すメインフローチャートMain flowchart showing the flow of game processing executed in the game device 図9に示す認識管理処理(ステップS3)の流れを示すフローチャートThe flowchart which shows the flow of the recognition management process (step S3) shown in FIG. 図9に示すゲーム制御処理(ステップS4)の流れを示すフローチャートThe flowchart which shows the flow of the game control process (step S4) shown in FIG. 図9に示す表示処理(ステップS5)の流れを示すフローチャートThe flowchart which shows the flow of the display process (step S5) shown in FIG. 本実施形態における表示処理(ステップS5)の変形例を示すフローチャートThe flowchart which shows the modification of the display process (step S5) in this embodiment.

[ゲーム装置のハードウェア構成]
以下、図面を参照して、本発明の一実施形態に係る画像表示プログラムおよび画像表示装置について説明する。本発明は、表示装置に画像を表示させる任意の情報処理装置(コンピュータ)において画像表示プログラムが実行されることによって実現することができるが、本実施形態では、情報処理装置の一例として図1に示すゲーム装置1を用いる場合について説明する。
[Hardware configuration of game device]
Hereinafter, an image display program and an image display apparatus according to an embodiment of the present invention will be described with reference to the drawings. The present invention can be realized by executing an image display program in an arbitrary information processing apparatus (computer) that displays an image on the display apparatus. In the present embodiment, FIG. The case where the game apparatus 1 shown is used will be described.

図1は、本実施形態に係るゲーム装置1の外観図である。ここでは、ゲーム装置1の一例として、携帯ゲーム装置を示す。なお、ゲーム装置1は、カメラを内蔵しており、当該カメラによって画像を撮像し、撮像した画像を画面に表示したり、撮像した画像のデータを保存したりする撮像装置としても機能する。   FIG. 1 is an external view of a game apparatus 1 according to the present embodiment. Here, a portable game device is shown as an example of the game device 1. Note that the game apparatus 1 has a built-in camera, and functions as an imaging apparatus that captures an image with the camera, displays the captured image on a screen, and stores data of the captured image.

図1において、ゲーム装置1は折り畳み型の携帯ゲーム装置であり、開いた状態(開状態)のゲーム装置1を示している。ゲーム装置1は、開いた状態においてもユーザが両手または片手で把持することができるようなサイズで構成される。   In FIG. 1, a game apparatus 1 is a foldable portable game apparatus, and shows the game apparatus 1 in an open state (open state). The game apparatus 1 is configured in such a size that the user can hold it with both hands or one hand even in an open state.

ゲーム装置1は、下側ハウジング11および上側ハウジング21を有する。下側ハウジング11と上側ハウジング21とは、開閉可能(折り畳み可能)に連結されている。図1の例では、下側ハウジング11および上側ハウジング21は、それぞれ横長の長方形の板状に形成され、互いの長辺部分で回転可能に連結されている。通常、ユーザは、開状態でゲーム装置1を使用する。また、ユーザは、ゲーム装置1を使用しない場合には閉状態としてゲーム装置1を保管する。また、図1に示した例では、ゲーム装置1は、上記閉状態および開状態のみでなく、下側ハウジング11と上側ハウジング21とのなす角度が閉状態と開状態との間の任意の角度において、連結部分に発生する摩擦力などによってその開閉角度を維持することができる。つまり、上側ハウジング21を下側ハウジング11に対して任意の角度で静止させることができる。   The game apparatus 1 includes a lower housing 11 and an upper housing 21. The lower housing 11 and the upper housing 21 are connected so as to be openable and closable (foldable). In the example of FIG. 1, the lower housing 11 and the upper housing 21 are each formed in a horizontally-long rectangular plate shape, and are coupled so as to be rotatable at their long side portions. Normally, the user uses the game apparatus 1 in the open state. Further, when the user does not use the game apparatus 1, the user stores the game apparatus 1 in a closed state. In the example shown in FIG. 1, the game apparatus 1 is not limited to the closed state and the open state, and the angle formed by the lower housing 11 and the upper housing 21 is an arbitrary angle between the closed state and the open state. The opening / closing angle can be maintained by a frictional force generated in the connecting portion. That is, the upper housing 21 can be made stationary with respect to the lower housing 11 at an arbitrary angle.

下側ハウジング11には、下側LCD(Liquid Crystal Display:液晶表示装置)12が設けられる。下側LCD12は横長形状であり、長辺方向が下側ハウジング11の長辺方向に一致するように配置される。なお、本実施形態では、ゲーム装置1に内蔵されている表示装置としてLCDを用いているが、例えばEL(Electro Luminescence:電界発光)を利用した表示装置等、他の任意の表示装置を利用しても良い。また、ゲーム装置1は、任意の解像度の表示装置を利用することができる。なお、下側LCD12には、内側カメラ23または外側カメラ25で撮像されている画像がリアルタイムに表示される。   The lower housing 11 is provided with a lower LCD (Liquid Crystal Display) 12. The lower LCD 12 has a horizontally long shape, and is arranged such that the long side direction coincides with the long side direction of the lower housing 11. In the present embodiment, an LCD is used as the display device built in the game apparatus 1, but other arbitrary display devices such as a display device using EL (Electro Luminescence) are used. May be. The game apparatus 1 can use a display device having an arbitrary resolution. Note that an image captured by the inner camera 23 or the outer camera 25 is displayed on the lower LCD 12 in real time.

下側ハウジング11には、入力装置として、各操作ボタン14A〜14Kおよびタッチパネル13が設けられる。図1に示されるように、各操作ボタン14A〜14Kのうち、方向入力ボタン14A、操作ボタン14B、操作ボタン14C、操作ボタン14D、操作ボタン14E、電源ボタン14F、スタートボタン14G、およびセレクトボタン14Hは、下側ハウジング11の内側主面上に設けられる。内側主面とは、上側ハウジング21と下側ハウジング11とを折り畳んだときに内側となる面である。図1に示す例では、方向入力ボタン14Aおよび電源ボタン14Fは、下側ハウジング11の内側主面の中央付近に設けられる下側LCD12に対して、左右一方側(図1では左側)の当該主面上に設けられる。また、操作ボタン14B〜14E、スタートボタン14G、およびセレクトボタン14Hは、下側LCD12に対して左右他方側(図1では右側)となる下側ハウジング11の内側主面上に設けられる。方向入力ボタン14A、操作ボタン14B〜14E、スタートボタン14G、およびセレクトボタン14Hは、ゲーム装置1に対する各種操作を行うために用いられる。方向入力ボタン14Aは、例えば選択操作等に用いられる。各操作ボタン14B〜14Eは、例えば決定操作やキャンセル操作等に用いられる。電源ボタン14Fは、ゲーム装置1の電源をオン/オフするために用いられる。   The lower housing 11 is provided with operation buttons 14A to 14K and a touch panel 13 as input devices. As shown in FIG. 1, among the operation buttons 14A to 14K, a direction input button 14A, an operation button 14B, an operation button 14C, an operation button 14D, an operation button 14E, a power button 14F, a start button 14G, and a select button 14H. Is provided on the inner main surface of the lower housing 11. The inner main surface is a surface that becomes the inner side when the upper housing 21 and the lower housing 11 are folded. In the example shown in FIG. 1, the direction input button 14 </ b> A and the power button 14 </ b> F are on the left and right sides (left side in FIG. 1) of the main LCD 14 with respect to the lower LCD 12 provided near the center of the inner main surface of the lower housing 11. Provided on the surface. In addition, the operation buttons 14B to 14E, the start button 14G, and the select button 14H are provided on the inner main surface of the lower housing 11 that is on the other side of the lower LCD 12 (right side in FIG. 1). The direction input button 14A, the operation buttons 14B to 14E, the start button 14G, and the select button 14H are used for performing various operations on the game apparatus 1. The direction input button 14A is used for, for example, a selection operation. The operation buttons 14B to 14E are used for, for example, a determination operation or a cancel operation. The power button 14F is used for turning on / off the power of the game apparatus 1.

なお、図1においては、操作ボタン14I〜14Kの図示を省略している。例えば、Lボタン14Iは、下側ハウジング11の上側面の左端部に設けられ、Rボタン14Jは、下側ハウジング11の上側面の右端部に設けられる。Lボタン14IおよびRボタン14Jは、撮影機能を有するゲーム装置1に対して、例えば撮影指示操作(シャッター操作)を行うために用いられる。さらに、音量ボタン14Kは、下側ハウジング11の左側面に設けられる。音量ボタン14Kは、ゲーム装置1が備えるスピーカの音量を調整するために用いられる。   In FIG. 1, the operation buttons 14I to 14K are not shown. For example, the L button 14I is provided at the left end portion of the upper side surface of the lower housing 11, and the R button 14J is provided at the right end portion of the upper side surface of the lower housing 11. The L button 14I and the R button 14J are used, for example, to perform a shooting instruction operation (shutter operation) on the game apparatus 1 having a shooting function. Furthermore, the volume button 14K is provided on the left side surface of the lower housing 11. The volume button 14K is used to adjust the volume of the speaker provided in the game apparatus 1.

また、ゲーム装置1は、各操作ボタン14A〜14Kとは別の入力装置としてさらに、画面上における任意の位置を指定可能な入力装置であるポインティングデバイスの一例として、タッチパネル13を備えている。タッチパネル13は、下側LCD12の画面上を覆うように装着されている。なお、本実施形態では、タッチパネル13は、例えば抵抗膜方式のタッチパネルが用いられる。ただし、タッチパネル13は、抵抗膜方式に限らず、任意の方式のタッチパネルを用いることができる。また、本実施形態では、タッチパネル13として、例えば下側LCD12の解像度と同じ解像度(検出精度)のものを利用する。ただし、必ずしもタッチパネル13の解像度と下側LCD12の解像度とが一致している必要はない。また、下側ハウジング11の右側面には、挿入口(図1では破線で示している)が設けられている。挿入口は、タッチパネル13に対する操作を行うために用いられるタッチペン27を収納することができる。なお、タッチパネル13に対する入力(タッチ入力)は、通常タッチペン27を用いて行われるが、タッチペン27に限らずユーザの指でタッチパネル13を操作することも可能である。   In addition, the game apparatus 1 includes a touch panel 13 as an example of a pointing device that is an input device that can specify an arbitrary position on the screen as an input device different from the operation buttons 14A to 14K. The touch panel 13 is mounted so as to cover the screen of the lower LCD 12. In the present embodiment, for example, a resistive film type touch panel is used as the touch panel 13. However, the touch panel 13 is not limited to the resistive film type, and any type of touch panel can be used. In the present embodiment, the touch panel 13 having the same resolution (detection accuracy) as that of the lower LCD 12 is used, for example. However, the resolution of the touch panel 13 and the resolution of the lower LCD 12 are not necessarily matched. An insertion port (shown by a broken line in FIG. 1) is provided on the right side surface of the lower housing 11. The insertion opening can accommodate a touch pen 27 used for performing an operation on the touch panel 13. In addition, although the input (touch input) with respect to the touch panel 13 is normally performed using the touch pen 27, not only the touch pen 27 but the touch panel 13 can also be operated with a user's finger | toe.

また、下側ハウジング11の右側面には、メモリカード28を収納するための挿入口(図1では二点鎖線で示している)が設けられている。この挿入口の内側には、ゲーム装置1とメモリカード28とを電気的に接続するためのコネクタ(図示せず)が設けられる。メモリカード28は、例えばSD(Secure Digital)メモリカードであり、コネクタに着脱自在に装着される。メモリカード28は、例えば、ゲーム装置1によって撮像された画像を記憶(保存)したり、他の装置で生成された画像をゲーム装置1に読み込んだりするために用いられる。   Further, on the right side surface of the lower housing 11, an insertion slot (indicated by a two-dot chain line in FIG. 1) for storing the memory card 28 is provided. A connector (not shown) for electrically connecting the game apparatus 1 and the memory card 28 is provided inside the insertion slot. The memory card 28 is, for example, an SD (Secure Digital) memory card, and is detachably attached to the connector. The memory card 28 is used, for example, for storing (saving) an image captured by the game apparatus 1 or reading an image generated by another apparatus into the game apparatus 1.

さらに、下側ハウジング11の上側面には、メモリカード29を収納するための挿入口(図1では、一点鎖線で示している)が設けられている。この挿入口の内側にも、ゲーム装置1とメモリカード29とを電気的に接続するためのコネクタ(図示せず)が設けられる。メモリカード29は、ゲームプログラム等の情報処理プログラムを記録した記録媒体であり、下側ハウジング11に設けられた挿入口に着脱自在に装着される。   Further, an insertion slot (indicated by a one-dot chain line in FIG. 1) for accommodating the memory card 29 is provided on the upper side surface of the lower housing 11. A connector (not shown) for electrically connecting the game apparatus 1 and the memory card 29 is also provided inside the insertion slot. The memory card 29 is a recording medium on which an information processing program such as a game program is recorded, and is detachably attached to an insertion port provided in the lower housing 11.

下側ハウジング11と上側ハウジング21との連結部の左側部分には、3つのLED15A〜15Cが取り付けられる。ここで、ゲーム装置1は、他の機器との間で無線通信を行うことが可能であり、第1LED15Aは、ゲーム装置1の電源がオンである場合に点灯する。第2LED15Bは、ゲーム装置1の充電中に点灯する。第3LED15Cは、無線通信が確立している場合に点灯する。したがって、3つのLED15A〜15Cによって、ゲーム装置1の電源のオン/オフ状況、充電状況、および、通信確立状況をユーザに通知することができる。   Three LEDs 15 </ b> A to 15 </ b> C are attached to the left portion of the connecting portion between the lower housing 11 and the upper housing 21. Here, the game apparatus 1 can perform wireless communication with other devices, and the first LED 15A is lit when the power of the game apparatus 1 is on. The second LED 15B is lit while the game apparatus 1 is being charged. The third LED 15C is lit when wireless communication is established. Therefore, the three LEDs 15A to 15C can notify the user of the power on / off status of the game apparatus 1, the charging status, and the communication establishment status.

一方、上側ハウジング21には、上側LCD22が設けられる。上側LCD22は横長形状であり、長辺方向が上側ハウジング21の長辺方向に一致するように配置される。なお、下側LCD12と同様、上側LCD22に代えて、他の任意の方式および任意の解像度の表示装置を利用しても良い。なお、上側LCD22上を覆うように、タッチパネルを設けてもかまわない。上側LCD22には、例えば、各操作ボタン14A〜14Kやタッチパネル13の役割をユーザに教えるための操作説明画面が表示される。   On the other hand, the upper housing 21 is provided with an upper LCD 22. The upper LCD 22 has a horizontally long shape and is arranged such that the long side direction coincides with the long side direction of the upper housing 21. As in the case of the lower LCD 12, instead of the upper LCD 22, a display device having any other method and any resolution may be used. A touch panel may be provided so as to cover the upper LCD 22. On the upper LCD 22, for example, an operation explanation screen for teaching the user the roles of the operation buttons 14A to 14K and the touch panel 13 is displayed.

また、上側ハウジング21には、2つのカメラ(内側カメラ23および外側カメラ25)が設けられる。図1に示されるように、内側カメラ23は、上側ハウジング21の連結部付近の内側主面に取り付けられる。一方、外側カメラ25は、内側カメラ23が取り付けられる内側主面の反対側の面、すなわち、上側ハウジング21の外側主面(ゲーム装置1が閉状態となった場合に外側となる面であり、図1に示す上側ハウジング21の背面)に取り付けられる。なお、図1においては、外側カメラ25を破線で示している。これによって、内側カメラ23は、上側ハウジング21の内側主面が向く方向を撮像することが可能であり、外側カメラ25は、内側カメラ23の撮像方向の逆方向、すなわち、上側ハウジング21の外側主面が向く方向を撮像することが可能である。このように、本実施形態では、2つの内側カメラ23および外側カメラ25の撮像方向が互いに逆方向となるように設けられる。例えば、ユーザは、ゲーム装置1からユーザの方を見た景色を内側カメラ23で撮像することができるとともに、ゲーム装置1からユーザの反対側の方向を見た景色を外側カメラ25で撮像することができる。   The upper housing 21 is provided with two cameras (an inner camera 23 and an outer camera 25). As shown in FIG. 1, the inner camera 23 is attached to the inner main surface near the connecting portion of the upper housing 21. On the other hand, the outer camera 25 is a surface on the opposite side of the inner main surface to which the inner camera 23 is attached, that is, the outer main surface of the upper housing 21 (the outer surface when the game apparatus 1 is in a closed state, It is attached to the rear surface of the upper housing 21 shown in FIG. In FIG. 1, the outer camera 25 is indicated by a broken line. As a result, the inner camera 23 can capture an image in the direction in which the inner main surface of the upper housing 21 faces, and the outer camera 25 can rotate in the direction opposite to the image capturing direction of the inner camera 23, that is, the outer main surface of the upper housing 21. It is possible to image the direction in which the surface faces. Thus, in the present embodiment, the two inner cameras 23 and the outer cameras 25 are provided so that the imaging directions are opposite to each other. For example, the user can take an image of a scene viewed from the game apparatus 1 with the inner camera 23 and can also capture an image of the scene viewed from the game apparatus 1 on the opposite side of the user with the outer camera 25. Can do.

なお、上記連結部付近の内側主面には、音声入力装置としてマイク(図2に示すマイク43)が収納されている。そして、上記連結部付近の内側主面には、マイク43がゲーム装置1外部の音を検知できるように、マイクロフォン用孔16が形成される。マイク43を収納する位置およびマイクロフォン用孔16の位置は必ずしも上記連結部である必要はなく、例えば下側ハウジング11にマイク43を収納し、マイク43を収納位置に対応させて下側ハウジング11にマイクロフォン用孔16を設けるようにしても良い。   Note that a microphone (a microphone 43 shown in FIG. 2) is accommodated as an audio input device on the inner main surface near the connecting portion. A microphone hole 16 is formed on the inner main surface near the connecting portion so that the microphone 43 can detect the sound outside the game apparatus 1. The position where the microphone 43 is housed and the position of the microphone hole 16 do not necessarily have to be the connecting portion. For example, the microphone 43 is housed in the lower housing 11 and the microphone 43 is placed in the lower housing 11 corresponding to the housing position. A microphone hole 16 may be provided.

また、上側ハウジング21の外側主面には、第4LED26(図1では、破線で示す)が取り付けられる。第4LED26は、内側カメラ23または外側カメラ25によって撮影が行われた(シャッターボタンが押下された)時点で点灯する。また、内側カメラ23または外側カメラ25によって動画が撮影される間点灯する。第4LED26によって、ゲーム装置1による撮影が行われた(行われている)ことを撮影対象者や周囲に通知することができる。   A fourth LED 26 (shown by a broken line in FIG. 1) is attached to the outer main surface of the upper housing 21. The fourth LED 26 is turned on at the time when photographing is performed by the inner camera 23 or the outer camera 25 (the shutter button is pressed). Further, it is lit while a moving image is shot by the inner camera 23 or the outer camera 25. The fourth LED 26 can notify the subject to be photographed and the surroundings that photographing by the game apparatus 1 has been performed (performed).

また、上側ハウジング21の内側主面の中央付近に設けられる上側LCD22に対して、左右両側の当該主面に音抜き孔24がそれぞれ形成される。音抜き孔24の奥の上側ハウジング21内にはスピーカが収納されている。音抜き孔24は、スピーカからの音をゲーム装置1の外部に放出するための孔である。   In addition, with respect to the upper LCD 22 provided near the center of the inner main surface of the upper housing 21, sound release holes 24 are formed in the main surfaces on both the left and right sides. A speaker is housed in the upper housing 21 behind the sound release hole 24. The sound release hole 24 is a hole for releasing sound from the speaker to the outside of the game apparatus 1.

以上に説明したように、上側ハウジング21には、画像を撮像するための撮像手段である内側カメラ23および外側カメラ25と、主に操作説明画面を表示するための表示手段である上側LCD22とが設けられる。一方、下側ハウジング11には、ゲーム装置1に対する操作入力を行うための入力装置(タッチパネル13および各操作ボタン14A〜14K)と、撮像された画像を表示するための表示手段である下側LCD12とが設けられる。したがって、ゲーム装置1を使用する際には、ユーザは、下側LCD12に表示される撮像画像(カメラによって撮像された画像)を見ながら、下側ハウジング11を把持して入力装置に対する入力を行うことができる。   As described above, the upper housing 21 includes the inner camera 23 and the outer camera 25 that are imaging means for capturing an image, and the upper LCD 22 that is a display means for mainly displaying an operation explanation screen. Provided. On the other hand, the lower housing 11 has an input device (touch panel 13 and operation buttons 14A to 14K) for performing an operation input to the game apparatus 1 and a lower LCD 12 which is a display means for displaying a captured image. And are provided. Therefore, when using the game apparatus 1, the user grasps the lower housing 11 and performs input to the input device while viewing the captured image (image captured by the camera) displayed on the lower LCD 12. be able to.

次に、図2を参照して、ゲーム装置1の内部構成を説明する。図2は、ゲーム装置1の内部構成の一例を示すブロック図である。   Next, the internal configuration of the game apparatus 1 will be described with reference to FIG. FIG. 2 is a block diagram illustrating an example of the internal configuration of the game apparatus 1.

図2において、ゲーム装置1は、CPU31、メインメモリ32、メモリ制御回路33、保存用データメモリ34、プリセットデータ用メモリ35、メモリカードインターフェース(メモリカードI/F)36、メモリカードI/F37、無線通信モジュール38、ローカル通信モジュール39、リアルタイムクロック(RTC)40、電源回路41、インターフェース回路(I/F回路)42、第1GPU(Graphics Processing Unit)45、第2GPU46、第1VRAM(Video RAM)47、第2VRAM48、およびLCDコントローラ49等の電子部品を備えている。これらの電子部品は、電子回路基板上に実装されて、下側ハウジング11(または上側ハウジング21でも良い)内に収納される。   2, the game apparatus 1 includes a CPU 31, a main memory 32, a memory control circuit 33, a storage data memory 34, a preset data memory 35, a memory card interface (memory card I / F) 36, a memory card I / F 37, Wireless communication module 38, local communication module 39, real-time clock (RTC) 40, power supply circuit 41, interface circuit (I / F circuit) 42, first GPU (Graphics Processing Unit) 45, second GPU 46, first VRAM (Video RAM) 47 The second VRAM 48 and the LCD controller 49 are provided. These electronic components are mounted on an electronic circuit board and housed in the lower housing 11 (or the upper housing 21).

CPU31は、所定のプログラム(ここでは、本実施形態に係る画像表示プログラム)を実行するための情報処理手段である。本実施形態では、画像表示プログラムの一例としてゲームプログラムがゲーム装置1内のメモリ(例えば保存用データメモリ34)やメモリカード28および/または29に記憶されており、CPU31は、当該ゲームプログラムを実行することによって、後述するゲーム処理を実行する。なお、CPU31によって実行されるプログラムは、ゲーム装置1内のメモリに予め記憶されていても良いし、メモリカード28および/または29から取得されても良いし、他の機器との通信によって他の機器から取得されても良い。   The CPU 31 is information processing means for executing a predetermined program (here, the image display program according to the present embodiment). In the present embodiment, as an example of the image display program, a game program is stored in a memory (for example, the storage data memory 34) or the memory card 28 and / or 29 in the game apparatus 1, and the CPU 31 executes the game program. By doing so, a game process to be described later is executed. Note that the program executed by the CPU 31 may be stored in advance in a memory in the game apparatus 1, may be acquired from the memory card 28 and / or 29, or may be obtained by communication with other devices. It may be acquired from the device.

CPU31には、メインメモリ32、メモリ制御回路33、およびプリセットデータ用メモリ35が接続される。メモリ制御回路33には、保存用データメモリ34が接続される。メインメモリ32は、CPU31のワーク領域やバッファ領域として用いられる記憶手段である。すなわち、メインメモリ32は、上記ゲーム処理に用いられる各種データを記憶したり、外部(メモリカード28および29や他の機器等)から取得されるプログラムを記憶したりする。本実施形態では、メインメモリ32として、例えばPSRAM(Pseudo−SRAM)を用いる。保存用データメモリ34は、CPU31によって実行されるプログラムや内側カメラ23および外側カメラ25によって撮像された画像のデータ等を記憶するための記憶手段である。保存用データメモリ34は、不揮発性の記憶媒体によって構成されており、本実施形態では例えばNAND型フラッシュメモリで構成される。メモリ制御回路33は、CPU31の指示に従って、保存用データメモリ34に対するデータの読み出しおよび書き込みを制御する回路である。プリセットデータ用メモリ35は、ゲーム装置1において予め設定される各種パラメータ等のデータ(プリセットデータ)を記憶するための記憶手段である。プリセットデータ用メモリ35としては、SPI(Serial Peripheral Interface)バスによってCPU31と接続されるフラッシュメモリを用いることができる。   A main memory 32, a memory control circuit 33, and a preset data memory 35 are connected to the CPU 31. A storage data memory 34 is connected to the memory control circuit 33. The main memory 32 is a storage means used as a work area or buffer area for the CPU 31. That is, the main memory 32 stores various data used for the game processing, and stores programs acquired from the outside (memory cards 28 and 29, other devices, etc.). In the present embodiment, for example, a PSRAM (Pseudo-SRAM) is used as the main memory 32. The storage data memory 34 is a storage unit for storing a program executed by the CPU 31, data of images taken by the inner camera 23 and the outer camera 25, and the like. The storage data memory 34 is configured by a nonvolatile storage medium, and is configured by, for example, a NAND flash memory in the present embodiment. The memory control circuit 33 is a circuit that controls reading and writing of data with respect to the storage data memory 34 in accordance with instructions from the CPU 31. The preset data memory 35 is storage means for storing data (preset data) such as various parameters set in advance in the game apparatus 1. As the preset data memory 35, a flash memory connected to the CPU 31 via an SPI (Serial Peripheral Interface) bus can be used.

メモリカードI/F36および37は、それぞれCPU31に接続される。メモリカードI/F36は、コネクタに装着されたメモリカード28に対するデータの読み出しおよび書き込みを、CPU31の指示に応じて行う。また、メモリカードI/F37は、コネクタに装着されたメモリカード29に対するデータの読み出しおよび書き込みを、CPU31の指示に応じて行う。本実施形態では、内側カメラ23および外側カメラ25によって撮像された画像データや他の装置から受信された画像データがメモリカード28に書き込まれたり、メモリカード28に記憶された画像データがメモリカード28から読み出されて保存用データメモリ34に記憶されたり、読み出された画像データがメモリカード28から読み出されて他の装置へ送信されたりする。また、メモリカード29に記憶された各種プログラムが、CPU31によって読み出されて実行されたりする。   Memory card I / Fs 36 and 37 are each connected to CPU 31. The memory card I / F 36 reads and writes data to and from the memory card 28 attached to the connector according to instructions from the CPU 31. The memory card I / F 37 reads and writes data to and from the memory card 29 attached to the connector in accordance with instructions from the CPU 31. In the present embodiment, image data captured by the inner camera 23 and the outer camera 25 and image data received from other devices are written to the memory card 28, or image data stored in the memory card 28 is stored in the memory card 28. And stored in the storage data memory 34, or the read image data is read from the memory card 28 and transmitted to another device. Various programs stored in the memory card 29 are read out and executed by the CPU 31.

なお、ゲームプログラムは、メモリカード29等の外部記憶媒体を通じてコンピュータシステムに供給されるだけでなく、有線または無線の通信回線を通じてコンピュータシステムに供給されても良い。また、ゲームプログラムは、コンピュータシステム内部の不揮発性記憶装置に予め記録されていても良い。なお、ゲームプログラムを記憶する情報記憶媒体としては、上記不揮発性記憶装置に限らず、CD−ROM、DVD、あるいはそれらに類する光学式ディスク状記憶媒体でも良い。   Note that the game program may be supplied not only to the computer system through an external storage medium such as the memory card 29 but also to the computer system through a wired or wireless communication line. The game program may be recorded in advance in a nonvolatile storage device inside the computer system. The information storage medium for storing the game program is not limited to the above-described nonvolatile storage device, and may be a CD-ROM, a DVD, or an optical disk storage medium similar to them.

無線通信モジュール38は、例えばIEEE802.11.b/gの規格に準拠した方式により、無線LANに接続する機能を有する。また、ローカル通信モジュール39は、所定の通信方式により同種のゲーム装置との間で無線通信を行う機能を有する。無線通信モジュール38およびローカル通信モジュール39は、CPU31に接続される。CPU31は、無線通信モジュール38を用いてインターネットを介して他の機器との間でデータを送受信したり、ローカル通信モジュール39を用いて同種の他のゲーム装置との間でデータを送受信したりすることができる。   The wireless communication module 38 is, for example, IEEE 802.11. It has a function of connecting to a wireless LAN by a method compliant with the b / g standard. Further, the local communication module 39 has a function of performing wireless communication with the same type of game device by a predetermined communication method. The wireless communication module 38 and the local communication module 39 are connected to the CPU 31. The CPU 31 transmits / receives data to / from other devices via the Internet using the wireless communication module 38, and transmits / receives data to / from other game devices of the same type using the local communication module 39. be able to.

また、CPU31には、RTC40および電源回路41が接続される。RTC40は、時間をカウントしてCPU31に出力する。例えば、CPU31は、RTC40によって計時された時間に基づいて、現在時刻(日付)等を計算することもできる。電源回路41は、ゲーム装置1が有する電源(典型的には電池であり、下側ハウジング11に収納される)から供給される電力を制御し、ゲーム装置1の各部品に電力を供給する。   Further, the RTC 40 and the power supply circuit 41 are connected to the CPU 31. The RTC 40 counts the time and outputs it to the CPU 31. For example, the CPU 31 can calculate the current time (date) based on the time counted by the RTC 40. The power supply circuit 41 controls power supplied from a power supply (typically a battery, which is stored in the lower housing 11) of the game apparatus 1, and supplies power to each component of the game apparatus 1.

また、ゲーム装置1は、マイク43およびアンプ44を備えている。マイク43およびアンプ44は、それぞれI/F回路42に接続される。マイク43は、ゲーム装置1に向かって発声されたユーザの音声を検知して、当該音声を示す音声信号をI/F回路42に出力する。アンプ44は、I/F回路42から音声信号を増幅してスピーカ(図示せず)から出力させる。I/F回路42は、CPU31に接続される。   Further, the game apparatus 1 includes a microphone 43 and an amplifier 44. The microphone 43 and the amplifier 44 are each connected to the I / F circuit 42. The microphone 43 detects the voice of the user uttered toward the game apparatus 1 and outputs a voice signal indicating the voice to the I / F circuit 42. The amplifier 44 amplifies the audio signal from the I / F circuit 42 and outputs it from a speaker (not shown). The I / F circuit 42 is connected to the CPU 31.

また、タッチパネル13は、I/F回路42に接続される。I/F回路42は、マイク43およびアンプ44(スピーカ)の制御を行う音声制御回路と、タッチパネル13の制御を行うタッチパネル制御回路とを含む。音声制御回路は、音声信号に対するA/D変換およびD/A変換を行ったり、音声信号を所定の形式の音声データに変換したりする。タッチパネル制御回路は、タッチパネル13からの信号に基づいて所定の形式のタッチ位置データ(後述する検出座標データ)を生成してCPU31に出力する。タッチ位置データは、タッチパネル13の入力面に対して入力が行われた位置としてタッチパネル13が検出した位置の座標を示すデータである。なお、タッチパネル制御回路は、タッチパネル13からの信号の読み込み、および、検出座標データの生成を所定時間に1回の割合で繰り返し行う。   The touch panel 13 is connected to the I / F circuit 42. The I / F circuit 42 includes a sound control circuit that controls the microphone 43 and the amplifier 44 (speaker), and a touch panel control circuit that controls the touch panel 13. The voice control circuit performs A / D conversion and D / A conversion on the voice signal, or converts the voice signal into voice data of a predetermined format. The touch panel control circuit generates touch position data (detected coordinate data described later) in a predetermined format based on a signal from the touch panel 13 and outputs it to the CPU 31. The touch position data is data indicating the coordinates of the position detected by the touch panel 13 as the position where the input is performed on the input surface of the touch panel 13. The touch panel control circuit repeatedly reads signals from the touch panel 13 and generates detected coordinate data at a rate of once per predetermined time.

操作ボタン14は、上記各操作ボタン14A〜14Kから構成され、CPU31に接続される。操作ボタン14からCPU31へは、各操作ボタン14A〜14Kに対する入力状況(押下されたか否か)を示す操作データが出力される。CPU31は、操作ボタン14から操作データを取得することによって、操作ボタン14に対する入力に応じた処理を実行する。   The operation button 14 includes the operation buttons 14A to 14K and is connected to the CPU 31. From the operation button 14 to the CPU 31, operation data indicating an input status (whether or not the button is pressed) for each of the operation buttons 14A to 14K is output. The CPU 31 obtains operation data from the operation button 14 to execute processing corresponding to the input to the operation button 14.

内側カメラ23および外側カメラ25は、それぞれCPU31に接続される。内側カメラ23および外側カメラ25は、CPU31の指示に応じて画像を撮像し、撮像した画像データをCPU31に出力する。本実施形態では、CPU31は、内側カメラ23および外側カメラ25のいずれか一方に対して撮像指示を行い、撮像指示を受けたカメラが画像を撮像して画像データをCPU31に送る。なお、内側カメラ23および外側カメラ25は動画の撮影も可能である。すなわち、内側カメラ23および外側カメラ25は、繰り返し撮像を行って撮像データをCPU31へ繰り返し送ることも可能である。   The inner camera 23 and the outer camera 25 are each connected to the CPU 31. The inner camera 23 and the outer camera 25 capture an image in accordance with an instruction from the CPU 31 and output the captured image data to the CPU 31. In the present embodiment, the CPU 31 issues an imaging instruction to either the inner camera 23 or the outer camera 25, and the camera that has received the imaging instruction captures an image and sends the image data to the CPU 31. Note that the inner camera 23 and the outer camera 25 can also shoot moving images. That is, the inner camera 23 and the outer camera 25 can repeatedly perform imaging and repeatedly transmit imaging data to the CPU 31.

第1GPU45には第1VRAM47が接続され、第2GPU46には第2VRAM48が接続される。第1GPU45は、CPU31からの指示に応じて、メインメモリ32に記憶されている表示画像を生成するためのデータに基づいて第1の表示画像を生成し、第1VRAM47に描画する。第2GPU46は、第1GPU45と同様に、CPU31からの指示に応じて第2の表示画像を生成し、第2VRAM48に描画する。第1VRAM47および第2VRAM48は、LCDコントローラ49に接続されている。   A first VRAM 47 is connected to the first GPU 45, and a second VRAM 48 is connected to the second GPU 46. In response to an instruction from the CPU 31, the first GPU 45 generates a first display image based on data for generating a display image stored in the main memory 32 and draws the first display image in the first VRAM 47. Similar to the first GPU 45, the second GPU 46 generates a second display image in accordance with an instruction from the CPU 31 and draws it in the second VRAM 48. The first VRAM 47 and the second VRAM 48 are connected to the LCD controller 49.

LCDコントローラ49は、レジスタ491を含む。レジスタ491は、CPU31からの指示に応じて0または1の値を記憶する。LCDコントローラ49は、レジスタ491の値が0の場合は、第1VRAM47に描画された第1の表示画像を下側LCD12に出力し、第2VRAM48に描画された第2の表示画像を上側LCD22に出力する。また、レジスタ491の値が1の場合は、第1VRAM47に描画された第1の表示画像を上側LCD22に出力し、第2VRAM48に描画された第2の表示画像を下側LCD12に出力する。例えば、CPU31は、内側カメラ23および外側カメラ25のいずれかから取得した画像を下側LCD12に表示させ、所定の処理によって生成した操作説明画面を上側LCD22に表示させることも可能である。   The LCD controller 49 includes a register 491. The register 491 stores a value of 0 or 1 according to an instruction from the CPU 31. When the value of the register 491 is 0, the LCD controller 49 outputs the first display image drawn in the first VRAM 47 to the lower LCD 12 and outputs the second display image drawn in the second VRAM 48 to the upper LCD 22. To do. If the value of the register 491 is 1, the first display image drawn in the first VRAM 47 is output to the upper LCD 22, and the second display image drawn in the second VRAM 48 is output to the lower LCD 12. For example, the CPU 31 can cause the lower LCD 12 to display an image acquired from either the inner camera 23 or the outer camera 25 and cause the upper LCD 22 to display an operation explanation screen generated by a predetermined process.

[画像合成処理の概要]
次に、図3から図6を参照して、上記ゲームプログラムによって実行されるゲーム処理中において行われる画像合成処理について説明する。ゲームプログラムは、カメラによって撮像された現実空間の画像(撮像画像)に仮想空間の画像(CG画像)を合成して表示する拡張現実感技術を用いてゲーム画像を表示し、プレイヤにゲームをプレイさせるものである。
[Overview of image composition processing]
Next, with reference to FIGS. 3 to 6, an image composition process performed during the game process executed by the game program will be described. The game program displays a game image using augmented reality technology that displays a virtual space image (CG image) combined with a real space image (captured image) captured by the camera, and plays the game to the player. It is something to be made.

図3は、ゲーム装置を使用する例を示す図である。本実施形態においては、図3に示すように、プレイヤ(ユーザ)は、マーカ52を任意の場所(図3では机51の上)に設置しておき、ゲーム装置1を用いてマーカ52およびその周辺を撮像する。撮像に用いられるカメラは、内側カメラ23および外側カメラ25のいずれであっても良いが、ここでは、外側カメラ25を用いる場合を例として説明する。マーカ52は、本実施形態では所定の模様が描かれた薄板状のものが用いられる。ただし、マーカは、後述する認識処理によって認識可能な物であれば良く、マーカ52のような専用品に限らず、例えばプレイヤの体の一部(顔等)がマーカとして用いられても良い。   FIG. 3 is a diagram illustrating an example of using a game device. In the present embodiment, as shown in FIG. 3, the player (user) installs the marker 52 at an arbitrary place (on the desk 51 in FIG. 3), and uses the game apparatus 1 and the marker 52 and the marker 52. Image the surroundings. The camera used for imaging may be either the inner camera 23 or the outer camera 25. Here, the case where the outer camera 25 is used will be described as an example. In the present embodiment, the marker 52 is a thin plate with a predetermined pattern drawn thereon. However, the marker is not limited to a dedicated product such as the marker 52 as long as it can be recognized by a recognition process described later. For example, a part of the player's body (face, etc.) may be used as the marker.

図4は、ゲーム装置に表示されるゲーム画像の一例を示す図である。図4は、図3に示すように机51の上に置かれたマーカ52をゲーム装置1が撮像する場合に、ゲーム装置1の上側LCD22に表示されるゲーム画像を示す。なお、本実施形態ではゲーム画像が上側LCD22に表示されるものとするが、ゲーム画像は下側LCD12に表示されてもよい。図4に示すように、上側LCD22には、仮想空間における仮想オブジェクトの画像(CG画像)として大砲53の画像が撮像画像に合成されて表示される。これによって、実際の机51の上に大砲53が存在するかのような画像を表示することができる。なお、詳細は後述するが、大砲53の動作はゲームプログラムによって制御され、大砲53は向きを変えたり、弾を発射したりする。つまり、本実施形態では、仮想オブジェクトの画像は動画として表示される。なお、図4では、仮想オブジェクトの一例として大砲53の画像が表示されるが、仮想オブジェクトはどのようなものであってもよい。   FIG. 4 is a diagram illustrating an example of a game image displayed on the game device. FIG. 4 shows a game image displayed on the upper LCD 22 of the game apparatus 1 when the game apparatus 1 images the marker 52 placed on the desk 51 as shown in FIG. In this embodiment, the game image is displayed on the upper LCD 22, but the game image may be displayed on the lower LCD 12. As shown in FIG. 4, the upper LCD 22 displays the image of the cannon 53 as a virtual object image (CG image) in the virtual space combined with the captured image. As a result, an image as if the cannon 53 is present on the actual desk 51 can be displayed. Although details will be described later, the operation of the cannon 53 is controlled by a game program, and the cannon 53 changes its direction and fires a bullet. That is, in this embodiment, the image of the virtual object is displayed as a moving image. In FIG. 4, an image of the cannon 53 is displayed as an example of the virtual object, but any virtual object may be used.

撮像画像に対してCG画像を合成した画像(合成画像)は、例えば次の処理によって生成することができる。まず、ゲーム装置1は、カメラによる撮像画像から、その中に含まれるマーカ52を認識する認識処理を実行する。マーカ52が認識された場合、ゲーム装置1は、認識されたマーカ52の形状および向き等から、ゲーム装置1(カメラ)とマーカ52との位置関係を算出する。位置関係とは、例えば、ゲーム装置1およびマーカ52の一方を基準としたときの他方の3次元の位置および姿勢として表される。なお、3次元位置を算出する場合には、例えば認識されたマーカ52の(撮像画像上での)大きさ等に基づいて両者の距離を決定してもよい。ゲーム装置1は、上記認識処理の処理結果として上記位置関係を算出する。さらに、ゲーム装置1は、位置関係に基づいて仮想空間における仮想カメラの位置および姿勢を算出する。仮想カメラの位置および姿勢は、仮想空間における仮想カメラと仮想オブジェクトとの位置関係が、現実空間におけるゲーム装置1とマーカ52との位置関係に一致するように算出される。仮想カメラの位置が決まると、ゲーム装置1は、仮想カメラの位置から仮想オブジェクトを見たCG画像を生成し、撮像画像に対して仮想オブジェクトのCG画像を合成する。以上の処理によって、ゲーム装置1は合成画像を生成して表示することができる。なお、上記認識処理(位置関係を算出する処理)、および、上記位置関係から仮想カメラの位置を算出する処理は、従来の拡張現実感技術における処理と同様であってもよい。   An image obtained by synthesizing the CG image with the captured image (synthesized image) can be generated by the following process, for example. First, the game apparatus 1 executes a recognition process for recognizing a marker 52 included in an image captured by a camera. When the marker 52 is recognized, the game apparatus 1 calculates the positional relationship between the game apparatus 1 (camera) and the marker 52 from the shape and direction of the recognized marker 52. The positional relationship is expressed as, for example, the other three-dimensional position and posture when one of the game apparatus 1 and the marker 52 is used as a reference. When calculating the three-dimensional position, the distance between the two may be determined based on the size of the recognized marker 52 (on the captured image), for example. The game apparatus 1 calculates the positional relationship as the processing result of the recognition process. Furthermore, the game apparatus 1 calculates the position and orientation of the virtual camera in the virtual space based on the positional relationship. The position and orientation of the virtual camera are calculated so that the positional relationship between the virtual camera and the virtual object in the virtual space matches the positional relationship between the game apparatus 1 and the marker 52 in the real space. When the position of the virtual camera is determined, the game apparatus 1 generates a CG image in which the virtual object is viewed from the position of the virtual camera, and synthesizes the CG image of the virtual object with the captured image. Through the above processing, the game apparatus 1 can generate and display a composite image. The recognition processing (processing for calculating the positional relationship) and the processing for calculating the position of the virtual camera from the positional relationship may be the same as the processing in the conventional augmented reality technology.

ここで、撮像画像にCG画像を合成して表示する拡張現実感技術においては、本発明の課題として上述したように、撮像画像とCG画像との位置ずれが生じたり、CG画像がちらついたりして表示されるおそれがあり、合成画像が現実味に欠けるおそれがある。そこで、本発明では、次に説明する処理によって、合成画像の現実味を増すようにしている。以下、図5および図6を参照して、合成画像の生成処理について説明する。   Here, in the augmented reality technology that synthesizes and displays a CG image on the captured image, as described above as the problem of the present invention, a misalignment between the captured image and the CG image occurs or the CG image flickers. May be displayed and the composite image may lack reality. Therefore, in the present invention, the realism of the composite image is increased by the processing described below. Hereinafter, the composite image generation process will be described with reference to FIGS. 5 and 6.

図5は、合成画像の生成処理を説明するための図である。図5において(後述する図6も同様)、横軸は時間を表しており、“撮像画像”、“CG画像”、“合成画像”の各欄は、それぞれの画像が取得(生成)されるタイミングを表す。また、“認識処理”の欄は、撮像画像に対する認識処理が完了するタイミングを表す。なお、図5では、CG画像は所定時間(1フレーム時間)間隔で生成されるのに対して、撮像画像はCG画像の生成間隔よりも長い間隔で取得され、また、認識処理に要する時間はCG画像の生成間隔よりも長い場合を想定している。   FIG. 5 is a diagram for explaining the composite image generation process. In FIG. 5 (the same applies to FIG. 6 described later), the horizontal axis represents time, and each column of “captured image”, “CG image”, and “composite image” acquires (generates) each image. Represents timing. Further, the “recognition process” column represents the timing when the recognition process for the captured image is completed. In FIG. 5, CG images are generated at predetermined time (one frame time) intervals, while captured images are acquired at intervals longer than the CG image generation interval, and the time required for recognition processing is as follows. It is assumed that the interval is longer than the CG image generation interval.

本実施形態において、撮像画像に対して認識処理を実行し、その処理結果に基づいてCG画像を生成し、撮像画像とCG画像とを合成して表示する点については、上述した通りである。なお、CG画像は認識処理の処理結果に基づいて生成され、認識処理には時間を要する。そのため、CG画像が生成される時点では、そのCG画像を生成する元になった撮像画像は最新のものではなく、最新の撮像画像はCG画像の元になった撮像画像とは別の画像となっている(例えば、図5に示す時刻T1,T4,T7参照)。   In the present embodiment, recognition processing is performed on a captured image, a CG image is generated based on the processing result, and the captured image and the CG image are combined and displayed as described above. Note that the CG image is generated based on the processing result of the recognition process, and the recognition process takes time. Therefore, at the time when the CG image is generated, the captured image from which the CG image is generated is not the latest, and the latest captured image is different from the captured image from which the CG image is based. (For example, see times T1, T4, and T7 shown in FIG. 5).

本実施形態では、ゲーム装置1は、合成画像を生成する際、取得された最新の撮像画像ではなく、認識処理が完了した撮像画像とCG画像とを合成する。例えば図5において、時刻T1では、時刻T1より前に取得された撮像画像R0に対する認識処理が完了しており、現時点T1で取得された撮像画像R1に対する認識処理は完了していない。そのため、時刻T1では、撮像画像R1ではなく、撮像画像R0とCG画像V1とが合成される。ここで、CG画像V1は撮像画像R0に対する認識処理の処理結果に基づいて生成された画像である。したがって、時刻T1においては、CG画像V1が生成される元となった撮像画像R0と、当該CG画像V1とを合成するので、上述した位置ずれは生じない。   In the present embodiment, when the game apparatus 1 generates a composite image, the game apparatus 1 synthesizes the captured image that has been subjected to the recognition process and the CG image instead of the latest acquired captured image. For example, in FIG. 5, at time T1, the recognition process for the captured image R0 acquired before time T1 is completed, and the recognition process for the captured image R1 acquired at the current time T1 is not completed. Therefore, at time T1, not the captured image R1, but the captured image R0 and the CG image V1 are combined. Here, the CG image V1 is an image generated based on the processing result of the recognition process for the captured image R0. Therefore, at time T1, since the captured image R0 from which the CG image V1 is generated and the CG image V1 are combined, the above-described positional deviation does not occur.

また、時刻T2およびT3では、撮像画像R1の認識処理は途中であり、次の認識処理が完了していないので、時刻T1と同様、撮像画像R0の認識処理結果に基づいてCG画像V2およびV3が生成される。したがって、時刻T2およびT3においても時刻T1と同様、撮像画像R0を用いて合成画像が生成される。つまり、CG画像V2およびV3は、これらのCG画像V2およびV3が生成される元となった撮像画像R0に対して合成されるので、時刻T2およびT3においても時刻T1と同様、上述した位置ずれを防止することができる。このように、ゲーム装置1は、次の認識処理が完了するまでは、認識処理が完了済みの撮像画像を用いて合成画像を生成する。   At times T2 and T3, the recognition process for the captured image R1 is in progress, and the next recognition process has not been completed. Therefore, similarly to the time T1, the CG images V2 and V3 are based on the recognition process result for the captured image R0. Is generated. Therefore, at time T2 and T3, similarly to time T1, a composite image is generated using the captured image R0. That is, since the CG images V2 and V3 are combined with the captured image R0 from which the CG images V2 and V3 are generated, the above-described positional deviation is also performed at the times T2 and T3 as at the time T1. Can be prevented. In this way, the game apparatus 1 generates a composite image using the captured image for which the recognition process has been completed until the next recognition process is completed.

なお、図5においては、時刻T4以降も時刻T1〜T3と同様、CG画像と、そのCG画像が生成される元となった撮像画像とが合成される。すなわち、時刻T4においては撮像画像R1の認識処理が完了するので、時刻T4〜T6においては、撮像画像R1に対して、撮像画像R1に基づいて生成されるCG画像V4〜V6がそれぞれ合成される。また、時刻T7においては撮像画像R2の認識処理が完了するので、時刻T7においては、撮像画像R2に対して、撮像画像R2に基づいて生成されるCG画像V7が合成される。   In FIG. 5, the CG image and the captured image from which the CG image is generated are combined after time T4 as in the times T1 to T3. That is, since recognition processing of the captured image R1 is completed at time T4, CG images V4 to V6 generated based on the captured image R1 are synthesized with the captured image R1 at times T4 to T6, respectively. . Further, since the recognition process of the captured image R2 is completed at time T7, the CG image V7 generated based on the captured image R2 is combined with the captured image R2 at time T7.

以上のように、ゲーム装置1は、CG画像が生成される元となった撮像画像と、合成画像の生成に用いられる撮像画像とを一致させるので、上述した位置ずれを防止することができる。   As described above, since the game apparatus 1 matches the captured image from which the CG image is generated with the captured image used for generating the composite image, the above-described positional shift can be prevented.

次に、認識処理が失敗する場合を考える。カメラでマーカ52を撮像していても、マーカ52に反射光が入ったり、光の加減で撮像画像内におけるマーカ52の色が変わったりする等の原因で、認識処理においてマーカ52を正しく認識できずに認識に失敗する場合もある。本実施形態においては、ゲーム装置1は、認識に失敗した場合をも考慮して、撮像画像とCG画像とを適切に合成する。   Next, consider a case where the recognition process fails. Even if the marker 52 is imaged by the camera, the marker 52 can be correctly recognized in the recognition process due to the reflected light entering the marker 52 or the color of the marker 52 in the captured image changing due to light addition or subtraction. In some cases, recognition may fail. In the present embodiment, the game apparatus 1 appropriately synthesizes the captured image and the CG image in consideration of the case where the recognition fails.

図6は、認識が失敗した場合における合成画像の生成処理を説明するための図である。図6においては、時刻T4において撮像画像R1の認識処理が失敗した場合を想定する。この場合、ゲーム装置1は、撮像画像R1に基づいてCG画像を生成することができない。ここで、仮に(認識が失敗してCG画像を生成できないため)CG画像を表示しないようにすれば、認識が断続的に失敗した場合、CG画像がちらついて表示されてしまう。そのため、本実施形態においては、ゲーム装置1は、認識が成功した最新の撮像画像R0の認識処理結果に基づいてCG画像V4を生成する。つまり、ゲーム装置1は、認識が失敗したことに応じて即時にCG画像の生成を中止することがないので、CG画像がちらついて表示されてしまうことを防止することができる。   FIG. 6 is a diagram for explaining a composite image generation process when recognition fails. In FIG. 6, it is assumed that the recognition process for the captured image R1 fails at time T4. In this case, the game apparatus 1 cannot generate a CG image based on the captured image R1. Here, if the CG image is not displayed (because the recognition fails and the CG image cannot be generated), if the recognition fails intermittently, the CG image is flickered and displayed. Therefore, in the present embodiment, the game apparatus 1 generates the CG image V4 based on the recognition processing result of the latest captured image R0 that has been successfully recognized. That is, since the game apparatus 1 does not immediately stop the generation of the CG image in response to the recognition failure, it is possible to prevent the CG image from flickering and being displayed.

さらに、本実施形態においては、時刻T4におけるCG画像V4は、この時刻T4において認識処理が完了した最新の撮像画像R1ではなく、最後に認識が成功した撮像画像R0に対して合成される(図6参照)。ここで、合成画像を生成する際に、認識が成功する場合(図5における時刻T4の場合)と同様、認識処理が完了した最新の撮像画像R1を用いるとすれば、CG画像V4を生成する元となった撮像画像と、合成に用いられる撮像画像とが異なることになり、上述した位置ずれが生じるおそれがある。そこで、本実施形態では、認識が失敗した場合には、ゲーム装置1は、認識が成功した最新の撮像画像を用いて合成画像を生成する。これによれば、認識が失敗した場合においても、CG画像と、そのCG画像が生成される元になった撮像画像とを合成することができるので、位置ずれを防止することができる。   Further, in the present embodiment, the CG image V4 at time T4 is combined with the captured image R0 that has been successfully recognized last, not the latest captured image R1 for which recognition processing has been completed at this time T4 (FIG. 6). Here, when the composite image is generated, the CG image V4 is generated if the latest captured image R1 for which the recognition process has been completed is used, as in the case where the recognition is successful (at time T4 in FIG. 5). The original captured image and the captured image used for composition are different, and the above-described positional deviation may occur. Therefore, in the present embodiment, when the recognition fails, the game apparatus 1 generates a composite image using the latest captured image that has been successfully recognized. According to this, even when the recognition fails, the CG image and the captured image from which the CG image is generated can be synthesized, so that misalignment can be prevented.

以上のように、本実施形態においては、認識処理が失敗した場合、ゲーム装置1は、前回に成功した認識処理の対象となった撮像画像と、当該認識処理の処理結果を用いて生成されるCG画像とを合成する。これによって、CG画像がちらついて表示されたり、撮像画像に対してCG画像の位置がずれて表示されたりすることを防止することができるので、合成画像の現実味をより向上することができる。つまり、「CG画像が実際に存在するかのような感覚を与える」という拡張現実感技術の効果を十分に発揮することができる。   As described above, in the present embodiment, when the recognition process fails, the game apparatus 1 is generated using the captured image that is the target of the recognition process that was successful last time and the processing result of the recognition process. A CG image is synthesized. Accordingly, it is possible to prevent the CG image from being displayed in a flickering manner or from being displayed with the position of the CG image being shifted from the captured image, so that the reality of the composite image can be further improved. That is, the effect of the augmented reality technology of “giving a sensation as if a CG image actually exists” can be sufficiently exhibited.

なお、認識処理が失敗した場合、本実施形態では「前回に成功した認識処理の対象となった撮像画像」が合成画像の生成に用いられた。ここで、他の実施形態においては、認識処理が失敗した場合に合成画像の生成に用いられる撮像画像は、以前に成功した認識処理の対象となった撮像画像であればよく、前回に成功した(すなわち、最後に成功した)認識処理の対象となった撮像画像に限らない。   In the case where the recognition process has failed, in the present embodiment, the “captured image that has been the target of the recognition process that was successful last time” is used to generate the composite image. Here, in another embodiment, when the recognition process fails, the captured image used for generating the composite image may be a captured image that has been the target of the previously successful recognition process, and succeeded in the previous time. The captured image is not limited to a recognition process (that is, the last successful process).

なお、本実施形態においては、最後に認識処理が成功した撮像画像が合成画像に用いられるので、認識が失敗した場合には、1つの撮像画像が長期間表示されることになり、一見すると、表示される合成画像の動画が滑らかでなくなるようにも思われる。しかしながら、本実施形態においては、合成画像のうちのCG画像は認識処理の成功/失敗にかかわらず毎回更新されるので、CG画像の動画は滑らかに表示される。そのため、ユーザは合成画像全体の動画についても不自然に感じることはなく、違和感を抱くことはないと考えられる。   In the present embodiment, since the captured image that has been successfully recognized last is used as the composite image, if the recognition is unsuccessful, one captured image is displayed for a long period of time. It seems that the animation of the displayed composite image is not smooth. However, in the present embodiment, the CG image of the composite image is updated every time regardless of the success / failure of the recognition process, so that the moving image of the CG image is displayed smoothly. Therefore, it is considered that the user does not feel unnatural about the moving image of the entire composite image and does not feel uncomfortable.

なお、本実施形態においては、認識処理に要する時間がCG画像の生成間隔よりも長い場合を想定したが、本発明は、認識処理に要する時間がCG画像の生成間隔と同じ(もしくは短い)場合においても、有効である。以下、この場合についても本発明が有効であることを図7を参照して説明する。   In the present embodiment, it is assumed that the time required for the recognition process is longer than the generation interval of the CG image. However, in the present invention, the time required for the recognition process is the same (or shorter) as the generation interval of the CG image. Is also effective. Hereinafter, it will be described with reference to FIG. 7 that the present invention is also effective in this case.

図7は、撮像画像の取得間隔および認識処理に要する時間を、CG画像の生成間隔と同じとした場合における合成処理を示す図である。図7においては、1フレーム時間(CG画像が生成される単位時間)毎に、撮像画像が取得され、撮像画像に対する認識処理が完了する場合を想定している。   FIG. 7 is a diagram illustrating a synthesis process when the captured image acquisition interval and the time required for the recognition process are the same as the CG image generation interval. In FIG. 7, it is assumed that a captured image is acquired every frame time (unit time in which a CG image is generated) and recognition processing for the captured image is completed.

図7においては、時刻T2において撮像画像R2の認識に失敗したものとする。ここで、もし仮に時刻T2において(認識処理に失敗したために)CG画像を表示しないとすれば、CG画像がちらついて表示されてしまう。また、もし仮に時刻T2において撮像画像R1に基づくCG画像V1と、撮像画像R2とを合成するとすれば、撮像画像R2とCG画像V1との間で位置ずれが生じるおそれがある。これに対して、本発明によれば、ゲーム装置1は、図6に示す時刻T4の場合と同様、前回に成功した認識処理の対象となった撮像画像R1と、当該認識処理の処理結果を用いて生成されるCG画像V2とを合成する。これによって、上記実施形態と同様、ゲーム装置1は、CG画像のちらつき、および、撮像画像とCG画像との位置ずれを防止することができる。   In FIG. 7, it is assumed that recognition of the captured image R2 has failed at time T2. Here, if the CG image is not displayed at time T2 (because the recognition process has failed), the CG image is displayed in a flickering manner. Further, if the CG image V1 based on the captured image R1 and the captured image R2 are combined at the time T2, there is a possibility that a positional deviation occurs between the captured image R2 and the CG image V1. On the other hand, according to the present invention, the game apparatus 1 uses the captured image R1 that is the object of the recognition process that was successful last time and the processing result of the recognition process, as in the case of time T4 shown in FIG. The generated CG image V2 is synthesized. As a result, similarly to the above embodiment, the game apparatus 1 can prevent the CG image from flickering and the positional deviation between the captured image and the CG image.

[ゲーム処理の詳細]
次に、図8〜図12を参照して、ゲームプログラムによって実行されるゲーム処理の詳細を説明する。以下では、ゲーム処理によって行われるゲームの例として、プレイヤが操作するプレイヤキャラクタが、図4に示したような大砲53に弾を命中させるゲームを説明する。具体的には、本ゲームでは、ゲームプログラムによって動作が制御され、向きを変えたり、弾を発射したりする大砲53がゲーム画像として表示される。また、本ゲームはいわゆる一人称視点のゲームであり、仮想空間における仮想カメラの位置はプレイヤキャラクタの位置としても用いられる。つまり、プレイヤは、ゲーム装置1を動かしてゲーム装置1とマーカ52との位置関係を変化させることによって、仮想空間内におけるプレイヤキャラクタを移動させることができる。また、プレイヤは、所定の操作を行うことによってプレイヤキャラクタに弾を発射させることができる。本ゲームにおいては、プレイヤは、プレイヤキャラクタを大砲53の弾に当たらないように移動させながら、大砲53に弾を命中させて遊ぶ。
[Details of game processing]
Next, details of the game process executed by the game program will be described with reference to FIGS. Hereinafter, as an example of a game performed by the game process, a game in which a player character operated by a player hits a cannon 53 as shown in FIG. 4 will be described. Specifically, in this game, the operation is controlled by a game program, and a cannon 53 that changes direction or fires a bullet is displayed as a game image. Further, this game is a so-called first person game, and the position of the virtual camera in the virtual space is also used as the position of the player character. That is, the player can move the player character in the virtual space by moving the game apparatus 1 to change the positional relationship between the game apparatus 1 and the marker 52. Further, the player can cause the player character to fire bullets by performing a predetermined operation. In this game, the player plays with the bullet hitting the cannon 53 while moving the player character so that it does not hit the bullet of the cannon 53.

まず、ゲーム処理において用いられる各種データについて説明する。図8は、ゲームプログラムによる処理において用いられる各種データを示す図である。図8において、ゲーム装置1のメインメモリ32には、ゲームプログラム領域60、撮像画像バッファ領域62、認識済画像バッファ領域65、およびゲーム処理データ領域67が設定される。   First, various data used in the game process will be described. FIG. 8 is a diagram showing various data used in processing by the game program. In FIG. 8, a game program area 60, a captured image buffer area 62, a recognized image buffer area 65, and a game processing data area 67 are set in the main memory 32 of the game apparatus 1.

ゲームプログラム領域60は、後述するゲーム処理(図9)をゲーム装置1のCPU31に実行させるためのゲームプログラム61を記憶する領域である。ゲームプログラム61は、メモリカード29からその一部または全部が適宜のタイミングで読み込まれることによってメインメモリ32に記憶される。ゲームプログラム61には、上述の画像合成処理を実行するためのプログラムや、認識処理を実行するためのプログラムが含まれる。   The game program area 60 is an area for storing a game program 61 for causing the CPU 31 of the game apparatus 1 to execute a game process (FIG. 9) described later. The game program 61 is stored in the main memory 32 by being partially or entirely read from the memory card 29 at an appropriate timing. The game program 61 includes a program for executing the above-described image composition processing and a program for executing recognition processing.

撮像画像バッファ領域62には、カメラによって撮像された撮像画像の画像データ(撮像画像データ)が記憶される。撮像画像バッファ領域62には、所定個数(例えば3個)の撮像画像データを記憶することが可能である。また、撮像画像バッファ領域62に記憶される撮像画像データは、認識処理中の撮像画像データを除いて、最も古い撮像画像データが削除されて新たな撮像画像データに更新されるように管理される。具体的には、撮像画像バッファ領域62には、状態データ63と撮像画像データ64とが関連付けられて記憶される。状態データ63は、それに関連付けられる撮像画像データ64の状態を示すデータであり、具体的には、「書き込み対象」、「認識処理中」、および「処理可能」のいずれかの状態を示す。   The captured image buffer area 62 stores image data (captured image data) of a captured image captured by the camera. The captured image buffer area 62 can store a predetermined number (eg, 3) of captured image data. Further, the captured image data stored in the captured image buffer area 62 is managed so that the oldest captured image data is deleted and updated to new captured image data except for the captured image data being recognized. . Specifically, the captured image buffer area 62 stores state data 63 and captured image data 64 in association with each other. The status data 63 is data indicating the status of the captured image data 64 associated with the status data 63, and specifically indicates any status of “writing target”, “under recognition processing”, and “processing possible”.

認識済画像バッファ領域65には、撮像画像データのうちで、認識処理が成功して完了した撮像画像データ(認識済画像データと呼ぶ)66が記憶される。すなわち、撮像画像バッファ領域62に記憶される撮像画像データ64に対して認識処理が行われ、認識処理が成功した場合、当該撮像画像データ64は認識済画像バッファ領域65に記憶される。なお、認識済画像バッファ領域65には、最新の認識済画像データ66のみが記憶されればよい。詳細は後述するが、認識済画像バッファ領域65に記憶される撮像画像データが、CG画像と合成する合成処理の対象となる。   The recognized image buffer area 65 stores picked-up image data (referred to as recognized image data) 66 of the picked-up image data that has been successfully completed by the recognition process. That is, when the recognition process is performed on the captured image data 64 stored in the captured image buffer area 62 and the recognition process is successful, the captured image data 64 is stored in the recognized image buffer area 65. In the recognized image buffer area 65, only the latest recognized image data 66 needs to be stored. Although details will be described later, the captured image data stored in the recognized image buffer area 65 is a target of a synthesis process to be synthesized with a CG image.

ゲーム処理データ領域67は、ゲーム処理において用いられる各種のデータを記憶するための領域である。ゲーム処理データ領域67には、認識結果データ68、プレイヤ位置データ69、敵オブジェクトデータ70、表示画像データ71、および、失敗カウンタデータ72が記憶される。なお、ゲーム処理データ領域67には、上記の他、ゲームに登場する各種オブジェクト(上記大砲53等)に関するデータや、BGM等の音声データ等、ゲームに必要な各種データが記憶される。   The game process data area 67 is an area for storing various data used in the game process. In the game processing data area 67, recognition result data 68, player position data 69, enemy object data 70, display image data 71, and failure counter data 72 are stored. In addition to the above, the game processing data area 67 stores various data necessary for the game, such as data related to various objects appearing in the game (the cannon 53 and the like) and sound data such as BGM.

認識結果データ68は、上述の認識処理の処理結果を示すデータであり、具体的には、上述の位置関係を示すデータである。位置関係は、ゲーム装置1およびマーカ52の一方を基準としたときの他方の3次元位置、あるいは、一方から他方への3次元の方向として表されるので、3次元の座標や3次元のベクトル等によって表される。   The recognition result data 68 is data indicating the processing result of the above-described recognition processing, and specifically is data indicating the above-described positional relationship. The positional relationship is expressed as the other three-dimensional position when one of the game apparatus 1 and the marker 52 is used as a reference, or as the three-dimensional direction from one to the other. Represented by etc.

プレイヤ位置データ69は、仮想空間(ゲーム空間)におけるプレイヤキャラクタの位置を示すデータである。上述のように、本実施形態においては仮想空間における仮想カメラの位置はプレイヤキャラクタの位置としても用いられる。つまり、プレイヤ位置データ69は、仮想空間における仮想カメラの位置を示すとも言える。プレイヤ位置データ69は、上記認識結果データ68に基づいて算出される。   The player position data 69 is data indicating the position of the player character in the virtual space (game space). As described above, in the present embodiment, the position of the virtual camera in the virtual space is also used as the position of the player character. That is, it can be said that the player position data 69 indicates the position of the virtual camera in the virtual space. The player position data 69 is calculated based on the recognition result data 68.

敵オブジェクトデータ70は、敵オブジェクト(すなわち、大砲53)に関する各種パラメータを示すデータである。各種パラメータには、大砲53の向き、および、プレイヤが弾を命中させた数等を示すパラメータが含まれる。   The enemy object data 70 is data indicating various parameters regarding the enemy object (that is, the cannon 53). The various parameters include parameters indicating the direction of the cannon 53 and the number of hits by the player.

表示画像データ71は、表示装置(上側LCD22)に表示されるゲーム画像のデータである。詳細は後述するが、本ゲーム処理においては、上述した合成画像の他、後述する警告画像、あるいは、撮像画像のデータが表示されることもある。   The display image data 71 is game image data displayed on the display device (upper LCD 22). Although details will be described later, in this game process, a warning image or captured image data to be described later may be displayed in addition to the above-described synthesized image.

失敗カウンタデータ72は、失敗カウンタを示すデータである。失敗カウンタは、認識処理が連続して失敗する場合において、最初に失敗してからの経過時間を表す。すなわち、認識処理が失敗した場合、CPU31は失敗カウンタのカウントを開始し、その後、認識処理の失敗が連続する間、失敗カウンタのカウントを続ける。   The failure counter data 72 is data indicating a failure counter. The failure counter represents an elapsed time after the first failure when the recognition process fails continuously. That is, when the recognition process fails, the CPU 31 starts counting the failure counter, and then continues to count the failure counter while the recognition process fails continuously.

次に、ゲーム装置1において行われるゲーム処理の詳細を、図9〜図12を用いて説明する。図9は、ゲーム装置1において実行されるゲーム処理の流れを示すメインフローチャートである。電源ボタン14Fが押下されることによってゲーム装置1の電源が投入されると、ゲーム装置1のCPU31は、各種アプリケーションの起動を指示するためのメニュー画面(例えば、各アプリケーションを表す画像(アイコン)を含む画像)を表示する。ユーザは、メニュー画面においてゲームプログラム61を起動する指示、例えば、ゲームプログラム61のアイコンを選択する指示を行う。メニュー画面において、ゲームプログラム61の起動が指示されると、CPU31は、メインメモリ32等の初期化を行った後、図4に示す処理を行うためのゲームプログラム61の実行を開始する。本実施形態においては、ゲームプログラム61の実行によって、CPU31が請求項に記載の各手段として機能することとなる。つまり、ゲームプログラム61は、請求項に記載の各手段としてCPU31を機能させる。   Next, details of the game process performed in the game apparatus 1 will be described with reference to FIGS. FIG. 9 is a main flowchart showing a flow of game processing executed in the game apparatus 1. When the power of the game apparatus 1 is turned on by pressing the power button 14F, the CPU 31 of the game apparatus 1 displays a menu screen (for example, an image (icon) representing each application) for instructing activation of various applications. Image). The user gives an instruction to start the game program 61 on the menu screen, for example, an instruction to select an icon of the game program 61. When the activation of the game program 61 is instructed on the menu screen, the CPU 31 initializes the main memory 32 and the like, and then starts executing the game program 61 for performing the processing shown in FIG. In the present embodiment, execution of the game program 61 causes the CPU 31 to function as each unit recited in the claims. That is, the game program 61 causes the CPU 31 to function as each unit recited in the claims.

まずステップS1において、CPU31は、撮像画像が取得されたか否かを判定する。すなわち、カメラ(本実施形態では外側カメラ26)から撮像画像のデータが送られてきたか否かを判定する。なお、本実施形態においては、ステップS1〜S6の処理ループは、1フレーム時間(1/60秒)に1回の割合で実行されるのに対して、カメラはそれよりも少ない頻度(数フレーム時間に1回程度)で撮像画像を送るものとする。ステップS1の判定結果が肯定である場合、ステップS2の処理が実行される。一方、ステップS1の判定結果が否定である場合、ステップS2の処理がスキップされてステップS3の処理が実行される。   First, in step S1, the CPU 31 determines whether a captured image has been acquired. That is, it is determined whether captured image data is sent from the camera (outer camera 26 in the present embodiment). In the present embodiment, the processing loop of steps S1 to S6 is executed at a rate of once per frame time (1/60 seconds), whereas the camera has a lower frequency (several frames). Assume that the captured image is sent once a hour). If the determination result of step S1 is affirmative, the process of step S2 is executed. On the other hand, if the determination result of step S1 is negative, the process of step S2 is skipped and the process of step S3 is executed.

ステップS2において、CPU31は、ステップS1で取得された撮像画像データをメインメモリ32の撮像画像バッファ領域62に記憶する。なお、撮像画像バッファ領域62に記憶可能な数の撮像画像データ64がすでに記憶されている場合、CPU31は、そのうちの1つを削除し、取得された撮像画像データを新たに記憶(更新)する。ここで、削除される撮像画像データ64は、それに関連付けられた状態データ63が「書き込み対象」を示す撮像画像データ64である。新たな撮像画像データ64の書き込みが完了すると、CPU31は、当該撮像画像データ64に関連付けられる状態データ63を「処理可能」を示すように変更する。また、状態データ63が「処理可能」を示す撮像画像データ64のうち、最も古い撮像画像データ64に関連付けられる状態データ63を、「書き込み対象」を示すように変更する。以上によって、撮像画像データ64は、認識処理中の撮像画像データ64を除いて、最も古い撮像画像データ64が新たな撮像画像データに更新される。ステップS2の次にステップS3の処理が実行される。   In step S <b> 2, the CPU 31 stores the captured image data acquired in step S <b> 1 in the captured image buffer area 62 of the main memory 32. If the number of storable image data 64 that can be stored in the captured image buffer area 62 is already stored, the CPU 31 deletes one of them and newly stores (updates) the acquired captured image data. . Here, the captured image data 64 to be deleted is captured image data 64 in which the state data 63 associated therewith indicates “write target”. When the writing of the new captured image data 64 is completed, the CPU 31 changes the state data 63 associated with the captured image data 64 to indicate “processable”. In addition, among the captured image data 64 in which the status data 63 indicates “processable”, the status data 63 associated with the oldest captured image data 64 is changed to indicate “write target”. As described above, in the captured image data 64, the oldest captured image data 64 is updated to new captured image data except for the captured image data 64 that is being recognized. Following step S2, the process of step S3 is executed.

ステップS3において、CPU31は認識管理処理を実行する。認識管理処理においては、撮像画像に対する認識処理が実行されるとともに、認識処理の結果に応じてデータの更新処理等が実行される。以下、図10を参照して、認識管理処理の詳細を説明する。   In step S3, the CPU 31 executes recognition management processing. In the recognition management process, a recognition process for a captured image is executed, and a data update process or the like is executed according to the result of the recognition process. The details of the recognition management process will be described below with reference to FIG.

図10は、図9に示す認識管理処理(ステップS3)の流れを示すフローチャートである。認識管理処理においては、まずステップS11において、CPU31は、認識処理中の撮像画像が存在するか否かを判定する。すなわち、CPU31は、撮像画像バッファ領域62に記憶されている撮像画像のうちに、認識処理の対象となっている画像が存在するか否かを判定する。この判定は、状態データ63が「認識処理中」を示す撮像画像データ64が存在するか否かによって行うことができる。ステップS11の判定結果が肯定である場合、ステップS12の処理が実行される。一方、ステップS11の判定結果が否定である場合、後述するステップS19の処理が実行される。   FIG. 10 is a flowchart showing the flow of the recognition management process (step S3) shown in FIG. In the recognition management process, first, in step S11, the CPU 31 determines whether or not there is a captured image that is being recognized. That is, the CPU 31 determines whether or not there is an image that is a target of recognition processing among the captured images stored in the captured image buffer area 62. This determination can be made based on whether or not the captured image data 64 whose status data 63 indicates “under recognition processing” exists. If the determination result of step S11 is affirmative, the process of step S12 is executed. On the other hand, when the determination result of step S11 is negative, a process of step S19 described later is executed.

ステップS12において、CPU31は、撮像画像に対する認識処理を実行する。ここで、本実施形態において、1つの撮像画像に関して認識結果を算出するまでの一連の認識処理(1回の認識処理)は、1フレーム時間を周期として実行される表示処理とは必ずしも同じ周期で実行されるわけではない。一般的には、1回の認識処理が1フレーム時間で完了することが困難な場合があり、そのような場合、1回のステップS12の処理では、認識処理全体のうちの一部の処理だけが実行される。この場合、1回のステップS12で実行される処理は、ステップS1〜S6の一連の処理が1フレーム時間内に完了することができるような処理量に調整される。   In step S12, the CPU 31 executes recognition processing for the captured image. Here, in this embodiment, a series of recognition processes (one recognition process) until a recognition result is calculated for one captured image is not necessarily in the same cycle as a display process executed with one frame time as a cycle. It is not executed. In general, it may be difficult to complete one recognition process in one frame time. In such a case, only a part of the entire recognition process is performed in the process of one step S12. Is executed. In this case, the processing executed in one step S12 is adjusted to a processing amount such that the series of processing in steps S1 to S6 can be completed within one frame time.

また、ステップS12の処理において認識処理が完了した場合(すなわち、認識結果が算出された場合)、CPU31は、認識結果のデータをメインメモリ32に記憶する。具体的には、認識処理が成功した場合、上述の位置関係のデータが認識結果としてメインメモリ32に記憶される。一方、認識処理が失敗した場合(撮像画像からマーカ52を認識できなかった場合)、認識失敗を示すデータが認識結果としてメインメモリ32に記憶される。   Further, when the recognition process is completed in the process of step S <b> 12 (that is, when the recognition result is calculated), the CPU 31 stores the data of the recognition result in the main memory 32. Specifically, when the recognition process is successful, the above-described positional relationship data is stored in the main memory 32 as a recognition result. On the other hand, when the recognition process fails (when the marker 52 cannot be recognized from the captured image), data indicating the recognition failure is stored in the main memory 32 as a recognition result.

一方、ステップS12の処理において認識処理が完了しなかった場合、CPU31は、残りの認識処理の実行に必要なデータをメインメモリ32に記憶し、ステップS12の処理を終了する。次にステップS12の処理が実行される際には、メインメモリ32に記憶されたデータを用いて上記残りの処理が実行される。以上のステップS12の次にステップS13の処理が実行される。   On the other hand, when the recognition process is not completed in the process of step S12, the CPU 31 stores data necessary for executing the remaining recognition process in the main memory 32, and ends the process of step S12. Next, when the process of step S12 is executed, the remaining processes are executed using the data stored in the main memory 32. Following step S12, the process of step S13 is executed.

ステップS13において、CPU31は、1つの撮像画像に対する認識処理が完了したか否かを判定する。すなわち、上記ステップS12において認識処理の処理結果が得られた場合には、ステップS13の判定結果は肯定となり、上記ステップS12において認識処理の処理結果が得られなかった場合には、ステップS13の判定結果は否定となる。ステップS13の判定結果が肯定である場合、ステップS14の処理が実行される。一方、ステップS13の判定結果が否定である場合、CPU31は認識管理処理を終了する。   In step S13, the CPU 31 determines whether or not the recognition process for one captured image has been completed. That is, if the recognition process result is obtained in step S12, the determination result in step S13 is affirmative. If the recognition process result is not obtained in step S12, the determination result in step S13 is obtained. The result is negative. If the determination result of step S13 is affirmative, the process of step S14 is executed. On the other hand, when the determination result of step S13 is negative, the CPU 31 ends the recognition management process.

ステップS14において、CPU31は、ステップS12で実行した認識処理の処理結果が成功であるか否かを判定する。ステップS14の判定は、ステップS12の終了時にメインメモリ32に記憶される認識結果のデータを参照して行うことができる。ステップS14の判定結果が否定である場合、ステップS15の処理が実行される。一方、ステップS14の判定結果が肯定である場合、後述するステップS16の処理が実行される。   In step S14, the CPU 31 determines whether or not the processing result of the recognition process executed in step S12 is successful. The determination in step S14 can be performed with reference to the recognition result data stored in the main memory 32 at the end of step S12. If the determination result of step S14 is negative, the process of step S15 is executed. On the other hand, when the determination result of step S14 is affirmative, the process of step S16 described later is executed.

ステップS15において、CPU31は、失敗カウンタをカウントする。すなわち、失敗カウンタデータ72が示す失敗カウンタの値を1だけ加算し、加算した値を示すデータを新たな失敗カウンタデータ72としてメインメモリ32に記憶する。これによって、認識処理が失敗してからの経過時間を測定することができる。ステップS15の次に、後述するステップS19の処理が実行される。   In step S15, the CPU 31 counts a failure counter. That is, the value of the failure counter indicated by the failure counter data 72 is incremented by 1, and the data indicating the added value is stored in the main memory 32 as new failure counter data 72. This makes it possible to measure the elapsed time since the recognition process failed. Following step S15, the process of step S19 described later is executed.

ステップS16〜S18においては、認識処理が成功した場合に必要となるデータの更新処理等が実行される。ステップS16において、CPU31は、上記ステップS12で認識処理が完了した撮像画像を合成処理の対象に設定する。具体的には、CPU31は、認識処理が完了した撮像画像データ64を、認識済画像バッファ領域65に認識済画像データ66として新たに記憶する。これによって、認識済画像データ66が更新される。なお、認識処理が完了した撮像画像データ64は、撮像画像バッファ領域62に記憶されている撮像画像データ64のうち、状態データ63が「認識処理中」である撮像画像データ64である。詳細は後述するが、認識済画像バッファ領域65に記憶される認識済画像データ66が、CG画像と合成する対象となる。ステップS16の次にステップS17の処理が実行される。   In steps S16 to S18, a data update process or the like required when the recognition process is successful is executed. In step S <b> 16, the CPU 31 sets the captured image for which the recognition process has been completed in step S <b> 12, as a synthesis process target. Specifically, the CPU 31 newly stores captured image data 64 for which recognition processing has been completed as recognized image data 66 in the recognized image buffer area 65. Thereby, the recognized image data 66 is updated. The captured image data 64 for which the recognition process has been completed is captured image data 64 whose status data 63 is “recognizing process” among the captured image data 64 stored in the captured image buffer area 62. Although details will be described later, the recognized image data 66 stored in the recognized image buffer area 65 is a target to be combined with the CG image. Following step S16, the process of step S17 is executed.

ステップS17において、CPU31は、メインメモリ32に記憶されている認識結果データ68を更新する。すなわち、上記ステップS12で記憶された認識結果を示すデータが、新たな認識結果データ68としてメインメモリ32に記憶される。ステップS17の次にステップS18の処理が実行される。   In step S <b> 17, the CPU 31 updates the recognition result data 68 stored in the main memory 32. That is, data indicating the recognition result stored in step S12 is stored in the main memory 32 as new recognition result data 68. Following step S17, the process of step S18 is executed.

ステップS18において、CPU31は失敗カウンタをリセットする。すなわち、メインメモリ32に記憶される失敗カウンタデータ72の値が0に設定される。ステップS18の次にステップS19の処理が実行される。   In step S18, the CPU 31 resets the failure counter. That is, the value of the failure counter data 72 stored in the main memory 32 is set to 0. Following step S18, the process of step S19 is executed.

ステップS19において、CPU31は、次に認識処理を実行する対象となる撮像画像を決定する。ここで、認識処理の新たな対象となる撮像画像データは、撮像画像バッファ領域62に格納されている撮像画像データ64のうち、状態データ63が「処理可能」を示す、最も新しい撮像画像データ64である。CPU31は、認識処理の対象となる撮像画像データ64に関連付けられる状態データ63を「認識処理中」を示すように変更する。これによって、次回に実行されるステップS12では、状態データ63が「認識処理中」へと変更された撮像画像データ64に対して認識処理が実行される。また、CPU31は、「認識処理中」を示す状態データ63が複数存在することを避けるため、ステップS19の前から「認識処理中」を示していた状態データ63を「書き込み対象」を示すように変更する。ステップS19の後、CPU31は認識管理処理を終了する。   In step S <b> 19, the CPU 31 determines a captured image to be subjected to the recognition process next. Here, the captured image data to be a new target of the recognition process is the newest captured image data 64 in which the status data 63 indicates “processable” among the captured image data 64 stored in the captured image buffer area 62. It is. The CPU 31 changes the state data 63 associated with the captured image data 64 that is the target of the recognition process so as to indicate “under recognition process”. As a result, in step S12 executed next time, the recognition process is executed on the captured image data 64 whose state data 63 has been changed to “recognition process in progress”. Further, in order to avoid the presence of a plurality of status data 63 indicating “recognition processing in progress”, the CPU 31 indicates the status data 63 indicating “recognition processing in progress” before “step S19” as “write target”. change. After step S19, the CPU 31 ends the recognition management process.

なお、上記ステップS19によれば、1回の認識処理が終了すると、取得された撮像画像のうちで最新の撮像画像に対して次の認識処理が実行される。そのため、最新でない撮像画像は、認識処理が行われずに破棄されることもある。ここで、取得された撮像画像の全てについて認識処理を順次実行するとすれば、1回の認識処理に要する時間が撮像画像の取得間隔よりも長い場合には、認識処理が完了して表示対象となった撮像画像が次第に蓄積されていってしまう。つまり、表示される撮像画像は、実時間に対して次第に遅れていってしまうおそれがある。これに対して、本実施形態によれば、最新でない撮像画像については認識処理を行わないようにすることによって、表示される撮像画像の遅延が蓄積していくことを防止することができる。   According to step S19, when one recognition process is completed, the next recognition process is executed on the latest captured image among the acquired captured images. Therefore, a captured image that is not the latest may be discarded without being recognized. Here, if the recognition process is sequentially executed for all of the acquired captured images, when the time required for one recognition process is longer than the captured image acquisition interval, the recognition process is completed and the display target is set. The captured images that have become gradually accumulated. That is, the displayed captured image may be gradually delayed with respect to real time. On the other hand, according to the present embodiment, it is possible to prevent the delay of the displayed captured image from accumulating by not performing the recognition process for the captured image that is not the latest.

上記の認識管理処理によれば、撮像画像に対する認識処理が終了し、認識が成功した場合(ステップS13およびS14でYES)、その撮像画像は合成処理(後述するステップS35)の対象に設定される(ステップS16)。つまり、認識処理が成功した撮像画像を用いて合成画像が生成される。一方、認識が失敗した場合(ステップS14でYES)にはステップS16の処理は実行されないので、その撮像画像は合成処理の対象とされない。したがって、認識が失敗した場合には、合成処理の対象となる撮像画像は変更されず、合成処理においては前回と同じ撮像画像が用いられる。つまり、認識が失敗した場合には、前回に成功した認識処理の対象となった撮像画像が引き続き合成処理に用いられる。また、認識管理処理において、認識処理が終了しなかった場合もステップS16の処理が実行されないので、合成処理の対象となる撮像画像は変更されず、合成処理においては前回と同じ撮像画像が用いられる。したがって、合成処理においては、認識処理が終了するまでは前回と同じ撮像画像(すなわち、前回に成功した認識処理の対象となった撮像画像)が用いられる。   According to the above recognition management process, when the recognition process for the captured image is completed and the recognition is successful (YES in steps S13 and S14), the captured image is set as a target for the synthesis process (step S35 described later). (Step S16). That is, a composite image is generated using a captured image that has been successfully recognized. On the other hand, if the recognition fails (YES in step S14), the process of step S16 is not executed, and the captured image is not subjected to the synthesis process. Therefore, if recognition fails, the captured image that is the target of the synthesis process is not changed, and the same captured image as the previous one is used in the synthesis process. That is, when the recognition fails, the captured image that has been the object of the recognition process that succeeded last time is continuously used for the synthesis process. Also, in the recognition management process, even if the recognition process is not completed, the process of step S16 is not executed, so the captured image that is the target of the synthesis process is not changed, and the same captured image as the previous one is used in the synthesis process. . Therefore, in the synthesis process, the same captured image as that of the previous time (that is, the captured image targeted for the recognition process that succeeded in the previous time) is used until the recognition process is completed.

図9の説明に戻り、認識管理処理(ステップS3)の次のステップS4において、CPU31はゲーム制御処理を実行する。ゲーム処理においては、プレイヤによるゲーム入力等に基づいて仮想空間内のオブジェクトの動作が制御される。以下、図11を参照して、ゲーム制御処理の詳細を説明する。   Returning to FIG. 9, in step S4 following the recognition management process (step S3), the CPU 31 executes a game control process. In the game process, the operation of the object in the virtual space is controlled based on a game input by the player. The details of the game control process will be described below with reference to FIG.

図11は、図9に示すゲーム制御処理(ステップS4)の流れを示すフローチャートである。ゲーム制御処理においては、まずステップS21において、CPU31は、失敗カウンタの値が所定の第1閾値N1よりも大きいか否かを判定する。すなわち、CPU31は、メインメモリ32に記憶されている失敗カウンタデータ72を読み出し、失敗カウンタデータ72の値と第1閾値N1とを比較する。なお、第1閾値N1は予め定められており、ゲームの内容等に応じて適切な値に設定される。ここで、失敗カウンタの値は、認識処理が連続して失敗する場合において、最初に失敗してからの経過時間を表す。つまり、ステップS21の判定処理は、認識処理が所定時間の間連続して失敗したか否かを判定するための処理である。ステップS21の判定結果が否定である場合、ステップS22の処理が実行される。一方、ステップS21の判定結果が肯定である場合、後述するステップS25の処理が実行される。   FIG. 11 is a flowchart showing the flow of the game control process (step S4) shown in FIG. In the game control process, first, in step S21, the CPU 31 determines whether or not the value of the failure counter is larger than a predetermined first threshold value N1. That is, the CPU 31 reads the failure counter data 72 stored in the main memory 32 and compares the value of the failure counter data 72 with the first threshold value N1. The first threshold N1 is determined in advance, and is set to an appropriate value according to the content of the game. Here, the value of the failure counter represents an elapsed time after the first failure when the recognition process fails continuously. That is, the determination process in step S21 is a process for determining whether or not the recognition process has failed continuously for a predetermined time. If the determination result of step S21 is negative, the process of step S22 is executed. On the other hand, when the determination result of step S21 is affirmative, the process of step S25 described later is executed.

ステップS22において、CPU31は、プレイヤによるゲーム操作の入力を受け付ける。具体的には、CPU31は、タッチパネル13の入力面に対して入力が行われた位置を示すタッチ位置データを取得するとともに、各操作ボタン14A〜14Kに対する入力状況(押下されたか否か)を示す操作データを取得する。ステップS22の次にステップS23の処理が実行される。   In step S22, the CPU 31 accepts an input of a game operation by the player. Specifically, the CPU 31 acquires touch position data indicating a position where an input is performed on the input surface of the touch panel 13 and indicates an input status (whether or not the button is pressed) for each of the operation buttons 14A to 14K. Get operation data. Following step S22, the process of step S23 is executed.

ステップS23において、CPU31は、入力に基づくゲーム制御を行う。ここで、本実施形態においては、上記ステップS22で受け付けられた、入力装置(タッチパネル13および各操作ボタン14A〜14K)に対する入力だけでなく、認識結果データ68もゲーム入力として用いられる。具体的には、CPU31は、認識結果データ68に基づいてプレイヤキャラクタの位置(および姿勢)を算出する。本実施形態においては、プレイヤキャラクタの位置および姿勢は、仮想カメラの位置および姿勢と同じである。つまり、プレイヤキャラクタの位置は、大砲53に対するプレイヤキャラクタの位置が、認識結果データ68が示す位置関係(ゲーム装置1とマーカ52との現実空間の位置関係)に応じた位置となるように算出される。また、プレイヤキャラクタの姿勢(仮想カメラの姿勢)は、表示画面上におけるマーカ52の位置に大砲53が表示されるように算出される。より具体的な処理としては、CPU31は、認識結果データ68をメインメモリ32から読み出し、認識結果データ68に基づいてプレイヤキャラクタの位置を算出し、算出した位置を示すデータをプレイヤ位置データ69としてメインメモリ32に記憶する。また、入力装置に対する入力に応じた動作としては、CPU31は、例えば、所定のボタンが押下されたことに応じてプレイヤキャラクタから弾を発射する処理を行う。ステップS23の次にステップS24の処理が実行される。   In step S23, the CPU 31 performs game control based on the input. Here, in the present embodiment, not only the input to the input device (touch panel 13 and each of the operation buttons 14A to 14K) accepted in step S22 but also the recognition result data 68 is used as a game input. Specifically, the CPU 31 calculates the position (and posture) of the player character based on the recognition result data 68. In the present embodiment, the position and posture of the player character are the same as the position and posture of the virtual camera. That is, the position of the player character is calculated such that the position of the player character with respect to the cannon 53 is a position corresponding to the positional relationship indicated by the recognition result data 68 (the positional relationship in the real space between the game apparatus 1 and the marker 52). The Further, the posture of the player character (the posture of the virtual camera) is calculated so that the cannon 53 is displayed at the position of the marker 52 on the display screen. More specifically, the CPU 31 reads the recognition result data 68 from the main memory 32, calculates the position of the player character based on the recognition result data 68, and uses the data indicating the calculated position as the player position data 69. Store in the memory 32. As an operation corresponding to an input to the input device, for example, the CPU 31 performs a process of firing a bullet from the player character in response to a predetermined button being pressed. Following step S23, the process of step S24 is executed.

ステップS24において、CPU31は、ステップS23で実行される処理以外の他のゲーム制御を行う。ステップS24で実行される処理としては、例えば、大砲53の動作(大砲53の向きを変えたり弾を発射したりする動作)の制御、各オブジェクトが弾に当たったか否かの判定、および、得点の計算等の処理が考えられる。なお、大砲53に関するパラメータ(大砲53の向き等を示すパラメータ)を示すデータは、敵オブジェクトデータ70としてメインメモリ32に記憶される。ステップS24の後、CPU31は図11に示すゲーム制御処理を終了する。   In step S24, the CPU 31 performs game control other than the process executed in step S23. The processing executed in step S24 includes, for example, control of the operation of the cannon 53 (operation for changing the direction of the cannon 53 and firing a bullet), determination of whether each object has hit the bullet, and scoring Processing such as the calculation of can be considered. Data indicating parameters relating to the cannon 53 (parameters indicating the direction of the cannon 53) are stored in the main memory 32 as enemy object data 70. After step S24, the CPU 31 ends the game control process shown in FIG.

一方、ステップS25において、CPU31はゲームを中断する。ここで、ステップS25が実行される場合とは、認識処理が所定時間の間連続して失敗した場合である。詳細は後述するが、認識処理が所定時間の間連続して失敗した場合(失敗カウンタの値が第1閾値N1以上となった場合)、認識が成功していないことを表す警告画像が合成画像に代えて表示される(後述するステップS34)。警告画像が表示される場合にはゲームを進行することができないので、CPU31は、ステップS25においてゲーム進行を中断する。ステップS25の後、CPU31は図11に示すゲーム制御処理を終了する。   On the other hand, in step S25, the CPU 31 interrupts the game. Here, the case where step S25 is executed is a case where the recognition process has failed continuously for a predetermined time. As will be described in detail later, when the recognition process fails continuously for a predetermined time (when the value of the failure counter is equal to or greater than the first threshold value N1), a warning image indicating that the recognition has not succeeded is a composite image. Is displayed instead (step S34 described later). If the warning image is displayed, the game cannot proceed, so the CPU 31 interrupts the game progress in step S25. After step S25, the CPU 31 ends the game control process shown in FIG.

上記ゲーム制御処理によれば、認識処理の処理結果がゲーム入力として用いられる。すなわち、仮想空間に登場するオブジェクト(プレイヤキャラクタ)の動作が認識結果データ68に基づいて制御される(ステップS23)。これによれば、プレイヤは、ゲーム装置1を動かす(あるいはプレイヤ自身が移動する)ことによって、プレイヤキャラクタを移動させることができる。したがって、本実施形態においては、現実空間を表す撮像画像に仮想空間のオブジェクト(大砲53)が合成されたゲーム画像が表示され(図4)、さらに、現実空間におけるゲーム装置1の位置が仮想空間のオブジェクト(プレイヤキャラクタ)の位置に反映される。これによって、あたかも仮想オブジェクトが存在するかのような現実空間においてプレイヤ自身が実際に動いて遊ぶという、拡張現実感技術を用いた新規なゲームを提供することができる。   According to the game control process, the process result of the recognition process is used as a game input. That is, the motion of the object (player character) appearing in the virtual space is controlled based on the recognition result data 68 (step S23). According to this, the player can move the player character by moving the game apparatus 1 (or the player moves). Therefore, in the present embodiment, a game image in which a virtual space object (cannon 53) is combined with a captured image representing the real space is displayed (FIG. 4), and the position of the game apparatus 1 in the real space is the virtual space. Is reflected in the position of the object (player character). As a result, it is possible to provide a new game using augmented reality technology in which the player himself actually moves and plays in a real space as if a virtual object exists.

図9の説明に戻り、ゲーム制御処理(ステップS4)の次のステップS5において、CPU31は、上述の合成画像や警告画像等を生成して表示する表示処理を実行する。以下、図12を参照して、表示処理の詳細を説明する。   Returning to the description of FIG. 9, in step S <b> 5 subsequent to the game control process (step S <b> 4), the CPU 31 executes display processing for generating and displaying the above-described composite image, warning image, and the like. Hereinafter, the details of the display process will be described with reference to FIG.

図12は、図9に示す表示処理(ステップS5)の流れを示すフローチャートである。表示処理においては、まずステップS31において、CPU31は、失敗カウンタの値が所定の第2閾値N2よりも大きいか否かを判定する。すなわち、CPU31は、メインメモリ32に記憶されている失敗カウンタデータ72を読み出し、失敗カウンタデータ72の値と第2閾値N2とを比較する。なお、第2閾値N2は第1閾値N1よりも大きく、ゲームの内容等に応じて適切な値に予め設定される。ステップS31の判定処理は、第2閾値N2に相当する所定時間の間、認識処理が連続して失敗したか否かを判定するための処理である。ステップS31の判定結果が肯定である場合、ステップS32の処理が実行される。一方、ステップS31の判定結果が否定である場合、後述するステップS33の処理が実行される。   FIG. 12 is a flowchart showing the flow of the display process (step S5) shown in FIG. In the display process, first, in step S31, the CPU 31 determines whether or not the value of the failure counter is larger than a predetermined second threshold value N2. That is, the CPU 31 reads the failure counter data 72 stored in the main memory 32 and compares the value of the failure counter data 72 with the second threshold value N2. The second threshold N2 is larger than the first threshold N1, and is set in advance to an appropriate value according to the content of the game. The determination process in step S31 is a process for determining whether or not the recognition process has failed continuously for a predetermined time corresponding to the second threshold value N2. If the determination result of step S31 is affirmative, the process of step S32 is executed. On the other hand, when the determination result of step S31 is negative, a process of step S33 described later is executed.

ステップS32において、CPU31は、撮像画像を表示装置(上側LCD22)に表示させる。具体的には、CPU31は、カメラから送られてくる撮像画像データを上側LCD22に表示させる。このように、失敗カウンタが第2閾値N2以上である場合には、撮像画像のみが表示され、CG画像は合成されない。ステップS32の後、CPU31は表示処理を終了する。   In step S32, the CPU 31 displays the captured image on the display device (upper LCD 22). Specifically, the CPU 31 displays captured image data sent from the camera on the upper LCD 22. Thus, when the failure counter is equal to or greater than the second threshold value N2, only the captured image is displayed and the CG image is not synthesized. After step S32, the CPU 31 ends the display process.

一方、ステップS33において、CPU31は、失敗カウンタの値が所定の第1閾値N1よりも大きいか否かを判定する。ステップS33の処理は上述のステップS21の処理と同じである。ステップS33の判定結果が肯定である場合、ステップS34の処理が実行される。一方、ステップS33の判定結果が否定である場合、後述するステップS35の処理が実行される。   On the other hand, in step S33, the CPU 31 determines whether or not the value of the failure counter is larger than a predetermined first threshold value N1. The process in step S33 is the same as the process in step S21 described above. If the determination result of step S33 is affirmative, the process of step S34 is executed. On the other hand, when the determination result of step S33 is negative, a process of step S35 described later is executed.

ステップS34において、CPU31は、警告画像を表示装置(上側LCD22)に表示させる。警告画像は、マーカ52の認識が所定期間連続して失敗していることをプレイヤに警告するための画像である。警告画像はどのような画像であってもよいが、撮像画像とは異なる、あるいは、撮像画像を含まない画像であることが好ましい。本実施形態においては、警告画像として、いわゆる砂嵐の画像(「マーカが認識されていません」等の文字を含んでもよい)が表示される。CPU31は、ゲームプログラム61において予め用意される動画あるいは静止画を警告画像として用いてもよい。ステップS34の後、CPU31は表示処理を終了する。   In step S34, the CPU 31 displays a warning image on the display device (upper LCD 22). The warning image is an image for warning the player that the recognition of the marker 52 has failed continuously for a predetermined period. The warning image may be any image, but is preferably an image that is different from the captured image or does not include the captured image. In the present embodiment, a so-called sandstorm image (which may include characters such as “marker not recognized”) is displayed as the warning image. The CPU 31 may use a moving image or a still image prepared in advance in the game program 61 as a warning image. After step S34, the CPU 31 ends the display process.

一方、ステップS35において、CPU31は、撮像画像とCG画像とを合成した合成画像を生成する。ここで、合成に用いられる撮像画像データは、認識済画像バッファ領域65に記憶されている撮像画像データ(認識済画像データ66)である。つまり、本実施形態においては、認識処理が成功した最新の撮像画像(前回に認識処理が成功した撮像画像)が合成画像の生成に用いられる。生成された合成画像のデータは、表示画像データ71としてメインメモリ32に記憶される。   On the other hand, in step S35, the CPU 31 generates a composite image obtained by combining the captured image and the CG image. Here, the captured image data used for composition is captured image data (recognized image data 66) stored in the recognized image buffer area 65. That is, in this embodiment, the latest captured image that has been successfully recognized (the captured image that has been successfully recognized last time) is used to generate a composite image. The generated composite image data is stored in the main memory 32 as display image data 71.

なお、本実施形態においては、合成画像は、仮想空間の画像の背景として撮像画像を用いる方法によって生成される。すなわち、CPU31は、仮想空間における(仮想カメラから見て)大砲53の後方に背景のオブジェクトを配置しておき、仮想カメラの位置から仮想カメラの方向に大砲53を見た場合の仮想空間の画像を生成する際、背景オブジェクトのテクスチャとして撮像画像を用いる。これによって、撮像画像の上に大砲53のCG画像が合成された合成画像を生成することができる。なお、仮想カメラの位置および姿勢は、上述のステップS23でプレイヤキャラクタの位置および姿勢として算出されている。また、大砲53の動作(大砲53の向き等)は、上述のステップS24で算出されている。なお、他の実施形態においては、CPU31は、まずCG画像を生成し、その後、撮像画像に対してCG画像を合成することによって合成画像を生成してもよい。ステップS35の次にステップS36の処理が実行される。   In the present embodiment, the composite image is generated by a method that uses a captured image as the background of the image in the virtual space. That is, the CPU 31 arranges a background object behind the cannon 53 (viewed from the virtual camera) in the virtual space, and the image of the virtual space when the cannon 53 is viewed from the position of the virtual camera in the direction of the virtual camera. Is used as the texture of the background object. As a result, a composite image in which the CG image of the cannon 53 is combined on the captured image can be generated. Note that the position and orientation of the virtual camera are calculated as the position and orientation of the player character in step S23 described above. Further, the operation of the cannon 53 (direction of the cannon 53, etc.) is calculated in step S24 described above. In another embodiment, the CPU 31 may generate a CG image first, and then generate a synthesized image by synthesizing the CG image with the captured image. Following step S35, the process of step S36 is executed.

ステップS36において、CPU31は、失敗カウンタの値が所定の第3閾値N3よりも大きいか否かを判定する。すなわち、CPU31は、メインメモリ32に記憶されている失敗カウンタデータ72を読み出し、失敗カウンタデータ72の値と第3閾値N3とを比較する。第3閾値N3は第1閾値N1よりも小さく、ゲームの内容等に応じて適切な値に予め設定される。ステップS36の判定処理は、第3閾値N3に相当する所定時間の間、認識処理が連続して失敗したか否かを判定するための処理である。ステップS36の判定結果が肯定である場合、ステップS37の処理が実行される。一方、ステップS36の判定結果が否定である場合、ステップS37の処理がスキップされてステップS38の処理が実行される。   In step S36, the CPU 31 determines whether or not the value of the failure counter is larger than a predetermined third threshold value N3. That is, the CPU 31 reads the failure counter data 72 stored in the main memory 32, and compares the value of the failure counter data 72 with the third threshold value N3. The third threshold N3 is smaller than the first threshold N1, and is set in advance to an appropriate value according to the content of the game. The determination process in step S36 is a process for determining whether or not the recognition process has failed continuously for a predetermined time corresponding to the third threshold value N3. If the determination result of step S36 is affirmative, the process of step S37 is executed. On the other hand, when the determination result of step S36 is negative, the process of step S37 is skipped and the process of step S38 is executed.

ステップS37において、CPU31は、合成画像に対して、失敗カウンタの値に応じた割合で警告画像をさらに合成する。合成画像と警告画像との合成方法はどのような方法であってもよいが、一般的なアルファブレンド処理による方法を用いることができる。このとき、CPU31は、警告画像の透明度を表すアルファ値を、失敗カウンタの値が“N3”の場合に100%となり、失敗カウンタの値が“N1”の場合に0%となり、失敗カウンタの値が“N3”から“N1”へ増加するに従って透明度が小さくなるように決定する。そして、決定されたアルファ値に従って合成画像と警告画像とを合成する。以上のステップS37の処理によって、時間の経過に従って(失敗カウンタの値の増加に従って)警告画像が次第に濃くなり、合成画像が薄くなる画像を生成することができる。ステップS37で生成された画像データは、表示画像データ71としてメインメモリ32に記憶される。ステップS37の次にステップS38の処理が実行される。   In step S <b> 37, the CPU 31 further synthesizes the warning image with the composite image at a rate corresponding to the value of the failure counter. Any method may be used for synthesizing the synthesized image and the warning image, but a general alpha blending method can be used. At this time, the CPU 31 sets the alpha value indicating the transparency of the warning image to 100% when the value of the failure counter is “N3”, 0% when the value of the failure counter is “N1”, and the value of the failure counter. Is determined such that the transparency decreases with increasing from “N3” to “N1”. Then, the synthesized image and the warning image are synthesized according to the determined alpha value. Through the processing in step S37 described above, it is possible to generate an image in which the warning image gradually becomes darker and the synthesized image becomes lighter as time elapses (as the failure counter value increases). The image data generated in step S37 is stored in the main memory 32 as display image data 71. Following step S37, the process of step S38 is executed.

ステップS38において、CPU31は、合成画像を表示装置(上側LCD22)に表示させる。具体的には、CPU31は、表示画像データ71をメインメモリ32から読み出して上側LCD22に表示させる。これによって、撮像画像に対してゲームオブジェクト(大砲53)のCG画像が合成されたゲーム画像(図4)が表示される。   In step S38, the CPU 31 displays the composite image on the display device (upper LCD 22). Specifically, the CPU 31 reads the display image data 71 from the main memory 32 and displays it on the upper LCD 22. Thereby, a game image (FIG. 4) in which a CG image of the game object (cannon 53) is combined with the captured image is displayed.

なお、ステップS38において、認識処理が成功している場合、および、失敗カウンタの値が上記第3閾値N3より小さい場合には、ステップS35で生成された合成画像がそのまま表示される。一方、失敗カウンタの値が上記第3閾値N3以上である場合には、合成画像と警告画像とが合成された画像が表示される。また、警告画像の透明度は失敗カウンタの値に応じて変化するので、失敗カウンタの値が上記第3閾値N3以上である場合には、時間の経過に従って警告画像が次第に濃く(合成画像が薄く)なるゲーム画像が表示される。上記ステップS38の後、CPU31は表示処理を終了する。   In step S38, if the recognition process is successful, and if the value of the failure counter is smaller than the third threshold value N3, the composite image generated in step S35 is displayed as it is. On the other hand, when the value of the failure counter is equal to or greater than the third threshold value N3, an image obtained by combining the combined image and the warning image is displayed. Further, since the transparency of the warning image changes in accordance with the value of the failure counter, when the value of the failure counter is equal to or greater than the third threshold value N3, the warning image becomes gradually darker (the synthesized image becomes lighter) as time elapses. A game image is displayed. After step S38, the CPU 31 ends the display process.

上記表示処理によれば、認識処理が成功している場合(ステップS31,S33,S36でNo)には、合成画像が表示される。また、認識処理が失敗した場合でも、第3閾値N3に相当する時間だけ連続して失敗するまでは、ステップS31,S33,およびS36の判定結果は否定となるので、合成画像が表示される。その後、認識処理の失敗の時間が第3閾値N3に相当する時間を超えると、ステップS36の判定結果が肯定となるので、合成画像に警告画像(砂嵐の画像)が合成された画像が表示される。そして、時間が経過するに従って警告画像が濃く表示されていく(ステップS37)。さらに、認識処理の失敗の時間が第1閾値N1に相当する時間を超えると、ステップS33の判定結果が肯定となるので、警告画像のみが表示される。また、警告画像が表示されるタイミングでゲームが中断される(ステップS25)。したがって、上記表示処理によれば、認識処理が失敗した場合でも即座にCG画像が表示されなくなるわけではないので、CG画像がちらついて表示されることがない。また、認識処理の失敗が所定時間以上連続する場合には、警告画像が表示されるので、認識処理が失敗していることをプレイヤに通知することができる。   According to the above display process, when the recognition process is successful (No in steps S31, S33, and S36), the composite image is displayed. Even if the recognition process fails, the determination result in steps S31, S33, and S36 is negative until it fails continuously for a time corresponding to the third threshold value N3, so that a composite image is displayed. After that, if the recognition process failure time exceeds the time corresponding to the third threshold value N3, the determination result in step S36 becomes affirmative, so an image in which a warning image (sandstorm image) is combined is displayed on the combined image. The Then, the warning image is displayed darker as time elapses (step S37). Furthermore, if the recognition process failure time exceeds the time corresponding to the first threshold value N1, the determination result in step S33 is affirmative, so only a warning image is displayed. Further, the game is interrupted at the timing when the warning image is displayed (step S25). Therefore, according to the above display process, even if the recognition process fails, the CG image is not immediately stopped, and the CG image is not flickered. Further, when the recognition process fails continuously for a predetermined time or longer, a warning image is displayed, so that the player can be notified that the recognition process has failed.

なお、警告画像として(CG画像を含まない)撮像画像を表示することも考えられる。警告画像として撮像画像を表示すると、プレイヤには仮想オブジェクトが消えたように見える。しかし、ゲームの進行によって仮想オブジェクトが表示されなくなる場合(例えば、仮想オブジェクトを破壊した場合)も考えられ、この場合、プレイヤにとっては、認識に失敗したのかどうかの判断がつきにくくなる。これに対して、本実施形態によれば、警告画像として撮像画像とは異なる画像を表示するので、認識処理が失敗していることをより確実にプレイヤに通知することができる。さらに、本実施形態では、警告画像は時間の経過に従って次第に濃くなるように表示されるので、警告画像が急に表示される場合に比べてプレイヤに与える違和感を軽減して通知を行うことができる。なお、他の実施形態においては、CPU31は、認識処理が連続して失敗した場合、警告画像を表示せずに撮像画像を表示するようにしてもよい。すなわち、図12に示す表示処理において、CPU31は、上記ステップS33およびS34の処理を省略するようにしてもよい。これによっても、上記実施形態と同様、認識処理が失敗していることをプレイヤに通知することができる。   It is also conceivable to display a captured image (not including a CG image) as a warning image. When a captured image is displayed as a warning image, the virtual object appears to disappear to the player. However, there may be a case where the virtual object is not displayed as the game progresses (for example, when the virtual object is destroyed). In this case, it is difficult for the player to determine whether the recognition has failed. On the other hand, according to the present embodiment, an image different from the captured image is displayed as the warning image, so that the player can be more surely notified that the recognition process has failed. Furthermore, in the present embodiment, the warning image is displayed so as to gradually become darker as time elapses, so that it is possible to perform notification while reducing a sense of discomfort given to the player compared to the case where the warning image is displayed suddenly. . In another embodiment, the CPU 31 may display a captured image without displaying a warning image when the recognition process fails continuously. That is, in the display process shown in FIG. 12, the CPU 31 may omit the processes in steps S33 and S34. This can also notify the player that the recognition process has failed as in the above embodiment.

さらに、上記表示処理によれば、警告画像が表示された後、認識処理の失敗の時間が第2閾値N2に相当する時間を超えると、ステップS31の判定結果が肯定となるので、撮像画像のみが表示される。これは、警告画像を表示し続けると、プレイヤはゲーム装置1が撮像している画像を把握できないため、マーカ52を正しく撮像することができなくなるからである。すなわち、本実施形態では、警告画像が表示されてゲームが中断された後は、プレイヤがマーカ52を正しく撮像できるようにゲーム装置1の向きを修正しやすくする目的で、撮像画像を表示するようにしている。   Furthermore, according to the display process, if the failure time of the recognition process exceeds the time corresponding to the second threshold value N2 after the warning image is displayed, the determination result in step S31 is affirmative, so only the captured image is displayed. Is displayed. This is because, if the warning image is continuously displayed, the player cannot grasp the image captured by the game apparatus 1 and cannot capture the marker 52 correctly. That is, in this embodiment, after the warning image is displayed and the game is interrupted, the captured image is displayed for the purpose of easily correcting the orientation of the game apparatus 1 so that the player can correctly capture the marker 52. I have to.

図9の説明に戻り、表示処理(ステップS5)の次のステップS6において、CPU31は、ゲームを終了するか否かを判定する。ステップS6の判定は、例えば、ゲームがクリアされたか否か、ゲームオーバーとなったか否か、プレイヤがゲームを中止する指示を行ったか否か等によって行われる。ステップS6の判定結果が否定である場合、ステップS1の処理が再度実行される。以降、ステップS6でゲームを終了すると判定されるまで、ステップS1〜S6の処理ループが繰り返し実行される。一方、ステップS6の判定結果が肯定である場合、CPU31は、図9に示すゲーム処理を終了する。以上で、ゲーム処理の説明を終了する。   Returning to the description of FIG. 9, in step S6 following the display process (step S5), the CPU 31 determines whether or not to end the game. The determination in step S6 is made based on, for example, whether or not the game has been cleared, whether or not the game is over, and whether or not the player has given an instruction to stop the game. If the determination result of step S6 is negative, the process of step S1 is executed again. Thereafter, the processing loop of steps S1 to S6 is repeatedly executed until it is determined in step S6 that the game is to be ended. On the other hand, when the determination result of step S6 is affirmative, the CPU 31 ends the game process shown in FIG. This is the end of the description of the game process.

以上のように、上記ゲーム処理によれば、撮像画像に対する認識処理が成功した場合には、その撮像画像は認識済画像バッファ領域65に記憶されて(ステップS16)合成画像に用いられる(ステップS35)。このとき、合成されるCG画像は、成功した認識結果に基づいて生成される。一方、認識処理が失敗した場合には、その撮像画像は合成画像に用いられず、認識済画像バッファ領域65には前の撮像画像が維持される。したがって、認識処理が失敗した場合には、前回に認識処理が成功した撮像画像を用いて合成画像が生成されて表示される。また、合成されるCG画像も、前回に認識処理が成功したときの認識結果に基づいて生成される。これによれば、認識失敗が断続的に起こったとしてもCG画像がちらついて表示されることがなく、また、撮像画像とCG画像との位置ずれが生じることもない。したがって、本実施形態によれば、より現実感の高い合成画像を生成して表示することができる。   As described above, according to the above game process, when the recognition process for the captured image is successful, the captured image is stored in the recognized image buffer area 65 (step S16) and used for the composite image (step S35). ). At this time, the synthesized CG image is generated based on the successful recognition result. On the other hand, if the recognition process fails, the captured image is not used as a composite image, and the previous captured image is maintained in the recognized image buffer area 65. Therefore, when the recognition process fails, a composite image is generated and displayed using the captured image for which the recognition process was successful last time. Further, the CG image to be synthesized is also generated based on the recognition result when the recognition process was successful last time. According to this, even if the recognition failure occurs intermittently, the CG image is not flickered and the positional deviation between the captured image and the CG image does not occur. Therefore, according to the present embodiment, a more realistic composite image can be generated and displayed.

また、上記ゲーム処理においては、表示される仮想オブジェクト(大砲53)の動作を制御する処理(ステップS24)は毎フレーム実行される。認識が成功した場合だけでなく、失敗した場合であっても一定期間(ステップS33でNoとなる間)は仮想オブジェクトの画像が撮像画像に合成されて表示される。これによって、仮想オブジェクトの動作は毎フレーム更新されて動画として表示されることになる。そのため、撮像画像が毎フレーム更新されない場合でも、動画のコマ数が少ない印象をプレイヤに与えることなく、合成画像として滑らかな動画を表示することができる。   In the game process, the process (step S24) for controlling the operation of the displayed virtual object (cannon 53) is executed every frame. Not only when the recognition is successful but also when the recognition is unsuccessful, the image of the virtual object is combined with the captured image and displayed for a certain period (while No in step S33). As a result, the motion of the virtual object is updated every frame and displayed as a moving image. Therefore, even when the captured image is not updated every frame, a smooth moving image can be displayed as a composite image without giving the player the impression that the number of frames of the moving image is small.

なお、上記ゲーム処理においては、仮想オブジェクトの動作は毎フレーム更新される(ステップS24)のに対して、仮想オブジェクトの表示位置(仮想カメラの位置および姿勢)を決定する処理(ステップS23)は、認識が成功した場合に更新される(ステップS17)認識結果データを用いて行われる。したがって、本実施形態によれば、仮想オブジェクトの動作を毎フレーム更新される滑らかな動画として表示しつつ、撮像画像と仮想オブジェクトの画像との位置ずれを防止することができる。   In the game process, the motion of the virtual object is updated every frame (step S24), whereas the process of determining the display position of the virtual object (the position and orientation of the virtual camera) (step S23) The recognition result data is updated when the recognition is successful (step S17). Therefore, according to the present embodiment, it is possible to prevent the positional deviation between the captured image and the virtual object image while displaying the motion of the virtual object as a smooth moving image updated every frame.

また、上記ゲーム処理によれば、第1閾値N1に相当する所定時間の間、認識処理が連続して失敗した場合、警告画像が表示される他、ゲームが中断される(ステップS25)。つまり、本実施形態では、警告画像が表示されることに応じて、ゲームの進行が中断される。ここで、本実施形態においては、認識が失敗してもCG画像が表示されるので、認識が失敗しても即座にゲームを中断する必要はない。また、認識が失敗したことに応じてゲームを中断するようにすると、ゲームが頻繁に中断されてしまうおそれがある。そのため、本実施形態では、認識が失敗してもゲームを継続するようにしている。ただし、認識が失敗している間は、認識結果をゲーム入力として用いることができないので、認識が失敗した後でもずっとゲームが継続されると、プレイヤはゲーム操作を行えないためにゲームに支障が出る。そこで、本実施形態では、認識が失敗してから一定時間が経過した場合、ゲームを中断するようにしている。また、警告画像が表示されることに応じてゲームを中断するので、合成画像が表示されなくなるタイミングでゲームを中断することができ、プレイヤに違和感を与えることなくゲームを中断させることができる。   Further, according to the game process, when the recognition process continuously fails for a predetermined time corresponding to the first threshold value N1, a warning image is displayed and the game is interrupted (step S25). That is, in this embodiment, the progress of the game is interrupted in response to the display of the warning image. Here, in this embodiment, even if recognition fails, a CG image is displayed. Therefore, even if recognition fails, there is no need to immediately interrupt the game. Further, if the game is interrupted in response to the recognition failure, the game may be frequently interrupted. Therefore, in this embodiment, the game is continued even if recognition fails. However, since the recognition result cannot be used as a game input while the recognition is unsuccessful, if the game continues for a long time even after the recognition has failed, the player will not be able to perform a game operation, which may hinder the game. Get out. Therefore, in this embodiment, the game is interrupted when a certain time has elapsed since the recognition failed. In addition, since the game is interrupted in response to the display of the warning image, the game can be interrupted when the composite image is no longer displayed, and the game can be interrupted without causing the player to feel uncomfortable.

なお、他の実施形態においては、CPU31は、認識が失敗したタイミングでゲームを中断するようにしてもよい。例えば、認識結果をゲーム入力として用いるゲームであって、シビアなゲーム操作が要求されるゲームにおいては、認識が失敗したことに応じてゲームを中断することが考えられる。また、上記ゲーム処理のように、警告画像を次第に濃く表示していく場合には、CPU31は、警告画像が合成画像に対して所定の割合で合成されたことに応じてゲームを中断するようにしてもよい。すなわち、上記ゲーム処理においては、CPU31は、失敗カウンタの値が第1閾値N1と第3閾値N3との間の所定値となった場合にゲームを中断してもよい。   In another embodiment, the CPU 31 may interrupt the game at a timing when recognition fails. For example, in a game that uses a recognition result as a game input and requires a severe game operation, the game may be interrupted in response to the recognition failure. Further, when the warning image is gradually displayed darker as in the above game process, the CPU 31 interrupts the game in response to the warning image being synthesized at a predetermined ratio with respect to the synthesized image. May be. That is, in the game process, the CPU 31 may interrupt the game when the value of the failure counter becomes a predetermined value between the first threshold value N1 and the third threshold value N3.

[変形例]
上記実施形態は本発明を実施する一例であり、他の実施形態においては例えば以下に説明する構成で本発明を実施することも可能である。
[Modification]
The above-described embodiment is an example for carrying out the present invention. In other embodiments, the present invention can be implemented with, for example, the configuration described below.

(画像処理プログラムに関する変形例)
上記実施形態においては、画像表示プログラムの例としてゲームプログラムを挙げて説明したが、本発明は、ゲームプログラム以外にも、拡張現実感技術を用いる任意の画像表示プログラムに利用することが可能である。
(Modifications related to image processing program)
In the above-described embodiment, the game program is described as an example of the image display program. However, the present invention can be used for any image display program that uses augmented reality technology in addition to the game program. .

(ゲームに関する変形例)
また、上記実施形態においては、ゲームプログラムによって実行されるゲームの例として、敵オブジェクト(大砲53)が表示される一人称視点のゲームについて説明したが、本発明は、拡張現実感技術を用いてゲーム画像を表示する任意のゲームのためのゲームプログラムに利用することが可能である。例えば、上記実施形態では、画面に表示されない仮想オブジェクト(プレイヤキャラクタ)の動作が認識結果に基づいて制御された。ここで、他の実施形態では、ゲーム装置1は、認識結果に基づいて、画面上に表示される仮想オブジェクトの動作を制御するようにしてもよい。例えば、ゲームプログラムによって実行されるゲームとしては、次の例が考えられる。
・画面上の仮想オブジェクトの位置が上記認識結果に基づいて決定されるゲーム
ゲーム装置1とマーカ52との位置関係(認識結果)に応じて仮想空間内における位置が決定されるクレーンのオブジェクトが登場し、プレイヤは、クレームのオブジェクトを操作して仮想空間内に配置される他のオブジェクトを釣り上げて遊ぶ。
・画面上の仮想オブジェクトの移動方向が上記処理結果に基づいて決定されるゲーム
ビリヤードのゲームであって、仮想オブジェクトとしてビリヤードの玉が配置され、プレイヤは、上記認識結果に基づいて決定される仮想カメラの視線方向に玉を突くことができる(つまり、玉の移動方向がゲーム装置1とマーカ52との位置関係によって制御される)。
(Modifications related to games)
In the above embodiment, a first-person view game in which an enemy object (cannon 53) is displayed has been described as an example of a game executed by the game program. However, the present invention uses a game using augmented reality technology. It can be used for a game program for an arbitrary game that displays an image. For example, in the above embodiment, the motion of the virtual object (player character) that is not displayed on the screen is controlled based on the recognition result. Here, in another embodiment, the game apparatus 1 may control the operation of the virtual object displayed on the screen based on the recognition result. For example, the following example can be considered as a game executed by the game program.
A game in which the position of the virtual object on the screen is determined based on the recognition result The crane object whose position in the virtual space is determined according to the positional relationship (recognition result) between the game apparatus 1 and the marker 52 appears. Then, the player operates the object of the claim and picks up and plays other objects arranged in the virtual space.
A game in which the moving direction of the virtual object on the screen is determined based on the above processing result, which is a billiard game, in which billiard balls are arranged as virtual objects, and the player is determined based on the above recognition result The ball can be struck in the direction of the line of sight of the camera (that is, the moving direction of the ball is controlled by the positional relationship between the game apparatus 1 and the marker 52).

(警告画像を表示する条件に関する変形例)
上記実施形態では、ゲーム装置1は、認識処理が所定時間連続して失敗したことを条件として、警告画像を表示するようにした。ここで、他の実施形態では、ゲーム装置1は、カメラ(ゲーム装置1)の動きを検知して、カメラが所定の基準以上動いていることが検知されたことを条件として、警告画像を表示するようにしてもよい。以下、カメラの動きを検知して警告画像を表示する変形例の詳細について説明する。
(Modification regarding conditions for displaying warning images)
In the above embodiment, the game apparatus 1 displays a warning image on the condition that the recognition process has failed continuously for a predetermined time. Here, in another embodiment, the game apparatus 1 detects the movement of the camera (game apparatus 1), and displays a warning image on the condition that the movement of the camera more than a predetermined reference is detected. You may make it do. Hereinafter, the detail of the modification which detects a motion of a camera and displays a warning image is demonstrated.

図13は、本実施形態における表示処理(ステップS5)の変形例を示すフローチャートである。なお、図13においては、図12と同じ処理については図12と同じステップ番号を付し、詳細な説明を省略する。   FIG. 13 is a flowchart showing a modification of the display process (step S5) in the present embodiment. In FIG. 13, the same processes as those in FIG. 12 are denoted by the same step numbers as in FIG. 12, and detailed description thereof is omitted.

図13においては、ステップS33の判定結果が肯定である場合、ステップS41の処理が実行される。ステップS41において、CPU31は、カメラ(ゲーム装置1)の動きを検知する。ここで、動きを検知する方法はどのような方法でもよいが、例えば、ゲーム装置1が加速度センサあるいはジャイロセンサを備える場合には、CPU31はこれらのセンサによる検知結果を取得する。また、CPU31は、撮像画像から所定の対象(マーカとは別の物であってもよい)を認識し、撮像画像内における当該所定の対象の動きからカメラの動きを算出するようにしてもよい。ステップS41の次にステップS42の処理が実行される。   In FIG. 13, when the determination result of step S33 is affirmative, the process of step S41 is executed. In step S41, the CPU 31 detects the movement of the camera (game device 1). Here, any method may be used to detect the movement. For example, when the game apparatus 1 includes an acceleration sensor or a gyro sensor, the CPU 31 acquires a detection result by these sensors. Further, the CPU 31 may recognize a predetermined target (may be a different object from the marker) from the captured image, and calculate the movement of the camera from the movement of the predetermined target in the captured image. . Following step S41, the process of step S42 is executed.

ステップS42において、CPU31は、カメラ(ゲーム装置1)の動きが所定の基準以上であるか否かを判定する。所定の基準としては、カメラの加速度(各速度)が所定値以上であることや、カメラの(単位時間当たりの)移動量が所定値以上であること等が考えられる。ステップS42判定結果が肯定である場合、ステップS34の処理が実行される。一方、ステップS42の判定結果が否定である場合、ステップS35の処理が実行される。   In step S42, the CPU 31 determines whether or not the movement of the camera (game device 1) is equal to or greater than a predetermined reference. As the predetermined reference, it is conceivable that the acceleration (each speed) of the camera is equal to or greater than a predetermined value, and the movement amount (per unit time) of the camera is equal to or greater than a predetermined value. If the determination result of step S42 is affirmative, the process of step S34 is executed. On the other hand, when the determination result of step S42 is negative, the process of step S35 is executed.

以上より、図13に示す変形例においては、カメラの動きが所定の基準よりも激しい場合、警告画像が表示され(ステップS34)、カメラの動きが所定の基準よりも緩やかである場合、合成画像が引き続き表示される。ここで、カメラが激しく動いた場合には、マーカ52が撮像範囲から外れて認識ができなくなっている可能性が高いと推測することができ、逆に、カメラがあまり動いていない場合には、マーカ52が撮像範囲内にあり、認識が再度成功する可能性があると推測することができる。したがって、本変形例によれば、認識が失敗した場合において、その後認識が再度成功する(認識の失敗が一時的なものである)と推測される場合には合成画像が引き続き表示され、認識が再度成功する見込みが少ない場合には警告画像が表示される。これによって、警告画像をより適切な状況で表示させることができる。   As described above, in the modification shown in FIG. 13, when the camera movement is more intense than the predetermined reference, a warning image is displayed (step S34), and when the camera movement is slower than the predetermined reference, the composite image Is still displayed. Here, when the camera moves violently, it can be estimated that there is a high possibility that the marker 52 is out of the imaging range and cannot be recognized. Conversely, when the camera is not moving much, It can be inferred that the marker 52 is within the imaging range and the recognition may be successful again. Therefore, according to this modification, when it is estimated that the recognition succeeds again after the recognition fails (the recognition failure is temporary), the composite image is continuously displayed and the recognition is not performed. If there is little chance of success again, a warning image is displayed. As a result, the warning image can be displayed in a more appropriate situation.

なお、上記変形例においては、図示しないが、ゲーム制御処理(ステップS4)におけるゲーム中断処理(ステップS25)は、警告画像が表示されることに応じて行われることが好ましい。すなわち、ゲーム制御処理において、CPU31は、ステップS21の判定結果が肯定である場合には図13と同様のステップS41およびS42を実行し、ステップS42の判定結果が肯定の場合にステップS25を実行するようにしてもよい。   In the modified example, although not shown, the game interruption process (step S25) in the game control process (step S4) is preferably performed in response to the display of the warning image. That is, in the game control process, the CPU 31 executes steps S41 and S42 similar to those in FIG. 13 when the determination result of step S21 is affirmative, and executes step S25 when the determination result of step S42 is affirmative. You may do it.

また、上記変形例においては、認識が失敗となった場合にすぐにステップS41およびS42の処理が実行されるようにしてもよい。すなわち、第1閾値N1は“1”あるいは非常に小さい値に設定されてもよい。また、上記変形例においては、撮像画像を表示するステップS32の処理は、警告画像が表示された後、警告画像が表示されてから所定時間が経過したことを条件として実行されてもよい。   Moreover, in the said modification, when recognition fails, the process of step S41 and S42 may be performed immediately. That is, the first threshold value N1 may be set to “1” or a very small value. Moreover, in the said modification, the process of step S32 which displays a captured image may be performed on condition that predetermined time passed after the warning image was displayed after the warning image was displayed.

以上のように、上記変形例によれば、カメラ(ゲーム装置1)の動きを検知することによって、認識の失敗が一時的なものであるか否かを判断することができ、警告画像を表示するタイミングを適切に決定することができる。   As described above, according to the above modification, it is possible to determine whether or not the recognition failure is temporary by detecting the movement of the camera (game device 1), and display a warning image. The timing to do can be determined appropriately.

(ゲームシステムに関する変形例)
上記実施形態においては、合成画像を生成・表示するための一連の処理が単一の装置(ゲーム装置1)において実行される場合を説明したが、他の実施形態においては、一連の処理が複数の情報処理装置からなる情報処理システムにおいて実行されてもよい。例えば、端末側装置と、当該端末側装置とネットワークを介して通信可能なサーバ側装置とを含む情報処理システムにおいて、端末側の装置がカメラによって撮像画像を取得し、取得された撮像画像のデータをサーバ側装置へ送信する。撮像画像のデータを受信したサーバ側装置は、認識処理(上記実施形態で言えば、ステップS3の認識管理処理)およびゲーム処理(上記実施形態で言えば、ステップS4のゲーム制御処理)を実行し、ゲーム処理の結果のデータを端末側装置へ送信する。ゲーム処理の結果のデータは、例えば、ゲーム画像のデータ、あるいは、ゲーム画像の生成に必要なデータである。端末側装置は、ゲーム処理の結果のデータを受信し、当該データに基づいて合成画像等のゲーム画像を表示装置に表示する。このように、本発明は、複数の情報処理装置からなる情報処理システムによって実現されてもよい。
(Modification regarding game system)
In the above embodiment, a case has been described in which a series of processes for generating and displaying a composite image is executed in a single device (game device 1). However, in other embodiments, a plurality of series of processes are performed. It may be executed in an information processing system including the information processing apparatus. For example, in an information processing system including a terminal-side device and a server-side device that can communicate with the terminal-side device via a network, the terminal-side device acquires a captured image with a camera, and the acquired captured image data Is transmitted to the server side device. The server-side device that has received the captured image data executes recognition processing (recognition management processing in step S3 in the above embodiment) and game processing (game control processing in step S4 in the above embodiment). The game processing result data is transmitted to the terminal side device. The game processing result data is, for example, game image data or data necessary for generating a game image. The terminal-side device receives game processing result data, and displays a game image such as a composite image on the display device based on the data. As described above, the present invention may be realized by an information processing system including a plurality of information processing apparatuses.

以上のように、本発明は、拡張現実感技術において仮想画像をより現実味を増して表示すること等を目的として、例えばゲームプログラムやゲーム装置として利用することが可能である。   As described above, the present invention can be used as, for example, a game program or a game device for the purpose of displaying a virtual image with increased reality in augmented reality technology.

1 ゲーム装置
13 タッチパネル
22 上側LCD
25 外側カメラ
31 CPU
32 メインメモリ
52 マーカ
53 大砲(仮想オブジェクト)
61 ゲームプログラム
64 撮像画像データ
66 認識済画像データ
68 認識結果データ
69 プレイヤ位置データ
1 Game device 13 Touch panel 22 Upper LCD
25 Outside camera 31 CPU
32 Main memory 52 Marker 53 Cannon (virtual object)
61 Game program 64 Captured image data 66 Recognized image data 68 Recognition result data 69 Player position data

Claims (17)

撮像手段から撮像画像を取得可能な情報処理装置のコンピュータを、
取得された撮像画像に対して、当該撮像画像に含まれる所定の対象を認識する認識処理を繰り返し実行する認識手段と、
前記認識処理の処理結果を用いて生成される仮想オブジェクトの画像と、当該認識処理の対象となった撮像画像とを合成した合成画像を繰り返し生成する合成手段と、
前記合成画像を表示手段に表示させる表示制御手段として機能させる画像表示プログラムであって、
前記合成手段は、認識処理が失敗した場合、以前に成功した認識処理の対象となった撮像画像と、当該認識処理の処理結果を用いて生成される仮想オブジェクトの画像とを合成し、
前記表示制御手段は、前記認識処理が連続して失敗した結果、所定の条件が満たされたことに応じて、現時点で取得された撮像画像を前記表示手段に表示させる、画像表示プログラム。
A computer of an information processing apparatus capable of acquiring a captured image from an imaging unit,
Recognition means for repeatedly executing recognition processing for recognizing a predetermined target included in the captured image with respect to the acquired captured image;
Combining means for repeatedly generating a combined image obtained by combining the image of the virtual object generated using the processing result of the recognition processing and the captured image that is the target of the recognition processing;
An image display program for functioning as display control means for displaying the composite image on a display means,
When the recognition process fails, the combining unit combines the captured image that was the target of the previously successful recognition process and the image of the virtual object generated using the processing result of the recognition process ,
The display control unit causes the display unit to display a captured image acquired at the present time in response to a predetermined condition being satisfied as a result of the recognition process continuously failing .
前記合成手段は、認識処理の処理結果にかかわらず、前記仮想オブジェクトの画像を更新して合成画像を生成する、請求項1に記載の画像表示プログラム。   The image display program according to claim 1, wherein the synthesizing unit updates the image of the virtual object to generate a synthesized image regardless of the processing result of the recognition process. 前記認識処理が成功した場合、成功した認識処理の対象となった撮像画像と当該認識処理の処理結果とを、前記コンピュータがアクセス可能な記憶手段に記憶させる記憶制御手段として前記コンピュータをさらに機能させ、
前記合成手段は、前記記憶手段に記憶される撮像画像と、当該記憶手段に記憶される処理結果に基づいて生成される合成画像とを合成する、請求項1または請求項2に記載の画像表示プログラム。
When the recognition process is successful, the computer is further functioned as a storage control unit that stores the captured image that is a target of the successful recognition process and the processing result of the recognition process in a storage unit accessible by the computer. ,
The image display according to claim 1, wherein the synthesizing unit synthesizes the captured image stored in the storage unit and a synthesized image generated based on a processing result stored in the storage unit. program.
前記記憶制御手段は、前記認識処理が成功した場合、成功した認識処理の対象となった撮像画像と当該認識処理の処理結果とが記憶されるように、前記記憶手段の記憶内容を更新する、請求項3に記載の画像表示プログラム。   When the recognition process is successful, the storage control unit updates the storage content of the storage unit so that the captured image that is the target of the successful recognition process and the processing result of the recognition process are stored. The image display program according to claim 3. 前記認識手段は、前記認識処理が成功する場合、当該認識処理によって認識された前記所定の対象と前記撮像手段もしくは前記情報処理装置との位置関係を前記処理結果として算出し、
前記合成手段は、前記認識処理が成功した場合、成功した認識処理の対象となった撮像画像から算出される位置関係に基づいて前記仮想オブジェクトの画像を生成し、前記認識処理が失敗した場合、以前に成功した認識処理の対象となった撮像画像から算出される位置関係に基づいて前記仮想オブジェクトの画像を生成する、請求項1から請求項4のいずれか1項に記載の画像表示プログラム。
When the recognition process is successful, the recognition unit calculates a positional relationship between the predetermined object recognized by the recognition process and the imaging unit or the information processing apparatus as the processing result,
The synthesizing unit generates an image of the virtual object based on a positional relationship calculated from a captured image that is a target of a successful recognition process when the recognition process is successful, and when the recognition process fails, The image display program according to any one of claims 1 to 4, wherein the image of the virtual object is generated based on a positional relationship calculated from a captured image that has been a target of a previously successful recognition process.
前記認識処理の処理結果をゲーム入力として用いて、仮想空間に登場するオブジェクトの動作を制御する所定のゲーム制御処理を実行するゲーム制御処理手段として前記コンピュータをさらに機能させる、請求項1から請求項5のいずれか1項に記載の画像表示プログラム。   The computer is further caused to function as a game control processing means for executing a predetermined game control process for controlling an action of an object appearing in a virtual space by using the processing result of the recognition process as a game input. 6. The image display program according to any one of 5 above. 前記ゲーム制御処理手段は、認識処理が失敗した場合、以前に成功した認識処理の処理結果を用いて前記ゲーム制御処理を実行する、請求項6に記載の画像表示プログラム。   The image display program according to claim 6, wherein, when the recognition process fails, the game control processing unit executes the game control process using a processing result of a previously successful recognition process. 前記認識処理の処理結果にかかわらず所定のゲーム処理を実行するゲーム処理手段として前記コンピュータをさらに機能させる、請求項1から請求項7のいずれか1項に記載の画像表示プログラム。   The image display program according to any one of claims 1 to 7, further causing the computer to function as game processing means for executing a predetermined game process regardless of a result of the recognition process. 前記ゲーム処理手段は、前記仮想オブジェクトの動作を制御する処理を前記ゲーム処理として実行する、請求項8に記載の画像表示プログラム。   The image display program according to claim 8, wherein the game processing unit executes a process for controlling an operation of the virtual object as the game process. 前記表示制御手段は、前記認識処理が連続して失敗した結果、所定の条件が満たされたことに応じて、前記撮像画像とは異なる警告画像を前記表示手段に表示させる、請求項1から請求項9のいずれか1項に記載の画像表示プログラム。   The display control unit causes the display unit to display a warning image different from the captured image in response to a predetermined condition being satisfied as a result of the recognition process continuously failing. Item 10. The image display program according to any one of Items 9 to 9. 前記表示制御手段は、前記認識処理が所定時間の間連続して失敗したことを前記所定の条件として、前記警告画像を前記表示手段に表示させる、請求項10に記載の画像表示プログラム。   The image display program according to claim 10, wherein the display control unit causes the display unit to display the warning image on the basis of the predetermined condition that the recognition process has failed continuously for a predetermined time. 前記撮像手段または前記情報処理装置の動きを検知する動き検知手段として前記コンピュータをさらに機能させ、
前記表示制御手段は、前記動き検知手段によって前記撮像手段が所定の基準以上動いていることが検知されたことを前記所定の条件として、前記警告画像を前記表示手段に表示させる、請求項10に記載の画像表示プログラム。
Further causing the computer to function as a motion detection means for detecting a motion of the imaging means or the information processing apparatus,
The display control means causes the display means to display the warning image on the basis of the predetermined condition that the movement detecting means detects that the imaging means is moving beyond a predetermined reference. The image display program described.
前記認識処理の処理結果をゲーム入力として用いて、前記仮想オブジェクトの動作を制御する所定のゲーム制御処理を実行するゲーム制御処理手段として前記コンピュータをさらに機能させ、
前記ゲーム制御処理手段は、前記警告画像が表示されることに応じて、ゲームの進行を中断する、請求項10に記載の画像表示プログラム。
Using the processing result of the recognition process as a game input, further causing the computer to function as a game control processing means for executing a predetermined game control process for controlling the operation of the virtual object,
The image display program according to claim 10, wherein the game control processing unit interrupts the progress of the game in response to the display of the warning image.
前記表示制御手段は、前記警告画像が表示された後において前記認識処理が連続して失敗した結果、所定の条件が満たされたことに応じて、現時点で取得された撮像画像を前記表示手段に表示させる、請求項10に記載の画像表示プログラム。   The display control unit displays a captured image acquired at the present time on the display unit in response to a predetermined condition being satisfied as a result of the recognition process continuously failing after the warning image is displayed. The image display program according to claim 10, which is displayed. 撮像手段から撮像画像を取得可能であり、表示手段に画像を表示させる画像表示装置であって、
取得された撮像画像に対して、当該撮像画像に含まれる所定の対象を認識する認識処理を繰り返し実行する認識手段と、
前記認識処理の処理結果を用いて生成される仮想オブジェクトの画像と、当該認識処理の対象となった撮像画像とを合成した合成画像を繰り返し生成する合成手段と、
前記合成画像を表示手段に表示させる表示制御手段とを備え、
前記合成手段は、認識処理が失敗した場合、以前に成功した認識処理の対象となった撮像画像と、当該認識処理の処理結果を用いて生成される仮想オブジェクトの画像とを合成し、
前記表示制御手段は、前記認識処理が連続して失敗した結果、所定の条件が満たされたことに応じて、現時点で取得された撮像画像を前記表示手段に表示させる、画像表示装置。
An image display device capable of acquiring a captured image from an imaging unit and displaying an image on a display unit,
Recognition means for repeatedly executing recognition processing for recognizing a predetermined target included in the captured image with respect to the acquired captured image;
Combining means for repeatedly generating a combined image obtained by combining the image of the virtual object generated using the processing result of the recognition processing and the captured image that is the target of the recognition processing;
Display control means for displaying the composite image on a display means,
When the recognition process fails, the combining unit combines the captured image that was the target of the previously successful recognition process and the image of the virtual object generated using the processing result of the recognition process ,
The display control unit displays the captured image acquired at the present time on the display unit in response to a predetermined condition being satisfied as a result of the recognition process continuously failing .
撮像手段から撮像画像を取得可能であり、表示手段に画像を表示させる画像表示システムであって、
取得された撮像画像に対して、当該撮像画像に含まれる所定の対象を認識する認識処理を繰り返し実行する認識手段と、
前記認識処理の処理結果を用いて生成される仮想オブジェクトの画像と、当該認識処理の対象となった撮像画像とを合成した合成画像を繰り返し生成する合成手段と、
前記合成画像を表示手段に表示させる表示制御手段とを備え、
前記合成手段は、認識処理が失敗した場合、以前に成功した認識処理の対象となった撮像画像と、当該認識処理の処理結果を用いて生成される仮想オブジェクトの画像とを合成し、
前記表示制御手段は、前記認識処理が連続して失敗した結果、所定の条件が満たされたことに応じて、現時点で取得された撮像画像を前記表示手段に表示させる、画像表示システム。
An image display system capable of acquiring a captured image from an imaging unit and displaying an image on a display unit,
Recognition means for repeatedly executing recognition processing for recognizing a predetermined target included in the captured image with respect to the acquired captured image;
Combining means for repeatedly generating a combined image obtained by combining the image of the virtual object generated using the processing result of the recognition processing and the captured image that is the target of the recognition processing;
Display control means for displaying the composite image on a display means,
When the recognition process fails, the combining unit combines the captured image that was the target of the previously successful recognition process and the image of the virtual object generated using the processing result of the recognition process ,
The display control unit displays the captured image acquired at the present time on the display unit in response to a predetermined condition being satisfied as a result of the failure of the recognition process continuously .
撮像手段から撮像画像を取得し、表示手段に画像を表示させるための画像表示方法であって、
取得された撮像画像に対して、当該撮像画像に含まれる所定の対象を認識する認識処理を繰り返し実行する認識ステップと、
前記認識処理の処理結果を用いて生成される仮想オブジェクトの画像と、当該認識処理の対象となった撮像画像とを合成した合成画像を繰り返し生成する合成ステップと、
前記合成画像を表示手段に表示させる表示制御ステップとを備え、
前記合成ステップにおいては、認識処理が失敗した場合、以前に成功した認識処理の対象となった撮像画像と、当該認識処理の処理結果を用いて生成される仮想オブジェクトの画像とを合成し、
前記表示制御ステップにおいては、前記認識処理が連続して失敗した結果、所定の条件が満たされたことに応じて、現時点で取得された撮像画像が前記表示手段に表示される、画像表示方法。
An image display method for acquiring a captured image from an imaging unit and displaying the image on a display unit,
A recognition step of repeatedly executing recognition processing for recognizing a predetermined target included in the captured image with respect to the acquired captured image;
A composite step of repeatedly generating a composite image obtained by combining the image of the virtual object generated using the processing result of the recognition processing and the captured image that is the target of the recognition processing;
A display control step of displaying the composite image on a display means,
In the synthesis step, when the recognition process fails, the captured image that has been the target of the previously successful recognition process is synthesized with the image of the virtual object generated using the processing result of the recognition process ,
In the display control step, an image display method in which a captured image acquired at the present time is displayed on the display unit in response to a predetermined condition being satisfied as a result of the recognition process continuously failing .
JP2011269711A 2011-12-09 2011-12-09 Image display program, image display apparatus, image display system, and image display method Active JP5496991B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011269711A JP5496991B2 (en) 2011-12-09 2011-12-09 Image display program, image display apparatus, image display system, and image display method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011269711A JP5496991B2 (en) 2011-12-09 2011-12-09 Image display program, image display apparatus, image display system, and image display method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2010112386A Division JP4971483B2 (en) 2010-05-14 2010-05-14 Image display program, image display apparatus, image display system, and image display method

Publications (3)

Publication Number Publication Date
JP2012059292A JP2012059292A (en) 2012-03-22
JP2012059292A5 JP2012059292A5 (en) 2013-06-13
JP5496991B2 true JP5496991B2 (en) 2014-05-21

Family

ID=46056232

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011269711A Active JP5496991B2 (en) 2011-12-09 2011-12-09 Image display program, image display apparatus, image display system, and image display method

Country Status (1)

Country Link
JP (1) JP5496991B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2876608A4 (en) * 2012-07-23 2016-02-10 Fujitsu Ltd Display control program, display control method, and display control device
JP2014110854A (en) * 2012-12-05 2014-06-19 Dainippon Printing Co Ltd Image processing device, image processing system, and card game implement
JP6318542B2 (en) * 2013-10-24 2018-05-09 富士通株式会社 Display control method, display control program, and information processing apparatus
US10469796B2 (en) * 2017-04-21 2019-11-05 Fuji Xerox Co., Ltd. Information processing apparatus, information processing method, and non-transitory computer readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005107247A (en) * 2003-09-30 2005-04-21 Canon Inc Method and device for estimating positional attitude
JP2008146109A (en) * 2006-12-05 2008-06-26 Canon Inc Image processing method and image processor
JP5236546B2 (en) * 2009-03-26 2013-07-17 京セラ株式会社 Image synthesizer

Also Published As

Publication number Publication date
JP2012059292A (en) 2012-03-22

Similar Documents

Publication Publication Date Title
JP4971483B2 (en) Image display program, image display apparatus, image display system, and image display method
US10589174B2 (en) Storage medium having stored therein information processing program, information processing apparatus, information processing system, and information processing method
JP5622446B2 (en) GAME PROGRAM, GAME DEVICE, GAME CONTROL METHOD, AND GAME SYSTEM
JP5622447B2 (en) Information processing program, information processing apparatus, information processing system, and information processing method
US20100069152A1 (en) Method of generating image using virtual camera, storage medium, and computer device
US8961307B2 (en) Game system, game processing method, game apparatus, and computer-readable storage medium
KR20190099390A (en) Method and system for using sensors of a control device to control a game
US20120094773A1 (en) Storage medium having stored thereon game program, image processing apparatus, image processing system, and image processing method
US9019203B2 (en) Storage medium, information processing apparatus, information processing system and information processing method
JP2011258151A (en) Information processing program, information processor, information processing system and information processing method
JP2011255119A (en) Information processing program, information processing apparatus, information processing system, and information processing method
JP2022100325A (en) Game processing program, game processing method and game processing device
JP6719633B1 (en) Program, method, and viewing terminal
JP5437726B2 (en) Information processing program, information processing apparatus, information processing system, and coordinate calculation method
JP5496991B2 (en) Image display program, image display apparatus, image display system, and image display method
JP2010142592A (en) Game program and game device
JP2011177203A (en) Object controlling program and object controlling apparatus
TW201026364A (en) Game device, controlling method of game device and information recording medium
CN108786108B (en) Target object control method, device, storage medium and equipment
US20090093314A1 (en) Game program and game apparatus
JPWO2013179641A1 (en) Computer device, game program, and computer device control method
JP6826626B2 (en) Viewing program, viewing method, and viewing terminal
JP4878396B2 (en) Image recognition program, image recognition apparatus, image recognition system, and image recognition method
JP5647443B2 (en) Image recognition program, image recognition apparatus, image recognition system, and image recognition method
JP7185814B2 (en) Information processing device, information processing method and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130425

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130425

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140212

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140227

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140305

R150 Certificate of patent or registration of utility model

Ref document number: 5496991

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250