You can use newer OpenCV python interface (if I'm not mistaken it is available since OpenCV 2.2). It natively uses numpy arrays:

import cv2
im = cv2.imread("abc.tiff")
print(type(im))

result:

<type 'numpy.ndarray'>
Answer from Andrey Kamaev on Stack Overflow
🌐
scikit-image
scikit-image.org › skimage-tutorials › lectures › 00_images_are_arrays.html
Images are numpy arrays — Image analysis in Python
# --- read in the image --- image = plt.imread('../images/Bells-Beach.jpg') # --- assign each color channel to a different variable --- r = ... # FIXME: grab channel from image... g = ... # FIXME b = ...
🌐
Note.nkmk.me
note.nkmk.me › home › python › numpy
Image processing with Python, NumPy | note.nkmk.me
October 20, 2020 - By reading the image as a NumPy array ndarray, various image processing can be performed using NumPy functions. By operating ndarray, you can get and set (change) pixel values, trim images, concatenat ...
🌐
w3resource
w3resource.com › python-exercises › numpy › read-png-image-data-into-numpy-array-using-python.php
Read PNG image data into NumPy array using Python
September 1, 2025 - Write a Numpy program to load a PNG image into an array and then perform edge detection using convolution filters. Write a Numpy program to read an image file, convert it to a NumPy array, and then resize it using array slicing and interpolation.
🌐
Pluralsight
pluralsight.com › blog › tech guides & tutorials
Importing Image Data Into NumPy Arrays | Pluralsight
April 15, 2025 - To work with an OpenCV library, you need to install it in the virtual environment using pip install opencv-contrib-python. The cv2 package provides an imread() function to load the image. It also reads a PIL image in the NumPy array format.
🌐
Pythoninformer
pythoninformer.com › python-libraries › numpy › numpy-and-images
PythonInformer - Image processing with pillow and NumPy
October 2, 2022 - In this section, we will learn how to use NumPy to store and manipulate image data. We will use the Python Imaging Library (PIL) to read and write data to standard image file formats.
🌐
GitHub
gist.github.com › simecek › e5a7a9de9d568b3e1a291a5982dbd3c2
Example of Reading Image Into Numpy Array · GitHub
Example of Reading Image Into Numpy Array. GitHub Gist: instantly share code, notes, and snippets.
Find elsewhere
🌐
AskPython
askpython.com › python › examples › convert-images-to-numpy-arrays
How to Convert Images to Numpy Arrays in Python - AskPython
April 21, 2026 - OpenCV is faster than Pillow and the preferred choice when you are processing many images or need tight integration with computer vision code. It reads images as BGR by default, which trips up many people coming from other libraries. import cv2 import numpy as np arr = cv2.imread('sample.png') print(type(arr)) print(arr.dtype) print(arr.shape) print(f"Value range: [{arr.min()}, {arr.max()}]")
🌐
Chris35wills
chris35wills.github.io › courses › PythonPackages_numpy › numpy_io_scipy_image
Read in data using scipy (image)
You now have access to the routines available within scipy’s misc module. To read in the image, type the following: dog=misc.imread('/path/to/file/puppy.png') type(dog) You have now created a numpy array object holding the image information.
🌐
Stack Overflow
stackoverflow.com › questions › 62602397 › how-can-i-read-a-numpy-array-image-with-opencv
python - How can I read a numpy array image with OpenCV? - Stack Overflow
import numpy as np import cv2 images = np.load("file.npy") for i, img_array in enumerate(images): if len(img_array.shape) == 2: img = img_array elif len(img_array.shape) == 3: img = cv2.cvtColor(img_array, cv2.COLOR_RGB2BGR) gray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) _, thr_img = cv2.threshold(gray_img, 0, 255, cv2.THRESH_OTSU) cv2.imshow(f"Thresholded Image {i}", thr_img) cv2.waitKey(0) cv2.destroyAllWindows()
🌐
GitHub
github.com › luispedro › imread
GitHub - luispedro/imread: Read images to numpy arrays · GitHub
IO with images and numpy arrays. Mahotas-imread is a simple module with a small number of functions: ... imread_multi: Reads an image file with multiple images.
🌐
Analytics Vidhya
analyticsvidhya.com › home › image processing using numpy: with practical implementation and code
Image Processing Using Numpy: With Practical Implementation And Code
September 28, 2024 - # importing all the required libraries ... using the open() method from the PIL Image module. Similarly, we can use the matplotlib library to read and show images....
🌐
Clementine Blog
clementine.hashnode.dev › how-to-read-image-from-path-and-convert-to-a-numpy-array-in-python
How to read Image from Path and Convert to a NumPy Array in Python.
March 11, 2021 - Three methods to convert an image path to a NumPy array: Use OpenCV # OpenCV import cv2 img = cv2.imread(image_path) # reads an image in the BGR format img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) # BGR -> RGB Use Matplotlib # Use Matplotlib from...
🌐
Medium
medium.com › @wajihaabdullah44 › numpy-for-images-96e02dd44e0a
NumPy for images. You will learn some of the things you… | by Wajiha | Mathematics, Python & Maple Expert | Medium
November 30, 2023 - 4 min read · ·Nov 30, 2023 · ... in full size · Imagine that we have an image and we load it using matplotlib’s imread() function....
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-convert-images-to-numpy-array
How to Convert images to NumPy array? - GeeksforGeeks
July 15, 2025 - The result is a 3D array of shape (200, 400, 3) representing a color image. Example 2: In this example, we use np.array() from NumPy to convert an image into a NumPy array.
🌐
DataCamp
datacamp.com › doc › numpy › converting-images-to-numpy
Converting Images to NumPy
This example loads an image named `example.jpg` and converts it into a NumPy array, printing its shape, which represents the dimensions of the image in the format (height, width, channels).
🌐
Plain English
python.plainenglish.io › image-processing-in-numpy-267575d0e6b9
Image Processing in NumPy. Open and manipulate images in NumPy | by Mario Rodriguez | Python in Plain English
December 3, 2024 - To read an image into a NumPy array, we can use the imread() function provided by the imageio module (if you haven’t installed this module, you can install using pip). This function takes a file path as an argument and returns a NumPy array ...