Visual tutorial on OpenCV configuration method in VS2015, vs2015opencv
The examples in this article share with you the specific code of the Android jiugongge image for your reference. The specific content is as follows:
Replace the path name with the actual path name.
OpenCV Official Website: http://opencv.org/
GitHub: https://github.com/Itseez/opencv
Configuration process
Create a C ++ project.
Open project properties.
Change the platform.
Add the include directory in the VC ++ directory-include directory.
(Select inherit from parent or project settings by default)
D: \ OpenCV \ build \ include
D: \ OpenCV \ build \ include \ opencv
D: \ OpenCV \ build \ include \ opencv2
Add the library directory in the VC ++ directory-library directory.
(Select inherit from parent or project settings by default)
D: \ OpenCV \ build \ x64 \ vc14 \ lib
Add additional dependencies to the linker-input-additional dependencies.
(The newly added dependency is the. lib file in the library directory added in the previous step)
(Select inherit from parent or project settings by default)
opencv_world310.libopencv_world310d.lib
Add entries to the environment variable path.
(Here is the directory of the dynamic link library. dll file)
D: \ OpenCV \ build \ x64 \ vc14 \ bin
Add the test code and file.
(Program source online)
// # Include "stdafx. h "# include <opencv2/opencv. hpp> using namespace std; using namespace cv; int main (int argc, char * argv []) {const char * imagename = "lena.jpg "; // read the image Mat img = imread (imagename) from the file; // if the image fails to be read if (img. empty () {fprintf (stderr, "Can not load image % s \ n", imagename); return-1 ;}// display image imshow ("image ", img); // This function waits for the key. Press any key on the keyboard to return waitKey (); return 0 ;}
Project running result.
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.