OpenCV 2 or 1

Chris Colbert sccolbert at gmail.com
Wed Nov 4 04:24:27 EST 2009


And the problem with linking header files is that it makes  OpenCV a
dependency.

This brings a couple problems:
1) The user has to install OpenCV. Until 2.0 is in the repos, this is
much to ask of a new user, who could use everything else meantime.
2) We have to find the header files on the users machine, or provide a
way for them to provide it.

For no REAL benefit.

If the opencv API changes, you claim that linking the headers will
allow us to fix these crashing problems. I disagree.
In Cython when you do a:
cdef extern from "whatever.h":
       void cvFunc(IplImage*, IplImage*, CvPoint2D32F*)


That is only for Cythons benefit. It just puts an #include directive
in the foo.c file.
So in the case of this most recent test failing, the error would NEVER
be caught, neither by the C compiler or Cython.

Because neither have a way of knowing how big CvPoint2D32F* array should be.

Now lets say that OpenCV 2.1 comes out, and they change the api for
cvFunc, and we dont realize it. Let's say the new signature becomes:
void cvFunc(IplImage*, IplImage*, IplImage*). Because of how cython
works, the cython module will still compile (it doesnt ever look in
the .c headers). However, the error will likely be caught by GCC.

So now what you have, (if we make the headers a dependency), is
someone who cant install the scikit AT ALL, rather than just a part of
a scikit with some tests that will fail...

This is the entire reason to have a testing framework.


I though about this one for a while. and I vehemently oppose linking
to the cv headers.

Cheers,

Chris

On Wed, Nov 4, 2009 at 10:11 AM, Ralf Gommers
<ralf.gommers at googlemail.com> wrote:
>
>
> 2009/11/4 Stéfan van der Walt <stefan at sun.ac.za>
>>
>> > Another point: generated c files in the repository are constantly
>> > comming up as changed or merge conflicts for me. What is the reason to
>> > keep .c files in the repository; i think it is fair to assume that
>> > python developers who have a c compiler installed will also have
>> > cython installed to generate the .c files.
>>
>> This has been a constant source of annoyance, so I wonder whether we
>> shouldn't just stop tracking the C files.  We could always still
>> include C files in the source distribution.
>
>
> Diffs are also hard to read with C file changes, so +1 for this.
>
> I just discovered that Cython is one of the few non-pure-python packages
> that actually easy-installs on my machine, so it looks like a very
> light-weight dependency.
>
> Cheers,
> Ralf
>
>



More information about the scikit-image mailing list