You can actually use a system lib instead of the ros library for opencv to continue to use opencv2 instead of 3. If I recall correctly, just add find_package(OpenCV 2)
to your CMakeLists.txt and add the appropriate libs and headers via the usual methods (the variable names are OpenCV_LIBRARIES and OpenCV_INCLUDE_DIRS respectively).
1 Like