Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Ubunutu 20.04 which uses OpenCV 4 and PCL 1.10 #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 2.8.3)
project(file_player)

add_definitions(-std=c++11)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE release)
Expand Down Expand Up @@ -117,7 +118,6 @@ add_dependencies(file_player file_player_msgs_generate_messages_cpp ${PROJECT_NA
add_dependencies(file_player ${catkin_EXPORTED_TARGETS})

target_link_libraries(file_player

${catkin_LIBRARIES}
${QT_LIBRARIES}
${OPENGL_LIBRARIES}
Expand Down
28 changes: 14 additions & 14 deletions src/ROSThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1512,8 +1512,8 @@ void ROSThread::StereoThread()
string current_stereo_right_name = data_folder_path_ + "/image/stereo_right" +"/"+ to_string(data)+".png";
cv::Mat current_left_image;
cv::Mat current_right_image;
current_left_image = imread(current_stereo_left_name, CV_LOAD_IMAGE_ANYDEPTH);
current_right_image = imread(current_stereo_right_name, CV_LOAD_IMAGE_ANYDEPTH);
current_left_image = imread(current_stereo_left_name, cv::IMREAD_ANYDEPTH);
current_right_image = imread(current_stereo_right_name, cv::IMREAD_ANYDEPTH);

if(!current_left_image.empty() && !current_right_image.empty()){

Expand Down Expand Up @@ -1553,8 +1553,8 @@ void ROSThread::StereoThread()
string next_stereo_right_name = data_folder_path_ + "/image/stereo_right" +"/"+ stereo_file_list_[current_img_index+1];
cv::Mat next_left_image;
cv::Mat next_right_image;
next_left_image = imread(next_stereo_left_name, CV_LOAD_IMAGE_ANYDEPTH);
next_right_image = imread(next_stereo_right_name, CV_LOAD_IMAGE_ANYDEPTH);
next_left_image = imread(next_stereo_left_name, cv::IMREAD_ANYDEPTH);
next_right_image = imread(next_stereo_right_name, cv::IMREAD_ANYDEPTH);
if(!next_left_image.empty() && !next_right_image.empty()){
stereo_left_next_img_ = make_pair(stereo_file_list_[current_img_index+1], next_left_image);
stereo_right_next_img_ = make_pair(stereo_file_list_[current_img_index+1], next_right_image);
Expand Down Expand Up @@ -1647,11 +1647,11 @@ void ROSThread::OmniThread()
cv::Mat omni2_image;
cv::Mat omni3_image;
cv::Mat omni4_image;
omni0_image = imread(current_omni0_name, CV_LOAD_IMAGE_COLOR);
omni1_image = imread(current_omni1_name, CV_LOAD_IMAGE_COLOR);
omni2_image = imread(current_omni2_name, CV_LOAD_IMAGE_COLOR);
omni3_image = imread(current_omni3_name, CV_LOAD_IMAGE_COLOR);
omni4_image = imread(current_omni4_name, CV_LOAD_IMAGE_COLOR);
omni0_image = imread(current_omni0_name, cv::IMREAD_COLOR);
omni1_image = imread(current_omni1_name, cv::IMREAD_COLOR);
omni2_image = imread(current_omni2_name, cv::IMREAD_COLOR);
omni3_image = imread(current_omni3_name, cv::IMREAD_COLOR);
omni4_image = imread(current_omni4_name, cv::IMREAD_COLOR);
if(!omni0_image.empty() && !omni1_image.empty() && !omni2_image.empty() && !omni3_image.empty() && !omni4_image.empty()){

cv::cvtColor(omni0_image, omni0_image, cv::COLOR_RGB2BGR);
Expand Down Expand Up @@ -1730,11 +1730,11 @@ void ROSThread::OmniThread()
cv::Mat omni2_image;
cv::Mat omni3_image;
cv::Mat omni4_image;
omni0_image = imread(next_omni0_name, CV_LOAD_IMAGE_COLOR);
omni1_image = imread(next_omni1_name, CV_LOAD_IMAGE_COLOR);
omni2_image = imread(next_omni2_name, CV_LOAD_IMAGE_COLOR);
omni3_image = imread(next_omni3_name, CV_LOAD_IMAGE_COLOR);
omni4_image = imread(next_omni4_name, CV_LOAD_IMAGE_COLOR);
omni0_image = imread(next_omni0_name, cv::IMREAD_COLOR);
omni1_image = imread(next_omni1_name, cv::IMREAD_COLOR);
omni2_image = imread(next_omni2_name, cv::IMREAD_COLOR);
omni3_image = imread(next_omni3_name, cv::IMREAD_COLOR);
omni4_image = imread(next_omni4_name, cv::IMREAD_COLOR);
if(!omni0_image.empty() && !omni1_image.empty() && !omni2_image.empty() && !omni3_image.empty() && !omni4_image.empty()){
cv::cvtColor(omni0_image, omni0_image, cv::COLOR_RGB2BGR);
cv::cvtColor(omni1_image, omni1_image, cv::COLOR_RGB2BGR);
Expand Down