rust-cv / p3p Goto Github PK
View Code? Open in Web Editor NEWCamera pose estimation given 3D points and corresponding pixel coordinates
License: Mozilla Public License 2.0
Camera pose estimation given 3D points and corresponding pixel coordinates
License: Mozilla Public License 2.0
Dear all,
I just noticed that the quickcheck test non_degenerate_case
fails quite frequently, e.g.:
running 2 tests
test nordberg::tests::manual_case ... ok
test nordberg::tests::non_degenerate_case ... FAILED
failures:
---- nordberg::tests::non_degenerate_case stdout ----
thread 'nordberg::tests::non_degenerate_case' panicked at '[quickcheck] TEST FAILED. Arguments: ((0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 41.0, 0.0), (25.49968, 97.0, 59.0), (38.101242, 91.147705, -97.73874))', /Users/michaelp/.cargo/registry/src/github.com-1ecc6299db9ec823/quickcheck-0.8.5/src/tester.rs:176:28
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
nordberg::tests::non_degenerate_case
or
...
thread 'nordberg::tests::non_degenerate_case' panicked at '[quickcheck] TEST FAILED (runtime error). Arguments: ((0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 21.0, 0.0), (25.0, 47.0, 61.0), (-86.0, -10.0, 47.0))
Error: "assertion failed: !poses.is_empty()"', /Users/michaelp/.cargo/registry/src/github.com-1ecc6299db9ec823/quickcheck-0.8.5/src/tester.rs:176:28
...
Running tests with QUICKCHECK_TESTS=10000 cargo test
reliably produces a failure for me on every run.
Best
Michael
We need to add a GitHub action that ensures that rustfmt has been ran on the code.
Thank for your launching the rust-photogrammetry initiative. Appreciated you cited all the previous work done around the p3p solver and ports.
I wonder what is your motivation behind porting it to rust.
Hello @mpizenberg ๐,
I have a question regarding the bearing_vectors
as input for the solve
function in the nordberg
module. As I understand the documentation, each bearing vector should contain one vertex of the triangle in image-space, i.e., (u_i, v_i, 1)
. However, in the test-cases the z-values of the bearing_vectors
are different from 1:
let p1_cam = [-0.228_125, -0.061_458_334, 1.0];
let p2_cam = [0.418_75, -0.581_25, 2.0];
let p3_cam = [1.128_125, 0.878_125, 3.0];
Moreover, I am confused to read _cam
or "camera coordinates" in the test-cases and not "image coordinates". Is there a misconception from my side, is the documentation misguiding about z-value or are the test-cases incorrect?
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.