Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I'm planning to release an updated C# interface to OpenCV 2.4.6 through NuGet over the next couple of days. These bindings were developed over the course of a year and include many features that I've missed from other attempts, namely:

  • Very close to 100% support of the latest C API (including undocumented functions)
  • Full documentation for all supported methods, classes and enum members (arduously mined from many different sources)
  • Support for exceptions
  • Garbage-collector friendly:
    • GC is aware of the actual memory used by matrices and images
    • Pointers are guaranteed to survive function calls even if concurrent garbage collection happens
  • Object model following C++ API as much as possible (towards future increased support of C++ API)
  • BSD-style license (MIT)

I was very surprised by the decision to drop the C API, since it is still the easiest way for interoping with many high-level languages. I guess I could move my wrapper to use C++/CLI to get over this but I would then be limited to Windows-only support.

I'm very interested to follow up on efforts to do automatic generation of the C-interface. In fact, I may be even interested to contribute to it actively and push for an official C# wrapper built on top of it, if someone points me to how this was done for the other language bindings.

I was planning on doing this for my own C# interface anyway but if no one is currently working on it, I'm happy to hand you over the results.

I'll post here when I pre-release the CTP in NuGet if anyone wants to give it a try and help with the bug-hunt (although the unit test code base is growing). I'm versioning the bindings independently of OpenCV for now since the code was hand-written and it may be subject to independent changes. First pre-release will most likely be 2.5-ctp.

I'm planning to release an updated C# interface to OpenCV 2.4.6 through NuGet over the next couple of days. These bindings were developed over the course of a year and include many features that I've missed from other attempts, namely:

  • Very close to 100% support of the latest C API (including undocumented functions)
  • Full documentation documentation/intellisense for all supported methods, classes and enum members (arduously mined from many different sources)
  • Support for exceptions
  • Garbage-collector friendly:
    • GC is aware of the actual memory used by matrices and images
    • Pointers are guaranteed to survive function calls even if concurrent garbage collection happens
  • Object model following C++ API as much as possible (towards future increased support of C++ API)
  • BSD-style license (MIT)

I was very surprised by the decision to drop the C API, since it is still the easiest way for interoping with many high-level languages. I guess I could move my wrapper to use C++/CLI to get over this but I would then be limited to Windows-only support.

I'm very interested to follow up on efforts to do automatic generation of the C-interface. In fact, I may be even interested to contribute to it actively and push for an official C# wrapper built on top of it, if someone points me to how this was done for the other language bindings.

I was planning on doing this for my own C# interface anyway but if no one is currently working on it, I'm happy to hand you over the results.

I'll post here when I pre-release the CTP in NuGet if anyone wants to give it a try and help with the bug-hunt (although the unit test code base is growing). I'm versioning the bindings independently of OpenCV for now since the code was hand-written and it may be subject to independent changes. First pre-release will most likely be 2.5-ctp.

I'm planning to release an updated C# interface to OpenCV 2.4.6 through NuGet over the next couple of days. These bindings were developed over the course of a year and include many features that I've missed from other attempts, namely:

  • Very close to 100% support of the latest C API (including undocumented functions)
  • Full documentation/intellisense for all supported methods, classes and enum members (arduously mined from many different sources)
  • Support for exceptions
  • Garbage-collector friendly:
    • GC is aware of the actual memory used by matrices and images
    • Pointers are guaranteed to survive function calls even if concurrent garbage collection happens
  • Object model following C++ API as much as possible (towards future increased support of C++ API)
  • BSD-style license (MIT)

I was very surprised by the decision to drop the C API, since it is still the easiest way for interoping with many high-level languages. I guess I could move my wrapper to use C++/CLI to get over this but I would then be limited to Windows-only support.

I'm very interested to follow up on efforts to do automatic generation of the C-interface. In fact, I may be even interested to contribute to it actively and push for an official C# wrapper built on top of it, if someone points me to how this was done for the other language bindings.

I was planning on doing this for my own C# interface anyway but if no one is currently working on it, I'm happy to hand you over the results.

I'll post here when I pre-release the CTP in NuGet if anyone wants to give it a try and help with the bug-hunt (although the unit test code base is growing). I'm versioning the bindings independently of OpenCV for now since the code was hand-written and it may be subject to independent changes. First pre-release will most likely be 2.5-ctp.

UPDATE: Just pushed a prerelease version of the wrapper on NuGet. Feel free to give it a try, will write a proper post when it's further along in testing.