JNIEXPORT void JNICALL Java_com_codered_ared_TextReco_startCamera(JNIEnv *, jobject) { LOG("Java_com_codered_ared_TextReco_startCamera"); // Select the camera to open, set this to QCAR::CameraDevice::CAMERA_FRONT // to activate the front camera instead. QCAR::CameraDevice::CAMERA camera = QCAR::CameraDevice::CAMERA_DEFAULT; // Initialize the camera: if (!QCAR::CameraDevice::getInstance().init(camera)) return; // Configure the video background configureVideoBackground(); // Select the default mode: if (!QCAR::CameraDevice::getInstance().selectVideoMode( QCAR::CameraDevice::MODE_DEFAULT)) return; // Start the camera: if (!QCAR::CameraDevice::getInstance().start()) return; // Start the tracker: LOG("Starting TextTracker..."); QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); // Start the text tracker QCAR::Tracker* textTracker = trackerManager.getTracker(QCAR::Tracker::TEXT_TRACKER); if(textTracker != 0) textTracker->start(); }
JNIEXPORT void JNICALL Java_com_qualcomm_QCARSamples_VideoPlayback_VideoPlayback_startCamera(JNIEnv *, jobject) { LOG("Java_com_qualcomm_QCARSamples_VideoPlayback_VideoPlayback_startCamera"); // Initialize the camera: if (!QCAR::CameraDevice::getInstance().init()) return; // Configure the video background configureVideoBackground(); // Select the default mode: if (!QCAR::CameraDevice::getInstance().selectVideoMode( QCAR::CameraDevice::MODE_DEFAULT)) return; QCAR::setHint(QCAR::HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 2); // Start the camera: if (!QCAR::CameraDevice::getInstance().start()) return; // Start the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* imageTracker = trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER); if(imageTracker != 0) imageTracker->start(); }
JNIEXPORT void JNICALL Java_com_tvc_supastriker_SupaStriker_startCamera (JNIEnv *, jobject){ LOG("Java_com_tvc_supastriker_SupaStriker_startCamera"); QCAR::CameraDevice::CAMERA camera = QCAR::CameraDevice::CAMERA_DEFAULT; if(!QCAR::CameraDevice::getInstance().init(camera)){ LOG("Camera Could not be initialized..."); return; } configureVideoBackground(); if(!QCAR::CameraDevice::getInstance().selectVideoMode( QCAR::CameraDevice::MODE_DEFAULT)){ LOG("Video Mode Could not be set..."); return; } if(!QCAR::CameraDevice::getInstance().start()){ LOG("Camera Could not be started..."); return; } QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* imageTracker = trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER); if(imageTracker !=0){ imageTracker->start(); } }
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(); }
JNIEXPORT void JNICALL Java_com_robopeak_EasyQCAR_EasyQCAR_resume(JNIEnv *, jobject) { LOGI("EasyQCAR_resume"); // Initialize the camera: if (!QCAR::CameraDevice::getInstance().init()) return; // Configure the video background configureVideoBackground(); // Select the default mode: if (!QCAR::CameraDevice::getInstance().selectVideoMode( QCAR::CameraDevice::MODE_DEFAULT)) return; // Start the camera: if (!QCAR::CameraDevice::getInstance().start()) return; // Start the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* imageTracker = trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER); if(imageTracker != 0) imageTracker->start(); // Cache the projection matrix: const QCAR::CameraCalibration& cameraCalibration = QCAR::CameraDevice::getInstance().getCameraCalibration(); projectionMatrix = QCAR::Tool::getProjectionGL(cameraCalibration, 2.0f, 2000.0f); }
JNIEXPORT void JNICALL Java_com_tvc_supastriker_SupaStriker_stopCamera (JNIEnv *, jobject){ LOG("Java_com_tvc_supastriker_SupaStriker_stopCamera"); //Stop the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* imageTracker = trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER); if(imageTracker != 0) imageTracker->stop(); QCAR::CameraDevice::getInstance().stop(); QCAR::CameraDevice::getInstance().deinit(); }
JNIEXPORT void JNICALL Java_edu_pugetsound_vichar_ar_ARGameActivity_stopCamera(JNIEnv *, jobject) { LOG("Java_edu_pugetsound_vichar_ar_ARGameActivity_stopCamera"); // Stop the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* imageTracker = trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER); if(imageTracker != 0) imageTracker->stop(); QCAR::CameraDevice::getInstance().stop(); QCAR::CameraDevice::getInstance().deinit(); }
JNIEXPORT void JNICALL Java_name_nailgun_irrlichtvuforia_MainActivity_stopCamera(JNIEnv *, jobject) { LOG("Java_name_nailgun_irrlichtvuforia_MainActivity_stopCamera"); // Stop the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* imageTracker = trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER); if(imageTracker != 0) imageTracker->stop(); QCAR::CameraDevice::getInstance().stop(); QCAR::CameraDevice::getInstance().deinit(); }
JNIEXPORT void JNICALL Java_com_ar4android_rayPickingJME_RayPickingJMEActivity_stopCamera(JNIEnv *, jobject) { LOG("Java_com_ar4android_rayPickingJME_RayPickingJMEActivity_stopCamera"); // Stop the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* imageTracker = trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER); if(imageTracker != 0) imageTracker->stop(); QCAR::CameraDevice::getInstance().stop(); QCAR::CameraDevice::getInstance().deinit(); }
JNIEXPORT void JNICALL Java_com_miosys_finder_ui_PfinderTargets_stopCamera(JNIEnv *, jobject) { LOG("Java_com_miosys_finder_ui_PfinderTargets_stopCamera"); // Stop the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* imageTracker = trackerManager.getTracker(QCAR::ImageTracker::getClassType()); if(imageTracker != 0) imageTracker->stop(); QCAR::CameraDevice::getInstance().stop(); QCAR::CameraDevice::getInstance().deinit(); }
JNIEXPORT void JNICALL Java_com_robopeak_EasyQCAR_EasyQCAR_pause(JNIEnv *,jobject) { LOGI("EasyQCAR_pause"); // Stop the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* imageTracker = trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER); if(imageTracker != 0) imageTracker->stop(); QCAR::CameraDevice::getInstance().stop(); QCAR::CameraDevice::getInstance().deinit(); }
JNIEXPORT void JNICALL Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_stopCamera(JNIEnv *, jobject) { LOG("Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_stopCamera"); // Stop the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* imageTracker = trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER); if(imageTracker != 0) imageTracker->stop(); QCAR::CameraDevice::getInstance().stop(); QCAR::CameraDevice::getInstance().deinit(); }
JNIEXPORT void JNICALL Java_com_wheelphone_targetNavigation_WheelphoneTargetNavigation_stopCamera(JNIEnv *, jobject) { LOG("Java_com_qualcomm_QCARSamples_FrameMarkers_FrameMarkers_stopCamera"); // Stop the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* markerTracker = trackerManager.getTracker(QCAR::Tracker::MARKER_TRACKER); if(markerTracker != 0) markerTracker->stop(); QCAR::CameraDevice::getInstance().stop(); QCAR::CameraDevice::getInstance().deinit(); }
JNIEXPORT void JNICALL Java_com_codered_ared_TextReco_stopCamera(JNIEnv *, jobject) { LOG("Java_com_codered_ared_TextReco_stopCamera"); // Stop the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); // Stop the text tracker QCAR::Tracker* textTracker = trackerManager.getTracker(QCAR::Tracker::TEXT_TRACKER); if(textTracker != 0) textTracker->stop(); QCAR::CameraDevice::getInstance().stop(); QCAR::CameraDevice::getInstance().deinit(); }
JNIEXPORT void JNICALL Java_rajawali_vuforia_RajawaliVuforiaActivity_startCamera(JNIEnv *env, jobject object) { LOG("Java_rajawali_vuforia_RajawaliVuforiaActivity_startCamera"); // Select the camera to open, set this to QCAR::CameraDevice::CAMERA_FRONT // to activate the front camera instead. QCAR::CameraDevice::CAMERA camera = QCAR::CameraDevice::CAMERA_DEFAULT; // Initialize the camera: if (!QCAR::CameraDevice::getInstance().init(camera)) return; // Configure the video background configureVideoBackground(); // Select the default mode: if (!QCAR::CameraDevice::getInstance().selectVideoMode( QCAR::CameraDevice::MODE_DEFAULT)) return; // Start the camera: if (!QCAR::CameraDevice::getInstance().start()) return; // Start the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* markerTracker = trackerManager.getTracker( QCAR::MarkerTracker::getClassType()); if (markerTracker != 0) markerTracker->start(); QCAR::ImageTracker* imageTracker = static_cast<QCAR::ImageTracker*>(trackerManager.getTracker( QCAR::ImageTracker::getClassType())); if (imageTracker != 0) imageTracker->start(); // Start cloud based recognition if we are in scanning mode: if (scanningMode) { QCAR::TargetFinder* targetFinder = imageTracker->getTargetFinder(); assert(targetFinder != 0); targetFinder->startRecognition(); } }
JNIEXPORT void JNICALL Java_com_ar4android_rayPickingJME_RayPickingJMEActivity_startCamera(JNIEnv *, jobject) { LOG("Java_com_ar4android_rayPickingJME_RayPickingJMEActivity_startCamera"); // Select the camera to open, set this to QCAR::CameraDevice::CAMERA_FRONT // to activate the front camera instead. QCAR::CameraDevice::CAMERA camera = QCAR::CameraDevice::CAMERA_DEFAULT; // Initialize the camera: if (!QCAR::CameraDevice::getInstance().init(camera)) return; // Configure the video background configureVideoBackground(); // Select the default mode: if (!QCAR::CameraDevice::getInstance().selectVideoMode( QCAR::CameraDevice::MODE_DEFAULT)) return; // QCAR::VideoMode videoMode = cameraDevice. // getVideoMode(QCAR::CameraDevice::MODE_OPTIMIZE_QUALITY); // Start the camera: if (!QCAR::CameraDevice::getInstance().start()) return; QCAR::setFrameFormat(QCAR::RGB565, true); // Uncomment to enable flash //if(QCAR::CameraDevice::getInstance().setFlashTorchMode(true)) // LOG("IMAGE TARGETS : enabled torch"); // Uncomment to enable infinity focus mode, or any other supported focus mode // See CameraDevice.h for supported focus modes //if(QCAR::CameraDevice::getInstance().setFocusMode(QCAR::CameraDevice::FOCUS_MODE_INFINITY)) // LOG("IMAGE TARGETS : enabled infinity focus"); // Start the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* imageTracker = trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER); if(imageTracker != 0) imageTracker->start(); }
JNIEXPORT void JNICALL Java_com_mx_ipn_escom_ars_recorrido_ReconocerActivity_stopCamera(JNIEnv *, jobject) { LOG("Java_com_mx_ipn_escom_ars_recorrido_ReconocerActivity_stopCamera"); // Stop the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* imageTracker = trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER); if(imageTracker != 0) imageTracker->stop(); LOG("Antes de stop"); QCAR::CameraDevice::getInstance().stop(); LOG("Despues de stop"); QCAR::CameraDevice::getInstance().deinit(); LOG("Despues de deinit"); }
JNIEXPORT void JNICALL Java_com_wheelphone_targetNavigation_WheelphoneTargetNavigation_startCamera(JNIEnv *, jobject) { LOG("Java_com_qualcomm_QCARSamples_FrameMarkers_FrameMarkers_startCamera"); // Select the camera to open, set this to QCAR::CameraDevice::CAMERA_FRONT // to activate the front camera instead. QCAR::CameraDevice::CAMERA camera = QCAR::CameraDevice::CAMERA_DEFAULT; // Initialize the camera: if (!QCAR::CameraDevice::getInstance().init(camera)) return; // Select the default mode: // MODE_DEFAULT gives 480x320, MODE_OPTIMIZE_QUALITY gives 640x480 (sony xperia mini) if (!QCAR::CameraDevice::getInstance().selectVideoMode( QCAR::CameraDevice::MODE_OPTIMIZE_QUALITY)) //MODE_DEFAULT)) // return; // Configure the video background configureVideoBackground(); // Select the default mode: //if (!QCAR::CameraDevice::getInstance().selectVideoMode( // QCAR::CameraDevice::MODE_DEFAULT)) // return; // Start the camera: if (!QCAR::CameraDevice::getInstance().start()) return; // Start the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* markerTracker = trackerManager.getTracker(QCAR::Tracker::MARKER_TRACKER); if(markerTracker != 0) markerTracker->start(); else LOG("markerTracker not started!\n"); }
JNIEXPORT void JNICALL Java_com_miosys_finder_ui_PfinderTargets_startCamera(JNIEnv *,jobject, jint camera) { LOG("Java_com_miosys_finder_ui_PfinderTargets_startCamera"); currentCamera = static_cast<QCAR::CameraDevice::CAMERA> (camera); // Initialize the camera: if (!QCAR::CameraDevice::getInstance().init(currentCamera)) return; // Configure the video background configureVideoBackground(); // Select the default mode: if (!QCAR::CameraDevice::getInstance().selectVideoMode( QCAR::CameraDevice::MODE_DEFAULT)) return; // Start the camera: if (!QCAR::CameraDevice::getInstance().start()) return; // Uncomment to enable flash // if(QCAR::CameraDevice::getInstance().setFlashTorchMode(true)) // LOG("IMAGE TARGETS : enabled torch"); // Uncomment to enable infinity focus mode, or any other supported focus mode // See CameraDevice.h for supported focus modes if(QCAR::CameraDevice::getInstance().setFocusMode(QCAR::CameraDevice::FOCUS_MODE_INFINITY)) LOG("IMAGE TARGETS : enabled infinity focus"); // Start the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* imageTracker = trackerManager.getTracker(QCAR::ImageTracker::getClassType()); if(imageTracker != 0) imageTracker->start(); }
JNIEXPORT void JNICALL Java_edu_pugetsound_vichar_ar_ARGameActivity_startCamera(JNIEnv *, jobject) { LOG("Java_edu_pugetsound_vichar_ar_ARGameActivity_startCamera"); // Initialize the camera: if (!QCAR::CameraDevice::getInstance().init()) return; // Configure the video background configureVideoBackground(); // Select the default mode: if (!QCAR::CameraDevice::getInstance().selectVideoMode( QCAR::CameraDevice::MODE_DEFAULT)) return; // Start the camera: if (!QCAR::CameraDevice::getInstance().start()) return; // Uncomment to enable flash // if(QCAR::CameraDevice::getInstance().setFlashTorchMode(true)) // LOG("IMAGE TARGETS : enabled torch"); // Uncomment to enable infinity focus mode, or any other supported focus mode // See CameraDevice.h for supported focus modes if(QCAR::CameraDevice::getInstance().setFocusMode(QCAR::CameraDevice::FOCUS_MODE_INFINITY)) LOG("IMAGE TARGETS : enabled infinity focus"); if(QCAR::CameraDevice::getInstance().setFocusMode(QCAR::CameraDevice::FOCUS_MODE_CONTINUOUSAUTO)) LOG("IMAGE TARGETS : enabled continuous focus"); // Start the tracker: QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* imageTracker = trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER); if(imageTracker != 0) imageTracker->start(); }
void MSTracker::stop() { QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance(); QCAR::Tracker* imageTracker = trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER); if(imageTracker != 0) imageTracker->stop(); }