Skip to main content

Fast and easy image processing using an Image class based on the scikit-image, numpy and matplotlib libraries.

Project description

fast-skimage

Welcome to fast-skimage, an image acquisition and processing library. This powerful library offers a wide range of tools for advanced image manipulation and analysis, wrapped up in the accessible Image class.

Features

  • Advanced Manipulation: Apply complex operations like adding watermarks, noise detection, auto-enhancement, and saturation increase with simple method calls.
  • Filtering and Thresholding: Includes mean, median filtering, Otsu's thresholding, and custom thresholding methods for image segmentation and noise reduction.
  • Fourier Transforms: Utilize Fourier-based methods for reducing image dithering and other artifacts.
  • Histogram Operations: Equalize and stretch image histograms to improve contrast and visibility.
  • Texture Analysis: Perform texture segmentation using a variety of descriptors.
  • Small Image Library: 7 various pictures for testing are provided with the package (see section "Image Library" below).

Getting Started

  1. Installation: Clone the repository or download the Image class module to your project.
  2. Dependencies: Ensure all dependencies such as numpy, matplotlib, scikit-image, and PyWavelets are installed.
  3. Usage: Import the Image class from the module and instantiate it with the path to your image or a NumPy array.

Example

from fast_skimage import Image
from fast_skimage import etretat
from skimage.data import immunohistochemistry

img = Image("Pictures/camera.jpg")  # Load an image with path...
img2 = Image(immunohistochemistry())  # ... or numpy array ...
colored_image_array = etretat() # ... or a library image.
img3 = Image(colored_image_array.get())

img2.auto_enhance()  # Apply auto-enhancement
img3.auto_enhance()

img3.show(subplots=(1, 2, 1), size=12)  # Display the result
img2.show(subplots=(1, 2, 2), title='Immunochemistry Image')

img.show(size=(12, 6), type_of_plot='hist', axis=True)  # Plot histogram

Image Library

A small image library is provided along with the Image class. These can be manually extracted with the following lines:

from fast_skimage import image_name
image_array = image_name()
image = Image(image_array.get())

Note that all images listed below come from the INFO-H500 course of Prof. Olivier Debeir at ULB (Université Libre de Bruxelles).

Grayscale Noisy Image

  • fast-skimage.astronaut_noisy

Grayscale Clean Images

  • fast-skimage.camera
  • fast-skimage.walking

Grayscale Clean Watermark

  • fast-skimage.watermark (the ULB logo)

Colored Clean Images

  • fast-skimage.etretat
  • fast-skimage.nyc
  • fast-skimage.zebra

Collection Library

The Collection class allows you to handle multiple images (Image objects) at the same time. For instance:

from fast_skimage.Collection import Collection

# Loads all images as Image objects in a single Collection object
tr_glioma = Collection(directory_path="Training/glioma", name="Glioma (training)", verbose=1)
keys, images = tr_glioma.images.items()
# Extract all image pixels back into a Pandas dataframe
glioma = tr_glioma.extract_images(label="Glioma", to_df=True)

Documentation

Refer to the in-line comments and method docstrings for detailed usage of each feature.

Contribution

Contributions are welcome! Feel free to submit pull requests, suggest features, or report bugs.

License

This library is distributed under the MIT license. See LICENSE for more information.

Contact

Happy Image Processing!

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

fast_skimage-0.3.1.tar.gz (13.2 MB view details)

Uploaded Source

Built Distribution

fast_skimage-0.3.1-py3-none-any.whl (14.7 MB view details)

Uploaded Python 3

File details

Details for the file fast_skimage-0.3.1.tar.gz.

File metadata

  • Download URL: fast_skimage-0.3.1.tar.gz
  • Upload date:
  • Size: 13.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.2

File hashes

Hashes for fast_skimage-0.3.1.tar.gz
Algorithm Hash digest
SHA256 ae1bf0f51efcfbca266d3a323c8a962881c781a6069fe1e28f5c38a740955bc3
MD5 c92d95a4f3818e38a8a81dc3bb3de9f3
BLAKE2b-256 5f1ac17ab07f0341b3a914a82c56ea43515032864012450ab8f3303de60c1036

See more details on using hashes here.

File details

Details for the file fast_skimage-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fast_skimage-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ee8562415c29df3204f9ce62e6b2d3aadb31e26ba4873bd4a07667fb9938c55
MD5 a9bf720aad19c45b1032b8fba02de953
BLAKE2b-256 3a48f95d68a48d909a9bd3bda7a4bd4228933ef4e66df0fbe5c5073f9824aefb

See more details on using hashes here.

Supported by

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