Move coordinate system of a 3x3 homography matrix

743 Views Asked by At

I have a $3 \times 3$ homography matrix $H$. It was computed the way so that I can multiply a point of my image ($1000 \times 1000$px with coordinates $0/0$ to $1000/1000$) e.g. $1/1$ and get the new position of that point e.g. $2/2$.

But I would like to have this homography matrix the way that I can multiply a point of my picture in centered form. Coordinates $-500/-500$ to $500/500$ instead of $0/0$ to $1000/1000$. So I want to multiply the point $-499/-499$ and get $-498/-498$.

I hope my explanation wasn't too confusing and someone can help me. Is it possible to move the coordinate system of $H$?

1

There are 1 best solutions below

1
On BEST ANSWER

Biases aren't linear transforms. For instance, if $f(x) = x + a$, then $f(x+y) = x + y + a \neq f(x) + f(y) = x + y + 2a$. Thus, you will not be able to modify your $3\times 3$ transform matrix to affect this coordinate shift. What you will need to do instead is more along the lines of an affine transformation:

$$ \mathbf{H} \left( \mathbf{x} + \mathbf{b} \right) - \mathbf{b} $$

For your specific case, it looks like $\mathbf{b} = \left[ -500, -500, 0 ] \right]$.