Threading within a GUI and OpenCV

2013-04-03 Thread Sam Berry
Hey, I'm fairly new to python, and have had no experience with threading. Iv made a small GUI App using the kivy module and OpenCV, i have currently got a button that when pressed runs a function that records from my webcam for 20 seconds. However i have two other buttons, that when pressed i

Re: Python class and variable issue(newby question!)

2013-03-29 Thread Sam Berry
Thanks for the responses! My issue was sorted with Benjamins post, just printing s worked. Cheers for the info though Chris, if i have any further issues il post them with some working code. Sam -- http://mail.python.org/mailman/listinfo/python-list

Python class and variable issue(newby question!)

2013-03-29 Thread Sam Berry
Hey, Im new to object orientated programming and have an issue with using classes. Im using the kivy module, a GUI creator , so posting the actual code may confuse. But an example of what im trying to achieve is below class test() s = 1 def test1() global s s = 2

Re: Recording live video stream from IP camera issue

2013-02-18 Thread Sam Berry
Thanks for the advice! I looked into it, seems using windows was an issue, switched to ubuntu and it worked! Just wondering if you have used opencv for recording purposes? Or if you know of any python documentation for opencv2? Information is hard to come by! Thanks again, Sam -- http://mail

Re: Recording live video stream from IP camera issue

2013-02-17 Thread Sam Berry
Hi Xav, Iv been looking into OpenCV, i can easily stream my laptops webcam using this code. import cv2 cv2.namedWindow("preview") vc = cv2.VideoCapture(0) if vc.isOpened(): # try to get the first frame rval, frame = vc.read() else: rval = False while rval: cv2.imshow("preview", f

OpenCV and WIFI IP Camera Issue

2013-02-14 Thread Sam Berry
Hey, Iv installed OpenCV on my windows machine. I can successfully view the camera stream from my laptop so the installation was successful. However when i edited the code adding in the address of my IP camera like so import cv2 cv2.namedWindow("preview") vc = cv2.VideoCapture('http://192

Re: Recording live video stream from IP camera issue

2013-02-06 Thread Sam Berry
Hi, This is for a university project. My issue is that i have built an App using pythons Kivy module, and i need to be able to stream and record from an IP camera upon request. I have just used the VLC.exe to stream the video feed. But it is the recording i am having problems with. I'l look

Re: Recording live video stream from IP camera issue

2013-02-06 Thread Sam Berry
Thank you for the quick reply! I found this code just from multiple google searches, but yer it mentioned online video streaming, however my IP camera would be streaming in Mjpeg format (I thought been able to convert between the two formats seemed way to easy!) So i'm guessing its just 20mb of

Recording live video stream from IP camera issue

2013-02-06 Thread Sam Berry
Hey, I have no vast knowledge of python, but i came across this code to capture video from my IP camera import urllib2 import time import logging print "Recording video..." response = urllib2.urlopen("IP Address") filename = time.strftime("%Y%m%d%H%M%S",time.localtime())+".avi" f = open(filenam