ARVR Technology Group: 129340649
Welcome to join.
The last two articles are presented separately:
1. How to get Entity Object data using object scanner
2, how to use 4.0 of LicenseManager and Targetmanager
Today mainly introduces how to use the data obtained in front of the development, in fact, to show you how to implement object recognition.
First, we have obtained the target data for license key and 3D object, which is the same XML and DAT file as the previous version of Vuforia.
Then we download the relevant files from the official SDK and samples code, here I take Android native development as an example:
If you put sample code in the sample folder under the SDK directory, or if you don't put it, there are two ways to resolve it:
1, modify Copyvuforiafiles.xml in the Fileset dir, this script is mainly copy so file, before an article introduced.
2. Copy the armeabi-v7a folder directly to the Project Libs folder
<?xml version= "1.0" encoding= "UTF-8"?>
<project name= "vuforiasamples" default= "Copyvuforiaso" >
<target name= "Copyvuforiaso" >
<copy overwrite= "true" todir= "libs/armeabi-v7a" >
< Fileset dir= ". /.. /build/lib/armeabi-v7a "/>
</copy>
</target>
</project>
Next you need to configure the Vuforia.jar file, note the need to check in export and output.
Next, copy the XML and DAT files downloaded from Target Manager to the Assets/objectrecognition folder, and here I am the Object_data_ot.xml and object_data_ot.dat files.
After the above steps are complete, you need to modify the code content:
1. Modify the Objecttargets.java file 326 lines and load your own XML file in:
if (!mcurrentdataset.load ("Objectrecognition/object_data_ot.xml",
storage_type. Storage_appresource))
return false;
2. Set up your app application license
In the Com.qualcomm.vuforia.samples.SampleApplication package, the Sampleapplicationsession.java file is 336 lines:
Vuforia.setinitparameters (mactivity, Mvuforiaflags, "Your own license key");
After the modification is complete, run the program, open the app, select Object recognition, and align the previously trained mouse to see the following image:
Please leave a message if you have questions.
Also welcome reprint, at that time need to indicate the source: http://blog.csdn.net/ggtaas/article/details/42192667
Thank you.