Nvisionxr_ios Tutorial 12-Multi-image recognition

Source: Internet
Author: User

This section teaches you to switch multiple scenes, then the previous chapter on multi-scene switching tutorial
1, openStonesandchips.xml, we can see that there are two identification graphsStonesand theChips, both of these graphs can be identified, and we will then bind different scenarios according to the two graphs.
 
 


2, openNVISIONCONTROLLER.M,Add the following code
 
Code:

    //  instance Session object, the name passed in can be arbitrarily written, but to be unique, the equivalent of the object's key.      // nvsceneplay, similar to the native iOS controller, also has its own set of life cycles, adding AR scene objects need to operate here.      MyFirstScene *firstScene = [[MyFirstScene alloc]  initwithname:@ "First_scene"];     // nvsceneplay category is generally  main_sceneplay   and  GENERAL_SCENEPLAY  two types      //  when set to Main_sceneplay, The Nvsceneplay will be first started when the program is started,     //  when there are multiple scenes, only one nvsceneplay is set to Main_sceneplay, The rest are general_sceneplay.      [[nvappdirector sharednvappdirector] addsceneplay:@ "MAIN_SCENEPLAY"  scene:firstscene];     videoscene *videoscene = [[videoscene  alloc] initwithname:@ "Video_scene"];     [[nvappdirector  sharednvappdirector] addsceneplay:@ "General_sceneplay"  Scene:videoScene];     //  bind the corresponding scene according to the identification map      //  bind the chips corresponding tile to the firstscene scene      [_vuforiawrapper binddatawithtrackertarget:@ "Chips"  ScenePlay: firstscene];     //  binds the stones corresponding tile to the videoscene scene      [_ vuforiawrapper binddatawithtrackertarget:@ "Stones"  ScenePlay:videoScene];



The scene is bound to figure one by one, run the project, and test it.

Nvisionxr_ios Tutorial 12-Multi-image recognition

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.