Skip to main content

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

  1. 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
  1. 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)
  1. 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)
  1. 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)
      

      alt text

    • Ploting only the result image with the plot_image:

       plot.plot_image(result_image)
      

      alt text

  2. 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

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tf_image_processing-0.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tf_image_processing-0.0.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

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

Hashes for tf_image_processing-0.0.1.tar.gz
Algorithm Hash digest
SHA256 41cb9994c2305a15efd3151e7c85b9ca3ba29decc8c55160fb0f91d031d50410
MD5 07fe9e352494b2eb3f378c96f0d5259d
BLAKE2b-256 e729a7e985eab8996403543bd20b8fdbe8d1c4f23e09921b9ba2dd3c283f5508

See more details on using hashes here.

File details

Details for the file tf_image_processing-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tf_image_processing-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f56c2dadbd7319c9076b7b04db59acc8df7d71df06bcb85e56bfa6dcd2e718b
MD5 ecf3a54f874d6031075787b5f68d2e1b
BLAKE2b-256 298bc136216c672f0653025cfd16dbb2d7007db01ea681bb6637ea834315413d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page