Comprehensive image processing and computer vision library for Python with algorithms for filtering, morphology, segmentation, and feature detection
—
Generic utility functions for data type conversion, array manipulation, noise generation, and common image processing operations.
def img_as_float(image, force_copy=False):
"""Convert image to floating point format."""
def img_as_float32(image, force_copy=False):
"""Convert image to 32-bit float."""
def img_as_float64(image, force_copy=False):
"""Convert image to 64-bit float."""
def img_as_uint(image, force_copy=False):
"""Convert image to unsigned integer."""
def img_as_int(image, force_copy=False):
"""Convert image to signed integer."""
def img_as_ubyte(image, force_copy=False):
"""Convert image to unsigned byte (0-255)."""
def img_as_bool(image, force_copy=False):
"""Convert image to boolean."""
def dtype_limits(dtype, clip_negative=True):
"""Get intensity limits for data type."""def crop(ar, crop_width, copy=False, order='K'):
"""Crop array along each axis."""
def view_as_blocks(arr_in, block_shape):
"""View array as overlapping blocks."""
def view_as_windows(arr_in, window_shape, step=1):
"""View array as sliding windows."""
def montage(arr_in, padding_width=0, fill=0, grid_shape=None, multichannel=False, rescale_intensity=False, channel_axis=None):
"""Create image montage from array of images."""def random_noise(image, mode='gaussian', seed=None, clip=True, **kwargs):
"""Add various types of random noise to image."""def invert(image, signed_float=False):
"""Invert image intensities."""
def map_array(input_arr, input_vals, output_vals, out=None):
"""Map input array values to output values."""
def compare_images(image1, image2, method='diff'):
"""Compare two images using specified method."""def lookfor(what):
"""Search for keywords in function docstrings."""from typing import Union, Optional, Tuple
from numpy.typing import NDArray
import numpy as np
DataType = type
IntensityLimits = Tuple[float, float]
NoiseMode = str
ArrayWindow = NDArray[np.number]Install with Tessl CLI
npx tessl i tessl/pypi-scikit-image