本文整理汇总了C++中qcar::TargetFinder::clearTrackables方法的典型用法代码示例。如果您正苦于以下问题:C++ TargetFinder::clearTrackables方法的具体用法?C++ TargetFinder::clearTrackables怎么用?C++ TargetFinder::clearTrackables使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qcar::TargetFinder
的用法示例。
在下文中一共展示了TargetFinder::clearTrackables方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assert
// ----------------------------------------------------------------------------
// Enables CloudReco Service
// ----------------------------------------------------------------------------
JNIEXPORT void JNICALL
Java_com_qualcomm_QCARSamples_CloudRecognition_CloudReco_enterScanningModeNative(JNIEnv*, jobject)
{
QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance();
QCAR::ImageTracker* imageTracker = static_cast<QCAR::ImageTracker*>(
trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER));
assert(imageTracker != 0);
QCAR::TargetFinder* targetFinder = imageTracker->getTargetFinder();
assert (targetFinder != 0);
// Start CloudReco
crStarted = targetFinder->startRecognition();
// Clear all trackables created previously:
targetFinder->clearTrackables();
scanningMode = true;
// Updates state variables
showAnimation3Dto2D = false;
showAnimation2Dto3D = false;
isShowing2DOverlay = false;
renderState = RS_SCANNING;
}
示例2:
JNIEXPORT void JNICALL
Java_rajawali_vuforia_RajawaliVuforiaActivity_stopCamera(JNIEnv *, jobject) {
LOG("Java_rajawali_vuforia_RajawaliVuforiaActivity_stopCamera");
// Stop the tracker:
QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance();
QCAR::Tracker* markerTracker = trackerManager.getTracker(
QCAR::MarkerTracker::getClassType());
if (markerTracker != 0)
markerTracker->stop();
QCAR::ImageTracker* imageTracker =
static_cast<QCAR::ImageTracker*>(trackerManager.getTracker(
QCAR::ImageTracker::getClassType()));
if (imageTracker != 0)
imageTracker->stop();
QCAR::CameraDevice::getInstance().stop();
// Stop Cloud Reco:
QCAR::TargetFinder* targetFinder = imageTracker->getTargetFinder();
assert(targetFinder != 0);
targetFinder->stop();
// Clears the trackables
targetFinder->clearTrackables();
QCAR::CameraDevice::getInstance().deinit();
initStateVariables();
}