27 namespace cameraGeom {
33 : _fpPosition(fpPosition), _refPoint(refPoint), _yaw(yaw), _pitch(pitch), _roll(roll), _rotMat() {
34 double cosYaw = std::cos(_yaw);
35 double sinYaw = std::sin(_yaw);
36 double cosPitch = std::cos(_pitch);
37 double sinPitch = std::sin(_pitch);
38 double cosRoll = std::cos(_roll);
39 double sinRoll = std::sin(_roll);
46 _rotMat << cosYaw * cosPitch, cosYaw * sinPitch * sinRoll - cosRoll * sinYaw, cosPitch * sinYaw,
47 cosYaw * cosRoll + sinYaw * sinPitch * sinRoll;
61 Eigen::Matrix2d jacobian =
62 _rotMat.array() * (Eigen::Vector2d::Ones() * pixelSizeMm.
asEigen().transpose()).array();
64 Eigen::Vector2d refMm = pixelSizeMm.
asEigen().array() * _refPoint.
asEigen().array();
65 Eigen::Vector2d translation = _fpPosition.
asEigen() - (_rotMat * refMm);
geom::Transform< geom::Point2Endpoint, geom::Point2Endpoint > makePixelFpTransform(geom::Extent2D const pixelSizeMm) const
Generate a Transform from pixel to focal plane coordinates.
TransformPoint2ToPoint2 makeTransform(AffineTransform const &affine)
Wrap an AffineTransform as a Transform.
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.
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.
geom::Transform< geom::Point2Endpoint, geom::Point2Endpoint > makeFpPixelTransform(geom::Extent2D const pixelSizeMm) const
Generate a Transform from focal plane to pixel coordinates.
int getNQuarter() const
Return the number of quarter turns (rounded to the closest quarter)