midjji / pnp Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Hi,
Thanks for sharing a great work. I am having trouble trying to use your algorithm, likely because I did not get all the requirements. I usually use the pose solver from opencv with pixel coordinates and intrinsic matrix, however, the same inputs did not work with your algorithm. I would like to clarify:
Thanks again.
The outputs of root2real() have the wrong sign when b^2-4c is negative.
Despite your recent fix of the solver, I am still having trouble with real-world data.
It could be a bug in my C port of your code, which is what I am using for testing as I am not very good with C++. My apologies if it's my fault.
Here is the data that doesn't work for me:
Vector3 x1 = {0.355263, -0.0518519, 0};
Vector3 x2 = {0.644737, -0.0518519, 0};
Vector3 x3 = {0.710526, 1.02963, 0};
Vector3 x4 = {0.289474, 1.02963, 0};
Vector2 y1 = {-0.06901041666666667, -0.3138020833333333};
Vector2 y2 = {0.11328125, -0.31640625};
Vector2 y3 = {0.15364583333333334, 0.07682291666666667};
Vector2 y4 = {-0.11197916666666667, 0.0703125};
I feed the first three vectors from each quad to p3p, and then apply the solutions to x4 to see how far off from y4 we are.
I get two solutions, and both of them are really far off. One estimates y4 at -0.0202205, 0.0671298, and the other estimates it at out -0.472997, 0.0518886. I checked that y1 through y3 are correct.
The data comes from a Wii remote pointed at a quadrilateral of LEDs (mounted around a TV, for a retro gaming lightgun), with some non-uniform rescaling of both inputs and outputs.
I have no difficulty processing this data using this homography p4p algorithm: https://web.archive.org/web/20190503154012/http://www.corrmap.com/features/homography_transformation.php
Hi,
Any chance you can provide some directions for building with python bindings?
I tried running (from inside a build directory)
cmake ../ -DPYTHON_EXECUTABLE="path/to/python_executable"
.
I changed:
option(WITH_PYBIND11 "with pybind11 bindings" OFF)
to this option(WITH_PYBIND11 "with pybind11 bindings" ON)
then ran make && make install
.
It failed with the following error make: *** No rule to make target
install'. Stop.`
I'd appreciate some pointers.
I am not experienced with p3p and homogeneous coordinates, but I am having some trouble. I feed the following data to p3p:
cvl::Vector3<double> y1 = { 0,0,1 };
cvl::Vector3<double> y2 = { 2,0,1 };
cvl::Vector3<double> y3 = { 0,2,1 };
cvl::Vector3<double> x1 = { 0,0,0 };
cvl::Vector3<double> x2 = { 1,0,0 };
cvl::Vector3<double> x3 = { 0,1,0 };
The "obvious" solution I am expecting would also map x4 = { 1,1,0 } to { 2,2,1 }. And unless I am misunderstanding how this stuff works, which is not unlikely, I think this solution would correspond to:
T = 0 0 0.5
R = identity.
But p3p is returning only one solution:
T = 0 0 0.5625
R = { { 1, 0, 0.0625 },
{ 0, 1, 0.0625 },
{ -0.0625, -0.0625, 1 } }.
And that maps x4 to { 2.29, 2.29, 1 }, which is not the "obvious" solution.
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.