8 #ifndef SE_PINHOLE_CAMERA_HPP 9 #define SE_PINHOLE_CAMERA_HPP 18 float fx = std::numeric_limits<float>::quiet_NaN();
22 float fy = std::numeric_limits<float>::quiet_NaN();
26 float cx = std::numeric_limits<float>::quiet_NaN();
30 float cy = std::numeric_limits<float>::quiet_NaN();
35 void readYaml(
const std::string& filename);
37 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
52 int computeIntegrationScaleImpl(
const Eigen::Vector3f& block_centre,
56 const int max_block_scale)
const;
58 float nearDistImpl(
const Eigen::Vector3f& ray_S)
const;
60 float farDistImpl(
const Eigen::Vector3f& ray_S)
const;
62 float measurementFromPointImpl(
const Eigen::Vector3f& point_S)
const;
64 bool pointInFrustumImpl(
const Eigen::Vector3f& point_S)
const;
66 bool pointInFrustumInfImpl(
const Eigen::Vector3f& point_S)
const;
68 bool sphereInFrustumImpl(
const Eigen::Vector3f& centre_S,
const float radius)
const;
70 bool sphereInFrustumInfImpl(
const Eigen::Vector3f& centre_S,
const float radius)
const;
72 static std::string typeImpl();
74 srl::projection::PinholeCamera<srl::projection::NoDistortion>
model;
83 void computeFrustumVertices();
84 void computeFrustumNormals();
86 static constexpr
int num_frustum_vertices_ = 8;
87 static constexpr
int num_frustum_normals_ = 6;
91 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
98 #include "impl/pinhole_camera_impl.hpp" 100 #endif // SE_PINHOLE_CAMERA_HPP float fx
The sensor's horizontal focal length in pixels.
Definition: pinhole_camera.hpp:18
std::ostream & operator<<(std::ostream &os, const FieldDataConfig< se::Field::Occupancy > &c)
void readYaml(const std::string &filename)
Reads the struct members from the "sensor" node of a YAML file.
Definition: pinhole_camera.hpp:44
float fy
The sensor's vertical focal length in pixels.
Definition: pinhole_camera.hpp:22
Eigen::Matrix< float, 3, num_frustum_vertices_ > frustum_vertices_
Definition: pinhole_camera.hpp:88
Definition: pinhole_camera.hpp:15
srl::projection::PinholeCamera< srl::projection::NoDistortion > model
Definition: pinhole_camera.hpp:74
Eigen::Matrix< float, 4, num_frustum_normals_ > frustum_normals_
Definition: pinhole_camera.hpp:89
float cy
The sensor's optical centre vertical coordinate in pixels.
Definition: pinhole_camera.hpp:30
Definition: sensor.hpp:55
float scaled_pixel
Definition: pinhole_camera.hpp:75
float vertical_fov
The vertical field of view in radians.
Definition: pinhole_camera.hpp:81
float cx
The sensor's optical centre horizontal coordinate in pixels.
Definition: pinhole_camera.hpp:26
Definition: sensor.hpp:23
float horizontal_fov
The horizontal field of view in radians.
Definition: pinhole_camera.hpp:78
Helper wrapper to allocate and de-allocate octants in the octree.
Definition: colour_utils.hpp:17