Hi alessandroB, i check it again, all remained the same, and when my target is recognized scanning just of target just stops, and with this kind of error in logCat
06-25 16:40:14.975: I/AR(6161): Successfully created ImageTarget.
06-25 16:40:14.975: I/QCAR(6161): Successfully created new trackable 'DecoLab' with rating '1'.
I also posted on_update method inside cpp can you help me to solve this problem, thanks in advance
// Use the following calls if you would like to customize the color of the UI
// targetFinder->setUIScanlineColor(1.0, 0.0, 0.0);
// targetFinder->setUIPointColor(0.0, 0.0, 1.0);
// Object to receive update callbacks from QCAR SDK
class ImageTargets_UpdateCallback: public QCAR::UpdateCallback {
virtual void QCAR_onUpdate(QCAR::State& state) { //NEW code for Cloud Reco
QCAR::TrackerManager& trackerManager =
QCAR::TrackerManager::getInstance();
QCAR::ImageTracker* imageTracker =
static_cast<QCAR::ImageTracker*>(trackerManager.getTracker(
QCAR::Tracker::IMAGE_TRACKER));
// Get the target finder:
QCAR::TargetFinder* targetFinder = imageTracker->getTargetFinder();
// Check if there are new results available:
const int statusCode = targetFinder->updateSearchResults();
if (statusCode < 0) {
char errorMessage[80];
sprintf(errorMessage, "Error with status code %d at frame %d",
statusCode, state.getFrame().getTimeStamp());
} else if (statusCode == QCAR::TargetFinder::UPDATE_RESULTS_AVAILABLE) {
// Process new search results
if (targetFinder->getResultCount() > 0) {
const QCAR::TargetSearchResult* result =
targetFinder->getResult(0);
// Check if this target is suitable for tracking:
if (result->getTrackingRating() > 0) {
// Create a new Trackable from the result:
QCAR::Trackable* newTrackable =
targetFinder->enableTracking(*result);
if (newTrackable != 0) {
LOG(
"Successfully created new trackable '%s' with rating '%d'.",
newTrackable->getName(), result->getTrackingRating());
if (strcmp(result->getUniqueTargetId(), lastTargetId)
!= 0) {
LOG("Recognized target name is %d",result->getUniqueTargetId());
//snprintf(targetMetadata, CONTENT_MAX, "%s", result->getMetaData());
// If the target has changed...
// app-specific: do something
// (e.g. generate new 3D model or texture)
}
strcpy(lastTargetId, result->getUniqueTargetId());
// Stop Cloud Reco scanning
//targetFinder->stop();
//scanningMode = false;
showStartScanButton = true;
}
}
}
}
}
};
ImageTargets_UpdateCallback updateCallback;
Hi alessandroB, i check it again, all remained the same, and when my target is recognized scanning just of target just stops, and with this kind of error in logCat