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

Error with OpenCV while building #24

Open
eladden opened this issue May 12, 2020 · 1 comment
Open

Error with OpenCV while building #24

eladden opened this issue May 12, 2020 · 1 comment

Comments

@eladden
Copy link

eladden commented May 12, 2020

Got the following error while building

Errors << occupancy_grid_utils:make ~/catkin_ws/logs/occupancy_grid_utils/build.make.000.log
~/catkin_ws/src/occupancy_grid_utils/src/file.cpp: In function ‘void occupancy_grid_utils::loadMapFromFile(nav_msgs::GetMap::Response*, const char*, double, bool, double, double, double*)’:
~/catkin_ws/src/occupancy_grid_utils/src/file.cpp:91:27: error: ‘CV_BGR2GRAY’ was not declared in this scope
cvtColor(imgColor, img, CV_BGR2GRAY);
^~~~~~~~~~~

This is because OpenCV 3 and higher depreciated that constant.

The fix would be to change to cv::COLOR_BGR2GRAY

@martinmagnusson
Copy link

martinmagnusson commented May 11, 2022

This works now in the noetic-devel branch. See #25.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants