Now, we need to launch the Visual Studio application open the OpenCV.sln file located in the build directory. Check out this webpage that I use while learning about this step in here. And voila, your build directory will be fulfilled with OpenCV Visual Studio Project. Hal core flann imgproc ml photo reg surface_matching video face imgcodecs shape videoio highgui objdetect optflow superres tracking ts ximgproc xobjdetect xphoto adas bgsegm bioinspired features2d latentsvm line_descriptor saliency text calib3d ccalib datasets rgbd videostab xfeatures2d stitchingĪndroidcamera cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 python3 viz cvv matlabĪfter that, we can start generating the Visual Studio Project by pushing the “Generate” button. Here is the example result of re-configuring the CMake with extra modules. If everything goes well, the tracking module should also be there. Go to the Configuration Log in the CMake GUI, and find “OpenCV modules” -> “To be built”. Now, let’s double check whether the desired extra modules are on the list. After we have finished re-configuring, we need to hit the “Configure” button once again. However, if you don’t have any idea about what they are, just leave it as it is. Please note that, you actually may uncheck several stuffs that in unimportant to speed up the building process, for example: BUILD_DOCS. We can use the compiler in our local machine which is located in /source/opencv_contrib /modules as depicted in figure below: Push the “Next” button, and specify the C and C++ compilers. Since I use Visual Studio 2013 in 64-bit machine, I will use the following configuration. The red box must be filled with the directory path of OpenCV source, and the green box must be filled with the directory path of designated build folder.Īfter that, click the “Configure” button (yellow box), this is how we configure CMake to build the OpenCV library in our PC. So, let’s launch CMake application and then specify the source and build directory as shown in figure below. The OpenCV Visual Studio Project will later be used to build the OpenCV library together with its extra modules completely. Step 2: Making Visual Studio Project with CMakeĪfter we completely download and extract the OpenCV and its extra modules sources, we will use CMake application to make an OpenCV Visual Studio Project. We can download OpenCV sources together with the extra modules from this following websites:Īfter finish downloading, unzip each of them to designated folders as depicted in figure below:Īs I mentioned before, the opencv folder will store all OpenCV sources, and the opencv_contrib folder will store all extra modules sources. The build directory will be used for saving the result of building process, and the source folder will contain all of the OpenCV and its extra modules sources. Step 1: Downloading OpenCV with extra modulesįirst, let’s make a directory called “opencv-3.0” and make two other folder “build” and “source” inside it as depicted in figure below: Making Visual Studio Project with CMake.Optional: you might also need to temporarily disable any anti-virus software since it may prevent the process of building OpenCV. Microsoft Visual Studio (in this case, I use Visual Studio 2013 in 64-bit PC).So, I need to build OpenCV from its original source and include the extra modules which contain the Track API.īefore I begin, make sure that you have already installed: However, this Track API is not available on the Pre-Built OpenCV Library. Ninja will automatically detect number of available processor cores and does not need -j option.Recently, I have been working on a Computer Vision Project which requires me to use OpenCV Track API. Make can run multiple compilation processes in parallel, -j option means "run jobs simultaneously". Changes in the configuration like disabling a dependency, modifying build scripts or switching sources to another branch are not handled very well and can result in broken workspace. If you experience problems with the build process, try to clean or recreate the build directory. Refer to the OpenCV installation overview and OpenCV configuration options reference tutorials for details and full configuration options reference. Note Configure process can download some files from the internet to satisfy library dependencies, connection failures can cause some of modules or functionalities to be turned off or behave differently.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |