Log in or register to post comments

target image not detecting

March 16, 2013 - 2:26am #1

hi..

m using device database to detect an an image. Downloaded the database n copied the two files to the assets folder. clean n bulid project...... but the target is still not detected... plz help.

target image not detecting

May 1, 2017 - 7:31am #38

Hi

I came across the same problem, I am developing in the development environment Android Studio, I downloaded the example from https://developer.vuforia.com/downloads/samples, I enabled the visibility, I changed the name of the DB in the videoPlayback file, what could be the reason?

target image not detecting

March 28, 2013 - 10:00am #37

You're welcome.

target image not detecting

March 28, 2013 - 9:58am #36

thanks a lot tracking is successful... but getting an error in JDI event dispatch, though every thing is working fine... Thanks a lot again.

target image not detecting

March 27, 2013 - 8:29am #35

Yes, I see what is going wrong;

basically in the current code you are still relying on this code to select your texture index:

if (strcmp(trackable.getName(), "chips") == 0)

The problem is that this code will compare the name of the detected target to one of these two target names:  "chips" or "stones";

so, what you need to do is to create just 1 dataset (and not 2 different datasets); then upload your 2 image targets to the same dataset; for instance, if your dataset is called "ims" and you want to sue two image targets called "imsec" and "bblock", you should upload both "imsec.png" and "bblock.png" (or whatever your target images are called) to the same dataset "ims", using the Target Manager;

Then you can download "ims" and copy the files (xml and dat files) into the assets directory;

once you've done that, you can go to the C++ code and adjust the texture index code as follows:

if (strcmp(trackable.getName(), "imsec") == 0)
        {
            textureIndex = 0;
        }
        else if (strcmp(trackable.getName(), "bblock") == 0)
        {
            textureIndex = 1;
        }
        else
        {
            textureIndex = 2;
        }

Everything else (java code and the dataset->load() looks OK)

target image not detecting

March 27, 2013 - 7:09am #34

hi thanks a lot for replying... your previous answer helpled me a lot.

but am facing a few problems here... plz have a look at the code below (imagetargets.cpp)

 

 // Load the data sets:
    if (!dataSetStonesAndChips->load("ims.xml", QCAR::DataSet::STORAGE_APPRESOURCE))
    {
        LOG("Failed to load data set.");
        return 0;
    }
 
    if (!dataSetTarmac->load("bblck.xml", QCAR::DataSet::STORAGE_APPRESOURCE))
    {
        LOG("Failed to load data set.");
        return 0;
    }
ims and bblck are my datasets.
 
 // Choose the texture based on the target name:
        int textureIndex;
        if (strcmp(trackable.getName(), "chips") == 0)
        {
            textureIndex = 0;
        }
        else if (strcmp(trackable.getName(), "stones") == 0)
        {
            textureIndex = 1;
        }
        else
        {
            textureIndex = 2;
        }
 
        const Texture* const thisTexture = textures[0];
 
 and imagetargets.java have the following code
* We want to load specific textures from the APK, which we will later use
* for rendering.
*/
private void loadTextures() {
mTextures.add(Texture.loadTextureFromApk("imsec.png",
getAssets()));
mTextures.add(Texture.loadTextureFromApk("bblock.png",
getAssets()));
mTextures.add(Texture.loadTextureFromApk("TextureTeapotBrass.png",
getAssets()));
mTextures.add(Texture.loadTextureFromApk("TextureTeapotBlue.png",
getAssets()));
mTextures.add(Texture.loadTextureFromApk("TextureTeapotRed.png",
getAssets()));
}
i wanted "imsec.png" to load when i track images in ims.xml and "bblock.png" to load when i track image saved in bblck.xml.
but only ims.xml is tracked whereas no tracking occurs for bblck.xml. Plz help. Thanks
 

target image not detecting

March 26, 2013 - 8:52am #33

Hi, I think you are making a bit of confusion on the textures and the images used as Image targets;

first:

the textureIndex in the code does not refer to the "chips" or "stones" images (or to any other image used as target); it referes to one of these 3 files:

  • TextureTeapotBlue.png
  • TextureTeapotBrass.png
  • TextureTeapotRed.png

