Search Unity

Play Mode: Webcam profile not found, camera missing, 'Flip Horizontally' flag won't work

Discussion in 'Vuforia' started by rAigner, Oct 17, 2017.

  1. rAigner

    rAigner

    Joined:
    Sep 27, 2017
    Posts:
    9
    Hi,

    Vuforia beginner here. I am currently trying to run my first project (ImageTargets from core samples) in Unity via Play Mode emulation. Basically, it is running but I'm failing in using a webcam. In the Vuforia Inspector, at the "Webcam" section, I have several cameras to choose from. Unfortunately, the most reasonable one does not show up, which in my case is a FullHD USB webcam (Microsoft LifeCam Studio, working without any issues with Skype, AMCap, etc.). Instead, I get "Kinect V2 Video Sensor", "Intel Realsense 3D Camera Virtual Driver" (not working) and two industry cameras I have attached at my system (also not working since I don't have DirectShow drivers installed for them). The only camera seeming to work is the RGB sensor of my Kinect V2, but it is flipped horizontally which might be the reason for the failing marker detection. I tried to check the "Flip Horizontally" checkbox, but it doesn't change anything, the image remains mirrored. In the Webcam section I can also see a hint "No webcam profile has been found for your webcam model: 'Kinect V2 Video Sensor'. A default profile will be used. [...] You can create a custom profile for your camera by editing '[myprojectpath]/Assets\Editor/QCAR/WebcamProfiles/profiles.xml'." After searching the Vuforia forums, I found a sample that actually tells me what such an xml file is supposed to look like. I tried to add entries for my cameras in order to e.g. get the Realsense camera to work, but the hint remains, Vuforia does not seem to find the profile file. I also found some posts suggesting different locations for the file, such as Assets/Vuforia/Editor and Assets/Vuforia/Editor/WebcamProfiles, but no luck.

    A few questions come up:
    1) Any idea why my webcam is not found?
    2) Why does the Flip Horizontally option fail?
    3) How do I specify camera profiles?

    I'm using Unity 2017.2.0f3
     
  2. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    I'm not sure why your webcam isn't found. If it has the correct drivers it should be found within Unity and our config file.

    Flip Horizontally will not work with every webcam. The Kinect specifically is not a supported camera for Vuforia, so you won't see ideal performance on this.

    You can specify your camera profiles at this location:
    C:\Program Files\Unity\Editor\Data\PlaybackEngines\VuforiaSupport\VuforiaResources
    Make sure when you define your webcam that you name it exactly the same as the camera you are planning on using.

    Thanks!
     
    DHein likes this.
  3. borktron

    borktron

    Joined:
    Nov 14, 2015
    Posts:
    6
    I have a similar issue. While following the project migration guide:
    https://library.vuforia.com/content...ticles/Solution/migrate-vuforia-62-to-65.html

    Using Unity 2017.2.0f3 I get an error in VuforiaConfiguration settings "An error occurred while trying to enable Vuforia play mode".
    Camera is "FaceTime HD Camera".
    I have attempted to change profile naming in Applications/Unity/PlaybackEngines/VuforiaSupport/VuforiaResources/WebcamProfiles.xml from "FaceTime HD Camera (Built-in)" to "FaceTime HD Camera".
    I have also attempted to put a "profiles.xml" file in [unity project]/Assets/Editor/QCAR/WebcamProfiles/profiles.xml (As suggested by the warning exhibited in VuforiaConfiguration when a profile is not found).

    Issue persists.

    I am running Mac OS 10.13 (High Sierra).
    Unity 2017.20f3 is installed on an external hard drive. (Could install location have an influence?)
     
    aboodrazeqxx likes this.
  4. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    Hey borktron,

    I know other users have had issues when Unity is installed on an external drive, would you be able to test this with Unity installed on a local drive and see if the issue persists?

    Thanks!
     
  5. borktron

    borktron

    Joined:
    Nov 14, 2015
    Posts:
    6
    Hello,

    I've installed Unity 2017.2.0f3 locally on my computer.The issue persists.
    It seems that the issue is with my migrated project.

    Creating a new project, adding a Vuforia ARCamera to the scene, and activating Vuforia in XR settings, shows me 2 discrepancies from my migrated project.
    1) The VuforiaConfiguration file shows the Vuforia verison (6.5.22) at the top of the inspector.
    In my migrated project, there is no version number present, above where I have entered my License key.
    2) The webcam has no issues.

    It seems that the VuforiaConfiguration in my migrated project has some sort of loading/initialization issue(?)

    Any advice on how to troubleshoot this issue would be greatly appreciated!

    Thanks in advance! And thanks for the fast response. :)
     
  6. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
  7. borktron

    borktron

    Joined:
    Nov 14, 2015
    Posts:
    6
    I am not referring to a different migration. I made that clear in my original post, in this thread, which includes the same link. :)

    I will attempt migrate again from scratch.
     
  8. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    Sorry about that.

    In the migrated project where you don't see any version number, do you see any other warnings or errors in your console? I know your webcam is having issues, but in the migrated project are you able to deploy to a device? If so, do your targets work?
     
  9. borktron

    borktron

    Joined:
    Nov 14, 2015
    Posts:
    6
    Hi again,
    I've now attempted to migrate again on my local hard drive, using the guide:
    https://library.vuforia.com/content...ticles/Solution/migrate-vuforia-62-to-65.html
    The webcam issue persists.

    To answer your questions:
    - There are No errors in the console, in any of the scenes containing Vuforia targets and ARcamera.
    - It is possible to deploy to an iOS device, Once a Vuforia ARcamera is activated, the camera is shown, with Vuforia watermark (isn't that only in older versions?), and detects the first target. In the next scene it fails to detect the same target ( this may just be project specific bug that occurred after migration).

    In regard to the project I would like to migrate:

    - I never had a "Assets/Plugins/x86/VuforiaWrapper.dll" file. (migration guide says to remove it). Relevant?
    - project is currently in 5.6.3p4 (NOTICE: patch 4).
    - Project has already been upgraded from an even older version of Vuforia, so maybe there are some ancient Vuforia related files are wrecking havoc(?).
    - I have removed several plugins to see if they had any influence. Currently using one plugin: GameSparks.

    My Plans:
    Creating a new project, adding an ARCamera, turning on Vuforia in XR settings, results in webcam working fine.
    So the issue is specific to the project.

    My plan is to start deleting files to find a potential cause.
    If that doesn't give any answers, I'll >migrate< my migrated 2017.2 files, into the new project that has already recognized the webcam.

    If you have any more suggestions let me know! ✌️
     
  10. borktron

    borktron

    Joined:
    Nov 14, 2015
    Posts:
    6
    One more question:
    In the migration guide, it says to remove files, fx.
    "Folder1/Folder2/*.* "
    I have read this as removing all files located in "Folder2" while keeping the folder, "Folder2".
    Is this a correct assumption?

    Thanks!
     
    nuno_dias likes this.
  11. borktron

    borktron

    Joined:
    Nov 14, 2015
    Posts:
    6
    Seems like the solution was to delete Assets/Plugins/VuforiaWrapper.bundle !
    I hadn't done this. The guide says:
    Open the 6.5 project directory (using Explorer or Finder) and delete the following files and folders (the associated "*.meta" files will be removed by Unity next time you open it):
    "16: Assets/Plugins/VuforiaWrapper.bundle/*.* "


    I had only deleted the contents of the package!

    It works!! But It seems that the camera now has a much lower FPS / more lag..
    This is for sure a step in the right direction.
    I'd like to request that step 16 in the migration guide be changed to: "16: Assets/Plugins/VuforiaWrapper.bundle"
    If it is indeed the entire .bundle file that must be deleted. :)
     
    Vuforia-Strasza likes this.
  12. JULIANA96

    JULIANA96

    Joined:
    Oct 3, 2018
    Posts:
    2
    i have problem with my project. In unity my camera able to run in play mode but after i integrate to .exe the camera did not functioning....what should i do?
     
    Rispat-Momit likes this.