mirror of https://github.com/2martens/uni.git
[CCV] Created subdirectories
Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
parent
e26a936bc1
commit
ca157ad091
|
@ -1,7 +1,5 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
add_library(Rectangle Rectangle.cpp)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
project(sheet1)
|
||||
add_executable(main main.cpp)
|
||||
target_link_libraries(main Rectangle)
|
||||
add_executable(hello hello.cpp)
|
||||
add_executable(AskInteger AskInteger.cpp)
|
||||
|
||||
add_subdirectory(basics)
|
||||
add_subdirectory(opencv)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
add_library(Rectangle Rectangle.cpp)
|
||||
add_executable(main main.cpp)
|
||||
target_link_libraries(main Rectangle)
|
||||
add_executable(hello hello.cpp)
|
||||
add_executable(AskInteger AskInteger.cpp)
|
|
@ -0,0 +1 @@
|
|||
add_executable(opencv opencv.cpp)
|
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue