0

Project Link: https://github.com/stytim/k4a-calibration
I want to run the project but it can't compile

Error message

[ 33%] Building CXX object CMakeFiles/calib_k4a.dir/src/camera_extrinsics.cpp.o
/home/ccnam/Downloads/k4a-calibration/src/camera_extrinsics.cpp: In member function ‘bool ExtrinsicsCalibration::CalculateExtrinsics(const std::vector<FrameInfo>&, std::vector<AlignmentTransform>&)’:
/home/ccnam/Downloads/k4a-calibration/src/camera_extrinsics.cpp:213:51: error: ‘cv::Ptr<cv::aruco::Dictionary> cv::aruco::Board::dictionary’ is protected within this context
             cv::aruco::detectMarkers(gray, board->dictionary, markerCorners, markerIds, params);
                                                   ^~~~~~~~~~
In file included from /usr/local/include/opencv4/opencv2/aruco_detector.hpp:6:0,
                 from /usr/local/include/opencv4/opencv2/aruco.hpp:7,
                 from /usr/local/include/opencv4/opencv2/aruco/charuco.hpp:9,
                 from /home/ccnam/Downloads/k4a-calibration/include/camera_extrinsics.hpp:11,
                 from /home/ccnam/Downloads/k4a-calibration/src/camera_extrinsics.cpp:1:
/usr/local/include/opencv4/opencv2/aruco/board.hpp:89:29: note: declared protected here
     CV_PROP Ptr<Dictionary> dictionary;
                             ^~~~~~~~~~
CMakeFiles/calib_k4a.dir/build.make:75: recipe for target 'CMakeFiles/calib_k4a.dir/src/camera_extrinsics.cpp.o' failed
make[2]: *** [CMakeFiles/calib_k4a.dir/src/camera_extrinsics.cpp.o] Error 1
CMakeFiles/Makefile2:82: recipe for target 'CMakeFiles/calib_k4a.dir/all' failed
make[1]: *** [CMakeFiles/calib_k4a.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2

Step

git clone https://github.com/stytim/k4a-calibration.git
cd k4a-calibration
mkdir build && cd build
cmake ..
make

Environment
Ubuntu 18.04

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36
anonymous
  • 228
  • 1
  • 11

1 Answers1

0

Change it to board->getDictionary(). When you use project dependencies with newer versions then you need to deal with the involved changes.