public void initialize ( PyramidDiscrete < I > image ) { if ( previousDerivX == null || previousDerivX . length != image . getNumLayers ( ) || previousImage . getInputWidth ( ) != image . getInputWidth ( ) || previousImage . getInputHeight ( ) != image . getInputHeight ( ) ) { declareDataStructures ( image ) ; } for ( int i = 0 ; i < image . getNumLayers ( ) ; i ++ ) { gradient . process ( image . getLayer ( i ) , previousDerivX [ i ] , previousDerivY [ i ] ) ; } previousImage . setTo ( image ) ; }
Call for the first image being tracked