Giter Site home page Giter Site logo

ransaclib's People

Contributors

anton3 avatar tsattler avatar vlarsson avatar yocabon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ransaclib's Issues

CMake improvements?

In order to be able to use RansacLib as a modern CMake library, I had to:

  1. Move RS_ROOT/RansacLib directory to RS_ROOT/include/RansacLib, because otherwise I'd get examples, LICENSE and README in the include directory
  2. Delete CMakeLists.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.

Bug report

Thank you for your awasome Lib, but I have found a bug. Sometimes the number of iterations does not update. For example, when kProbNonInlierSample = 1, i.e. the inlier_ratios is very small, kLogDenominator will be zero.

const double kLogDenominator = std::log(kProbNonInlierSample);

const double kLogDenominator = std::log(kProbNonInlierSample);

Random seed in LocalOptimization is fixed

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.

// Performs an initial least squares fit of the best model found by the
// minimal solver so far and then determines the inliers to that model
// under a (slightly) relaxed inlier threshold.
std::mt19937 rng;
rng.seed(options.random_seed_);

Is the original RANSAC implemented ?

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?

Hybrid 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?

Multiple models estimated ?

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 ?

How to use the principal points of image intrinsics in RansacLib

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.