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

Pointcloud coordinates swapped #1999

Open
thorstink opened this issue Apr 19, 2024 · 2 comments
Open

Pointcloud coordinates swapped #1999

thorstink opened this issue Apr 19, 2024 · 2 comments

Comments

@thorstink
Copy link

thorstink commented Apr 19, 2024

Describe the bug
Sometimes when I open a .PCD pointcloud the Y and Z axis are swapped. In an older version of CloudCompare (2.11.1 does not have this issue on the same laptop) this does not happen using the same files. If I plot the same files with open3d in python, the results are as expected (good). In my attached screenshot there is one properly oriented aircraft in cloudcompare (colored) and one wrongly oriented (white). The two open3d plots are the same file, showing that in that visualization the axes are correct

How to reproduce

Expected behaviour
I expect the pointclouds to have the same orientation (as they do in a different visualizer)

Additional context
I can probably not share the pointclouds :( But I have added a screenshot:
bug

I can share the headers of both pointclouds:

the normally working pcd:

# .PCD v0.7 - Point Cloud Data file format
VERSION 0.7
FIELDS rgb _ x y z _
SIZE 4 1 4 4 4 1
TYPE F U F F F U
COUNT 1 12 1 1 1 4
WIDTH 500000
HEIGHT 1
VIEWPOINT 0 0 0 1 0 0 0
POINTS 500000
DATA binary

the wrongly oriented version:

# .PCD v0.7 - Point Cloud Data file format
VERSION 0.7
FIELDS x y z _
SIZE 4 4 4 1
TYPE F F F U
COUNT 1 1 1 4
WIDTH 350077
HEIGHT 1
VIEWPOINT 0 0 0 0.707107 -0.707107 0 0
POINTS 350077
DATA binary

Your environment

  • CC Version (or git hash/tag): 2.13.1 (Kharkiv Apr 5 2024) x64 linux
  • OS & Version: PopOS 20.04
  • Graphics card: NVIDIA GeForce GTX 1650 with Max-Q Design / Driver Version: 470.161.03
  • Qt Version (if compiling):
@thorstink
Copy link
Author

thorstink commented Apr 19, 2024

so I also changed the viewpoint in the header to match the 'proper one' (VIEWPOINT 0 0 0 1 0 0 0) but then the aircraft is properly aligned and the Z-axis has the wrong sign (e.g. it is mirrored)

@dgirardeau
Copy link
Member

So older versions of CC where simply ignoring the 'viewpoint', that's probably why it was 'working' in your case.

However, this was not the expected behavior and it was causing issues to other users.

Now, there's maybe an issue with the way this 'viewpoint' is defined by the program generating these files, or how it's understood by CC. Is Open3D a reference regarding PCD files loading? (or is there a clear specification somewhere?)

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

No branches or pull requests

2 participants