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)
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.
- Find the corners of the paper
- Choose one set of parallel edges and find their intersection in the image call this point P1
- Find the intersection point of the other pair of parallel edges. Call this P2.
- 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
- Image processing artifacts
- Not perfectly rectangular paper.
- 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.
精彩评论