Skip to content
Related Articles
Open in App
Not now

Related Articles

Python – Edge extraction using pgmagick library

Improve Article
Save Article
  • Last Updated : 16 Oct, 2021
Improve Article
Save Article

Edge Extraction is technique 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. License plate Detection 
5. Road Mapping 
6. Text Detection 
 

For eg: 
 

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

Python3




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

Input Image: 
 

Output Image: 
 

 

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!