Python – Edge extraction using pgmagick library

Edge Extraction is techniqye to highlight the edges present in an image. Edge extraction is used for data extraction used in computer vision for feature detection and feature extraction.

Applications of Edge Extraction –

1. Medical Sciences
2. Fingerprint Scanning
3. Computer/Machine Vision
4. Liscense plate Detection
5. Road Mapping
6. Text Detection

For eg:

Let’s see how we can do this in Python using pgmagick library.

Code :

filter_none

edit
close

play_arrow

link
brightness_4
code

# importing module
from pgmagick.api import Image
  
img = Image('koala.jpeg')
img.edge(1)
img.write('edge_koala.jpeg')

chevron_right


Input Image:

Output Image:

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.