我正在尝试根据图像的边缘裁剪图像 我有类似的东西:
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()
但很明显我遗漏了一些东西,因为裁剪后的图像无法生成
有人能帮我指点方向吗?在
目前没有回答
相关问题 更多 >
编程相关推荐