I have been able to transform/warp images with a homography matrix using the cv2.warpPerspective function. However, when I do not use openCV and want to use something more low level - currently, I'm using OpenGL to draw some graphics and I want to apply a known homography matrix to specific vertices, I am unable to apply a homography matrix as such:
For point (x, y), I make it (x, y, 1). Then with my homography matrix H, I multiply H*(x,y,1). H is 3x3 matrix and (x,y,1) is 3x1, so I obtain a new (x',y',z') that is 3x1. But this point doesn't seem to be correct?
I have been able to get the correct transformed new point using the method here: https://math.stackexchange.com/questions/296794/finding-the-transform-matrix-from-4-projected-points-with-javascript but I really want to know why this is not working!