-
Notifications
You must be signed in to change notification settings - Fork 34
/
CMakeLists.txt
114 lines (94 loc) · 3.16 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 2.8.3)
project(camera_model)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++11 -march=native")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -fPIC -fopenmp")
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
)
find_package(Boost REQUIRED COMPONENTS filesystem program_options system)
include_directories(${Boost_INCLUDE_DIRS})
find_package(OpenCV REQUIRED)
#set(EIGEN_INCLUDE_DIR "/usr/local/include/eigen3")
find_package(Ceres REQUIRED)
include_directories(${CERES_INCLUDE_DIRS})
message(STATUS "OpenCV library status:")
message(STATUS " version: ${OpenCV_VERSION}")
message(STATUS " libraries: ${OpenCV_LIBS}")
message(STATUS " include path: ${OpenCV_INCLUDE_DIRS}")
message(STATUS "Eigen library path: ${EIGEN3_INCLUDE_DIR}")
catkin_package(
INCLUDE_DIRS include
LIBRARIES camera_model
CATKIN_DEPENDS roscpp std_msgs
# DEPENDS system_lib
)
include_directories(
${catkin_INCLUDE_DIRS}
)
include_directories("include")
aux_source_directory(${PROJECT_SOURCE_DIR}/src/apriltag AprilTagSrc)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/apriltag_frontend AprilTagSrc2)
set(CAMERA_MODEL_FILES
${PROJECT_SOURCE_DIR}/src/camera_models/Camera.cc
${PROJECT_SOURCE_DIR}/src/camera_models/CostFunctionFactory.cc
${PROJECT_SOURCE_DIR}/src/camera_models/CameraFactory.cc
${PROJECT_SOURCE_DIR}/src/camera_models/PinholeCamera.cc
${PROJECT_SOURCE_DIR}/src/camera_models/PinholeFullCamera.cc
${PROJECT_SOURCE_DIR}/src/camera_models/CataCamera.cc
${PROJECT_SOURCE_DIR}/src/camera_models/EquidistantCamera.cc
${PROJECT_SOURCE_DIR}/src/camera_models/ScaramuzzaCamera.cc
${PROJECT_SOURCE_DIR}/src/camera_models/PolyFisheyeCamera.cpp
${PROJECT_SOURCE_DIR}/src/camera_models/SplineCamera.cpp
${PROJECT_SOURCE_DIR}/src/camera_models/FovCamera.cpp
${PROJECT_SOURCE_DIR}/src/sparse_graph/Transform.cc
${PROJECT_SOURCE_DIR}/src/gpl/gpl.cc
${PROJECT_SOURCE_DIR}/src/code_utils/math_utils/Polynomial.cpp
${PROJECT_SOURCE_DIR}/src/code_utils/cv_utils.cc
${PROJECT_SOURCE_DIR}/src/gpl/EigenQuaternionParameterization.cc
${AprilTagSrc}
${AprilTagSrc2}
)
add_executable(Calibration
src/intrinsic_calib.cc
src/chessboard/Chessboard.cc
src/calib/CameraCalibration.cc
${CAMERA_MODEL_FILES}
)
add_executable(april_calib
src/april_calib.cc
src/chessboard/Chessboard.cc
src/calib/CameraCalibration.cc
${CAMERA_MODEL_FILES}
)
add_executable(Test
src/test_calib.cc
src/chessboard/Chessboard.cc
src/calib/CameraCalibrationTest.cc
${CAMERA_MODEL_FILES}
)
add_library(camera_model STATIC
src/chessboard/Chessboard.cc
src/calib/CameraCalibration.cc
${CAMERA_MODEL_FILES}
)
target_link_libraries(Calibration
${Boost_LIBRARIES}
${OpenCV_LIBS}
${CERES_LIBRARIES}
dw )
target_link_libraries(april_calib
${Boost_LIBRARIES}
${OpenCV_LIBS}
${CERES_LIBRARIES}
dw )
target_link_libraries(Test
${Boost_LIBRARIES}
${OpenCV_LIBS}
${CERES_LIBRARIES}
dw )
target_link_libraries(camera_model
${Boost_LIBRARIES}
${OpenCV_LIBS}
${CERES_LIBRARIES} )