Skip to content

Commit

Permalink
Merge pull request #1448 from fspindle/feat_apriltag_upgrade
Browse files Browse the repository at this point in the history
Feat apriltag upgrade
  • Loading branch information
fspindle authored Jul 25, 2024
2 parents 50b026c + d7ea8ac commit 9eb65ea
Show file tree
Hide file tree
Showing 311 changed files with 1,295 additions and 47,332 deletions.
53 changes: 29 additions & 24 deletions 3rdparty/apriltag/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
project(${APRILTAG_LIBRARY})
project(${APRILTAG_LIBRARY} LANGUAGES C)

set(APRILTAG_MAJOR_VERSION 3 PARENT_SCOPE)
set(APRILTAG_MINOR_VERSION 1 PARENT_SCOPE)
set(APRILTAG_PATCH_VERSION 1 PARENT_SCOPE)
set(APRILTAG_MINOR_VERSION 4 PARENT_SCOPE)
set(APRILTAG_PATCH_VERSION 2 PARENT_SCOPE)

vp_include_directories(${CMAKE_CURRENT_SOURCE_DIR})

file(GLOB tag_srcs tag*.cpp)
file(GLOB lib_srcs *.cpp common/*.cpp)
file(GLOB tag_srcs tag*.c)
file(GLOB lib_srcs *.c common/*.c)
file(GLOB lib_hdrs *.h common/*.h common/sys/*.h)

vp_list_filterout(lib_srcs common/unionfind.cpp) # has no symbols
vp_list_filterout(lib_srcs common/unionfind.c) # has no symbols

if(NOT WITH_APRILTAG_BIG_FAMILY)
vp_list_filterout(lib_srcs tagCircle49h12.cpp)
vp_list_filterout(lib_srcs tagCircle49h12.c)
vp_list_filterout(lib_hdrs tagCircle49h12.h)
vp_list_filterout(lib_srcs tagCustom48h12.cpp)
vp_list_filterout(lib_srcs tagCustom48h12.c)
vp_list_filterout(lib_hdrs tagCustom48h12.h)
vp_list_filterout(lib_srcs tagStandard41h12.cpp)
vp_list_filterout(lib_srcs tagStandard41h12.c)
vp_list_filterout(lib_hdrs tagStandard41h12.h)
vp_list_filterout(lib_srcs tagStandard52h13.cpp)
vp_list_filterout(lib_srcs tagStandard52h13.c)
vp_list_filterout(lib_hdrs tagStandard52h13.h)
endif()

if(UNIX)
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
endif()
endif()

add_library(${APRILTAG_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
if(WIN32 AND MSVC)
target_link_libraries (${APRILTAG_LIBRARY} ${PTHREADS_LIBRARY})
endif()

if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${APRILTAG_LIBRARY} PROPERTIES FOLDER "3rdparty")
Expand All @@ -53,15 +50,23 @@ endif()
if(MSVC)
if(BUILD_SHARED_LIBS)
vp_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4098 /wd4244 /wd4267 /wd4305 /wd4334 /wd4244 /wd4838 /wd4996 /wd6011 /wd6385 /wd6386 /wd6387 /wd6011 /wd26451)
vp_set_source_file_compile_flag(common/zmaxheap.cpp /wd4098 /wd4244)
vp_set_source_file_compile_flag(common/workerpool.cpp /wd4018 /wd4244)
vp_set_source_file_compile_flag(common/pam.cpp /wd4018)
vp_set_source_file_compile_flag(common/string_util.cpp /wd4018 /wd4267 /wd4996)
vp_set_source_file_compile_flag(tag16h5.cpp /wd4996)
vp_set_source_file_compile_flag(tag25h7.cpp /wd4996)
vp_set_source_file_compile_flag(tag25h9.cpp /wd4996)
vp_set_source_file_compile_flag(tag36h10.cpp /wd4996)
vp_set_source_file_compile_flag(tag36h11.cpp /wd4996)
vp_set_source_file_compile_flag(common/zmaxheap.c /wd4098 /wd4244)
vp_set_source_file_compile_flag(common/workerpool.c /wd4018 /wd4244)
vp_set_source_file_compile_flag(common/pam.c /wd4018)
vp_set_source_file_compile_flag(common/homography.c /wd4244)
vp_set_source_file_compile_flag(common/g2d.c /wd4244)
vp_set_source_file_compile_flag(common/image_u8.c /wd4244)
vp_set_source_file_compile_flag(common/image_u8x3.c /wd4244)
vp_set_source_file_compile_flag(common/string_util.c /wd4018 /wd4267 /wd4996)
vp_set_source_file_compile_flag(common/pthreads_cross.c /wd4068 /wd4244)
vp_set_source_file_compile_flag(common/time_util.c /wd4244)
vp_set_source_file_compile_flag(apriltag.c /wd4244)
vp_set_source_file_compile_flag(apriltag_quad_thresh.c /wd4244)
vp_set_source_file_compile_flag(tag16h5.c /wd4996)
vp_set_source_file_compile_flag(tag25h7.c /wd4996)
vp_set_source_file_compile_flag(tag25h9.c /wd4996)
vp_set_source_file_compile_flag(tag36h10.c /wd4996)
vp_set_source_file_compile_flag(tag36h11.c /wd4996)
# disable optimization
foreach(f ${tag_srcs})
vp_set_source_file_compile_flag(${f} /O0)
Expand All @@ -71,7 +76,7 @@ if(MSVC)
endif()
elseif(MINGW)
foreach(f ${lib_srcs})
vp_set_source_file_compile_flag(${f} -Wno-deprecated -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-float-equal -Wno-strict-overflow -Wno-type-limits -Wno-shift-negative-value -Wno-class-memaccess)
vp_set_source_file_compile_flag(${f} -Wno-deprecated -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-float-equal -Wno-strict-overflow -Wno-type-limits -Wno-shift-negative-value)
endforeach()
# disable optimization
foreach(f ${tag_srcs})
Expand Down
5 changes: 3 additions & 2 deletions 3rdparty/apriltag/README.ViSP
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Porting of the AprilTag library: https://april.eecs.umich.edu/software/apriltag.html
AprilTag version is 3.1.1.

AprilTag version is 3.4.2.
commit 3806edf38ac4400153677e510c9f9dcb81f472c8
Date: Sun Jul 7 12:38:22 2024 +0200
Loading

0 comments on commit 9eb65ea

Please sign in to comment.