Specification of a camera's intrinsic focal properties as focal length (in pixels).
One or both values can be given. When only one value is given, the other is assumed to match. At least one value must be provided.
#include <drake/systems/sensors/camera_config.h>
Public Member Functions | |
template<typename Archive > | |
void | Serialize (Archive *a) |
Passes this object to an Archive. More... | |
void | ValidateOrThrow () const |
double | focal_x () const |
Reports focal length along x-axis. More... | |
double | focal_y () const |
Resolves focal length along y-axis. More... | |
Public Attributes | |
std::optional< double > | x |
If specified, the focal length along this axis; otherwise, use focal length in the y-direction. More... | |
std::optional< double > | y |
If specified, the focal length along this axis; otherwise, use focal length in the x-direction. More... | |
double focal_x | ( | ) | const |
Reports focal length along x-axis.
std::exception | if both x and y are null. |
double focal_y | ( | ) | const |
Resolves focal length along y-axis.
std::exception | if both x and y are null. |
void Serialize | ( | Archive * | a | ) |
Passes this object to an Archive.
Refer to YAML Serialization for background.
void ValidateOrThrow | ( | ) | const |
std::optional<double> x |
If specified, the focal length along this axis; otherwise, use focal length in the y-direction.
std::optional<double> y |
If specified, the focal length along this axis; otherwise, use focal length in the x-direction.