A Python package for text removal and edge marking from images
Project description
Texere: This is the start of a new Module
Currently it has two function 1.Text Removal from Images and generate mask 2.Marking Edges in Images
Texere is a Python package that provides functionality for removing text from images and marking edges, along with the option to generate a mask for further processing.
Installation
You can install Texere using pip:
pip install texere
Usage:
Removing Text from Images
from texere.purge import txt
modified_image, mask = txt('image_path.jpg',pixels,threshold)
# 'modified_image' contains the image with text removed
# 'mask' is a binary image indicating the regions where text was removed
# Further processing using the 'mask' image can be done here
Marking Edges in the image
from texere.edges import mark
# Replace 'image_path.jpg' with the path to your input image
marked_image = mark('image_path.jpg',threshold)
# 'marked_image' contains the image with marked edges
# You can further process or visualize the edges here
Example:
Removing Text from Images
from texere.purge import txt
# Replace 'input_image.jpg' with the path to your input image
modified_image, mask = txt('input_image.jpg',7,10)
#threshold value is from 0-100
#pixels value >0
#depending on these two value the image will turn out Good
# Save the modified image
cv2.imwrite('output_image.jpg', modified_image)
# Save the mask as a binary image its a grayscaled image so it can be used for impainting the text area
cv2.imwrite('mask_image.jpg', mask)
Marking Edges in the image
from texere.edges import mark
# Replace 'input_image.jpg' with the path to your input image
marked_image = mark('input_image.jpg',threshold)
#threshold value can be between 0-255 also images i tried on works best with 70
# Save the marked image
marked_image.save('marked_image.jpg')
Contributing:
Contributions to Texere are welcome! If you have ideas for improvements, bug fixes, or new features, feel free to open an issue or submit a pull request on GitHub.
License:
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file texere-1.0.2.tar.gz.
File metadata
- Download URL: texere-1.0.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9c0a7ca59e5c999f60c332ef788e880746de5ea68cd5a1219c115d3df2faf4f
|
|
| MD5 |
89bacec9944e2f871ac283bc389213ba
|
|
| BLAKE2b-256 |
a5864dba1709eae71fe2dbda5c1d67fd87d83d7f463db84de79eb94205976d5e
|
File details
Details for the file texere-1.0.2-py3-none-any.whl.
File metadata
- Download URL: texere-1.0.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0f00870d1554bbfe43bfc64d095109d88803131c298bd5214d5f32e9f76a390
|
|
| MD5 |
82ad80d9eafcb1b2076d1c39b7a185f5
|
|
| BLAKE2b-256 |
054801ec0d05550a34db0ed7a6ff88626d29bd80dd658917e67f30dd0f2e9b25
|