我们从Python开源项目中,提取了以下2个代码示例,用于说明如何使用skimage.feature.corner_harris()。
def run(self, ips, snap, img, para = None): cimg = feature.corner_harris(img, sigma=para['sigma'], k=para['k']) pts = feature.corner_peaks(cimg, min_distance=1) self.ips.roi = PointRoi([tuple(i[::-1]) for i in pts])
def main(): """Load image, calculate harris scores (window functions: matrix of ones, gauss) and plot the results.""" img = data.checkerboard() score_window = harris_ones(img, 7) score_gauss = harris_gauss(img) util.plot_images_grayscale( [img, score_window, score_gauss, feature.corner_harris(img)], ["Image", "Harris-Score (ones)", "Harris-Score (gauss)", "Harris-Score (ground truth)"] )