Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

a common lisp (well, sbcl) wrapper around the opencv vision library

branch: master

Merge pull request #5 from ejbs/master

Fixes to make this build on Ubuntu 12.04
latest commit 571215d60e
Ryan Davis authored
Octocat-spinner-32 build Added code for cffi glue library.
Octocat-spinner-32 glue Added glue functions for cvCopyMakeBorder.
Octocat-spinner-32 test Added function to play video files and do move bar codes.
Octocat-spinner-32 .gitignore Added fasl files to .gitignore.
Octocat-spinner-32 LICENSE Add BSD license, list myself and jbromley (who forked and did most of…
Octocat-spinner-32 Makefile Added code for cffi glue library.
Octocat-spinner-32 Makefile.common Added code for cffi glue library.
Octocat-spinner-32 Makefile.darwin Added code for cffi glue library.
Octocat-spinner-32 Makefile.linux Added code for cffi glue library.
Octocat-spinner-32 README.md Added glue library instructions.
Octocat-spinner-32 TODO.org Updated to do list with task to switch to using fsbv.
Octocat-spinner-32 cl-opencv-test.asd Imported local cl-opencv.
Octocat-spinner-32 cl-opencv.asd Added file for image processing functions.
Octocat-spinner-32 cl-opencv.lisp Fixes to make this build on Ubuntu 12.04
Octocat-spinner-32 core.lisp Renamed cv-size struct to just size.
Octocat-spinner-32 frdiff.sh Added cvAddWeighted.
Octocat-spinner-32 highgui.lisp Removed :use :cffi.
Octocat-spinner-32 imgproc.lisp Added needed cffi: package prefixes.
Octocat-spinner-32 package.lisp Renamed cv-size struct to just size.
Octocat-spinner-32 select_platform.sh Added code for cffi glue library.
Octocat-spinner-32 test.sh Changed test.sh to run show-camera-threshold.
README.md

README: cl-opencv

Introduction

These are OpenCV bindings for SBCL. They do not promise to be complete, though eventually I hope to have fairly complete coverage of OpenCV functionality. This package depends on the cffi package and libffi. I use Quicklisp to set up my Lisp environment.

Compatibility

This package is known to work in the following configurations.

  • Mac OS 10.6, sbcl 1.0.45 (MacPorts), OpenCV 2.2 (MacPorts)
  • Ubuntu 10.10 (64-bit), sbcl 1.0.40, OpenCV 2.1

If you have gotten cl-opencv to run with some other combination of OS and software versions, please let me know.

Installation

Mac OS X

  1. Install OpenCV from MacPorts: port install opencv
  2. Install libffi from MacPorts: port install libffi
  3. In your lisp environment, make sure that cffi is available. In Quicklisp you would just do (ql:quickload "cffi").
  4. Run make and sudo make install in the top-level directory to build and install the glue code library.

Ubuntu

  1. Install OpenCV from the repos: sudo apt-get install libhighgui-dev.
  2. Install libffi from the repos: sudo apt-get install libffi
  3. In your lisp environment, make sure that cffi is available. In Quicklisp you would just do (ql:quickload "cffi").
  4. Run make and sudo make install in the top-level directory to build and install the glue code library.

Troubleshooting

Ubuntu

If CFFI has problems loading the library, be sure that:

  • your lisp and your OpenCV library are both 32 bit or both 64 bit; and
  • if you installed OpenCV to a non-standard location, you might try adding that path to cffi:*foreign-library-directories*.

Different camera support different resolutions and framerates. The tests assume a camera capable of about 30 fps at 640x480. Adjust the values at the top of test.lisp to match your camera. A program like VLC can help you determine those.

Something went wrong with that request. Please try again.