I would like to use use numpy's least square algorithm to solve for a camera matrix from 6 known 3D -> 2D point correspondence.
I have been using this website as a reference:
http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL%5FCOPIES/OWENS/LECT9/node4.html
Currently my camera matrix seems to have very small values:
[[ -1.01534118e-11 3.87508914e-11 -2.75515236e-11 5.57599976e+02]
[ -1.84008233e-11 2.78083388e-11 -9.67788509e-11 9.77599976e+02]
[ -2.59237076e-14 -8.57647287e-15 -9.09272657e-14 1.00000000e+00]]
I would like to be able to constrain the numpy solver to prevent it from solving for the trivial solution where the Camera matrix is nearly zero. Does anyone know how to constrain numpy.linalg.lstsqr?