Skip to content
Snippets Groups Projects

Feature/Snapshot Video

Merged Sebastian Hahta requested to merge feature/snapshot-video into master
1 file
+ 4
0
Compare changes
  • Side-by-side
  • Inline
@@ -232,6 +232,7 @@ void modeVideo(ftl::Configurable *root) {
vector<cv::Mat> rgb(sources.size());
vector<cv::Mat> depth(sources.size());
#ifdef HAVE_LIBARCHIVE
char timestamp[18];
std::time_t t=std::time(NULL);
std::strftime(timestamp, sizeof(timestamp), "%F-%H%M%S", std::localtime(&t));
@@ -240,6 +241,7 @@ void modeVideo(ftl::Configurable *root) {
for (size_t i = 0; i < sources.size(); i++) {
writer.addSource(sources[i]->getURI(), sources[i]->parameters(), sources[i]->getPose());
}
#endif // HAVE_LIBARCHIVE
bool save = false;
@@ -250,11 +252,13 @@ void modeVideo(ftl::Configurable *root) {
while(rgb[i].empty() || depth[i].empty());
}
#ifdef HAVE_LIBARCHIVE
if (save) {
for (size_t i = 0; i < sources.size(); i++) {
writer.addRGBD(i, rgb[i], depth[i]);
}
}
#endif // HAVE_LIBARCHIVE
stack(rgb, show);
cv::namedWindow("Cameras", cv::WINDOW_KEEPRATIO | cv::WINDOW_NORMAL);
Loading