include_directories( ${OpenCV_INCLUDE_DIRS} ) | include_directories( ${OpenCV_INCLUDE_DIRS} ) | ||||
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/Input ) | include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/Input ) | ||||
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/Processing) | 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( ${Input_SOURCE_DIRS} ) | ||||
link_directories( ${Processing_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(Input) | ||||
add_subdirectory(Processing) | add_subdirectory(Processing) | ||||
add_subdirectory(ControlModule) | |||||
add_subdirectory(Interpreter) | |||||
add_subdirectory(IntersectionHandler) | |||||
target_include_directories(Input PRIVATE .) | target_include_directories(Input PRIVATE .) | ||||
target_include_directories(Processing 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) | add_executable(lfr_image_processing lfr.cpp) | ||||
target_link_libraries( lfr_image_processing ${OpenCV_LIBS}) | target_link_libraries( lfr_image_processing ${OpenCV_LIBS}) | ||||
target_link_libraries( lfr_image_processing Input ) | target_link_libraries( lfr_image_processing Input ) | ||||
target_link_libraries( lfr_image_processing Processing ) | 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_NAME ${PROJECT_NAME}) | ||||
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION}) | set(CPACK_PROJECT_VERSION ${PROJECT_VERSION}) |
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) |
#include "control_module.h" | |||||
ControlModule::ControlModule(/* args */) | |||||
{ | |||||
} | |||||
ControlModule::~ControlModule() | |||||
{ | |||||
} |
class ControlModule | |||||
{ | |||||
private: | |||||
/* data */ | |||||
public: | |||||
ControlModule(/* args */); | |||||
~ControlModule(); | |||||
}; |
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) |
#include "interpreter.h" | |||||
Interpreter::Interpreter(/* args */) | |||||
{ | |||||
} | |||||
Interpreter::~Interpreter() | |||||
{ | |||||
} |
class Interpreter | |||||
{ | |||||
private: | |||||
/* data */ | |||||
public: | |||||
Interpreter(/* args */); | |||||
~Interpreter(); | |||||
}; |
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) |
#include "intersection_handler.h" | |||||
IntersectionHandler::IntersectionHandler(/* args */) | |||||
{ | |||||
} | |||||
IntersectionHandler::~IntersectionHandler() | |||||
{ | |||||
} |
class IntersectionHandler | |||||
{ | |||||
private: | |||||
/* data */ | |||||
public: | |||||
IntersectionHandler(/* args */); | |||||
~IntersectionHandler(); | |||||
}; |
#include <opencv2/opencv.hpp> | #include <opencv2/opencv.hpp> | ||||
#include <input.h> | #include <input.h> | ||||
#include <processing.h> | #include <processing.h> | ||||
#include <control_module.h> | |||||
#include <interpreter.h> | |||||
#include <intersection_handler.h> | |||||
using namespace cv; | using namespace cv; | ||||
int main(void) | 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); | imshow("Display window", image1); | ||||
waitKey(0); | waitKey(0); | ||||