opencv2 import problem with python

Rainer Hurling rhurlin at gwdg.de
Mon Jun 30 10:43:22 UTC 2014


Am 30.06.2014 11:02 (UTC+1) schrieb Jason E. Hale:
> On Mon, Jun 30, 2014 at 2:24 AM, Rainer Hurling <rhurlin at gwdg.de> wrote:
>> Am 29.06.2014 19:50 (UTC+1) schrieb Jason E. Hale:
>> math/saga is a GIS application, which uses OpenCV in one of its modules.
>> For some month now, SAGA GIS disables this module at start time of the
>> program.
>>
>> I tried your patch for graphics/opencv, but nothing changed for me. It
>> seems, the opencv libs continue to be non usable.
>>
> The patch was for py-opencv only, so I'm not sure it would apply to
> saga.  I'll take a look at it though.

Ahh, ok. So I completely misunderstood, sorry.

Because of this thread, I had another look at my port math/saga. And it
came out, that I used LDFLAGS in a wrong context (graphics/opencv-core
instead of graphics/opencv). So my problem with SAGA GIS and OpenCV
should be solved.

I will file a PR for this. Sorry for the noise.

Regards,
Rainer Hurling

> 
>>> Note: you need to import numpy before cv2.
>>
>> Does this mean, we have to rebuild and reinstall math/py-numpy before
>> installing graphics/opencv? Do we have to also reinstall
>> graphics/opencv-core?
> 
> This would only apply to py-opencv, so that is the only port that
> would have to be rebuilt.  Sorry if that was unclear.  I meant that
> numpy should be imported at the python prompt before the opencv
> module.
> $python
>>>> import numpy
>>>> import cv2


More information about the freebsd-ports mailing list