how to match paper sheet by opencv
<p>I have some kinds of paper sheet and I am writing python script with opencv to recognize the same paper sheet to classify. I am stuck in how to find the same kind of paper sheet. For example, I attached two pic. Picture 1 is the template and picture 2 is some kind of paper I need to know if it is matching with the template. I don't need to match the text and I just need to match the form. I need to classify the same sheet in many of paper sheet. </p>

<p>I have adjust the skew of paper and detect some lines but I don't know how to match the lines and judge this paper sheet is the same kind with the template.</p>

<p>Is there any one can give me an advice for the matching algorithm?<a href="http://i.stack.imgur.com/9iGD0.jpg" rel="nofollow"><img src="http://i.stack.imgur.com/9iGD0.jpg" alt="This is the paper sheet template"></a><a href="http://i.stack.imgur.com/S5W4u.jpg" rel="nofollow"><img src="http://i.stack.imgur.com/S5W4u.jpg" alt="This is the paper sheet I need to match with the template"></a><a href="http://i.stack.imgur.com/L2KIy.png" rel="nofollow"><img src="http://i.stack.imgur.com/L2KIy.png" alt="Need matching the lines"></a></p>

<p>I'm not sure if such paper form is rich enough in visual information for this solution, but I think you should start with feature detection and homography calculation (opencv tutorial: <a href="http://docs.opencv.org/3.0-beta/doc/tutorials/features2d/feature_homography/feature_homography.html#feature-homography" rel="nofollow">Features2D + Homography</a>). From there you can try to adjust 2D features for your problem.</p>

python c++ algorithm opencv matching