scikit-image

Image processing library for Python with filters and transformations.

brewmacoslinux
Try with needOr install directly
Source

About

Image processing in Python

Examples

resize and crop images in Python scripts$ python -c "from skimage import io, transform; img = io.imread('image.jpg'); resized = transform.resize(img, (100, 100)); io.imsave('output.jpg', resized)"
apply blur and edge detection filters to images$ python -c "from skimage import io, filters; img = io.imread('photo.jpg'); edges = filters.sobel(img); io.imsave('edges.jpg', edges)"
convert image to grayscale and adjust brightness$ python -c "from skimage import io, exposure; img = io.imread('image.jpg'); gray = exposure.rgb2gray(img); adjusted = exposure.adjust_gamma(gray, 1.2); io.imsave('adjusted.jpg', adjusted)"
remove noise and smooth image artifacts$ python -c "from skimage import io, restoration; img = io.imread('noisy.jpg'); denoised = restoration.denoise_nl_means(img, h=0.1); io.imsave('clean.jpg', denoised)"
detect shapes and contours in images$ python -c "from skimage import io, measure; img = io.imread('image.jpg'); labels = measure.label(img > 128); print('Found', len(set(labels)), 'objects')"