इस कार्यक्रम में, हम पिलो लाइब्रेरी का उपयोग करके एक छवि में किनारों को पाएंगे। 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() आउटपुट
