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

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -