开发者

MATLAB: How to find the image of the line at infinity corresponding to a plane?

There is an image of two separated papers on the floor.

How to find the image of the line at infinity corresponding to the plane of the floor?

See the image at: (larger)

MATLAB: How to find the image of the line at infinity corresponding to a plane?

Anyone has some idea 开发者_JAVA百科on how to start with MATLAB?

Thank you,


I'm not going to go into matlab specific bits but wil talk about the algorithm I'd use.

Considering only one piece of paper the algorithm goes something like this.

  1. Find the corners of the paper
  2. Choose one set of parallel edges and find their intersection in the image call this point P1
  3. Find the intersection point of the other pair of parallel edges. Call this P2.
  4. Your horizon line (or line at infinity) is the line joining P1 and P2 (extending beyond them)

However I'm not sure how robust this will be to

  1. Image processing artifacts
  2. Not perfectly rectangular paper.
  3. Numerical issues.

You should be able to use both pieces to get an improved approximation to the solution. For example you could calculate P1 and P2 for both pieces and finding the line of best fit through the 4 points.

Hope this gives you some ideas.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