Help using IP camera with simplecv

asked 2014-06-17 20:59:51 -0500

microbox gravatar image

Hi there, I'm new to simplecv and I'm trying to get a video display from an IP address (http://192.168.1.100:51042/) works okay when just using the browser but when trying it with simplecv I'm having errors and this code is what I'm using..

from SimpleCV import *
import time
# initializes the IP Camera
cam = JpegStreamCamera('http://192.168.1.100:51042/')
display = Display()
img = cam.getImage()
while not display.isDone():
    img = cam.getImage()
    time.sleep(1)

The following is the error I'm getting.

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 551, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\site-packages\SimpleCV\Camera.py", line 805, in run
    (multipart, boundary) = headers['Content-type'].split("boundary=")
ValueError: need more than 1 value to unpack

Warning (from warnings module):
  File "C:\Python27\lib\site-packages\SimpleCV\Camera.py", line 899
    warnings.warn("Timeout fetching JpegStream at " + self.url)
UserWarning: Timeout fetching JpegStream at http://192.168.1.100:51042/

can anyone guide me to solve this issue I'm having?

Thanks in advance.

edit retag flag offensive close merge delete

Comments

Does this also happen when you just get one image from the camera? I running just these three lines in the shell: http://simplecv.org/docs/SimpleCV.html#i/SimpleCV.Camera.JpegStreamCamera/getImage</p<>>

kendallv gravatar imagekendallv ( 2014-06-19 11:19:33 -0500 )edit