Add OpenCV test2
This commit is contained in:
parent
270d43226b
commit
97282680c9
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
cmake_minimum_required(VERSION 3.0.0)
|
||||
project(OpenCV_test2 VERSION 1.0.0)
|
||||
|
||||
#Find the opencv package
|
||||
find_package(OpenCV REQUIRED)
|
||||
|
||||
#include directories for opencv
|
||||
include_directories(${OpenCV_INCLUDE_DIRS})
|
||||
|
||||
add_executable(${PROJECT_NAME} main.cpp)
|
||||
|
||||
#Add command to generate .gitignore
|
||||
add_custom_command(TARGET ${PROJECT_NAME}
|
||||
COMMAND echo \"*\" > ${CMAKE_BINARY_DIR}/.gitignore
|
||||
COMMAND echo \"**/*\" > ${CMAKE_BINARY_DIR}/.hgignore)
|
||||
|
||||
#Add OpenCV Libraries
|
||||
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})
|
|
@ -0,0 +1,10 @@
|
|||
#include <opencv2/opencv.hpp>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
using namespace cv;
|
||||
|
||||
int main(int argc, char ** argv){
|
||||
std::fstream infile;
|
||||
Mat image;
|
||||
|
||||
}
|
Loading…
Reference in New Issue