Ask Your Question
0

Building with SURF_CUDA

asked 2017-01-20 01:39:43 -0500

Helios gravatar image

Hey. I'm trying to build OpenCV with support for SURF_CUDA. I figured I only needed to enable OPENCV_ENABLE_NONFREE. However when I went to test one of the samples, I saw that it didn't work because HAVE_OPENCV_XFEATURES2D was not defined. I tried again by defining HAVE_opencv_xfeatures2d and went to check cvconfig.h, but the macro was still not defined.

What do I need to do to have this class built into the library?

Thanks.

edit retag flag offensive close merge delete

Comments

for xfeatures2d you need opencv_contrib

LBerger gravatar imageLBerger ( 2017-01-20 02:11:29 -0500 )edit

I'm getting an error when I try to generate:

CMake Error at cmake/OpenCVUtils.cmake:911 (add_library): Cannot find source file:

F:/Programs/opencv.src/opencv/build/modules/xfeatures2d/opencv_xfeatures2d_pch.cpp
Helios gravatar imageHelios ( 2017-01-20 09:05:29 -0500 )edit

Did you delete CMakeCache.txt?

LBerger gravatar imageLBerger ( 2017-01-20 09:32:31 -0500 )edit

Yes, same result.

Helios gravatar imageHelios ( 2017-01-20 10:23:20 -0500 )edit

What is your platform? and compiler

LBerger gravatar imageLBerger ( 2017-01-20 11:07:54 -0500 )edit

Windows x86-64.

Helios gravatar imageHelios ( 2017-01-20 11:08:49 -0500 )edit

I am able to compile opencv with cuda and non free and xfeatures using VS 2013

LBerger gravatar imageLBerger ( 2017-01-20 13:10:57 -0500 )edit

I was able to get it generate, but I had to add an empty file at that location. I'll have to see if it builds.

Helios gravatar imageHelios ( 2017-01-20 13:12:31 -0500 )edit

Do you want to build opencv_world? if yes that's not a good idea

LBerger gravatar imageLBerger ( 2017-01-20 13:15:48 -0500 )edit

Welp, that didn't work. It seems like the the build order is wrong. Clearly, libraries in opencv_world depend on opencv_xfeatures2d, but opencv_xfeatures2d is set to build after opencv_world. I'll give it another try by disabling opencv_world and precompiled headers.

Helios gravatar imageHelios ( 2017-01-21 05:00:01 -0500 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2017-01-21 13:11:29 -0500

Helios gravatar image

updated 2017-01-21 13:26:58 -0500

Well, it appears to have built correctly. The only projects that failed were a few performance tests. So I guess we didn't learn anything today. ¯\(°_o)/¯

edit flag offensive delete link more

Comments

you can close question now.

LBerger gravatar imageLBerger ( 2017-01-21 14:00:27 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-01-20 01:39:43 -0500

Seen: 363 times

Last updated: Jan 20 '17