I merge opencv and opencv-contrib from github repo
My Operator system is Windows 8.1
Proceed as follows:
1.Download Github Repo. opencv (Itseez/opencv) opencv_contrib (Itseez/opencv_contrib)
D:opencv_mergeopencv-master D:opencv_mergeopencv_contrib-master
-
Download and Install CMake Lastest Version (current is 3.5.2)
-
CMake Generate (1) Open CMake GUI setting path source code: D:opencv_mergeopencv-master build the binaries: D:opencv_mergeopencv-masterbuild (2) press 'Configure' wait for 'Configuring done'
watch output
OpenCV modules: To be built: core fla hdf imgproc ml photo reg surface_matching video d fuzzy imgcodecs shape videoio highgui objdetect plot superres ts xobjdetect xphoto bgsegm bioinspired dpm face features2d line_descriptor saliency text calib3d ccalib datasets rgbd stereo structured_light tracking videostab xfeatures2d ximgproc aruco java optflow stitching matlab python2 Disabled: world contrib_world Disabled by dependency: - Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python3 viz cvv sfm
Java: ant: C:/apache-ant-1.9.7/bin/ant.bat (ver 1.9.7) JNI: C:/Program Files/Java/jdk1.8.0_91/include C:/Program Files/Java/jdk1.8.0_91/include/win32 C:/Program Files/Java/jdk1.8.0_91/include Java wrappers: YES Java tests: YES
(3) setting OPENCV_EXTRA_MODULES_PATH: D:/opencv_merge/opencv_contrib-master/modules
press 'Configure' watch output double check again
(4) Generate
- open OpenCV.sln
In 'Solution Explorer' CMakeTargets-->Install -->Right Click -->Build
-
get opencv-310.jar and opencv_java310.dll (D:opencv_mergeopencv-masterbuildinstalljava)
-
Netbeans setting (1) add Opencv Library (add opencv-310.jar to Library) (2) VM options: -Djava.library.path=D:opencv_mergeopencv-masterbuildinstalljava
-
Run Project
-
write some code: public static void main(String[] args) { System.loadLibrary(Core.NATIVE_LIBRARY_NAME); ..... FeatureDetector orbDetector = FeatureDetector.create(FeatureDetector.ORB); ..... FeatureDetector siftDetector = FeatureDetector.create(FeatureDetector.SIFT); ..... FeatureDetector surfDetector = FeatureDetector.create(FeatureDetector.SURF); }
-
run project and test
ORB detector can be executed (of course)
but SIFT and SURF detector caot enter output error
I do a little modification after I saw this solustion: ( SURF and SIFT algorithms doesn't work in OpenCV 3.0 Java )
I edit 'D:opencv_mergeopencv-mastermodulesfeatures2dmiscjavasrccppfeatures2d_manual.hpp' according to the above URL and then begins the second step.
However, in the fifth step 'opencv_java310.dll' not be found in java folder(D:opencv_mergeopencv-masterbuildinstalljava) I try same steps repeated at least 5 times but still no 'opencv_java310.dll'
The reason seems to be that I manually changed the 'features2d_manual.hpp'
I've been out all day :( Who can help me solve this problem
Thank you guys
