Giter Club home page Giter Club logo

Comments (8)

pxl-th avatar pxl-th commented on May 29, 2024

Most likely due to different random samples being drawn from data each time you run it.
This causes the algorithm to converge to different results.

In practice, however, I find this algorithm to be quite noisy. If you're using it for pose recovery over several frames, I'd recommend using something like bundle adjustment on top of it to optimize poses once you've recovered them.

from recoverpose.jl.

zsz00 avatar zsz00 commented on May 29, 2024

I'm doing self-calibration for multiple cameras.
previous_points, current_points K are all pre-made data.

n_inliers, (E, P, inliers, best_repr_error) = five_point_ransac(previous_points, current_points, K, K, GEEV4x4Cache())
run several times, E,P is not same.

And i try the essential_ransac(previous_points_pd, current_points_pd, focal_sum; threshold = 1.0) have error:
ERROR: LoadError: BoundsError: attempt to access Tuple{SMatrix{3, 3, Float64, 9}, Vector{Bool}, Float64} at index [4]
Stacktrace:
[1] indexed_iterate(t::Tuple{SMatrix{3, 3, Float64, 9}, Vector{Bool}, Float64}, i::Int64, state::Int64)
@ Base ./tuple.jl:86
[2] camera_1()
@ Main ~/codes/AutoCab.jl/src/test_2.jl:69
[3] top-level scope
@ ~/codes/AutoCab.jl/src/test_2.jl:99

from recoverpose.jl.

pxl-th avatar pxl-th commented on May 29, 2024

Looks like the error is in your code and I'm assuming you're trying to unpack the returned result.
There's error in documentation for essential_ransac. It returns n_inliers, (E, inliers, error), without P projecton matrix,
but looks like you are trying to unpack it to n_inliers, (E, P, inliers, error).

from recoverpose.jl.

zsz00 avatar zsz00 commented on May 29, 2024

n_inliers, (E, inliers, error) = essential_ransac(previous_points_pd, current_points_pd, focus_sum; threshold = 1.0)
is ok !!!

but the doc is bad:
image

from recoverpose.jl.

zsz00 avatar zsz00 commented on May 29, 2024

n_inliers, (E, inliers, best_repr_error) = essential_ransac(previous_points, current_points, focal_sum; threshold = 1.0)
best_n_inliers, P_res, best_inliers, best_error = recover_pose(E, pixels1, pixels2, K1, K2; threshold = 1.0)

Is this better than five_point_ransac() ??

from recoverpose.jl.

pxl-th avatar pxl-th commented on May 29, 2024

Agree, the documentation can be improved.
I find the five_point_ransac to be actually better, because it evaluates both essential matrix and recovered poses from it, while essential_ransac only evaluates essential matrix, from which you then evaluate only 4 possible poses.

from recoverpose.jl.

zsz00 avatar zsz00 commented on May 29, 2024

I see, thanks for your reply !!

from recoverpose.jl.

pxl-th avatar pxl-th commented on May 29, 2024

The documentation is fixed, thanks for pointing out. Closing this, feel free to re-open though.

from recoverpose.jl.

Related Issues (3)

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.