Create Visual Studio 2015 console program
Add VideoCapture calls
#include "stdafx.h"#include <opencv2/opencv.hpp>
int main()
{
cv::Mat frame;
cv::VideoCapture cap(0);
if (!cap.isOpened()) {
return -1;
}
while (true) {
if (!cap.read(frame))
break;
cv::Mat src = cv::Mat(frame);
cv::imshow("window", src);
cv::waitKey(30);
}
}
Add OpenCV include path
D:\OpenCV-3.2.0\opencv\build\includeAdd OpenCV library path
D:\OpenCV-3.2.0\opencv\build\x86-static\lib\ReleaseD:\OpenCV-3.2.0\opencv\build\x86-static\3rdparty\ippicv\ippicv_win\lib\ia32
D:\OpenCV-3.2.0\opencv\build\x86-static\3rdparty\lib\Release
Add OpenCV library
kernel32.libuser32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
opencv_highgui320.lib
opencv_core320.lib
ippicvmt.lib
zlib.lib
opencv_imgproc320.lib
opencv_imgcodecs320.lib
IlmImf.lib
libjpeg.lib
libjasper.lib
libpng.lib
libtiff.lib
libwebp.lib
opencv_video320.lib
opencv_videoio320.lib
vfw32.lib
沒有留言:
張貼留言
請提供您寶貴的意見