Skip to content

Commit 2609847

Browse files
authored
Merge pull request #21 from changh95/develop
v0.5 Release
2 parents df3615d + ab82fa0 commit 2609847

19 files changed

Lines changed: 378 additions & 77 deletions

CMakeLists.txt

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project(
44
VERSION 0.1.0
55
LANGUAGES C CXX
66
)
7-
7+
88
# Standard CMake modules
99
include(CTest)
1010
include(CMakeDependentOption)
@@ -14,6 +14,13 @@ include(CMakePackageConfigHelpers)
1414

1515
# Custom modules and scripts
1616
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DOR}/cmake")
17+
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
18+
include(opencv)
19+
include(pcl)
20+
include(eigen)
21+
include(ceres)
22+
include(gtsam)
23+
include(utils)
1724
#include(...)
1825

1926
set(CMAKE_CXX_STANDARD 17)
@@ -29,35 +36,35 @@ message(STATUS "-Wall -Wextra -O0")
2936

3037
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
3138

32-
# Source files
33-
add_executable(CV_Project src/main.cpp)
34-
35-
target_link_libraries(CV_Project
36-
PRIVATE
37-
#general spdlog::spdlog
38-
)
39-
4039
# csv reader depdency
4140
set(THREADS_PREFER_PTHREAD_FLAG ON)
4241
find_package(Threads REQUIRED)
4342

4443
find_package (Eigen3 3.3 REQUIRED NO_MODULE)
45-
4644
set(BIN_FILE solution)
4745
set(BIN_FOLDER_PATH bin/)
4846
set(3RDPARTY_PATH 3rdParty/)
4947

5048
include_directories(
5149
include/
50+
${CMAKE_CURRENT_SOURCE_DIR}/src
5251
include/fast-cpp-csv-parser/
5352
${Eigen3_INCLUDE_DIRS}
5453
)
5554

