Log in or register to post comments

[ASK]Next step after create database

March 17, 2013 - 7:42am #1

After done this guide:https://developer.vuforia.com/resources/dev-guide/managing-targets-device-database-using-target-manager

And copy .dat and .xml to folder Asset in example image target (im using eclipse).....now im so confused,

so what next step that can be detected my marker??

 

Sory for my bad English :D 

-regards-

 

[ASK]Next step after create database

March 22, 2013 - 12:15pm #16

You can rotate your teapot model, of course; you can do that by adding a matrix rotation in your renderFrame() method, like in this code snippet:

    SampleUtils::translatePoseMatrix(0.0f, 0.0f, kObjectScale,
                                         &modelViewMatrix.data[0]);

        float angle = 0.0f; // YOUR ROTATION ANGLE HERE (in degrees)
        SampleUtils::rotatePoseMatrix(angle, 0.0f, 0.0f, 1.0f,
                                     &modelViewMatrix.data[0]);

        SampleUtils::scalePoseMatrix(kObjectScale, kObjectScale, kObjectScale,
                                     &modelViewMatrix.data[0]);
        SampleUtils::multiplyMatrix(&projectionMatrix.data[0],
                                    &modelViewMatrix.data[0] ,
                                    &modelViewProjection.data[0]);

 

(see the rotatePoseMatrix function);

 

concerning your question about Markers: they don't have "Features" like Image Targets, as they are"predefined" images.

 

[ASK]Next step after create database

March 22, 2013 - 10:04am #15

Yea i think so..

Can i change direction the object 3D (teapot)?

And can the marker show Features point like in Target Maager??

[ASK]Next step after create database

March 21, 2013 - 11:31pm #14

Yes, the star rating can explain why the teapot is not very stable on the marker;

however you can also tap on the screen to adjust the focus of the camera on the target; this can also improve detection and tracking.

 

[ASK]Next step after create database

March 21, 2013 - 8:31pm #13

AlessandroB wrote:

If stones and chips are still detected it means the App on your phone is still using the StonesAndChips dataset;

are you sure that your ndk-build was able to build the project successfully ? and that your Eclipse project was refreshed afterwards ?

One thing I would recommend anyway is to manually uninstall the App from your phone/tablet 

(this will make sure that any cached data will be cleared from your device) and then rebuild and reinstall (run) the App

 

 

Ah...Its Worked :D , after uninstall the App and rebuild ...its worked,

But position the Object(Teapot) is not correct yet..ist not fix,and not static.Its because my marker rating is 3? or its can be fixed?

 

Thx for your fast respon..im very greatfull

 

[ASK]Next step after create database

March 21, 2013 - 2:11pm #12

If stones and chips are still detected it means the App on your phone is still using the StonesAndChips dataset;

are you sure that your ndk-build was able to build the project successfully ? and that your Eclipse project was refreshed afterwards ?

One thing I would recommend anyway is to manually uninstall the App from your phone/tablet 

(this will make sure that any cached data will be cleared from your device) and then rebuild and reinstall (run) the App

 

[ASK]Next step after create database

March 21, 2013 - 10:33am #11

hm...but when tracking StoneAndChip marker..its detected and Teapot appeared

[ASK]Next step after create database

March 20, 2013 - 8:50am #10

Does that error occur when using the StonesAndChips dataset ?

(Error opening file '/data/usr/keychars/Generic.kcm', No such file or directory.)

 

[ASK]Next step after create database

March 20, 2013 - 7:34am #9

 

Yea..its done to,like this:
 /*   // Load the data sets:
    if (!dataSetStonesAndChips->load("StonesAndChips.xml", QCAR::DataSet::STORAGE_APPRESOURCE))
    {
        LOG("Failed to load data set.");
        return 0;
    }

    if (!dataSetTarmac->load("Tarmac.xml", QCAR::DataSet::STORAGE_APPRESOURCE))
    {
        LOG("Failed to load data set.");
        return 0;
    }*/
    //my data
    if (!dataSetStonesAndChips->load("brosur_marker.xml", QCAR::DataSet::STORAGE_APPRESOURCE))
        {
            LOG("Failed to load data set.Brosur");
            return 0;
        }

