ExternalCameraCalibration.cpp
Go to the documentation of this file.
1
#include "
ExternalCameraCalibration.h
"
2
3
#include <SimoxUtility/json/eigen_conversion.h>
4
5
#include <
ArmarXCore/core/time/TimeUtil.h
>
6
7
void
8
armarx::to_json
(nlohmann::json& j,
const
armarx::ExternalCameraCalibration
& cal)
9
{
10
j[
"camera_pose"
] = cal.
cameraPose
;
11
j[
"camera_pose_frame"
] = cal.
cameraPoseFrame
;
12
j[
"timestamp_datetime"
] =
TimeUtil::toStringDateTime
(cal.
timestamp
);
13
j[
"timestamp_seconds"
] = cal.
timestamp
.toSeconds();
14
}
15
16
void
17
armarx::from_json
(
const
nlohmann::json& j,
armarx::ExternalCameraCalibration
& cal)
18
{
19
j.at(
"camera_pose"
).get_to(cal.
cameraPose
);
20
j.at(
"camera_pose_frame"
).get_to(cal.
cameraPoseFrame
);
21
cal.
timestamp
= IceUtil::Time::seconds(j.at(
"timestamp_seconds"
));
22
}
ExternalCameraCalibration.h
TimeUtil.h
armarx::ExternalCameraCalibration
Definition
ExternalCameraCalibration.h:15
armarx::ExternalCameraCalibration::timestamp
IceUtil::Time timestamp
Definition
ExternalCameraCalibration.h:19
armarx::ExternalCameraCalibration::cameraPose
Eigen::Matrix4f cameraPose
Definition
ExternalCameraCalibration.h:17
armarx::ExternalCameraCalibration::cameraPoseFrame
std::string cameraPoseFrame
Definition
ExternalCameraCalibration.h:18
armarx::TimeUtil::toStringDateTime
static std::string toStringDateTime(const IceUtil::Time &time)
Return a date & time string like "2020-01-31_15-30-05" (Y-M-D_H-M-S).
Definition
TimeUtil.cpp:186
armarx::from_json
void from_json(const nlohmann::json &j, Vector2f &value)
armarx::to_json
void to_json(nlohmann::json &j, const Vector2f &value)
VisionX
components
ArMarkerExternalCameraCalibration
ExternalCameraCalibration.cpp
Generated by
1.13.2