So I'm trying to understand how to use OpenCV. I'm using:
- Windows10
- Microsoft Visual Studio Community 2015 (ver 14.0.23107.0 D14REL)
- OpenCV for Windows 3.0.0 precompiled
Heres my program, copied from this video tutorial from Kyle Hounslow [entitled OpenCV (All Versions) - Easy Installation Guide and Sample Project (VS 2010 C++)] (https://www.youtube.com/watch?v=cgo0UitHfp8)
Here's my program:
//#include<opencv\cv.h> // couldn't get this one VideoCapture class to function with this.
#include<opencv\highgui.h>
#include <opencv2/opencv.hpp>
using namespace cv;
int main() {
Mat image; //Create Matrix to store image
VideoCapture cap; //initialize capture
cap.open(0);
namedWindow("window", 1); //create window to show image
while (1) {
cap >> image; //copy webcam stream to image
imshow("window", image); //print image to screen
waitKey(33); //delay 33ms
}
return 0;
}
The linker tools are using the libraries @ C:\opencv_3_0_0\build\x86\vc12\staticlib (Its not clear on which of the six directories I should be using, vc12 or vc11, bin, lib or staticlib. I'm looking at a whole lot of errors.
Note: I've tried using Cmake and the latest version of github's opencv library from https://github.com/Itseez/opencv . I can build both 32 debug and 32 release libraries up fine, but when I do that a whole lot of tools (which should be in the directory C:\opencv_3_0_0\build\include\opencv2) are missing. It looks like they aren't there in the github repository at all. (What's up with that?)
Anybody know how to use current tools (win10 & visual studio) to run opencv?