Ask Your Question
0

Building with SURF_CUDA

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

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 -0600 )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 -0600 )edit

Did you delete CMakeCache.txt?

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

Yes, same result.

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

What is your platform? and compiler

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

Windows x86-64.

Helios gravatar imageHelios ( 2017-01-20 11:08:49 -0600 )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 -0600 )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 -0600 )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 -0600 )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 -0600 )edit

1 answer

Sort by » oldest newest most voted
0

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

Helios gravatar image

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

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 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 1,193 times

Last updated: Jan 20 '17