Code Monkey home page Code Monkey logo

pnp's People

Contributors

karlholmquist avatar midjji 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

pnp's Issues

some questions about the algorithm's requirements

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:

  1. how do we convert pixel coordinates (i.e., indices of the image matrix) to the compatible inputs of your algorithm?
  2. how do we input the camera intrinsic matrix?

Thanks again.

root2real bug

The outputs of root2real() have the wrong sign when b^2-4c is negative.

More missing solutions?

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

Installation

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.

Missing solution?

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.

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.