Go to the VuforiaSDK/samples/UVCDriver directory.These instructions assume that the “Compile Dependencies” section above was followed. /ndk-build ( ndk-build.cmd on Windows).Open terminal and change directory to the jni-build directory: UVCCamera/libuvccamera/src/main/jni.The UVCCamera directory should be located in VuforiaSDK/samples/UVCDriver/UVCCamera Clone the repository to VuforiaSDK/Samples/UVCDriver directory.The UVCDriver directory should be located in VuforiaSDK/samples/UVCDriver/
As the Driver needs to be implemented in C++, a pointer to the current JVM-instance needs to be injected through the Vuforia Engine stack into the Driver using the userData pointer passed in with the Vuforia::setExternalProviderLibrary() call. The UVC Camera Driver uses the Java-based Android USBManager API to access camera data. The current supported cameras profiles are: The UVCCamera library that this sample uses have implemented the device handle injection. So Android's USBManager is needed to obtain a device handle and then inject it into libusb through libuvc. Unmodified versions of libuvc and libub do not work directly on Android because the USB-device handles can't be obtained in the same way as on a standard desktop Linux-system. This library uses modified versions of libusb and libuvc to handle the USB-cameras. The sample plugin uses an open source UVCCamera library to access camera frame data from USB-cameras. You can download the UVC Camera Driver Sample from the Vuforia Developer Portal. The UVC Camera Driver Sample is an implementation of an External Camera using the Vuforia Engine Driver Framework and has been designed to work on both handheld devices and Qualcomm’s Dragonboard 410C .
The UVC (USB Video Class) Camera Driver Sample demonstrates how to access a USB camera from within Android. The equivalent of this page or topic can be found here: Building and Using the UVC Camera Driver Sample. We recommend migrating to the Vuforia Engine 10 API before this page is removed in February 2022. It has been deprecated and will no longer be actively updated. This page concerns the Vuforia Engine API version 9.8 and earlier.