Skip to content

Instantly share code, notes, and snippets.

@Jmuccigr
Jmuccigr / crop_morphology.py
Last active September 22, 2020 07:47 — forked from fabito/crop_morphology.py
Crop image to area of text only
#!/usr/bin/env python3
'''
Crop an image to just the portions containing text.
Usage:
./crop_morphology.py path/to/image.jpg
This will place the cropped image in path/to/image.crop.png.
#!/usr/bin/env python
'''Crop an image to just the portions containing text.
Usage:
./crop_morphology.py path/to/image.jpg
This will place the cropped image in path/to/image.crop.png.
For details on the methodology, see