Toolboxes

Image Processing Toolboxscikit-image + scipy.ndimage

Image filtering, segmentation, and morphological operations. Maps to scikit-image and OpenCV.

Install
pip install scikit-image
MATLABPythonNote
imread('file')io.imread('file')
imwrite(I, 'file')io.imsave('file', I)Argument order reversed
imshow(I)plt.imshow(I)Uses matplotlib
imresize(I, [m,n])transform.resize(I, (m,n))
imrotate(I, angle)transform.rotate(I, angle)
rgb2gray(I)color.rgb2gray(I)
im2double(I)util.img_as_float(I)
imfilter(I, h)ndi.convolve(I, h)Uses scipy.ndimage
edge(I, 'canny')feature.canny(I)
regionprops(L)measure.regionprops(L)
bwlabel(BW)measure.label(BW)
imdilate(BW, se)morphology.dilation(BW, se)
imerode(BW, se)morphology.erosion(BW, se)

The converter automatically detects Image Processing functions and adds the correct imports.

Try the converter