From 536beab3e02f01d259ec4f03954f5c247ff8c307 Mon Sep 17 00:00:00 2001 From: Simone Gasparini Date: Sat, 8 Nov 2025 19:57:54 +0100 Subject: [PATCH 01/10] [cmake] removed unnecessary dependency boost atomic --- CMakeLists.txt | 3 ++- INSTALL.md | 2 +- src/CMakeLists.txt | 19 +++++++++++++++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d0e35b61..3b42be13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,7 +111,8 @@ if(APPLE) endif(APPLE) # FIND BOOST -set(BOOST_REQUIRED_COMPONENTS "atomic;chrono;date_time;filesystem;program_options;serialization;system;thread;timer;math_c99") +#set(BOOST_REQUIRED_COMPONENTS "chrono;date_time;filesystem;program_options;serialization;system;thread;timer;math_c99") +set(BOOST_REQUIRED_COMPONENTS "chrono;date_time;filesystem;program_options;serialization;thread;timer") if(WIN32) set(BOOST_REQUIRED_COMPONENTS "${BOOST_REQUIRED_COMPONENTS};stacktrace_windbg") else() diff --git a/INSTALL.md b/INSTALL.md index b8f127ff..8a1fbf23 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -20,7 +20,7 @@ Note: On Windows, there are compatibility issues to build the GPU part due to co Most of the dependencies can be installed from the common repositories (apt, yum etc): - Eigen3 (libeigen3-dev) >= 3.3.4 (NOTE: in order to have Cuda support on Windows, at least version 3.3.9 is required) -- Boost >= 1.66 ([accumulators, atomic, chrono, core, date-time, exception, filesystem, math, program-options, ptr-container, system, serialization, stacktrace, timer, thread]-dev) +- Boost >= 1.66 ([accumulators, chrono, core, date-time, exception, filesystem, math, program-options, ptr-container, system, serialization, stacktrace, timer, thread]-dev) - OpenCV >= 3.1 - TBB >= 2021.5.0 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index aca1625e..371eb190 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -174,7 +174,15 @@ if(CCTAG_WITH_CUDA) # since we used CUDA_ADD_LIBRARY we cannot use PUBLIC or PRIVATE here target_link_libraries(CCTag ${OpenCV_LIBS} - Boost::date_time Boost::chrono Boost::thread Boost::serialization Boost::system Boost::filesystem Boost::atomic Boost::program_options Boost::timer Boost::math_c99 + Boost::date_time + Boost::chrono + Boost::thread + Boost::serialization + Boost::system + Boost::filesystem + Boost::program_options + Boost::timer +# Boost::math_c99 Eigen3::Eigen TBB::tbb ${CUDA_CUDADEVRT_LIBRARY}) @@ -220,7 +228,14 @@ else() # without CUDA PUBLIC ${OpenCV_LIBS} Eigen3::Eigen - Boost::atomic Boost::chrono Boost::date_time Boost::filesystem Boost::serialization Boost::system Boost::thread Boost::timer Boost::math_c99 + Boost::chrono + Boost::date_time + Boost::filesystem + Boost::serialization + # Boost::system + Boost::thread + Boost::timer +# Boost::math_c99 PRIVATE TBB::tbb) From 3dccc4d5df4f70a10483d64c192ce48e959d9672 Mon Sep 17 00:00:00 2001 From: Simone Gasparini Date: Sat, 8 Nov 2025 20:16:39 +0100 Subject: [PATCH 02/10] [cmake] removed unnecessary boost libraries --- CMakeLists.txt | 2 +- src/CMakeLists.txt | 7 ------- src/applications/CMakeLists.txt | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b42be13..355fc440 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,7 +112,7 @@ endif(APPLE) # FIND BOOST #set(BOOST_REQUIRED_COMPONENTS "chrono;date_time;filesystem;program_options;serialization;system;thread;timer;math_c99") -set(BOOST_REQUIRED_COMPONENTS "chrono;date_time;filesystem;program_options;serialization;thread;timer") +set(BOOST_REQUIRED_COMPONENTS "date_time;filesystem;program_options;serialization;timer") if(WIN32) set(BOOST_REQUIRED_COMPONENTS "${BOOST_REQUIRED_COMPONENTS};stacktrace_windbg") else() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 371eb190..9984e296 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -175,12 +175,8 @@ if(CCTAG_WITH_CUDA) target_link_libraries(CCTag ${OpenCV_LIBS} Boost::date_time - Boost::chrono - Boost::thread Boost::serialization - Boost::system Boost::filesystem - Boost::program_options Boost::timer # Boost::math_c99 Eigen3::Eigen @@ -228,12 +224,9 @@ else() # without CUDA PUBLIC ${OpenCV_LIBS} Eigen3::Eigen - Boost::chrono Boost::date_time Boost::filesystem Boost::serialization - # Boost::system - Boost::thread Boost::timer # Boost::math_c99 PRIVATE diff --git a/src/applications/CMakeLists.txt b/src/applications/CMakeLists.txt index fc43bde5..5b57cf28 100644 --- a/src/applications/CMakeLists.txt +++ b/src/applications/CMakeLists.txt @@ -40,7 +40,7 @@ endif() # BOOST if(NOT TARGET Boost::boost) - set(BOOST_REQUIRED_COMPONENTS "date_time;chrono;thread;serialization;system;filesystem;atomic;program_options;timer") + set(BOOST_REQUIRED_COMPONENTS "date_time;serialization;filesystem;program_options;timer") if(WIN32) set(BOOST_REQUIRED_COMPONENTS "${BOOST_REQUIRED_COMPONENTS};stacktrace_windbg") else() From fef1f12a21527577bf8b0dfa24ae70b037e848c8 Mon Sep 17 00:00:00 2001 From: Simone Gasparini Date: Sat, 8 Nov 2025 23:13:11 +0100 Subject: [PATCH 03/10] [doc] updated and fixed INSTALL --- INSTALL.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 8a1fbf23..b53f4783 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -5,25 +5,26 @@ For a detailed guide on building the library check the [online documentation](https://cctag.readthedocs.io/). Required tools: + * CMake >= 3.14 to build the code * Git * C/C++ compiler with C++14 support - * see here: https://en.cppreference.com/w/cpp/compiler_support - * TLDR gcc >= 5, clang >= 3.4, msvc >= 2017 + * see here: + * TLDR gcc >= 5, clang >= 3.4, msvc >= 2017 Optional tool: -* CUDA >= 9.0 + +* CUDA >= 9.0 Note: On Windows, there are compatibility issues to build the GPU part due to conflicts between msvc/nvcc/thrust/eigen/boost. -### Dependencies +### Dependencies Most of the dependencies can be installed from the common repositories (apt, yum etc): -- Eigen3 (libeigen3-dev) >= 3.3.4 (NOTE: in order to have Cuda support on Windows, at least version 3.3.9 is required) -- Boost >= 1.66 ([accumulators, chrono, core, date-time, exception, filesystem, math, program-options, ptr-container, system, serialization, stacktrace, timer, thread]-dev) -- OpenCV >= 3.1 -- TBB >= 2021.5.0 - +* Eigen3 (libeigen3-dev) >= 3.3.4 (NOTE: in order to have Cuda support on Windows, at least version 3.3.9 is required) +* Boost >= 1.66 ([accumulators, core, date-time, exception, filesystem, math, program-options, ptr-container, system, serialization, stacktrace, timer, thread]-dev) +* OpenCV >= 3.1 +* TBB >= 2021.5.0 ---------- @@ -53,18 +54,19 @@ cmake .. -DCCTag_DIR=$CCTAG_INSTALL/lib/cmake/CCTag/ ## Docker Image -A docker image can be built using the Ubuntu based [Dockerfile](Dockerfile),which is based on nvidia/cuda image (https://hub.docker.com/r/nvidia/cuda/) +A docker image can be built using the Ubuntu based [Dockerfile](Dockerfile),which is based on nvidia/cuda image () -A parameter `CUDA_TAG` can be passed when building the image to select the ubuntu and cuda version. +A parameter `CUDA_TAG` can be passed when building the image to select the ubuntu and cuda version. For example to create a ubuntu 16.04 with cuda 8.0 for development, use -``` + +```bash docker build --build-arg CUDA_TAG=8.0-devel --tag cctag . ``` The complete list of available tags can be found on the nvidia [dockerhub page](https://hub.docker.com/r/nvidia/cuda/) -In order to run the image nvidia docker is needed: see the installation instruction here https://github.com/nvidia/nvidia-docker/wiki/Installation-(version-2.0) +In order to run the image nvidia docker is needed: see the installation instruction here Once installed, the docker can be run, e.g., in interactive mode with -``` +```bash docker run -it --runtime=nvidia cctag ``` From 70bd11708267ef505039a22bbb691fab9ef7d986 Mon Sep 17 00:00:00 2001 From: Simone Gasparini Date: Sat, 8 Nov 2025 23:18:48 +0100 Subject: [PATCH 04/10] [doc] md fixes for readme + updated badges --- README.md | 56 ++++++++++++++++++++++--------------------------------- 1 file changed, 22 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index a7aa22b3..474b876b 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,16 @@ -CCTag library -=================== -[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3989/badge)](https://bestpractices.coreinfrastructure.org/projects/3989) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/a99505cea4bd4cd195b9b65b6114ee90)](https://www.codacy.com/manual/alicevision/CCTag?utm_source=github.com&utm_medium=referral&utm_content=alicevision/CCTag&utm_campaign=Badge_Grade) +# CCTag library + +[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3989/badge)](https://bestpractices.coreinfrastructure.org/projects/3989) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/5b8f7ee0d05b4c8fb5e6d6602e011217)](https://app.codacy.com/gh/alicevision/CCTag/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) +[![Continuous Integration](https://github.com/alicevision/CCTag/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/alicevision/CCTag/actions/workflows/continuous-integration.yml) Detection of CCTag markers made up of concentric circles. Implementations in both CPU and GPU. -The library is the implementation of the paper: +The library is the implementation of the paper: -* Lilian Calvet, Pierre Gurdjos, Carsten Griwodz, Simone Gasparini. **Detection and Accurate Localization of Circular Fiducials Under Highly Challenging Conditions.** In: *Proceedings of the International Conference on Computer Vision and Pattern Recognition (CVPR 2016)*, Las Vegas, E.-U., IEEE Computer Society, p. 562-570, June 2016. https://doi.org/10.1109/CVPR.2016.67 +* Lilian Calvet, Pierre Gurdjos, Carsten Griwodz, Simone Gasparini. **Detection and Accurate Localization of Circular Fiducials Under Highly Challenging Conditions.** In: *Proceedings of the International Conference on Computer Vision and Pattern Recognition (CVPR 2016)*, Las Vegas, E.-U., IEEE Computer Society, p. 562-570, June 2016. -If you want to cite this work in your publication, please use the following +If you want to cite this work in your publication, please use the following ```latex @inproceedings{calvet2016Detection, @@ -23,8 +25,7 @@ If you want to cite this work in your publication, please use the following } ``` -Marker library ---------- +## Marker library Markers to print are located [here](markersToPrint). @@ -37,50 +38,37 @@ CCTags requires either CUDA 8.0 and newer or CUDA 7.0 (CUDA 7.5 builds are known Check your graphic card CUDA compatibility [here](https://github.com/tpruvot/ccminer/wiki/Compatibility). -Building --------- +## Building See [INSTALL](INSTALL.md) text file. -Continuous integration: - -| | windows | linux | -|--------- |:-------: |:-----: | -| master | [![Build status](https://ci.appveyor.com/api/projects/status/909b01qlixwslvmf?svg=true)](https://ci.appveyor.com/project/AliceVision/cctag) | ![Continuous Integration](https://github.com/alicevision/CCTag/workflows/Continuous%20Integration/badge.svg?branch=master) | -| develop | [![Build status](https://ci.appveyor.com/api/projects/status/909b01qlixwslvmf/branch/develop?svg=true)](https://ci.appveyor.com/project/AliceVision/cctag/branch/develop) | ![Continuous Integration](https://github.com/alicevision/CCTag/workflows/Continuous%20Integration/badge.svg?branch=develop) | - -Running -------- +## Running Once compiled, you might want to run the CCTag detection on a sample image: ```bash -$ build/src/detection -n 3 -i sample/01.png +build/src/detection -n 3 -i sample/01.png ``` + For the library interface, see [ICCTag.hpp](src/cctag/ICCTag.hpp). -Documentation -------------- +## Documentation The documentation can be found on the [Read the Docs page](https://cctag.readthedocs.io/en/latest/) - -License -------- +## License CCTag is licensed under [MPL v2 license](COPYING.md). -Authors -------- +## Authors -Lilian Calvet (CPU, lilian.calvet@gmail.com) -Carsten Griwodz (GPU, griff@simula.no) -Stian Vrba (CPU, vrba@mixedrealities.no) -Cyril Pichard (pih@mikrosimage.eu) -Simone Gasparini (simone.gasparini@gmail.com) +Lilian Calvet (CPU, ) +Carsten Griwodz (GPU, ) +Stian Vrba (CPU, ) +Cyril Pichard () +Simone Gasparini () -Acknowledgments ---------- +## Acknowledgments This has been developed in the context of the European project [POPART](https://alicevision.org/popart/) founded by European Union’s Horizon 2020 research and innovation programme under grant agreement No 644874. From aa7b7f15f38d5c61f7df7256376c4de93b21998b Mon Sep 17 00:00:00 2001 From: Simone Gasparini Date: Sat, 8 Nov 2025 23:32:36 +0100 Subject: [PATCH 05/10] remove travis files --- .travis.yml | 148 ------------------------------------- ci/env.sh | 64 ---------------- ci/install-cmake.sh | 15 ---- ci/install-dependencies.sh | 18 ----- 4 files changed, 245 deletions(-) delete mode 100644 .travis.yml delete mode 100755 ci/env.sh delete mode 100755 ci/install-cmake.sh delete mode 100755 ci/install-dependencies.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index afadbc58..00000000 --- a/.travis.yml +++ /dev/null @@ -1,148 +0,0 @@ -dist: trusty -language: cpp -sudo: required - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - - llvm-toolchain-precise - packages: - - g++-4.8 - - clang-3.8 - - libpng-dev - - libjpeg8-dev - - libtiff4-dev - - libtbb-dev - - libatlas-base-dev - -matrix: - include: - - compiler: gcc - env: CXX_COMPILER=g++-4.8 C_COMPILER=gcc-4.8 TOOLSET=gcc CCTAG_WITH_CUDA=ON CUDA_VERSION_MAJOR="7" CUDA_VERSION_MINOR="0" CUDA_PKG_LONGVERSION="${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}-28" CUDA_PKG_VERSION="${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR}" - - compiler: gcc - env: CXX_COMPILER=g++-4.8 C_COMPILER=gcc-4.8 TOOLSET=gcc CCTAG_WITH_CUDA=ON CUDA_VERSION_MAJOR="7" CUDA_VERSION_MINOR="5" CUDA_PKG_LONGVERSION="${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}-18" CUDA_PKG_VERSION="${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR}" - - compiler: gcc - env: CXX_COMPILER=g++-4.8 C_COMPILER=gcc-4.8 TOOLSET=gcc CCTAG_WITH_CUDA=ON CUDA_VERSION_MAJOR="8" CUDA_VERSION_MINOR="0" CUDA_PKG_LONGVERSION="${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}.61-1" CUDA_PKG_VERSION="${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR}" - - compiler: gcc - env: CXX_COMPILER=g++-4.8 C_COMPILER=gcc-4.8 TOOLSET=gcc CCTAG_WITH_CUDA=OFF - - compiler: clang - # clang 3.8 is supported in cuda >= 8.0 - env: CXX_COMPILER=clang++-3.8 C_COMPILER=clang-3.8 TOOLSET=clang CCTAG_WITH_CUDA=ON CUDA_VERSION_MAJOR="8" CUDA_VERSION_MINOR="0" CUDA_PKG_LONGVERSION="${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}.61-1" CUDA_PKG_VERSION="${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR}" - - compiler: clang - env: CXX_COMPILER=clang++-3.8 C_COMPILER=clang-3.8 TOOLSET=clang CCTAG_WITH_CUDA=OFF - - -env: - global: - - NUM_CPU="`grep processor /proc/cpuinfo | wc -l`"; echo $NUM_CPU - - BUILD_TYPE="RELEASE" - - BUILD_SYSTEM="`uname -s`" - - BUILD_PROCESSOR="`uname -p`" - - DEPS_INSTALL_PATH=${TRAVIS_BUILD_DIR}/../AliceVisionDependencies/install-deps - - CCTAG_SOURCE=${TRAVIS_BUILD_DIR} - - CCTAG_BUILD=${TRAVIS_BUILD_DIR}/build - - CCTAG_INSTALL=${CCTAG_BUILD}/install - - CCTAG_BUILD_VARIANT=${TRAVIS_BUILD_DIR}/build - - CCTAG_INSTALL_VARIANT=${CCTAG_BUILD_VARIANT}/install - - CCTAG_SOURCE_APP=$CCTAG_SOURCE/src/applications - - CCTAG_BUILD_APP=${CCTAG_SOURCE_APP}/build - -before_install: - - date -u - - uname -a - - if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then - lsb_release -a; - elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then - sw_vers -productVersion; - fi - - ccache -s - - gem install coveralls-lcov - -install: - # CUDA (only if needed) - - > - if [ "${CCTAG_WITH_CUDA}" = "ON" ]; then - CUDA_REPO_PKG=cuda-repo-ubuntu1404_${CUDA_PKG_LONGVERSION}_amd64.deb - wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/$CUDA_REPO_PKG - sudo dpkg -i $CUDA_REPO_PKG - rm $CUDA_REPO_PKG - sudo apt-get -y update - sudo apt-get install -y --no-install-recommends cuda-core-$CUDA_PKG_VERSION cuda-cudart-dev-$CUDA_PKG_VERSION cuda-cublas-dev-$CUDA_PKG_VERSION cuda-curand-dev-$CUDA_PKG_VERSION - sudo ln -s /usr/local/cuda-${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR} /usr/local/cuda - fi - - ./ci/install-cmake.sh - - ./ci/install-dependencies.sh - -before_script: - - . ./ci/env.sh - - export CMAKE_PREFIX_PATH="${DEPS_INSTALL_PATH}" - - export CTEST_OUTPUT_ON_FAILURE=1 - # patch tbb - # https://software.intel.com/en-us/forums/intel-threading-building-blocks/topic/431422 - - sudo sed -i '345s/.*/\#if \(__GNUC__==4 \&\& __GNUC_MINOR__>=4 \&\& __GXX_EXPERIMENTAL_CXX0X__\) || __clang_major__ >= 3/' /usr/include/tbb/pipeline.h - # Create build folder - - mkdir --parent $CCTAG_BUILD - - cd $CCTAG_BUILD - # Classic release build - - > - cmake \ - -DCMAKE_CXX_COMPILER=$CXX_COMPILER \ - -DCMAKE_C_COMPILER=$C_COMPILER \ - -DCMAKE_INSTALL_PREFIX:PATH=$CCTAG_INSTALL \ - -DCCTAG_WITH_CUDA:BOOL=$CCTAG_WITH_CUDA \ - -DCMAKE_BUILD_TYPE:BOOL=$BUILD_TYPE \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DOpenCV_DIR:PATH="${DEPS_INSTALL_PATH}/share/OpenCV" \ - -DEIGEN_INCLUDE_DIR_HINTS="${DEPS_INSTALL_PATH}" \ - . $CCTAG_SOURCE - -script: - # classic make install - - make install -j 2 VERBOSE=1 - - make test - - # Test if it compiles as third party - - cd $CCTAG_SOURCE_APP - - mkdir --parent $CCTAG_BUILD_APP - - cd $CCTAG_BUILD_APP - - > - cmake -DCMAKE_CXX_COMPILER=$CXX_COMPILER \ - -DCMAKE_C_COMPILER=$C_COMPILER \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DCCTag_DIR:PATH=/$CCTAG_INSTALL/lib/cmake/CCTag/ \ - -DOpenCV_DIR:PATH=$OPENCV_INSTALL/share/OpenCV \ - -DCMAKE_INSTALL_PREFIX:PATH=`pwd`/install \ - . $CCTAG_SOURCE_APP - - make install -j 2 VERBOSE=1 - - # For builds without cuda test also another variant with - # CCTAG_VISUAL_DEBUG and CCTAG_SERIALIZE - - > - if [ "${CCTAG_WITH_CUDA}" = "OFF" ]; then - mkdir --parent $CCTAG_BUILD_VARIANT - cd $CCTAG_BUILD_VARIANT - cmake \ - -DCMAKE_CXX_COMPILER=$CXX_COMPILER \ - -DCMAKE_C_COMPILER=$C_COMPILER \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=$CCTAG_INSTALL_VARIANT \ - -DCCTAG_WITH_CUDA:BOOL=$CCTAG_WITH_CUDA \ - -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ - -DCCTAG_VISUAL_DEBUG:BOOL=ON \ - -DCCTAG_SERIALIZE:BOOL=ON \ - -DOpenCV_DIR:PATH=$OPENCV_INSTALL/share/OpenCV \ - . $CCTAG_SOURCE - make install -j 2 VERBOSE=1 - make test - fi - -after_success: - - du -hs $OPENCV_INSTALL - -# Before uploading the new cache archive -before_cache: - - ccache -s - -cache: - ccache: true diff --git a/ci/env.sh b/ci/env.sh deleted file mode 100755 index 887a7c4b..00000000 --- a/ci/env.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -set -e - -[ -z "${TRAVIS_BUILD_DIR}" ] && echo "No TRAVIS_BUILD_DIR env variable, use current folder." && export TRAVIS_BUILD_DIR=$PWD - -# Same as travis_retry: -# https://raw.githubusercontent.com/tomjaguarpaw/neil/master/travis.sh -retry() { - local result=0 - local count=1 - while [ $count -le 3 ]; do - [ $result -ne 0 ] && { - echo -e "\n${ANSI_RED}The command \"$@\" failed. Retrying, $count of 3.${ANSI_RESET}\n" >&2 - } - "$@" - result=$? - [ $result -eq 0 ] && break - count=$(($count + 1)) - sleep 1 - done - - [ $count -gt 3 ] && { - echo -e "\n${ANSI_RED}The command \"$@\" failed 3 times.${ANSI_RESET}\n" >&2 - } - - return $result -} - -# Check if the folder exists and is non empty -folder_not_empty() -{ - if [ -d "$1" ] && [ "$(ls -A $1)" ]; then - # The folder exist and is non empty - return 0 - fi - return 1 -} - -# Check if the folder doesn't exist or is empty -folder_empty() -{ - if [ -d "$1" ] && [ "$(ls $1)" ]; then - return 1 - fi - # The folder doesn't exist or is empty - return 0 -} - -# download_files_from_tar http://path/to/archive.tar.gz /path/to/source -download_files_from_tar() -{ - mkdir --parent "$2" - retry wget --no-check-certificate --quiet -O - "$1" | tar --strip-components=1 -xz -C "$2" - return 0 -} - -# CMAKE -export CMAKE_VERSION_SHORT=3.14 -export CMAKE_VERSION=3.14.5 -export CMAKE_URL="https://cmake.org/files/v${CMAKE_VERSION_SHORT}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz" -export CMAKE_ROOT="${TRAVIS_BUILD_DIR}/cmake-${CMAKE_VERSION}" -export CMAKE_INSTALL="${CMAKE_ROOT}/install" - -export PATH="${CMAKE_INSTALL}/bin:${PATH}" diff --git a/ci/install-cmake.sh b/ci/install-cmake.sh deleted file mode 100755 index 68276c20..00000000 --- a/ci/install-cmake.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -set -e -CURRDIR="$( cd "$( dirname "$( readlink -f "${BASH_SOURCE[0]}" )" )" && pwd )" - -. ${CURRDIR}/env.sh - -# CMAKE most recent version -if folder_not_empty ${CMAKE_INSTALL}; then - echo "CMake found in cache."; -else - echo "Download CMake."; - download_files_from_tar ${CMAKE_URL} ${CMAKE_INSTALL} -fi -cmake --version - diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh deleted file mode 100755 index 95f83086..00000000 --- a/ci/install-dependencies.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -set -e -CURRDIR="$( cd "$( dirname "$( readlink -f "${BASH_SOURCE[0]}" )" )" && pwd )" -. "${CURRDIR}/env.sh" - - -# downloadFromAliceVisionDependencies TARGET_FULL_NAME INSTALL_PATH -downloadFromAliceVisionDependencies() -{ - download_files_from_tar "https://github.com/alicevision/AliceVisionDependencies/releases/download/$1/$1.tgz" $2 - return 0 -} - -set -x - -downloadFromAliceVisionDependencies boost-1.70.0 ${DEPS_INSTALL_PATH} -downloadFromAliceVisionDependencies eigen-3.3.7 ${DEPS_INSTALL_PATH} -downloadFromAliceVisionDependencies opencv-3.4.2 ${DEPS_INSTALL_PATH} From c809932fcea4bad4a9de0a12ef26b687f32c8db2 Mon Sep 17 00:00:00 2001 From: Simone Gasparini Date: Tue, 18 Nov 2025 10:37:36 +0100 Subject: [PATCH 06/10] [doc] markdown linting --- CHANGES.md | 77 ++++++++++++++++++++++------------------------ CODE_OF_CONDUCT.md | 5 ++- CONTRIBUTING.md | 12 +++----- 3 files changed, 42 insertions(+), 52 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 713b66d3..13bb4345 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -41,22 +41,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Using the new TBB oneAPI interface, this breaks compatibility with previous versions of TBB [PR](https://github.com/alicevision/CCTag/pull/200) ### Fixed + - fix gcc11 ordered pointer comparison [PR](https://github.com/alicevision/CCTag/pull/191) - fix handling of `BUILD_SHARED_LIBS` option [PR](https://github.com/alicevision/CCTag/pull/201) ## [1.0.2] - 2022-07-14 ### Added + - Added documentation for conan [PR](https://github.com/alicevision/CCTag/pull/183) ### Fixed + - Fixed potential out of bound in debug mode [PR](https://github.com/alicevision/CCTag/pull/180) ## [1.0.1] - 2021-10-08 ### Changed -- Renamed the marker files to be 0-based [PR](https://github.com/alicevision/CCTag/pull/165) +- Renamed the marker files to be 0-based [PR](https://github.com/alicevision/CCTag/pull/165) ### Fixed @@ -64,72 +67,64 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed compilation errors for newer version of boost on windows [PR](https://github.com/alicevision/CCTag/pull/166) - Removed old legacy defines for cuda and boost no more needed since the switch to c++14 [PR](https://github.com/alicevision/CCTag/pull/174) - ## [1.0.0] - 2021-06-24 - - Support for OpenCV 3.4.9 [PR](https://github.com/alicevision/CCTag/pull/121) - - Switch to C++14 standard [PR](https://github.com/alicevision/CCTag/pull/155) - +- Support for OpenCV 3.4.9 [PR](https://github.com/alicevision/CCTag/pull/121) +- Switch to C++14 standard [PR](https://github.com/alicevision/CCTag/pull/155) ## 2019 - - Remove Cuda Cub dependency [PR](https://github.com/alicevision/CCTag/pull/110) - - Bug fix: out of range image access during identification [PR](https://github.com/alicevision/CCTag/pull/117) - - Bug fix on big markers (multi-resolution detection) [PR](https://github.com/alicevision/CCTag/pull/116) - - Bug fix: avoid access to empty vector during vote [PR](https://github.com/alicevision/CCTag/pull/115) - - CMake: export all symbols when building shared libs on Windows [PR](https://github.com/alicevision/CCTag/pull/112) - - CMake: Improve management of CUDA Compute Capabilities flags [PR](https://github.com/alicevision/CCTag/pull/109) - - Compatibility with Opencv 4 [PR](https://github.com/alicevision/CCTag/pull/104) - +- Remove Cuda Cub dependency [PR](https://github.com/alicevision/CCTag/pull/110) +- Bug fix: out of range image access during identification [PR](https://github.com/alicevision/CCTag/pull/117) +- Bug fix on big markers (multi-resolution detection) [PR](https://github.com/alicevision/CCTag/pull/116) +- Bug fix: avoid access to empty vector during vote [PR](https://github.com/alicevision/CCTag/pull/115) +- CMake: export all symbols when building shared libs on Windows [PR](https://github.com/alicevision/CCTag/pull/112) +- CMake: Improve management of CUDA Compute Capabilities flags [PR](https://github.com/alicevision/CCTag/pull/109) +- Compatibility with Opencv 4 [PR](https://github.com/alicevision/CCTag/pull/104) ## 2018 - - First Windows version (CPU only) [PR](https://github.com/alicevision/CCTag/pull/78) - - Docker: add support for docker [PR](https://github.com/alicevision/CCTag/pull/84) - - Improvements for ellipse fitting +- First Windows version (CPU only) [PR](https://github.com/alicevision/CCTag/pull/78) +- Docker: add support for docker [PR](https://github.com/alicevision/CCTag/pull/84) +- Improvements for ellipse fitting [PR](https://github.com/alicevision/CCTag/pull/66) - - Modernizing code to C++11 +- Modernizing code to C++11 [PR](https://github.com/alicevision/CCTag/pull/64) - ## 2017 - - Use Thrust for cuda >= 8 +- Use Thrust for cuda >= 8 [PR](https://github.com/alicevision/CCTag/pull/62) - - Minor code cleaning +- Minor code cleaning [PR](https://github.com/alicevision/CCTag/pull/61) - - Add limit to edgepoint d-to-h transfer +- Add limit to edgepoint d-to-h transfer [PR](https://github.com/alicevision/CCTag/pull/53) - - Bug fix in NearbyPoint +- Bug fix in NearbyPoint [PR](https://github.com/alicevision/CCTag/pull/46) - ## 2016 - - Switch to modern version of CMake [PR](https://github.com/alicevision/CCTag/pull/40) - - CVPR Publication https://hal.archives-ouvertes.fr/hal-01420665/document - - Application: Show detected markers in video and live mode +- Switch to modern version of CMake [PR](https://github.com/alicevision/CCTag/pull/40) +- CVPR Publication +- Application: Show detected markers in video and live mode [PR](https://github.com/alicevision/CCTag/pull/33) - - Allow to extract CCTags from multiple images in parallel with multiple cuda streams +- Allow to extract CCTags from multiple images in parallel with multiple cuda streams [PR](https://github.com/alicevision/CCTag/pull/32) [PR](https://github.com/alicevision/CCTag/pull/31) - - Continuous integration on Travis [PR](https://github.com/alicevision/CCTag/pull/27) - - Remove Blas/Lapack/Optpp dependencies - - Remove Ceres dependency - - GPU implementation - +- Continuous integration on Travis [PR](https://github.com/alicevision/CCTag/pull/27) +- Remove Blas/Lapack/Optpp dependencies +- Remove Ceres dependency +- GPU implementation ## 2015 - - First open-source release - - CPU Optimizations - - Expose critical parameters - - CMake build system - +- First open-source release +- CPU Optimizations +- Expose critical parameters +- CMake build system ## 2014 - - Thesis Defence by Lilian Calvet under the direction of Vincent Charvillat and Pierre Gurdjos - "Three-dimensional reconstruction methods integrating cyclic points: application to camera tracking" (http://www.theses.fr/2014INPT0002) - - CCTag detection on CPU - +- Thesis Defence by Lilian Calvet under the direction of Vincent Charvillat and Pierre Gurdjos + "Three-dimensional reconstruction methods integrating cyclic points: application to camera tracking" () +- CCTag detection on CPU diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index e2233aee..263c9557 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -55,7 +55,7 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team privately at alicevision-team@googlegroups.com. All +reported by contacting the project team privately at . All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. @@ -68,7 +68,6 @@ members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct/ +available at [homepage]: https://www.contributor-covenant.org - diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c9ca6d90..0e101768 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,19 +1,16 @@ -Contributing to CCTag -=========================== +# Contributing to CCTag CCTag relies on a friendly and community-driven effort to create an open source photogrammetry solution. In order to foster a friendly atmosphere where technical collaboration can flourish, we recommend you to read the [code of conduct](CODE_OF_CONDUCT.md). - -Contributing Workflow ---------------------- +## Contributing Workflow The contributing workflow relies on [Github Pull Requests](https://help.github.com/articles/using-pull-requests/). -1. If it is an important change, we recommend you to discuss it on the mailing-list before starting implementation. +1. If it is an important change, we recommend you to discuss it on the mailing-list before starting implementation. This ensure that the development is aligned with other -developpements already started and will be efficiently integrated. +development already started and will be efficiently integrated. 2. Create the corresponding issues. @@ -32,4 +29,3 @@ congratulate the author, etc. using the github comments. will merge your fixes into the "develop" branch. 8. If not already the case, your name will be added to the [contributors list](CONTRIBUTORS.md). - From 883a4c1bb5f0ab9e1a6f79f7bee68cd047118a59 Mon Sep 17 00:00:00 2001 From: Simone Gasparini Date: Tue, 18 Nov 2025 10:38:26 +0100 Subject: [PATCH 07/10] [cmake] comment to explain how to deal with boost --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 355fc440..40622397 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,7 +111,8 @@ if(APPLE) endif(APPLE) # FIND BOOST -#set(BOOST_REQUIRED_COMPONENTS "chrono;date_time;filesystem;program_options;serialization;system;thread;timer;math_c99") +# list only components that are not header-only, those have a target associated +# the header-only components must be added with target_include_directories( ... ${Boost_INCLUDE_DIRS} ) set(BOOST_REQUIRED_COMPONENTS "date_time;filesystem;program_options;serialization;timer") if(WIN32) set(BOOST_REQUIRED_COMPONENTS "${BOOST_REQUIRED_COMPONENTS};stacktrace_windbg") From 248d43ef4065ca4f44da0444049e67b538ed5c3a Mon Sep 17 00:00:00 2001 From: Simone Gasparini Date: Tue, 18 Nov 2025 10:49:54 +0100 Subject: [PATCH 08/10] [cmake] cleaning --- src/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9984e296..057ef4ef 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -178,7 +178,6 @@ if(CCTAG_WITH_CUDA) Boost::serialization Boost::filesystem Boost::timer -# Boost::math_c99 Eigen3::Eigen TBB::tbb ${CUDA_CUDADEVRT_LIBRARY}) @@ -228,7 +227,6 @@ else() # without CUDA Boost::filesystem Boost::serialization Boost::timer -# Boost::math_c99 PRIVATE TBB::tbb) From d03f0e82260094d2123d611b4e273729bdea3024 Mon Sep 17 00:00:00 2001 From: Simone Gasparini Date: Tue, 18 Nov 2025 10:50:22 +0100 Subject: [PATCH 09/10] removed unused header --- src/applications/detection/main.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/applications/detection/main.cpp b/src/applications/detection/main.cpp index 6807adad..7338c27b 100644 --- a/src/applications/detection/main.cpp +++ b/src/applications/detection/main.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include From 107a78f00983db355893fca122cc0c874b35472d Mon Sep 17 00:00:00 2001 From: Simone Gasparini Date: Tue, 18 Nov 2025 10:51:04 +0100 Subject: [PATCH 10/10] optional better to check with has_values() --- src/applications/regression/Regression.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/regression/Regression.cpp b/src/applications/regression/Regression.cpp index a088b941..64f5b6fe 100644 --- a/src/applications/regression/Regression.cpp +++ b/src/applications/regression/Regression.cpp @@ -27,7 +27,7 @@ TestRunner::TestRunner(const std::string& inputDir, const std::string& outputDir void TestRunner::adjustParameters(cctag::Parameters& parameters) { - if (_useCuda) + if (_useCuda.has_value()) parameters._useCuda = *_useCuda; }