-
Notifications
You must be signed in to change notification settings - Fork 20
Description
If I see it correctly, the internal orientation in the current implementation is only saved once, using the last frame. But the camera constantly refocuses during the scan. In order to better evaluate the data, the current camera parameters would therefore be needed for each scan. Perhaps the simplest solution would be to retrieve the three or four parametersof the internal ortientation and append them to the file odometry.csv in the class OdometryEncoder.
scanner/StrayScanner/Helpers/OdometryEncoder.swift
Lines 32 to 41 in e0e2522
| func add(frame: ARFrame, currentFrame: Int) { | |
| let transform = frame.camera.transform | |
| transforms.append(transform) | |
| let xyz: vector_float3 = getTranslation(T: transform) | |
| let q_WA = simd_quatf(transform) | |
| let q: vector_float4 = (q_WA * q_AC).vector | |
| let frameNumber = String(format: "%06d", currentFrame) | |
| let line = "\(frame.timestamp), \(frameNumber), \(xyz.x), \(xyz.y), \(xyz.z), \(q.x), \(q.y), \(q.z), \(q.w)\n" | |
| self.fileHandle.write(line.data(using: .utf8)!) | |
| } |
I don't have access to a Mac, otherwise I would have created a pull request by myself. But I would be happy if this could be implemented, because with the current implementation, moving scans with changing internal orientation cannot be processed. Thank you very much.