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);
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))
int getNQuarter() const
Return the number of quarter turns (rounded to the closest quarter)
Extent< int, N > floor(Extent< double, N > const &input)
Return the component-wise floor (round towards more negative).
EigenVector const & asEigen() const
Return a fixed-size Eigen representation of the coordinate object.
A class representing an angle.
A base class for image defects.
geom::AffineXYTransform makePixelFpTransform(geom::Extent2D const pixelSizeMm) const
Generate an XYTransform from pixel to focal plane coordinates.
constexpr double asDegrees() const noexcept
Return an Angle's value in degrees.
geom::AffineXYTransform makeFpPixelTransform(geom::Extent2D const pixelSizeMm) const
Generate an XYTransform from focal plane to pixel coordinates.