O'Reilly logo

Computer Vision with Python 3 by Saurabh Kapur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting started with scikit-image

In this section, we will walk through some basic operations that can be performed using the scikit-image library:

  • Reading an image: As you know, reading an image is the most fundamental operation you would like to perform. In scikit-image, the image can be read using the imread() function in the io module of the library. It returns an ndarray. An ndarray in Python is an N dimensional array. The following is an example:
        >>> from skimage import io        >>> img = io.imread("image.png")        >>> io.imshow("image.png")        >>> io.show()
  • Writing/saving an image: To save or write an image we can use the imsave() function. It takes the absolute or relative path of the file where you want to save the image and the image variable ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required