fix(sample): record core fix.

This commit is contained in:
TinyO 2019-10-22 17:57:17 +08:00
parent 51c4e8737e
commit 4aa8327f54

View File

@ -68,7 +68,7 @@ int main(int argc, char *argv[]) {
auto &&left_datas = api->GetStreamDatas(Stream::LEFT); auto &&left_datas = api->GetStreamDatas(Stream::LEFT);
auto &&right_datas = api->GetStreamDatas(Stream::RIGHT); auto &&right_datas = api->GetStreamDatas(Stream::RIGHT);
auto &&depth_datas = api->GetStreamDatas(Stream::DEPTH); auto &&depth_data = api->GetStreamData(Stream::DEPTH);
auto &&disparity_datas = api->GetStreamDatas(Stream::DISPARITY); auto &&disparity_datas = api->GetStreamDatas(Stream::DISPARITY);
img_count += left_datas.size(); img_count += left_datas.size();
@ -121,14 +121,12 @@ int main(int argc, char *argv[]) {
// for (auto &&right : right_datas) { // for (auto &&right : right_datas) {
// dataset.SaveStreamData(Stream::RIGHT, right); // dataset.SaveStreamData(Stream::RIGHT, right);
// } // }
// save Stream::DEPTH // save Stream::DEPTH
try { if (!depth_data.frame.empty()) {
for (auto &depth : depth_datas) { dataset.SaveStreamData(Stream::DEPTH, depth_data);
dataset.SaveStreamData(Stream::DEPTH, depth);
}
} catch(int e) {
LOG(WARNING) << "Save failed.";
} }
// save Stream::DISPARITY // save Stream::DISPARITY
// for (auto &&disparity : disparity_datas) { // for (auto &&disparity : disparity_datas) {
// dataset.SaveStreamData(Stream::DISPARITY, disparity); // dataset.SaveStreamData(Stream::DISPARITY, disparity);