Connent to ip camera with opencv python -


i try code

class ipcamera(object):      def __init__(self, url='http://192.168.1.2/', user=none, password=none):         self.url = url         auth_encoded = base64.encodestring('%s:%s' % (user, password))[:-1]          self.req = urllib2.request(self.url)         self.req.add_header('authorization', 'basic %s' % auth_encoded)      def get_frame(self):         response = urllib2.urlopen(self.req)         img_array = np.asarray(bytearray(response.read()), dtype=np.uint8)         frame = cv2.imdecode(img_array, 1)         return frame 

i error

httperror: http error 401: unauthorized


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -