I am trying different image alignment approaches to align the images containing texts using Computer Vision. I have tested following image alignment approaches:
Probabilistic Houghlines Transform to align images according to the detected lines.
Is there are any other approaches of image alignment which can align the document images perfectly by correcting the skewness of the available text. My main focus is to extract the information form document using OCR preserving the information sequence in the document image. Thank you!
CodePudding user response:
To me, the third approach seems to be the most promising. But as you said, a cluttered background is a problem. Two ideas came to me about this:
Implementing a GUI as a fallback solution, so the user could select the contour.
Render some artificial dataset of official documents against a cluttered background and train a CNN to predict a segmentation map of the document. This map could be used then, as an initialization for the edge detection / contour detection. This answer contains two links to databases of images of official documents. Maybe these are of some use for you.
CodePudding user response:
I think you can check my github. I implemented an image alignment algorithm on Fastesr_Image_Pattern_Matching repo. I believe no matter what the background is, only if the ID card itself keeps unchanged, selecting the whole card as golden sample can solve your problem.
https://github.com/DennisLiu1993/Fastest_Image_Pattern_Matching