def corner_foerstner(image, sigma=1):
 (Axx, Axy, Ayy) = structure_tensor(image, sigma)
 detA = ((Axx * Ayy) - (Axy ** 2))
 traceA = (Axx + Ayy)
 w = np.zeros_like(image, dtype=np.double)
 q = np.zeros_like(image, dtype=np.double)
 mask = (traceA != 0)
 w[mask] = (detA[mask] / traceA[mask])
 q[mask] = ((4 * detA[mask]) / (traceA[mask] ** 2))
 return (w, q)

def corner_foerstner ( image , sigma = 1 ) : ( Axx , Axy , Ayy ) = structure_tensor ( image , sigma ) detA = ( ( Axx * Ayy ) - ( Axy ** 2 ) ) traceA = ( Axx + Ayy ) w = np . zeros_like ( image , dtype = np . double ) q = np . zeros_like ( image , dtype = np . double ) mask = ( traceA != 0 ) w [ mask ] = ( detA [ mask ] / traceA [ mask ] ) q [ mask ] = ( ( 4 * detA [ mask ] ) / ( traceA [ mask ] ** 2 ) ) return ( w , q )
compute foerstner corner measure response image .