Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Python opencv missing 'highgui'
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Melsion
n00b
n00b


Joined: 01 Nov 2007
Posts: 32

PostPosted: Sat Oct 27, 2012 1:33 pm    Post subject: Python opencv missing 'highgui' Reply with quote

Hi everybody,

I'm learning python with a little project I have, I'm building a small cctv program with Gtk and opencv that fetches snapshots from two ip cameras and shows them in a window and also stores them in a AVI file. I got the Gtk part working quite easily... but I'm going crazy importing the opencv library (which should be the easiest part):

Code:

#!/usr/bin/python

import cv

writer = cv.CreateVideoWriter("test1.avi", cv.CV_FOURCC('X','V','I','D'), 1, (640,480), True)

for counter in range(100):
   print counter
   img = cv.cvLoadImage('cam1_tmp.jpg', 1)
   cv.cvWriteFrame(writer, img)

cv.cvReleaseVideoWriter(writer)


And it says: AttributeError: 'module' object has no attribute 'cvLoadImage'

It just doesn't find the cvLoadImage, cvWriteFrame and cvReleaseVideoWriter functions. I've read they are in the "highgui" library (part of opencv), but I haven't found a way to import it (and I've tried it).

Any ideas? Thanks in advance!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum