Skip to content

Error with OpenCV while building #24

@eladden

Description

@eladden

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions