Skip to content
Snippets Groups Projects
Commit 70b65674 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Add more options

parent 8355f2c2
No related branches found
No related tags found
1 merge request!358Updates to SDK and alternative fusion
Pipeline #33803 passed
......@@ -16,8 +16,11 @@ int main(int argc, char **argv)
{
bool do_fusion = true;
bool do_eval = true;
bool do_carving = false;
bool show_changes = false;
int frameno = 0;
int sourceno = 0;
int iters = 2;
voltu::Channel display_channel = voltu::Channel::kColour;
std::list<std::string> paths;
......@@ -39,11 +42,20 @@ int main(int argc, char **argv)
{
display_channel = voltu::Channel::kDepth;
}
else if (s.second == "\"corrections\"")
{
display_channel = voltu::Channel::kColour;
show_changes = true;
}
}
else if (s.first == "--no-eval")
{
do_eval = false;
}
else if (s.first == "--carving")
{
do_carving = true;
}
else if (s.first == "--frame")
{
frameno = std::stoi(s.second);
......@@ -52,6 +64,10 @@ int main(int argc, char **argv)
{
sourceno = std::stoi(s.second);
}
else if (s.first == "--iterations")
{
iters = std::stoi(s.second);
}
else if (s.first[0] != '-')
{
paths.push_back(s.first);
......@@ -62,11 +78,7 @@ int main(int argc, char **argv)
for (const auto &p : paths)
{
if (!vtu->open(p))
{
cout << "Could not open source" << endl;
return -1;
}
vtu->open(p);
}
while (vtu->listRooms().size() == 0)
......@@ -76,11 +88,6 @@ int main(int argc, char **argv)
}
auto room = vtu->getRoom(vtu->listRooms().front());
if (!room)
{
cout << "Could not get room" << endl;
return -1;
}
for (int i=0; i<frameno; ++i)
{
......@@ -95,16 +102,13 @@ int main(int argc, char **argv)
op1->property("enabled")->setBool(do_fusion);
op2->property("enabled")->setBool(do_eval);
op2->property("show_colour")->setBool(false);
op1->property("show_changes")->setBool(true);
op1->property("visibility_carving")->setBool(false);
op2->property("show_colour")->setBool(!show_changes);
op1->property("show_changes")->setBool(show_changes);
op1->property("visibility_carving")->setBool(do_carving);
op1->property("mls_iterations")->setInt(iters);
pipe->submit(frame);
if (!pipe->waitCompletion(3000))
{
cout << "Pipeline timeout" << endl;
return -1;
}
pipe->waitCompletion(3000);
auto imgset = frame->getImageSet(display_channel);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment