licornea_tools
references_grid.h
Go to the documentation of this file.
1 #ifndef LICORNEA_CG_REFERENCES_GRID_H_
2 #define LICORNEA_CG_REFERENCES_GRID_H_
3 
4 #include "../../../lib/json.h"
5 #include "../../../lib/args.h"
6 #include "../image_correspondence.h"
7 #include <string>
8 
9 namespace tlz {
10 
12  std::vector<int> x_indices;
13  std::vector<int> y_indices;
14 
15  std::size_t cols() const { return x_indices.size(); }
16  std::size_t rows() const { return y_indices.size(); }
17 
18  std::size_t size() const { return cols() * rows(); }
19  view_index view(std::ptrdiff_t col, std::ptrdiff_t row) const;
20  bool has_view(const view_index&) const;
21 
22  bool is_valid() const { return x_indices.size() > 0; }
23 };
24 
27 
29 
31 
32 
33 }
34 
35 #endif
references_grid decode_references_grid(const json &j_grid)
bool is_valid() const
Set of features, each on set of views.
references_grid references_grid_arg()
json encode_references_grid(const references_grid &grid)
bool has_view(const view_index &) const
std::vector< int > y_indices
std::vector< int > x_indices
view_index view(std::ptrdiff_t col, std::ptrdiff_t row) const
std::size_t size() const
std::size_t cols() const
references_grid get_references_grid(const image_correspondences &cors)
nlohmann::json json
Definition: json.h:11
std::size_t rows() const