Code Monkey home page Code Monkey logo

cl-opencv's Introduction

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.

cl-opencv's People

Contributors

ejbs avatar jbromley avatar ryepup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cl-opencv's Issues

Requires non-ASDF stuff to build

It looks like this now requires some shell activity with a makefile to fully build cl-opencv. That means I can't build it into Quicklisp. Is there any chance of invoking the external stuff from within the ASDF system, like some other projects do?

test.sh failed with `The function CL-OPENCV-TEST::MAKE-CV-SIZE is undefined.`

Env

OS: Mac OS X 10.10.4
Common Lisp: SBCL 1.2.11
OpenCV 2.4.12(install with brew)

debugger invoked on a UNDEFINED-FUNCTION in thread
#<THREAD "main thread" RUNNING {1002D9EDF3}>:
  The function CL-OPENCV-TEST::MAKE-CV-SIZE is undefined.

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Ignore runtime option --eval "(cl-opencv-test:show-camera-threshold)".
  1: [ABORT   ] Skip rest of --eval and --load options.
  2:            Skip to toplevel READ/EVAL/PRINT loop.
  3: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

trying to get it to compile with OpenCV 2.4

I'm new to this. I've downloaded and compiled OpenCV 2.4, and the samples run.

Unable to load foreign library (CL-OPENCV-GLUE).
Error opening shared object "libcl-opencv-glue.so":
/usr/local/lib/libcl-opencv-glue.so: undefined symbol: cvAbsDiffS.
[Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]

there is no cvAbsDiffS in the c or the h files in the glue directory.

any hints?

I plan to add a lot of functions. I plan to get a TLD tracker going from within Lisp.\

Thanks
Michael [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.