1 #include "../lib/args.h" 2 #include "../lib/json.h" 3 #include "../lib/rotation.h" 10 int main(
int argc,
const char* argv[]) {
11 get_args(argc, argv,
"(from rotation_matrix.json / to out_rotation_matrix.json x y z)");
21 std::cout <<
"x = " << euler[0] *
deg_per_rad <<
"°" << std::endl;
22 std::cout <<
"y = " << euler[1] *
deg_per_rad <<
"°" << std::endl;
23 std::cout <<
"z = " << euler[2] *
deg_per_rad <<
"°" << std::endl;
25 }
else if(mode ==
"to") {
constexpr real deg_per_rad
std::string in_filename_arg()
std::string enum_arg(const std::vector< std::string > &options)
cv::Mat_< real > decode_mat(const json &j)
int main(int argc, const char *argv[])
cv::Matx< real, 3, 3 > mat33
json encode_mat(const Mat &mat)
void export_json_file(const json &j, const std::string &filename, bool compact)
mat33 to_rotation_matrix(const vec3 &euler)
std::string out_filename_arg()
constexpr real rad_per_deg
vec3 to_euler(const mat33 &R_)
json import_json_file(const std::string &filename)
void get_args(int argc, const char *argv[], const std::string &usage)