#NEWLINE# def _process( self , frame ) : #NEWLINE# #INDENT# if ( ( self . _previous_frame is None ) or ( self . _previous_frame . shape != frame . shape ) ) : #NEWLINE# #INDENT# self . _maximum_delta = self . _average_delta = 0.0 #NEWLINE# self . _previous_frame = frame #NEWLINE# return #NEWLINE# #UNINDENT# self . _maximum_delta = N . max ( N . abs ( ( frame - self . _previous_frame ) ) ) #NEWLINE# self . _average_delta = N . mean ( ( frame - self . _previous_frame ) ) #NEWLINE# self . _previous_frame = frame