Adventures in open CV

56 views
Skip to first unread message

Dietrich Dehlinger

unread,
May 1, 2016, 11:59:01 PM5/1/16
to OpenCV with Python Blueprints
I'm looking into chapter 3, and ran into issues with openCV. I'm using a raspberry pi 3 running either Raspbian Jessie or Ubuntu mate. Using the default install of CV2 available through the package manager, SURF is unavailable by default (apparently due to licensing issues). I tried installing opencv v3 via compiling, and flann.knnMatch returns errors when recieving descriptors. It looks like I got it all to work by using a complete fresh install via compile of open cv v2.4.12 from the open cv website.

Michael Beyeler

unread,
May 2, 2016, 10:53:55 PM5/2/16
to OpenCV with Python Blueprints
Hi Dietrich,

Thanks for the report. I have not tried to run the code on a Raspberry Pi yet, but I've heard from other users, too, that the setup is sometimes kind of wacky. Maybe it would help if I provide code to use ORB instead of SURF, which is open source.
Let me know if you run into any other issues.

Best,
Michael

Dietrich Dehlinger

unread,
May 2, 2016, 11:07:47 PM5/2/16
to OpenCV with Python Blueprints
Well, I am unable to get SURF to work on a standard PC running linux as well. From what I can tell via googling, in open CV v 2.4 certain functions were moved to a "nonfree" portion of openCV. When you compile the default code for opencv 2.4.12 from the open CV website, those functions can be loaded without issue. When you just install open cv from the package manner (in raspbian, (l)ubuntu for pc, ubuntu mate for ras pi), those functions do not appear. It looks like whoever compiled them left those functions out because they are "non free". Compiling is relatively straightforward, but slow. I also compiled a version of opencv 3. There the SURF and SIFT functions are moved to subfunctions of cv2.xfeatures2d. Unfortunately then the Flann knnsearch function is broken (at least in the version I compiled, other people are reporting the same error as well). It seems like the best thing I found to do was install the current version of opencv 2.4 by compiling from source.
Reply all
Reply to author
Forward
0 new messages