Skip to main content

An efficient and fast library to detect loops, edges and outer boundary in binary images

Project description


PyEdgeLoop is a fast and simple python package to detect loops, outer boundary and edges in binary images.
This library was initially created to help detect loops and boundaries/edges in word images. It plays an important role in segmentation of cursive handwriting segmentation. But it can be used for many other purposes also.


pip install pyedgeloop


import pyedgeloop as detect
import cv2
Im = cv2.imread(your_filename)
Loops, Edges, Boundary = detect.DetectLoopsEdges(Im)


Here are some examples where we are finding loops and boundary of a handwritten word image-


1 alt input1


2 alt input2



1 alt output1


2 alt output1

Outer Boundary

1 alt output2


2 alt output2


1 alt output3


2 alt output3

Here is another example where we need to detect only edges-


alt input3

Output Edges

alt output31


Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.


Aditya Dutt -



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyedgeloop-0.0.2.tar.gz (3.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page