OpenCV in Ubuntu¶
There are two main ways to install OpenCV. You can build it from source or you can install the Ubuntu packages.
Installing packages¶inspired by https://help.ubuntu.com/community/OpenCV
sudo apt-get install python-opencv opencv-doc libcv-dev libcvaux-dev libhighgui-dev
- Test the build:
cp -r /usr/share/doc/opencv-doc/examples .
- you should be able to build most programs.
- Unfortunately, the build program has an error in it. It is easy to fix though.
- change the line that says:
if [ $# > 0 ] ; then
- it should say
if [ $# -gt 0 ] ; then
Building from Source¶
Updated by Joseph Foley almost 12 years ago · 4 revisions