Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question AR Application getting the Devices Camera image

Discussion in 'AR' started by marsinator, Dec 12, 2022.

  1. marsinator

    marsinator

    Joined:
    Apr 15, 2022
    Posts:
    15
    I am implementing an App for Android that uses the AR Functions.

    I want to request the image of the Android Device Camera that is viewed on the screen. Is this a WebCamDevice or do i have to call the ARCameraBackground to get the texture?

    Is there someone that knows how to do it and maybe has some example code?
     
  2. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    718
  3. marsinator

    marsinator

    Joined:
    Apr 15, 2022
    Posts:
    15
    Is there a way to manipulate that image and display it back to the device screen in real time ?
     
  4. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    718
  5. marsinator

    marsinator

    Joined:
    Apr 15, 2022
    Posts:
    15
    I tried the sample from the docs you mentioned above and thought i would be able to implement it that way.
    From debugging i realised that the line 69 never get's executed
    do you know where it could have gone wrong?

    upload_2022-12-14_0-47-4.png
     
    Last edited: Dec 14, 2022
  6. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    718
    Line 69 is the first line of the method. It seems that whatever is supposed to call this method is not calling it?
     
  7. marsinator

    marsinator

    Joined:
    Apr 15, 2022
    Posts:
    15
    Got it. The script was on the wrong object in the sceen. How can i display the manipulated image back to the device screen?
     
  8. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    718
  9. marsinator

    marsinator

    Joined:
    Apr 15, 2022
    Posts:
    15
    Thanks

    what in your opinion would be the best way to achieve something like a perfect white teeth filter?
     
  10. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    718
    We don't offer this sort of use case consultation on the forums but the community is welcome to offer ideas
     
  11. marsinator

    marsinator

    Joined:
    Apr 15, 2022
    Posts:
    15
    I implemented the code example you showed above
    Seems to work
    But how do i have to set up the RawImage in the Unity Sceene?