OPENCV AND PYTHON
HOW TO READ IMAGE USING OPENCV AND PYTHON
// Start the code
import cv2
img = cv2.imread("Resources/my.jpg")
cv2.imshow("Image", img)
cv2.waitKey(0)
// End the code
import cv2 - Import the our OpenCV package
img = cv2.imread("Resources/my.jpg") - "imread" function use for read the image, with in bracket provide the image path.
cv2.imshow("Image", img) - "imshow" function use to display the image, with in bracket provide the window name and name of matrix. "Image" is the window name.
cv2.waitKey(0) - make display time delay. here I use '0' for the take to the infinity delay.
No comments:
Post a Comment