tsattler / ransaclib Goto Github PK
View Code? Open in Web Editor NEWTemplate-based implementation of RANSAC and its variants in C++
License: BSD 3-Clause "New" or "Revised" License
Template-based implementation of RANSAC and its variants in C++
License: BSD 3-Clause "New" or "Revised" License
In the local optimization step of the LO-RANSAC just before the iterative least squares refinement there is again a LSQ fit. Is that really doing anything?
So is this line doing anything? Is this step needed?
Thanks!
In order to be able to use RansacLib as a modern CMake library, I had to:
RS_ROOT/RansacLib
directory to RS_ROOT/include/RansacLib
, because otherwise I'd get examples
, LICENSE
and README
in the include directoryCMakeLists.txt
and write my own, which says:project(RansacLib LANGUAGES CXX)
add_library(RansacLib INTERFACE)
target_include_directories(RansacLib INTERFACE RansacLib/include)
target_compile_features(RansacLib INTERFACE cxx_std_11)
What about including this "out of the box"? CmakeLists.txt
could create the header-only CMake library by default, and build examples when passed some additional flag.
In LocalOptimization the random seed is always reset to options.random_seed_. Since this method is called multiple times, this probably not the desired behavior.
Lines 353 to 357 in 565718f
I have been trying to use the original version of RANSAC but I can't seem to find a way to do so.
Are only the variants implemented ?
In ransac.h
there is a LocallyOptimizedMSAC
class only. Is it the case that using certain options it behaves like RANSAC?
Hi! I'm highly interested in the Hybrid Ransac, while it seems that the Hybrid Ransac is not compiled in the pyransaclib.
And the LocallyOptimizedHybridMSAC implementation is not in this repo.
Could you please shed some light on how to perform visual localization with it?
It's stated that ModelVector
"concept" only requires default construction, assignment and indexing. However, GetBestEstimatedModelId()
uses models.size()
. It shouldn't, since MinimalSolver()
already returns that size.
Hello,
I had a look in the source code and I have a question about this code in ransac.h
:
// MinimalSolver returns the number of estimated models.
const int kNumEstimatedModels =
solver.MinimalSolver(minimal_sample, &estimated_models);
if (kNumEstimatedModels <= 0) continue;
I don't understand how it is expected to return multiple solutions with 1 sample. For example, in the P3P case, if I pass the minimum number of points i.e. 4, then the solver will return 1 solution, 1 model ? Why does it expect multiple models ?
Hi @tsattler ,
As there are currently three dependencies include openGV, opengv also have many different SAC problems. What is the difference between RansacLib and openGV?
Hello,
first of all thank you for sharing this project.
I am trying to use RansacLib in visual localization, and I test the result of localization in aachen dataset. However the result is not satisfactory. I notice that in camera_pose_estimation.cc , the focal_length information is used in the function:
CalibratedAbsolutePoseEstimator::PixelsToViewingRays(
focal_length, focal_length, *points2D, rays);
but I didn't find any use of the principal points information. I modify the function PixelsToViewingRays
like this:
void CalibratedAbsolutePoseEstimator::PixelsToViewingRays(
const double focal_x, const double focal_y, const double c_x, const double c_y, const Points2D& points2D,
ViewingRays* rays) {
const int kNumData = static_cast<int>(points2D.size());
// Creates the bearing vectors and points for the OpenGV adapter.
rays->resize(kNumData);
for (int i = 0; i < kNumData; ++i) {
(*rays)[i] = points2D[i].homogeneous();
(*rays)[i][0] = ((*rays)[i][0]-c_x)/focal_x;
(*rays)[i][1] = ((*rays)[i][1]-c_y)/focal_y;
(*rays)[i].normalize();
}
But I still can't get the correct result. Can you tell me how to use the information of the principal points of image intrinsics in RansacLib, or just discard it like you do in localization.cc?
Thanks in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.