![]() If you are going to use just one Python either 2 or 3, you should skip this section.ĬMake was unable to find paths for my Python3 files. This section is only for people who want to generate OpenCV binary for both Python2 and Python 3. Step 5.2 : Add Python paths for both Python2 and Python3 (optional) ![]() Now click on configure again to include this change. On Windows 10, opencv_saliency module fails to build. Now click configure to apply these changes. In our case we have kept opencv_contrib-3.3.1 in Documents folder so path is “C:/Users/Vaibhaw Chandel/Documents/opencv_contrib-3.3.1/modules” In flag “OPENCV_EXTRA_MODULES_PATH”, give path of modules directory within opencv_contrib-3.3.1. Click on the images to see a larger version.Ĭheck “INSTALL_C_EXAMPLES” and “INSTALL_PYTHON_EXAMPLES” We will make few changes in the default configuration generated by CMake. ![]() Step 5.1: Additional changes to CMake config Now CMake will look in the system directories and generate the makefiles. When prompted to select a compiler, select Visual StuWin64.Ĭlick finish and in the next window keep the default parameters checked.Ĭlick finish. You will be asked for permission to create the build folder. We will choose build directory as OPENCV_PATH/build Run Cmake, in box “Where is the source code” write value of OPENCV_PATH (which is path to opencv-3.3.1 folder) and path to build directory. Step 5: Generate Visual Studio project using CMake For example, in my case OPENCV_PATH is C:/Users/Vaibhaw Chandel/Documents/opencv-3.3.1ĭepending upon where you have kept opencv-3.3.1 folder, this path would be different. NOTE : From hereon we will refer the path to opencv-3.3.1 folder as OPENCV_PATH. I have placed these two folders in “My Documents” directory. Although you can keep opencv and opencv_contrib folders anywhere, I suggest that you should keep both in the same directory. Go to and download opencv_contrib-3.3.1 source code zipĮxtract both zip files. Go to and download opencv-3.3.1 source code zip # step 4: Download and extract opencv-3.3.1 and opencv_contrib-3.3.1 ĭuring installation select “Add CMake to system PATH” #define CHECK_MAT(cond) if(!(cond))ĭownload and install CMake v3.10.0 from. ~/openCVMaster/opencv_contrib-master/modules/xfeatures2d/test/features2d/misc/java/src/cpp/features2d_converters.cpp:7:38: error: ‘LOGD’ was not declared in this scope I ran make again, and got the following errors: ~/openCVMaster/opencv_contrib-master/modules/xfeatures2d/test/features2d/misc/java/src/cpp/features2d_converters.cpp: In function ‘void Mat_to_vector_KeyPoint(cv::Mat&, std::vector&)’: I added the following: cd ~/openCVMaster/opencv_contrib-master/modules/xfeatures2d/test/features2d/misc/java/src/cpp Still got an error - ~/openCVMaster/opencv_contrib-master/modules/xfeatures2d/test/features2d/misc/java/src/cpp/features2d_converters.cpp:2:10: fatal error: common.h: No such file or directory Once downloaded, I located its subfolder 'features2d' and put it in opencv_contrib-master/modules/xfeatures2d/test/. A new error appeared: opencv_contrib-master/modules/xfeatures2d/test/test_features2d.cpp:51:10: fatal error: features2d/test/test_detectors_: No such file or directoryįollowing the advice of ah-ma here) I downloaded. This was a step forward: no more errors relating to vgg or boostdesc. I followed the suggestion found here, and added the following files: cd ~/openCVMaster/opencv_contrib-4.3.0/modules/xfeatures2d/src ~/opencvMaster/opencv_contrib-e6f32c6a69043456a806a4e802ee3ce7b7059c93/modules/xfeatures2d/src/boostdesc.cpp:654:20: fatal error: boostdesc_bgm.i: No such file or directory Got the following error: Building CXX object modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/ ![]() Then, while I was in this empty folder in the terminal, I ran the following line: cmake -DOPENCV_ENABLE_NONFREE:BOOL=ON -DOPENCV_EXTRA_MODULES_PATH= ~/openCVMaster/opencv_contrib-master/modules ~/openCVMaster/opencv-4.3.0 I made an empty folder, opened the terminal, and navigated to it using the following line: cd ~/opencvMaster/build I also downloaded and unzipped opencv-4.3.0 and opencv_contrib. I'm trying to compile OpenCV so that it has the the sift module.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |