xfeatures2d does not compile (3.0) [closed]

asked 2014-08-24 12:31:32 -0600

juanmanpr gravatar image

Hello,

I just realized SIFT was moved to xfeatures2d in opencv_contrib. I want to have the feature, so I am trying to compile the new module. However, It is disabled (see below). What dependency is Cmake referring to? (Im using Ubuntu 14.04. BTW, Cmake doesnt seem to find Qt, but this is a minor problem).

-- OpenCV modules:

-- To be built: core imgproc imgcodecs videoio highgui xobjdetect adas video bgsegm bioinspired flann features2d calib3d face ml objdetect photo java optflow reg rgbd shape stitching superres text tracking ts videostab viz ximgproc xphoto

-- Disabled: world

-- Disabled by dependency: xfeatures2d

-- Unavailable: androidcamera cuda cudaarithm

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-11-29 07:27:29.733994

Comments

Ok, the dependency is "opencv_cudaarithm", I removed that in order to be able to compile it.

juanmanpr gravatar imagejuanmanpr ( 2014-08-25 03:38:13 -0600 )edit

adding a short line, what you changed where would actually be super useful ;)

berak gravatar imageberak ( 2014-08-25 06:55:23 -0600 )edit

Sorry, In the list of dependencies in the CMakeLists.txt of the module xfeatures2d, I removed "opencv_cudaarithm". I have no idea wether this is better to keep or remove it, so I didn't any PR for that.

juanmanpr gravatar imagejuanmanpr ( 2014-08-27 11:59:30 -0600 )edit
1

making it optional, instead of removing it might be slightly better:

ocv_define_module(xfeatures2d opencv_core opencv_imgproc opencv_features2d opencv_calib3d    opencv_shape opencv_highgui opencv_videoio opencv_ml
              OPTIONAL opencv_cudaarithm )
berak gravatar imageberak ( 2014-08-28 05:56:52 -0600 )edit

there is a pull request but it seams that this small change breaks java bindings ... https://github.com/Itseez/opencv_contrib/pull/81/files

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-29 13:24:55 -0600 )edit

yes, i've seen that. i've seen too, that all other successful builds (other pr's) on the contrib buildbot had xfeatures2d disabled due to dependancy, so it's probably the 1st time in a while, that somebotty actually tries to build the xfeatures2d.module.


trying out latest version, it seems that some errors are even suppressed in the logs, i get jni wrappers generated like

JNIEXPORT jlong JNICALL Java_org_opencv_xfeatures2d_xfeatures2d.StarDetector_StarDetector_11 (JNIEnv*, jclass);

(note the dot in the middle, WTF... ) which cause enough errors here to break the build while compiling the java wrapper, and yea, xfeatures2d.java is empty due to that, that's enough reason to stop cmake.

(dot problem only for xfeatures2d, though, no idea, enquiring)

berak gravatar imageberak ( 2014-08-29 15:04:37 -0600 )edit

exceeded the comment limit ;)

again, imho it's not actually the fault of this commit, compiling with cudaarithm will most probably lead to the same result. something in the java-wrappers for the contrib module is broken. (the broken dot thing hints at something going wrong with the new namespaces)

and again ;) .... it kinda half worked last week. (though weirdly enough, no java wrappers were build for the whole contrib mod.)

berak gravatar imageberak ( 2014-08-29 15:16:22 -0600 )edit

@berak my latest PR made the master branch possible to built the xfeatures2d module fine with CUDA on. Might take a look into this problematic stuff later :D

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-29 15:39:32 -0600 )edit

i had to pull both repos and clean the build folder/cmake-outputs to see the difference

@steven, btw, kudos for the previous contrib related stunt !

berak gravatar imageberak ( 2014-08-29 15:41:40 -0600 )edit

@berak still a work in progress, the examples are still giving me headaches. But I am guessing they are experiencing problems from retrievng data from 2 repository locations...

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-30 08:00:41 -0600 )edit