Entropy-based image border detection algorithm library
Entropy-based image border detection algorithm: finds out if your image has borders or whitespaces around and helps you to trim border providing whitespace offsets for every side of a picture, supports animated GIFs.
For each side of the image starting from top, rotating image counterclockwise to keep side of interest on top:
python-3.6 -m venv .env source .env/bin/activate pip install enimda
Find if image has borders:
from enimda import ENIMDA # Load target image em = ENIMDA(fp='test.jpg') # Scan for borders with high precision borders = em.scan(fast=False) # Print found image borders (tuple): top, right, bottom, left print(borders)
For demo please refer to ENIMDA Demo
Also it lives at Picture Instruments as ‘Remove borders’ instrument
Run tests: py.test
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|enimda-2.1.0-py3-none-any.whl (6.8 kB) Copy SHA256 Checksum SHA256||3.6||Wheel||May 25, 2017|
|enimda-2.1.0.tar.gz (4.2 kB) Copy SHA256 Checksum SHA256||–||Source||May 25, 2017|