Qengineering / Install-OpenCV-Jetson-Nano

OpenCV installation script with CUDA and cuDNN support
https://qengineering.eu/install-opencv-on-jetson-nano.html
BSD 3-Clause "New" or "Revised" License
137 stars 47 forks source link

Can't find header files after install #5

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hi, After installing OpenCV 4.5.4 using your script with success. I can't compile my code, i'm using CMake and it's compiling on my desktop but not on the Jetson Nano.

$ jetson_release -v
 - NVIDIA Jetson Nano (Developer Kit Version)
   * Jetpack 4.6 [L4T 32.6.1]
   * NV Power Mode: MAXN - Type: 0
   * jetson_stats.service: active
 - Board info:
   * Type: Nano (Developer Kit Version)
   * SOC Family: tegra210 - ID:33
   * Module: P3448-0000 - Board: P3449-0000
   * Code Name: porg
   * Boardids: 3448
   * CUDA GPU architecture (ARCH_BIN): 5.3
   * Serial Number: 1422919050898
 - Libraries:
   * CUDA: 10.2.300
   * cuDNN: 8.2.1.32
   * TensorRT: 8.0.1.6
   * Visionworks: 1.6.0.501
   * OpenCV: 4.5.4 compiled CUDA: YES
   * VPI: ii libnvvpi1 1.1.12 arm64 NVIDIA Vision Programming Interface library
   * Vulkan: 1.2.70
 - jetson-stats:
   * Version 3.1.1
   * Works on Python 2.7.17

See the error message:

fatal error: opencv2/core/core.hpp: No such file or directory
 #include <opencv2/core/core.hpp>
                ^~~~~~~~~~~~~~~~~~~~~~~

When I run find / -name opencv.pc the package config file isn't found.

It looks like the header files weren't installed.

Qengineering commented 2 years ago

Please check the following locations on your Nano:

You will not find a package opencv.pc, it's opencv4.pc

ghost commented 2 years ago

Thanks for the quick reply. I'll check this out.

ghost commented 2 years ago

For some reason, the /usr/include/opencv4 was empty. I recompiled and the header files are now present.