OpenCV4Tegra with CMakeLists.txt of cv_bridge question

I am using the OpenCV4Tegra with Jetson TX2.

the system:

NVIDIA Jetson TX2

L4T 28.2.1 [ JetPack 3.3 or 3.2.1 ]

Board: t186ref

Ubuntu 16.04.6 LTS

Kernel Version: 4.4.38-tegra

CUDA 9.0.252

the error:

`-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- python
CMake Error at vision_opencv/cv_bridge/CMakeLists.txt:16 (find_package):
Could not find a package configuration file provided by "OpenCV" (requested
version 3) with any of the following names:

OpenCVConfig.cmake
opencv-config.cmake
Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
"OpenCV_DIR" to a directory containing one of the above files. If "OpenCV"
provides a separate development package or SDK, be sure it has been
installed.

-- Configuring incomplete, errors occurred!
See also "/home/nvidia/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/nvidia/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:318: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

I used this method https://github.com/ros-perception/vision_opencv on my PC with GPU 1050 is very very nice.

I get some solutions https://devtalk.nvidia.com/default/topic/1008011/jetson-tx1/opencv-3-2-0-cmakelists-txt-question/ but it seems that he built OpenCV not OpenCV4Tegra

CmakeLists.txt

cmake_minimum_required(VERSION 2.8)
project(cv_bridge)

find_package(catkin REQUIRED COMPONENTS rosconsole sensor_msgs)

if(NOT ANDROID)
  find_package(PythonLibs)
  if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3)
    find_package(Boost REQUIRED python)
  else()
    find_package(Boost REQUIRED python3)
  endif()
else()
find_package(Boost REQUIRED)
endif()
find_package(OpenCV 3 REQUIRED
  COMPONENTS
    opencv_core
    opencv_imgproc
    opencv_imgcodecs
  PATHS /usr/local
  NO_DEFAULT_PATH
  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})

if(NOT ANDROID)
add_subdirectory(python)
endif()
add_subdirectory(src)
if(CATKIN_ENABLE_TESTING)
  add_subdirectory(test)
endif()

# install the include folder
install(
  DIRECTORY include/${PROJECT_NAME}/
  DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)

Please. help me or any suggestion??

1 Like