// ---------------------------------------------------------------------------- // DeInitialize Cloud Reco // ---------------------------------------------------------------------------- JNIEXPORT int JNICALL Java_com_qualcomm_QCARSamples_CloudRecognition_CloudReco_deinitCloudReco(JNIEnv *, jobject) { // Get the image tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::ImageTracker* imageTracker = static_cast<QCAR::ImageTracker*>( trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER)); if (imageTracker == NULL) { LOG("Failed to destroy the tracking data set because the ImageTracker has not" " been initialized."); return 0; } // Deinitialize visual search: QCAR::TargetFinder* finder = imageTracker->getTargetFinder(); finder->deinit(); return 1; }
JNIEXPORT int JNICALL Java_rajawali_vuforia_RajawaliVuforiaActivity_deinitCloudReco(JNIEnv *, jobject) { // Get the image tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::ImageTracker* imageTracker = static_cast<QCAR::ImageTracker*>(trackerManager.getTracker( QCAR::ImageTracker::getClassType())); if (imageTracker == NULL) { LOG( "Failed to deinit CloudReco as the ImageTracker was not initialized."); return 0; } // Deinitialize Cloud Reco: QCAR::TargetFinder* finder = imageTracker->getTargetFinder(); finder->deinit(); return 1; }