my .xml

<?xml version="1.0" encoding="UTF-8"?>
<QCARConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="qcar_config.xsd">
  <Tracking>
    <ImageTarget size="247 173" name="Brosur_iPhone" />
  </Tracking>
</QCARConfig>

 

 
 
 
Red line:
03-20 20:51:46.379: E/Tokenizer(32445): Error opening file '/data/usr/keychars/Generic.kcm', No such file or directory.
 
And my marker get 3 star
 
Its anything wrong?

 

[ASK]Next step after create database

March 20, 2013 - 1:04am #8

The reason why the StonesAndChips is "automatically" detected is because the sample loads two datasets (StonesAndChis and Tarmac) and then activates one of them at startup (in this cases it activates StonesAndChips).

However, if you have replaced this code:

if (!dataSetStonesAndChips->load("StonesAndChips.xml", QCAR::DataSet::STORAGE_APPRESOURCE))
{
    LOG("Failed to load data set.");
    return 0;
}

with this code:


if (!dataSetStonesAndChips->load("my_dataset.xml", QCAR::DataSet::STORAGE_APPRESOURCE))
{
    LOG("Failed to load data set.");
    return 0;
}

Then your dataSetStonesAndChips variable will actually represent your own dataset (and not the original StonesAndChips dataset), since you have passed the "my_dataset.xml" as argument to the load() function.

If you have done that, you don't need to change anything in the Java sample code.

If it does not work, it might mean that something goes wrong when loading your dataset (have you checked the Logs to see if any error is reported by QCAR ?)

 

[ASK]Next step after create database

March 19, 2013 - 9:16pm #7

AlessandroB wrote:

Check if you have done these three steps:

  • have you copied the dataset (both xml and dat) to the assets directory ?
  • Have you changed the code in ImageTargets.cpp as I indicated previously ?
  • Have you built with ndk-build ?
  • Have you then refreshed the project in Eclipse ?

If you have done the steps above, it should just work.

 

 

 

Yea its done all step...

Im using Image Target Sample..when its strated,its automaticly detect the StoneAndChip marker right??because when i try focus to tamac and mymarker..its cant be detected.

 

so i suppose,i must change/add code in  .java ,.....could  you Guidance me?

 

thx for respon :D

[ASK]Next step after create database

March 18, 2013 - 3:22pm #6

Check if you have done these three steps:

  • have you copied the dataset (both xml and dat) to the assets directory ?
  • Have you changed the code in ImageTargets.cpp as I indicated previously ?
  • Have you built with ndk-build ?
  • Have you then refreshed the project in Eclipse ?

If you have done the steps above, it should just work.

 

 

[ASK]Next step after create database

March 18, 2013 - 7:07am #5

AlessandroB wrote:

if ndk-build has built successfully, then you just need to refresh your project in Eclipse (actually, the "rebuild" is done automatically in Eclipse);

to refresh the project, just right-click on the project name and select "Refresh" (or press F5);

that should be all you need ;-)

 

 

Im Done add scirpt in data set....but still its only detected StoneandCip marker,

i missed something  in .java,but i dont know where i must start

 

Sory im very newbie...

[ASK]Next step after create database

March 18, 2013 - 4:56am #4

if ndk-build has built successfully, then you just need to refresh your project in Eclipse (actually, the "rebuild" is done automatically in Eclipse);

to refresh the project, just right-click on the project name and select "Refresh" (or press F5);

that should be all you need ;-)

 

[ASK]Next step after create database

March 18, 2013 - 4:49am #3

thx for fast respone

 

Before i changed everything...im done with ndk-build,then rebuild again??or create new project

 

And one thing :D . im only chenge in line Load the data sets ??or there is a next step?

[ASK]Next step after create database

March 17, 2013 - 7:56am #2

Hi,

you need then to load your dataset; 

 

change imagetargets.cpp as follows

 

// Load the data sets:
    if (!dataSetStonesAndChips->load("my_dataset.xml", QCAR::DataSet::STORAGE_APPRESOURCE))
    {
        LOG("Failed to load data set.");
        return 0;
    }
 
then rebuild with ndk-build and refresh your project in Eclipse
Log in or register to post comments