private boolean localPeak(int i, int j, int hw, int hh, int neighbourhood) {
        int dt, dr;
        long peak = houghAccumulator[i][j];
        
        for (int k = -neighbourhood; k <= neighbourhood; k++) {
            for (int l = -neighbourhood; l <= neighbourhood; l++) {
                if (k == 0 && l == 0) 
                	continue;
                
                dt = i+k;
                dr = j+l;
                
                if (dr < 0 || dr >= 2*hh) 
                	continue;
                
                if (dt < 0) 
                	dt = dt + hw;
                
                if (dt >= hw) 
                	dt = dt - hw;
                
                if (houghAccumulator[dt][dr] > peak) {
                    return false;
                }
            }
        }
        
        return true;
    }