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

Sync 3D camera with image selection #633

Merged
merged 15 commits into from
Sep 21, 2019
Merged

Sync 3D camera with image selection #633

merged 15 commits into from
Sep 21, 2019

Conversation

yann-lty
Copy link
Member

@yann-lty yann-lty commented Sep 13, 2019

Description

This PR introduces a new feature that enables to synchronize 3D camera pose with the image selection.
After the computation of the StructureFromMotion step, a dedicated 3D camera can be controlled by choosing an image from the input Images list, allowing to view the reconstruction from this image's POV (pose and field of view).
sync_cam2
If the PrepareDenseScene step is computed, the undistorted image can also be displayed as an overlay on the 3D view.
sync_cam_overlay

Features list

  • 3D View: new "Sync with image selection" mode
  • Fix issues related to 3D navigation
  • Inspector3D UI improvements

Implementation remarks

  • 3D camera's field of view is computed using intrinsics solved by the SfM step.
  • a 2D shader handles the principal point correction for the image overlay
  • add new ViewpointWrapper python class to easily get data related to a reconstructed image

* [nodes] SfM: make more generic method to get SfM results and return solved intrinsics in addition to views and poses
* [reconstruction] store and expose solved intrinsics by viewpoints
keep reference to active prepareDenseScene to be able to compose paths to undistorted images
* new class that wraps an input image (Viewpoint) in the context of a Reconstruction
* exposes properties to access image and camera data
Inspector3D is not an overlay anymore to simplify 3D manipulations, by having view center at the center of the 3D view.
* Inspector
   * changed "SETTINGS" to "DISPLAY"
   * new "CAMERA" section: activate camera synchronization + control image overlay
* ImageOverlay: new component to display (undistorted) image on top of the 3D view
* ViewpointCamera: new component that sets up a Camera based on a Viewpoint internal parameter
* Viewer3D: additional ViewpointCamera to perform synchronization with image selection
* Viewer3DSettings: new properties related to camera synchronization mode
Only prompt right-click contextual menu when it was not used to zoom in the 3D view.
Using an additional scale Transform changes Cuboid's size relatively to the Camera locator, which was unwanted.
don't trigger Camera selection if mouse has moved to rotate camera
* add MouseArea at root of media
* use flow to display media info and avoid text clipping
Helper method to set a node as the active one of its type.
To be consistent with the Graph Editor behavior, double clicking on a node sets it as the active node of its type. This, for example, enables to switch from one SfM to another from the media list.
* flatten the button 
* color its icon when checked
@natowi natowi mentioned this pull request Sep 18, 2019
4 tasks
correctly apply image transformation to principal point correction in uv coordinates.
@fabiencastan fabiencastan merged commit f0a9ec2 into develop Sep 21, 2019
@fabiencastan fabiencastan deleted the dev/syncCamera branch September 21, 2019 14:40
@fabiencastan fabiencastan mentioned this pull request Sep 22, 2019
5 tasks
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.

2 participants