ในโปรแกรมนี้ เราจะหาขอบในภาพโดยใช้ไลบรารี่หมอน ฟังก์ชัน FIND_EDGES ในคลาส ImageFilter ช่วยให้เราค้นหาขอบในภาพได้
ภาพต้นฉบับ

อัลกอริทึม
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() ผลลัพธ์
