fix(sample): record core fix.

This commit is contained in:
TinyO 2019-10-22 17:39:17 +08:00
parent 7e4645f8a9
commit 2c9cd5238e
2 changed files with 9 additions and 4 deletions

View File

@ -122,7 +122,12 @@ void Dataset::SaveStreamData(
std::stringstream ss;
ss << writer->outdir << MYNTEYE_OS_SEP << std::dec
<< std::setw(IMAGE_FILENAME_WIDTH) << std::setfill('0') << seq << ".png";
cv::imwrite(ss.str(), data.frame);
try {
cv::imwrite(ss.str(), data.frame);
}
catch(int e) {
LOG(WARNING) << "Save failed.";
}
}
++stream_counts_[stream];
}

View File

@ -122,9 +122,9 @@ int main(int argc, char *argv[]) {
// dataset.SaveStreamData(Stream::RIGHT, right);
// }
// save Stream::DEPTH
for (auto &&depth : depth_datas) {
dataset.SaveStreamData(Stream::DEPTH, depth);
}
// for (auto &&depth : depth_datas) {
// dataset.SaveStreamData(Stream::DEPTH, depth);
// }
// save Stream::DISPARITY
// for (auto &&disparity : disparity_datas) {
// dataset.SaveStreamData(Stream::DISPARITY, disparity);