Device and program for calculating attitude
24 claims: 21 independent, 3 dependent
- 1角速度センサと加速度センサとを少なくとも備えた入力装置から角速度データと加速度データとを含む操作データを取得し、当該入力装置の姿勢を算出する姿勢算出装置であって、 前記入力装置から見た重力方向を表す重力ベクトルを、前記操作データを用いて算出する重力方向算出手段と、 前記入力装置の運動による加速度を表す運動加速度ベクトルを前記加速度データにより示される加速度と前記重力ベクトルとに基づいて算出する運動加速度算出手段と、 前記入力装置が所定の運動を行う場合における、前記入力装置の運動による運動加速度と角速度との予め定義された関係に基づいて、前記角速度データにより示される角速度に対して当該関係を満たす運動加速度へと前記運動加速度ベクトルを近づける方向へ前記重力ベクトルを補正する第1補正手段と、 前記第1補正手段が補正した重力ベクトルに対応する前記入力装置の姿勢を算出する第1姿勢算出手段とを備え 、 前記所定の運動は、所定位置を中心とした回転運動であり、 前記第1補正手段は、 前記回転運動を行う場合において前記入力装置の運動加速度の方向と直交する直交ベクトルを前記角速度データに基づいて算出する直交ベクトル算出手段と、 前記入力装置の運動加速度と角速度との関係として、前記運動加速度ベクトルが前記直交ベクトルに直交する関係を用いて、前記重力ベクトルを補正するベクトル補正手段とを含む 、姿勢算出装置。
- 2前記角速度データから前記入力装置の姿勢を算出する第2姿勢算出手段をさらに備え、 前記重力方向算出手段は、前記第2姿勢算出手段が算出した姿勢に基づいて前記重力ベクトルを算出し、 前記第1姿勢算出手段は、前記第1補正手段が補正した重力ベクトルを用いて前記第2姿勢算出手段が算出した姿勢を補正することによって前記入力装置の姿勢を算出する、請求項1に記載の姿勢算出装置。
- 3前記直交ベクトル算出手段は、前記入力装置から取得される前記角速度データの推移に基づいて角加速度を算出し、前記角速度データにより示される角速度と当該角加速度とに基づいて前記直交ベクトルを算出する、請求項 1 に記載の姿勢算出装置。
- 4前記所定の運動は、所定位置を中心とした等角速度の回転運動であり、 前記直交ベクトル算出手段は、前記回転運動の中心軸を表す角速度ベクトルを前記直交ベクトルとして算出する、請求項 1 に記載の姿勢算出装置。
- 5前記ベクトル補正手段は、前記直交ベクトルと前記運動加速度ベクトルとの内積が小さくなるように前記重力ベクトルを補正する、請求項 1 から請求項 4 のいずれか1項に記載の姿勢算出装置。
- 6前記第1補正手段は、前記角速度データにより表される角速度が小さいほど前記重力ベクトルを補正する量が小さくなるように前記重力ベクトルを補正する、請求項 1 から請求項 5 のいずれか1項に記載の姿勢算出装置。
- 7前記第1補正手段は、前記加速度データにより示される加速度の単位時間あたりの変化量が大きいほど前記重力ベクトルを補正する量が小さくなるように前記重力ベクトルを補正する、請求項 1 から請求項 6 のいずれか1項に記載の姿勢算出装置。
- 8前記第1補正手段は、前記重力ベクトルを所定角度だけ回転させたときに、回転後の重力ベクトルから算出される運動加速度ベクトルが、前記角速度データにより示される角速度に対して当該関係を満たす運動加速度へ最も近づく方向へ、前記重力ベクトルを回転させる補正を行う、請求項1から請求項 7 のいずれか1項に記載の姿勢算出装置。
- 9前記加速度データが示す加速度の向きに近づける方向へ前記重力ベクトルを補正する第2補正手段をさらに備え、 前記第1姿勢算出手段は、前記第1補正手段および第2補正手段による補正後の重力ベクトルを用いて前記入力装置の姿勢を算出する、請求項1から請求項 8 のいずれか1項に記載の姿勢算出装置。
- 10前記第2補正手段は、前記角速度データにより表される角速度が大きいほど前記重力ベクトルを補正する量が小さくなるように前記重力ベクトルを補正する、請求項 9 に記載の姿勢算出装置。
- 11前記第2補正手段は、前記加速度データにより示される加速度の単位時間あたりの変化量が大きいほど前記重力ベクトルを補正する量が小さくなるように前記重力ベクトルを補正する、請求項 9 または請求項 10 に記載の姿勢算出装置。
- 12角速度センサと加速度センサとを少なくとも備えた入力装置から角速度データと加速度データとを含む操作データを取得し、当該入力装置の姿勢を算出する姿勢算出装置のコンピュータにおいて実行される姿勢算出プログラムであって、 前記入力装置から見た重力方向を表す重力ベクトルを前記操作データを用いて算出する重力方向算出手段と、 前記入力装置の運動による加速度を表す運動加速度ベクトルを前記加速度データにより示される加速度と前記重力ベクトルとに基づいて算出する運動加速度算出手段と、 前記入力装置が所定の運動を行う場合において当該運動により前記入力装置に加えられる運動加速度と角速度との関係を定義しておき、前記角速度データにより示される角速度に対して当該関係を満たす運動加速度へと前記運動加速度ベクトルを近づける方向へ前記重力ベクトルを補正する第1補正手段と、 前記第1補正手段が補正した重力ベクトルを用いて前記入力装置の姿勢を算出する第1姿勢算出手段として 前記姿勢算出プログラムは 前記コンピュータを機能させ 、 前記所定の運動は、所定位置を中心とした回転運動であり、 前記第1補正手段は、 前記回転運動を行う場合において前記入力装置の運動加速度の方向と直交する直交ベクトルを前記角速度データに基づいて算出する直交ベクトル算出手段と、 前記入力装置の運動加速度と角速度との関係として、前記運動加速度ベクトルが前記直交ベクトルに直交する関係を用いて、前記重力ベクトルを補正するベクトル補正手段とを含む 、姿勢算出プログラム。
- 13前記角速度データから前記入力装置の姿勢を算出する第2姿勢算出手段として前記コンピュータをさらに機能させ、 前記重力方向算出手段は、前記第2姿勢算出手段が算出した姿勢に基づいて前記重力ベクトルを算出し、 前記第1姿勢算出手段は、前記第1補正手段が補正した重力ベクトルを用いて前記第2姿勢算出手段が算出した姿勢を補正することによって前記入力装置の姿勢を算出する、請求項 12 に記載の姿勢算出プログラム。
- 14前記直交ベクトル算出手段は、前記入力装置から取得される前記角速度データの推移に基づいて角加速度を算出し、前記角速度データにより示される角速度と当該角加速度とに基づいて前記直交ベクトルを算出する、請求項 12 に記載の姿勢算出プログラム。
- 15前記所定の運動は、所定位置を中心とした等角速度の回転運動であり、 前記直交ベクトル算出手段は、前記回転運動の中心軸を表す角速度ベクトルを前記直交ベクトルとして算出する、請求項 12 に記載の姿勢算出プログラム。
- 16前記ベクトル補正手段は、前記直交ベクトルと前記運動加速度ベクトルとの内積が小さくなるように前記重力ベクトルを補正する、請求項 12 から請求項 15 のいずれか1項に記載の姿勢算出プログラム。
- 17前記第1補正手段は、前記角速度データにより表される角速度が小さいほど前記重力ベクトルを補正する量が小さくなるように前記重力ベクトルを補正する、請求項 12 から請求項 16 のいずれか1項に記載の姿勢算出プログラム。
- 18前記第1補正手段は、前記加速度データにより示される加速度の単位時間あたりの変化量が大きいほど前記重力ベクトルを補正する量が小さくなるように前記重力ベクトルを補正する、請求項 12 から請求項 17 のいずれか1項に記載の姿勢算出プログラム。
- 19前記第1補正手段は、前記重力ベクトルを所定角度だけ回転させたときに、回転後の重力ベクトルから算出される運動加速度ベクトルが、前記角速度データにより示される角速度に対して当該関係を満たす運動加速度へ最も近づく方向へ、前記重力ベクトルを回転させる補正を行う、請求項 12 から請求項 18 のいずれか1項に記載の姿勢算出プログラム。
- 20前記加速度データが示す加速度の向きに近づける方向へ前記重力ベクトルを補正する第2補正手段として前記コンピュータをさらに機能させ、 前記第1姿勢算出手段は、前記第1補正手段および第2補正手段による補正後の重力ベクトルを用いて前記入力装置の姿勢を算出する、請求項 12 から請求項 19 のいずれか1項に記載の姿勢算出プログラム。
- 21前記第2補正手段は、前記角速度データにより表される角速度が大きいほど前記重力ベクトルを補正する量が小さくなるように前記重力ベクトルを補正する、請求項 20 に記載の姿勢算出プログラム。
- 22前記第2補正手段は、前記加速度データにより示される加速度の単位時間あたりの変化量が大きいほど前記重力ベクトルを補正する量が小さくなるように前記重力ベクトルを補正する、請求項 20 または請求項 21 に記載の姿勢算出プログラム。
- 23角速度センサと加速度センサとを少なくとも備えた入力装置から角速度データと加速度データとを含む操作データを取得し、当該入力装置の姿勢を算出する姿勢算出システムであって、 前記入力装置から見た重力方向を表す重力ベクトルを、前記操作データを用いて算出する重力方向算出手段と、 前記入力装置の運動による加速度を表す運動加速度ベクトルを前記加速度データにより示される加速度と前記重力ベクトルとに基づいて算出する運動加速度算出手段と、 前記入力装置が所定の運動を行う場合における、前記入力装置の運動による運動加速度と角速度との予め定義された関係に基づいて、前記角速度データにより示される角速度に対して当該関係を満たす運動加速度へと前記運動加速度ベクトルを近づける方向へ前記重力ベクトルを補正する第1補正手段と、 前記第1補正手段が補正した重力ベクトルに対応する前記入力装置の姿勢を算出する第1姿勢算出手段とを備え、 前記所定の運動は、所定位置を中心とした回転運動であり、 前記第1補正手段は、 前記回転運動を行う場合において前記入力装置の運動加速度の方向と直交する直交ベクトルを前記角速度データに基づいて算出する直交ベクトル算出手段と、 前記入力装置の運動加速度と角速度との関係として、前記運動加速度ベクトルが前記直交ベクトルに直交する関係を用いて、前記重力ベクトルを補正するベクトル補正手段とを含む、姿勢算出システム。
- 24角速度センサと加速度センサとを少なくとも備えた入力装置から角速度データと加速度データとを含む操作データを取得し、当該入力装置の姿勢を算出する姿勢算出装置において実行される姿勢算出方法であって、 前記入力装置から見た重力方向を表す重力ベクトルを、前記操作データを用いて算出する重力方向算出ステップと、 前記入力装置の運動による加速度を表す運動加速度ベクトルを前記加速度データにより示される加速度と前記重力ベクトルとに基づいて算出する運動加速度算出ステップと、 前記入力装置が所定の運動を行う場合における、前記入力装置の運動による運動加速度と角速度との予め定義された関係に基づいて、前記角速度データにより示される角速度に対して当該関係を満たす運動加速度へと前記運動加速度ベクトルを近づける方向へ前記重力ベクトルを補正する第1補正ステップと、 前記第1補正ステップにおいて補正された重力ベクトルに対応する前記入力装置の姿勢を算出する第1姿勢算出ステップとを備え、 前記所定の運動は、所定位置を中心とした回転運動であり、 前記第1補正ステップは、 前記回転運動を行う場合において前記入力装置の運動加速度の方向と直交する直交ベクトルを前記角速度データに基づいて算出する直交ベクトル算出ステップと、 前記入力装置の運動加速度と角速度との関係として、前記運動加速度ベクトルが前記直交ベクトルに直交する関係を用いて、前記重力ベクトルを補正するベクトル補正ステップとを含む、姿勢算出方法。
Independent claims24
167 paragraphs, as filed
The present invention relates to a posture calculation device or a posture calculation program, and more specifically, to a posture calculation device or a posture calculation program for calculating the posture of an input device.
Conventionally, a technique of calculating the posture of an input device using an acceleration sensor and a gyro sensor has been considered. For example, Patent Document 1 describes a game device that uses an input control device including an acceleration sensor and a gyro sensor. This game device controls the sword of the game character according to the movement of the input control device. Specifically, data on the movement of swinging the sword is created based on the output of the acceleration sensor, and data on the posture of the sword is created based on the output of the gyro sensor.
<p><patcit num="1"><text>Japanese Unexamined Patent Publication No. 2000-308756</text></patcit></p>
<p> When the posture is calculated using the gyro sensor as in Patent Document 1, an error occurs between the calculated posture and the actual posture of the input control device. The angular velocity of the input control device is not detected by the gyro sensor when the movement of the input control device is slow, or conversely, the angular velocity of the input control device exceeds the detectable range of the gyro sensor when the movement of the input control device is intense. This is because it may occur. In addition, an error may occur when the angular velocity changes abruptly during a period shorter than the output interval of the angular velocity data. In addition, the gyro sensor may have an error called drift in the output of the sensor due to factors such as temperature. Then, since the error of the angular velocity is accumulated in the posture calculated from the angular velocity with time, the error of the posture becomes large. In Patent Document 1, since the posture error calculated from the gyro sensor is not assumed, there is a possibility that the posture cannot be calculated accurately.</p><p> Therefore, an object of the present invention is to provide a posture calculation device or a posture calculation program capable of accurately calculating the posture of an input device using an angular velocity sensor such as a gyro sensor.</p>
<p> The present invention has adopted the following configuration in order to solve the above problems. The reference numerals and supplementary explanations in parentheses in this column indicate the correspondence with the embodiments described later in order to assist the understanding of the present invention, and do not limit the present invention in any way.</p><p> The present invention obtains operation data (62) including angular velocity data (63) and acceleration data (64) from an input device (8) including at least an angular velocity sensor (gyro sensor 55,56) and an acceleration sensor (37). It is a posture calculation device (game device 3) that acquires and calculates the posture of the input device. The posture calculation device includes a gravity direction calculation means (CPU10 that executes step S11. Hereinafter, only the step number is simply described), a motion acceleration calculation means (S24), a first correction means (S34), and a first. It is equipped with a posture calculation means (S15). The gravity direction calculation means calculates a gravity vector (Vg) representing the gravity direction seen from the input device using the operation data. The motion acceleration calculation means calculates a motion acceleration vector (VA) representing the acceleration due to the motion of the input device based on the acceleration (detection acceleration vector Va) and the gravity vector (Vg) indicated by the acceleration data (Fig. 10). The first correction means is based on a predefined relationship (Equation (7) or (15)) between the motion acceleration and the angular velocity due to the motion of the input device when the input device performs a predetermined motion (rotary motion). Then, the gravity vector is corrected in the direction of bringing the motion acceleration vector closer to the motion acceleration (vector VA'shown in FIG. 11) that satisfies the relationship with respect to the angular velocity indicated by the angular velocity data (FIGS. 11 and 12). The first posture calculation means calculates the posture of the input device corresponding to the gravity vector corrected by the first correction means.</p><p> According to the above, the posture calculation device is a calculation source of the motion acceleration vector so that the motion acceleration vector satisfies the relationship by using the relationship between the angular velocity and the motion acceleration when the input device performs a predetermined motion. Correct the gravity vector. As a result, even when the input device is moved, the gravity vector can be correctly corrected by using the acceleration data and the angular velocity data. Then, the posture can be calculated accurately by calculating the posture of the input device using the accurate gravity vector.</p><p> Further, the attitude calculation device may further include a second attitude calculation means (S4) for calculating the attitude (first attitude) of the input device from the angular velocity data. At this time, the gravity direction calculation means calculates the gravity vector based on the posture calculated by the second posture calculation means. The first posture calculation means calculates the posture of the input device by correcting the posture calculated by the second posture calculation means using the gravity vector corrected by the first correction means.</p><p> According to the above, the attitude of the input device calculated from the angular velocity data which is the detection result of the gyro sensor can be corrected by using the accurate gravity vector. This makes it possible to accurately calculate the posture of the input device using the gyro sensor.</p><p> The predetermined motion may be a rotational motion around a predetermined position. At this time, the first correction means includes the orthogonal vector calculation means (S3, S42) and the vector correction means (S34). The orthogonal vector calculation means calculates an orthogonal vector (Vω or W) orthogonal to the direction of the motion acceleration of the input device based on the angular velocity data when performing rotational motion. The vector correction means corrects the gravity vector by using the relationship (Equation (7) or (15)) in which the motion acceleration vector is orthogonal to the orthogonal vector as the relationship between the motion acceleration of the input device and the angular velocity.</p><p> According to the above, when the input device performs a rotary motion, the posture of the input device when the input device performs a rotary motion can be easily calculated by using the relationship in which the motion acceleration vector is orthogonal to the orthogonal vector. it can.</p><p> The orthogonal vector calculation means may calculate the angular velocity based on the transition of the angular velocity data acquired from the input device, and may calculate the orthogonal vector based on the angular velocity indicated by the angular velocity data and the angular velocity.</p><p> According to the above, the orthogonal vector can be easily calculated from the angular velocity data.</p><p> The predetermined motion may be a rotary motion having an equal angular velocity around a predetermined position. At this time, the orthogonal vector calculation means calculates the angular velocity vector representing the central axis of the rotational motion as the orthogonal vector.</p><p> According to the above, the angular velocity vector can be used as an orthogonal vector by setting a predetermined motion as a rotational motion having an equal angular velocity. Therefore, the orthogonal vector can be easily calculated, and the gravity vector correction process can be easily performed.</p><p> The vector correction means may correct the gravity vector so that the inner product of the orthogonal vector and the motion acceleration vector becomes small.</p><p> According to the above, the correction can be easily performed by evaluating the magnitude of the inner product of the orthogonal vector and the motion acceleration vector and correcting the gravity vector.</p><p> The first correction means may correct the gravity vector so that the smaller the angular velocity represented by the angular velocity data, the smaller the amount of correction of the gravity vector (S32).</p><p> According to the above, when the angular velocity of the input device is small, the correction amount of the gravity vector is small, and when the angular velocity is large, the correction amount of the gravity vector is large. Here, it is presumed that the case where the angular velocity is small is the case where there is a high possibility that the input device is not rotating, and there is a possibility that the correction by the first correction means is incorrect. That is, according to the above, when there is a high possibility that the correction by the first correction means is incorrect, the correction amount becomes small, so that it is possible to prevent inaccurate correction by the first correction means. .. As a result, the gravity vector can be corrected correctly, and the posture of the input device can be calculated accurately.</p><p> The first correction means may correct the gravity vector so that the larger the change amount (jerk J) per unit time of the acceleration indicated by the acceleration data, the smaller the amount of correction of the gravity vector (S33). ..</p><p> According to the above, when the jerk of the input device is large, the correction amount of the gravity vector becomes small, and when the jerk is small, the correction amount of the gravity vector becomes large. Here, it is presumed that the case where the jerk is large is the case where there is a high possibility that the input device is not performing rotational movement, and there is a possibility that the correction by the first correction means is incorrect. That is, according to the above, when there is a high possibility that the correction by the first correction means is incorrect, the correction amount becomes small, so that it is possible to prevent inaccurate correction by the first correction means. .. As a result, the gravity vector can be corrected correctly, and the posture of the input device can be calculated accurately.</p><p> In the first correction means, when the gravity vector is rotated by a predetermined angle, the motion acceleration vector calculated from the rotated gravity vector is the most to the motion acceleration that satisfies the relationship with respect to the angular velocity indicated by the angular velocity data. A correction may be made to rotate the gravity vector in the approaching direction.</p><p> According to the above, since it is only necessary to determine the direction in which the gravity vector should be corrected, the gravity vector can be easily corrected. Further, if the corrected gravity vector is corrected so as to match the gravity vector when the motion acceleration vector satisfies the above relationship, the correction amount in one correction becomes large and the gravity vector changes abruptly. There is a risk of doing so. If the gravity vector changes abruptly, the calculated attitude of the input device changes abruptly, and when the attitude of the input device is used for the input operation, the operability may deteriorate. On the other hand, according to the above, since the correction amount in one correction can be limited to a certain amount or less, it is possible to prevent a sudden change in the gravity vector and prevent the operability of the input device from being deteriorated. can do.</p><p> Further, the attitude calculation device may further include a second correction means (S12) for correcting the gravity vector in a direction approaching the direction of the acceleration (detection acceleration vector Va) indicated by the acceleration data. At this time, the first posture calculation means calculates the posture of the input device using the gravity vectors corrected by the first correction means and the second correction means.</p><p> According to the above, the gravity vector is corrected in the direction closer to the direction of acceleration indicated by the acceleration data. Here, when the input device is stationary, the direction of the acceleration points to the direction of gravity, so that the gravity vector can be accurately matched with the direction of gravity. Therefore, according to the above, the gravity vector can be correctly corrected not only when the input device is moving but also when it is stationary, and the posture of the input device can be calculated accurately.</p><p> The second correction means may correct the gravity vector so that the larger the angular velocity represented by the angular velocity data, the smaller the amount of correction of the gravity vector (S23).</p><p> According to the above, the larger the angular velocity of the input device, the smaller the amount of correction of the gravity vector by the second correction means. Here, it is presumed that the acceleration detected by the acceleration sensor does not accurately represent the direction of gravity because the larger the angular velocity is, the more likely the input device is moving. Therefore, according to the above, when there is a high possibility that the correction by the second correction means is incorrect, the correction amount becomes small, and it is possible to prevent the second correction means from performing an inaccurate correction. .. As a result, the gravity vector can be corrected correctly, and the posture of the input device can be calculated accurately.</p><p> Further, in both the first correction means and the second correction means, when the correction amount of the gravity vector is changed according to the magnitude of the angular velocity, there are the following advantages. That is, in this case, the correction is mainly performed by the first correction means during the period when the angular velocity is high, and the correction is mainly performed by the second correction means during the period when the angular velocity is low. Therefore, the gravity vector is corrected regardless of whether the angular velocity is large or small, and the chances of the correction being performed can be increased. As a result, the gravity vector can be calculated accurately, and the posture of the input device can be calculated accurately.</p><p> The second correction means may correct the gravity vector so that the larger the change amount (jerk J) per unit time of the acceleration indicated by the acceleration data, the smaller the amount of correction of the gravity vector (S26). ..</p><p> According to the above, the larger the jerk of the input device, the smaller the amount of correction of the gravity vector by the second correction means. Here, it is presumed that the acceleration detected by the acceleration sensor does not accurately represent the direction of gravity because the larger the jerk, the higher the possibility that the input device is moving. Therefore, according to the above, when there is a high possibility that the correction by the second correction means is incorrect, the correction amount becomes small, and it is possible to prevent the second correction means from performing an inaccurate correction. .. As a result, the gravity vector can be corrected correctly, and the posture of the input device can be calculated accurately.</p><p> Further, the present invention may be implemented in the form of a posture calculation program that causes the computer of the information processing device to function as each of the above means.</p>
<p> According to the present invention, the relationship between the angular velocity and the motion acceleration when the input device performs a predetermined motion is used to correct the gravity vector, which is the calculation source of the motion acceleration vector, so that the motion acceleration vector satisfies the relationship. To do. As a result, even when the input device is moved, the gravity vector can be correctly corrected by using the acceleration data and the angular velocity data.</p>
<figref num="1">External view of the game system</figref><figref num="2">Functional block diagram of the game device</figref><figref num="3">Perspective view showing the external configuration of the input device</figref><figref num="4">Perspective view showing the external configuration of the controller</figref><figref num="5">Diagram showing the internal structure of the controller</figref><figref num="6">Diagram showing the internal structure of the controller</figref><figref num="7">Block diagram showing the configuration of the input device</figref><figref num="8">Diagram showing gravity vector and detected acceleration vector for the input device</figref><figref num="9">The figure which shows the correction of the gravity vector in the static correction process</figref><figref num="10">Diagram showing gravity vector, detected acceleration vector, and motion acceleration vector for the input device</figref><figref num="11">The figure which shows the angular velocity vector and the motion acceleration vector about an input device.</figref><figref num="12">The figure which shows the correction of the gravity vector in the dynamic correction process</figref><figref num="13">Diagram showing the main data stored in the main memory of the game device</figref><figref num="14">Main flowchart showing the flow of processing executed in the game device</figref><figref num="15">A flowchart showing the flow of the correction process (step S5) based on the acceleration shown in FIG.</figref><figref num="16">A flowchart showing the flow of the static correction process (step S12) shown in FIG.</figref><figref num="17">A flowchart showing the flow of the dynamic correction process (step S13) shown in FIG.</figref><figref num="18">The figure which shows the calculation method of the gravity correction vector in the dynamic correction processing</figref><figref num="19">The figure which shows the calculation method of the gravity correction vector in the dynamic correction processing</figref><figref num="20">A flowchart showing a modified example of the dynamic correction process (step S13) shown in FIG.</figref><figref num="21">A flowchart showing the flow of the correction process (step S6) based on the captured image shown in FIG.</figref><figref num="22">Diagram showing 2D coordinates corresponding to the captured image</figref>
[Overall configuration of the game system] A game system 1 including a game device, which is an example of a posture calculation device according to an embodiment of the present invention, will be described with reference to FIG. FIG. 1 is an external view of the game system 1. Hereinafter, the game device and the game program of the present embodiment will be described by taking a stationary game device as an example. In FIG. 1, the game system 1 includes a television receiver (hereinafter, simply referred to as television) 2, a game device 3, an optical disk 4, an input device 8, and a marker unit 6. This system executes game processing on the game device 3 based on the game operation using the input device 8.
An optical disk 4, which is an example of an information storage medium that is interchangeably used with respect to the game device 3, is detachably inserted into the game device 3. The optical disk 4 stores a game program to be executed by the game device 3. An optical disc 4 insertion slot is provided on the front surface of the game device 3. The game device 3 executes the game processing by reading and executing the game program stored in the optical disk 4 inserted into the insertion slot.
A television 2 which is an example of a display device is connected to the game device 3 via a connection cord. The television 2 displays a game image obtained as a result of the game processing executed by the game device 3. Further, a marker unit 6 is installed around the screen of the television 2 (upper side of the screen in FIG. 1). The marker unit 6 is provided with two markers 6R and 6L at both ends thereof. The marker 6R (similar to the marker 6L) is specifically one or more infrared LEDs, and outputs infrared light toward the front of the television 2. The marker unit 6 is connected to the game device 3, and the game device 3 can control the lighting of each infrared LED included in the marker unit 6.
The input device 8 gives the game device 3 operation data indicating the content of the operation performed on the own machine. In this embodiment, the input device 8 includes a controller 5 and a gyro sensor unit 7. Although the details will be described later, the input device 8 has a configuration in which the gyro sensor unit 7 is detachably connected to the controller 5. The controller 5 and the game device 3 are connected by wireless communication. In this embodiment, for example, Bluetooth (registered trademark) technology is used for wireless communication between the controller 5 and the game device 3. In another embodiment, the controller 5 and the game device 3 may be connected by wire.
[Internal configuration of game device 3] Next, the internal configuration of the game device 3 will be described with reference to FIG. FIG. 2 is a block diagram showing the configuration of the game device 3. The game device 3 includes a CPU 10, a system LSI 11, an external main memory 12, a ROM / RTC 13, a disk drive 14, an AV-IC15, and the like.
The CPU 10 executes game processing by executing a game program stored in the optical disk 4, and functions as a game processor. The CPU 10 is connected to the system LSI 11. In addition to the CPU 10, the external main memory 12, ROM / RTC 13, disk drive 14, and AV-IC 15 are connected to the system LSI 11. The system LSI 11 performs processing such as controlling data transfer between each component connected to the system LSI 11, generating an image to be displayed, and acquiring data from an external device. The internal configuration of the system LSI will be described later. The volatile external main memory 12 stores programs such as a game program read from the optical disk 4 and a game program read from the flash memory 17, and stores various data. The CPU 10 It is used as a work area or buffer area of. ROM / RTC13 is a ROM (so-called boot ROM) in which a program for booting the game device 3 is incorporated, and a clock circuit (RTC: Real Time) that counts time. Clock) and. The disk drive 14 reads program data, texture data, and the like from the optical disk 4, and writes the read data to the internal main memory 11e or the external main memory 12, which will be described later.
Further, the system LSI 11 is provided with an input / output processor (I / O processor) 11a, a GPU (Graphics Processor Unit) 11b, a DSP (Digital Signal Processor) 11c, a VRA 1d, and an internal main memory 11e. Although not shown, these components 11a to 11e are connected to each other by an internal bus.
GPU11b forms a part of drawing means and generates an image according to a graphics command (drawing command) from CPU10. VRAM11d stores data (data such as polygon data and texture data) required for GPU11b to execute graphics commands. When an image is generated, GPU11b creates image data using the data stored in VRAM11d.
The DSP 11c functions as an audio processor and generates audio data using sound data and sound wave (timbre) data stored in the internal main memory 11e and the external main memory 12.
The image data and audio data generated as described above are read out by the AV-IC15. The AV-IC15 outputs the read image data to the TV 2 via the AV connector 16 and outputs the read audio data to the speaker 2a built in the TV 2. As a result, the image is displayed on the television 2 and the sound is output from the speaker 2a.
The input / output processor 11a transmits / receives data to / from the components connected to the input / output processor 11a, and downloads data from an external device. The input / output processor 11a is connected to the flash memory 17, the wireless communication module 18, the wireless controller module 19, the expansion connector 20, and the memory card connector 21. The antenna 22 is connected to the wireless communication module 18, and the antenna 23 is connected to the wireless controller module 19.
The input / output processor 11a is connected to the network via the wireless communication module 18 and the antenna 22, and can communicate with other game devices and various servers connected to the network. The input / output processor 11a periodically accesses the flash memory 17, detects the presence or absence of data that needs to be transmitted to the network, and if there is such data, connects to the network via the wireless communication module 18 and the antenna 22. Send. Further, the input / output processor 11a receives the data transmitted from another game device or the data downloaded from the download server via the network, the antenna 22, and the wireless communication module 18, and the received data is stored in the flash memory 17. Remember. By executing the game program, the CPU 10 reads the data stored in the flash memory 17 and uses it in the game program. In the flash memory 17, in addition to data transmitted and received between the game device 3 and other game devices and various servers, save data of a game played using the game device 3 (game result data or intermediate data). May be remembered.
Further, the input / output processor 11a receives the operation data transmitted from the controller 5 via the antenna 23 and the wireless controller module 19, and stores (temporarily stores) the operation data in the buffer area of the internal main memory 11e or the external main memory 12.
Further, the expansion connector 20 and the memory card connector 21 are connected to the input / output processor 11a. The expansion connector 20 is a connector for interfaces such as USB and SCSI, and can be used to connect media such as external storage media, peripheral devices such as other controllers, and wired communication connectors. By connecting, it is possible to communicate with the network instead of the wireless communication module 18. The memory card connector 21 is a connector for connecting an external storage medium such as a memory card. For example, the input / output processor 11a can access the external storage medium via the expansion connector 20 or the memory card connector 21, store data in the external storage medium, or read data from the external storage medium.
The game device 3 is provided with a power button 24, a reset button 25, and an eject button 26. The power button 24 and the reset button 25 are connected to the system LSI 11. When the power button 24 is turned on, power is supplied to each component of the game device 3 via an AC adapter (not shown). When the reset button 25 is pressed, the system LSI 11 restarts the start program of the game device 3. The eject button 26 is connected to the disk drive 14. When the eject button 26 is pressed, the optical disk 4 is ejected from the disk drive 14.
[Configuration of input device 8] Next, the input device 8 will be described with reference to FIGS. 3 to 6. FIG. 3 is a perspective view showing an external configuration of the input device 8. FIG. 4 is a perspective view showing the external configuration of the controller 5. FIG. 3 is a perspective view of the controller 5 viewed from the upper rear side, and FIG. 4 is a perspective view of the controller 5 viewed from the lower front side.
In FIGS. 3 and 4, the controller 5 has a housing 31 formed, for example, by plastic molding. The housing 31 has a substantially rectangular parallelepiped shape with its front-rear direction (Z-axis direction shown in FIG. 3) as the longitudinal direction, and has a size that can be gripped by one hand of an adult or a child as a whole. The player can operate the game by pressing a button provided on the controller 5 and moving the controller 5 itself to change its position and posture.
The housing 31 is provided with a plurality of operation buttons. As shown in FIG. 3, the upper surface of the housing 31 is provided with a cross button 32a, a first button 32b, a second button 32c, an A button 32d, a minus button 32e, a home button 32f, a plus button 32g, and a power button 32h. Be done. In the present specification, the upper surface of the housing 31 on which these buttons 32a to 32h are provided may be referred to as a button surface. On the other hand, as shown in FIG. 4, a recess is formed on the lower surface of the housing 31, and the B button 32i is provided on the inclined surface on the rear surface side of the recess. Functions corresponding to the game program executed by the game device 3 are appropriately assigned to each of these operation buttons 32a to 32i. The power button 32h is for remotely turning on / off the power of the game device 3 main unit. The upper surface of the home button 32f and the power button 32h is buried in the upper surface of the housing 31. This makes it possible to prevent the player from accidentally pressing the home button 32f or the power button 32h.
A connector 33 is provided on the rear surface of the housing 31. The connector 33 is used to connect another device (for example, a gyro sensor unit 7 or another controller) to the controller 5. Further, on both sides of the connector 33 on the rear surface of the housing 31, locking holes 33a are provided in order to prevent the other devices from being easily detached.
A plurality of LEDs 34a to 34d (four in FIG. 3) are provided behind the upper surface of the housing 31. Here, the controller 5 is assigned a controller type (number) to distinguish it from other main controllers. Each of the LEDs 34a to 34d is used for the purpose of notifying the player of the controller type currently set in the controller 5, or notifying the player of the remaining battery level of the controller 5. Specifically, when a game operation is performed using the controller 5, any one of the plurality of LEDs 34a to 34d lights up according to the controller type.
Further, the controller 5 has an imaging information calculation unit 35 (FIG. 6), and as shown in FIG. 4, a light incident surface 35a of the imaging information calculation unit 35 is provided on the front surface of the housing 31. The light incident surface 35a is made of a material that at least transmits infrared light from markers 6R and 6L.
A sound extraction hole 31a for emitting sound from the speaker 49 (FIG. 5) built in the controller 5 to the outside is formed between the first button 32b and the home button 32f on the upper surface of the housing 31.
Next, the internal structure of the controller 5 will be described with reference to FIGS. 5 and 6. 5 and 6 are diagrams showing the internal structure of the controller 5. Note that FIG. 5 is a perspective view showing a state in which the upper housing (a part of the housing 31) of the controller 5 is removed. FIG. 6 is a perspective view showing a state in which the lower housing (a part of the housing 31) of the controller 5 is removed. The perspective view shown in FIG. 6 is a perspective view of the substrate 30 shown in FIG. 5 as viewed from the back surface.
In FIG. 5, a substrate 30 is fixed inside the housing 31, and operation buttons 32a to 32h, LEDs 34a to 34d, an acceleration sensor 37, an antenna 45, and a speaker 49 are mounted on the upper main surface of the substrate 30. Etc. are provided. These are connected to a microcomputer 42 (see FIG. 6) by a wiring (not shown) formed on the substrate 30 or the like. In the present embodiment, the acceleration sensor 37 is arranged at a position deviated from the center of the controller 5 in the X-axis direction. This makes it easier to calculate the movement of the controller 5 when the controller 5 is rotated around the Z axis. Further, the acceleration sensor 37 is arranged in front of the center of the controller 5 in the longitudinal direction (Z-axis direction). In addition, the wireless module 44 (FIG. 6) and the antenna 45 allow the controller 5 to function as a wireless controller.
On the other hand, in FIG. 6, the imaging information calculation unit 35 is provided on the front end edge on the lower main surface of the substrate 30. The image pickup information calculation unit 35 includes an infrared filter 38, a lens 39, an image sensor 40, and an image processing circuit 41 in this order from the front of the controller 5. Each of these members 38 to 41 is attached to the lower main surface of the substrate 30.
Further, the microcomputer 42 and the vibrator 48 are provided on the lower main surface of the substrate 30. The vibrator 48 is, for example, a vibration motor or a solenoid, and is connected to the microcomputer 42 by wiring formed on the substrate 30 or the like. Vibration is generated in the controller 5 when the vibrator 48 is operated according to the instruction of the microcomputer 42. As a result, it is possible to realize a so-called vibration-compatible game in which the vibration is transmitted to the hand of the player holding the controller 5. In this embodiment, the vibrator 48 is arranged slightly forward of the housing 31. That is, by arranging the vibrator 48 closer to the end side than the center of the controller 5, the vibration of the vibrator 48 can vibrate the entire controller 5 significantly. Further, the connector 33 is attached to the trailing edge on the lower main surface of the substrate 30. In addition to those shown in FIGS. 5 and 6, the controller 5 includes a crystal oscillator that generates the basic clock of the microcomputer 42, an amplifier that outputs an audio signal to the speaker 49, and the like.
Further, the gyro sensor unit 7 has gyro sensors (gyro sensors 55 and 56 shown in FIG. 7) that detect angular velocities around three axes. The gyro sensor unit 7 is detachably attached to the connector 33 of the controller 5. At the front end of the gyro sensor unit 7 (the end on the positive side of the Z axis shown in FIG. 3), a plug (plug 53 shown in FIG. 7) that can be connected to the connector 33 is provided. Further, hooks (not shown) are provided on both sides of the plug 53. When the gyro sensor unit 7 is attached to the controller 5, the plug 53 is connected to the connector 33 and the hook is locked in the locking hole 33a of the controller 5. As a result, the controller 5 and the gyro sensor unit 7 are firmly fixed. Further, the gyro sensor unit 7 has a button 51 on the side surface (the surface in the X-axis direction shown in FIG. 3). The button 51 is configured so that the locked state of the hook with respect to the locking hole 33a can be released by pressing the button 51. Therefore, the gyro sensor unit 7 can be detached from the controller 5 by pulling out the plug 53 from the connector 33 while pressing the button 51.
Further, a connector having the same shape as the connector 33 is provided at the rear end of the gyro sensor unit 7. Therefore, other devices that can be attached to the controller 5 (connector 33) can also be attached to the connector of the gyro sensor unit 7. In FIG. 3, the cover 52 is detachably attached to the connector.
The shapes of the controller 5 and the gyro sensor unit 7 shown in FIGS. 3 to 6, the shape of each operation button, the number of acceleration sensors and vibrators, the installation position, etc. are merely examples, and other shapes, numbers, etc. The present invention can be realized even at the installation position. Further, in the present embodiment, the imaging direction by the imaging means is the Z-axis positive direction, but the imaging direction may be any direction. That is, the position of the image pickup information calculation unit 35 in the controller 5 (the light incident surface 35a of the image pickup information calculation unit 35) does not have to be the front surface of the housing 31, and if light can be taken in from the outside of the housing 31, it is another surface. It does not matter if it is provided in.
FIG. 7 is a block diagram showing the configuration of the input device 8 (controller 5 and gyro sensor unit 7). The controller 5 includes an operation unit 32 (each operation button 32a to 32i), a connector 33, an imaging information calculation unit 35, a communication unit 36, and an acceleration sensor 37. The controller 5 transmits data indicating the operation contents performed to the own machine to the game device 3 as operation data.
The operation unit 32 includes the above-mentioned operation buttons 32a to 32i, and transmits the operation button data indicating the input state (whether or not each operation button 32a to 32i is pressed) for each operation button 32a to 32i to the microcomputer of the communication unit 36. Output to 42.
The image pickup information calculation unit 35 is a system for analyzing image data captured by the image pickup means, discriminating a region having high brightness, and calculating the position of the center of gravity and the size of the region. Since the imaging information calculation unit 35 has a sampling cycle of, for example, a maximum of about 200 frames / second, it is possible to track and analyze even a relatively high-speed movement of the controller 5.
The image pickup information calculation unit 35 includes an infrared filter 38, a lens 39, an image sensor 40, and an image processing circuit 41. The infrared filter 38 allows only infrared rays to pass from light incident from the front of the controller 5. The lens 39 collects infrared rays that have passed through the infrared filter 38 and causes them to enter the image sensor 40. The image sensor 40 is a solid-state image sensor such as a CMOS sensor or a CCD sensor, and receives infrared rays collected by the lens 39 and outputs an image signal. Here, the markers 6R and 6L of the marker unit 6 arranged near the display screen of the television 2 are composed of infrared LEDs that output infrared light toward the front of the television 2. Therefore, by providing the infrared filter 38, the image sensor 40 receives only the infrared rays that have passed through the infrared filter 38 and generates image data, so that the images of the markers 6R and 6L can be captured more accurately. Hereinafter, the image captured by the image sensor 40 is referred to as an captured image. The image data generated by the image sensor 40 is processed by the image processing circuit 41. The image processing circuit 41 calculates the position of the image pickup target (markers 6R and 6L) in the captured image. The image processing circuit 41 outputs the coordinates indicating the calculated position to the microcomputer 42 of the communication unit 36. The data of these coordinates is transmitted to the game device 3 as operation data by the microcomputer 42. Hereinafter, the above coordinates are referred to as "marker coordinates". Since the marker coordinates change according to the orientation (tilt angle) and position of the controller 5 itself, the game device 3 can calculate the orientation and position of the controller 5 using the marker coordinates.
In another embodiment, the controller 5 may not have the image processing circuit 41, and the captured image itself may be transmitted from the controller 5 to the game device 3. At this time, the game device 3 has a circuit or a program having the same function as the image processing circuit 41, and the marker coordinates may be calculated.
The acceleration sensor 37 detects the acceleration of the controller 5 (including the gravitational acceleration), that is, detects the force applied to the controller 5 (including the gravitational acceleration). The acceleration sensor 37 detects the value of the acceleration in the linear direction (linear acceleration) along the sensing axial direction among the accelerations applied to the detection unit of the acceleration sensor 37. For example, in the case of a multi-axis acceleration sensor having two or more axes, the acceleration of a component along each axis is detected as the acceleration applied to the detection unit of the acceleration sensor. For example, the 3-axis or 2-axis accelerometer may be of the type available from Analog Devices, Inc. or ST Microelectronics NV. The acceleration sensor 37 is, for example, a capacitance type acceleration sensor, but another type of acceleration sensor may be used.
In the present embodiment, the acceleration sensor 37 has a vertical direction (Y-axis direction shown in FIG. 3), a left-right direction (X-axis direction shown in FIG. 3), and a front-rear direction (Z-axis direction shown in FIG. 3) with respect to the controller 5. ) Detects linear acceleration in each of the three axial directions. Since the acceleration sensor 37 detects the acceleration in the linear direction along each axis, the output from the acceleration sensor 37 represents the value of the linear acceleration of each of the three axes. That is, the detected acceleration is represented as a three-dimensional vector (ax, ay, az) in the XYZ coordinate system (controller coordinate system) set with reference to the input device 8 (controller 5). In the following, a vector having each acceleration value for each of the three axes detected by the acceleration sensor 37 as each component is referred to as an acceleration vector. Further, in the following, the acceleration vector may be referred to as a detected acceleration vector for the purpose of clearly distinguishing the acceleration vector from the motion acceleration vector described later.
The data (acceleration data) indicating the acceleration detected by the acceleration sensor 37 is output to the communication unit 36. Since the acceleration detected by the acceleration sensor 37 changes according to the direction (tilt angle) and movement of the controller 5 itself, the game device 3 can calculate the direction and movement of the controller 5 using the acceleration data. it can. In the present embodiment, the game device 3 determines the posture of the controller 5 based on the acceleration data.
The data (acceleration data) indicating the acceleration (acceleration vector) detected by the acceleration sensor 37 is output to the communication unit 36. In the present embodiment, the acceleration sensor 37 is used as a sensor that outputs data for determining the tilt angle of the controller 5.
Further information on the controller 5 is obtained by performing processing by a computer such as a processor of the game device 3 (for example, CPU 10) or a processor of the controller 5 (for example, the microcomputer 42) based on the acceleration signal output from the acceleration sensor 37. Can be easily inferred or calculated (determined) by those skilled in the art from the description herein. For example, when the processing on the computer side is executed on the assumption that the controller 5 equipped with the acceleration sensor 37 is in a stationary state (that is, the processing is executed assuming that the acceleration detected by the acceleration sensor is only the gravity acceleration). In the case), if the controller 5 is actually in a stationary state, it is possible to know whether or not the posture of the controller 5 is tilted with respect to the direction of gravity or how much it is tilted based on the detected acceleration. Specifically, when the detection axis of the acceleration sensor 37 is oriented vertically downward, whether or not the controller 5 is tilted with respect to the reference depending on whether or not 1G (gravitational acceleration) is applied. You can also know how much it is tilted with respect to the standard depending on its size. Further, in the case of the multi-axis acceleration sensor 37, by further processing the acceleration signal of each axis, it is possible to know in more detail how much the controller 5 is tilted with respect to the direction of gravity. .. In this case, the processor may calculate the tilt angle of the controller 5 based on the output from the acceleration sensor 37, or may calculate the tilt direction of the controller 5 without calculating the tilt angle. Good. In this way, by using the acceleration sensor 37 in combination with the processor, it is possible to determine the tilt angle or the posture of the controller 5.
On the other hand, assuming that the controller 5 is in a dynamic state (the state in which the controller 5 is moving), the acceleration sensor 37 detects the acceleration according to the movement of the controller 5 in addition to the gravitational acceleration. Therefore, the movement direction of the controller 5 can be known by removing the component of the gravitational acceleration from the detected acceleration by a predetermined process. Further, even when it is assumed that the controller 5 is in a dynamic state, the gravity direction is obtained by removing the component of the acceleration corresponding to the movement of the acceleration sensor from the detected acceleration by a predetermined process. It is possible to know the inclination of the controller 5 with respect to. In another embodiment, the acceleration sensor 37 is a built-in process for performing a predetermined process on the acceleration signal before outputting the acceleration signal detected by the built-in acceleration detection means to the microcomputer 42. It may be equipped with an apparatus or other type of dedicated processing apparatus. A built-in or dedicated processor, for example, converts an acceleration signal into a tilt angle (or other preferred parameter) when the accelerometer 37 is used to detect static acceleration (eg, gravitational acceleration). It may be a thing.
The communication unit 36 includes a microcomputer 42, a memory 43, a wireless module 44, and an antenna 45. The microcomputer 42 controls the wireless module 44 that wirelessly transmits the data acquired by the microcomputer 42 to the game device 3 while using the memory 43 as a storage area during processing. Further, the microcomputer 42 is connected to the connector 33. The data transmitted from the gyro sensor unit 7 is input to the microcomputer 42 via the connector 33. Hereinafter, the configuration of the gyro sensor unit 7 will be described.
The gyro sensor unit 7 includes a plug 53, a microcomputer 54, a 2-axis gyro sensor 55, and a 1-axis gyro sensor 56. As described above, the gyro sensor unit 7 detects the angular velocity around the three axes (XYZ axes in this embodiment), and transmits data (angular velocity data) indicating the detected angular velocity to the controller 5.
The 2-axis gyro sensor 55 detects the angular velocity around the X-axis and the angular velocity (per unit time) around the Y-axis. The 1-axis gyro sensor 56 also detects the angular velocity (per unit time) around the Z-axis. In this specification, the rotation directions around the XYZ axes are referred to as roll direction, pitch direction, and yaw direction, respectively, with reference to the image pickup direction (Z-axis positive direction) of the controller 5. That is, the 2-axis gyro sensor 55 detects the angular velocities in the roll direction (rotation direction around the X-axis) and the pitch direction (rotation direction around the Y-axis), and the 1-axis gyro sensor 56 detects the angular velocity in the yaw direction (around the Z-axis). Detects the angular velocity in the direction of rotation).
In the present embodiment, the 2-axis gyro sensor 55 and the 1-axis gyro sensor 56 are used in order to detect the angular velocity around the 3-axis, but in other embodiments, the angular velocity around the 3-axis is used. Any number and combination of gyro sensors may be used as long as they can be detected.
Further, in the present embodiment, for the purpose of facilitating the calculation in the attitude calculation process described later, the three axes in which the gyro sensors 55 and 56 detect the angular velocity are the three axes in which the acceleration sensor 37 detects the acceleration (XYZ). Axis) is set to match. However, in other embodiments, the three axes on which the gyro sensors 56 and 57 detect the angular velocity do not have to coincide with the three axes on which the accelerometer 37 detects the acceleration.
The data indicating the angular velocity detected by the gyro sensors 56 and 57 is output to the microcomputer 54. Therefore, data indicating the angular velocity around the three axes of the XYZ axes is input to the microcomputer 54. The microcomputer 54 transmits data indicating the angular velocities around the three axes as angular velocity data to the controller 5 via the plug 53. The transmission from the microcomputer 54 to the controller 5 is sequentially performed at predetermined intervals, but the game processing is generally performed in units of 1/60 seconds (as one frame time), so this time. It is preferable to perform transmission in the following cycle.
Returning to the explanation of the controller 5, the data output from the operation unit 32, the imaging information calculation unit 35, and the acceleration sensor 37 to the microcomputer 42, and the data transmitted from the gyro sensor unit 7 to the microcomputer 42 are temporarily stored. Stored in memory 43. These data are transmitted to the game device 3 as the operation data. That is, when the transmission timing of the game device 3 to the wireless controller module 19 arrives, the microcomputer 42 outputs the operation data stored in the memory 43 to the wireless module 44. The wireless module 44 modulates a carrier wave having a predetermined frequency with operation data using, for example, Bluetooth (registered trademark) technology, and radiates a weak radio signal from the antenna 45. That is, the operation data is modulated into a weak radio wave signal by the wireless module 44 and transmitted from the controller 5. The weak radio signal is received by the wireless controller module 19 on the game device 3 side. The game device 3 can acquire operation data by demodulating or decoding the received weak radio wave signal. Then, the CPU 10 of the game device 3 performs game processing based on the acquired operation data and the game program. The wireless transmission from the communication unit 36 to the wireless controller module 19 is sequentially performed at predetermined intervals, but the game processing is generally performed in units of 1/60 seconds (as one frame time). Therefore, it is preferable to perform transmission at a cycle of this time or less. The communication unit 36 of the controller 5 outputs each operation data to the wireless controller module 19 of the game device 3 at a rate of once every 1/200 second, for example.
By using the controller 5, the player can perform an operation of tilting the controller 5 to an arbitrary tilt angle in addition to the conventional general game operation of pressing each operation button. In addition, according to the controller 5, the player can also perform an operation of instructing an arbitrary position on the screen by the controller 5 and an operation of moving the controller 5 itself.
[Overview of posture calculation process] Next, an outline of the posture calculation process for calculating the posture of the input device 8 executed in the game device 3 will be described. In the present embodiment, it is assumed that the input device 8 is used to perform a game operation of rowing a canoe. That is, in the present embodiment, the game device 3 moves the paddle in the virtual game space by the player using the input device 8 like a paddle and moving the input device 8 as if scratching water with the paddle. The game of paddling a canoe shall be executed. More specifically, the game device 3 calculates the posture of the input device 8 and changes the posture of the paddle in the game space according to the posture of the input device 8.
In the present embodiment, the game device 3 acquires operation data from the input device 8 including the gyro sensors 55 and 56, the acceleration sensor 37, and the image pickup means (image sensor 40), and calculates the posture of the input device 8. To do. In the present embodiment, the input device 8 includes the gyro sensors 55 and 56, the acceleration sensor 37, and the image sensor 40, but in other embodiments, the gyro sensor and the acceleration sensor are at least included. Any configuration may be provided.
The game device 3 calculates the posture of the input device 8 based on the angular velocity detected by the gyro sensors 55 and 56. Hereinafter, the posture of the input device 8 calculated based on the angular velocity is referred to as a first posture. The first attitude may differ from the actual attitude due to errors in the detection results of the gyro sensors 55 and 56. Therefore, in the present embodiment, the game device 3 corrects the first posture by using the acceleration detected by the acceleration sensor 37. Further, the first posture is corrected by using the image (captured image) captured by the image sensor 40.
Hereinafter, the outline of the correction process using the acceleration detected by the acceleration sensor 37 will be described with reference to FIGS. 8 to 12. The game device 3 can calculate the posture of the input device 8 from the angular velocities detected by the gyro sensors 55 and 56, and can also calculate the posture of the input device 8 from the acceleration detected by the acceleration sensor 37. That is, since the acceleration sensor 37 detects the gravitational acceleration applied to the input device 8 (the acceleration detected by the acceleration sensor 37 includes the gravitational acceleration), the game device 3 uses the detected acceleration to input the input device. The direction of gravity with respect to 8, that is, the inclination (attitude) of the input device 8 with respect to the direction of gravity can be calculated. Hereinafter, the posture calculated based on the acceleration detected by the acceleration sensor 37 is referred to as a second posture. In the present embodiment, the first posture based on the angular velocity is corrected by using the gravity direction (second posture) calculated from the acceleration.
Here, in the present embodiment, the game device 3 performs two types of correction processes, a static correction process and a dynamic correction process, as the correction using the acceleration. The static correction process is a correction process for the purpose of correcting the first posture of the input device 8 when the input device 8 is mainly stationary or close to a stationary state. The dynamic correction process is a correction process for the purpose of correcting the first posture of the input device 8 when the input device 8 is mainly moving. In the present embodiment, by performing two types of corrections, static correction processing and dynamic correction processing, correction using acceleration is performed in both the case where the input device 8 is stationary and the case where the input device 8 is moving. Is possible. The outline of the static correction process and the dynamic correction process will be described below.
First, the static correction process will be described with reference to FIGS. 8 and 9. FIG. 8 is a diagram showing a gravity vector and a detected acceleration vector with respect to the input device 8. The gravity vector Vg shown in FIG. 8 represents the direction of gravity (as viewed from the input device 8) with respect to the input device 8. Since the gravitational direction is the vertical downward direction set in the space, if the first attitude is calculated based on the above angular velocity, the gravitational direction with reference to the input device 8 can be calculated corresponding to the attitude. .. The detected acceleration vector Va shown in FIG. 8 represents the direction of the acceleration detected by the acceleration sensor 37. The vector Vz shown in FIG. 8 is a vector representing the positive direction of the Z axis in the controller coordinate system (XYZ coordinate system) of the input device 8, that is, the posture of the input device 8.
In FIG. 8, when the input device 8 is stationary or almost stationary, it can be inferred that the detected acceleration vector Va represents the direction of gravity. Therefore, in this case, the game device 3 corrects the gravity vector Vg calculated from the angular velocity by using the detected acceleration vector Va that is presumed to represent the direction of gravity more accurately. FIG. 9 is a diagram showing the correction of the gravity vector Vg in the static correction process. In FIG. 9, the vector Vg shows the gravity vector before correction, and the vector Vg'shows the gravity vector after correction. As shown in FIG. 9, in the present embodiment, the gravity vector Vg before correction is corrected in a direction approaching the detected acceleration vector Va. As a result, the gravity vector is corrected so as to represent the direction of gravity more accurately, and the attitude can be calculated accurately by correcting the first attitude of the input device 8 using the corrected gravity vector. Can be done.
Although the details will be described later, the degree to which the gravity vector Vg approaches the detected acceleration vector Va in the static correction process increases as the input device 8 approaches the stationary state. That is, in the present embodiment, the more reliable the detected acceleration vector Va is as representing the direction of gravity, the closer the gravity vector Vg is to the detected acceleration vector Va. According to this, the posture of the input device 8 can be calculated more accurately. Further, in the present embodiment, when the input device 8 is far from the stationary state (moved violently), the correction in the static correction process is not performed. This also makes it possible to calculate the posture of the input device 8 more accurately.
When the input device 8 is stationary or almost stationary, the acceleration detected by the acceleration sensor 37 includes only the gravitational acceleration, so the gravitational direction is accurately calculated by the above static correction process. can do. On the other hand, when the input device 8 is moved by the player, not only the gravitational acceleration but also the acceleration caused by the movement of the input device 8 is detected by the acceleration sensor 37. For example, the acceleration detected by the acceleration sensor 37 includes an acceleration due to an inertial force such as a centrifugal force. Therefore, when the input device 8 is moving, the gravitational direction cannot be accurately determined even if the output of the acceleration sensor 37 is used as it is, and the gravitational direction can be accurately calculated by the above static correction process. It may not be possible. Further, it is also conceivable to prevent the static correction process from being executed when the input device 8 is moving. However, in this method, when it is assumed that the player constantly moves the input device 8 to operate the game, as in the case of the canoe game, the static correction process is likely to be executed. Therefore, the correction process in the direction of gravity will not be executed. As a result, the posture of the input device 8 cannot be calculated accurately. As described above, there is a possibility that the static correction process alone cannot cope with the case where the input device 8 is moving. Therefore, in the present embodiment, the dynamic correction process is performed in addition to the static correction process so that the correction process in the direction of gravity can be performed even when the input device 8 is moving. Hereinafter, the dynamic correction process will be described with reference to FIGS. 10 to 12.
FIG. 10 is a diagram showing a gravity vector, a detected acceleration vector, and a motion acceleration vector with respect to the input device 8. The motion acceleration vector VA shown in FIG. 10 is a vector representing the motion acceleration of the input device 8. Here, the "motion acceleration" is the acceleration applied to the input device 8 by the motion of the input device 8, and the acceleration due to the centrifugal force generated when the input device 8 is performing a rotational motion or the input device 8 Includes acceleration due to inertial force that occurs when moving with a change in velocity. The motion acceleration vector VA is calculated as an acceleration vector obtained by excluding the gravitational acceleration from the acceleration detected by the acceleration sensor 37. That is, the motion acceleration vector VA is a vector obtained by subtracting the gravity vector Vg from the detected acceleration vector Va. Thus, the motion acceleration vector VA is a vector determined from the gravity vector Vg. Since the gravity vector Vg is calculated from the first posture based on the angular velocity, the motion acceleration vector VA is compared with the actual value due to erroneous detection of the gyro sensors 55 and 56, as in the case of the gravity vector Vg. There is a risk of error.
FIG. 11 is a diagram showing an angular velocity vector and a motion acceleration vector with respect to the input device 8. The angular velocity vector Vω shown in FIG. 11 represents the rotation axis when the input device 8 rotates at the angular velocity detected by the gyro sensors 55 and 56, and can be obtained from the detection results of the gyro sensors 55 and 56. Here, when the input device 8 performs a specific motion, a predetermined relationship is established between the angular velocity detected by the gyro sensors 55 and 56 and the motion acceleration. Here, when the player moves the input device 8 so as to scratch water with a paddle as in the present embodiment, it is considered that the input device 8 performs a rotational motion around a predetermined position. Since the motion for moving the input device 8 is often a rotational motion centered on the joints of the player's elbow, shoulder, etc., it can be regarded as a rotational motion (although not always a rotational motion, at least one). Rotational movement is performed during the period of the club). Although the details will be described later, when the input device 8 performs rotational motion at, for example, an angular velocity, a relationship is established in which the rotation axis (angular velocity vector Vω) corresponding to the angular velocity and the motion acceleration of the input device 8 are orthogonal to each other. Therefore, in FIG. 11, it is estimated that the motion acceleration should be perpendicular to the angular velocity vector Vω, as in the vector VA'. For example, the input device 8 performs a rotational motion in which the positive direction of the Y-axis of the controller coordinate system is vertically upward, and the axis parallel to the Y-axis direction is used as the rotation axis to rotate and move in the negative direction of the X-axis. Assuming that (see the arrows shown in FIGS. 10 to 12), the motion acceleration is estimated to be in the direction perpendicular to the Y-axis direction as in the vector VA'.
In the dynamic correction process, the game device 3 corrects the gravity vector Vg using the above estimation. FIG. 12 is a diagram showing the correction of the gravity vector in the dynamic correction process. As shown in FIG. 12, the game device 3 brings the motion acceleration vector VA closer to the motion acceleration (vector VA') that satisfies the above relationship with respect to the current angular velocity of the input device 8 (the angular velocity vector Vω shown in FIG. 11). Correct the gravity vector Vg in the direction. In other words, in the dynamic correction process, the motion acceleration (vector VA) calculated from the detected acceleration vector Va, which is the detection result of the acceleration sensor 37, is determined from the angular velocity vector Vω, which is the detection result of the gyro sensors 55 and 56. The gravity vector Vg is corrected so that it approaches the motion acceleration (vector VA').
As described above, in the dynamic correction process, assuming that the input device 8 performs a specific motion (here, a rotational motion having an equal angular velocity), the relationship between the angular velocity and the motion acceleration (here, the motion acceleration) in the case of performing the motion. The relationship (relationship that the motion acceleration vector VA is perpendicular to the angular velocity vector Vω) is defined in advance. Then, the gravity vector Vg, which is the calculation source of the motion acceleration vector VA, is corrected so that the motion acceleration vector VA satisfies the relationship. As a result, even when the input device 8 is being moved, the direction of gravity can be corrected using the acceleration detected by the acceleration sensor 37.
Further, in the present embodiment, the game device 3 corrects the first posture of the input device 8 by using the gravity vector Vg corrected by the static correction process and the dynamic correction process. That is, the first posture is corrected to approach the posture (second posture) corresponding to the gravity vector Vg corrected by the static correction processing and the dynamic correction processing. According to the present embodiment, the gravity vector is corrected and corrected by the static correction process when the input device 8 is stationary and by the dynamic correction process when the input device 8 is moving. The gravitational vector is used to correct the first attitude. Therefore, the first posture of the input device 8 can be corrected regardless of whether the input device 8 is stationary or moving, and the posture of the input device 8 can be calculated accurately. Further, in the present embodiment, since the posture can be corrected even when the input device 8 is moved, it is particularly effective when an operation in which the player constantly moves the input device 8 is assumed.
In the present embodiment, after the correction process using the acceleration detected by the acceleration sensor 37, the correction process using the image (image taken) captured by the image sensor 40 is executed. In the correction process using the captured image, the game device 3 first calculates the posture of the input device 8 based on the captured image. That is, the posture of the input device 8 is calculated from the position (marker coordinates) of the marker image in the captured image. Hereinafter, the posture of the input device 8 calculated based on the captured image is referred to as a third posture. Next, the game device 3 corrects the first posture based on the angular velocity to approach the third posture calculated from the captured image. Further, in the present embodiment, the game device 3 performs the correction process based on the acceleration first and the correction process based on the captured image later, but in other embodiments, the correction process based on the acceleration is performed. Either of the correction processing based on the captured image may be performed first.
As described above, according to the present embodiment, the first posture of the input device 8 calculated from the angular velocities detected by the gyro sensors 55 and 56 is corrected by using the acceleration detected by the acceleration sensor 37. Further, the correction is performed using the image captured by the imaging means. As a result, the posture error calculated from the gyro sensor can be reduced, and the posture of the input device 8 can be calculated more accurately.
Since the rotation around the gravity direction (rotation in the yaw direction) cannot be detected from the detection result of the acceleration sensor 37, the correction process based on the acceleration cannot correct the yaw direction. However, the correction process based on the acceleration has a feature that it can be performed regardless of the posture of the input device 8 (because the acceleration can always be detected). On the other hand, since the marker coordinates are not detected unless the marker unit 6 is present in the imaging direction of the input device 8, the correction process based on the captured image cannot be performed depending on the posture of the input device 8. However, the correction process based on the captured image has a feature that the posture (particularly the posture in the roll direction) can be calculated accurately. In the present embodiment, the posture of the input device 8 can be calculated more accurately by performing the two types of corrections having different features in this way.
In another embodiment, the game device 3 does not have to execute the correction process using the captured image. In this case, the input device 8 may be configured not to include the image pickup information calculation unit 35.
[Details of processing in game device 3] Next, the details of the processing executed in the game device 3 will be described. First, the main data used in the processing in the game device 3 will be described with reference to FIG. FIG. 13 is a diagram showing main data stored in the main memory (external main memory 12 or internal main memory 11e) of the game device 3. As shown in FIG. 13, the game program 60, the operation data 62, and the game processing data 67 are stored in the main memory of the game device 3. In addition to the data shown in FIG. 13, the main memory stores data necessary for game processing, such as image data of various objects appearing in the game and data indicating various parameters of the objects.
A part or all of the game program 60 is read from the optical disk 4 at an appropriate timing after the power is turned on to the game device 3, and is stored in the main memory. The game program 60 includes a posture calculation program 61. The posture calculation program 61 is a program for executing a posture calculation process for calculating the posture of the input device 8.
The operation data 62 is operation data transmitted from the controller 5 to the game device 3. As described above, since the operation data is transmitted from the controller 5 to the game device 3 at a rate of once every 1/200 seconds, the operation data 62 stored in the main memory is updated at this rate.
The operation data 62 includes angular velocity data 63, acceleration data 64, marker coordinate data 65, and operation button data 66. The angular velocity data 63 is data indicating the angular velocity detected by the gyro sensors 55 and 56 of the gyro sensor unit 7. Here, the angular velocity data 63 shows the respective angular velocities around the three axes of the XYZ coordinate system shown in FIG. Expressing the magnitude of each of the angular velocities (clockwise) around the three axes as a three-dimensional vector, the angular velocity data 63 points in the direction perpendicular to the rotation plane (more specifically, the right-hand screw is in the direction of the angular velocity). (Directing the direction of travel of the right-hand screw when rotated), the magnitude of which indicates the angular velocity vector Vω, which represents the magnitude of the angular velocity ω. In the present embodiment, in order to calculate the angular acceleration of the input device 8, the angular velocity data included in the operation data acquired before the last acquired operation data is stored in the main memory as the angular velocity history data. ..
The acceleration data 64 is data indicating the acceleration (detected acceleration vector) detected by the acceleration sensor 37. Here, the acceleration data 64 shows a three-dimensional acceleration vector whose components are accelerations related to the directions of the three axes of XYZ shown in FIG. Further, in the present embodiment, the magnitude of the acceleration vector detected by the acceleration sensor 37 while the controller 5 is stationary is set to 1. That is, the magnitude of the gravitational acceleration detected by the acceleration sensor 37 is 1.
The marker coordinate data 65 is the coordinates calculated by the image processing circuit 41 of the imaging information calculation unit 35, that is, the data indicating the marker coordinates. The marker coordinates are represented by a two-dimensional coordinate system (x'y' coordinate system shown in FIG. 17) for representing a position on a plane corresponding to a captured image. When two markers 6R and 6L are imaged by the image sensor 40, the coordinates of the two markers are calculated. On the other hand, when either one of the markers 6R and 6L is not located within the image pickup range of the image sensor 40, only one marker is imaged by the image sensor 40 and only one marker coordinate is calculated. Further, when both the markers 6R and 6L are not located within the image pickup range of the image sensor 40, the marker is not imaged by the image sensor 40 and the marker coordinates are not calculated. Therefore, the marker coordinate data 65 may indicate two marker coordinates, one marker coordinate, or no marker coordinate.
The operation button data 66 is data indicating an input state for each of the operation buttons 32a to 32i.
The game processing data 67 is data used in the game processing (FIG. 14) described later. The game processing data 67 includes first posture data 68, gravity direction data 69, acceleration magnitude data 70, acceleration data 71, first correction degree data 72, second correction degree data 73, motion acceleration data 74, and gravity correction. Includes vector data 75, correction matrix data 76, roll attitude component data 77, yaw attitude component data 78, pitch attitude component data 79, and third attitude data 80. In addition to the data shown in FIG. 13, the game processing data 67 includes various data (data indicating game parameters, etc.) used in the game processing.
The first attitude data 68 is data indicating the first attitude of the input device 8 calculated using the angular velocity data 63. In the present embodiment, the posture of the input device 8 is represented by the 3 × 3 matrix M1 shown in the following equation (1).<maths num="1"><img file="JP5455191B2_D0001.tif" /></maths> The matrix M1 is a rotation matrix representing rotation from a predetermined reference posture to the current posture of the input device 8. Hereinafter, the matrix M1 indicating the first posture is referred to as a "first posture matrix M1". The posture represented by the first posture matrix M1 is a posture in the xyz coordinate system (the above space coordinate system) with reference to a predetermined position in the space where the input device 8 exists. Here, the xyz coordinate system assumes that the input device 8 is located in front of the marker unit 6, the direction from the position of the input device 8 toward the marker unit 6 is the z-axis positive direction, and the direction is vertically upward (in the direction of gravity). It is assumed that the coordinate system is such that the (reverse direction) is the y-axis positive direction and the left direction when the marker unit 6 is directed from the position of the input device 8 is the x-axis positive direction. Further, the predetermined reference posture is a posture in which the imaging direction of the input device 8 located in front of the marker unit 6 faces the center of the marker unit 6 and the button surface of the controller 5 faces vertically upward (that is, the input device). It is assumed that the X-axis, Y-axis, and Z-axis with reference to 8 are in the same posture as the x-axis, y-axis, and z-axis directions, respectively). Therefore, the rotation matrix M1 is also an arrangement of unit vectors indicating the directions of the X-axis, Y-axis, and Z-axis of the input device 8 in the xyz coordinate system. In the present embodiment, the posture of the input device 8 is expressed by using a matrix, but in other embodiments, the posture of the input device 8 is expressed by a cubic vector or three angles. May be good.
The gravity direction data 69 is data indicating the gravity direction seen from the input device 8, that is, the gravity vector Vg. The gravity vector Vg is a unit vector representing a direction in the controller coordinate system (XYZ coordinate system).
The acceleration magnitude data 70 is data indicating the magnitude (length) L of the detected acceleration vector Va indicated by the acceleration data 64.
The jerk data 71 is data indicating the amount of change (jerk) J of the acceleration of the input device 8 per unit time. In the present embodiment, the jerk is calculated as the difference between the last calculated motion acceleration vector and the previously calculated motion acceleration vector. The jerk can be calculated as a three-dimensional vector, but since only the magnitude of the jerk is used in this embodiment, the jerk data 71 shows a scalar amount indicating the magnitude of the jerk. The jerk data 71 is used to calculate the first correction degree A and the second correction degree B, which will be described later.
The first correction degree data 72 is data indicating the degree to which the gravity vector Vg is corrected by the static correction process (first correction degree A). The second correction degree data 73 indicates the degree to which the gravity vector Vg is corrected by the dynamic correction process (second correction degree B). Details will be described later, but the larger the value of each correction degree, the larger the correction amount.
The motion acceleration data 74 is data showing the motion acceleration vector VA. The motion acceleration vector VA, like the gravity vector Vg, is a vector representing a direction in the controller coordinate system (XYZ coordinate system). The motion acceleration vector VA is calculated based on the acceleration data 64 and the gravity direction data 69.
The gravity correction vector data 75 is data indicating the gravity correction vector ΔVg used for correcting the gravity vector in the above dynamic correction process. The details will be described later, but the gravity vector after correction by the dynamic correction process faces the direction in which the gravity correction vector ΔVg is added to the gravity vector before correction.
The correction matrix data 76 is data indicating the correction matrix Ma. The correction matrix Ma is a rotation matrix used to correct the first posture of the input device 8 in the correction process based on the acceleration. That is, in the correction process, the first posture is corrected by multiplying the first posture matrix M1 by the correction matrix Ma.
The roll posture component data 77 is data indicating the posture component (roll posture component) M3r related to the roll direction among the posture components included in the third posture of the input device 8 calculated from the captured image. Further, the yaw posture component data 78 is data indicating the posture component (yaw posture component) M3y related to the yaw direction among the posture components included in the third posture, and the pitch posture component data 79 is the third third posture. This is data showing the posture component (pitch posture component) M3p related to the pitch direction among the posture components included in the posture. The roll direction, yaw direction, and pitch direction referred to here are rotation directions when the image pickup direction (Z-axis positive direction) of the input device 8 is used as a reference. In the present embodiment, each posture component M3r, M3y, and M3p is represented by a 3 × 3 matrix similar to the posture shown by the first posture data 68.
The third posture data 80 is data indicating the third posture. In the present embodiment, the third posture is represented by a 3 × 3 matrix M3 as in the first posture. In the correction process of step S6 described later, the matrix M3 is used to correct the first attitude matrix M1. Hereinafter, the matrix M3 representing the third posture is referred to as a "third posture matrix M3". In the present embodiment, since the marker coordinate data is transmitted from the input device 8 as operation data, the third attitude matrix M3 is calculated based on the marker coordinate data 65. Specifically, the third attitude matrix M3 is obtained by synthesizing the above-mentioned attitude components M3r, M3y, and M3p.
Next, the details of the processing performed in the game device 3 will be described with reference to FIGS. 14 to 17. FIG. 14 is a main flowchart showing the flow of processing executed in the game device 3. When the power of the game device 3 is turned on, the CPU 10 of the game device 3 executes a boot program stored in a boot ROM (not shown), thereby initializing each unit such as the main memory. Then, the game program stored in the optical disk 4 is read into the main memory, and the CPU 10 starts executing the game program. The flowchart shown in FIG. 14 is a flowchart showing the processing performed after the above processing is completed.
First, in step S1, the CPU 10 executes an initialization process related to the game. In this initialization process, the values of various parameters used in the game process are initialized, a virtual game space is constructed, and a player object and other objects are arranged at initial positions in the game space. The process of step S2 is executed after the above step S1.
In step S2, the CPU 10 executes the initial posture setting process. Specifically, a predetermined value is set as the initial posture of the input device 8 according to the player performing a predetermined operation (for example, an operation of pressing the A button 32d). Here, the reference posture is such that the Z axis is parallel to the vertical direction and the imaging direction of the input device 8 faces the center of the marker unit 6 (the center of the markers 6R and 6L). It is desirable to perform the above-mentioned predetermined operation while holding the input device 8 so that the initial posture becomes the above-mentioned reference posture, but if the input device is close to a stationary state and the marker portion can be imaged. It is possible to calculate the initial posture. When a predetermined operation is performed, the CPU 10 stores data indicating the matrix representing the initial posture as the first posture data 68 in the main memory. The gravitational direction data is the data showing the gravitational direction (0, -1,0) in the spatial coordinate system, which is the gravitational vector at this point, and the vector (-Xy, -Yy, -Zy) expressed in the controller coordinate system. Store as 69 in the main memory. After the above step S2, the processing loops of steps S3 to S8 are repeatedly executed while the game is executed. It should be noted that one processing loop is executed once in one frame time (for example, 1/60 second).
In the present embodiment, the initial posture setting process (step S2) is executed only once before the game starts (before the processing loops in steps S3 to S8 are executed), but other implementations are performed. In the form, the initial posture setting process may be executed at an arbitrary timing in the game. That is, the CPU 10 may execute the initial posture setting process in response to the player performing the above-mentioned predetermined operation during the game.
In step S3, the CPU 10 acquires the operation data. That is, the operation data transmitted from the controller 5 is received via the wireless controller module 19. Then, the angular velocity data, the acceleration data, the marker coordinate data, and the operation button data included in the received operation data are stored in the main memory. The process of step S4 is executed after step S3.
In step S4, the CPU 10 calculates the first attitude (first attitude matrix M1) of the input device 8 based on the angular velocity data 63 stored in the main memory. Any method may be used to calculate the first posture from the angular velocity, but in the present embodiment, the first posture is the first posture of the previous input device 8 (previous step S3 ~. It is calculated using the attitude calculated in the processing loop of S8) and the current angular velocity (angular velocity acquired in the current processing loop). Specifically, the CPU 10 reads the angular velocity data 63 and the first attitude data 68 stored in the main memory, and obtains the previous attitude indicated by the first attitude data 68 and the current angular velocity indicated by the angular velocity data 63. get. Then, the posture in which the previous posture is rotated by the unit time at the current angular velocity is set as the new first posture. The data indicating the posture (3 × 3 matrix) calculated in step S4 is newly stored in the main memory as the first posture data 68. The process of step S5 is executed after the above step S4.
In step S5, the CPU 10 executes a correction process based on the acceleration. The correction process based on the acceleration is a process of correcting the first posture of the input device 8 using the acceleration data. Hereinafter, the details of the correction process based on the acceleration will be described with reference to FIG.
FIG. 15 is a flowchart showing the flow of the correction process (step S5) based on the acceleration shown in FIG. In the correction process based on acceleration, the CPU 10 first calculates the gravity vector Vg in step S11. The gravity vector Vg is calculated based on the gravity vector calculated in the processing loop of the previous steps S3 to S8 and the angular velocity acquired in the processing loop of the current steps S3 to S8. Specifically, the CPU 10 reads the angular velocity data 63 and the gravity direction data 69 stored in the main memory, and acquires the current angular velocity indicated by the angular velocity data 63 and the previous gravity vector indicated by the gravity direction data 69. To do. Then, a new gravity vector Vg is calculated by rotating the previous gravity vector in the direction opposite to the rotation direction of the current angular velocity for a unit time. The newly calculated data indicating the gravity vector Vg is stored in the main memory as new gravity direction data 69. The process of step S12 is executed after the above step S11.
In the present embodiment, the posture of the input device 8 is represented by the spatial coordinate system, whereas the gravity vector is represented by the controller coordinate system, so that the posture of the input device 8 in the spatial coordinate system changes. By doing so, the direction of the gravity vector in the spatial coordinate system changes. That is, when a new posture is calculated and the posture changes in the above step S4 in the current processing loop, the gravity vector (which does not actually change) also changes according to the change in the posture. The process of step S11 is a process for canceling a change in the gravity vector due to a change in the posture of the input device 8 in order to correctly represent the gravity vector.
In step S12, CPU 10 executes static correction processing. This is a correction process for correcting the first posture of the input device 8 when the input device 8 is mainly stationary (or close to a stationary state). Hereinafter, the details of the static correction process will be described with reference to FIG.
FIG. 16 is a flowchart showing the flow of the static correction process (step S12) shown in FIG. In the static correction process, first, in step S21, the CPU 10 calculates the magnitude L of the acceleration detected by the acceleration sensor 37. That is, the acceleration data 64 stored in the main memory is read out, and the magnitude L is calculated for the detected acceleration vector Va indicated by the acceleration data 64. The calculated data indicating the magnitude L is stored in the main memory as the acceleration magnitude data 70. The process of step S22 is executed after step S21.
In step S22, the CPU 10 calculates the first correction degree A indicating the degree of correction of the posture of the input device 8 in the static correction processing. The first correction degree A is calculated based on the magnitude L of the detection acceleration vector Va calculated in step S21. Specifically, the CPU 10 reads the acceleration magnitude data 70 stored in the main memory. Then, the first correction degree A is calculated according to the following equation (2) using the magnitude L indicated by the acceleration magnitude data 70. When 0 | L-1 | R, A = 1-(| L-1 | / R) When R <| L-1 |, A = 0 ... (2) In the above equation (2), the constant R is predetermined and is set to, for example, R = 0.4. The above equation (2) is an equation for calculating the first correction degree A so that the magnitude L of the detected acceleration vector Va becomes larger as it approaches the magnitude (= 1) of the gravitational acceleration. That is, according to the above equation (2), the closer the magnitude L of the detected acceleration vector Va is to the magnitude of the gravitational acceleration, the larger the correction amount of the gravitational vector. In other embodiments, the squared value of A calculated by the above equation (2) is used as the first correction degree so that the closer the size L is to 1, the larger the weight is attached. You may. The data indicating the first correction degree A calculated by the above equation (2) is stored in the main memory as the first correction degree data 72. The first correction degree A calculated in step S22 is not the final value but a value during calculation, and the value is corrected in subsequent steps S23 to S26 to make the final first correction. The value of degree A is obtained. The process of step S23 is executed after step S22.
Here, in the state where the input device 8 is moved, the acceleration sensor 37 detects the acceleration due to the inertia generated by the movement of the input device 8 in addition to the gravitational acceleration. Therefore, when the input device 8 is moved, the magnitude L of the detected acceleration vector Va becomes a value different from 1, and the above difference tends to be larger when the input device 8 is moved violently. .. Further, when the input device 8 is violently moved, the detected acceleration vector Va contains many components other than the gravitational acceleration (the component of the acceleration due to the above inertia), so that the detected acceleration vector Va determines the direction of gravity. It is presumed that the value shown is unreliable. That is, it is considered that the larger the difference is, the more unreliable the detected acceleration vector Va is.
Therefore, in the present embodiment, in step S22, the closer the magnitude L of the detected acceleration vector Va is to the magnitude (= 1) of the gravitational acceleration, the larger the correction amount of the gravitational vector is. Further, the correction is performed only when the difference between the magnitude L of the detected acceleration vector and the magnitude of the gravitational acceleration is smaller than the predetermined reference (predetermined value R). According to this, the gravity vector has a value closer to the detected acceleration vector Va as the detected acceleration vector Va is reliable, and the correction is not performed when the value of the detected acceleration vector Va is unreliable. As described above, according to the present embodiment, the correction amount is determined according to the reliability of the detected acceleration vector Va, so that the correction amount of the gravity vector Vg can be appropriately determined according to the reliability. As a result, the game device 3 can accurately calculate the direction of gravity, and the posture of the input device 8 can be calculated more accurately.
In step S23, the CPU 10 corrects the value of the first correction degree A according to the angular velocity of the input device 8. Specifically, the CPU 10 reads out the angular velocity data 63 and the first correction degree data 72 stored in the main memory, and the angular velocity indicated by the angular velocity data 63 and the first correction degree A indicated by the first correction degree data 72. And get. Then, using the above angular velocity, the corrected first correction degree A is calculated according to the following equation (3). When 0 | ω | T1, A = A'× {1-(ω / T1)} When T1 <| ω |, A = 0 ... (3) In the above equation (3), the constant T1 is predetermined and is set to, for example, T1 = 60 [deg / sec]. Further, the variable ω is the magnitude of the angular velocity, that is, the magnitude of the angular velocity vector Vω. The above equation (3) modifies the first correction degree A so that the larger the angular velocity is, the smaller the first correction degree A is. That is, according to the above equation (3), the larger the angular velocity, the smaller the correction amount of the gravity vector. In other embodiments, {1- (ω / T1)} in the above equation (3) is replaced with {1- (ω / T1) so that the smaller the angular velocity, the greater the weight. }<sup>2</sup>The data indicating the first correction degree A corrected by the above equation (3) is stored in the main memory as the first correction degree data 72. The process of step S24 is executed after step S23. To.
Here, it is presumed that the case where the angular velocity of the input device 8 is large is the case where the input device 8 is violently moved. In this case, the value of the detected acceleration vector Va is unreliable as a value indicating the direction of gravity. It is presumed to be. On the contrary, when the angular velocity is small, it is presumed that the input device 8 is not moved so much, and the value of the detected acceleration vector Va is presumed to be reliable. Therefore, in step S23, as in step S22, the value of the first correction degree A can be set to be larger as the detection acceleration vector Va is more reliable (when the angular velocity is smaller). As a result, as in the case of step S22, the correction amount can be appropriately determined according to the reliability of the detected acceleration vector Va, so that the direction of gravity and the posture of the input device 8 can be calculated more accurately. ..
Further, in step S22, the degree to which the input device 8 is moved (reliability of the detected acceleration vector Va) is determined based on the acceleration of the input device 8, whereas in step S23, the input device 8 is input. Judgment is made based on the angular velocity of device 8. In this way, since the reliability is determined by a variable different from step S22, the magnitude of the detected acceleration vector Va when the reliability cannot be determined correctly in step S22 (for example, when the input device 8 is operated). Even if is accidentally equal to the magnitude of the gravitational acceleration), the reliability can be correctly determined by step S23.
In step S24, the CPU 10 calculates the motion acceleration vector VA. As described above, the motion acceleration vector VA is calculated based on the detected acceleration vector Va and the gravity vector Vg. Specifically, the CPU 10 reads the acceleration data 64 and the gravity direction data 69 stored in the main memory, and subtracts the gravity vector Vg indicated by the gravity direction data 69 from the detected acceleration vector Va indicated by the acceleration data 64. By doing so, the motion acceleration vector VA is calculated. The data indicating the calculated motion acceleration vector VA is stored in the main memory as motion acceleration data 74. In the present embodiment, in order to calculate the jerk of the input device 8, the data indicating the motion acceleration vector VA calculated in the previous processing loop is stored in the main memory as acceleration history data. The process of step S25 is executed after step S24.
In step S25, the CPU 10 calculates the jerk J of the input device 8. The jerk J is calculated as the difference between the motion acceleration vector calculated in the current processing loop and the motion acceleration vector calculated in the previous processing loop. Specifically, the CPU 10 reads the motion acceleration data 74 and the acceleration history data stored in the main memory, and subtracts the motion acceleration vector indicated by the acceleration history data from the motion acceleration vector indicated by the motion acceleration data 74. Calculate the magnitude of the vector as the jerk (magnitude) J. The calculated jerk data is stored in the main memory as jerk data 71. In another embodiment, the CPU 10 may calculate the jerk from the acceleration vector detected by the acceleration sensor 37 instead of the motion acceleration vector. That is, the magnitude of the vector obtained by subtracting the detected acceleration vector acquired in the previous step S3-S8 processing loop from the detected acceleration vector acquired in the processing loop of this step S3-S8 is the jerk (magnitude). ) It may be calculated as J. The process of step S26 is executed after step S25.
In step S26, the CPU 10 corrects the value of the first correction degree A according to the jerk J of the input device 8. Specifically, the CPU 10 reads the jerk data 71 and the first correction degree data 72 stored in the main memory, and the jerk J indicated by the jerk data 71 and the first correction degree data 72 indicate the first. 1 Get the jerk A and. Then, using the jerk J, the corrected first correction degree A is calculated according to the following equation (4). When 0 J U1, A = A'× {1-(J / U1)} × C1 When U1 <J, A = 0 ... (4) In the above equation (4), the constant U1 is predetermined and is set to, for example, U1 = 40 [G / sec]. Further, the constant C1 is appropriately set to adjust the correction amount, and is set to, for example, C1 = 0.03. The above equation (4) modifies the first correction degree A so that the larger the jerk J, the smaller the first correction degree A. That is, according to the above equation (4), the larger the jerk J, the smaller the correction amount of the gravity vector. In other embodiments, {1- (J / U1)} in the above equation (4) is replaced with {1- (J /) so that the smaller the jerk J, the larger the weight. U1)}<sup>2</sup>The data indicating the first correction degree A corrected by the above equation (4) is stored in the main memory as the first correction degree data 72. The final first correction degree is obtained by the above step S26. A has been calculated. The process of step S27 is executed after step S26.
Here, it is presumed that the case where the jerk J of the input device 8 is large is the case where the input device 8 is violently moved, and as described above, it is presumed that the value of the detected acceleration vector Va is unreliable. To. On the contrary, when the jerk J is small, it is presumed that the input device 8 is not moved so much, and it is presumed that the value of the detected acceleration vector Va is reliable. Therefore, in step S26, as in steps S22 and S23, the more reliable the detected acceleration vector Va (when the jerk J is smaller), the larger the value of the first correction degree A can be set. As a result, as in the case of step S22, the correction amount can be appropriately determined according to the reliability of the detected acceleration vector Va, so that the direction of gravity and the posture of the input device 8 can be calculated more accurately. ..
Further, in step S26, the degree to which the input device 8 is moved (reliability of the detected acceleration vector Va) is determined by using jerk J, which is a variable different from steps S22 and S23. Therefore, when the reliability cannot be correctly determined in steps S22 and S23 and the first correction degree A remains a large value (for example, when the input device 8 is moving in parallel without rotating, the detected acceleration is detected. Even if the magnitude of the vector Va happens to be equal to the magnitude of the gravitational acceleration), the first correction degree A can be changed small by the process of step S26, so that the above reliability can be correctly determined. ..
As described above, in the present embodiment, the reliability of the detected acceleration vector Va is determined by using three different variables representing the state of the input device 8 in steps S22, S23, and S26. As a result, the reliability of the detected acceleration vector Va can be determined more accurately, and the correction amount can be appropriately determined according to the reliability. Therefore, the game device 3 can more accurately calculate the direction of gravity and the posture of the input device 8. In another embodiment, the CPU 10 does not need to execute all the processes of steps S22, S23, and S26, and executes only one or two of the processes of S22, S23, and S26. You may.
Further, if the first correction degree A becomes 0 as a result of the above steps S22, S23, or S26, the CPU 10 may skip the subsequent processing and end the static correction processing. Good. In the above case, since the gravity vector is not substantially corrected, the processing can be shortened by omitting the subsequent processing.
In step S27, the CPU 10 corrects the gravity vector Vg so that it approaches the detected acceleration vector Va (see FIG. 9). In the present embodiment, the corrected gravity vector Vg'is calculated by bringing the uncorrected gravity vector Vg closer to the detected acceleration vector Va at a ratio corresponding to the magnitude of the first correction degree A. Specifically, the CPU 10 reads the acceleration data 64, the gravity direction data 69, and the first correction degree data 72 stored in the main memory, and the detected acceleration vector Va indicated by the acceleration data 64 and the gravity direction data 69. The gravity vector Vg (before correction) indicated by the first correction degree data 72 and the first correction degree data A indicated by the first correction degree data 72 are acquired. Then, assuming that the angle formed by the gravity vector Vg before correction and the detected acceleration vector Va is θ1 [deg], the gravity vector Vg before correction is rotated in the direction of the detected acceleration vector Va by A · θ1 [deg]. By doing so, the corrected gravity vector Vg'is calculated. The data indicating the calculated gravity vector Vg'is stored in the main memory as new gravity direction data 69. The corrected gravity vector Vg'can be calculated by any method. For example, in another embodiment, a vector whose end point is a point that internally divides a line segment connecting the end point of the gravity vector Vg before correction to the end point of the detection acceleration vector Va into A: (1-A) is calculated. , The corrected gravity vector Vg'may be obtained by normalizing the calculated vector. By the above steps S21 to S27, the gravity vector is corrected in the static correction process. After step S27 above, CPU 10 ends the static correction process.
Returning to the description of FIG. 15, in step S13 following step S12, the CPU 10 executes the dynamic correction process. The dynamic correction process is a correction process for correcting the posture of the input device 8 when the input device 8 is mainly moving.
As described above, in the dynamic correction process, the CPU 10 presumes that the input device 8 performs a rotational motion at a uniform angular velocity, and uses the relationship between the angular velocity and the motion acceleration when the rotary motion at a uniform angular velocity is performed. , Correct the gravity vector Vg. Here, the motion acceleration vector of the input device 8 that performs rotational motion is generally expressed by the following equation (5).<maths num="2"><img file="JP5455191B2_D0002.tif" /></maths>In equation (5) above, the vector Vω is an angular velocity vector representing the angular velocity detected by the gyro sensors 55 and 56, and the vector Vr rotates from the position of the input device 8, or more precisely, the position 37 of the acceleration sensor. It is a vector (position vector) that points to the center position of. Here, since it is estimated that the input device 8 performs a rotational motion at a uniform angular velocity, the first term on the right side of the above equation (5) becomes 0, and the above equation (5) can be further rearranged into the following equation (5). 6) is obtained. VA = (-Vω<sup>2</sup>[I] + VωVω<sup>T</sup>) Vr ... (6) In the above equation (6), the matrix [I] is a 3 × 3 identity matrix, and the matrix Vω<sup>T</sup>Is the transposed matrix of the matrix Vω when the vector Vω is regarded as a 1 × 3 matrix. When the operation to calculate the inner product with the vector Vω is performed for each of both sides of the above equation (6), the right side becomes "0", so the following equation (7) holds. Vω VA = 0 ... (7) The above equation (7) shows that the angular velocity vector Vω and the motion acceleration vector VA are orthogonal to each other. That is, when the input device 8 performs rotational motion at an equal angular velocity, the angular velocity vector Vω and the motion acceleration vector VA are orthogonal to each other. In the following, when the input device 8 performs a rotational motion, a vector orthogonal to the motion acceleration vector may be referred to as an orthogonal vector. In this embodiment, the angular velocity vector Vω is an orthogonal vector.
By using the above relationship, the gravity vector Vg can be corrected. That is, since the motion acceleration vector VA is calculated from the gravity vector Vg (see step S24 above), the motion acceleration vector VA satisfies the above equation (7) with respect to the angular velocity vector Vω detected by the gyro sensors 55 and 56. , The gravity vector Vg should be corrected. In the dynamic correction process in the present embodiment, the input device 8 may not rotate at an accurate uniform angular velocity, and the correction prevents the gravity vector Vg from suddenly changing. In consideration of the above, the gravity vector satisfying the above relationship is not obtained by one correction process, but the correction process is performed to bring the gravity vector closer to the one satisfying the above relationship. That is, the gravity vector Vg is corrected so that the motion acceleration vector VA approaches perpendicular to the angular velocity vector Vω.
In order to bring the gravity vector Vg before correction closer to the gravity vector satisfying the above relationship, the gravity vector Vg may be corrected so that the inner product of the orthogonal vector W and the motion acceleration vector VA becomes small. That is, the function φ = Vω VA = Vω (Va-Vg), | Vg |<sup>2</sup>The gravitational vector Vg, which is minimized under the condition of = 1, may be obtained. Any method may be used to obtain such a gravity vector Vg, but in the dynamic correction processing in the present embodiment, the processing is performed by a method using the gravity correction vector ΔVg. The gravity correction vector ΔVg is a predetermined length and is a vector that rotates the gravity vector Vg in that direction. The CPU 10 determines the direction of the gravity correction vector ΔVg, that is, in which direction the gravity vector Vg is rotated. That is, in the present embodiment, when the gravity vector Vg is rotated by a predetermined angle (only the length of the gravity correction vector ΔVg), the motion acceleration vector calculated from the rotated gravity vector satisfies the above relationship. The correction is performed to rotate the gravity vector Vg in the direction closest to.
Hereinafter, the details of the dynamic correction processing will be described with reference to FIG. FIG. 17 is a flowchart showing the flow of the dynamic correction process (step S13) shown in FIG. In the dynamic correction process, first, in step S31, the CPU 10 calculates the gravity correction vector ΔVg used to correct the gravity vector Vg. The gravity correction vector ΔVg is calculated based on the angular velocity vector Vω and the motion acceleration vector VA. Hereinafter, a method of calculating the gravity correction vector ΔVg will be described with reference to FIG.
18 and 19 are diagrams showing a method of calculating the gravity correction vector ΔVg in the dynamic correction process. In FIG. 18, the angle θ2 formed by the motion acceleration vector VA and the angular velocity vector Vω is an acute angle. When the angle θ2 is a sharp angle, in order to make the angular velocity vector Vω orthogonal to the angular velocity vector Vω (approach the orthogonal state) in order to satisfy the above relationship, the motion acceleration vector VA is rotated in the opposite direction of the angular velocity vector Vω. It should be corrected so as to make it (away from the angular velocity vector Vω). That is, the end of the motion acceleration vector VA may be rotated in the opposite direction of the angular velocity vector Vω (direction of the vector V1). Therefore, for the gravity vector Vg, the end thereof may be rotated in the same direction as the angular velocity vector Vω. From the above, the gravity correction vector ΔVg can be calculated as a vector obtained by projecting a vector -V1 oriented in the same direction as the angular velocity vector Vω onto a plane P perpendicular to the gravity vector Vg. On the other hand, as shown in FIG. 19, when the angle θ2 formed by the motion acceleration vector VA and the angular velocity vector Vω is an obtuse angle, the end of the motion acceleration vector VA is the angular velocity vector, contrary to the case where the angle θ2 is a sharp angle. It may be rotated in the same direction as Vω. Therefore, the gravity correction vector ΔVg can be calculated as a vector obtained by projecting a vector -V1 that points in the opposite direction of the angular velocity vector Vω onto the plane P.
As a specific process in step S31, the CPU 10 first calculates the vector V1 based on the angular velocity vector Vω and the motion acceleration vector VA. The vector V1 faces the opposite direction to the angular velocity vector Vω when the angle formed by the motion acceleration vector VA and the angular velocity vector Vω is an acute angle, and faces the same direction as the angular velocity vector Vω when the angle is an acute angle. That is, the CPU 10 reads the angular velocity data 63 and the motion acceleration data 74 stored in the main memory, and acquires the angular velocity vector Vω indicated by the angular velocity data 63 and the motion acceleration vector VA indicated by the motion acceleration data 74. Then, the vector V1 is calculated according to the following equation (8) using the angular velocity vector Vω and the motion acceleration vector VA. V1 = (Vω VA) Vω ... (8) Further, the CPU 10 calculates the gravity correction vector ΔVg according to the following equation (9) in order to obtain a vector obtained by projecting the vector V1 calculated by the above equation (8) onto the plane P (see FIG. 18). ΔVg = V1- (Vg V1) Vg ... (9) The above equation (9) calculates the vector obtained by removing the components parallel to the gravity vector Vg from the above V1. The CPU 10 further normalizes the gravity correction vector ΔVg obtained by the above equation (9), and then multiplies it by a predetermined constant. This constant represents the amount of correction, and is set to, for example, 0.03. Thereby, the gravity correction vector ΔVg having a predetermined length can be obtained. The data indicating the gravity correction vector ΔVg calculated as described above is stored in the main memory as the gravity correction vector data 75. The process of step S32 is executed after step S31.
In the present embodiment, the direction of the gravity correction vector ΔVg is determined based on the direction of the angular velocity vector Vω. Here, in another embodiment, the CPU 10 calculates a gravity vector satisfying the relationship of the above equation (7), and sets the direction of bringing the gravity vector before correction closer to the calculated gravity vector of the gravity correction vector ΔVg. The direction may be determined.
In step S32, the CPU 10 calculates the second correction degree B indicating the degree of correction of the posture of the input device 8 in the dynamic correction process. The second correction degree B is calculated so as to have a magnitude corresponding to the angular velocity of the input device 8. Specifically, the CPU 10 reads the angular velocity data 63 stored in the main memory. Then, using the angular velocity indicated by the angular velocity data 63, the second correction degree B is calculated according to the following equation (10). When 0 | ω | T2, B = ω / T2 When T2 <| ω |, B = 1 ... (10) In the above equation (10), the constant T2 is predetermined and is set to, for example, T2 = 10 [deg / sec]. The above equation (10) calculates the second correction degree B so that the smaller the magnitude of the angular velocity ω (the magnitude of the angular velocity vector Vω), the smaller the second correction degree B. That is, according to the above equation (10), the smaller the angular velocity ω, the smaller the correction amount of the gravity vector. In other embodiments, ω / T2 in the above equation (10) is changed to (ω / T2) so that the larger the angular velocity ω is, the larger the weight is given.<sup>2</sup>The data indicating the second correction degree B calculated by the above equation (10) is stored in the main memory as the second correction degree data 73. The process of step S33 is executed after step S32. To.
Here, when the angular velocity of the input device 8 is small, it is highly probable that the input device 8 is not rotating. The correction in the dynamic correction process is performed on the premise that the input device 8 is performing a rotational motion (at an angular velocity), but if the angular velocity of the input device 8 is small, this premise may not hold. It is considered expensive. Therefore, in the present embodiment, when the angular velocity of the input device 8 is small, the correction amount is reduced in consideration of the possibility that the correction in the dynamic correction process may not be accurate. According to this, when the correction cannot be performed correctly because the input device 8 does not perform the rotational movement, it is possible to prevent inaccurate correction from being performed by the dynamic correction process. As a result, the gravity vector can be corrected correctly in the dynamic correction process.
In step S33, the CPU 10 corrects the value of the second correction degree B according to the jerk J of the input device 8. Specifically, the CPU 10 reads the jerk data 71 and the second correction degree data 73 stored in the main memory, and the jerk J indicated by the jerk data 71 and the second correction degree data 73 indicate the second. 2 Get the jerk B. Then, using the jerk J, the corrected second correction degree B is calculated according to the following equation (11). When 0 J U2, B = B'× {1-(J / U1)} When U2 <J, B = 0 ... (11) In the above equation (11), the constant U2 is predetermined and is set to, for example, U2 = 40 [G / sec]. The above equation (11) corrects the second correction degree B so that the second correction degree B becomes smaller as the jerk J becomes larger. That is, according to the above equation (11), the larger the jerk J, the smaller the correction amount of the gravity vector. In other embodiments, {1- (J / U2)} in the above equation (11) is replaced with {1- (J /) so that the smaller the jerk J, the larger the weight. U2)}<sup>2</sup>The data indicating the second correction degree B corrected by the above equation (11) is stored in the main memory as the second correction degree data 73. The final second correction degree is obtained by the above step S33. B has been calculated. The process of step S34 is executed after step S33.
Here, the jerk J of the input device 8 becomes large when the input device 8 starts to move, when it is stopped (from the moving state), or when the input device 8 is reciprocated. At the time of. At such a time, it is presumed that the input device 8 is not rotating. Therefore, as in the case where the angular velocity of the input device 8 is small, when the jerk J of the input device 8 is large, the premise that "the input device 8 is performing a rotational motion (at an angular velocity)" may not hold. In this case, the correction in the dynamic correction processing may be inaccurate. Therefore, in the present embodiment, when the jerk J of the input device 8 is large, the correction amount is reduced in consideration of the possibility that the correction in the dynamic correction process may not be accurate. According to this, as in the case of step S32, it is possible to prevent inaccurate correction from being performed by the dynamic correction process. As a result, the gravity vector can be corrected correctly in the dynamic correction process.
Further, in step S33, whether or not the input device 8 is performing rotational motion is determined using the jerk J, which is a variable different from that in step S32. Therefore, even if it is not possible to correctly determine whether or not the input device 8 is performing rotational motion in step S32 and the second correction degree B remains a large value, the first correction degree is processed by step S26. Since A can be changed small, the above reliability can be correctly judged.
In step S34, the CPU 10 corrects the gravity vector Vg with the gravity correction vector ΔVg. Specifically, the CPU 10 reads the gravity direction data 69 and the gravity correction vector data 75 stored in the main memory, and adds the gravity vector Vg indicated by the gravity direction data 69 to the gravity correction indicated by the gravity correction vector data 75. Add the vector ΔVg. Furthermore, the corrected gravity vector Vg is calculated by normalizing the vector of the addition result. The data indicating the corrected gravity vector Vg is stored in the main memory as the gravity direction data 69. As a result, the gravitational vector Vg is corrected in the dynamic correction process. After the above step S34, the CPU 10 ends the dynamic correction process.
According to the above dynamic correction process, the CPU 10 assumes that the input device 8 performs a rotational motion at an equal angular velocity, and has a relationship that "the motion acceleration vector VA is perpendicular to the angular velocity vector Vω" (the above equation (7)). Define in advance. Then, the gravity vector Vg before the correction is corrected so as to be close to the gravity vector satisfying the above relationship. According to this, the game device 3 can correct the gravity vector even when the input device 8 is moving, and can accurately calculate the direction of gravity and the posture of the input device 8.
Further, in the canoe game of the present embodiment, since the player moves the input device 8 as if scratching water with a paddle, it is assumed that the input device 8 has a period of rotational movement. On the other hand, there may be a period during which the input device 8 starts or ends swinging, or a period during which the input device 8 does not perform an accurate rotational motion but performs a motion close to a reciprocating motion. Therefore, in the present embodiment, the angular velocity and jerk of the input device 8 are used to determine whether or not the input device 8 is performing rotational motion, and if there is a high possibility that the input device 8 is performing rotational motion, it is dynamic. The amount of correction in the correction process is increased, and the amount of correction is decreased when the possibility of rotational movement is low (steps S32 and S33). Therefore, according to the present embodiment, the direction of gravity is correctly corrected during the period when the input device 8 performs the rotational motion, while the correction is performed during the period when the swing starts and ends, and the period during which the reciprocating motion is performed. Since it is not corrected, the direction of gravity can be calculated accurately without making an inaccurate correction.
[Modification example of dynamic correction processing] In the above embodiment, the relationship between the motion acceleration and the angular velocity (the above equation (7)) is defined by assuming that the input device 8 performs a rotary motion at a uniform angular velocity. Here, in another embodiment, it is possible to define the relationship between the motion acceleration and the angular velocity by presuming that the input device 8 performs the rotational motion including the case where the input device 8 does not have an angular velocity. Hereinafter, a modified example in which the input device 8 is presumed to perform rotational motion (including cases where the velocity is not uniform) will be described.
First, the relationship between the motion acceleration and the angular velocity when the input device 8 performs a rotational motion that is not a uniform velocity will be described. The above equation (5) holds even when the input device 8 performs a rotational motion that is not a uniform angular velocity. In this case, the first term on the right side of Eq. (5) does not become "0". Therefore, if Eq. (5) is rearranged without deleting the first term on the right side, the following Eq. (12) can be obtained.<maths num="3"><img file="JP5455191B2_D0003.tif" /></maths>The above equation (12) is different from the above equation (6) in that the first term in parentheses on the right side is added. The first term represents a matrix representation of the outer product, and represents a matrix (antisymmetric matrix) whose operation result is the same as that of the outer product. As described above, the motion for moving the input device 8 can be regarded as a rotational motion. Therefore, assuming that the position vector Vr facing the center of rotation from the position of the input device 8 and the angular velocity vector Vω are orthogonal to each other. , In the above equation (12), the product of the third term in parentheses on the right side multiplied by the position vector Vr is 0. Furthermore, when the above equation (12) is rearranged and an operation is performed to calculate the inner product with the vector Vω on both sides, the following equation (13) holds.<maths num="4"><img file="JP5455191B2_D0004.tif" /></maths>Here, the vector W is defined as in the following equation (14).<maths num="5"><img file="JP5455191B2_D0005.tif" /></maths>If the vector W is defined as in the above equation (14), the right side of the above equation (13) can be expressed as the inner product of the vector W and the vector VA. Therefore, the above equation (13) is expressed in the following equation (15). It can be expressed as. W VA = 0 ... (15) The above equation (15) shows that the angular velocity vector Vω and the vector W are orthogonal to each other. That is, when the input device 8 performs rotational motion, the motion acceleration vector VA and the vector W are orthogonal to each other, and the vector W becomes the orthogonal vector. In this modification, the CPU 10 corrects the gravity vector based on the relationship expressed by the above equation (15) instead of the above equation (7).
Hereinafter, the details of the dynamic correction processing in the above modification will be described with reference to FIG. 20. FIG. 20 is a flowchart showing a modified example of the dynamic correction process (step S13) shown in FIG. In FIG. 20, the same processing steps as those in FIG. 17 are assigned the same step numbers as those in FIG.
In the dynamic correction process in this modification, first, in step S41, the CPU 10 calculates the angular acceleration vector of the input device 8. The angular acceleration vector is calculated as, for example, a vector of the difference between the angular velocity vector Vω calculated in the current processing loop and the angular velocity vector Vω calculated in the previous processing loop. Specifically, the CPU 10 reads the angular velocity data 63 and the angular velocity history data stored in the main memory, and subtracts the angular velocity vector indicated by the angular velocity history data from the angular velocity vector indicated by the angular velocity data 63 to obtain the angular acceleration. Calculate as a vector. The data indicating the calculated angular acceleration vector is stored in the main memory. The process of step S42 is executed after step S41.
In step S42, the CPU 10 calculates the orthogonal vector W. The orthogonal vector W can be calculated from the angular velocity vector Vω and the angular acceleration vector according to the above equation (14). Specifically, the CPU 10 reads out the angular velocity data 63 and the data indicating the angular acceleration vector stored in the main memory, and uses the angular velocity vector shown by the angular velocity data 63 and the angular acceleration vector in the above equation (14). The orthogonal vector W is calculated according to. The data indicating the calculated orthogonal vector W is stored in the main memory as orthogonal vector data. The process of step S43 is executed after step S42.
In step S43, the CPU 10 calculates the gravity correction vector ΔVg. The gravity correction vector ΔVg was calculated based on the angular velocity vector Vω and the motion acceleration vector VA in step S31, but in this modification, it is calculated based on the orthogonal vector W and the motion acceleration vector VA. The specific calculation method of the gravity correction vector ΔVg in step S43 is the same as that of step S31 except that the orthogonal vector W is used instead of the angular velocity vector Vω.
In this modification, after step S43, the same processes of steps S32 to S34 as in the above embodiment are executed. As a result, the gravity vector Vg is corrected by the gravity correction vector ΔVg. According to this modification, the gravity vector Vg is corrected by using the relationship between the angular velocity vector Vω and the motion acceleration vector VA corresponding to the rotational motion that is not equiangular velocity. Therefore, when the input device 8 performs the rotational motion that is not equiangular velocity. Also, the gravity vector Vg can be corrected correctly. Therefore, the CPU 10 can calculate the direction of gravity more accurately than the above embodiment, and the input device 8 can be calculated more accurately.
Returning to the description of FIG. 15, in step S14 following step S13, the CPU 10 calculates the correction matrix Ma based on the gravity vector corrected by the static correction process and the dynamic correction process. The correction matrix Ma is a rotation matrix for correcting the first posture of the input device 8. Specifically, the correction matrix Ma matches the direction of gravity determined from the first posture of the current input device 8 with the direction represented by the gravity vector Vg corrected by the static correction process and the dynamic correction process. It is a rotation matrix that is rotated to. Here, the gravity direction determined from the first posture of the current input device 8 is a vector obtained by converting the gravity direction (0, -1,0) in the above spatial coordinate system into the controller coordinate system, that is, (0,- It is represented by a vector (-Xy, -Yy, -Zy) obtained by rotating 1,0) with the first attitude matrix M1 (see equation (1) above).
As a specific process in step S14, the CPU 10 first reads the first attitude data 68 stored in the main memory, and uses the first attitude matrix M1 indicated by the first attitude data 68 to use the above spatial coordinate system. Calculate the vector Vh obtained by converting the gravity direction (0, -1,0) in the controller coordinate system. Next, the CPU 10 reads the gravity direction data 69 stored in the main memory, and calculates a rotation matrix that rotates the vector Vh so as to match the gravity vector Vg indicated by the gravity direction data 69 as a correction matrix Ma. To do. The calculated correction matrix Ma is stored in the main memory as the correction matrix data 76. The process of step S15 is executed after step S14.
In step S15, the CPU 10 corrects the first posture (first posture matrix M1) of the input device 8 with the correction matrix Ma. Specifically, the first attitude data 68 and the correction matrix data 76 stored in the main memory are read out, and the first attitude matrix M1 before correction indicated by the first attitude data 68 is indicated by the correction matrix data 76. The corrected first attitude matrix M1'is calculated by rotating with the correction matrix Ma. At this time, the CPU 10 may adjust the correction amount by multiplying the correction matrix Ma by a predetermined constant C2. This constant C2 is predetermined in the range of 0 <C2 1, and is set to, for example, C2 = 0.3. The data indicating the corrected first attitude matrix M1'is stored in the main memory as new first attitude data 68. By the above step S15, the first posture of the input device 8 is corrected in the correction process based on the acceleration. After step S15, the CPU 10 ends the acceleration-based correction process.
As described above, in the correction process based on the acceleration, the gravity direction is corrected in the static correction process (step S12) and the dynamic correction process (step S13), and the corrected gravity direction is used to correct the input device 8. Corrected the posture of 1. By performing both the static correction processing and the dynamic correction processing in this way, the acceleration sensor 37 regardless of whether the input device 8 is stationary or moving. The first posture can be corrected by using the detection result of.
Returning to the description of FIG. 14, in step S6 following step S5, the CPU 10 executes the correction process based on the captured image described above. The correction process based on the captured image is a process of correcting the first posture of the input device 8 using the marker coordinate data obtained from the captured image. Hereinafter, the details of the correction process based on the captured image will be described with reference to FIG. 21.
FIG. 21 is a flowchart showing the flow of the correction process (step S6) based on the captured image shown in FIG. In the correction process based on the captured image, first, in step S51, the CPU 10 determines whether or not the marker unit 6 is captured by the imaging means (imaging element 40) of the input device 8. The determination in step S51 can be performed by referring to the marker coordinate data 65 stored in the main memory. Here, when the marker coordinate data 65 indicates two marker coordinates, it is determined that the marker unit 6 is imaged, and when the marker coordinate data 65 indicates only one marker coordinate, or there is no marker coordinate. When shown, it is determined that the marker unit 6 is not imaged. If the determination result in step S51 is affirmative, the subsequent processes in steps S52 to S57 are executed. On the other hand, if the determination result in step S51 is negative, the subsequent processes in steps S52 to S57 are skipped, and the CPU 10 ends the correction process based on the captured image. In this way, when the marker unit 6 is not imaged by the image sensor 40, the posture of the input device 8 cannot be calculated using the data obtained from the image sensor 40. No correction is made in the based correction process.
In step S52, the CPU 10 calculates the roll posture component M3r based on the marker coordinate data. The roll posture component M3r is calculated based on the orientation of the marker unit 6 in the captured image, that is, the slope of the line connecting the two marker coordinates indicated by the marker coordinate data 65. Hereinafter, an example of a method for calculating the roll posture component M3r will be described with reference to FIG.
FIG. 22 is a diagram showing two-dimensional coordinates corresponding to the captured image. As shown in FIG. 22, in the present embodiment, the two-dimensional coordinate system (x'y'coordinate system) for representing the position in the captured image sets the range of the captured image to -1 x' 1,-. It shall be represented by 1 y' 1. The x'y'coordinate system captures images when the input device 8 is in the reference orientation (the imaging direction of the input device 8 faces the center of the marker unit 6 and the button surface of the controller 5 faces vertically upward). In the image, it is assumed that the vertical downward direction is the positive direction of the y'axis and the right direction is the positive direction of the x'axis. The points P1 and P2 shown in FIG. 22 indicate the positions of the marker coordinates, and the point P3 is the midpoint between the points P1 and P2. The vector v10 shown in FIG. 22 is a vector starting from the point P1 and ending at the point P2.
In order to calculate the roll posture component M3r, the CPU 10 first reads the marker coordinate data 65 and calculates the vector v10 from the two marker coordinates indicated by the marker coordinate data 65. Furthermore, the vector (hx, hy) obtained by normalizing the vector v10 is calculated. This vector (hx, hy) faces the x-axis positive direction when the input device 8 is in the reference posture, and changes its direction according to the rotation of the input device 8 in the roll direction. Since the vector (hx, hy) corresponds to the posture in the roll direction, the roll posture component M3r can be calculated based on this vector (hx, hy). Specifically, the CPU 10 calculates the roll posture component M3r according to the following equation (16).<maths num="6"><img file="JP5455191B2_D0006.tif" /></maths>The data indicating the matrix calculated by the above equation (16) is stored in the main memory as the roll posture component data 77. The process of step S53 is executed after step S52.
In step S53, the CPU 10 calculates the yaw attitude component M3y based on the marker coordinate data. The yaw posture component M3y is calculated based on the orientation and position of the marker portion 6 in the captured image. Hereinafter, an example of a method for calculating the yaw posture component M3y will be described with reference to FIG.
First, the CPU 10 reads the marker coordinate data 65 and calculates the midpoint of the two marker coordinates indicated by the marker coordinate data 65. In the present embodiment, the position of the midpoint is used as the position of the marker portion 6. Further, the CPU 10 rotates the calculated midpoint coordinates around the origin of the x'y'coordinate system by the rotation angle with respect to the roll direction of the input device 8 (in the direction opposite to the rotation direction of the input device 8). Calculate the coordinates (px, py). In other words, the coordinates of the midpoint are rotated around the origin so that the vector (hx, hy) points in the positive x-axis direction. Assuming that the input device 8 is in the same position as the marker unit 6 in the horizontal direction (x-axis direction) (that is, the position in front of the marker unit 6), the coordinates after rotation (px, obtained as described above) are obtained. From py), the posture related to the yaw direction can be calculated.
Next, the CPU 10 is based on the coordinates (px, py) after rotation of the midpoint and the yaw angle (limit angle) θy'when the marker portion 6 is located at the end in the x'axis direction. , Calculate the rotation angle θy in the yaw direction. Here, the limit angle θy'and the x-coordinate value px'after the rotation of the midpoint when the limit angle θy1 is obtained can be obtained in advance. Therefore, the rotation angle θy in the yaw direction can be calculated by using the fact that the ratio of px to px'is equal to the ratio of θy and θy'. Specifically, the rotation angle θy in the yaw direction can be calculated by the following equation (17). θy = px × θy'/ px' ... (17) When ignoring the length of the marker portion 6 in the horizontal direction, the limit angle θy'can be set to 1/2 of the angle of view of the controller 5, and the value of px'can be set to "1".
Finally, the CPU 10 calculates the rotation matrix that rotates at the angle θy calculated by the above equation (17) as the yaw attitude component M3y. Specifically, the yaw posture component M3y is calculated by the following equation (18).<maths num="7"><img file="JP5455191B2_D0007.tif" /></maths>The data showing the matrix calculated by the above equation (18) is stored in the main memory as the yaw posture component data 78. The process of step S54 is executed after the above step S53.
In step S54, the CPU 10 synthesizes the roll posture component M3r and the yaw posture component M3y. That is, the roll posture component data 77 and the yaw posture component data 78 are read from the main memory, and the roll posture component M3r and the yaw posture component M3y indicated by the respective data 77 and 78 are integrated. The process of step S55 is executed after step S54.
In step S55, the CPU 10 calculates the pitch posture component M3p based on the first posture. Although different from the processing of the present embodiment, the pitch posture component M3p can also be calculated based on the y coordinate values of the above coordinates (px, py) in the same manner as the yaw posture component M3y. .. However, in the method of calculating the attitude in the yaw direction (pitch direction) using the above coordinates (px, py), the input device 8 is at the same position as the marker portion 6 in the horizontal direction (vertical direction in the case of the pitch direction). It is a method that holds on the premise of that. In the game system 1 of the present embodiment, it is considered that the player operates the input device 8 at a position substantially in front of the marker unit 6 (TV 2) in the horizontal direction. It is possible to calculate the posture in the horizontal direction by the method of step S53 above on the premise that it is in the same position as. On the other hand, the player may stand up to operate the input device 8 or sit down to operate the input device 8, and the position of the marker unit 6 may be arranged on the upper side of the screen of the television 2 on the lower side. It is also possible that it will be placed in. Therefore, in the game system 1 of the present embodiment, it is not always possible to assume that "the input device 8 is at the same position as the marker unit 6 in the vertical direction", so the above coordinates (px, py) are used in the pitch direction. The posture may not be calculated.
Therefore, in the present embodiment, for the pitch posture component M3p, the posture after the correction based on the acceleration (step S5) is used as it is (therefore, in the correction process based on the captured image, the correction is performed in the pitch direction. Not done). Specifically, the CPU 10 reads the first attitude data 68 from the main memory. Then, using each element of the first posture matrix M1 shown by the first posture data 68, the rotation angle θp in the pitch direction is calculated according to the following equation (19). cos (θp) = (Zx × Zx + Zz × Zz)<sup>1/2</sup>sin (θp) = Zy ... (19) The variables Zx, Zy, and Zz in the above equation (19) are the elements of the first attitude matrix M1 shown in the above equation (1). The first attitude matrix M1 used here is the first attitude matrix M1 after the correction process (step S5) based on the acceleration is performed in the current processing loop. Further, the CPU 10 calculates the matrix of the pitch attitude component M3p according to the following equation (20) using cos (θp) and sin (θp) calculated by the above equation (19).<maths num="8"><img file="JP5455191B2_D0008.tif" /></maths>The data indicating the matrix calculated by the above equation (20) is stored in the main memory as the pitch attitude component data 79. The process of step S56 is executed after the above step S55.
In step S56, the CPU 10 calculates the third posture matrix M3 based on each posture component in the roll direction, the yaw direction, and the pitch direction. The third attitude matrix M3 is obtained by further synthesizing the pitch attitude component M3p with the synthesis result of the roll attitude component M3r and the yaw attitude component M3y. Specifically, the CPU 10 reads the pitch attitude component data 79 from the main memory, and integrates the pitch attitude component M3p indicated by the pitch attitude component data 79 into the matrix calculated in step S54. The data indicating the third attitude matrix M3 obtained as a result of the integration is stored in the main memory as the third attitude data 80. The process of step S57 is executed after step S56.
In step S57, the CPU 10 corrects the first posture (first posture matrix M1) of the input device 8 by using the third posture matrix M3. The correction in step S57 is performed by bringing the first attitude matrix M1 closer to the third attitude matrix M3 at a predetermined ratio (the constant C3 below). The CPU 10 reads the first attitude data 68 and the third attitude data 80 from the main memory. Then, using the first posture matrix M1 shown by the first posture data 68 and the third posture matrix M3 shown by the third posture data 80, correction is performed according to the following equation (21). M1 = (M3-M1') × C3 + M1'... (21) In the above equation (21), the variable M1'is the first attitude matrix before correction. The constant C3 is preset in the range of 0 <C3 1, and is set to, for example, 0.1. The data indicating the corrected first posture matrix M1 calculated by the above equation (21) is stored in the main memory as new first posture data 68. After step S57, the CPU 10 ends the correction process based on the captured image.
As described above, in the correction process based on the captured image, the third posture based on the captured image is calculated, and the first posture based on the angular velocity is corrected so as to approach the third posture. By this correction, the first posture can be corrected so as to have a more accurate value. In the present embodiment, the third posture is calculated from the captured image only in the roll direction and the yaw direction, but as described above, the third posture cannot be calculated from the captured image also in the pitch direction. It is possible, and in other embodiments, a third posture may be calculated from the captured image in the roll direction, yaw direction, and pitch direction. Further, in the correction process based on the captured image, the third posture may be calculated in at least one of the roll direction, the yaw direction, and the pitch direction.
In another embodiment, the correction process based on the captured image may be executed only when it is presumed that the input device 8 is capturing the marker unit 6. Specifically, the CPU 10 determines whether or not the input device 8 (imaging means) is oriented so that the marker unit 6 can be imaged before executing the correction process based on the captured image. This determination can be made using the posture before performing the correction process based on the captured image. For example, the posture may determine whether the imaging direction of the input device 8 is the same as or opposite to the direction from the input device 8 to the marker unit 6. Further, the posture used for the above determination may be the posture finally obtained in the previous processing loop, or may be the posture in which the correction processing based on the acceleration is performed in the current processing loop. ..
As a result of the above determination, when it is determined that the input device 8 is facing the direction in which the marker unit 6 can be imaged, the CPU 10 executes a correction process based on the captured image to determine the direction in which the marker unit 6 can be imaged. If it is determined that the image is not suitable, the correction process based on the captured image is skipped. An object other than the marker unit 6 (for example, a lamp in a room or sunlight outside a window) may be erroneously detected as the marker unit 6, and the marker coordinates obtained by the erroneous detection may be used to make a third posture. When is calculated, the correction cannot be performed correctly even if the correction process is performed using the third posture. On the other hand, by performing the above determination process, it is possible to prevent the correction process from being performed using the third posture calculated from the marker coordinates obtained by the erroneous detection. As a result, the correction process based on the captured image can be correctly performed.
Returning to the description of FIG. 14, in step S7 following step S6, the CPU 10 executes a game process using the corrected posture of the input device 8 (first posture matrix M1). In the present embodiment, a process of controlling the posture of the paddle of the canoe arranged in the game space according to the posture of the input device 8 is executed. Further, a process of moving the canoe according to the movement of the paddle is executed. In another embodiment, the game processing may be any processing as long as the first posture matrix M1 representing the posture of the corrected input device 8 is reflected in the game result as an input value. .. For example, it may be a process of controlling and displaying an object in the virtual game space so as to have the posture indicated by the first posture matrix M1, or the posture indicated by the first posture matrix M1 and a predetermined posture. It may be a process of controlling and displaying the object so as to move it at a speed corresponding to the angle with and. The process of step S8 is executed after step S7.
In step S8, the CPU 10 determines whether or not to end the game. The determination in step S8 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 instructed to stop the game. If the determination result in step S8 is negative, the process in step S3 is executed again. After that, the processing loops of steps S3 to S8 are repeatedly executed until it is determined that the game is ended in step S8. On the other hand, if the determination result in step S8 is affirmative, the CPU 10 ends the game process shown in FIG. This is the end of the explanation of game processing.
As described above, in the present embodiment, the first posture of the input device 8 is calculated from the angular velocities detected by the gyro sensors 55 and 56 (step S4), and the first posture is corrected based on the acceleration (S5). ) And the correction process (S6) based on the captured image. Then, since the game processing is executed using the corrected first posture (step S7), the CPU 10 can execute the game processing based on the accurate posture of the input device 8. According to this, for example, the posture of the input device 8 can be accurately reflected with respect to the posture of the object in the game space, so that the operability of the game operation can be improved.
[Modification example] In the above embodiment, the gravity vector corrected by the dynamic correction process was used to correct the attitude of the input device 8 calculated based on the angular velocities detected by the gyro sensors 55 and 56. That is, in the above embodiment, the game device 3 corrects the posture of the input device 8 by using the gravity vector to correct the first posture of the input device 8 calculated prior to the dynamic correction processing. It was to be calculated. Here, the gravity vector does not need to be used to correct the previously calculated posture, but may be used to calculate the posture of the input device 8. For example, in another embodiment, the game device 3 can also calculate the posture of the input device 8 by the following processes (1) to (4). (1) Calculate the gravity vector Vg based on the detected acceleration vector Va (let the detected acceleration vector Va be the gravity vector Vg). (2) The motion acceleration vector VA is calculated based on the gravity vector Vg and the detected acceleration vector Va in the same manner as in step S24 above. (3) The gravity vector Vg is corrected by the same process as the above dynamic correction process. (4) Calculate the attitude of the input device 8 corresponding to the corrected gravity vector Vg. According to the above processes (1) to (4), it is based on the gravity vector corrected by the dynamic correction process without first calculating the attitude of the input device 8 from the angular velocities detected by the gyro sensors 55 and 56. The posture of the input device 8 can be calculated.
Further, in the above embodiment, the gravity vector to be corrected in the dynamic correction process is calculated based on the first posture calculated from the angular velocity data 63. Here, in another embodiment, the gravity vector to be corrected in the dynamic correction process may be calculated using the outputs (that is, operation data) of various sensors included in the input device 8, for example, the above. It may be calculated using the detected acceleration vector Va as in the process of (1). Further, the method of calculating the gravity vector to be corrected in the dynamic correction process may be any method as long as it is different from the correction method in the dynamic correction process.
As described above, the present invention is used as, for example, a game device or a game program that performs game processing according to the posture of the input device for the purpose of accurately calculating the posture of the input device using the gyro sensor. It is possible.
1 game system 2 TV 3 Game device 4 optical disc 5 controller 6 Marker part 7 Gyro sensor unit 8 Input device 10 CPU 11c GPU 11e Internal main memory 12 External main memory 37 Accelerometer 55 2-axis gyro sensor 56 1-axis gyro sensor 60 game program 61 Posture calculation program 63 Angular velocity data 64 Acceleration data 68 First attitude data 69 Gravity direction data 74 Motion acceleration data
30 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9 Sheet 10 Sheet 11 Sheet 12 Sheet 13 Sheet 14 Sheet 15 Sheet 16 Sheet 17 Sheet 18 Sheet 19 Sheet 20 Sheet 21 Sheet 22 Sheet 23 Sheet 24 Sheet 25 Sheet 26 Sheet 27 Sheet 28 Sheet 29 Sheet 30
Every citation, both ways
| Document | Relation | Office |
|---|---|---|
| JP2008002992A | Cites | Japan |
| JP2007232662A | Cites | Japan |
| JP2000308756A | Cites | Japan |
| WO2008026357A1 | Cites | World Intellectual Property Organization (WIPO) |
59 members in 3 offices
Priority claims2
| Document | Office | Kind | Date |
|---|---|---|---|
| 2009093985 | Japan | A | |
| JP20090093985 | – | – | – |
Members59
| Document | Office | Kind | |
|---|---|---|---|
| JP4265814B1 | Japan | B1 | |
| US2009322679A1 | United States of America | A1 | |
| US2009325703A1 | United States of America | A1 | |
| US2009326846A1 | United States of America | A1 | |
| US2009326847A1 | United States of America | A1 | |
| US2009326848A1 | United States of America | A1 | |
| US2009326850A1 | United States of America | A1 | |
| EP2140915A2 | European Patent Office (EPO) | A2 | |
| EP2140916A2 | European Patent Office (EPO) | A2 | |
| EP2140917A2 | European Patent Office (EPO) | A2 | |
| EP2140918A2 | European Patent Office (EPO) | A2 | |
| EP2140919A2 | European Patent Office (EPO) | A2 | |
| JP2010005331A | Japan | A | |
| JP2010005332A | Japan | A | |
| US7711505B2 | United States of America | B2 | |
| US2010225582A1 | United States of America | A1 | |
| US2010225583A1 | United States of America | A1 | |
| EP2228109A2 | European Patent Office (EPO) | A2 | |
| EP2228110A2 | European Patent Office (EPO) | A2 | |
| JP2010207329A | Japan | A | |
| JP2010207330A | Japan | A | |
| JP2010207331A | Japan | A | |
| JP2010240242A | Japan | A | |
| JP2010263930A | Japan | A | |
| US7925467B2 | United States of America | B2 | |
| JP2011072475A | Japan | A | |
| JP2011138295A | Japan | A | |
| EP2140916A3 | European Patent Office (EPO) | A3 | |
| US8219347B2 | United States of America | B2 | |
| US8405611B2 | United States of America | B2 | |
| EP2140915A3 | European Patent Office (EPO) | A3 | |
| EP2140919A3 | European Patent Office (EPO) | A3 | |
| US8437971B2 | United States of America | B2 | |
| EP2140917A3 | European Patent Office (EPO) | A3 | |
| US2013162537A1 | United States of America | A1 | |
| EP2228109A3 | European Patent Office (EPO) | A3 | |
| EP2140918A3 | European Patent Office (EPO) | A3 | |
| US8614672B2 | United States of America | B2 | |
| EP2228110A3 | European Patent Office (EPO) | A3 | |
| JP5424400B2 | Japan | B2 | |
| JP5455191B2This record | Japan | B2 | |
| US8704759B2 | United States of America | B2 | |
| US2014145952A1 | United States of America | A1 | |
| US8749490B2 | United States of America | B2 | |
| JP5541851B2 | Japan | B2 | |
| JP5630969B2 | Japan | B2 | |
| JP5669294B2 | Japan | B2 | |
| US9079102B2 | United States of America | B2 | |
| JP5872135B2 | Japan | B2 | |
| JP5872136B2 | Japan | B2 | |
| US2017003761A9 | United States of America | A9 | |
| EP2228110B1 | European Patent Office (EPO) | B1 | |
| US9772694B2 | United States of America | B2 | |
| EP2140917B1 | European Patent Office (EPO) | B1 | |
| EP2140919B1 | European Patent Office (EPO) | B1 | |
| EP2140916B1 | European Patent Office (EPO) | B1 | |
| EP2140915B1 | European Patent Office (EPO) | B1 | |
| EP2140918B1 | European Patent Office (EPO) | B1 | |
| EP2228109B1 | European Patent Office (EPO) | B1 |
20 legal events, as the office reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | |
|---|---|---|
| Receipt of annual feesJAPANESE INTERMEDIATE CODE: R250R250 | R250 | |
| Receipt of annual feesJAPANESE INTERMEDIATE CODE: R250R250 | R250 | |
| Receipt of annual feesJAPANESE INTERMEDIATE CODE: R250R250 | R250 | |
| Receipt of annual feesJAPANESE INTERMEDIATE CODE: R250R250 | R250 | |
| Receipt of annual feesJAPANESE INTERMEDIATE CODE: R250R250 | R250 | |
| Receipt of annual feesJAPANESE INTERMEDIATE CODE: R250R250 | R250 | |
| Receipt of annual feesJAPANESE INTERMEDIATE CODE: R250R250 | R250 | |
| Receipt of annual feesJAPANESE INTERMEDIATE CODE: R250R250 | R250 | |
| Receipt of annual feesJAPANESE INTERMEDIATE CODE: R250R250 | R250 | |
| Receipt of annual feesJAPANESE INTERMEDIATE CODE: R250R250 | R250 | |
| Certificate of patent or registration of utility modelJAPANESE INTERMEDIATE CODE: R150R150 | R150 | |
| Certificate of patent or registration of utility modelJAPANESE INTERMEDIATE CODE: R150R150 | R150 | |
| First payment of annual fees (during grant procedure)JAPANESE INTERMEDIATE CODE: A61A61 | A61 | |
| Written decision to grant a patent or to grant a registration (utility model)JAPANESE INTERMEDIATE CODE: A01A01 | A01 | |
| Decision of grant or rejection writtenTRDD | TRDD | |
| Request for written amendment filedJAPANESE INTERMEDIATE CODE: A523A521 | A521 | |
| Notification of reasons for refusalJAPANESE INTERMEDIATE CODE: A131A131 | A131 | |
| Written request for application examinationJAPANESE INTERMEDIATE CODE: A621A621 | A621 | |
| Notification of acceptance of power of attorneyJAPANESE INTERMEDIATE CODE: A7422RD02 | RD02 | |
| Notification of resignation of power of attorneyJAPANESE INTERMEDIATE CODE: A7424RD04 | RD04 |
Numbers
- Publication
- 5455191
- Publication, DOCDB
- 5455191
- Publication, EPODOC
- JP5455191B
- Application
- 93985
- Application, DOCDB
- 2009093985
- Application, EPODOC
- JP20090093985
Titles2
- Japanese
- 姿勢算出装置、姿勢算出プログラム、姿勢算出システム、および姿勢算出方法
- English
- Posture calculation device, posture calculation program, posture calculation system, and posture calculation method
Classification
- IPC, 2
- A63F13 428
- A63F13 211
