Skip to content

e2e: yaw, pitch, roll swapped #28

Description

@ivantishchenko

Thank you for open-sourcing this library!

I'm confused about the arguments h_deg, v_deg, roll for e2e.

Using this example of e2e:

       img_hdr = e2e(torch.from_numpy(img_hdr),
                      h_deg=h_deg,
                      v_deg=v_deg,
                      roll=roll,
                      mode='bilinear',
                      channels_first=False).numpy()

Judging from the naming of arguments and also from the doc stub, I would expect that h_deg shift the image left/right, v_deg would shift the image up/down, and that roll would rotate clockwise/counter-clockwise.

However, that mapping I got while experimenting is actually:

  • shifting image horizontally is the parameter v_deg.
  • shifting image vertically is the parameter roll
  • rolling the image is h_deg.

For example using this snippet:

        img_hdr = e2e(torch.from_numpy(img_hdr),
                      h_deg=90,
                      v_deg=0,
                      roll=0,
                      mode='bilinear',
                      channels_first=False).numpy()

I would expect that the image would be shifted horizontally by 90 degrees. However, in reality it's being rotated counter-clockwise. It seems that the order of rotations is not consistent with the arguments and the documentation.

    # Apply rotations: first roll, then pitch, then yaw
    xyz_rot = xyz @ Rx @ Ry @ Rz

Which coordinate system is being used? Here is how I understood it:

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions