Log in or register to post comments

VideoPlayback: Problem with how tochange ImageTargets

October 15, 2012 - 3:04pm #1

Hi,

I'm trying to use my own Trackable set for VideoPlayback.

I created a new set of 4 images in (goods.xml, goods.dat) using the tools at MyTrackables,

and placed those files in /assets, and modified the tracking code to reflect using 4 objects,

including changing the load statement

    // Load the data sets:

    //if (!dataSetStonesAndChips->load("StonesAndChips.xml", QCAR::DataSet::STORAGE_APPRESOURCE))

        if (!dataSetStonesAndChips->load("goods.xml", QCAR::DataSet::STORAGE_APPRESOURCE))

 

The problem is that this doesn't work, and I get:

10-15 14:10:03.271: E/AR(31651): Dataset file StonesAndChips.xml not found

10-15 14:10:03.271: E/AR(31651): DetectorNFT4_DataSet::beginModify(): Dataset is already in modify state

10-15 14:10:03.291: E/AR(31651): Failed to load dataset 'StonesAndChips.xml'.

10-15 14:10:03.291: I/QCAR(31651): Failed to load data set.

 

along with a "Fail to load Tracker Data" on my Android device (Lenovo S2110)

 

The workaround that works is to rename the files (goods.xml, goods.dat) to (StonesAndChips.xml,StonesAndChips.dat).

Then things start to work as expected.  I do clean all, including all the compiled .class files...still no luck...can't figure out where it is pulling the wrong name from!

Any ideas? I really don't want to name all data sets StonesAndChips.{xml,dat}...points out that I really don't know what's going on!!...Smile

alan

 

 

VideoPlayback: Problem with how tochange ImageTargets

October 16, 2012 - 5:44pm #3

David,

Thanks for your prompt reply!

My bad...I missed the part in the  instructions for ImageTracker where it said that the Eclipse IDE was for building the Java part of the project...inferring that the JNI part of the project was not built automagically...once you mentioned that, problem solved.

So I was thinking that I was a great programmer, as I had no errors in the changes I made to VideoPlayback.cpp.  Once I ran ndk-build from my mingw/msys command line, I saw how foolish that idea was...had plenty of errors, as I was never building the C++ code...only strange part is I did thought that I did wipe out the VideoPlaybck.so file a few times!

I was able, using the instructions in http://mobilepearls.com/labs/ndk-builder-in-eclipse/ , to create an "NDK Builder" in Properties->Builders, so that the "ndk-build' happens automagically when I build the project in Eclipse.   The only thing I needed to do different from those instructions, as I am on a Windows7/64bit box is to point the "Location" to the "windows cmd line version"  ndk-build.cmd

Then all worked fine,and I can develop while staying in Eclipse.

Again, thanks!

alan

 

VideoPlayback: Problem with how tochange ImageTargets

October 15, 2012 - 8:11pm #2

To confirm, are you running ndk-build from the command line in the sample's base directory - then Project > Clean?

If so, please post your full loadTrackerData method.

Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_loadTrackerData

 

Log in or register to post comments