Home > front end >  Android: how to know if a device has a ToF sensor ? (Time-of-Flight)
Android: how to know if a device has a ToF sensor ? (Time-of-Flight)

Time:02-01

I wonder what is the code to know if a device has a ToF sensor (Time-of-Flight).

Thanks

CodePudding user response:

There is no api provided by the android platform for ToF sensors as only very few devices are operational with this feature.

You can check this question. Only huawei is providing support using the AR Engine SDK.

CodePudding user response:

From what I understand, ARCore enables to provide us the depth of each point from the camera using nothing but matching learning But they do mention in some places that devices that have some kind of depth sensor may be used during their calculation but I'm not sure if there is a way to check if a device does have a sensor using their API. If you want ARCore to ignore any sensor and use only their algorithm you can configure the camera like that:

// Create a camera config filter for the session.
val filter = CameraConfigFilter(session)

// Return only camera configs that will not use the depth sensor.
filter.depthSensorUsage = EnumSet.of(CameraConfig.DepthSensorUsage.DO_NOT_USE)
  •  Tags:  
  • Related