Project

General

Profile

Actions

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:
    • cd ~
    • cp -r /usr/share/doc/opencv-doc/examples .
    • cd examples/c
    • you should be able to build most programs.
  • Unfortunately, the build program has an error in it. It is easy to fix though.
    • gedit build_all.sh
    • change the line that says: if [ $# > 0 ] ; then
    • it should say if [ $# -gt 0 ] ; then
  • /bin/bash build_all.sh

Building from Source

Updated by Joseph Foley over 13 years ago ยท 4 revisions