Vuforia 4.0 beta--object Recognition (iii)

Source: Internet
Author: User

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.



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.