OpenCV 2 or 1

Chris Colbert sccolbert at gmail.com
Wed Nov 4 08:02:45 EST 2009


Im all for a big glaring "OpenCV >= 2.0 required if you want to use
opencv extensions"


On Wed, Nov 4, 2009 at 1:57 PM, SirVer <sirver at gmx.de> wrote:
>
> A __version__ function in the future is little help to distinguish
> between OCV 1 and OCV 2. BUT the current case is not bearable; for
> example the test suite can not be run when you have OpenCV 1
> installed, because OpenCV errors always result in a coredump because
> of their braindumped I-do-my-own-Exceptions-In-C-Which-Are-Uncatchable
> Stuff. That is, as soon as the opencv tests run, the whole python
> process is KILLED by opencv throwing an exception because I expects an
> array of 1x5 instead of 1x4. (Note that the same is true if we do
> stuff vice-versa: making version 1 a dependency and the user has 2
> installed).
>
> The only REAL solutions I see for this mess is to either
> a) decide which version to build against at build time using IFDEFs.
> Which is ugly and not easy to pull off and makes OpenCV a hard build
> time dependency. On plus we would have to ship binary versions linked
> against OCV1 and OCV2. Ugly code, Ugly distribution, hard to
> implement.
> b) Determine at run time if the user has OpenCV 1 installed and ABORT
> then in a pythonic fashion. I know of no portable way to pull this
> off; one could only check for relative positions of functions in the
> binaries or so. Nice code, nice distribution, very hard to implement.
> c) Rip the parts that we need from the OpenCV source code (if
> licensing allows that) and build our own subset of the functionality
> into scikit.image. No dependency on the OpenCV anymore, no cranky
> void* pointer passing around, no strange exceptions that are
> uncatchable. Heaven on earth. Downside: a lot of work. Upside: We
> really would provide the image processing capabilities.
>
> What do others think? Personally, I always wanted to have a better
> designed Image Library with a smaller, but well tested subset of
> ImageProcessing Algos that are really useful.
>
>
>> Goodluck with getting that done though. I doubt we will see a new
>> OpenCV release for awhile... and people will be using 2.0 for a long
>> time to come...
> No wonder; hacking OpenCV code is as ugly as coding can get.
>
> Cheers,
> Holger
>
>>
>> 2009/11/4 Stéfan van der Walt <ste... at sun.ac.za>:
>>
>>
>>
>>
>>
>> > 2009/11/4 Chris Colbert <sccolb... at gmail.com>:
>>
>> >> OpenCV has a ___version___ header file.
>>
>> > We can only access that if it exposed as a function, though, so maybe
>> > they can help us out.
>>
>> > Cheers
>> > Stéfan



More information about the scikit-image mailing list