def corner_kitchen_rosenfeld(image, mode='constant', cval=0):
 (imx, imy) = _compute_derivatives(image, mode=mode, cval=cval)
 (imxx, imxy) = _compute_derivatives(imx, mode=mode, cval=cval)
 (imyx, imyy) = _compute_derivatives(imy, mode=mode, cval=cval)
 numerator = (((imxx * (imy ** 2)) + (imyy * (imx ** 2))) - (((2 * imxy) * imx) * imy))
 denominator = ((imx ** 2) + (imy ** 2))
 response = np.zeros_like(image, dtype=np.double)
 mask = (denominator != 0)
 response[mask] = (numerator[mask] / denominator[mask])
 return response

def corner_kitchen_rosenfeld ( image , mode = 'constant' , cval = 0 ) : ( imx , imy ) = _compute_derivatives ( image , mode = mode , cval = cval ) ( imxx , imxy ) = _compute_derivatives ( imx , mode = mode , cval = cval ) ( imyx , imyy ) = _compute_derivatives ( imy , mode = mode , cval = cval ) numerator = ( ( ( imxx * ( imy ** 2 ) ) + ( imyy * ( imx ** 2 ) ) ) - ( ( ( 2 * imxy ) * imx ) * imy ) ) denominator = ( ( imx ** 2 ) + ( imy ** 2 ) ) response = np . zeros_like ( image , dtype = np . double ) mask = ( denominator != 0 ) response [ mask ] = ( numerator [ mask ] / denominator [ mask ] ) return response
compute kitchen and rosenfeld corner measure response image .