Skip to content

Camera intrinsics are changing during the scan #17

@jdaemmig

Description

@jdaemmig

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.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions