Search Unity

Access WebcamTexture while Vuforia is running

Discussion in 'Vuforia' started by poisonnuke, May 14, 2019.

  1. poisonnuke

    poisonnuke

    Joined:
    Nov 22, 2016
    Posts:
    82
    Hello,

    I would like to take a photo during Vuforia is running and tracking.

    Simply using a webcamtexture is not possible, as the Unity implementation of WebCamTexture only allows one active instance.

    Retrieving the instance of the WebCamTexture used by Vuforia seems to be not possible as well, as it is generated during runtime and the only way to access the reference is to search for the meshrenderer and retrieve the Texture. But I get only a grey image from this Texture (when casted to Texture2D).

    What else can I try?
     
  2. StickerMonster

    StickerMonster

    Joined:
    Sep 14, 2018
    Posts:
    2
    I am having this issue currently so I'm therefore gonna bump this here thread.

    I'm making an AR game and would love to be able to basically make a "match the color" style minigame. I can access the color at pixel(x, y) by using the regular ol' WebCamTexture, but that disables Vuforia using it for the AR camera. I've used the script on the Vuforia Dev portal to access the info, but in the editor it only allows for access of the greyscale image. How can I get the color video stream information?

    Anyone have any ideas?
     
  3. Sika_MC

    Sika_MC

    Vuforia

    Joined:
    Jul 17, 2019
    Posts:
    19
  4. StickerMonster

    StickerMonster

    Joined:
    Sep 14, 2018
    Posts:
    2
    That article is 7 years old and contains namespaces that no longer exist. I am able to access the camera image in black-and-white (which is information that second link provides), but I need the color image - it will not let me access the color image in the Unity Editor. Is there a more up-to-date solution?