WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Discussion on exposing the C++ API #32

@cassandracomar

Description

@cassandracomar

I've been using this library on and off for the last year and a half or so, and sadly never contributed anything back. I'm hoping to change that now.

For the longest time, I've been wanting access to the C++ portions of the OpenCV API, and never done more than create a couple wrappers to make them available within my own (toy) applications. The reason is quite simple -- C++ <--> Haskell is an open and difficult problem. The easiest approach is incredibly tedious and error prone, and better solutions have never really manifested. I'm going to try and tackle this problem.

I see two major approaches to this problem from the research I've been doing. The first is to take on the difficult task of creating a C API that wraps the portions of the C++ API we need. If I did this, I'd probably do it as its own library so that other people/languages could make use of that API. The upsides to this approach are the lack of extra dependencies, and it's relatively fast compared to the other approaches I'm considering. The downsides are that this is strictly unsupported by the OpenCV community (after all, they elected to move away from C, and have basically stopped supporting it), and as a result, this approach is brittle and will require potentially major revisions with every update to OpenCV.

The other approach is to use something like MissingPy to instead expose the Python API. The upside here is that the data structures map more nicely into Haskell and the Python API already exists -- there's no need to create an entirely new API, we can just map to the one provided to us. The downside is of course that those API calls have to be routed through a Python interpreter, and are therefore inherently slower.

So what do the people who actually use/develop CV think? I'm very torn on the issue and am willing to take it in either direction.

Also, what portions of the API would be most useful to you? Personally I'd like to be able to use the feature detectors/descriptors, the machine learning libraries, and the OpenCL module, so those are the features I'll work on first.

EDIT: And if this is the wrong way to have this discussion, feel free to close this and direct me to a more appropriate venue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions