Skip to main content

Image extraction using a template. Uses homography and feature matching, storing results in a SQLite database in the user’s home directory for faster reprocessing.

Usage

from image_extract.extract import Extracter
ex = Extracter()
ex.crop_images(image_directory, crop_template, file_extension[, match_points])

Successful crops are extracted to a directory called successful_crops, directly underneath image_directory. Each template used creates a subdirectory, named after its md5 hash:

image_directory
    - img1.jpg
    - …
    - imgn.jpg
    - successful_crops
        - 2a1bdab44c5e81af34f47f3395a3da7e
            - img1_cropped.jpg

The optional match_points argument controls the number of matching points which must be detected in order for a template match to be deemed successful. It’s set to 30 by default.

Summaries

Call ex.summary(path) to see information on extracted crops for a given directory.

Deleting Extracted Crops

Call ex.delete(path[, template_md5]) to delete extracted crops for a given template. If no template md5 value is given, all extracted crops in that directory are removed.

Accuracy

For best results, the template image should be of the same (or similar) resolution as the image from which the crop is to be extracted.

Release files for imagecrop 0.0.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for imagecrop 0.0.16
File Interpreter ABI Platform
imagecrop-0.0.16-py2-none-any.whl Python 2 none any Details

Release files / imagecrop-0.0.16-py2-none-any.whl

Download URL imagecrop-0.0.16-py2-none-any.whl
Size 10.1 kB
Tags Python 2
SHA-256 checksum
How to use checksums
7a01383d722a7bb06de2b50f873ba82d7dc3679ed652aaab9099b5fe7288b495
BLAKE2b-256 checksum
How to use checksums
3ae8646d9e9480d2f8aa9dc4f3f8756f636da0c76491d3f0aa01246350956d0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.16 This release

1 release file

0.0.15

1 release file

0.0.14

1 release file

0.0.13

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page