1

Recently, I studied homography transformation (which adds an addition dimension to 2D points[x,y]->[wx,wy,x]) and projective geometry.

When I tried to transform the bottom part of photo 1 to the top of a new image, the result is wrong.

The reason I called it wrong is that the bottom part of photo 1 was projected onto the top part, as expected, of the new image but the top part of photo 1 is projected onto the bottom part of the new image. The top part of photo 1 is expected to be located "outside" the image (negative y).

Then, I found that the result could be correct if i eliminate the transformed pixels whose corresponding w is positive. The result is as photo 3.

I don't know how to mathematically or intuitively explain why the sign of w leads to different result. I guess sometimes negative w might work or be reasonable.

If someone want to thank about my post, i could provide my source code(matlab) with the photos.

Thank you!

photo 1

photo 2

photo 3

Alex Lin
  • 395
  • 3
  • 13

0 Answers0