Had a few hours of ‘fun’ getting OpenCV3 to build… I will expand on that sometime, meantime some reminders
Some reminders mainly to me…
The main problem was configure for OpenCV would not find ffmpeg, in spite of all the solutions to the problem posted around the web, none worked. In the end I reinstalled OpenCV from source.
Note below the configure needs some specific flags or open CV will get grumpy.
clear build folder with rm -r
#before doing the
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local</pre>
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules -D BUILD_EXAMPLES=ON ..
ffmpeg build required
./configure --enable-nonfree --enable-pic --enable-shared
You may find ffmpeg complains when it is run of missing libraries, its the usual solution apt-get….
A couple of functions I use from older version has different args, for thos a quick fix os
#contours returns more values so…
(_,contours,_) = cv2.findContours(
contours, hierarchy = cv2.findContours(…)[-2:]
ps for the java libs it doesnt find thing unless