these three files are located in the "/assets" sub-directory of your sample project (and NOT in the "/media" folder).

Those 3 files (textures) are applied to the 3D teapot models (so, the teapot may look blue, red or brass colored depending on which texture is applied)

The files in the "/media" directory(i.e. the chips.jpeg and stones.jpeg files) are not really used by the sample app; they are there just for reference, so to show how the image targets look like, and so that you can print them, bu they are NOT used by the sample application code.

 

The Image Targets instead are contained in the ChipsAndStones.dat file (which is located next to the ChipsAndStone.XML file in the "assets" folder as well);

if you want to use your own images as Image targets, you need to create a Dataset via the Target Manager, upload your images, download the Database and store it in the "assets" directory;

then, you need to adjust the sample code so to use your Dataset, as explained in the link I was referring to.

 

target image not detecting

March 26, 2013 - 7:42am #32

the part(s) which i need help are

1. While creating my own datasets do i need to define my datasets here ??

 

QCAR::DataSet* dataSetStonesAndChips    = 0;
QCAR::DataSet* dataSetTarmac            = 0;
QCAR::DataSet* dataSetMy_dataset           = 0; and then follow the process of creating, loading and activating the datasets.
 
 
2 How can i choose my texture based on target name as stated here
 // Choose the texture based on the target name:
        int textureIndex;
        if (strcmp(trackable.getName(), "chips") == 0)
        {
            textureIndex = 0;
        }
        else if (strcmp(trackable.getName(), "stones") == 0)
        {
            textureIndex = 1;
        }
        else
        {
            textureIndex = 2;
        }
 
        const Texture* const thisTexture = textures[0]; 
in the  "media" folder  there are two images "stones.jpg" and "chips.jpg".. so the question is  can we select the texture just by giving the target name and without refering the concerned .xml file??
 

 

target image not detecting

March 26, 2013 - 7:25am #31

Ok, so, if you just need to track one image at a time (and then another one after two minutes for example, as you say),

the  you don't need to use:

QCAR::setHint(QCAR::HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 2);

However, then I don't see what is your question about;

tracking different images is already supported by Vuforia; the Image Targets sample for instance already shows you how to track "chips" and then "stones" and then "tarmac" etc.... and each time you detect a different Image Target (for instance you detect "chips" instead of "stones", it will show a different 3D augmentation; for instance a red teapot instead of a blue teapot or a yellow teapot....)

So, what is the part for which you need help ?

 

target image not detecting

March 26, 2013 - 7:18am #30

hey... if i am tracking one image at a time then also i need to update

QCAR::setHint(QCAR::HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 2); // PUT a higher number here (3,4,5...)

am tracking one image, one image now and another after two minutes and so on.. then also there is need of updating this value of (QCAR::HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 2); you are telling me about simultaneous tracking whereas i am asking about single tracking of multiple images(one image tracked at a time and different targets being rendered on different images (no repeatition of images)... no simultaneous tracking) 

can u refer me a link where i can understand this part.

target image not detecting

March 25, 2013 - 11:21am #29

 

Ok, then, as I said before, all you need to do is to :
 
QCAR::setHint(QCAR::HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 2); // PUT a higher number here (3,4,5...)
 
so, if you now have for instance 4 different image targets in your dataset and you print them all and you put them on your desk, 
you will be able to augment each of them separately
 
 
 
Then, how you render a different 2D or 3D image on top of each target is another story (that's just about the OpenGL code, not about Vuforia per se)

target image not detecting

March 25, 2013 - 11:10am #28

yes am talking about the second case where all the targets are different and i want to display different textures (2-D or 3-D) when i track them.

target image not detecting

March 25, 2013 - 11:06am #27

consider a scenario where i am having several targets images

you did not specify if each of those targets is the same image (i.e. you print 10 times the same "Chips" image), or if your printed target images are all different, i.e. you print a "stones" image, a "Chips" image, a  "something_else" image, etc..

That's the critical info, because the first case is not supproted, while the second is supported by Vuforia.

 

target image not detecting

March 25, 2013 - 11:00am #26

ok .... consider a scenario where i am having several targets images and i want to display different textures(2-D or 3-D) over them when i track them. I am going to track one image at a time so need of simultaneous tracking. Is it possible to do so?? Thanks for your help. :)

