Image Finder
Image Finder is a Python package that leverages the power of OpenCV to locate image and extract text within a range.
It provides a simple and efficient way to perform image processing tasks such as template matching and text extraction.
Features
-
Image Matching: Image Finder can locate a template image within a image using OpenCV template matching techniques.
-
Text Extraction: Image Finder can extract text within a specified rectangle in an image.
-
Drawing on Images: Image Finder provides functions to draw points and rectangles on images.
Usage
Here is a basic example of how to use Image Finder:
from image_finder import ImageFinder
def main():
# Load an image from a file
with open('sample_images/pytho_cat.png', 'rb') as f:
image = f.read()
finder = ImageFinder(image=image)
# Load a template image from a file
with open('sample_images/template.png', 'rb') as f:
template = f.read()
# Find the template in the image
image_coop = finder.find_image_in_screen(template=template, threshold=0.7)
print(image_coop)
# Draw a point at the center of the match
return_image = finder.draw_point(x=image_coop['center_x'], y=image_coop['center_y'], color=(0, 255, 0),
thickness=-1, radius=10)
with open('sample_images/return_draw_point_image.png', 'wb') as f:
f.write(return_image)
# Extract text within a rectangle in an image
texts = finder.find_text_in_rectangle(top_left_x=0, top_left_y=0, bottom_right_x=896, bottom_right_y=896,
lang=['en'])
print(texts)
# Draw a rectangle on an image
return_image = finder.draw_rectangle(top_left_x=10, top_left_y=10, bottom_right_x=800, bottom_right_y=800,
color=(255, 0, 0), thickness=2)
with open('sample_images/return_draw_rectangle_image.png', 'wb') as f:
f.write(return_image)
if __name__ == '__main__':
main()
Installation
pip install image-finder
Contributing
Contributions to Image Finder are welcome. Please open an issue or submit a pull request on GitHub.
License
Image Finder is released under the Apache License.
Metadata
Release files for image-finder 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| image-finder-0.0.1.tar.gz | 8.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| image_finder-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.5 kB
Release files / image-finder-0.0.1.tar.gz
| Download URL | image-finder-0.0.1.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1734ca0d6ac8ebd9f82ea655851928614658d6ad84a0def1bb5d06822b3b21a0
|
|
BLAKE2b-256 checksum How to use checksums |
f9e7b062b2a9709eca061613b430f1fe20cf5504d5ca9e8c9d00a727bc1ab21e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / image_finder-0.0.1-py3-none-any.whl
| Download URL | image_finder-0.0.1-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a63ef057d42544064c0b4338593421135dcd5528b0e615a6874aaf9e06067220
|
|
BLAKE2b-256 checksum How to use checksums |
e50351067e697acecee740a17942acdc87686c472bd109cd7a4f059613a66417
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for image-finder 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.