oakd_orbslam3
oakd_orbslam3 copied to clipboard
OpenCV 4
This moves ORB_SLAM3 to a PR branch that supports OpenCV4.
I haven't tested the OpenCV CMake detection if/else chain to make sure older OpenCV works.
The ThDepth
variable needed to be a float instead of an int to prevent an error after this change.
Changed the readme and added a fatal error if you try to use opencv 3 with the opencv 4 version of ORB_SLAM3.
Will leave this open for now, but I'd like to keep support for both opencv 3 and 4, so it's now in the opencv_4 branch.
Check out the diff for the noskill OpenCV4 support branch: https://github.com/UZ-SLAMLab/ORB_SLAM3/pull/195/files
The change maintains OpenCV3 support and swaps code based on the OpenCV version. The PR comments also mention building 3.3 and 4 on that branch.
I did run into a problem with the CMakeLists.txt detecting the right version of OpenCV (hence swapping the 3 and 4 positions in the if
chain).
Did this not build for you? If so, I'll try tweaking the CMakeLists.txt some more.