Spherical camera model with panoramatic image plane and rays in spherical coordinates. More...
#include <camera_model.h>
Public Member Functions | |
SphericalCoord | backProject (Eigen::Vector2d pixel) const |
CylindricalCCMSphRays (int _pan_width, int _pan_height) | |
Vector2d | project (SphericalCoord sc) const |
Protected Attributes | |
int | pan_height |
int | pan_width |
Spherical camera model with panoramatic image plane and rays in spherical coordinates.
Pixel coordinate (x,y)=(0,0) is at the upper-left corner of the image. (x,y)=(width-1,height-1) is bottom right corner.
MATLAB code used to construct panoramas.
% Azimuth grows right.
azimuth = repmat(linspace(0, (width - 1) / width * (-2)*pi, width), height, 1);
% Center zero azimuth in the panorama.
azimuth = circshift(azimuth, [0 floor(width/2)]);
elevation = repmat(linspace(pi/2, -pi/2, height)', 1, width);
[xmat ymat zmat] = sph2cart(azimuth, elevation, radius);
Definition at line 134 of file camera_model.h.
vslam::CylindricalCCMSphRays::CylindricalCCMSphRays | ( | int | _pan_width, |
int | _pan_height | ||
) | [inline] |
Definition at line 139 of file camera_model.h.
SphericalCoord vslam::CylindricalCCMSphRays::backProject | ( | Eigen::Vector2d | pixel | ) | const [inline] |
Definition at line 142 of file camera_model.h.
Vector2d vslam::CylindricalCCMSphRays::project | ( | SphericalCoord | sc | ) | const [inline] |
Definition at line 153 of file camera_model.h.
int vslam::CylindricalCCMSphRays::pan_height [protected] |
Definition at line 137 of file camera_model.h.
int vslam::CylindricalCCMSphRays::pan_width [protected] |
Definition at line 136 of file camera_model.h.