Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
2.98k stars 1.11k forks source link

Get raw ARFoundation camera image without instantiated objects or GUI #1058

Closed romanvanderaa closed 1 year ago

romanvanderaa commented 1 year ago

I'm trying to get the camera image of my ARFoundation IOS application, without augmented 3D objects and without the UI buttons. I'm trying to get this done by using TryAcquireLatestCpuImage. I'm wondering if this is the most efficient way, if it's even a correct way to achieve what I want. Maybe someone has had success with this or other methods, I can't find a lot of documentation on this!

Looking forward to hear from you all!

ankur-unity commented 1 year ago

@romanvanderaa - You can access the camera background image either on the CPU or GPU?

For GPU: https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/manual/index.html#copying-the-camera-texture-to-a-render-texture-when-accessing-the-camera-image-on-the-gpu

CPU: https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/manual/index.html#accessing-the-camera-image-on-the-cpu