protected void findLocalScaleSpaceMax ( PyramidFloat < T > ss , int layerID ) { int index0 = spaceIndex ; int index1 = ( spaceIndex + 1 ) % 3 ; int index2 = ( spaceIndex + 2 ) % 3 ; List < Point2D_I16 > candidates = maximums [ index1 ] ; ImageBorder_F32 inten0 = ( ImageBorder_F32 ) FactoryImageBorderAlgs . value ( intensities [ index0 ] , 0 ) ; GrayF32 inten1 = intensities [ index1 ] ; ImageBorder_F32 inten2 = ( ImageBorder_F32 ) FactoryImageBorderAlgs . value ( intensities [ index2 ] , 0 ) ; float scale0 = ( float ) ss . scale [ layerID - 1 ] ; float scale1 = ( float ) ss . scale [ layerID ] ; float scale2 = ( float ) ss . scale [ layerID + 1 ] ; float sigma0 = ( float ) ss . getSigma ( layerID - 1 ) ; float sigma1 = ( float ) ss . getSigma ( layerID ) ; float sigma2 = ( float ) ss . getSigma ( layerID + 1 ) ; // not sure if this is the correct way to handle the change in scale float ss0 = ( float ) ( Math . pow ( sigma0 , scalePower ) / scale0 ) ; float ss1 = ( float ) ( Math . pow ( sigma1 , scalePower ) / scale1 ) ; float ss2 = ( float ) ( Math . pow ( sigma2 , scalePower ) / scale2 ) ; for ( Point2D_I16 c : candidates ) { float val = ss1 * inten1 . get ( c . x , c . y ) ; // find pixel location in each image's local coordinate int x0 = ( int ) ( c . x * scale1 / scale0 ) ; int y0 = ( int ) ( c . y * scale1 / scale0 ) ; int x2 = ( int ) ( c . x * scale1 / scale2 ) ; int y2 = ( int ) ( c . y * scale1 / scale2 ) ; if ( checkMax ( inten0 , val / ss0 , x0 , y0 ) && checkMax ( inten2 , val / ss2 , x2 , y2 ) ) { // put features into the scale of the upper image foundPoints . add ( new ScalePoint ( c . x * scale1 , c . y * scale1 , sigma1 ) ) ; } } }
Searches the pyramid layers up and down to see if the found 2D features are also scale space maximums .