Giter Site home page Giter Site logo

Comments (2)

queyrusi avatar queyrusi commented on August 14, 2024 1

CMakeLists.txt in ./thirdparty/orbslam2_features doesn't seem to locate any opencv although its Python counterpart is well in place (likely under .python/venvs/pyslam/lib/python3.6/site-packages/cv2).
Installing it with

brew install opencv@3

(since brew install opencv tries to fetch opencv4 through a dysfunctional URL somehow so it ends up failing) and linking it in pyslam/thirdparty/orbslam2_features/CMakeLists.txt, line 15, through

# finds freshly brew-installed opencv
find_package(OpenCV REQUIRED PATHS "/usr/local/opt/opencv@3")

instead of

find_package(OpenCV ${OPENCV_VERSION} QUIET)

fixes the issue.
Any opencv related issues regarding building (notably pyslam_utils in ./cpp) can be patched with this workaround. The CMakeLists.txt will proceed but launching python3 -O main_slam.py will produce

Class CaptureDelegate is implemented in both /Users/username/.python/venvs/pyslam/lib/python3.6/site-packages/cv2/cv2.cpython-36m-darwin.so (0x119e26590) and /usr/local/opt/opencv@3/lib/libopencv_videoio.3.4.dylib (0x13947cfe0). One of the two will be used. Which one is undefined.

from pyslam.

luigifreda avatar luigifreda commented on August 14, 2024

Thank you very much for your feedback!
I see the problem is now connected to the fact that

brew install opencv

does not work anymore (as you reported above). I am seeing it on my mac too and this is a bit annoying since it was perfectly working and so I got installed opencv4 sometime ago!

In my setup, if I run (as expected, see the launch_main_*.sh files)

. pyenv-activate.sh    # required to active the pyslam python env
python3 -c "import cv2; print(cv2.__version__)"

I correctly get 4.5.1 (as I originally expected).

As for the issue you have with the message

Class CaptureDelegate is implemented in both /Users/username/.python/venvs/pyslam/lib/python3.6/site-packages/cv2/cv2.cpython-36m-darwin.so (0x119e26590) and /usr/local/opt/opencv@3/lib/libopencv_videoio.3.4.dylib (0x13947cfe0). One of the two will be used. Which one is undefined.

I am aware of it and I already reported it in the MAC.md document as an open issue.

Working in order to improve the install procedure.... never-ending story :-)

from pyslam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.