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

New feature: keeping the same point of view (zoom and orientation) as defined in the 1st frame #24

Closed
GeraldKergourlay opened this issue Oct 13, 2021 · 6 comments · Fixed by #28
Assignees
Labels
feature New feature or request good first issue Good for newcomers

Comments

@GeraldKergourlay
Copy link

GeraldKergourlay commented Oct 13, 2021

Hi All,
Would it be possible to implement a new feature?
I.e. keeping the same point of view (zoom and orientation), as defined in the first (or previous) frame, on the point cloud, frame after frame?

Thanks for your help
Gerald

@ch-sa
Copy link
Owner

ch-sa commented Oct 13, 2021

Hi @GeraldKergourlay,

thanks for your feature request. I see three options to implement this:

  1. Keep perspective of last point cloud at time of clicking 'next'
  2. Explicit 'save perspective' option in the menu that is used whenever a new point cloud is loaded
  3. Parameter in the config to specify zoom level and orientation

Which one would you prefer?

@ch-sa ch-sa added feature New feature or request good first issue Good for newcomers labels Oct 13, 2021
@GeraldKergourlay
Copy link
Author

Hi @ch-sa ,

thank you for your reply

I think I would prefer the 1st option, combined with the 2nd !

To be more explicit:
I had not thought of point 2. but it is a good idea to be able to go back to a reference or preferred position (saved thanks to the 'save perspective' option you mention).
For example, if the user decides to change the perspective for a given frame and would like to go back to the preferred position, it would indeed to nice to be able to load this preferred position.
And since it would be a little tedious to be forced to click on the load button at each new frame, it would be nice to keep perspective of last point cloud from frame to frame (point 1).

What do you think?

ch-sa added a commit that referenced this issue Oct 13, 2021
 - add feature to save current perspective for next point cloud load
 - activate and deactivate via menu action

Closes: #24
@ch-sa ch-sa self-assigned this Oct 13, 2021
@ch-sa
Copy link
Owner

ch-sa commented Oct 13, 2021

Hi @GeraldKergourlay,

I just implemented Option 2 with an option in the menu:
SavePerspective

  • You move the current point cloud into the preferred perspective
  • You select "Save current Perspective"
  • Next point cloud is loaded in that perspective
  • (Deactivate the menu action and the next point cloud will be centered again as normal)

Please test & try the feature on my branch ch/save-perspective:

git pull
git checkout ch/save-perspective
python3 labelCloud.py

During testing, I wondered if the deviation of the x- and y-translation from the initial perspective should be stored as well (additionally to the zoom = z-translation)?

@GeraldKergourlay
Copy link
Author

Hi @ch-sa

thanks a lot for your implementation which I just tried! Yes, it does exactly point 1 and 2 of your previous reply.

Here are my first remarks:

  1. when the 'save current perspective' is deselected, and one changes the perspective in the frame, the preferred perspective is lost, isn't it? No way to go back to the preferred perspective
  2. yes it would be fine for my applications to store x- and y-translation from the initial perspective as well!

My suggestions (maybe not a good idea because it would change the content of the .json files which are normally dedicated to labelling):
a. saving the perspective for each frame in frame .json file once the 'save current perspective' is activated
b. the 'save current perspective' should not be a remaining choice button but more an action button to perform point a. (I hope I'm clear...)
c. add a 'reset perspective' option in the menu to go back to initial perspective in the current frame
d. anyway, keeping the action 'next point cloud is loaded in the previous point cloud perspective' (as it is done currently)

What do you think?

@ch-sa
Copy link
Owner

ch-sa commented Oct 14, 2021

Thanks for the feedback.

when the 'save current perspective' is deselected, and one changes the perspective in the frame, the preferred perspective is lost, isn't it? No way to go back to the preferred perspective

Yes, but that is the goal of deactivating the saved perspective, isn't it?
You can always move the perspective back and activate again.

a. saving the perspective for each frame in frame .json file once the 'save current perspective' is activated

This would be possible but a quite specific scenario.

I have a bit of trouble understanding in which scenarios this is of help (which is why I limited it to a single menu action). ;)
Maybe you can tell me a bit about your context, so I can relate (Like do you want to label sequential data where the object of interest is always in the same spot of the point cloud?).

ch-sa added a commit that referenced this issue Oct 19, 2021
 - add setting to keep perspective between point cloud changes
 - takes the last perspective before loading the new point cloud

Relates: #24
ch-sa added a commit that referenced this issue Oct 19, 2021
 - add setting to keep perspective between point cloud changes
 - takes the last perspective before loading the new point cloud

Relates: #24
@ch-sa ch-sa linked a pull request Oct 19, 2021 that will close this issue
@ch-sa ch-sa closed this as completed in #28 Oct 19, 2021
@ch-sa
Copy link
Owner

ch-sa commented Oct 19, 2021

@GeraldKergourlay

I merged the manual save perspective feature and added feature d), i.e. keeping the last perspective of the previous point cloud and use it when loading the next point cloud as starting perspective.

Hope that's what you expected.

For saving perspectives into json, I opened an experimental branch ch/perspective-to-json. It saves to folder poinclouds/perspectives/<pcd_name>_perspective.json.

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

Successfully merging a pull request may close this issue.

2 participants