1. 1. Update and upgrade system
  2. sudo apt-get update
  3. sudo apt-get upgrade
  4. 2. Install dependencies
  5. sudo apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev libeigen2-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev
  6. 3. Get OpenCV source (2.4.2 confirmed working) and extract
  7. 4. Configure build
  8. mkdir build
  9. cmake-gui
  10. 5. Set cmake settings as follows

General configuration for OpenCV 2.4.2

Host: Linux 3.2.28-x14 armv7l
CMake: 2.8.7
CMake generator: Unix Makefiles
CMake build tool: /usr/bin/make
Configuration: Release

Built as dynamic libs?: YES
C++ Compiler: /usr/bin/c++ (ver 4.6.3)
C++ flags (Release): -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -O3 -DNDEBUG -DNDEBUG
C++ flags (Debug): -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -g -O0 -DDEBUG -D_DEBUG -ggdb3
C Compiler: /usr/bin/gcc
C flags (Release): -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -O3 -DNDEBUG -DNDEBUG
C flags (Debug): -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -g -O0 -DDEBUG -D_DEBUG -ggdb3
Linker flags (Release):
Linker flags (Debug):
Precompiled headers: NO

OpenCV modules:
To be built: core imgproc flann highgui features2d calib3d ml video objdetect contrib nonfree gpu legacy photo stitching ts videostab
Disabled: python
Disabled by dependency: -
Unavailable: androidcamera java world

QT 4.x: NO
GTK+ 2.x: YES (ver 2.24.10)
GThread : YES (ver 2.32.3)
GtkGlExt: NO
OpenGL support: NO

Media I/O:
ZLib: /usr/lib/arm-linux-gnueabihf/libz.so (ver
JPEG: /usr/lib/arm-linux-gnueabihf/libjpeg.so (ver )
PNG: /usr/lib/arm-linux-gnueabihf/libpng.so (ver 1.2.46)
TIFF: /usr/lib/arm-linux-gnueabihf/libtiff.so (ver 42 - 3.9.5)
JPEG 2000: /usr/lib/arm-linux-gnueabihf/libjasper.so (ver 1.900.1)
OpenEXR: /usr/lib/libImath.so /usr/lib/libIlmImf.so /usr/lib/libIex.so /usr/lib/libHalf.so /usr/lib/libIlmThread.so (ver 1.6.1)

Video I/O:
DC1394 1.x: NO
DC1394 2.x: YES (ver 2.2.0)
codec: YES (ver 54.59.100)
format: YES (ver 54.29.104)
util: YES (ver 51.73.101)
swscale: YES (ver 2.1.101)
gentoo-style: YES
base: YES (ver 0.10.36)
app: YES (ver 0.10.36)
video: YES (ver 0.10.36)
OpenNI: NO
OpenNI PrimeSensor Modules: NO
UniCap: NO
UniCap ucil: NO
V4L/V4L2: Using libv4l (ver 0.9.1)
Xine: NO

Other third-party libraries:
Use Cuda: NO
Use Eigen: NO

Interpreter: /usr/bin/python (ver 2.7.3)

Tests and samples:
Tests: YES
Performance tests: YES
Examples: YES

Install path: /usr/local

cvconfig.h is in: /home/user/download/OpenCV-2.4.2/new_build

  1. 6. Build and install OpenCV
  2. make
  3. make install
  4. 7. Configure OpenCV
  5. sudo nano /etc/ld.so.conf.d/opencv.conf
  6. add installpath (/usr/local/lib) to end of file (file might be empty, that ok!)
  7. 8. Configure Library
  8. sudo ldconfig
  9. 9. Open file /etc/bash.bashrc as sudo
  10. Add this to end of file
  11. PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
  12. export PKG_CONFIG_PATH
  13. 10. Restart beagleboard! Won't work without reboot.

To get x output from beageboard

install x11-xserver-utils
export DISPLAY=localhost:10.0

On local machine
run xhost +
ssh user beagleboard -X
run whatever program with x output