I've built a snapshot from the current sources. You can download it from here:
http://www.onlinedisk.ru/file/334746/
It has the code to handle complex non-uniform illumination cases such as Antoha-spb's ones. It will automatically decide on which algorithm to use for that purpose.
It also has the updated Rob's dewarping algorithm, though it's not complete yet. First, its parameters are hardcoded and not changable, then it only works in B/W output mode and 600 dpi output resolution. It's also slow, though I see a few ways to speed it up. All of the above limitations I am able to fix myself, and will eventually do so.
