changh95/cpp-cv-project-template

Connect all the libraries to main.cpp (i.e. build a proper CMakeLists.txt)

Closed this issue ยท 9 comments

We made some useful scripts to clone and build useful libraries, but we have not yet made any connections to the C++ source codes.

We need to:

  • Check the downloaded libraries are in correct format.
    • We currently have build folder and source folder separately. On the other hand, some libraries recommend to make the build folders inside the source folder in their tutorials. We need to decide which structure we will use.
  • Check the downloaded libraries work as intended.
  • Decide on how we will connect the libraries.
    • As modules? Extra cmake config files? etc.
  • Write CMakeLists.txt to connect the libraries.

Tracker page

Pinging @pacientes to share the content update ๐Ÿ˜ธ

Support OpenCV and test done

@pacientes ๋‹˜,

์ € ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์„ ๋ชจ๋‘ ํ•˜๋‚˜์˜ CMakeLists.txt์— ๋งํฌํ•˜๊ฒŒ ๋˜๋ฉด ๋งŽ์ด ๊ธธ์–ด์งˆ ๊ฒƒ ๊ฐ™๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“ญ๋‹ˆ๋‹ค.
์ €ํฌ ํด๋” ๊ตฌ์กฐ์ค‘์— /cmakeํด๋”๊ฐ€ ์žˆ๋Š”๋ฐ, ๊ฐ๊ฐ์˜ ๋ชจ๋“ˆ์„ ๋งํฌํ•˜๋Š” ์ฝ”๋“œ ๋ถ€๋ถ„์„ ๋–ผ์–ด๋†“์„ ์ˆ˜ ์žˆ์„๊นŒ์š”?

๊ทธ๋ฆฌ๊ณ  ์ด๋ฒˆ #8 ์„ ๋ณด์‹œ๋ฉด './third_party/{module}/install`์— ์ตœ์ข… ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์ €์žฅ๋˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

์ด๋ ‡๊ฒŒ๋˜๋ฉด ๊ฐ๊ฐ ๋ชจ๋“ˆ์˜ ์†Œ์Šคํด๋”์™€ ๋นŒ๋“œํด๋”๊ฐ€ ํ•„์š”์—†์„ ์ˆ˜๋„ ์žˆ์„ ๊ฒƒ ๊ฐ™์€๋ฐ์š”. ์šฉ๋Ÿ‰์„ ์•„๋ผ๊ธฐ ์œ„ํ•ด ์‚ญ์ œํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๋Œ€์‹  ๋นŒ๋“œ ์ค‘ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒผ์„ ๋•Œ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋‹ค์‹œ ์‹œ์ž‘ํ•ด์•ผํ•˜๋Š” ๋‹จ์ ์ด ์žˆ์„ ๊ฒƒ ๊ฐ™์•„์š” ใ…‹ใ…‹ (๊ทธ ๋ช‡์‹œ๊ฐ„์„ ๋‹ค์‹œ...)

์ด ๋ถ€๋ถ„์„ ์ž๋™์œผ๋กœ ์ง€์›Œ์ฃผ๋Š” ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์งœ๋Š”๊ฑฐ์— ๋Œ€ํ•ด์„œ ์–ด๋–ป๊ฒŒ ์ƒ๊ฐํ•˜์‹œ๋‚˜์š”?

@pacientes ๋‹˜,

์ € ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์„ ๋ชจ๋‘ ํ•˜๋‚˜์˜ CMakeLists.txt์— ๋งํฌํ•˜๊ฒŒ ๋˜๋ฉด ๋งŽ์ด ๊ธธ์–ด์งˆ ๊ฒƒ ๊ฐ™๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“ญ๋‹ˆ๋‹ค.
์ €ํฌ ํด๋” ๊ตฌ์กฐ์ค‘์— /cmakeํด๋”๊ฐ€ ์žˆ๋Š”๋ฐ, ๊ฐ๊ฐ์˜ ๋ชจ๋“ˆ์„ ๋งํฌํ•˜๋Š” ์ฝ”๋“œ ๋ถ€๋ถ„์„ ๋–ผ์–ด๋†“์„ ์ˆ˜ ์žˆ์„๊นŒ์š”?

๋„ค ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ถ€๋ถ„ ์ž‘์—…ํ•ด์„œ PR ๋‚จ๊ฒจ๋†“์„๊ฒŒ์š”.

๊ทธ๋ฆฌ๊ณ  ์ด๋ฒˆ #8 ์„ ๋ณด์‹œ๋ฉด './third_party/{module}/install`์— ์ตœ์ข… ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์ €์žฅ๋˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

