Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
3.02k stars 1.12k forks source link

How to convert XRCpuImage to PointCloud? #966

Closed tabeaeggler closed 2 years ago

tabeaeggler commented 2 years ago

I try to extract the complete point cloud from the XRCpuImage in CpuImageSample.cs: https://github.com/Unity-Technologi...es/blob/main/Assets/Scripts/CpuImageSample.cs. How do I have to extend this class?

tdmowrer commented 2 years ago

Do you mean this? https://github.com/Unity-Technologies/arfoundation-samples#allpointcloudpoints

tabeaeggler commented 2 years ago

Hi @tdmowrer. No, this only detects the feature points. I need the full point cloud out of the depth map with around 50'000 points per frame.

tdmowrer commented 2 years ago

I'm not sure what you are asking for. A feature point is a point in the point cloud; where do you expect to get 50k points per frame?

tdmowrer commented 2 years ago

Maybe you mean the depth texture available on some devices? https://github.com/Unity-Technologies/arfoundation-samples#depthimages

tabeaeggler commented 2 years ago

I have just specified the question above. Hope it's clear now :)

andyb-unity commented 2 years ago

AR Foundation does not provide an interface to convert an XRCpuImage to a point cloud, but for community support for your inquiry you could try our forums: https://forum.unity.com/forums/ar.161/