56-
add_executable(${BIN_FILE}
55+
add_executable(${BIN_FILE}
5756
src/main.cpp
5857
)
58+
5959
set_target_properties(${BIN_FILE} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${BIN_FOLDER_PATH})
6060

61-
target_link_libraries(${BIN_FILE}
62-
Eigen3::Eigen
63-
Threads::Threads)
61+
target_link_libraries(
62+
${BIN_FILE}
63+
${THREAD_LIBS}
64+
${OpenCV_LIBS}
65+
${EIGEN_LIBS}
66+
${PCL_LIBS}
67+
${CERES_LIBS}
68+
${GTSAM_LIBS}
69+
${SPDLOG_LIBS}
70+
)

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Hyunggi Chang (changh95), Jiwon Sa (pacientes)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 53 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,39 @@
1-
# cpp-cv-project-template
1+
![title](./resource/project_title.png)
22

3-
## Purpose
3+
## Purpose :fire:
44

55
This repo contains a C++ project template for developing computer vision applications.
66

7-
## Dependencies
7+
## Features :star2:
88

9-
You need [Python3](https://www.python.org/) to use the automation scripts for project setup and build.
9+
- The project comprise a widely-used C++ project structure.
10+
- The project supports installing essential toolchains for C++ programming and debugging.
11+
- git, build-essentials, cppcheck, cmake, clang, gcc, clang-tools, clang-tidy, lldb, lld, libc++, libomp (:heavy_check_mark:)
12+
- The project supports the following 3rdParty libraries:
13+
- Python3 + basic packages (numpy, pandas, matplotlib, jupyter notebook, voila, tqdm, nbconvert) (:heavy_check_mark:)
14+
- Open3D (:heavy_check_mark:)
15+
- Eigen (:heavy_check_mark:)
16+
- OpenCV (:heavy_check_mark:)
17+
- Non-free algorithms enabled
18+
- Ceres-solver (:heavy_check_mark:)
19+
- GTSAM (:heavy_check_mark:)
20+
- PCL (:heavy_check_mark:)
21+
- Visualization disabled
22+
- OpenGL (:heavy_multiplication_x:)
23+
- GTest (:heavy_multiplication_x:)
24+
- spdlog (:heavy_check_mark:)
25+
- fast-cpp-csv-parser (:heavy_check_mark:)
1026

11-
### Linux - How to use
27+
Status legend:
28+
:heavy_check_mark: - Fully supported,
29+
:white_check_mark: - Partially supported / Build-only,
30+
:heavy_multiplication_x: - Not supported yet
31+
32+
## How to use :book:
33+
34+
>You need [Python3](https://www.python.org/) to use the automation scripts for project setup and build.
35+
36+
### Linux
1237

1338
```bash
1439
# Install Python 3
@@ -20,33 +45,31 @@ chmod u+x setup.py
2045

2146
```
2247

23-
### Windows - How to use
48+
- You can also use the optional `--password` argument to avoid manually typing your Linux password for every internal sudo command usage.
2449

25-
Download the latest [Python3](https://www.python.org/downloads/windows/).
50+
### Windows
2651

27-
For now, it is highly recommended to use [Windows Subsystems for Linux (WSL)](https://docs.microsoft.com/en-gb/windows/wsl/install-win10) to use the build scripts. Hopefully I can make build scripts for Windows soon enough...
52+
- For now, Windows native build is not supported. Instead, you may use [Windows Subsystems for Linux (WSL)](https://docs.microsoft.com/en-gb/windows/wsl/install-win10) to use the build scripts.
2853

29-
## Features
54+
## License :bank:
3055

31-
- The project comprise a widely-used C++ project structure.
32-
- The project supports installing essential toolchains for C++ programming and debugging.
33-
- git, build-essentials, cppcheck, cmake, clang, gcc, clang-tools, clang-tidy, lldb, lld, libc++, libomp (:heavy_check_mark:)
34-
- The project supports the following 3rdParty libraries:
35-
- Python3 + basic packages (numpy, pandas, matplotlib, jupyter notebook, voila, tqdm, nbconvert) (:heavy_check_mark:)
36-
- Open3D (:heavy_check_mark:)
37-
- Eigen (:white_check_mark:)
38-
- OpenCV (:white_check_mark:)
39-
- Non-free algorithms enabled
40-
- Ceres-solver (:white_check_mark:)
41-
- GTSAM (:white_check_mark:)
42-
- PCL (:white_check_mark:)
43-
- Visualization disabled
44-
- OpenGL (:heavy_multiplication_x:)
45-
- GTest (:heavy_multiplication_x:)
46-
- spdlog (:white_check_mark:)
47-
- fast-cpp-csv-parser (:white_check_mark:)
56+
This repo is licensed under MIT license. Click [here]([./LICENSE](https://github.com/changh95/cpp-cv-project-template/blob/main/LICENSE)) to view the license.
4857

49-
Status legend:
50-
:heavy_check_mark: - Fully supported,
51-
:white_check_mark: - Partially supported / Build-only,
52-
:heavy_multiplication_x: - Not supported yet
58+
## Contributors :sunglasses:
59+
60+
Thanks goes to these wonderful people!
61+
62+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
63+
<!-- prettier-ignore-start -->
64+
<!-- markdownlint-disable -->
65+
<table>
66+
<tr>
67+
<td align="center"><a href="https://github.com/changh95"><img src="https://avatars.githubusercontent.com/u/39010111?v=4" width="100px;" alt=""/><br /><sub><b>changh95</b></sub></a><br /><a href="https://github.com/changh95/cpp-cv-project-template/commits?author=changh95" title="Commits">💻</a></td>
68+
<td align="center"><a href="https://github.com/pacientes"><img src="https://avatars.githubusercontent.com/u/22834091?v=4" width="100px;" alt=""/><br /><sub><b>pacientes</b></sub></a><br /><a href="https://github.com/changh95/cpp-cv-project-template/commits?author=pacientes" title="Commits">💻</a></td>
69+
</tr>
70+
</table>
71+
72+
<!-- markdownlint-restore -->
73+
<!-- prettier-ignore-end -->
74+
75+
<!-- ALL-CONTRIBUTORS-LIST:END -->

cmake/ceres.cmake

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Ceres-solver
2+
3+
find_package (Ceres PATHS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/ceres-solver/install)
4+
if (${Ceres_FOUND})
5+
message(STATUS "Found Ceres-solver")
6+
add_definitions(-DCERES_DEVELOP)
7+
8+
include_directories(
9+
${Ceres_INCLUDE_DIRS}
10+
)
11+
12+
set(CERES_LIBS Ceres::ceres)
13+
14+
else (${Ceres_FOUND})
15+
message(STATUS "Could not support Ceres-solver")
16+
endif (${Ceres_FOUND})

cmake/eigen.cmake

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Eigen
2+
3+
find_package (Eigen3 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/Eigen/install)
4+
if (${Eigen3_FOUND})
5+
message(STATUS "Found Eigen3")
6+
add_definitions(-DEIGEN_DEVELOP)
7+
8+
include_directories(
9+
${Eigen3_INCLUDE_DIRS}
10+
)
11+
12+
set(EIGEN_LIBS Eigen3::Eigen)
13+
else (${Eigen3_FOUND})
14+
message(STATUS "Could not support Eigen3")
15+
endif (${Eigen3_FOUND})

cmake/gtsam.cmake

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# GTSAM
2+
3+
find_package (GTSAM PATHS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/GTSAM/install)
4+
if (${GTSAM_FOUND})
5+
message(STATUS "Found GTSAM")
6+
add_definitions(-DGTSAM_DEVELOP)
7+
8+
include_directories(
9+
${GTSAM_INCLUDE_DIRS}
10+
)
11+
12+
set(GTSAM_LIBS gtsam)
13+
14+
else (${GTSAM_FOUND})
15+
message(STATUS "Could not support GTSAM")
16+
endif (${GTSAM_FOUND})

cmake/opencv.cmake

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# OpenCV
2+
3+
find_package (OpenCV PATHS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/opencv/install)
4+
if (${OpenCV_FOUND})
5+
message(STATUS "Found OpenCV")
6+
add_definitions(-DOPENCV_DEVELOP)
7+
8+
include_directories(
9+
${OpenCV_INCLUDE_DIRS}
10+
)
11+
12+
else (${OpenCV_FOUND})
13+
message(STATUS "Could not support OpenCV")
14+
endif (${OpenCV_FOUND})

cmake/pcl.cmake

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# PCL(Point Cloud Library)
2+
3+
find_package (PCL PATHS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/pcl/install)
4+
if (${PCL_FOUND})
5+
message(STATUS "Found PCL(Point Cloud Library)")
6+
add_definitions(-DPCL_DEVELOP)
7+
8+
include_directories(
9+
${PCL_INCLUDE_DIRS}
10+
)
11+
12+
else (${PCL_FOUND})
13+
message(STATUS "Could not support PCL(Point Cloud Library)")
14+
endif (${PCL_FOUND})

cmake/utils.cmake

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Utilities - spdlog, fast-cpp-csv-parser
2+
3+
# csv reader depdency
4+
set(THREADS_PREFER_PTHREAD_FLAG ON)
5+
find_package(Threads REQUIRED)
6+
set(THREAD_LIBS Threads::Threads)
7+
8+
find_package (spdlog PATHS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/spdlog/install)
9+
if (${spdlog_FOUND})
10+
message(STATUS "Found spdlog")
11+
add_definitions(-DSPDLOG_DEVELOP)
12+
13+
include_directories(
14+
${CMAKE_CURRENT_SOURCE_DIR}/third_party/spdlog/install/include
15+
)
16+
17+
set(SPDLOG_LIBS spdlog::spdlog)
18+
19+
else (${spdlog_FOUND})
20+
message(STATUS "Could not support spdlog")
21+
endif (${spdlog_FOUND})

resource/project_title.png

28.8 KB
Loading

0 commit comments

Comments
 (0)