27 namespace cameraGeom {
31 : _fpPosition(fpPosition), _refPoint(refPoint), _yaw(yaw), _pitch(pitch), _roll(roll), _rotMat() {
32 double cosYaw = std::cos(_yaw);
33 double sinYaw = std::sin(_yaw);
34 double cosPitch = std::cos(_pitch);
35 double sinPitch = std::sin(_pitch);
36 double cosRoll = std::cos(_roll);
37 double sinRoll = std::sin(_roll);
44 _rotMat << cosYaw * cosPitch, cosYaw * sinPitch * sinRoll - cosRoll * sinYaw, cosPitch * sinYaw,
45 cosYaw * cosRoll + sinYaw * sinPitch * sinRoll;
59 Eigen::Matrix2d jacobian =
60 _rotMat.array() * (Eigen::Vector2d::Ones() * pixelSizeMm.
asEigen().transpose()).array();
62 Eigen::Vector2d refMm = pixelSizeMm.
asEigen().array() * _refPoint.
asEigen().array();
63 Eigen::Vector2d translation = _fpPosition.
asEigen() - (_rotMat * refMm);
geom::AffineXYTransform makePixelFpTransform(geom::Extent2D const pixelSizeMm) const
Generate an XYTransform from pixel to focal plane coordinates.
Orientation(geom::Point2D const fpPosition=geom::Point2D(0, 0), geom::Point2D const refPoint=geom::Point2D(-0.5,-0.5), geom::Angle const yaw=geom::Angle(0), geom::Angle const pitch=geom::Angle(0), geom::Angle const roll=geom::Angle(0))
Extent< int, N > floor(Extent< double, N > const &input)
Return the component-wise floor (round towards more negative).
A class representing an angle.
geom::AffineXYTransform makeFpPixelTransform(geom::Extent2D const pixelSizeMm) const
Generate an XYTransform from focal plane to pixel coordinates.
EigenVector const & asEigen() const
Return a fixed-size Eigen representation of the coordinate object.
constexpr double asDegrees() const noexcept
Return an Angle's value in degrees.
int getNQuarter() const
Return the number of quarter turns (rounded to the closest quarter)