Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix orientation of transform to image coordinate system #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tetterl
Copy link

@tetterl tetterl commented Feb 13, 2020

  • Orientation of coordinate system was lhs for image coord system
    while it was rhs in the world coordinate system.
  • write_obj_with_colors swapped the x and y coordinates
  • with new implementation ply and obj files are consistent and with
    correct handedness

Closes #138

- Orientation of coordinate system was lhs for image coord system
while it was rhs in the world coordinate system.
- `write_obj_with_colors` swapped the x and y coordinates
- with new implementation ply and obj files are consistent and with
correct handedness
if transform:
# transform to image coordinate space (z pointing away from camera)
vertex[1, :] = std_size + 1 - vertex[1, :]
vertex[2, :] *= -1 # ensuring rhs coordinate system
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reversing z-axis may bring inconsistency with other parts, e.g. rendering part. There may be alternative solutions and I will check it recently.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree one might has to check/fix the renderer, sorry didn't had time to dig deeper atm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in write_obj_with_colors
2 participants