skimage - 根据边缘裁剪图像

时间:2017-10-16 14:50:33

标签: python image scikit-image

我正在尝试根据边缘裁剪图像 我有类似的东西:

imggrey = io.imread(self.input_file, as_grey=True)
edges = canny(imggrey, sigma=self.sigma)
h, a, d = hough_line(edges)
_, ap, _ = hough_line_peaks(h, a, d, num_peaks=4)
cropped = imggrey[ap[0]:ap[1],ap[2]:ap[3]]
plt.imshow(cropped)
plt.show()

但显然我错过了一些东西,因为裁剪的图像没有被生成

有人可以帮助并指出我正确的方向吗?

0 个答案:

没有答案
相关问题