diff --git a/detectors/DepthDetector.cpp b/detectors/DepthDetector.cpp index 0939342..f675eab 100644 --- a/detectors/DepthDetector.cpp +++ b/detectors/DepthDetector.cpp @@ -52,6 +52,7 @@ namespace eod{ return; } distance = mat_median(cropped, true, Mat(), max_dist_m*1000); + imwrite("/tmp/saved_depth_"+std::to_string(save_cntr++)+".png", cropped); } else if( mode == CENTER_PX ){ distance = image.at(rect.getCenter()); diff --git a/detectors/include/DepthDetector.h b/detectors/include/DepthDetector.h index 8ba0569..80a3094 100644 --- a/detectors/include/DepthDetector.h +++ b/detectors/include/DepthDetector.h @@ -23,6 +23,7 @@ namespace eod{ private: int mode; double max_dist_m; + int save_cntr = 0; }; }