ydsf16/PnP_Solver

Assertion error (bug)

Opened this issue · 1 comments

Hi, I tried your code, its perfect! It worked well on my laptop except one place.
On line 278 pop_solver.cpp
C.block ( 3, 0, 1, 4 ) = Eigen::Vector4d ( 1.0, 1.0, 1.0, 1.0 );
When I run the program, it got stuck here. assertion error. rows and cols != problem.
my fix is C.block ( 3, 0, 1, 4 ) = Eigen::Vector4d ( 1.0, 1.0, 1.0, 1.0 ).transpose();

Good job! I found your result is much much better than OpenCV's epnp!

@craigstar hi, do you have compare demos? I encountered an error when using this code in my project, so I want to compare OpenCV and this work. May you provide a demo or some suggestions about comparison. Thank you, sincerely.