Log in or register to post comments

UVC Camera Driver explanation

July 4, 2019 - 1:01am #1

Hi, I'm following the guide given in "Building and Using the UVC Camera Driver Sample" (https://library.vuforia.com/content/vuforia-library/en/articles/Solution/uvc-camera-driver.html) to get video streaming from a USB webcam connected to a phone with Android OS.

It is not very clear to me how I should proceed in the last paragraph "Using UVC Camera Driver" in the case of Unity.

In points 1 and 2 how do I add the libUVCDriver.so, libuvc, libusb, libjpeg-turbo and UVCDriver.jar files in an Unity project? Do I need to edit the gradle file? If so, how can I change it to Unity?

In step 3 where do I find the Vuforia :: init () statement?

In point 4.b can the code be added in a script linked to any object in the Unity project?

Finally, I modified the ExternalCameraCalibration.xml file as shown, with the settings of my USB camera. But now this file must be copied to some Unity folder?

UVC Camera Driver explanation

May 20, 2021 - 3:33am #5

Hi, How did you load the UVC driver?

When I open the app it's giving me the error your Driver is not successfully loaded.

UVC Camera Driver explanation

October 28, 2019 - 3:41am #4

Hi Metal90, I'm currently facing the same issue as you are here. I'm confused as to how to proceed with "Using UVC Camera Driver". Where do I have to put the libraries, "libUVCDriver.so, libuvc, libusb, libjpeg-turbo and UVCDriver.jar" ? Also for "Add following call, "Vuforia::setDriverLibrary("libUVCDriver.so", nullptr);", to your source code before calling Vuforia::init();" where is the source code located? Finally, for "In Unity, after the driver is loaded, this code must be added to the application to request permission to access the camera.", how do I load the driver into Unity? Hope you've managed to solve this issue. If not, could anyone here help? Thank you.

UVC Camera Driver explanation

July 15, 2019 - 8:06am #3

Please help me. How can I analyze video frames from an external USB camera connected to an Android device via USB?

 

UVC Camera Driver explanation

July 4, 2019 - 4:05am #2

I tried to do the following:

I copied the mainTemplate.gradle file into Assets / Plugins / Android and modified it as indicated in points 1 and 2, then adding:

android {

    sourceSets.main {

        jniLibs.srcDirs += '[path-in-your-filesystem]/UVCDriver/build/bin/Android/'

    }

}

and

dependencies {

    implementation files("[path-in-your-filesystem]/UVCDriver/build/bin/Android/UVCDriver.jar")

}

Obviously I replaced [path-in-your-filesystem] with the correct path.

I ignored point 3 and added the code indicated in 4b in an Awake method of a script linked to an object in my project called CameraManager. I also added the file ExternalCameraCalibration.xml in Assets / Plugins / Android.

The building runs successfully, but when I run the app on my smartphone, the sentence INIT VUFORIA DRIVER FAILED appear.

Where did I go wrong?

Log in or register to post comments