import cv2
import numpy as np
img = cv2.imread('../images/child.jpg')
rows, cols, ch = img.shape
pts1 = np.float32([[50, 50], [200, 50], [50, 200]])
pts2 = np.float32([[10, 100], [200, 50], [100, 250]])
M = cv2.getAffineTransform(pts1, pts2)
dst = cv2.warpAffine(img, M, (cols, rows))
cv2.imshow('Input', img)
cv2.imshow('Output', dst)
cv2.imwrite('getAffineTransformImg.jpg', dst)
cv2.waitKey(0)
cv2.destroyAllWindows()

df4d2acc2cf99ff863b392f846eb85f97786cad6
<mask token>

<mask token>
cv2.imshow('Input', img)
cv2.imshow('Output', dst)
cv2.imwrite('getAffineTransformImg.jpg', dst)
cv2.waitKey(0)
cv2.destroyAllWindows()

<mask token>
img = cv2.imread('../images/child.jpg')
rows, cols, ch = img.shape
pts1 = np.float32([[50, 50], [200, 50], [50, 200]])
pts2 = np.float32([[10, 100], [200, 50], [100, 250]])
M = cv2.getAffineTransform(pts1, pts2)
dst = cv2.warpAffine(img, M, (cols, rows))
cv2.imshow('Input', img)
cv2.imshow('Output', dst)
cv2.imwrite('getAffineTransformImg.jpg', dst)
cv2.waitKey(0)
cv2.destroyAllWindows()

import cv2
import numpy as np
img = cv2.imread('../images/child.jpg')
rows, cols, ch = img.shape
pts1 = np.float32([[50, 50], [200, 50], [50, 200]])
pts2 = np.float32([[10, 100], [200, 50], [100, 250]])
M = cv2.getAffineTransform(pts1, pts2)
dst = cv2.warpAffine(img, M, (cols, rows))
cv2.imshow('Input', img)
cv2.imshow('Output', dst)
cv2.imwrite('getAffineTransformImg.jpg', dst)
cv2.waitKey(0)
cv2.destroyAllWindows()
