Develop the program to perform linear transformation on a image.
import cv2
img = cv2.imread('k.jpg') (h, w) = img.shape[:2] center = (w / 2, h / 2)
angle90 = 90 angle180 = 180 angle270 = 270
scale = 1.0
M = cv2.getRotationMatrix2D(center, angle90, scale) rotated90 = cv2.warpAffine(img, M, (h, w))
M = cv2.getRotationMatrix2D(center, angle180, scale) rotated180 = cv2.warpAffine(img, M, (w, h))
M = cv2.getRotationMatrix2D(center, angle270, scale) rotated270 = cv2.warpAffine(img, M, (h, w))
cv2.imshow('Original Image',img) cv2.waitKey(0) cv2.destroyAllWindows()
cv2.imshow('90 degree',rotated90) cv2.waitKey(0) cv2.destroyAllWindows()
cv2.imshow('180 degree',rotated180) cv2.waitKey(0) cv2.destroyAllWindows()
cv2.imshow('270 degree',rotated270) cv2.waitKey(0) cv2.destroyAllWindows()