-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopencvtest.cpp
39 lines (34 loc) · 885 Bytes
/
opencvtest.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* =====================================================================================
*
* Filename: opencvtest.cpp
*
* Description: testing opencv
*
* Version: 1.0
* Created: 03/09/2018 01:34:45 PM
* Revision: none
* Compiler: gcc
*
* Author: Brad Theilman (BHT), [email protected]
* Organization:
*
* =====================================================================================
*/
#include <stdio.h>
#include <opencv2/opencv.hpp>
int main(int argc, char** argv)
{
if (argc != 2){
printf("usage: cuWH <image path>\n");
}
cv::Mat image;
image = cv::imread(argv[1], 1);
if (!image.data){
printf("No Image Data \n");
}
cv::namedWindow("Display Image", cv::WINDOW_AUTOSIZE);
cv::imshow("Display Image", image);
cv::waitKey(0);
return 0;
}