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

Panning viewport does not shift the origin of rotation at the object #21

Open
eldar opened this issue Sep 25, 2021 · 8 comments
Open

Panning viewport does not shift the origin of rotation at the object #21

eldar opened this issue Sep 25, 2021 · 8 comments
Assignees
Labels
feature New feature or request

Comments

@eldar
Copy link

eldar commented Sep 25, 2021

Hi all,

I am trying to use your great tool for annotating objects in point clouds reconstructed by a structure from motion method, which are noisy and don't have a canonical orientation. I pretty much failed to do it using the tool. Here is the point cloud of a car that I would like to draw a bounding box around. The first problem is with positioning the camera such that it is centered around the object of interest. Panning the viewport with right mouse actually does not put the object in the center so that I could rotate around it using the left mouse button. And with that I find it really difficult to draw the bounding box using the Span mode with Z-rotation only Mode switched off.

@ch-sa
Copy link
Owner

ch-sa commented Sep 29, 2021

Hello @eldar,

currently labelCloud only supports fixed rotating around the center of the point cloud. So atm. you are not able to really "move" inside the point cloud and rotate around your current position.

I see how this can become a problem with large point clouds and objects of interest at the edges. Having this feature would be great but probably requires some transformations. Feel free to suggest changes if you already have ideas.

About your specific point cloud, I will have a look at it as soon as I find time and see if I can help.

@ch-sa ch-sa added feature New feature or request help wanted labels Sep 29, 2021
@Nikhilbharadwaj08
Copy link

IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices
Aborted (core dumped)

Here It supported only one kindly of ply binary format

@ch-sa
Copy link
Owner

ch-sa commented Sep 30, 2021

@Nikhilbharadwaj08 Are you sure this is the right issue?
If you found another problem, please report it in a new issue.

@ch-sa
Copy link
Owner

ch-sa commented Sep 30, 2021

@eldar I looked at your point cloud and managed to draw a bounding box:
Car-PCD

However, for this I had to align the point cloud first (Settings → Align point cloud). The point cloud is that difficult to rotate as there are some outlier points quite far away. So maybe another approach would be to crop the point clouds first.

We are currently evaluating the tool and also collect feature requests, so I invite you to fill our questionnaire.

Anyway, I attach the aligned point cloud and bounding box for you.
aligned_pcd_label.zip

@eldar
Copy link
Author

eldar commented Oct 5, 2021

Hi Christoph,

sorry for the late reply and thanks a lot for looking into this. I think I managed to align the point cloud - if I understand it correctly it requires to select 3 points that define horizontal plane (it would be nice if it is reflected in the documentation). After that is done it is indeed easier to place a bounding box around the object. I'll gladly fill in the questionnaire once I gather a bit more experience with the tool!

Regards,
Eldar.

@eldar
Copy link
Author

eldar commented Oct 5, 2021

I have a further update: it was not clear to me that after aligning the point cloud the whole point cloud gets transformed and the bounding box is annotated as within the new coordinate system. This is fine, however I need to obtain the bounding box coordinates in the original coordinate system. It seems that the app saves the transformed point cloud so there is no way to recover that. It would be great if the app saved the SO(3) transformation corresponding to the point cloud alignment alongside with the bounding boxes.

Update: I can make the necessary changes myself, the code is easy enough to understand! But maybe it is worth incorporating in the main branch.

@ch-sa
Copy link
Owner

ch-sa commented Oct 5, 2021

Hi @eldar,

exactly, the process is...

  1. select three points in the plane
  2. rotate the point cloud
  3. save the rotated point cloud in the pointcloud folder (backup the original point cloud in original_pointcloud)
  4. load the aligned point cloud and draw in the new coordinate system

You are right, exporting the alignment transformation is probably necessary for many users. At the moment the rotation only gets printed to std out in the axis angle format (calculation is done here):

Alignmode was changed to True!
Alignment rotation: 0.17 around [-0.94  0.34  0.  ]

Would be great if you can implement this feature. Just open a pull request and then we merge it into the main branch.

  • Update documentation about aligning point clouds
  • Export the alignment transformation

@kaesesahnetorte
Copy link

I would suggest using the camera position as center of rotation.
Left click can then be used to adjust camera rotation euler angles yaw and pitch, with a limited pitch angle of -90° to 90°.

As it looks now, "zooming" with the mouse wheel adjusts the camera position, as if you were flying forwards / backwards.
Thus I think there is no definition yet of a "point that is looked at", like in most 3D modeling tools. I do not find this way of view controls intuitive anyway - games do it better.

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

No branches or pull requests

4 participants