LoginSignup
4
4

More than 5 years have passed since last update.

Metaio SDK マーカーを認識した事を知る方法

Posted at

metaio sdkについては、こちらから。

MetaioSDKDelegateのonTrackingEventに渡されるtrackingValues.qualityにて、マーカーを認識したか認識しなくなったかを判別できる。


-(void) onTrackingEvent: (const metaio::stlcompat::Vector<metaio::TrackingValues>&) trackingValues {
    // Implement if new poses are needed
    // Please implement in the subclass-->template.mm
    NSLog(@"onTrackingEvent: quality:%f", trackingValues[0].quality);

    // quality: 認識精度(0〜1の範囲)。0だと認識されていない状態、1.0が最良.
    if( trackingValues[0].quality > 0.8 ) {
        // 認識した事により、別の処理を開始する。
        self.dummyViewController = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil];
        [self presentViewController:self.dummyViewController animated:YES completion:nil];
    }
}
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4