target image not detecting

March 25, 2013 - 10:55am #25

I'm not following... can you explain with a concrete example ?

 

target image not detecting

March 25, 2013 - 10:50am #24

No i dont want simultaneous tracking & display of different images... i was asking about displaying differnet targets and different textures individually and separately when different images are tracked. 

target image not detecting

March 25, 2013 - 10:41am #23

hi, 

we cannot have separate images displayed over different targets....

you can display different "images" (as you say, i.e. different augmentations) on different targets, if you increase the QCAR::HINT::MAX_SIMULTANEOUS_IMAGE_TARGETS to a value grater than 1, as shown in this code in ImageTargets.cpp:

JNIEXPORT void JNICALL
Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_onQCARInitializedNative(JNIEnv *, jobject)
{
    // Register the update callback where we handle the data set swap:
    QCAR::registerCallback(&updateCallback);

    // Comment in to enable tracking of up to 2 targets simultaneously and
    // split the work over multiple frames:
    QCAR::setHint(QCAR::HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 2);
}

So, for instance, if you put a "stones" target and a "chips" target so that they appear both in your camera view, you will be able to see two different teapots (in this case it's just the color of the teapot that changes, but nothing prevents you from using different 3D models for instance)

 

target image not detecting

March 25, 2013 - 10:26am #22

yes i have done it... but this only shows a single image over multiple targets.....we cannot have separate images displayed over different targets....

target image not detecting

March 25, 2013 - 10:19am #21

Sure you can; but you will need to change some code;

the procedure is explained here step-by-step and in full detail:

https://developer.vuforia.com/forum/faq/android-how-do-i-replace-dataset-image-targets-sample

 

target image not detecting

March 25, 2013 - 10:13am #20

 

by using these lines can i create my own datasets like stoneandchips and tarmac as in imagetargets demo
 
// Constants:
static const float kObjectScale = 3.f;
 
QCAR::DataSet* dataSetStonesAndChips    = 0;
QCAR::DataSet* dataSetTarmac            = 0;
 
 

target image not detecting

March 21, 2013 - 11:36am #19

that's application-specific logic; you can implement it in many ways.

 

target image not detecting

March 21, 2013 - 8:32am #18

 

2. If i want different 2d images to be displayed for different targets.... what changes should i make, provided am using same device databse containing atleast 20 images. 

This is the relevant code (you need to choose the right texture, and that's all):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
int textureIndex;
        if (strcmp(trackable.getName(), "chips") == 0)
        {
            textureIndex = 0;
        }
        else if (strcmp(trackable.getName(), "stones") == 0)
        {
            textureIndex = 1;
        }
        else
        {
            textureIndex = 2;
        }
 
        const Texture* const thisTexture = textures[0];

but how can i mention my target image in here... i understood that i can refer my texture by using different texture index...... but  for selecting different user defined target images... should i create separate datasets... as created in imagetargets.cpp 

target image not detecting

March 20, 2013 - 3:00am #17

Ok,

then you simply adjust the code as follows:

QCAR::Vec2F targetSize = ((QCAR::ImageTarget &) trackable).getSize();
targetSize.data[0] *= 0.6f; //make it 60% of the original size
targetSize.data[1] *= 0.6f; //make it 60% of the original size
 

target image not detecting

March 20, 2013 - 2:47am #16

hey thanks for replying..

1. yes am talking about 60% of the  target size... in the previous question

target image not detecting

March 19, 2013 - 10:59am #15

Glad to hear the problem is solved.

Concerning your questions:

1. The 2d texture is completely covering my target... what changes should i make to display texture on 60% of the screen

the texture is rendered on top of the target, so its size is in 3D (not in screen coordinates), so not sure what you mean with 60% of the screen, do you mean 60% of the target size perhaps ?

2. If i want different 2d images to be displayed for different targets.... what changes should i make, provided am using same device databse containing atleast 20 images. 

This is the relevant code (you need to choose the right texture, and that's all):

int textureIndex;
        if (strcmp(trackable.getName(), "chips") == 0)
        {
            textureIndex = 0;
        }
        else if (strcmp(trackable.getName(), "stones") == 0)
        {
            textureIndex = 1;
        }
        else
        {
            textureIndex = 2;
        }
 
        const Texture* const thisTexture = textures[0];

 

3. If I want to publish an app which uses vuforia sdk do i need to obtain a license or is the sdk open source?

Vuforia is not "Open Source"; however it is "free", so you can publish your Apps built with Vuforia, at no cost; however make sure to check our license agreements (in particular check the end-user agreement, as you have certain obligations to inform the user about data collection, etc....)

https://developer.vuforia.com/resources/dev-guide/publish-vuforia

 

target image not detecting

March 19, 2013 - 10:19am #14

hey thanks... the problem is solved...... now am having a few queries.....

1. The 2d texture is completely covering my target... what changes should i make to display texture on 60% of the screen

2. If i want different 2d images to be displayed for different targets.... what changes should i make, provided am using same device databse containing atleast 20 images. 

3. If I want to publish an app which uses vuforia sdk do i need to obtain a license or is the sdk open source?

Thanks :)

 

target image not detecting

March 18, 2013 - 3:19pm #13

Hi, first, happy that your original problem is solved.

Concerning your new issue (OpenGL), just replace this line:

QCAR::Vec2F targetSize = ((QCAR::ImageTarget *) trackable)->getSize();

with this:

QCAR::Vec2F targetSize = ((QCAR::ImageTarget &) trackable).getSize();

 

target image not detecting

March 18, 2013 - 10:46am #12

now getting this error in cygwin when am trying to replace teapot with a 2d image

 

 

ravi@Home /cygdrive/C/Development/Android/vuforia-sdk-android-2-0-31/samples/ImageTargets-2-0-7
$ /cygdrive/h/ndk/androidndkr8d/ndk-build                                       Compile++ arm    : ImageTargets <= ImageTargets.cpp
jni/ImageTargets.cpp: In function 'void Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame(JNIEnv*, jobject)':
jni/ImageTargets.cpp:407:57: error: invalid cast from type 'const QCAR::Trackable' to type 'QCAR::ImageTarget*'
/cygdrive/h/ndk/androidndkr8d/build/core/build-binary.mk:269: recipe for target `obj/local/armeabi/objs/ImageTargets/ImageTargets.o' failed
make: *** [obj/local/armeabi/objs/ImageTargets/ImageTargets.o] Error 1
 
 
i replaced the OpenGL ES 2.0 rendering code in the renderFrame method with the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// assuming this is an image target
QCAR::Vec2F targetSize = ((QCAR::ImageTarget *) trackable)->getSize();
QCAR::Matrix44F modelViewProjection;
SampleUtils::translatePoseMatrix(0.0f, 0.0f, kObjectScale,
                                 &modelViewMatrix.data[0]);
SampleUtils::scalePoseMatrix(targetSize.data[0], targetSize.data[1], 1.0f,
                             &modelViewMatrix.data[0]);
SampleUtils::multiplyMatrix(&projectionMatrix.data[0],
                            &modelViewMatrix.data[0] ,
                            &modelViewProjection.data[0]);
glUseProgram(shaderProgramID);
glVertexAttribPointer(vertexHandle, 3, GL_FLOAT, GL_FALSE, 0,
                      (const GLvoid*) &planeVertices[0]);
glVertexAttribPointer(normalHandle, 3, GL_FLOAT, GL_FALSE, 0,
                      (const GLvoid*) &planeNormals[0]);
glVertexAttribPointer(textureCoordHandle, 2, GL_FLOAT, GL_FALSE, 0,
                      (const GLvoid*) &planeTexcoords[0]);
glEnableVertexAttribArray(vertexHandle);
glEnableVertexAttribArray(normalHandle);
glEnableVertexAttribArray(textureCoordHandle);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, thisTexture->mTextureID);
glUniformMatrix4fv(mvpMatrixHandle, 1, GL_FALSE,
                   (GLfloat*)&modelViewProjection.data[0] );
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT,
               (const GLvoid*) &planeIndices[0]);

 

eclipse code looks like this for renderframe method

 

Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame(JNIEnv *, jobject)
{
    //LOG("Java_com_qualcomm_QCARSamples_ImageTargets_GLRenderer_renderFrame");
 
    // Clear color and depth buffer 
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
    // Get the state from QCAR and mark the beginning of a rendering section
    QCAR::State state = QCAR::Renderer::getInstance().begin();
    
    // Explicitly render the Video Background
    QCAR::Renderer::getInstance().drawVideoBackground();
       
#ifdef USE_OPENGL_ES_1_1
    // Set GL11 flags:
    glEnableClientState(GL_VERTEX_ARRAY);
    glEnableClientState(GL_NORMAL_ARRAY);
    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
 
    glEnable(GL_TEXTURE_2D);
    glDisable(GL_LIGHTING);
        
#endif
 
    glEnable(GL_DEPTH_TEST);
 
    // We must detect if background reflection is active and adjust the culling direction. 
    // If the reflection is active, this means the post matrix has been reflected as well,
    // therefore standard counter clockwise face culling will result in "inside out" models. 
    glEnable(GL_CULL_FACE);
    glCullFace(GL_BACK);
    if(QCAR::Renderer::getInstance().getVideoBackgroundConfig().mReflection == QCAR::VIDEO_BACKGROUND_REFLECTION_ON)
        glFrontFace(GL_CW);  //Front camera
    else
        glFrontFace(GL_CCW);   //Back camera
 
 
    // Did we find any trackables this frame?
    for(int tIdx = 0; tIdx < state.getNumTrackableResults(); tIdx++)
    {
        // Get the trackable:
        const QCAR::TrackableResult* result = state.getTrackableResult(tIdx);
        const QCAR::Trackable& trackable = result->getTrackable();
        QCAR::Matrix44F modelViewMatrix =
            QCAR::Tool::convertPose2GLMatrix(result->getPose());        
 
        // Choose the texture based on the target name:
        int textureIndex;
        if (strcmp(trackable.getName(), "chips") == 0)
        {
            textureIndex = 0;
        }
        else if (strcmp(trackable.getName(), "stones") == 0)
        {
            textureIndex = 1;
        }
        else
        {
            textureIndex = 2;
        }
 
        const Texture* const thisTexture = textures[0];
 
#ifdef USE_OPENGL_ES_1_1
        // Load projection matrix:
        glMatrixMode(GL_PROJECTION);
        glLoadMatrixf(projectionMatrix.data);
 
        // Load model view matrix:
        glMatrixMode(GL_MODELVIEW);
        glLoadMatrixf(modelViewMatrix.data);
        glTranslatef(0.f, 0.f, kObjectScale);
        glScalef(kObjectScale, kObjectScale, kObjectScale);
 
        // Draw object:
        glBindTexture(GL_TEXTURE_2D, thisTexture->mTextureID);
        glTexCoordPointer(2, GL_FLOAT, 0, (const GLvoid*) &teapotTexCoords[0]);
        glVertexPointer(3, GL_FLOAT, 0, (const GLvoid*) &teapotVertices[0]);
        glNormalPointer(GL_FLOAT, 0,  (const GLvoid*) &teapotNormals[0]);
        glDrawElements(GL_TRIANGLES, NUM_TEAPOT_OBJECT_INDEX, GL_UNSIGNED_SHORT,
                       (const GLvoid*) &teapotIndices[0]);
#else
 
        QCAR::Vec2F targetSize = ((QCAR::ImageTarget *) trackable)->getSize();
        QCAR::Matrix44F modelViewProjection;
        SampleUtils::translatePoseMatrix(0.0f, 0.0f, kObjectScale,
                                         &modelViewMatrix.data[0]);
        SampleUtils::scalePoseMatrix(targetSize.data[0], targetSize.data[1], 1.0f,
                                     &modelViewMatrix.data[0]);
        SampleUtils::multiplyMatrix(&projectionMatrix.data[0],
                                    &modelViewMatrix.data[0] ,
                                    &modelViewProjection.data[0]);
        glUseProgram(shaderProgramID);
        glVertexAttribPointer(vertexHandle, 3, GL_FLOAT, GL_FALSE, 0,
                              (const GLvoid*) &planeVertices[0]);
        glVertexAttribPointer(normalHandle, 3, GL_FLOAT, GL_FALSE, 0,
                              (const GLvoid*) &planeNormals[0]);
        glVertexAttribPointer(textureCoordHandle, 2, GL_FLOAT, GL_FALSE, 0,
                              (const GLvoid*) &planeTexcoords[0]);
        glEnableVertexAttribArray(vertexHandle);
        glEnableVertexAttribArray(normalHandle);
        glEnableVertexAttribArray(textureCoordHandle);
        glActiveTexture(GL_TEXTURE0);
        glBindTexture(GL_TEXTURE_2D, thisTexture->mTextureID);
        glUniformMatrix4fv(mvpMatrixHandle, 1, GL_FALSE,
                           (GLfloat*)&modelViewProjection.data[0] );
        glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT,
                       (const GLvoid*) &planeIndices[0]);
 
        SampleUtils::checkGlError("ImageTargets renderFrame");
#endif
 
    }
 
    glDisable(GL_DEPTH_TEST);
 
#ifdef USE_OPENGL_ES_1_1        
    glDisable(GL_TEXTURE_2D);
    glDisableClientState(GL_VERTEX_ARRAY);
    glDisableClientState(GL_NORMAL_ARRAY);
    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
#else
    glDisableVertexAttribArray(vertexHandle);
    glDisableVertexAttribArray(normalHandle);
    glDisableVertexAttribArray(textureCoordHandle);
#endif
 
    QCAR::Renderer::getInstance().end();
}
 
plz help....
 

target image not detecting

March 18, 2013 - 8:13am #11

its working fine... thanks mate :)

target image not detecting

March 17, 2013 - 12:07pm #10

The code looks correct. It must work. Are you sure you have rebuilt the code with ndk-build afterwards?

 

 

 

target image not detecting

March 17, 2013 - 8:19am #9

this is a part of imagetargets.cpp n i have made the following changes.. plz see n tell me if ny changes should me made

 

 

// Create the data sets:
    dataSetStonesAndChips = imageTracker->createDataSet();
    if (dataSetStonesAndChips == 0)
    {
        LOG("Failed to create a new tracking data.");
        return 0;
    }
 
    dataSetTarmac = imageTracker->createDataSet();
    if (dataSetTarmac == 0)
    {
        LOG("Failed to create a new tracking data.");
        return 0;
    }
 
    // Load the data sets:
    if (!dataSetStonesAndChips->load("db.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;
    }
 
    // Activate the data set:
    if (!imageTracker->activateDataSet(dataSetStonesAndChips))
    {
        LOG("Failed to activate data set.");
        return 0;
    }
 
    LOG("Successfully loaded and activated data set.");
    return 1;
}
 
image is still not detected
 

target image not detecting

March 16, 2013 - 7:53am #8

Then it should work. Let's summarize:

- you have created a database called "db" containing one target (or more than one), the target has 4 star

- you have downloaded db.zip from the Target Manager and extracted db.xml and db.dat

- you have copied db.xml and db.dat into the assets folder of your project

- you have modified the ImageTargets.cpp to load db.xml in place of StonesAndChips.xml

- you have not made any other modifications to the sample code (except the change above)

- you have rebuilt the native code with ndk-build

- you have refreshed the project in Eclipse, so to pick up the rebuilt native of previous step

If you can confirm all of the above, then you should be able to detect and track your image target, or otherwise I don't see a reason for not detecting.

 

target image not detecting

March 16, 2013 - 6:52am #7

its rated 4 *... n havin good tracking performance

target image not detecting

March 16, 2013 - 4:11am #6

what is the "star rating" of your targets in your db?

target image not detecting

March 16, 2013 - 2:55am #5

still no detection

changed imagetargets.cpp as follows

 

// Load the data sets:
    if (!dataSetStonesAndChips->load("db.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;
    }
db is my xml file  

target image not detecting

March 16, 2013 - 2:40am #4

In ImageTargets.cpp, youshould find a line like this:

dataSetChipsAndStones->load("ChipsAndStones.xml", .... );

Replace the name of the xml file with the name of YOUR xml file .

Then rebuild.

 

target image not detecting

March 16, 2013 - 2:35am #3

plz tell where  i have to change in native file 

target image not detecting

March 16, 2013 - 2:32am #2

Hi, have you changed the name of the file to load in the code in ImageTargets.cpp ?

Log in or register to post comments