Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Affine Transforming Coordinate Set

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?

click to hide/show revision 2
retagged

updated 2015-01-22 09:34:13 -0600

berak gravatar image

Affine Transforming Coordinate Set

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?