private void declarePyramid ( int imageWidth , int imageHeight ) { int minSize = ( config . trackerFeatureRadius * 2 + 1 ) * 5 ; int scales [ ] = TldTracker . selectPyramidScale ( imageWidth , imageHeight , minSize ) ; currentImage = FactoryPyramid . discreteGaussian ( scales , - 1 , 1 , false , ImageType . single ( imageType ) ) ; currentImage . initialize ( imageWidth , imageHeight ) ; previousImage = FactoryPyramid . discreteGaussian ( scales , - 1 , 1 , false , ImageType . single ( imageType ) ) ; previousImage . initialize ( imageWidth , imageHeight ) ; int numPyramidLayers = currentImage . getNumLayers ( ) ; previousDerivX = ( Derivative [ ] ) Array . newInstance ( derivType , numPyramidLayers ) ; previousDerivY = ( Derivative [ ] ) Array . newInstance ( derivType , numPyramidLayers ) ; currentDerivX = ( Derivative [ ] ) Array . newInstance ( derivType , numPyramidLayers ) ; currentDerivY = ( Derivative [ ] ) Array . newInstance ( derivType , numPyramidLayers ) ; for ( int i = 0 ; i < numPyramidLayers ; i ++ ) { int w = currentImage . getWidth ( i ) ; int h = currentImage . getHeight ( i ) ; previousDerivX [ i ] = GeneralizedImageOps . createSingleBand ( derivType , w , h ) ; previousDerivY [ i ] = GeneralizedImageOps . createSingleBand ( derivType , w , h ) ; currentDerivX [ i ] = GeneralizedImageOps . createSingleBand ( derivType , w , h ) ; currentDerivY [ i ] = GeneralizedImageOps . createSingleBand ( derivType , w , h ) ; } track = new PyramidKltFeature ( numPyramidLayers , config . trackerFeatureRadius ) ; }
Declares internal data structures