Login Action Required

The NinevehGL Forum uses a new concept of "socialized forum" or as we like to say "Tweet Forum".


Here is the deal:
  1. No new registration is required. Just sign in with your Twitter account and authorize the NinevehGL Forum.
  2. Once you’re in, you'll be able to "Follow a Thread", that means every time that thread receive a new post or update you'll receive a mention on your twitter.
  3. Besides, you can enable "Auto Share", then every new post and/or thread you make will be tweeted on your timeline. (By default, auto-share is enabled only for your threads)

Forum Rules:

1. We understand human comunication can become "hot" sometimes. So some insults and bad words ARE allowed. Just don't push too much being an asshole all the time.

2. SPAMMERS are not allowed. There are penalties for this kind of user and they can be banned forever.

3. You can report other users, if you judge necessary. An user reported many times by many people can also be banned forever. However you can also receive penalties for report deliberately for no apparent reason.

If there is a similar thread title, make sure the other one doesn't already have the answer you're looking for.

This forum uses the BBCode (Bulletin Board Code), here are some instructions:

Bold: [b]text[/b]
Italic: [i]text[/i]
Underline: [u]text[/u]

Code: [code]text[/code]
Quote:
[quote=@username]text[/quote]
[quote]text[/quote]

List:
[ul] [*]item [/ul]
[ol] [*]item [/ol]

URL:
[url]http://url.com[/url]
[url=http://url.com]text[/url]

Image:
[img]http://imageurl.com[/img]

Embed (videos, code, 3D):
[embed]http://url.com[/embed]

Welcome to the NinevehGL's world!
NinevehGL is a 3D engine forged with pure Obj-C.
Welcome to the
Forum!
Hello, Guest.

Your current vote:

You can change your vote many times. But it's still one single vote.

AR : Tracking multiple meshes
Vote this thread:


@Momeks

Posts: 71

NGLSpecialist

Sat, Aug 4 2012


Hi, I have created an AR project that I need multiple image tracking , but the problem is the app is able to track only one data !

here is my codes :

- (void) loadTracker
{

NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];

//THIS IS FOR ANOTHER OBJECT
QCAR::DataSet *dataSet = nil;

QCAR::DataSet *dataSet2 = nil;

QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance();
QCAR::ImageTracker* imageTracker = static_cast<QCAR::ImageTracker*>(trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER));

//THIS IS FOR ANOTHER OBJECT
QCAR::TrackerManager& trackerManager2 = QCAR::TrackerManager::getInstance();
QCAR::ImageTracker* imageTracker2 = static_cast<QCAR::ImageTracker*>(trackerManager2.getTracker(QCAR::Tracker::IMAGE_TRACKER));


dataSet = imageTracker->createDataSet();
dataSet->load([@"CoverMark.xml" cStringUsingEncoding:NSASCIIStringEncoding], QCAR::DataSet::STORAGE_APPRESOURCE);
imageTracker->activateDataSet(dataSet);


//THIS IS FOR ANOTHER OBJECT
dataSet2 = imageTracker2->createDataSet();
dataSet2->load([@"DFP.xml" cStringUsingEncoding:NSASCIIStringEncoding], QCAR::DataSet::STORAGE_APPRESOURCE);
imageTracker2->activateDataSet(dataSet2);



// Continue execution on the main thread
[self performSelectorOnMainThread:@selector(bumpAppStatus) withObject:nil waitUntilDone:NO];

[pool release];
}


// in the draw view everything works fine , when I remove one data set it can track the target image , but I think the main problem is on LOAD TRACK function

