OpenCV-Python is the Python library designed to solve computer vision problems. We can read the Image using the imread() function, write or save the Image using the imwrite() function, display the image in the image window using the imshow() method.
To access pixel data in Image, use numpy and opencv-python library. Import numpy and cv2(opencv-python) module inside your Python program file. Then read the image file using the imread() function. The imread() Method takes two parameters.
Let’s print the Image.
## app.py
import numpy as np
import cv2
img = cv2.imread('forest.jpg', 1)
print(img)
#python #python opencv #opencv-python