์ด๋ ‡๊ฒŒ๋˜๋ฉด ๊ฐ๊ฐ ๋ชจ๋“ˆ์˜ ์†Œ์Šคํด๋”์™€ ๋นŒ๋“œํด๋”๊ฐ€ ํ•„์š”์—†์„ ์ˆ˜๋„ ์žˆ์„ ๊ฒƒ ๊ฐ™์€๋ฐ์š”. ์šฉ๋Ÿ‰์„ ์•„๋ผ๊ธฐ ์œ„ํ•ด ์‚ญ์ œํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๋Œ€์‹  ๋นŒ๋“œ ์ค‘ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒผ์„ ๋•Œ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋‹ค์‹œ ์‹œ์ž‘ํ•ด์•ผํ•˜๋Š” ๋‹จ์ ์ด ์žˆ์„ ๊ฒƒ ๊ฐ™์•„์š” ใ…‹ใ…‹ (๊ทธ ๋ช‡์‹œ๊ฐ„์„ ๋‹ค์‹œ...)

์ด ๋ถ€๋ถ„์„ ์ž๋™์œผ๋กœ ์ง€์›Œ์ฃผ๋Š” ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์งœ๋Š”๊ฑฐ์— ๋Œ€ํ•ด์„œ ์–ด๋–ป๊ฒŒ ์ƒ๊ฐํ•˜์‹œ๋‚˜์š”?

make ์‚ฐ์ถœ๋ฌผ๊ณผ make install ์‚ฐ์ถœ๋ฌผ์ด ๊ฐ๊ฐ ๋‹ค๋ฅธ๋ฐ์š”.
make ์‚ฐ์ถœ๋ฌผ์„ ์‚ญ์ œํ•  ๊ฒฝ์šฐ ์šฉ๋Ÿ‰ํ™•๋ณด๊ฐ€ ๊ฐ€๋Šฅํ•˜์ง€๋งŒ, make uninstall ๊ฐ™์€ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๋Š” ๋‹จ์ ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

ํ•˜์ง€๋งŒ, make install์˜ ๊ฒฝ๋กœ๊ฐ€ ์จ๋“œํŒŒํ‹ฐ ๋””๋ ‰ํ† ๋ฆฌ์— ์ƒ๊ธฐ๋ฉด์„œ, ๋‚˜์ค‘์— ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธธ ๊ฒฝ์šฐ ํ•ด๋‹น ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ์ „๋ถ€ ์‚ญ์ œํ•˜๊ณ  ๋‹ค์‹œ ์„ค์น˜ํ•˜๋ฉด ๋˜๋Š” ๊ฒƒ์ด๋ผ! ์šฉ๋Ÿ‰ ํ™•๋ณด๋ฅผ ์œ„ํ•ด ์‚ญ์ œ ์Šคํฌ๋ฆฝํŠธ๊ฐ€ ์žˆ๋Š” ๊ฒƒ์ด ์ข‹์•„๋ณด์ž…๋‹ˆ๋‹ค!

PR #12๋กœ ์ธํ•œ Eigen, ceres-solver, GTSAM, spdlog ์„ค์ • ์™„๋ฃŒ ์‚ฌํ•ญ ์—…๋ฐ์ดํŠธ ํ–ˆ์Šต๋‹ˆ๋‹ค!

v0.5์—์„œ๋Š” ์—ฌ๊ธฐ๊นŒ์ง€๋งŒ ํ•˜๊ณ  ๋ฆด๋ฆฌ์ฆˆ ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!

๋๋‚ด์ง€ ๋ชปํ•œ OpenGL, GTest, ๊ทธ๋ฆฌ๊ณ  PCL์— VTK ์˜ต์…˜ ์ถ”๊ฐ€ ๋“ฑ๋“ฑ์€ v1.0์—์„œ ํ•˜๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
์˜๊ฒฌ ์—†์œผ์‹œ๋ฉด ์ด ์ด์Šˆ๋Š” ๋‹ซ๊ฒ ์Šต๋‹ˆ๋‹ค ๐Ÿ˜ธ

v0.5๊นŒ์ง€ ์ž‘์—…ํ•˜๊ธฐ๋กœ ํ•ฉ์˜ํ•œ ๋‚ด์šฉ๋“ค์€ ์ „๋ถ€ ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
์ถ”ํ›„ ์ž‘์—…ํ•  ๋‚ด์šฉ๋“ค์€ #17 ๊ณผ #3 ๋กœ ์˜ฎ๊ฒผ์Šต๋‹ˆ๋‹ค.