我有一个文件夹,每个图像包含至少4个较小的图像。我想知道如何使用Python-PIL剪切出较小的图像,以便它们都作为独立的图像文件存在。幸运的是,有一个常量,背景是白色或黑色,所以我想我需要的是一种方法,通过搜索完全黑色或完全白色的行或列来剪切这些图像,下面是一个示例图像:
从上面的图像中,将有10个单独的图像,每个图像都包含一个数字。提前谢谢。在
编辑:我有另一个样本图像,这是更现实的意义上,一些较小的图像的背景是相同的颜色,他们所包含的图像。e、 g
它的输出是13个独立的图象,每个图象包含一个字母
Tags:
使用scipy.n图像对于标签:
相关问题 更多 >
编程相关推荐