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

Solver UI - Calculate Optimal Root Frame Numbers #160

Closed
david-cattermole opened this issue Oct 3, 2020 · 2 comments
Closed

Solver UI - Calculate Optimal Root Frame Numbers #160

david-cattermole opened this issue Oct 3, 2020 · 2 comments
Assignees
Labels
enhancement maya tool A user tool inside Maya. python api The Python API for mmSolver user interface Related to a User Interface (Maya or Qt)
Milestone

Comments

@david-cattermole
Copy link
Owner

Feature

Add the ability to automatically calculate the optimal Root Frame numbers based on the markers in the Solver.

The "Standard" Solver UI tab contains a user-settable Root Frames option which currently needs to be set manually.
For the artist, it's not very intuitive because most people don't know which frames to set.

Ideally, the Root Frame values should be computed automatically and always produce the best result.
However realistically, this might not be possible.

Therefore, an option to automatically calculate the root frames and set the values will be helpful.
Artists can then change the calculated values manually.

Example Usage Steps

  1. Create Collection, and add Markers and Attributes.
  2. Run tool
    • Root Frames are calculated and set.
  3. Artist adds a new Marker.
  4. Run tool
    • Root Frames are calculated (with new Marker) and set.
  5. Click "Solve" button.
@david-cattermole david-cattermole added enhancement maya tool A user tool inside Maya. user interface Related to a User Interface (Maya or Qt) python api The Python API for mmSolver labels Oct 3, 2020
@david-cattermole david-cattermole added this to the v0.3.7 milestone Oct 3, 2020
@david-cattermole david-cattermole self-assigned this Oct 3, 2020
david-cattermole added a commit that referenced this issue Oct 5, 2020
Ensure root frames are spaced out a little, if possible.

Issue #160.
@david-cattermole
Copy link
Owner Author

For now, I have added a basic "Set Auto" button which will set the Root Frames for the Standard Solver.
These root frames are not yet "optimal", however the results on the unit tests in mmSolver have dramatically reduced deviation, in some cases from ~11 pixels to ~2 pixels, which is better than nothing.

Future work is needed, but the "Set Auto" currently committed should be OK for general use, until we can implement something better.


Future work...

There appears to be some interesting research papers on this topic:
https://www.researchgate.net/publication/260616120_Optimal_key-frame_selection_for_video-based_structure-from-motion

The paper uses the error level of homography and fundamental matrices of two frames to detect "degenerate" frames (pairs of frames that will not compute an accurate camera - for example because there is not enough parallax).

Using homography and fundamental matrices requires the maths (or library) to calculate the matrices, such as in libmv (#144), which is not planned until at least v0.4.0.

Further, there are use-cases in mmSolver where the Markers may not be produce valid fundamental/homography matrices as the solver is not constrained to only solving cameras, or only solving objects. Such fundamental/homography matrices also assume only Markers that solve all three Bundle axes; X, Y and Z, but mmSolver is not constrained by this and therefore these techniques will not work.

@david-cattermole
Copy link
Owner Author

This has been implemented as the "Per-Marker" and "Span" check-boxes in the Solver UI.
https://david-cattermole.github.io/mayaMatchMoveSolver/tools_solver_ui.html#user-and-root-frames

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement maya tool A user tool inside Maya. python api The Python API for mmSolver user interface Related to a User Interface (Maya or Qt)
Projects
None yet
Development

No branches or pull requests

1 participant