2

I am trying different image alignment approaches to align the images containing texts using Computer Vision. I have tested following image alignment approaches:

But I couldn't align the document(identity documents such as citizenship, passport, license etc) images with different backgrounds perfectly using the above approaches.

This is a sample test image(important information are hidden due to privacy issue).

Idendity Document Image

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!

npn
  • 304
  • 1
  • 14
  • If you want to make that image straight you can: 1) load image, grayscale, gaussian blur, otsu's threshold, find contours, find rotated bounding rect, then perform 4 point perspective transform to obtain a birds-eye view of the image. 2) second approach is find corner points with shi tomasi corner detection then perspective transform – nathancy May 04 '22 at 08:52

1 Answers1

0

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:

  1. Implementing a GUI as a fallback solution, so the user could select the contour.

  2. 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.

Knipser
  • 347
  • 1
  • 13