Aug 07

Python and Image Processing: Packages like OpenCV

Python and Image Processing: Packages like OpenCV

PIL: comes with the distribution Anaconda. It contains basic image processing capabilities, and convenient to use.

ndimage.scipy: is a module that contains many functions for processing Photos.

misc.scipy: module contains functions for reading and writing Photos

OpenCV: image processing package is very common and accepted

Installing OpenCV

Options: you can use HomeBrew, PIP, or PIP3. Or Download source and Build.

Building the source though not the easiest but you might be required to do it under certain circumstances (for some library support)

Python 2: pip install opencv or pip install opencv-python

Python 3: pip3 install opencv or pip3 install opencv-python

you might need to install the following packages such as cv2, numpy,  matplotlib

pip3 install numpy

pip3 installmatplotlib


An Example

import cv2
import numpy as np
import matplotlib.pyplot as plt
import cv2

img = cv2.imread('C:\Users\USER\Desktop\image.jpg',0)
cv2.imshow('image', img)  


The instructions on the linkes below will be of good help

Install OpenCV 3 on MacOS



Some Other Image Processing Libraries

Octave's image And for Scilab there is SIP and SIVP

Both Octave and Scilab are very Matlab like, but I'm not sure how similar the image toolkits are.

Also look into OpenCV if you are comfortable with C/C++ or Python



ImageJ (also read:


use if you use C#. is supported Image Processing and AI


OpenCV Source on GitHUB:



Install OpenCV using Homebrew

Install OpenCV 3 on macOS with Homebrew (the easy way)


How to build:


HOWTO: Install, Build and Use openCV (MacOSX 10.10)






Skip to toolbar