From ada6795e6b33b2860089415d82e738544020523a Mon Sep 17 00:00:00 2001 From: Daniel Gehrig Date: Wed, 26 Aug 2020 19:30:43 +0200 Subject: [PATCH] fixed cv constants and pcl dependency on cpp14 --- event_camera_simulator/esim_visualization/CMakeLists.txt | 2 ++ .../src/adaptive_sampling_benchmark_publisher.cpp | 2 +- .../esim_visualization/src/synthetic_optic_flow_publisher.cpp | 2 +- event_camera_simulator/imp/imp_multi_objects_2d/src/object.cpp | 2 +- .../imp/imp_panorama_renderer/src/panorama_renderer.cpp | 2 +- .../imp/imp_planar_renderer/src/planar_renderer.cpp | 2 +- .../imp/imp_unrealcv_renderer/src/unrealcv_renderer.cpp | 2 +- 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/event_camera_simulator/esim_visualization/CMakeLists.txt b/event_camera_simulator/esim_visualization/CMakeLists.txt index 0bf2829..662cf32 100644 --- a/event_camera_simulator/esim_visualization/CMakeLists.txt +++ b/event_camera_simulator/esim_visualization/CMakeLists.txt @@ -3,6 +3,8 @@ project(esim_visualization) find_package(catkin_simple REQUIRED) catkin_simple() +set(CMAKE_CXX_STANDARD 14) + # This macro ensures modules and global scripts declared therein get installed # See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html diff --git a/event_camera_simulator/esim_visualization/src/adaptive_sampling_benchmark_publisher.cpp b/event_camera_simulator/esim_visualization/src/adaptive_sampling_benchmark_publisher.cpp index e41e6c5..4bda6e1 100644 --- a/event_camera_simulator/esim_visualization/src/adaptive_sampling_benchmark_publisher.cpp +++ b/event_camera_simulator/esim_visualization/src/adaptive_sampling_benchmark_publisher.cpp @@ -82,7 +82,7 @@ void AdaptiveSamplingBenchmarkPublisher::imageCallback(const ImagePtrVector& ima if(image_index_ == 0) { - static const std::vector compression_params = {CV_IMWRITE_PNG_COMPRESSION, 0}; + static const std::vector compression_params = {cv::IMWRITE_PNG_COMPRESSION, 0}; std::stringstream ss; ss << ze::joinPath(FLAGS_adaptive_sampling_benchmark_folder, "image_"); diff --git a/event_camera_simulator/esim_visualization/src/synthetic_optic_flow_publisher.cpp b/event_camera_simulator/esim_visualization/src/synthetic_optic_flow_publisher.cpp index 1cf5178..013b3e6 100644 --- a/event_camera_simulator/esim_visualization/src/synthetic_optic_flow_publisher.cpp +++ b/event_camera_simulator/esim_visualization/src/synthetic_optic_flow_publisher.cpp @@ -80,7 +80,7 @@ SyntheticOpticFlowPublisher::~SyntheticOpticFlowPublisher() std::string path_timestamps_neg = ze::joinPath(output_folder_, "event_time_stamps_neg.png"); std::vector compression_params; - compression_params.push_back(CV_IMWRITE_PNG_COMPRESSION); + compression_params.push_back(cv::IMWRITE_PNG_COMPRESSION); compression_params.push_back(0); cv::imwrite(path_event_count_image, event_count_image, compression_params); diff --git a/event_camera_simulator/imp/imp_multi_objects_2d/src/object.cpp b/event_camera_simulator/imp/imp_multi_objects_2d/src/object.cpp index bde5510..fc5d507 100644 --- a/event_camera_simulator/imp/imp_multi_objects_2d/src/object.cpp +++ b/event_camera_simulator/imp/imp_multi_objects_2d/src/object.cpp @@ -90,7 +90,7 @@ void Object::draw(Time t, bool is_first_layer) canvas_, M_10, canvas_.size(), - CV_INTER_LINEAR, + cv::INTER_LINEAR, border_mode); cv::Matx SS = dM10_dt * M_10.inv(); diff --git a/event_camera_simulator/imp/imp_panorama_renderer/src/panorama_renderer.cpp b/event_camera_simulator/imp/imp_panorama_renderer/src/panorama_renderer.cpp index 8119418..b549823 100644 --- a/event_camera_simulator/imp/imp_panorama_renderer/src/panorama_renderer.cpp +++ b/event_camera_simulator/imp/imp_panorama_renderer/src/panorama_renderer.cpp @@ -101,7 +101,7 @@ void PanoramaRenderer::render(const Transformation& T_W_C, const ImagePtr& out_i } } - cv::remap(texture_, *out_image, map_x_, map_y_, CV_INTER_LINEAR, cv::BORDER_REFLECT_101); + cv::remap(texture_, *out_image, map_x_, map_y_, cv::INTER_LINEAR, cv::BORDER_REFLECT_101); if(out_depthmap) { diff --git a/event_camera_simulator/imp/imp_planar_renderer/src/planar_renderer.cpp b/event_camera_simulator/imp/imp_planar_renderer/src/planar_renderer.cpp index 6989c58..42cffa8 100644 --- a/event_camera_simulator/imp/imp_planar_renderer/src/planar_renderer.cpp +++ b/event_camera_simulator/imp/imp_planar_renderer/src/planar_renderer.cpp @@ -111,7 +111,7 @@ void PlanarRenderer::render(const Transformation& T_W_C, const ImagePtr& out_ima int border = (extend_border_) ? cv::BORDER_REFLECT : cv::BORDER_CONSTANT; { auto t = timers_planar_renderer[TimerPlanarRenderer::remap].timeScope(); - cv::remap(texture_, *out_image, map_x_, map_y_, CV_INTER_LINEAR, border, 0.8); + cv::remap(texture_, *out_image, map_x_, map_y_, cv::INTER_LINEAR, border, 0.8); } // Compute depth map in dst diff --git a/event_camera_simulator/imp/imp_unrealcv_renderer/src/unrealcv_renderer.cpp b/event_camera_simulator/imp/imp_unrealcv_renderer/src/unrealcv_renderer.cpp index 3519018..e5f2eac 100644 --- a/event_camera_simulator/imp/imp_unrealcv_renderer/src/unrealcv_renderer.cpp +++ b/event_camera_simulator/imp/imp_unrealcv_renderer/src/unrealcv_renderer.cpp @@ -115,7 +115,7 @@ void UnrealCvRenderer::render(const Transformation& T_W_C, const ImagePtr& out_i ss_nr << std::setw(10) << std::setfill('0') << frame_idx_; std::string path_frame = ze::joinPath(FLAGS_unrealcv_output_directory, "frame_" + ss_nr.str() + ".png"); VLOG(1) << "Saving raw RGB image to: " << path_frame; - cv::imwrite(path_frame, img, {CV_IMWRITE_PNG_COMPRESSION, 9}); + cv::imwrite(path_frame, img, {cv::IMWRITE_PNG_COMPRESSION, 9}); } cv::Mat img_gray;