(self, image)
return thimg
Applies a threshold to an image and returns the thresholded
		image
		
		arguments
		image			--	the image that should be thresholded, a
						pygame.surface.Surface instance
		
		returns
		thresholded		--	the thresholded image,
						a pygame.surface.Surface instance
Applies a threshold to an image and returns the thresholded
		image
		
		arguments
		image			--	the image that should be thresholded, a
						pygame.surface.Surface instance
		
		returns
		thresholded		--	the thresholded image,
						a pygame.surface.Surface instance
Applies a threshold to an image and returns the thresholded image arguments image -- the image that should be thresholded a pygame . surface . Surface instance returns thresholded -- the thresholded image a pygame . surface . Surface instance
def threshold_image(self, image):
		
		"""Applies a threshold to an image and returns the thresholded
		image
		
		arguments
		image			--	the image that should be thresholded, a
						pygame.surface.Surface instance
		
		returns
		thresholded		--	the thresholded image,
						a pygame.surface.Surface instance
		"""
		
		# surface to apply threshold to surface
		thimg = pygame.surface.Surface(self.get_size(), 0, image)
		
		# perform thresholding
		th = (self.settings['threshold'],self.settings['threshold'],self.settings['threshold'])
		pygame.transform.threshold(thimg, image, self.settings['pupilcol'], th, self.settings['nonthresholdcol'], 1)
		
		return thimg
def threshold_image ( self , image ) : # surface to apply threshold to surface thimg = pygame . surface . Surface ( self . get_size ( ) , 0 , image ) # perform thresholding th = ( self . settings [ 'threshold' ] , self . settings [ 'threshold' ] , self . settings [ 'threshold' ] ) pygame . transform . threshold ( thimg , image , self . settings [ 'pupilcol' ] , th , self . settings [ 'nonthresholdcol' ] , 1 ) return thimg