In OpenCV, I can affine transform an image using:
M = np.float32(...)
array_tform = cv2.warpAffine(arr, M, (cols, row))
this works if the image is represented as bitmap.
What about if the "image" is instead represented as a set of points (coordinates)? i.e. I want to perform the affine transformation on a set of points. For example, translate by (+1,+1)
:
{ (1, 2), (3, 4) } --> { (2, 3), (4, 5) }
Is there a way to affine transform a point set?