45#ifndef UFO_VISION_CAMERA_ORTHOGONAL_INTRINSICS_HPP
46#define UFO_VISION_CAMERA_ORTHOGONAL_INTRINSICS_HPP
91 [[nodiscard]]
constexpr float aspect() const noexcept
93 return static_cast<float>(
cols) /
static_cast<float>(
rows);
108 os <<
"Rows: " << intrinsics.
rows <<
", Cols: " << intrinsics.
cols
109 <<
"\nWidth: " << intrinsics.
width <<
", Height: " << intrinsics.
height
110 <<
"\nZoom: " << intrinsics.
zoom;
120struct std::formatter<
ufo::OrthogonalIntrinsics> {
121 constexpr auto parse(std::format_parse_context& ctx)
const {
return ctx.begin(); }
125 return std::format_to(
126 ctx.out(),
"Rows: {}, Cols: {}\nWidth: {}, Height: {}\nZoom: {}", intrinsics.
rows,
All vision-related classes and functions.
Stores the intrinsic parameters of an orthogonal camera.
float height
Viewport height in world-space units (e.g., meters).
std::size_t rows
Image height in pixels.
float width
Viewport width in world-space units (e.g., meters).
constexpr float aspect() const noexcept
Computes the aspect ratio (cols / rows).
friend bool operator==(OrthogonalIntrinsics const &, OrthogonalIntrinsics const &) noexcept=default
Memberwise equality comparison.
std::size_t cols
Image width in pixels.