Posts

Post not yet marked as solved
0 Replies
269 Views
In the ARKit face tracking configuration ARFaceTrackingConfiguration, we can get both depth and environment-lighting information (as coefficients of spherical-harmonics basis functions). My initial experiments indicate that "depth" and "environment-lighting" computation is not happening in the same co-ordinate space. How are these two co-ordinate systems differ? And, how we can transform either depth or environment-lighting in a common co-ordinate system so as to use them together?
Posted
by Sumit_.
Last updated
.
Post marked as solved
2 Replies
325 Views
Hi All,I am trying to read the "sphericalHarmonicsCoefficients: Data" object. I can print and see that the number of bytes is 108 in the retrieved object.I use the below code to read the "Data" object into a "Float" array.private func procSph(sphHar: Data) -> Array<Float32> { var sphCoeff = [Float]() var bytes = [UInt8]() var tmpByte: UInt8 var tmpSph: Data var tmpFloat:Float = 0.0 var cnt:Int = 0 tmpSph = sphHar for i in 0...107 { cnt = cnt + 1 tmpByte = tmpSph.remove(at: i) bytes.append(tmpByte) if(cnt == 4) { memcpy(&tmpFloat, bytes, 4) sphCoeff.append(tmpFloat) cnt = 0 bytes.removeAll() } } return sphCoeff }So basically I am extracting 4 bytes, converting them to "Float" storing them into array. The above code works fine till the 54th byte, and then it gives an exception in line no. 16 as I try to read the 55th byte. Thanks for your help in advance _/\_ Best Regards,Sumit
Posted
by Sumit_.
Last updated
.
Post marked as solved
2 Replies
345 Views
Hi All,I am unable to retrieve the "ARDirectionalLightEstimate" instance from the ARFrame in a face-tracking AR session.The "lightEstimate" property of ARFrame gives me a "ARLightEstimate" object and not an "ARDirectionalLightEstimate". The below code return "false"ARsession.currentFrame?.lightEstimate is ARDirectionalLightEstimateIt would be great if someone can please share as to how we can extract the "ARDirectionalLightEstimate" instance in a face tracking AR session. Thanks for your help _/\_Best Regards,Sumit
Posted
by Sumit_.
Last updated
.