licornea_tools
cors_view_fpoints.cc
Go to the documentation of this file.
1 #include <string>
3 #include "lib/feature_points.h"
4 #include "../lib/args.h"
5 #include "../lib/misc.h"
6 #include "../lib/json.h"
7 #include "../lib/opencv.h"
8 #include "../lib/intrinsics.h"
9 
10 using namespace tlz;
11 
12 int main(int argc, const char* argv[]) {
13  get_args(argc, argv, "image_correspondences.json out_feature_points.json x_index y_index");
15  std::string out_feature_points_filename = out_filename_arg();
16  int x_index = int_arg();
17  int y_index = int_arg();
18 
19  std::cout << "saving feature points" << std::endl;
20  view_index idx(x_index, y_index);
21  feature_points fpoints = feature_points_for_view(cors, idx);
22  export_json_file(encode_feature_points(fpoints), out_feature_points_filename);
23 
24  std::cout << "done" << std::endl;
25 }
Set of features, each on set of views.
Points of different features, on one view.
int main(int argc, const char *argv[])
feature_points feature_points_for_view(const image_correspondences &cors, view_index idx, bool is_distorted)
json encode_feature_points(const feature_points &fpoints)
long int_arg()
Definition: args.cc:138
void export_json_file(const json &j, const std::string &filename, bool compact)
Definition: json.cc:9
image_correspondences image_correspondences_arg()
std::string out_filename_arg()
Definition: args.cc:104
void get_args(int argc, const char *argv[], const std::string &usage)
Definition: args.cc:49