OpenCV 2 or 1

Ralf Gommers ralf.gommers at googlemail.com
Wed Nov 4 10:28:06 EST 2009


2009/11/4 Stéfan van der Walt <stefan at sun.ac.za>

>
> 2009/11/4 Chris Colbert <sccolbert at gmail.com>:
> >
> > Im all for a big glaring "OpenCV >= 2.0 required if you want to use
> > opencv extensions"
>
> This does look like the most painless way forward.  Chris, would you
> mind putting up a big notice in the OpenCV docs?
>
>
A notice is good but does not really solve the issue right? If you need to
have 1.x on your computer for whatever reason, you get crashes anyway when
running the tests.

I like Holger's option b:

> 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.

Not sure if this works, but could you use multiprocess to import opencv and
run a function known to fail in 1.x in a separate process. Then if it works,
write something to a file, and read that file. If you avoid any shared
objects this may work.

Alternatively, locate the opencv header somehow, and parse it.

Cheers,
Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20091104/2a105d00/attachment.html>


More information about the scikit-image mailing list