win7 64bit
VS2008
opencv 2.3.1 / opencv 2.4.7.2 / opencv 2.4.9
프로젝트 설정
include path 설정
library path 설정
library 목록 설정
왼쪽은 릴리즈용 오른쪽은 디버깅용(*d.lib)이다.
2.3.1
opencv_calib3d231.lib
opencv_contrib231.lib
opencv_core231.lib
opencv_features2d231.lib
opencv_flann231.lib
opencv_gpu231.lib
opencv_highgui231.lib
opencv_imgproc231.lib
opencv_legacy231.lib
opencv_ml231.lib
opencv_objdetect231.lib
opencv_ts231.lib
opencv_video231.lib |
opencv_calib3d231d.lib
opencv_contrib231d.lib
opencv_core231d.lib
opencv_features2d231d.lib
opencv_flann231d.lib
opencv_gpu231d.lib
opencv_highgui231d.lib
opencv_imgproc231d.lib
opencv_legacy231d.lib
opencv_ml231d.lib
opencv_objdetect231d.lib
opencv_ts231d.lib
opencv_video231d.lib |
2.4.7
opencv_calib3d247.lib opencv_contrib247.lib opencv_core247.lib opencv_features2d247.lib opencv_flann247.lib opencv_gpu247.lib opencv_highgui247.lib opencv_imgproc247.lib opencv_legacy247.lib opencv_ml247.lib opencv_nonfree247.lib opencv_objdetect247.lib opencv_ocl247.lib opencv_photo247.lib opencv_stitching247.lib opencv_superres247.lib opencv_ts247.lib opencv_video247.lib opencv_videostab247.lib |
opencv_calib3d247d.lib opencv_contrib247d.lib opencv_core247d.lib opencv_features2d247d.lib opencv_flann247d.lib opencv_gpu247d.lib opencv_highgui247d.lib opencv_imgproc247d.lib opencv_legacy247d.lib opencv_ml247d.lib opencv_nonfree247d.lib opencv_objdetect247d.lib opencv_ocl247d.lib opencv_photo247d.lib opencv_stitching247d.lib opencv_superres247d.lib opencv_ts247d.lib opencv_video247d.lib opencv_videostab247d.lib |
opencv_calib3d249.lib
opencv_contrib249.lib
opencv_core249.lib
opencv_features2d249.lib
opencv_flann249.lib
opencv_gpu249.lib
opencv_highgui249.lib
opencv_imgproc249.lib
opencv_legacy249.lib
opencv_ml249.lib
opencv_nonfree249.lib
opencv_objdetect249.lib
opencv_ocl249.lib
opencv_photo249.lib
opencv_stitching249.lib
opencv_superres249.lib
opencv_ts249.lib
opencv_video249.lib
opencv_videostab249.lib |
opencv_calib3d249d.lib
opencv_contrib249d.lib
opencv_core249d.lib
opencv_features2d249d.lib
opencv_flann249d.lib
opencv_gpu249d.lib
opencv_highgui249d.lib
opencv_imgproc249d.lib
opencv_legacy249d.lib
opencv_ml249d.lib
opencv_nonfree249d.lib
opencv_objdetect249d.lib
opencv_ocl249d.lib
opencv_photo249d.lib
opencv_stitching249d.lib
opencv_superres249d.lib
opencv_ts249d.lib
opencv_video249d.lib
opencv_videostab249d.lib |
소스코드
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
#if 1
{
// opencv 1 style
CvCapture* capture = 0;
Mat frame, frameCopy, image;
capture = cvCaptureFromCAM( 0 ); //0=default, -1=any camera, 1..99=your camera
if(!capture) cout << "No camera detected" << endl;
cvNamedWindow( "result", 1 );
if( capture )
{
cout << "In capture ..." << endl;
for(;;)
{
IplImage* iplImg = cvQueryFrame( capture );
frame = iplImg;
if( frame.empty() )
break;
if( iplImg->origin == IPL_ORIGIN_TL )
frame.copyTo( frameCopy );
else
flip( frame, frameCopy, 0 );
cvShowImage( "result", iplImg );
if( waitKey( 10 ) >= 0 )
cvReleaseCapture( &capture );
}
waitKey(0);
cvDestroyWindow("result");
return 0;
}
return 0;
}
#else
{
// opencv 2 style
VideoCapture cap(0);
if(!cap.isOpened())
{
cout << "No camera detected" << endl;
return -1;
}
else
{
cout << "In capture ..." << endl;
}
namedWindow( "Display window", WINDOW_AUTOSIZE );
for(;;)
{
Mat frame;
if(!cap.read(frame)) break;
imshow("Display window", frame);
if(waitKey(30) >= 0) break;
}
return 0;
}
#endif |
결론 : 설치했던 노트북에 무언가가 엉겨서 문제가 있었던 듯.. 다시 노트북을 밀어봐야 하나... ㅠㅠ
[링크: http://docs.opencv.org/.../windows_visual_studio_Opencv.html#windows-visual-studio-how-to]
[링크: http://thinkpiece.tistory.com/65]
[링크: http://hxr99.blogspot.kr/2011/12/opencv-examples-camera-capture.html] source
[링크: http://www.anlak.com/using-opencv-2-4-x-with-visual-studio-2010-tutorial/]
[링크: http://ko.dll-files.com/msvcp100d.dll.html]
[링크: http://stackoverflow.com/questions/16574959/installation-of-opencv-2-4-5-on-visual-studio-2008]
[링크: http://stackoverflow.com/questions/.../fatal-error-in-starting-up-opencv-2-4-6-on-vs-2008-file-not-found]
[링크 : http://www.codeproject.com/Answers/468324/Problem-with-using-OpenCV-in-VS-2012#answer1]
'Programming > openCV' 카테고리의 다른 글
opencv2 rgb2hsv color space 변환하기 (0) | 2014.07.02 |
---|---|
openCV2 2.3.1 ubuntu 컴파일하기 (0) | 2014.07.01 |
openCV visual studio 프로젝트 생성하기 (0) | 2014.06.30 |
OpenNI - Open Natural Interaction (0) | 2014.06.30 |
opencv2 웹캠 관련 문서 (0) | 2014.06.28 |