I am trying to perform inverse warping given a homography matrix, and to do that efficiently I need a numpy array that looks like this:
([[0, 0, 1], [0, 1, 1], [0, 2, 1], ... [1, 0, 1], [1, 1, 1], ... [n, p, 1]])
Where n is an image's width (im.shape[0]
) and p is the image's height (im.shape[1]
). Any idea on how to efficiently construct numpy arrays that look like that?
Edit:
There is some discussion on which is the fastest, if anyone has any info on that I think it'd be interesting to hear. I appreciate everyone's help!