modules for transforming images and its colors through a histogram reference
Project description
TF Image Processing
Description
The package package_name is used to:
- Processing:
- Histogram matching
- Structural similarity
- Resize image
- Utils:
- Read image
- Save image
- Plot image
- Plot result
- Plot histogram
Installation
Use the package manager pip to install tf_image_processing
pip install tf-image-processing
Usage
For Histogram Matching
- Import the modules to open, read, plot, and save the imagens you need to combine as well as the combination module:
from tf_image_processing.utils import io, plot
from tf_image_processing.processing import combination
-
Get both images' paths:
- a base image which is going to be modified
- the reference image to get the histogram to be applied on the base image
It is easier if you store their paths in two variables, like the example below:
image_1_path = io.read_image(image_1_path)
image_2_path = io.read_image(image_2_path)
- Combine the images using the transfer_histogram passing as its arguments the base image (image_1), and the histogram reference image(image_2), storing it in a variable (result_image):
result_image = combination.transfer_histogram(image_1, image_2)
-
You can plot the results in two diferent ways:
-
Comparing the three images using the plot_result and passing the images as the arguments:
plot.plot_result(image_1, image_2, result_image)
-
Ploting only the result image with the plot_image:
plot.plot_image(result_image)
-
-
Finally you can save the result_image using the io.save_image, passing the result image and the path to where you want to save it.
result_img_path = "./image-processing-package/result_image.jpg" io.save_image(result_image, result_image)
Author
Thiago Ferrari
License
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 tf_image_processing-0.0.1.tar.gz.
File metadata
- Download URL: tf_image_processing-0.0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41cb9994c2305a15efd3151e7c85b9ca3ba29decc8c55160fb0f91d031d50410
|
|
| MD5 |
07fe9e352494b2eb3f378c96f0d5259d
|
|
| BLAKE2b-256 |
e729a7e985eab8996403543bd20b8fdbe8d1c4f23e09921b9ba2dd3c283f5508
|
File details
Details for the file tf_image_processing-0.0.1-py3-none-any.whl.
File metadata
- Download URL: tf_image_processing-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f56c2dadbd7319c9076b7b04db59acc8df7d71df06bcb85e56bfa6dcd2e718b
|
|
| MD5 |
ecf3a54f874d6031075787b5f68d2e1b
|
|
| BLAKE2b-256 |
298bc136216c672f0653025cfd16dbb2d7007db01ea681bb6637ea834315413d
|