(self, camnr=0, mode=u'RGB', **kwargs)
Use this function to implement the initialisation of a specific
		type of eye tracking.
		
		camnr			-	Integer that indicates what webcam should be
						used. Default = 0.
		
		mode			-	String that indicates how the captured frame
						should be processed before it's returned.
						'R' returns the red component of the frame,
						'G' returns the green component of the frame,
						'B' returns the blue component of the frame,
						'RGB' returns the greyscale version of the
						frame (converted by OpenCV). Default = 'RGB'.
Use this function to implement the initialisation of a specific
		type of eye tracking.
		
		camnr			-	Integer that indicates what webcam should be
						used. Default = 0.
		
		mode			-	String that indicates how the captured frame
						should be processed before it's returned.
						'R' returns the red component of the frame,
						'G' returns the green component of the frame,
						'B' returns the blue component of the frame,
						'RGB' returns the greyscale version of the
						frame (converted by OpenCV). Default = 'RGB'.
Use this function to implement the initialisation of a specific type of eye tracking . camnr - Integer that indicates what webcam should be used . Default = 0 . mode - String that indicates how the captured frame should be processed before it s returned . R returns the red component of the frame G returns the green component of the frame B returns the blue component of the frame RGB returns the greyscale version of the frame ( converted by OpenCV ) . Default = RGB .
def connect(self, camnr=0, mode=u'RGB', **kwargs):
		
		"""Use this function to implement the initialisation of a specific
		type of eye tracking.
		
		camnr			-	Integer that indicates what webcam should be
						used. Default = 0.
		
		mode			-	String that indicates how the captured frame
						should be processed before it's returned.
						'R' returns the red component of the frame,
						'G' returns the green component of the frame,
						'B' returns the blue component of the frame,
						'RGB' returns the greyscale version of the
						frame (converted by OpenCV). Default = 'RGB'.
		"""
		
		# Only initialise if it hasn't been done yet.
		if not self._connected:
			
			# Set mode and camera number
			self._camnr = camnr
			self._mode = mode

			# DEBUG message.
			_message(u'debug', u'webcam.WebCamTracker.connect', \
				u"Connecting to webcam %d." % (self._camnr))
		
			# Initialise the webcam.
			self._vidcap = cv2.VideoCapture(self._camnr)
			self._connected = True

			# DEBUG message.
			_message(u'debug', u'webcam.WebCamTracker.connect', \
				u"Successfully connected to webcam %d!" % (self._camnr))
def connect ( self , camnr = 0 , mode = u'RGB' , * * kwargs ) : # Only initialise if it hasn't been done yet. if not self . _connected : # Set mode and camera number self . _camnr = camnr self . _mode = mode # DEBUG message. _message ( u'debug' , u'webcam.WebCamTracker.connect' , u"Connecting to webcam %d." % ( self . _camnr ) ) # Initialise the webcam. self . _vidcap = cv2 . VideoCapture ( self . _camnr ) self . _connected = True # DEBUG message. _message ( u'debug' , u'webcam.WebCamTracker.connect' , u"Successfully connected to webcam %d!" % ( self . _camnr ) )