HoviTron Video Pipeline
Static Public Member Functions | Data Fields
rvs::Config Class Reference

Configuration parameters. More...

#include <Config.h>

Static Public Member Functions

static Config loadFromFile (std::string const &filename, std::string const &dir)
 

Data Fields

std::string version
 
std::vector< std::string > InputCameraNames
 
std::vector< std::string > VirtualCameraNames
 
std::vector< Parametersparams_real
 
std::vector< Parametersparams_virtual
 
std::vector< std::string > texture_names
 
std::vector< std::string > depth_names
 
std::vector< std::string > outfilenames
 
std::vector< std::string > outmaskedfilenames
 
std::vector< std::string > outmaskfilenames
 
std::vector< std::string > outdepthfilenames
 
std::vector< std::string > outmaskdepthfilenames
 
float validity_threshold = 5000.f
 
std::string vs_method = "Triangles"
 
std::string blending_method = "Simple"
 
float blending_low_freq_factor
 
float blending_high_freq_factor
 
float blending_factor = 5.f
 
int start_frame = 0
 
int number_of_frames = 1
 
std::string directory
 
bool overrideVirtualViewSetting = true
 

Detailed Description

Configuration parameters.

Definition at line 112 of file Config.h.

Member Function Documentation

◆ loadFromFile()

Config rvs::Config::loadFromFile ( std::string const &  filename,
std::string const &  dir 
)
static

Load configuration from file

Definition at line 72 of file Config.cpp.

73 {
74 if(g_verbose)
75 std::cout << '\n';
76 std::string path = filename;
77 if (!dir.empty()) {
78 path = dir + '/' + filename;
79 }
80 std::ifstream stream(path);
81
82 if (!stream.good()) {
83 std::ostringstream what;
84 what << "Failed to open configuration file \"" << dir + '/' + filename << "\" for reading: \n" << strerror(errno);
85 throw std::runtime_error(what.str());
86 }
87 auto root = json::Node::readFrom(stream);
88
89 Config config;
90
91 config.directory = dir;
92
93 config.setVersionFrom(root);
94 config.setInputCameraNamesFrom(root);
95 config.setVirtualCameraNamesFrom(root);
96 config.setInputCameraParameters(root);
97 config.setVirtualCameraParameters(root);
98 config.setInputFilepaths(root, "ViewImageNames", config.texture_names);
99 config.setInputFilepaths(root, "DepthMapNames", config.depth_names);
100 config.setOutputFilepaths(root, "OutputFiles", config.outfilenames);
101 config.setOutputFilepaths(root, "MaskedOutputFiles", config.outmaskedfilenames);
102 config.setOutputFilepaths(root, "OutputMasks", config.outmaskfilenames);
103 config.setOutputFilepaths(root, "DepthOutputFiles", config.outdepthfilenames);
104 config.setOutputFilepaths(root, "MaskedDepthOutputFiles", config.outmaskdepthfilenames);
105 config.setValidityThreshold(root);
106 config.setSynthesisMethod(root);
107 config.setBlendingMethod(root);
108 config.setBlendingFactor(root);
109 config.setBlendingLowFreqFactor(root);
110 config.setBlendingHighFreqFactor(root);
111 config.setStartFrame(root);
112 config.setNumberOfFrames(root);
113
114 setPrecision(root);
115 setColorSpace(root);
116
117 auto node = root.optional("VirtualPoseTraceName");
118 if (node) {
119 auto filepath = node.asString();
120 if(g_verbose)
121 std::cout << "VirtualPoseTraceName: " << filepath << '\n';
122 //config.loadPoseTraceFromFile(filepath);
123 }
124
125 config.setOverrideVirtualViewSetting(root);
126
127 return config;
128 }
static Node readFrom(std::istream &)
Definition: JsonParser.cpp:203

Field Documentation

◆ blending_factor

float rvs::Config::blending_factor = 5.f

Blending factor in BlendedViewSimple

Definition at line 169 of file Config.h.

◆ blending_high_freq_factor

float rvs::Config::blending_high_freq_factor

High frequency blending factor in BlendedViewMultiSpec

Definition at line 166 of file Config.h.

◆ blending_low_freq_factor

float rvs::Config::blending_low_freq_factor

Low frequency blending factor in BlendedViewMultiSpec

Definition at line 163 of file Config.h.

◆ blending_method

std::string rvs::Config::blending_method = "Simple"

Blending method (see BlendedView)

Definition at line 160 of file Config.h.

◆ depth_names

std::vector<std::string> rvs::Config::depth_names

filenames of the input depth images

Definition at line 136 of file Config.h.

◆ directory

std::string rvs::Config::directory

The loaded pose trace the directory that contain the file

Definition at line 181 of file Config.h.

◆ InputCameraNames

std::vector<std::string> rvs::Config::InputCameraNames

Input camera names to lookup in the config file

Definition at line 121 of file Config.h.

◆ number_of_frames

int rvs::Config::number_of_frames = 1

Number of frames to process

Definition at line 175 of file Config.h.

◆ outdepthfilenames

std::vector<std::string> rvs::Config::outdepthfilenames

Name of the output depth files

Definition at line 148 of file Config.h.

◆ outfilenames

std::vector<std::string> rvs::Config::outfilenames

Name of the output files

Definition at line 139 of file Config.h.

◆ outmaskdepthfilenames

std::vector<std::string> rvs::Config::outmaskdepthfilenames

Name of the output masked depth files

Definition at line 151 of file Config.h.

◆ outmaskedfilenames

std::vector<std::string> rvs::Config::outmaskedfilenames

Name of the output masked files

Definition at line 142 of file Config.h.

◆ outmaskfilenames

std::vector<std::string> rvs::Config::outmaskfilenames

Name of the output masks

Definition at line 145 of file Config.h.

◆ overrideVirtualViewSetting

bool rvs::Config::overrideVirtualViewSetting = true

Allow to override the dimension, principal point and focal of the virtual camera in the json

Definition at line 184 of file Config.h.

◆ params_real

std::vector<Parameters> rvs::Config::params_real

input cameras parameters

Definition at line 127 of file Config.h.

◆ params_virtual

std::vector<Parameters> rvs::Config::params_virtual

virtual cameras parameters

Definition at line 130 of file Config.h.

◆ start_frame

int rvs::Config::start_frame = 0

First frame to process (zero-based)

Definition at line 172 of file Config.h.

◆ texture_names

std::vector<std::string> rvs::Config::texture_names

filenames of the input color images

Definition at line 133 of file Config.h.

◆ validity_threshold

float rvs::Config::validity_threshold = 5000.f

Threshold for valid pixels

Definition at line 154 of file Config.h.

◆ version

std::string rvs::Config::version

Version of the configuration file

Definition at line 118 of file Config.h.

◆ VirtualCameraNames

std::vector<std::string> rvs::Config::VirtualCameraNames

Virtual camera names to lookup in the config file

Definition at line 124 of file Config.h.

◆ vs_method

std::string rvs::Config::vs_method = "Triangles"

Method for view synthesis

Definition at line 157 of file Config.h.


The documentation for this class was generated from the following files: