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
8
void
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
17
void
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
}
armarx::to_json
void to_json(nlohmann::json &j, const Vector2f &value)
armarx::ExternalCameraCalibration
Definition:
ExternalCameraCalibration.h:15
armarx::from_json
void from_json(const nlohmann::json &j, Vector2f &value)
TimeUtil.h
armarx::ExternalCameraCalibration::cameraPose
Eigen::Matrix4f cameraPose
Definition:
ExternalCameraCalibration.h:19
ExternalCameraCalibration.h
armarx::ExternalCameraCalibration::timestamp
IceUtil::Time timestamp
Definition:
ExternalCameraCalibration.h:21
armarx::ExternalCameraCalibration::cameraPoseFrame
std::string cameraPoseFrame
Definition:
ExternalCameraCalibration.h:20
VisionX
components
ArMarkerExternalCameraCalibration
ExternalCameraCalibration.cpp
Generated on Sat Oct 12 2024 09:14:15 for armarx_documentation by
1.8.17