Some pre-defined edges, such as EdgeProjectXYZ2UV, EdgeSE3ProjectXYZ
, are widely used during BA. However, they can only set unchangeable camera parameters. I'm wondering if I can set optimizable camera parameters.
Thanks for any reply in advance!
I found Vertex VertexIntrinsics
in g2o/types/sba/vertex_intrinsics.h
. And its oplusImpl()
function is implemented which means it can be optimized.
/**
* \brief Vertex encoding the intrinsics of the camera fx, fy, cx, xy, baseline;
*/
class G2O_TYPES_SBA_API VertexIntrinsics : public BaseVertex<4, Eigen::Matrix<number_t, 5, 1, Eigen::ColMajor> >
It seems to be the one I'm looking for. Yet I cannot find a type of Ternary-Edge that link this vertex, camera pose vertex, and 3D world point vertex. Or any other edge that takes this type of vertex.
It would be great if somebody could share an example or some explanation about how this vertex works. Or any other way to optimize camera intrinsic in g2o.