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

Fix snapshot delay units

parent 2efc60fd
No related branches found
No related tags found
1 merge request!54Snapshot stream recording
Pipeline #11926 passed
...@@ -137,8 +137,10 @@ bool SnapshotWriter::addCameraParams(const string &name, const Matrix4d &pose, c ...@@ -137,8 +137,10 @@ bool SnapshotWriter::addCameraParams(const string &name, const Matrix4d &pose, c
bool SnapshotWriter::addCameraRGBD(const string &name, const Mat &rgb, const Mat &depth) { bool SnapshotWriter::addCameraRGBD(const string &name, const Mat &rgb, const Mat &depth) {
bool retval = true; bool retval = true;
retval &= addMat(name + "-RGB", rgb); cv::Mat tdepth;
retval &= addMat(name + "-D", depth); depth.convertTo(tdepth, CV_16SC1, 16.0f*10.0f);
retval &= addMat(name + "-RGB", rgb, "jpg");
retval &= addMat(name + "-D", tdepth, "png");
return retval; return retval;
} }
...@@ -171,7 +173,7 @@ void SnapshotStreamWriter::run() { ...@@ -171,7 +173,7 @@ void SnapshotStreamWriter::run() {
writer_.addCameraRGBD(std::to_string(ms) + "-" + std::to_string(i), rgb[i], depth[i]); writer_.addCameraRGBD(std::to_string(ms) + "-" + std::to_string(i), rgb[i], depth[i]);
} }
std::this_thread::sleep_for(std::chrono::microseconds(delay_)); std::this_thread::sleep_for(std::chrono::milliseconds(delay_));
} }
run_ = false; run_ = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment