-
-
Notifications
You must be signed in to change notification settings - Fork 829
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
change threshold for sfm validity #1760
base: develop
Are you sure you want to change the base?
Conversation
b966d25
to
834237b
Compare
834237b
to
4ab99b4
Compare
int nbposes = _sfmData.getPoses().size(); | ||
|
||
int minPoses = 1; | ||
if (nbviews > 5) |
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 would a new param to the set of parameters of the class
AliceVision/src/aliceVision/sfm/pipeline/sequential/ReconstructionEngine_sequentialSfM.hpp
Line 41 in 396d82c
struct Params |
(with a line of comment that explains the meaning)
Not necessary that it is exposed, but it's better than having a random number in the code.
int nbviews = _sfmData.getViews().size(); | ||
int nbposes = _sfmData.getPoses().size(); | ||
|
||
int minPoses = 1; | ||
if (nbviews > 5) | ||
{ | ||
minPoses = 3; | ||
} | ||
|
||
return (nbposes >= minPoses); |
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.
int nbviews = _sfmData.getViews().size(); | |
int nbposes = _sfmData.getPoses().size(); | |
int minPoses = 1; | |
if (nbviews > 5) | |
{ | |
minPoses = 3; | |
} | |
return (nbposes >= minPoses); | |
const auto nbviews = _sfmData.getViews().size(); | |
const auto nbposes = _sfmData.getPoses().size(); | |
const std::size_t minPoses = nbviews > small_dataset? 3 : 1; | |
return (nbposes >= minPoses); |
where small_dataset
is the placeholder for the new param discussed above
Actually, sfm returns an error only if there is no reconstructed views.
We want to return an error if there is only the initial reconstructed pair and no other valid views.
If the number of views is small, we still keep 1 view as the minimal size, but for any other size, we also return an error if only 2 views are reconstructed.