Browse Source

Added missing modules

pull/1/head
Tim Zeuner 2 years ago
parent
commit
54d217faf2

+ 17
- 0
CMakeLists.txt View File

@@ -8,19 +8,36 @@ find_package( OpenCV REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS} )
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/Input )
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/Processing)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/ControlModule)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/Interpreter)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/IntersectionHandler)

link_directories( ${Input_SOURCE_DIRS} )
link_directories( ${Processing_SOURCE_DIRS} )
link_directories( ${ControlModule_SOURCE_DIRS} )
link_directories( ${Interpreter_SOURCE_DIRS} )
link_directories( ${IntersectionHandler_SOURCE_DIRS} )

add_subdirectory(Input)
add_subdirectory(Processing)
add_subdirectory(ControlModule)
add_subdirectory(Interpreter)
add_subdirectory(IntersectionHandler)

target_include_directories(Input PRIVATE .)
target_include_directories(Processing PRIVATE .)
target_include_directories(ControlModule PRIVATE .)
target_include_directories(Interpreter PRIVATE .)
target_include_directories(IntersectionHandler PRIVATE .)

add_executable(lfr_image_processing lfr.cpp)

target_link_libraries( lfr_image_processing ${OpenCV_LIBS})
target_link_libraries( lfr_image_processing Input )
target_link_libraries( lfr_image_processing Processing )
target_link_libraries( lfr_image_processing ControlModule )
target_link_libraries( lfr_image_processing Interpreter )
target_link_libraries( lfr_image_processing IntersectionHandler )

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})

+ 7
- 0
ControlModule/CMakeLists.txt View File

@@ -0,0 +1,7 @@
add_library(ControlModule control_module.cpp)
set_target_properties(ControlModule PROPERTIES VERSION ${PROJECT_VERSION})
target_include_directories(ControlModule PRIVATE .)

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)

+ 9
- 0
ControlModule/control_module.cpp View File

@@ -0,0 +1,9 @@
#include "control_module.h"

ControlModule::ControlModule(/* args */)
{
}

ControlModule::~ControlModule()
{
}

+ 9
- 0
ControlModule/control_module.h View File

@@ -0,0 +1,9 @@
class ControlModule
{
private:
/* data */
public:
ControlModule(/* args */);

~ControlModule();
};

+ 7
- 0
Interpreter/CMakeLists.txt View File

@@ -0,0 +1,7 @@
add_library(Interpreter interpreter.cpp)
set_target_properties(Interpreter PROPERTIES VERSION ${PROJECT_VERSION})
target_include_directories(Interpreter PRIVATE .)

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)

+ 9
- 0
Interpreter/interpreter.cpp View File

@@ -0,0 +1,9 @@
#include "interpreter.h"

Interpreter::Interpreter(/* args */)
{
}

Interpreter::~Interpreter()
{
}

+ 9
- 0
Interpreter/interpreter.h View File

@@ -0,0 +1,9 @@
class Interpreter
{
private:
/* data */
public:
Interpreter(/* args */);

~Interpreter();
};

+ 7
- 0
IntersectionHandler/CMakeLists.txt View File

@@ -0,0 +1,7 @@
add_library(IntersectionHandler intersection_handler.cpp)
set_target_properties(IntersectionHandler PROPERTIES VERSION ${PROJECT_VERSION})
target_include_directories(IntersectionHandler PRIVATE .)

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)

+ 9
- 0
IntersectionHandler/intersection_handler.cpp View File

@@ -0,0 +1,9 @@
#include "intersection_handler.h"

IntersectionHandler::IntersectionHandler(/* args */)
{
}

IntersectionHandler::~IntersectionHandler()
{
}

+ 9
- 0
IntersectionHandler/intersection_handler.h View File

@@ -0,0 +1,9 @@
class IntersectionHandler
{
private:
/* data */
public:
IntersectionHandler(/* args */);

~IntersectionHandler();
};

+ 13
- 6
lfr.cpp View File

@@ -2,6 +2,9 @@
#include <opencv2/opencv.hpp>
#include <input.h>
#include <processing.h>
#include <control_module.h>
#include <interpreter.h>
#include <intersection_handler.h>

using namespace cv;

@@ -9,13 +12,17 @@ const int threshold_binary = 110;

int main(void)
{
std::cout<<"Hello world";
Input test;
Processing test1;
Mat image1 = test.readFile("C:\\Line-Following-Robot\\Test_data\\*.jpeg");
//Mat image2 = test.readWebcam();
//Set up
Input input;
Processing processing;
ControlModule controleModule;
Interpreter interpreter;
IntersectionHandler intersectionHandler;

test1.calculate_binaray(image1, threshold_binary);
//Mat image1 = input.readFile("C:\\Line-Following-Robot\\Test_data\\*.jpeg");
Mat image1 = input.readWebcam();

processing.calculate_binaray(image1, threshold_binary);
imshow("Display window", image1);
waitKey(0);


Loading…
Cancel
Save