Search Unity

Question Get raw webcam texture from MARS Camera

Discussion in 'Unity MARS' started by andysdds, Jan 14, 2021.

  1. andysdds

    andysdds

    Joined:
    Aug 29, 2019
    Posts:
    11
    Hi ,
    I want to do some image analytics from the camera , without any 3D Object and UI , just raw image from camera , I remember in old AR kit , the camera raw image is draw on the material , is there something like that in MARS? or I can test it in editor?

    Thank you
     
  2. CiaranWills

    CiaranWills

    Unity Technologies

    Joined:
    Apr 24, 2020
    Posts:
    199
    You should be able to use the IUsesCameraTexture interface to get the camera image. In the editor I think this works if you are simulating the front facing camera but not the rear facing one.

    Let us know if you need more help!
     
  3. andysdds

    andysdds

    Joined:
    Aug 29, 2019
    Posts:
    11
    Thank you so much for the reply ,
    I am using the "GetCameraTexture" from IUsesCameraTexture , unfortunately , I am not using the front facing camera , and I got a null texture when I in editor , is MARS didn't support it yet ?
     
  4. CiaranWills

    CiaranWills

    Unity Technologies

    Joined:
    Apr 24, 2020
    Posts:
    199
    No, unfortunately we don't yet support the rear facing camera in the editor.
     
  5. andysdds

    andysdds

    Joined:
    Aug 29, 2019
    Posts:
    11
    Thank you for you help , at least I can find a way to get the image , I hope it will be a feature in the roadmap.