Right now all I get printed from it are stuff like <0x12494932> or <0x23445839>, which isn’t really usable data (or is it? I don’t really know). Is there a way to convert or receive the depth data in meters or centimeters instead?
Is there a way to convert the data from ARDepthData into something like meters or centimeters?
Looks like hexadecimal data?
If that's the case, it could be translated using a hexadecimal to decimal converter.
Could you try to measure an object you know the length of, translate the values to decimal and see if they match?
If yes, then that could be a potential solution. Also, I think you can convert those values directly in Swift, following this StackOverflow post.
Best,
William
If that's the case, it could be translated using a hexadecimal to decimal converter.
Could you try to measure an object you know the length of, translate the values to decimal and see if they match?
If yes, then that could be a potential solution. Also, I think you can convert those values directly in Swift, following this StackOverflow post.
Best,
William
Did you maybe just print the binary data in memory for the ARDepthData object?
ARDepthData has a depth map and a confidence map (see the documentation here: https://developer.apple.com/documentation/arkit/ardepthdata). The depth map is a pixel buffer where each pixel's value defines that region's distance from the camera in meters.
ARDepthData has a depth map and a confidence map (see the documentation here: https://developer.apple.com/documentation/arkit/ardepthdata). The depth map is a pixel buffer where each pixel's value defines that region's distance from the camera in meters.