mirror of
https://github.com/2martens/uni.git
synced 2026-05-06 11:26:25 +02:00
[CCV] Created subdirectories
Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
31
ccv/sheet1/opencv/opencv.cpp
Normal file
31
ccv/sheet1/opencv/opencv.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
//
|
||||
// Created by jim on 4/4/17.
|
||||
//
|
||||
#include <stdio.h>
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
using namespace cv;
|
||||
|
||||
int main(int argc, char** argv )
|
||||
{
|
||||
if ( argc != 2 )
|
||||
{
|
||||
printf("usage: DisplayImage.out <Image_Path>\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
Mat image;
|
||||
image = imread( argv[1], 1 );
|
||||
|
||||
if ( !image.data )
|
||||
{
|
||||
printf("No image data \n");
|
||||
return -1;
|
||||
}
|
||||
namedWindow("Display Image", WINDOW_AUTOSIZE );
|
||||
imshow("Display Image", image);
|
||||
|
||||
waitKey(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user