Skip to main content

Image Processing Functions

Project description

Image Functions Library

Library for image pre-processing, with functions to handle and prepare images for machine learning and image processing. This library accounts for functions to load and plot a group of images, pre-processing, choose ROI regions (even polygonal), choose points, get image properties, align and transform images (including rotate, scale, etc.), filter signals and images (2D data), among others. All the functions with GUI (stands for graphical user interface) have an interface to interact with the user.

1. Functions to Load and Plot

  • load_gray_images: loads all images from a folder, in grayscale
  • load_color_images: loads all color images from a folder
  • plot_gray_images: prints all grayscale images from a variable 'I'
  • plot_color_images: prints all color images from a variable 'I'
  • plot_gray: prints a grayscale image
  • plot_bgr: prints a color image in BGR format

2. Pre-Processing for Machine Learning and Computer Vision

2.1. ROI and Handling (Most Important Ones)

  • polyroi: GUI to create a polygonal region of interest (ROI)
  • crop_image: GUI to create a rectangular crop in an image
  • crop_multiple: crops multiple images using the same crop from 1st image
  • crop_poly_multiple: polygonal crop multiple images based on 1st cropping
  • choose_points: GUI to interact with the user to choose points in an image
  • imchoose: function to choose images in a given set of images (with GUI)
  • imroiprop: getting properties from an image ROI
  • roi_stats: get statistics (mean and std) from images of multiple a experiments (important!)

2.2. Image Alignment and Transformation

  • rotate2D: rotate points by an angle about a center
  • flat2im: transforms a flat vector into a 2D image
  • im2flat: transforms a 2D image in a flat vector
  • im2label: GUI to transform images in labels for image segmentation (very automated function)
  • scale255: scales an image to the [0, 255] range
  • align_features: Align images with Feature-Based algorithm, from OpenCV (maybe not working)
  • align_ECC: image alignment using ECC algorithm from OpenCV (diffuse image)
  • imwarp: function to warp a set of images using a warp matrix (maybe not working)

3. Filtering Images and Signals

  • filter_finder: study and find which filter to use (for signals, 1D)
  • highpass_gauss: high-pass Gaussian filter for images (2D)
  • highpass_fft: high-pass image (2D) filter based on FFT
  • lowpass_fft: low-pass image (2D) filter based on FFT
  • filt_hist: filtering histograms with zero/null values (removing zeros)

4. Bonus Functions

  • beep: making 'beeps' to help warn when a long algorithm has finished
  • isoareas: complex function to measure pixels' intensity in adjacent areas. This is a very specific function to process fluorescence intensities of cells in confocal microscopy images
  • good_colormaps: visualizing the best Matplotlib colormaps in an image
  • improfile: finds the pixels' intensity profile between two points (GUI) (maybe not working)

How to Install

You can install using pip:

pip install image-functions==0.1.2

OBS: some functions use the 'pynput' and 'windsound' libraries, which may be difficult to install and do not works on non-windows platforms. Comment on these library imports if there are problems during installation or loading.

  • author: Marlon Rodrigues Garcia
  • contact: marlon.garcia@unesp.br
  • institution: Sao Paulo State University (Unesp)

Scientific Research

This work is the product of the research being conducted at two universities in Brazil:

Sao Paulo State University (Unesp)

  • Dept. of Electronic and Telecommunication Engineering
  • School of Engineering, Campus of Sao Joao da Boa Vista
  • website: https://www.sjbv.unesp.br/

University of São Paulo (USP)

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_functions-0.1.2.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

image_functions-0.1.2-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: image_functions-0.1.2.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for image_functions-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3205202c3261e32de4099bfdb178cdf36835c52cf003690d3ab1805b244f4598
MD5 d8ef475a1e2bdc834f7e38c88e176c38
BLAKE2b-256 cbee23da86195c30a9dd04539c3d55a5c768f24131a511869105a5e0cf81e931

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for image_functions-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5347c3fd96a70d73e5fa08a1a99d9cb27ccb2f2c99eb890000c79a407c4e9097
MD5 c888e1e2885a6f72a25420da8c03f134
BLAKE2b-256 cdea39be3286bf20539474e4865d1fa7493adab8a8b8a6b45b58820b6f4470ac

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