How to compute the 4 X 4 homogeneous transformation matrix for an image in python

2.7k Views Asked by At

I have an image and I want to obatain the homogeneous transformation matrix of that Image in python. Image. Can someone please help me?

Thank you very much.

1

There are 1 best solutions below

8
On

A translation matrix (a transformation matrix for translation) is of the form -

[[1, 0, 0, tx],
 [0, 1, 0, ty],
 [0, 0, 1, tz],
 [0, 0, 0, 1]]

You could use imutils library which has convenient implementations of these transformations or refer to the official opencv docs.

I hope this helps.