Installation

Installation

The NMPT package can be downloaded from the Download NMPT page. It is structured as a development source tree. At the top level (the NMPT directory) there is a single Makefile, and below are several directories: bin, build, data, doc, src.

It is meant to stand alone under any standard C++ compiler, with the exception that it requires the OpenCV 2.1+ libraries. The only platform-specific (or user specific) portion of the compilation should be correctly locating the OpenCV libraries on your system. A few standard configurations are supported, but porting the code to a new system is as simple as modifying the Makefile to reflect the location of the OpenCV header files (includes) and libraries.

To compile the code:

On compilation, the binaries will be generated and placed in the "bin" subdirectory. Intermediate build files (e.g. .o object files) will be placed in the "build" subdirectory.

Once the Makefile has been properly configured, you can run a sample program by typing

>> make
>> bin/FastSUN data/HDMovieClip.avi

For more information on the included Machine Perception Primitives and the Example Programs, see below.

Installing OpenCV 2.1+

OpenCV is a freely available and easy to use package for C++ computer vision applications. You will need to have access to its libraries to be able to use this software. Although it has not been thoroughly tested, this software should work in any standard C++ environment on any platform as long OpenCV is included, and its libraries are linked. As of version 0.4 of NMPT, OpenCV 2.1 (or greater) is required.

For instructions on installing the latest version of OpenCV, please refer to the OpenCV Install Guide:

http://opencv.willowgarage.com/wiki/InstallGuide

Alternatively, grab the latest "release" version, which may be easier to install. On OSX in particular, these release versions tend to have bugs, but on other platforms they may be more stable and convenient:

http://sourceforge.net/projects/opencvlibrary/

Below we review a instructions to install and link to OpenCV for:

Mac OSX

For OSX it is highly recommended to install OpenCV from SVN. Directions for this can ben found on the OpenCV Install page:

http://opencv.willowgarage.com/wiki/InstallGuide

and on the OpenCV MacOSX Page:

http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port#line-32

Following the instructions here, you OpenCV 2.1+ will be built from source, and installed in /usr/local. Once OpenCV is installed this way, uncomment the Makefile line:

PLATFORM=MACSVN

and comment out the others:

PLATFORM=CYGWIN
#PLATFORM=LINUX

OpenCV is now installed and the Makefile is configured. You should be able to compile and run the NMPT library (Installation). NOTE: If you get to this point, and are unable build the code, (for example you get a terminal response like "-bash: make: command not found"), try installing Developer Tools and XCode, or updating your version of Developer tools and XCode. You can find these on your Mac OS Installation Disk that came with your computer, or you can download them online freely (signup required) from: http://developer.apple.com/technology/xcode.html.

Windows

The OpenCV libraries for Windows can be downloaded from SouceForge.net:

http://sourceforge.net/projects/opencvlibrary/

By default, this installer installs the OpenCV headers and libraries to specific directories inside of the "c:\Program/ Files\OpenCV" directory.

Given that you keep this standard installation, then you can build the libraries included here from Cygwin. The Makefile is currently configured to use Cygwin's g++ compiler.

Once OpenCV is installed this way, uncomment the Makefile line:

PLATFORM=CYGWIN

and comment out the others:

#PLATFORM=MACSVN
#PLATFORM=LINUX

OpenCV is now installed and the Makefile is configured. You should be able to compile and run the NMPT library (Installation).

Linux

The OpenCV libraries for Linux can be downloaded from SouceForge.net:

http://sourceforge.net/projects/opencvlibrary/

Follow the directions on this page to install for your linux platform.

By default this will install the OpenCV libraries to your /usr/local directory. Once OpenCV is installed this way, uncomment the Makefile line:

PLATFORM=LINUX

and comment out the others:

#PLATFORM=MACSVN
#PLATFORM=CYGWIN

OpenCV is now installed and the Makefile is configured. You should be able to compile and run the NMPT library (Installation).