Post

Replies

Boosts

Views

Activity

Reply to Custom RealityKit occlusion based on Depth map
Ok I figured it out. This depth value is just "z" component of x,y,z coordinates. rest of code: var intrinsics = cameraIntrinsics intrinsics[0][0] /= cameraToDepthRatio intrinsics[1][1] /= cameraToDepthRatio intrinsics[2][0] /= cameraToDepthRatio intrinsics[2][1] /= cameraToDepthRatio let depthMapPixelPoint = pointOnBuffer let xrw = ((Float(depthMapPixelPoint.x) - intrinsics[2][0]) * depth / intrinsics[0][0]) let yrw = (Float(depthMapPixelPoint.y) - intrinsics[2][1]) * depth / intrinsics[1][1] // Y is UP in camera space, vs it being DOWN in image space. let localPoint = simd_float3(xrw, -yrw, -depth) let worldPoint = viewMatrix.inverse * simd_float4(localPoint, 1) let result = simd_float3(worldPoint.x, worldPoint.y, worldPoint.z) let vector = result - cameraPosition let distance = simd_length(vector)
Topic: Spatial Computing SubTopic: ARKit Tags:
Jun ’23
Reply to Custom RealityKit occlusion based on Depth map
I was experimenting for few days and checking other people solutions but problem with incorrect depth values when iPad is rotated seems to be in every implementation. I collected data representing depth error percentage comparing real depth with depth from depthMap for iPad camera angles from 0 to 30 degrees and there is clear correlation: For 30 degrees error is about 13%. (with confidence == 2) What am I missing here? Any help would be appreciated, thanks:)
Topic: Spatial Computing SubTopic: ARKit Tags:
Feb ’23
Reply to Custom RealityKit occlusion based on Depth map
Ok I figured it out. This depth value is just "z" component of x,y,z coordinates. rest of code: var intrinsics = cameraIntrinsics intrinsics[0][0] /= cameraToDepthRatio intrinsics[1][1] /= cameraToDepthRatio intrinsics[2][0] /= cameraToDepthRatio intrinsics[2][1] /= cameraToDepthRatio let depthMapPixelPoint = pointOnBuffer let xrw = ((Float(depthMapPixelPoint.x) - intrinsics[2][0]) * depth / intrinsics[0][0]) let yrw = (Float(depthMapPixelPoint.y) - intrinsics[2][1]) * depth / intrinsics[1][1] // Y is UP in camera space, vs it being DOWN in image space. let localPoint = simd_float3(xrw, -yrw, -depth) let worldPoint = viewMatrix.inverse * simd_float4(localPoint, 1) let result = simd_float3(worldPoint.x, worldPoint.y, worldPoint.z) let vector = result - cameraPosition let distance = simd_length(vector)
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to MTLRenderCommandEncoder in ARView postProcess
During "Metal lab" with Apple, Metal engineer told me that it is ok
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to Custom RealityKit occlusion based on Depth map
I was experimenting for few days and checking other people solutions but problem with incorrect depth values when iPad is rotated seems to be in every implementation. I collected data representing depth error percentage comparing real depth with depth from depthMap for iPad camera angles from 0 to 30 degrees and there is clear correlation: For 30 degrees error is about 13%. (with confidence == 2) What am I missing here? Any help would be appreciated, thanks:)
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
Feb ’23
Reply to Certificate chain in SecIdentity vs sec_identity_t
Thank you! :)
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to Getting specific error when validating certificate, SecTrustEvaluateWithError
Thank you :) It works. I didn't know SecPolicyCreateBasicX509 is like "just check the minimum"
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to Getting specific error when validating certificate, SecTrustEvaluateWithError
It is coming from IoT device wrong hostname because we are connecting via IP address, this is not really a problem because we have SAN name long expiration date is our real problem here, we do not want to generate new certificates every 825 days
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’22