Skip to main content

A package for image processing using Python

Project description

Image Processing AJS

Description

"image_processing_ajs" is an image processing package developed in Python that offers a variety of functionalities for image manipulation and analysis. This package utilizes popular libraries such as scikit-image and matplotlib, making it easy to perform common image processing tasks.

Package Structure

image_processing_ajs/  
├── processing/                        # Main package directory     ├── __init__.py                    # Marks this directory as a Python package     ├── io.py                          # Loads and saves images     ├── measure.py                     # Labels and measures connected components     ├── exposure.py                    # Adjusts intensity and gamma correction     ├── color.py                       # Converts colored images to grayscale     └── plot.py                        # Functions for visualizing results  
├── tests/                             # Directory for tests     ├── __init__.py                    # Marks this directory as a Python package     ├── test_io.py                     # Tests for loads and saves images     ├── test_measure.py                # Tests for labels and measures connected components     ├── test_exposure.py               # Tests for adjusts intensity and gamma correction     ├── test_color.py                  # Tests for converts colored images to grayscale     └── test_plot.py                   # Tests for functions for visualizing results  
├── __init__.py                        # Marks this directory as a Python package  
├── README.md                          # Basic documentation  
├── setup.py                           # Setup script for setuptools  
└── requirements.txt                   # Dependencies file  

Package Modules

“io.py”:
Uses the functions “skimage.io.imread()” and “skimage.io.imsave()” to load and save images in various formats such as JPG, PNG, TIFF, etc.

“measure.py”:
Uses “skimage.measure.label()” to label connected components in a binary image.
Uses “skimage.measure.regionprops()” to calculate properties of labeled objects, such as area, perimeter, etc.
Uses “skimage.feature.canny()” to perform edge detection using the Canny algorithm.

“exposure.py”:
Uses “skimage.exposure.adjust_gamma()” to adjust the gamma correction of an image.
Uses “skimage.exposure.rescale_intensity()” to rescale the intensity of pixel values.

“color.py”:
Uses “skimage.color.rgb2gray()” to convert colored images (RGB) to grayscale.

“plot.py”:
Uses functions “show_image()” and “show_images_side_by_side()” from the “matplotlib” library to display the results from the “io”, “measure”, “exposure”, and “color” modules.

Installation

Use the package manager pip to install image_processing_ajs:

pip install image_processing_ajs

If you are developing the package locally, clone the repository and install the dependencies:

git clone https://github.com/soaresaj/image-processing-ajs-package
cd image_processing_ajs
pip install -r requirements.txt

Usage

An example of how to use the package:

from image_processing_ajs import io, measure, exposure, color, plot

# Load an image
image = io.imread('path/to/image.jpg')

# Adjust the image gamma correction
adjusted_image = exposure.adjust_gamma(image, gamma=1.5)

# Convert the image to grayscale
gray_image = color.rgb2gray(image)

# Label connected components
labels = measure.label(gray_image)

# Display the results
plot.show_image(image)

Tests

The package contains a test directory where you can find test cases to ensure the proper functionality of the features.

Run the ‘main.py’ file with the ‘original_image.jpg’ to verify the package functionalities.

Contributions

Contributions are welcome! Feel free to open issues or submit pull requests.

Author

Antonio José Soares

License

This project is licensed under the MIT License.

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

image_processing_ajs-0.1.2.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

image_processing_ajs-0.1.2-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file image_processing_ajs-0.1.2.tar.gz.

File metadata

  • Download URL: image_processing_ajs-0.1.2.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for image_processing_ajs-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5e7f4154a0089901a15c417bea0a19d314f81c2c62599e1574a92936328169b7
MD5 ed82ea614b7551867514d69b2b04b338
BLAKE2b-256 3a6f2e514d730a0ac8013011d7d06cae78d0e3c9cc6aa85df2ab86865ee2fbd2

See more details on using hashes here.

File details

Details for the file image_processing_ajs-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for image_processing_ajs-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b9daaa0fa4fb93f456834fddfd83a4627558adb746c965cd6abf4533556c80e
MD5 1e74591d1715abdda915cc927fd40751
BLAKE2b-256 d772aa93b3d3ef9aeb0ea1a2d1a7f107f8176eb6600822dc0427c7e298873fbc

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