使用 Pillow 在图像中寻找边缘
在这个程序中,我们将使用 pillow 库来查找图像中的边缘。ImageFilter 类中的 FIND_EDGES 函数可以帮助我们在图像中找到边缘。
原始图像

算法
Step 1: Import Image and ImageFilter from Pillow. Step 2: Open the image. Step 3: Call the filter function and specify the find_edges function. Step 4: Display the output.
示例代码
from PIL import Image, ImageFilter
im = Image.open('testimage.jpg')
im = im.filter(ImageFilter.FIND_EDGES)
im.show()输出

广告
数据结构
网络
关系型数据库管理系统 (RDBMS)
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
JavaScript
PHP