Skip to content

Instantly share code, notes, and snippets.

@Princekrampah
Created June 1, 2022 01:46
Show Gist options
  • Save Princekrampah/5f4cb48151a5a2baee13b32570fb1199 to your computer and use it in GitHub Desktop.
Save Princekrampah/5f4cb48151a5a2baee13b32570fb1199 to your computer and use it in GitHub Desktop.
import cv2
# we load in the image
img = cv2.imread("images/image1.jpg")
h, w, c = img.shape
print(f"Height: {h}, width: {w}, channels: {c}")
# we create a window and display the image
cv2.imshow("Image 1", img)
# we click the window created and press any key to close the window
cv2.waitKey(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment