licornea_tools
|
#include <iostream>
#include <fstream>
#include <utility>
#include <random>
#include <vector>
#include <string>
#include <mutex>
#include <cmath>
#include <map>
#include <format.h>
#include "lib/feature_points.h"
#include "lib/image_correspondence.h"
#include "../lib/args.h"
#include "../lib/json.h"
#include "../lib/filesystem.h"
#include "../lib/dataset.h"
#include "../lib/opencv.h"
#include "../lib/image_io.h"
Go to the source code of this file.
Classes | |
struct | flow_state |
Typedefs | |
using | local_feature_index = std::ptrdiff_t |
using | correspondence_key_type = std::pair< local_feature_index, view_index > |
using | correspondences_type = std::map< correspondence_key_type, vec2 > |
Functions | |
const cv::Size | horizontal_optical_flow_window_size (20, 20) |
const cv::Size | vertical_optical_flow_window_size (20, 20) |
correspondence_key_type | cor_key (local_feature_index i, const view_index &idx) |
void | print_flow_indicator (const view_index &origin_idx, const view_index &dest_idx) |
void | add_correspondences (correspondences_type &cors, const flow_state &state) |
cv::Mat_< uchar > | load_image (const dataset_group &datag, const view_index &idx, bool must_exist) |
flow_state | flow_to (flow_state &origin_state, view_index dest_idx, const dataset_group &datag, const cv::Size &window_size, bool may_skip) |
void | do_horizontal_optical_flow (correspondences_type &cors, const view_index &reference_idx, const flow_state &mid_x_state, const dataset_group &datag, bool verb=false) |
correspondences_type | do_2d_optical_flow (const dataset_group &datag, const view_index &reference_idx, const std::vector< vec2 > &reference_points) |
int | main (int argc, const char *argv[]) |
Variables | |
constexpr bool | verbose = false |
constexpr real | max_flow_err = 4.0 |
constexpr real | min_distance_between_features = 60 |
constexpr int | max_pyramid_level = 3 |
int | horizontal_outreach |
int | vertical_outreach |
using correspondence_key_type = std::pair<local_feature_index, view_index> |
Definition at line 58 of file cg_optical_flow_cors.cc.
using correspondences_type = std::map<correspondence_key_type, vec2> |
Definition at line 59 of file cg_optical_flow_cors.cc.
using local_feature_index = std::ptrdiff_t |
Definition at line 57 of file cg_optical_flow_cors.cc.
void add_correspondences | ( | correspondences_type & | cors, |
const flow_state & | state | ||
) |
Definition at line 78 of file cg_optical_flow_cors.cc.
|
inline |
Definition at line 61 of file cg_optical_flow_cors.cc.
correspondences_type do_2d_optical_flow | ( | const dataset_group & | datag, |
const view_index & | reference_idx, | ||
const std::vector< vec2 > & | reference_points | ||
) |
void do_horizontal_optical_flow | ( | correspondences_type & | cors, |
const view_index & | reference_idx, | ||
const flow_state & | mid_x_state, | ||
const dataset_group & | datag, | ||
bool | verb = false |
||
) |
flow_state flow_to | ( | flow_state & | origin_state, |
view_index | dest_idx, | ||
const dataset_group & | datag, | ||
const cv::Size & | window_size, | ||
bool | may_skip | ||
) |
const cv::Size horizontal_optical_flow_window_size | ( | 20 | , |
20 | |||
) |
cv::Mat_<uchar> load_image | ( | const dataset_group & | datag, |
const view_index & | idx, | ||
bool | must_exist | ||
) |
int main | ( | int | argc, |
const char * | argv[] | ||
) |
void print_flow_indicator | ( | const view_index & | origin_idx, |
const view_index & | dest_idx | ||
) |
Definition at line 66 of file cg_optical_flow_cors.cc.
const cv::Size vertical_optical_flow_window_size | ( | 20 | , |
20 | |||
) |
int horizontal_outreach |
Definition at line 54 of file cg_optical_flow_cors.cc.
constexpr real max_flow_err = 4.0 |
Definition at line 24 of file cg_optical_flow_cors.cc.
constexpr int max_pyramid_level = 3 |
Definition at line 26 of file cg_optical_flow_cors.cc.
constexpr real min_distance_between_features = 60 |
Definition at line 25 of file cg_optical_flow_cors.cc.
constexpr bool verbose = false |
Definition at line 22 of file cg_optical_flow_cors.cc.
int vertical_outreach |
Definition at line 55 of file cg_optical_flow_cors.cc.