(self, device=None, camres=(640,480))
Initializes a CamEyeTracker instance
		
		arguments
		None
		
		keyword arguments
		device		--	a string or an integer, indicating either
						device name (e.g. '/dev/video0'), or a
						device number (e.g. 0); None can be passed
						too, in this case Setup will autodetect a
						useable device (default = None)
		camres		--	the resolution of the webcam, e.g.
						(640,480) (default = (640,480))
Initializes a CamEyeTracker instance
		
		arguments
		None
		
		keyword arguments
		device		--	a string or an integer, indicating either
						device name (e.g. '/dev/video0'), or a
						device number (e.g. 0); None can be passed
						too, in this case Setup will autodetect a
						useable device (default = None)
		camres		--	the resolution of the webcam, e.g.
						(640,480) (default = (640,480))
Initializes a CamEyeTracker instance arguments None keyword arguments device -- a string or an integer indicating either device name ( e . g . / dev / video0 ) or a device number ( e . g . 0 ) ; None can be passed too in this case Setup will autodetect a useable device ( default = None ) camres -- the resolution of the webcam e . g . ( 640 480 ) ( default = ( 640 480 ))
def __init__(self, device=None, camres=(640,480)):
		
		"""Initializes a CamEyeTracker instance
		
		arguments
		None
		
		keyword arguments
		device		--	a string or an integer, indicating either
						device name (e.g. '/dev/video0'), or a
						device number (e.g. 0); None can be passed
						too, in this case Setup will autodetect a
						useable device (default = None)
		camres		--	the resolution of the webcam, e.g.
						(640,480) (default = (640,480))
		"""

		global vcAvailable
		if vcAvailable == False:
			# select a device if none was selected
			if device == None:
				available = available_devices()
				if available == []:
					raise Exception("Error in camtracker.CamEyeTracker.__init__: no available camera devices found (did you forget to plug it in?)")
				else:
					device = available[0]
			
			# start the webcam
			self.cam = pygame.camera.Camera(device, camres, 'RGB')
			self.cam.start()
		else:
			self.cam = VideoCapture.Device()
			
		# get the webcam resolution (get_size not available on all systems)
		try:
			self.camres = self.cam.get_size()
		except:
			self.camres = camres

		# default settings
		self.settings = {'pupilcol':(0,0,0), \
					'threshold':100, \
					'nonthresholdcol':(100,100,255,255), \
					'pupilpos':(-1,-1), \
					'pupilrect':pygame.Rect(self.camres[0]/2-50,self.camres[1]/2-25,100,50), \
					'pupilbounds': [0,0,0,0], \
					'':None					
					}
def __init__ ( self , device = None , camres = ( 640 , 480 ) ) : global vcAvailable if vcAvailable == False : # select a device if none was selected if device == None : available = available_devices ( ) if available == [ ] : raise Exception ( "Error in camtracker.CamEyeTracker.__init__: no available camera devices found (did you forget to plug it in?)" ) else : device = available [ 0 ] # start the webcam self . cam = pygame . camera . Camera ( device , camres , 'RGB' ) self . cam . start ( ) else : self . cam = VideoCapture . Device ( ) # get the webcam resolution (get_size not available on all systems) try : self . camres = self . cam . get_size ( ) except : self . camres = camres # default settings self . settings = { 'pupilcol' : ( 0 , 0 , 0 ) , 'threshold' : 100 , 'nonthresholdcol' : ( 100 , 100 , 255 , 255 ) , 'pupilpos' : ( - 1 , - 1 ) , 'pupilrect' : pygame . Rect ( self . camres [ 0 ] / 2 - 50 , self . camres [ 1 ] / 2 - 25 , 100 , 50 ) , 'pupilbounds' : [ 0 , 0 , 0 , 0 ] , '' : None }