-
Notifications
You must be signed in to change notification settings - Fork 1.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
HyperSFM #1038
base: develop
Are you sure you want to change the base?
HyperSFM #1038
Conversation
encoding problems
Seems like Clang raised some interesting warning: Then we have a test failure: |
Yes that delete[] problem was also detected by codacy ! I corrected it. As for that test failing I will have to get into it. |
to a scaling problem)
ordering of openMVG::Hash_Map anymore
…_visual_studio HyperSFM (Fix for windows build) openMVG#1038
small recap of the situation that I posted on the issue : |
SubmapSfMReconstructionEngine to SequentialSfMReconstructionEngine to work with codacy standards.
@@ -34,7 +34,8 @@ class SequentialSfMReconstructionEngine : public ReconstructionEngine | |||
SequentialSfMReconstructionEngine( | |||
const SfM_Data & sfm_data, | |||
const std::string & soutDirectory, | |||
const std::string & loggingFile = ""); | |||
const std::string & loggingFile = "", | |||
const openMVG::tracks::STLMAPTracks & map_tracks = {}); |
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.
is this ok or should we make a whole new constructor for this ?
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 it's dangerous since now we can set the tracks from outside. And so it means that we would like to change the SequentialSfMReconstructionEngine to check if tracks are present before to run the track computation...
sequentialSfMReconstructionEngine
using 3 separate parameters (rot, t, scale)
Hello, it is now possible to optimize intrinsics during hypersfm. Each submap optimizes its intrinsics on its own, and the intrinsic that minimizes the error is chosen during merging. Outlier landmarks are also filtered out during merging now. As you can see, the results are way better when intrinsics are taken into account (example on the Neuvick dataset): |
Nice job @sebastienchappuis! |
@@ -98,6 +108,8 @@ void generate_sfm_data_and_tracks(openMVG::sfm::SfM_Data & sfm_data, openMVG::tr | |||
all_view_ids.insert(i); | |||
} | |||
|
|||
sfm_data.intrinsics[0] = std::make_shared<openMVG::cameras::Pinhole_Intrinsic>(); |
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.
Is is normal to have a default initialization?
I'm pretty sure you update it later on.
const auto intrinsicB = sfm_data_B.intrinsics.at(cam_id); | ||
|
||
// quick escape in case intrinsics are equal | ||
// TODO ? here we only check for pointer equality should we do more ? |
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.
Each intrinsic have a HASH build on the parameter.
So you can check that the camera type and the hash is the same:
getType && hashValue
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.
ah yes that's what I wanted ! do I need to check for both though ? it looks like the type information is contained in the hash ?
src/software/SfM/main_HyperSfM.cpp
Outdated
return std::unique_ptr<SubmapThresholdChecker>(new SubmapViewThresholdChecker(view_threshold)); | ||
} | ||
else | ||
{ | ||
std::cout << "Tracks threshold chosen: " << tracks_threshold << std::endl; | ||
std::cout << "Tracks threshold chosen : " << tracks_threshold << std::endl; |
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.
it was right. English,UK, USA, syntax is without space ;-)
Here is the PR for adding hyperSFM to openMVG, as discussed in the following issue :
#1015