-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
130 lines (111 loc) · 3.34 KB
/
Copy pathCMakeLists.txt
File metadata and controls
130 lines (111 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
cmake_minimum_required(VERSION 3.16)
project(SeamCarvingSystem)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Find dependencies
find_package(OpenCV REQUIRED)
find_package(Threads REQUIRED)
# Include directories
include_directories(src)
include_directories(${OpenCV_INCLUDE_DIRS})
# ONNX Runtime
set(ONNXRUNTIME_ROOT_DIR /usr/local)
include_directories(${ONNXRUNTIME_ROOT_DIR}/include)
link_directories(${ONNXRUNTIME_ROOT_DIR}/lib)
# Core library as SHARED
add_library(seam_carving_core SHARED
# Algorithms
src/algorithms/depthEstimator.cpp
src/algorithms/energyFuser.cpp
src/algorithms/energyFusion.cpp
src/algorithms/motionFusion.cpp
src/algorithms/motionParameters.cpp
src/algorithms/motionStatistics.cpp
src/algorithms/u2NetEstimator.cpp
src/algorithms/seamCarving.cpp
src/algorithms/sobel.cpp
src/algorithms/sobelEstimator.cpp
# Core data structures
src/core/data.cpp
# Output display
src/output/displayManager.cpp
# Threading
src/threads/carver.cpp
src/threads/display.cpp
src/threads/motion.cpp
src/threads/retarget.cpp
src/threads/validator.cpp
# Utilities
src/utils/appRunner.cpp
src/utils/config.cpp
src/utils/energyInitializer.cpp
src/utils/fpsTracker.cpp
src/utils/frameProcessor.cpp
src/utils/logger.cpp
src/utils/opencv.cpp
src/utils/parameterManager.cpp
src/utils/visual.cpp
src/seamCarvingApp.cpp
)
target_link_libraries(seam_carving_core
${OpenCV_LIBS}
Threads::Threads
onnxruntime
)
# Main application
add_executable(seamCarvingApp src/main.cpp)
target_link_libraries(seamCarvingApp seam_carving_core)
# Test executables
add_executable(cameraTest tests/cameraTest.cpp)
target_link_libraries(cameraTest seam_carving_core)
add_executable(videoTest tests/videoTest.cpp)
target_link_libraries(videoTest seam_carving_core)
# Batch processor
add_executable(batchProcessor tests/batchProcessor.cpp)
target_link_libraries(batchProcessor seam_carving_core)
# Depth test
add_executable(depthTest tests/depthTest.cpp)
target_link_libraries(depthTest seam_carving_core)
# Fusion test
add_executable(fusionTest tests/fusionTest.cpp)
target_link_libraries(fusionTest seam_carving_core)
# Visualizer
add_executable(visualizer tests/visualizer.cpp)
target_link_libraries(visualizer seam_carving_core)
# Build targets
add_custom_target(run_app
COMMAND seamCarvingApp
DEPENDS seamCarvingApp
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_target(test_camera
COMMAND cameraTest
DEPENDS cameraTest
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_target(test_video
COMMAND videoTest
DEPENDS videoTest
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_target(batch_process
COMMAND batchProcessor
DEPENDS batchProcessor
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_target(test_depth
COMMAND depthTest
DEPENDS depthTest
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_target(test_fusion
COMMAND fusionTest
DEPENDS fusionTest
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
message(STATUS "")
message(STATUS "Usage:")
message(STATUS " ./depthTest <image_path> [model_path]")
message(STATUS " ./fusionTest <image_path> [model_path]")
message(STATUS " ./batchProcessor <width_ratio> <video_path>")
message(STATUS "")