daviddoria / Examples

Many examples of many features of many software packages
233 stars 130 forks source link

Result values are wrong #4

Open holazollil opened 8 years ago

holazollil commented 8 years ago

I run this code. I expect that positions of projectedPoints[i] is equal to position of imagepoints[i]. But when I write their values, they are different.

Is there a problem on this code?

daviddoria commented 8 years ago

Which code did you run?

holazollil commented 8 years ago

I run SolvePNP.cxx taken from https://github.com/daviddoria/Examples/blob/master/c%2B%2B/OpenCV/SolvePNP/SolvePNP.cxx

2015-12-04 22:20 GMT+02:00 David Doria notifications@github.com:

Which code did you run?

— Reply to this email directly or view it on GitHub https://github.com/daviddoria/Examples/issues/4#issuecomment-162071624.

daviddoria commented 8 years ago

I would also expect that was the idea of the example. I don't know if I accidentally hardcoded the wrong points when I made this or if something changed in OpenCV since I made it. If you would like to hand-compute the correct projections and then make sure they agree with OpenCV's projections and send a pull request I'd be happy to merge it.

abhigarg commented 7 years ago

the camera calibration matrix is being set as identity matrix which is wrong

daviddoria commented 7 years ago

@abhigarg Care to submit a fix :) ?