32#include <opencv2/core.hpp>
55 const Eigen::Vector3d &bearing);
61 double pitch_deg,
double fov_deg,
int out_w,
62 int out_h,
int interp = 1 );
68 const Eigen::Matrix3d &R_pano_from_view,
69 const Eigen::Matrix3d &K,
int out_w,
70 int out_h,
int interp = 1);
74std::vector<PerspectiveView>
cube_faces(
const cv::Mat &equirect,
int face_size,
83 int n_yaw,
double fov_deg,
84 int tile,
int interp = 1);
92 const std::vector<PerspectiveView> &views,
93 const std::vector<cv::Mat> &tile_labels);
Eigen::Vector2d bearing_to_pixel(const cv::Size &equirect, const Eigen::Vector3d &bearing)
Unit bearing (need not be normalised) in panorama frame -> equirect pixel (u,v).
Eigen::Vector3d pixel_to_bearing(const cv::Size &equirect, double u, double v)
Equirect pixel (u,v) -> unit bearing in the panorama frame.
std::vector< PerspectiveView > overlapping_views(const cv::Mat &equirect, int n_yaw, double fov_deg, int tile, int interp=1)
Tile the sphere as n_yaw evenly spaced views around the equator plus one up and one down view,...
PerspectiveView extract_perspective(const cv::Mat &equirect, double yaw_deg, double pitch_deg, double fov_deg, int out_w, int out_h, int interp=1)
Render a virtual pinhole view centred at (yaw,pitch) with the given horizontal FOV.
cv::Mat stitch_labels_to_equirect(const cv::Size &out, const std::vector< PerspectiveView > &views, const std::vector< cv::Mat > &tile_labels)
Stitch per-tile label maps (CV_32S, -1 = background) back into a single equirect label map of size ou...
std::vector< PerspectiveView > cube_faces(const cv::Mat &equirect, int face_size, int interp=1)
Tile the whole sphere as the six faces of a cube (90 deg FOV each).
A virtual pinhole view rendered out of an equirectangular panorama.
cv::Mat image
rendered pinhole image (same type as source)
double fov_deg
horizontal field of view used to build K
Eigen::Matrix3d K
intrinsics of the virtual pinhole camera
Eigen::Matrix3d R_pano_from_view
maps view-camera rays into panorama frame
double pitch_deg
view centre latitude (deg)
double yaw_deg
view centre longitude (deg)