Lab Program 8
Lab Program 8
on an image
translation_y = 50
height, width = image.shape[:2]
• Slicing operator [:2] extracts the first two elements from the shape
tuple. i.e height and width
• Ignores the third element (‘channels’) if present.
cv2.destroyAllWindows()
waitkey()
cv2.waitKey(0)
cv2.destroyAllWindows()
• The function cv2.destroyAllWindows() is used in
OpenCV (cv2) to close all the OpenCV windows that
were created with cv2.imshow().