How to specify my own OpenCV3 for cv_bridge
The ROS1 package cv_bridge
can be downloaded here: https://github.com/ros-perception/vis... and be found at vision_opencv/cv_bridge
.
I just checked its CMakeLists.txt
and I found OpenCV3
:
find_package(OpenCV 3 REQUIRED
COMPONENTS
opencv_core
opencv_imgproc
opencv_imgcodecs
CONFIG
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS rosconsole sensor_msgs
DEPENDS OpenCV
CFG_EXTRAS cv_bridge-extras.cmake
)
catkin_python_setup()
include_directories(include ${Boost_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
The OpenCV3 by default is very huge so I want to use a custom one, which is smaller.
I put my own OpenCV3 at /opt/opencv3/
and there are only two directories: include
and lib
in it.
Now I want to tell the package cv_bridge
to look for my own specific OpenCV3 so that I can remove the original OpenCV3 from the source of ROS.
Is it possible? How can I modify the CMakeLists.txt
of cv_bridge
?