protected void subpixelPeak ( int peakX , int peakY ) { // this function for r was determined empirically by using work regions of 32,64,128 int r = Math . min ( 2 , response . width / 25 ) ; if ( r < 0 ) return ; localPeak . setSearchRadius ( r ) ; localPeak . search ( peakX , peakY ) ; offX = localPeak . getPeakX ( ) - peakX ; offY = localPeak . getPeakY ( ) - peakY ; }
Refine the local - peak using a search algorithm for sub - pixel accuracy .