-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
PCLVisualizer: save and restore camera information #703
PCLVisualizer: save and restore camera information #703
Conversation
I think this is a very useful contribution, thanks! I have a few comments though:
|
hi, @taketwo
Question: If I add this to |
I would rather have save/load functions that take a filename. It's up to the client ( |
hi, @taketwo
|
+1
I am not sure I understand what you mean here. |
@taketwo Sorry for my english.
to calculate sha1 value and pass it to |
What about the following use-case. I have a program that uses |
@taketwo |
Why this restriction? Wouldn't it make sense to have |
Great @taketwo I will do that |
Tested cases:
|
Hi, @taketwo Is it ok to merge? |
@xiangxw I skimmed through the code already and have a couple of questions. But in order to formulate them properly I would need some more time to dig in and read carefully. Unfortunately I'm quite busy with other things at the moment. I will come back to your PR as soon as possible. Sorry. |
@taketwo ok, thanks. |
* \param[out] camera the name of the \ref pcl::visualization::Camera | ||
*/ | ||
void | ||
saveCameraParameters (Camera &camera); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "save" is not a correct verb here. It has connotations with persistence and disk I/O. Rather, here the current camera parameters are retrieved into a variable. I would definitely call this getCameraParameters()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, you are right.
Hi @taketwo I have modified the code. Thanks. |
Looks good to me now, though I have one question. How is this going to behave in the following situation? Suppose the user provided |
Press ctrl + s to save camera parameters and ctrl + r to restore the saved camera parameters. If a camera file is specified with "-cam" option or pcd file(s) is(are) available in the command line, the camera parameters will be written to the corresponding file and can be restored later from that file. In this case, PCLVisualizer will restore camera parameters automatically from the corresponding file when the pragram restarts with the same command line input.
hi @taketwo
|
Great, that is exactly the behavior I was thinking about. So everything is fine from my viewpoint. @jspricke? |
PCLVisualizer: save and restore camera information
Segmentation fault when "r" is pressed in PCLVisualizer. The previous pull request PointCloudLibrary#703 does not handle the "r" keyboard event correctly and pass the event to vtkInteractorStyleRubberBandPick, which enables rubber-band selection mode when 'r' is pressed.
Segmentation fault when "r" is pressed in PCLVisualizer. The previous pull request PointCloudLibrary#703 does not handle the "r" keyboard event correctly and pass the event to vtkInteractorStyleRubberBandPick, which enables rubber-band selection mode when 'r' is pressed.
Press ctrl + s to save camera parameters and ctrl + r to restore the
saved camera parameters.
If a camera file is specified with "-cam" option or pcd file(s) is(are)
available in the command line, the camera parameters will be written to
the corresponding file and can be restored later from that file.
In this case, PCLVisualizer will restore camera parameters automatically
from the corresponding file when the pragram restarts with the same
command line input.