Am 26.01.2016 um 16:49 schrieb Gene Heskett:
> On Tuesday 26 January 2016 06:44:48 Fox Mulder wrote:
> 
>> Am 26.01.2016 um 08:16 schrieb Gene Heskett:
>>>> All the cool kids are using OpenCV
>>>> http://opencv.org/
>>>
>>> Yee gawds, the git clone is north of 400 MiB!
>>> Nevertheless, it has been built and installed according to the web
>>> page directions, and I have scanned thru all the tuts, but haven't
>>> found any tuts on integrating it with LCNC. And 98% of the tuts
>>> discuss fixed still images. Not moving video which this LCNC
>>> scenario is. I have executed the 3 files it installed in
>>> /usr/local/bin, getting the help screens, none of which mention a
>>> v4l2 video source.
>>
>> Just a few days ago i needed a little program which could overlay a
>> grid over my cheap usb microscope camera. Because i couldn't find any
>> simple program i tried opencv for that purpose.
>>
>> And to be honest it is quite simple to do. Therefor i cloned the
>> latest opencv 3.1.0 git repo and compiled it to use the newly python3
>> bindings. It works nicely with v4l2 camera devices (like my usb
>> camera) and can process the video.
>>
>> But first i had to realize that opencv works with video like with all
>> other normal picture formats. It gets one frame, processes it and
>> shows the result. Than in a loop it goes to the next frame and so on.
>> So the resulting framerate depends on the processing power of the cpu.
>>
>> My simple test Script for Python 3.x is available at pastebin
>> (http://pastebin.com/jfnpDs72) which should work with most usb
>> cameras.
>>
> I got the script, installed some python3, but it dies on the import cv2 
> line.  The only cv2 is cv2.so in the 2.7 chain.
> 
> /usr/local/lib/python2.7/dist-packages/cv2.so
> 
> And I cannot find a python3 equivalent. So what package is it in?  Or is 
> it something that could be handled by python-six? But it claims to be 
> the python2 interface.
> 
> So I need some guidance.
> 
> Thanks Rainer.

Python3 bindings only exist in latest opencv 3.x version. Therefor i had
to compile the git version myself because the repository only had opencv
2.x available. For Python3 support you have to install the python3-dev
package before compiling opencv.

But the simpler solution is to use python2 with opencv like i mentioned
in my last email. It gives the same functionality and should also work
with my example. I tested it and the example script needs no changes to
work with python2 out of the box with opencv 3.x.

I haven't installed opencv 2.4 from the repository to try this version
but i think the python API hasn't changed since then.

Ciao,
     Rainer


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to