05-13 20:27
Notice
Recent Posts
Recent Comments
관리 메뉴

Scientific Computing & Data Science

[OpenCV] Image를 불러서 Window에 띄우기 본문

Programming/OpenCV

[OpenCV] Image를 불러서 Window에 띄우기

cinema4dr12 2015. 1. 21. 10:33

개발 환경

  • Microsoft Windows 7

  • Visual Studio V11 (2012)

  • OpenCV 3.0.0

Example Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>
#include <iostream>
#include <opencv2/opencv.hpp>
 
int _tmain(int argc, _TCHAR* argv[])
{
    // Read an image
    cv::Mat image = cv::imread("[YOUR_IMAGE_PATH]");
 
    // Set name of the window
    cv::namedWindow("My Image");
 
    // Show the window
    cv::imshow("My Image", image);
 
    cv::waitKey(5000);
 
    return 0;
}
cs


Comments