cv2 3.0.0 cv2.FlannBasedMatcher: flann.knnMatch is throwing cv2 error

前端 未结 4 1362
醉梦人生
醉梦人生 2020-12-21 02:35

I want to use a flann-based matcher in Python as described in http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_feature2d/py_matcher/py_matcher.html

4条回答
  •  离开以前
    2020-12-21 02:46

    If you're on a Mac and using python3, this did it for me instead of building it from github:

    brew install opencv3 --with-python3 --with-contrib
    

    and

    export PYTHONPATH=$PYTHONPATH:/usr/local/Cellar/opencv3/3.0.0/lib/python3.4/site-packages
    

    replace python3.4 with your version.


    Seems like there's some general problem with the function allocate(). I also had the same problem with BackgroundSubtractorMOG2, beside the FLANN matcher. This fixed both.

提交回复
热议问题