A package for processing images and converting them into grayscale line images with extra blurness. It can be used for varies Machine learning algorithm traninig as it provide the more torn images
Project description
seya_image_processor
Overview
seya_image_processor is a Python library for image preprocessing that converts images to low-contrast, blurred sketches. It provides two main functions: one that returns the processed image as a base64 string, and another that returns the processed image as a PIL Image object.
Installation
To install the seya_image_processor library, use the following pip command:
pip install seya_image_processor
Usage
Here's how you can use the library:
- Import the library:
from seya_image_processor import process_image_to_base64, process_image_to_array
- Process an image to base64:
with open("path_to_image.png", "rb") as image_file:
base64_result = process_image_to_base64(image_file)
print(base64_result)
- Process an image to a PIL Image:
with open("path_to_image.png", "rb") as image_file:
processed_image = process_image_to_array(image_file)
processed_image.show()
Functions
preprocess_image(image)
- Parameters:
image(PIL.Image): The input image to preprocess.
- Returns:
blurred_image(numpy.ndarray): The preprocessed, blurred image.
process_image_to_base64(image_file)
- Parameters:
image_file(file-like object): The input image file to process.
- Returns:
processed_image_base64(str): The processed image encoded as a base64 string.
process_image_to_array(image_file)
- Parameters:
image_file(file-like object): The input image file to process.
- Returns:
pil_image(PIL.Image): The processed image as a PIL Image object.
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 seya_image_processor-0.1.1.tar.gz.
File metadata
- Download URL: seya_image_processor-0.1.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdcf7fd9cd82ee05164b22576130604f018ba637cc0f0f2582620f41069f5617
|
|
| MD5 |
b3d5b172935c983f8200970e5d6aa2f9
|
|
| BLAKE2b-256 |
67ddc01c374012ff40d839c6063bcabfe2e1b6a8f6e3f686f15b20381d8f8619
|
File details
Details for the file seya_image_processor-0.1.1-py3-none-any.whl.
File metadata
- Download URL: seya_image_processor-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f685612ff30b79a8961d4b53242ab9ba5cc551bc4efc36eea7d70d474f887cc
|
|
| MD5 |
0152db8f7b26ba58ce91a9bb4eac3e12
|
|
| BLAKE2b-256 |
89c7c69084ddb7e911b1a514e31543ab436660cf1a740655c8afc67f3828687c
|