def get_harris_points(harrisim, min_dist=10, threshold=0.1):
 corner_threshold = (harrisim.max() * threshold)
 harrisim_t = ((harrisim > corner_threshold) * 1)
 coords = array(harrisim_t.nonzero()).T
 candidate_values = [harrisim[(c[0], c[1])] for c in coords]
 index = argsort(candidate_values)
 allowed_locations = zeros(harrisim.shape)
 allowed_locations[min_dist:(- min_dist), min_dist:(- min_dist)] = 1
 filtered_coords = []
 for i in index:
  if (allowed_locations[(coords[(i, 0)], coords[(i, 1)])] == 1):
   filtered_coords.append(coords[i])
   allowed_locations[(coords[(i, 0)] - min_dist):(coords[(i, 0)] + min_dist), (coords[(i, 1)] - min_dist):(coords[(i, 1)] + min_dist)] = 0
 return filtered_coords

def get_harris_points ( harrisim , min_dist = 10 , threshold = 0.1 ) : corner_threshold = ( harrisim . max ( ) * threshold ) harrisim_t = ( ( harrisim > corner_threshold ) * 1 ) coords = array ( harrisim_t . nonzero ( ) ) . T candidate_values = [ harrisim [ ( c [ 0 ] , c [ 1 ] ) ] for c in coords ] index = argsort ( candidate_values ) allowed_locations = zeros ( harrisim . shape ) allowed_locations [ min_dist : ( - min_dist ) , min_dist : ( - min_dist ) ] = 1 filtered_coords = [ ] for i in index : if ( allowed_locations [ ( coords [ ( i , 0 ) ] , coords [ ( i , 1 ) ] ) ] == 1 ) : filtered_coords . append ( coords [ i ] ) allowed_locations [ ( coords [ ( i , 0 ) ] - min_dist ) : ( coords [ ( i , 0 ) ] + min_dist ) , ( coords [ ( i , 1 ) ] - min_dist ) : ( coords [ ( i , 1 ) ] + min_dist ) ] = 0 return filtered_coords
return corners from a harris response image min_dist is the minimum number of pixels separating corners and image boundary .