[The following question is probably not really Qt dependent - save that I am working with Qt, and QImage to be more specific.]
I need to display an image that was scanned from some form.
[The image is black/white: i.e. the scanner removed the underlying form and saved only the things written on it. Therefore the image is solely user input.
This is done to reduce the amount of data to be stored.]
I would like to display the image and show the form beneath it. This is no problem with Qt. The issue I need to solve now is:
I would like to align the two images. (The scanned image usually is a bit translated/rotated as the paper is not always at the same spot etc on the scanner). On the form (and on the scanned image) are marks (in the corners are 'angles' |_, _|, ...)]. Therefore I need to determine the position of some 'marks' on the scanned image. With the position of two of these marks I can calculate the QTransform that will put the scanned image properly aligned back on top of the form.
Short summary:
user filled form
(scanner) -> b/w image of user input [this image is always a bit shifted...]
now: image of form + scanned image => image of the filled form that was the original input to the scanner
Problem: Where exactly is the 'origin' of the scanned image?
Are there (free?) libs that do this? Are there better ways than scanning for 'marks'?
Best regards, thank you for your time,
Christoph
Bookmarks