Tag Archives: Opencv3.4.0 Install error

[Solved] Opencv3.4.0 Install error: fatal error: opencv2/xfeatures2d/cuda.hpp: No such file or directory

Installation   Error reported by opencv-3.4.0:

fatal error: opencv2/xfeatures2d/cuda.hpp: No such file or directory

Solution:

1. Find the file and path:

$:  find . -name “cuda.hpp”

File found:    ./ opencv-3.4.0/modules/xfeatures2d/include/opencv2/xfeatures2d/cuda.hpp

2. Find the full path of the above file and replace the location code referencing cuda.hpp in the error file

Note: the test is successful

1. Two files refer to the cuda.hpp file, so it needs to be modified twice. You can back up the wrong file before changing it

2. Install opencv and the corresponding OpenCV_When creating a contrib file, you can directly open cv_All files in contrib are copied to the opencv folder, and there will be no overwrite problem