By cesarecf
on Wed, 06/20/2012 - 17:12
Hello!!
Context: I'm using the Qualcomm example @ImageTargets, the example by it`s own can change the datasets with a method called in cpp that changes the value of a flag that is being constantly checked by QCAR_onUpdateCallback (Or something alike, it`s the first class in the ImageTargets.cpp)
What did i do? i commented the "if" that verifies the flag value, letting just the "if" that checks the currently active dataset and they change between them on a loop
The issue: It stopped reading the images, i have checked with log and it is changing the datasets and it`s calling the renderframe, but doesnt read the trackable images. What could be happend?
The Code:
[CODE]
class ImageTargets_UpdateCallback : public QCAR::UpdateCallback
{
virtual void QCAR_onUpdate(QCAR::State& /*state*/)
{
//if (switchDataSetAsap)
//{
//switchDataSetAsap = false;
// Get the image tracker:
QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance();
QCAR::ImageTracker* imageTracker = static_cast(
trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER));
if (imageTracker == 0 || dataSetStonesAndChips == 0 || dataSetTarmac == 0 ||
imageTracker->getActiveDataSet() == 0)
{
LOG("Failed to switch data set.");
return;
}
if (imageTracker->getActiveDataSet() == dataSetStonesAndChips)
{
imageTracker->deactivateDataSet(dataSetStonesAndChips);
imageTracker->activateDataSet(dataSetTarmac);
LOG("Dataset change from stones->tarmac");
}
else
{
imageTracker->deactivateDataSet(dataSetTarmac);
imageTracker->activateDataSet(dataSetStonesAndChips);
LOG("Dataset change from tarmac->stones");
}
//}
}
};
[/CODE]
No compile errors, no runtime errors. I just know the datasets are being successfully changed, renderFrame its being executed, but it won`t recognize the trackables on them
Help please
Re: Changing Datasets Successfully but...
Re: Changing Datasets Successfully but...
Re: Changing Datasets Successfully but...
Re: Changing Datasets Successfully but...
Re: Changing Datasets Successfully but...
Re: Changing Datasets Successfully but...
Re: Changing Datasets Successfully but...