oakd_orbslam3 icon indicating copy to clipboard operation
oakd_orbslam3 copied to clipboard

OpenCV 4

Open ColbyToland opened this issue 4 years ago • 3 comments

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.

ColbyToland avatar Jan 29 '21 18:01 ColbyToland

Changed the readme and added a fatal error if you try to use opencv 3 with the opencv 4 version of ORB_SLAM3.

duncanrhamill avatar Jan 30 '21 11:01 duncanrhamill

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.

duncanrhamill avatar Jan 30 '21 11:01 duncanrhamill

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.

ColbyToland avatar Jan 30 '21 18:01 ColbyToland