Skip to content

Conversation

@gareth-cross
Copy link
Contributor

This change addresses an edge case that produces a confusing exception:

  • When previous steps of the problem produce poor results (global positioning + track selection), no images will be added to the optimization. In other words, AddPointToCameraConstraints adds no variables for the cameras.
  • If this occurs, then the variable center is never assigned in the loop of ParameterizeVariables. As a result, SetParameterBlockConstant is passed an address that Ceres is unfamiliar with, causing an exception to occur.

This change explicitly checks for the case where no valid image variables were found, and returns false from ParameterizeVariables. An error message is printed, rather than throwing an exception inside ceres.

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.

3 participants