Giter VIP home page Giter VIP logo

libcvc's Introduction

LibCVC

An experimental pure-C binding to OpenCV 4. Intended to be used with libffi. Incomplete. Pre-alpha quality.

License: MIT.

Building

  1. Install OpenCV v 4.0.1 or later
  2. Checkout the repositiry
  3. Build libcvc.so:
$ mkdir build && cd build
$ cmake ..
$ make
  1. Rename it to libcvc.so.0.1 (yes, I know, but this is not important at this point).
  2. Either copy libcvc.so.0.1 to /usr/local/lib64 or export LD_LIBRARY_PATH=$(pwd):$LD_LIBRARY_PATH.

An anticipatory FAQ

Why this binding is necessary?

Since the OpenCV 4.0 release, the official C API had been completely stripped off the project. As a result, developers working with all those scripting languages out there lost access to OpenCV.

OpenCV has got official Python and Java bindings, wasn't that enough?

There is also PyPy, and IronPython, and Ruby (with its variants), Tcl, Lua, Common Lisp and many others -- none of them has access to OpenCV via the official bindings.

Why pure C?

Because it is the only practical way of making libraries callable via libffi.

Why libffi?

Libffi is a de-facto standard and is available in virtually all scripting languages.

But most of the scripting lagnuages support C++ extensions (like RCpp). So, why C/libffi?

These C++ extensions are invariably implementation-specific, not language-specific. One cannot just take a CPython extension and use it with IronPython, for example. The same applies to Common Lisp and many other languages. libffi closes this gap by allowing developers to do exactly that: share extension libraries between implementations.

How complete is LibCVC?

It is very far from being complete. It might be considered somewhat usable at this point, depending on the task at hand.

However -- 100% completeness in terms of API coverage is not a goal. The reason is that OpenCV API contains numerous C++ specific artifacts that make no sense in other languages. Therefore, the goal is to achieve semantic completeness instead. For example, among all variadic OpenCV functions or methods solving the same problem, usually only the most specific one is wrapped.

Which languages/projects use LibCVC?

There is a Common Lisp wrapper - https://github.com/mikeivanov/see

Other Projects

There is yet another project that includes pure C bindings to OpenCV -- GoCV. Although a couple of technical ideas were borrowed from GoCV, it is a completely separate effort with different goals.

libcvc's People

Contributors

mikeivanov avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.