- (void) drawView
{
if (_isReady)
{

textMesh.visible = NO;
_mesh.visible = NO;
_cube.visible = NO;

// Render video background and retrieve tracking state
QCAR::State state = QCAR::Renderer::getInstance().begin();
QCAR::Renderer::getInstance().drawVideoBackground();

for (int i = 0; i < state.getNumActiveTrackables(); i)
{
// Get the trackable
const QCAR::Trackable *trackable = state.getActiveTrackable(i);
QCAR::Matrix44F qMatrix = QCAR::Tool::convertPose2GLMatrix(trackable->getPose());

if (!strcmp(trackable->getName(), "Caterham"))
{
_mesh.visible = YES;
[_mesh rebaseWithMatrix:qMatrix.data scale:615 compatibility:NGLRebaseQualcommAR];

}

if (!strcmp(trackable->getName(), "Logo"))
{
_cube.visible = YES;
[_cube rebaseWithMatrix:qMatrix.data scale:615 compatibility:NGLRebaseQualcommAR];
}
}


QCAR::Renderer::getInstance().end();
glEnable(GL_DEPTH_TEST);
[_camera drawCamera];

}
}


thanks
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Sat, Aug 4 2012


In response to: @Momeks

For far as I know about Vuforia, you can't load multiple .dat files...

What you should make is create one .dat file with multiple trackables.

So you can fetch those trackables with trackable->getName(). By comparing the names you can show one or other mesh.

I suggest you to consult Vuforia docs and forum for more information about this subject.
0% like this - 0/0

@Momeks

Posts: 71

NGLSpecialist

Sat, Aug 4 2012


In response to: @dineybomfim

would you please take an example e???
0% like this - 0/0

@Momeks

Posts: 71

NGLSpecialist

Sat, Aug 4 2012


In response to: @Momeks

because I can only use one image in the creating of data !
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Sat, Aug 4 2012


In response to: @Momeks

Buddy...

As I told you, it's better you ask directly for Qualcomm community how to do that...

As far as I know, this is absolutely simple in Qualcomm web site:
1 - Login in Qualcomm AR Dev site.
2 - Click on "My Trackables".
3 - Choose an existing project or create a new one.
4 - Create how many trackables you wish inside the project.
5 - On the project page, click on "Download selected trackables".

This will generate one single .dat file with many trackables inside it. If you take a look inside the xml file, you'll see many tags of "<ImageTarget>".
0% like this - 0/0

@yang5664

Posts: 16

NGLNewbie

Fri, Sep 27 2013


In response to: @Momeks

have you ever try use MarkerTracker

example
- (void) loadTracker
{
// Background thread must have its own autorelease pool
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];

//
//DataSetItem *dataSet;
//QCAR::DataSet *dataSet = nil;
QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance();
QCAR::MarkerTracker* markerTracker = static_cast<QCAR::MarkerTracker*>(trackerManager.getTracker(QCAR::Tracker::MARKER_TRACKER));
/*
dataSet = imageTracker->createDataSet();
dataSet->load([@"NGLAR.xml" cStringUsingEncoding:NSASCIIStringEncoding], QCAR::DataSet::STORAGE_APPRESOURCE);
imageTracker->activateDataSet(dataSet);
*/
//markerTracker->start();

// Create frame markers:
if (!markerTracker->createFrameMarker(0, "MarkerQ", QCAR::Vec2F(50,50)) ||
!markerTracker->createFrameMarker(1, "MarkerC", QCAR::Vec2F(50,50)) ||
!markerTracker->createFrameMarker(2, "MarkerA", QCAR::Vec2F(50,50)) ||
!markerTracker->createFrameMarker(3, "MarkerR", QCAR::Vec2F(50,50)))
{
NSLog(@"Failed to create frame markers.");
}
else
{
NSLog(@"Successfully created frame markers.");
}

// Continue execution on the main thread
[self performSelectorOnMainThread:@selector(bumpAppStatus) withObject:nil waitUntilDone:NO];

[pool release];
}
0% like this - 0/0
Technology

NinevehGL is a 3D engine built right on top of OpenGL ES and it uses all the programmable pipeline power, making it easy for you to create great application with shaders.

Share on


Follow NinevehGL
Fastest way to contact us:

Copyright © 2011 db-in. All rights reserved.