Skip to content

Compilation instructions (OS X)

Edward Vielmetti edited this page Mar 21, 2015 · 13 revisions

Instructions for compiling on OS X, tested on OS X 10.9.5 (Mavericks).

(Details to follow; see https://github.com/openalpr/openalpr/issues/92 for a narrative.)

Install dependencies

Using Homebrew:

brew install tesseract

brew install cmake

brew tap homebrew/science

brew install opencv

brew install log4cplus

Build the package

# Clone the latest code from GitHub
git clone https://github.com/openalpr/openalpr.git

# Setup the build directory
cd openalpr/src
mkdir build
cd build

# setup the compile environment
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc ..

# compile the library
make

# Install the binaries/libraries to your local system (prefix is /usr)
sudo make install

# Test the library
wget http://easy-clan.com/ski/pics/license_plate.JPG -O lp.jpg
alpr lp.jpg