zhengthomastang / cal_pnp Goto Github PK
View Code? Open in Web Editor NEWC++ implementation of semi-automatic camera calibration based on Perspective-n-Point (PnP)
C++ implementation of semi-automatic camera calibration based on Perspective-n-Point (PnP)
hi.
I try to this code with a new opencv version 4.5.0.
But I can't do it at my pleasure.
So, Could you tell me what version I must try it.
Also, if we try version4.5.0, could you tell me points that should be revised of this code.
I will attend your reply.
Finally I run this program successfully and get the 3x3 homography matrix output. But in your CAM_CAL_IPL, the output is intrinsic camera matrix, the rotation matrix, the translation vector and the projection matrix.
Can 3x3 homography matrix transfer to camera parameters?
I used four 2d points and corresponding 3d points,but when I run the code,I get 0 reprojection error.
Any suggestion is greatly appreciated.
Thank you
Thanks for the great work @zhengthomastang .I tried calculating the 3d world coordinates from 2d pixel coordinates using the estimated homography using the provided code.
Here is the small snippet:
point=np.matrix(560,670,1) ## a homogeneous pixel coordinate of the image.
3dpoint=np.dot(point,homography.inv())## taking dot product of the 2d point and inverse of homography matrix.
scalar=3dpoint(0,2)##scale factor
3DX=3dpoint(0,0)/scalar ##Real world X coordinate
3DY=3dpoint(0,1)/scalar ##Real world Y coordinate
But I am getting weird values.Am I doing something wrong?
Any suggestion is appreciated.
Thanks
Hello, I want to ask if I can use a photo of different size as input. Currently it has some problems. How to adjust the code? Thank you!
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.