18 #ifndef CAMERA_CALIBRATION_PARSER_H
19 #define CAMERA_CALIBRATION_PARSER_H
25 #include <nlohmann/json.hpp>
26 #include <Eigen/Dense>
33 using namespace Eigen;
43 using AugConfig = std::map<std::string, std::variant<float, std::vector<int>,
bool>>;
46 const float FPS = 30.0;
51 template <
typename Derived>
67 std::pair<std::string, std::map<std::string, std::vector<float>>>
loadGroup(
68 const json& groupDict,
const std::string& key);
71 std::pair<std::map<std::string, json>, std::map<std::string, json>>
75 std::pair<json, json>
loadCalib(
const std::string& calibFilePath,
const std::string& calibMode =
"synthetic",
76 bool useCameraGroups =
true,
bool recentering =
false);
83 const std::string& calibMode =
"synthetic",
bool useCameraGroups =
true,
84 bool recentering =
false);
90 std::tuple<std::vector<Matrix4f>, std::vector<std::string>, std::vector<float>>
parseCalibFile(
91 const std::string& calibFilePath,
const std::string& bevGroupName,
92 const std::string& calibMode =
"synthetic",
bool useCameraGroups =
true,
93 bool recentering =
false);
96 std::pair<float, std::vector<float>>
fetchSceneMapInfo(
const std::string& calibFilePath);
100 const std::vector<std::vector<float>>& locations,
101 const std::vector<int>& instanceIds,
102 const json& annotationsPrev);
106 const std::string& calibFilePath,
const std::string& bevGroupName,
107 const std::string& groundTruthFilePath,
const std::string& sceneName,
108 const std::vector<std::string>& classNames,
int startFrame = 0,
int frames = 1000);
112 const std::vector<Matrix4f> &lidar2img,
115 #endif // CAMERA_CALIBRATION_PARSER_H