In this article we will see can load image in mahotas. Mahotas is a computer vision and image processing and manipulation library for Python. A library is a collection of functions and methods that allows you to perform many actions without having to write hundreds of lines of code. Mahotas includes many algorithms that operates with arrays, mahotas currently has over 100 functions for image processing and computer vision and is constantly growing.
In order to do this we will use mahotas.imread method
Syntax : mahotas.imread(image_name)
Argument : It takes string as argument which is image name
Return : It returns numpy.ndarray object
Example 1:
Python3
import numpy as np
import mahotas
from pylab import imshow, show
img = mahotas.imread( 'dog_image.png' )
imshow(img)
show()
|
Output :

Example 2:
Python3
import numpy as np
import mahotas
from pylab import imshow, show
img = mahotas.imread( 'wally.png' )
imshow(img)
show()
|
Output :

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!
Last Updated :
26 May, 2021
Like Article
Save Article