Skip to content

Need clarification on camera convention for iPhone dataset #12

@NagabhushanSN95

Description

@NagabhushanSN95

From the existing documentation, it appears that the camera extrinsics are in OpenCV convention (x, -y, -z) or (right, down, into the scene) and are in world-to-camera (w2c) format. Is this right?

I tried warping a frame from the apple scene to the other viewpoint using the depth given. Can you help me with the details? Should the depth be scaled?

The warped frame is not matching the second frame. I used this code to warp the frame.

I read the data as follows:

              camera_params = read_json(camera_params_path)

              focal_length = camera_params['focal_length']
              principal_point = camera_params['principal_point']
              intrinsic = numpy.eye(3)
              intrinsic[0, 0] = focal_length
              intrinsic[1, 1] = focal_length
              intrinsic[0, 2] = principal_point[0]
              intrinsic[1, 2] = principal_point[1]

              rotation_matrix = numpy.array(camera_params['orientation'])
              translation_vector = numpy.array(camera_params['position'])
              extrinsic = numpy.eye(4)
              extrinsic[:3, :3] = rotation_matrix
              extrinsic[:3, 3] = translation_vector
    warper = Warper()
    frame1 = warper.read_image(frame1_path)[:, :, :3]
    frame2 = warper.read_image(frame2_path)[:, :, :3]
    depth1 = warper.read_depth(depth1_path)[:, :, 0]

    warped_frame2 = warper.forward_warp(frame1, None, depth1, extrinsic1, extrinsic2, intrinsic1, intrinsic2)[0]

The frames look like below.
frame1
frame2
frame2_warped

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