-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set camera intrinsics for edge? #31
Comments
For now, I changed the definition of EdgeSE3ProjectXYZ in this file: // Projection using focal_length in x and y directions
py::class_<EdgeSE3ProjectXYZ, BaseBinaryEdge<2, Vector2D, VertexSBAPointXYZ, VertexSE3Expmap>>(m, "EdgeSE3ProjectXYZ")
.def(py::init<>())
.def("compute_error", &EdgeSE3ProjectXYZ::computeError)
.def("is_depth_positive", &EdgeSE3ProjectXYZ::isDepthPositive)
.def("linearize_oplus", &EdgeSE3ProjectXYZ::linearizeOplus)
.def("cam_project", &EdgeSE3ProjectXYZ::cam_project)
.def_readwrite("fx", &EdgeSE3ProjectXYZ::fx)
.def_readwrite("fy", &EdgeSE3ProjectXYZ::fy)
.def_readwrite("cx", &EdgeSE3ProjectXYZ::cx)
.def_readwrite("cy", &EdgeSE3ProjectXYZ::cy)
; |
@yiakwy-enterprise-roborock Its been a while since I used g2opy, but IIRC it worked fine. |
I confirmed that modifying these attributes works well with EdgeSE3ProjectXYZ python bindings. @medakk I suggested mark this question as resolved. |
I wouldn't consider it resolved yet: ideally this should be a part of the g2opy codebase, and I'm not sure how many other classes have such missing attributes. |
For EdgeSE3ProjectXYZ, we can set the camera intrinsics with the public fx, fy, cx, cy values, in the g2o codebase.
How do I set these values in g2opy?
The text was updated successfully, but these errors were encountered: