2012년 12월 27일 목요일

OpenCV #1-1 Example

OpenCV #1 영상처리 준비

  • Example

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>

int main()

{
// 영상 읽기
cv::Mat image = cv::imread("img2.jpg");
// "My Image" 이름을 갖는 영상 창 생성
cv::namedWindow("My Image");
// 창에 영상을 보여주기
cv::imshow("My Image", image);
// 5000 ms 동안 키 입력 기다리기
cv::waitKey(5000);

return 1;

}


  • Result


  • 참고문헌 : OpenCV 2 Computer Vision Application Programming Cookbook