Open matlabbe opened 7 months ago
The problem with the current way to display it is that cx/cy are assumed to be exactly at the center of the image, which often are not, so the frustum shown is the ideal straight frustum based on field of view.
Similarly to jsk camera info display using image_geometry::PinholeCameraModel::projectPixelTo3dRay to find the 4 corners of the frustum, we could use internal CameraModel::project() with depth=1 (or actual max distance of the frustum) to get the four corners: https://github.com/introlab/rtabmap/blob/1dadd50cf292cce4477f4a026e3a969c42c0baef/corelib/src/CameraModel.cpp#L766-L773
CameraModel::project()
depth=1
The problem with the current way to display it is that cx/cy are assumed to be exactly at the center of the image, which often are not, so the frustum shown is the ideal straight frustum based on field of view.
Similarly to jsk camera info display using image_geometry::PinholeCameraModel::projectPixelTo3dRay to find the 4 corners of the frustum, we could use internal
CameraModel::project()
withdepth=1
(or actual max distance of the frustum) to get the four corners: https://github.com/introlab/rtabmap/blob/1dadd50cf292cce4477f4a026e3a969c42c0baef/corelib/src/CameraModel.cpp#L766-L773