Tutorial: video with OpenCV, JavaCV, RLPark and Zephyr

This tutorial is about using video processing with RLPark and Zephyr.

Running the demo in Zephyr

  1. Download Zephyr application
  2. Install RLPark plugins, including the demos, in Zephyr application
  3. Install opencv binaries
  4. Add the path to opencv binaries to the dynamic library loading path when required.
    For Mac OS X:
    • Binaries for Mac OS X are available at this address:videobinaries.tar.bz2
    • Uncompress in the folder of your choice: for example in /usr/local
    • Add the path to the library binaries to . One way is to add it to ~/.MacOSX/environment.plist The content of the file could be:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
      <plist version="1.0">
      <dict>
      	<key>MANPATH</key>
      	<string>/usr/local/man:/usr/share/man:/usr/local/share/man:/usr/X11/man:/usr/local/git/man</string>
      	<key>PATH</key>
      	<string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin</string>
      	<key>DYLD_LIBRARY_PATH</key>
      	<string>/usr/local/xuggler/lib:/usr/local/opencv-2.3.0/lib</string>
      </dict>
      </plist>
      
    • Log out and log in for the changes to take effect
  5. Start Zephyr with RLPark plugins installed
  6. Start the demo by going to: Demos->Motion Detection

Use an Eclipse project

  1. Download the project rlpark.example.javacv.tar.gz
  2. Import the project in Eclipse by going to: File->Import... then Existing Project into Workspace then select the project rlpark.example.javacv.tar.gz and follow Eclipse instructions
  3. Follow the instructions in Running Zephyr with your client from Using Zephyr Plugins tutorial. Note that Autostart is false by default. So, you need to add the id rlpark.example.javacv.motiondetectionrunnable to the program arguments of your Run Configuration.
  4. Once the example runs, check the code starting from the main class: MotionDetectionRunnable.java


Documentation