Installation Guide for Mac

With just 5 steps, you’ll get a perfect environment in your Mac for OpenPool Effect development.

Below shows how to set up all necessary tools to create your own effects.
It might look like a long article since we put many screenshots for easier understanding, but it’ll only take about 30 min to complete.

Are you ready? Let’s begin!

(Tested under MacOS X 10.8.3 Mountain Lion)

STEP1. Install Processing

The key to OpenPool is Processing. So let’s install it first.
Download Processing from:
http://www.processing.org/

processing-download

 

Download Processing 1.5.1 for Mac OS X, which is located in the Stable Releases section.
(Important Notice:  Don’t download ver2.0. At this time, OpenPool is NOT compatible with Processing ver2.0)

processing-1.5-install

Then unzip the downloaded file, and move Processing(.app) file into Applications folder.

processing3

That’s it! Easy, eh?


STEP2. Install OpenCV

Next, let’s install OpenCV, Open Source Computer Vision Library, which is an open-srouce library aimed at real-time computer vision.

First, you’ll need wget, cmake and make commands to install OpenCV.
If you don’t think you already installed these commands, click to open the folded sections below.

Install make

Open a terminal window, and type:

If you see a message like below, you can skip this section.

However, if you see a message like this;

You need to install Xcode Command Line Tools in order to use the make command. Go to https://developer.apple.com/downloads/index.action and download it.
(You’ll need to login with Apple ID. You already have it if you have iPhone or iPad. It’s the one you use when you download apps.)

Note: Please make sure the file you are downloading is correct: It’s different between Mountain Lion and  Lion)
mac-xcode-cltool

After installation is done, you’ll be able to use the make command”.
※You can install Xcode itself of course, but it’s a huge file to download, so we recommend you to install Commanld Line Tools instead. It actually works as long as you play with OpenPool.

Install wget and cmake

Open a terminal window, and type:

And if you see:

then you’ll need to install wget. (You may need to check out in the same way for cmake.)

We will use homebrew to install wget and cmake. If you don’t have homebrew in your Mac, just paste and this line on Terminal.

After installing homebrew, you can install wget and cmake with:

So, let’s install OpenCV 32bit. Open a terminal window, and cd to some directory and;

When you “make -j4”, it’ll take a bit long time and your Mac may get very heated and fans may go crazy, but just wait until it’s done.
You can go complete STEP3 and STEP4 while you are waiting. But don’t forget the last line, sudo make install.
※By the way, you may want to install OpenCV with homebrew. But it’s problematic at this time. See: https://github.com/mxcl/homebrew/issues/18139


STEP3. Install OpenNI

We need OpenNI to use Kinect.
Let’s download these two files: SimpleOpenNI-0.27.zip and OpenNI_NITE_Installer-OSX-0.24.zip.
http://code.google.com/p/simple-openni/downloads/list

mac-simpleopenni-installer

Firstly, unzip the latter file and cd to the extracted OpenNI_NITE_Installer-OSX directory on Terminal, like:

Then, do this:

Next, unzip the former  file and move the extracted SimpleOpenNI folder into:
/Users/(your Mac username)/Documents/Processing/libraries/SimpleOpenNI
(You might need to create new folders named Processing and libraries by yourself.)

Very good! You got OpenNI ready now.

※Make sure you are moving NOT SimpleOpenNI-0.24 folder, but SimpleOpenNI folder which is inside it.
Processing folder must be locate in Documents
folder.
※The same instuction is described here too: 
http://code.google.com/p/simple-openni/wiki/Installation#OSX


STEP4. Install OpenPool

Finally, let’s install OpenPool.
http://www.openpool.cc/wp-content/uploads/OpenPoolCore.zip

Unzip the file, and move the extracted folder to:
/Users/(you Mac username)/Documents/Processing/libraries/OpenPoolCore/

Easy!


STEP5. Run Sample Effect

You did it! Everything’s all set. Now, let’ run the sample effect!

The sample file is located here:
(OpenPool directory)/examples/OpenPoolExampleImageOnBall/OpenPoolExampleImageOnBall.pde

After Processing window appeares, press the Play button.
mac-sample-run

Hooray!!
mac-sample

The effect is working with a recorded video, which is in the data folder next to OpenPoolExampleImageOnBall.pde.

Let’s change the image with this line:

The image is also located in the data folder.

Enjoy!