I have some Points and Lines from original image and the corresponding points and lines from top view image.

-> I tried to find homography using points

  1. Used OpenCV function findHomography(objectPointsPlanar, imagePoints) :

    • It takes 4 points from original image and 4 points from top view image(required image) and it returns homography matrix of 3x3.
  2. Used mathematical formula to find homography matrix (Didn't use any library) :

    • Please look at the attached images for the formula to find homography matrix using 4 points by your own. Formula to find homography matrix using 4 points
    • I have tested the formula by writing it in c++. It gives the homography matrix same as given by opencv function findHomography().

PS : I used the determined homography matrix to warp the image, but I am not happy with the output. It doesn't come to be accurate. So I am thinking to use lines to find homography matrix.

-> Homography determination using Lines :

  • I tried to look for any library which can find homography matrix using lines, but I didn't get.
  • I also looked at research papers to get the mathematical formula to find the homography matrix, but was not able to understand the formula.
  • I am sharing the link of a research paper : A new normalized method on line-based homography estimation

So could someone please help me to find the homography matrix using lines.

Thanks in advance, Regards.

  • $\begingroup$ I'm not sure I understand what you're after. $\endgroup$
    – Royi
    Aug 31 '19 at 6:49
  • $\begingroup$ I want to find homography using lines. How to find homography using lines ? $\endgroup$
    – User4680
    Sep 2 '19 at 4:58
  • $\begingroup$ Have you developed what is the general closed form transformation for a line? $\endgroup$
    – Royi
    Sep 2 '19 at 5:05
  • $\begingroup$ Do you mean line equations ? $\endgroup$
    – User4680
    Sep 2 '19 at 5:11
  • $\begingroup$ I have got the line equations for some 4-5 lines. $\endgroup$
    – User4680
    Sep 2 '19 at 5:12

I think you can't do Homography on lines.

I don't remember the equations but I don't think lines in one image are kept as lines in the other image.

What you can do is treat a line as set of points and have Homography estimation using many point samples.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.