[argyllcms] Re: scanin and perspective distortion

  • From: Graeme Gill <graeme@xxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Wed, 06 Feb 2008 11:41:29 +1100

Guy K. Kloss wrote:
Doing this I have discovered the following, which is not an issue for scanners as input devices. The scanin tool seems to be relatively robust towards pure rotation and (uneven) scaling as long as it is along the target's axes. For testing I've created a few test samples. These are the problematic circumstances:

 * perspective distortion
 * pin cushion type distortion
 * rotation with uneven scaling
   (or scaling along a non-main axis of the target)

Any clues on solving this problem either in software or in handling the test setups? If bad comes to worse I've got to dig deeply into the OpenCV tricks box and try to undo certain distortions of the image before the characterisation process. However, I'd rather like to avoid that to not induce a higher error than necessary.

It's non-trivial. The chart recognition code is based on the assumption
that there is only rotation and axis scaling. This was based on
the limited computing power at the time I wrote it (66MHz 486),
and the assumption that I was dealing with scanner output.

Allowing for the above distortions might require a different approach,
or further pre-processing. One brute force approach would be to
create a model for the sorts of distortion you want to deal with,
and then use an optimization routine to adjust the parameters
to make the edge detected line segments be as aligned as possible,
before restarting the recognition process with compensation for
the distortion.
Some better smarts about breaking long lines of pixels into
segments that would approximate curved lines might be needed too.

Graeme Gill.

Other related posts: