Skip to main content

Overview

This Python module provides utility functions for various image processing tasks, such as image conversion, display, normalization, and enhancement. It leverages the power of libraries like cv2 and numpy to handle and manipulate image data.

Functions

open_img

  • Purpose: Convert the image to a specified color space.
  • Inputs: Image data (or path), desired color space, and data type specifications.
  • Output: Image converted to the specified color space.

display

  • Purpose: Display images with their labels.
  • Inputs: Multiple images and labels, display size and layout specifications.
  • Output: None, this displays the image.

normalize_img

  • Purpose: Normalize an image.
  • Inputs: Image data.
  • Output: Normalized image.

flatten_unflatten

  • Purpose: Flatten or reshape an image.
  • Inputs: Image data, operation type (flatten or reshape), and desired shape if reshaping.
  • Output: Flattened or reshaped image.

binary

  • Purpose: Convert an image to a binary format based on a threshold.
  • Inputs: Image data and threshold value.
  • Output: Binarized image.

img2blocs

  • Purpose: Split an image into blocks/blocs of a certain size.
  • Inputs: Image data, block size, and padding type.
  • Output: List of blocks/blocs.

resize_img

  • Purpose: Resize an image to the specified dimensions.
  • Inputs: Image data and desired dimensions (width & height).
  • Output: Resized image.

rotate_img

  • Purpose: Rotate an image by a specified angle.
  • Inputs: Image data and rotation angle.
  • Output: Rotated image.

enhance_img

  • Purpose: Enhance an image by adding noise, applying blur, and adjusting contrast.
  • Inputs: Image data, and specifications for noise, blur, and contrast adjustments.
  • Output: Enhanced image.

Requirements

  • cv2
  • numpy
  • matplotlib

Usage

In order to install the library:

pip install image-processing-lib

To use it, nothing is more simple:

import image_processing.functions as ip

# Load an image
image = ip.open_img('PATH_TO_THE_IMAGE', 'GRAY')

# Use any of the provided functions
processed_image = FUNCTION_NAME(image, ...other_args)

Contribution

Feel free to fork this module and contribute by submitting a pull request. Ensure any new features or changes are well-documented and include relevant tests.

Metadata

Release files for image-processing-lib 0.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for image-processing-lib 0.22
File Size Uploaded
image-processing-lib-0.22.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for image-processing-lib 0.22
File Interpreter ABI Platform
image_processing_lib-0.22-py3-none-any.whl Python 3 none any Details

Total release size: 11.6 kB

Release files / image-processing-lib-0.22.tar.gz

Download URL image-processing-lib-0.22.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e550827bd38b27faadd1911d5d502f1b4eaa4b3ba18cb6144fcbbda1641238c5
BLAKE2b-256 checksum
How to use checksums
f356c6522d18fb034ad39e753cebf351da5abbf771c60767e7b72d666c3f53d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.3

Release files / image_processing_lib-0.22-py3-none-any.whl

Download URL image_processing_lib-0.22-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff7332e14ed8627517b38c2d1b63f19ed2e0ccac0c5f4f60ec0147286102d218
BLAKE2b-256 checksum
How to use checksums
ddff64e022297899e7fbc631bbfc0df6a5f02c1d9fb82a401a6c08cefe0e6923
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.3

Release history Release notifications | RSS feed

This release

0.22 This release

2 release files

0.21

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page