Is there a simple command that will intensify each contrast area to B&W ?
Like the HDR, that can "pull out" details in dark areas;
then the desired result :
Since the document is essentially Black and white (text), the final result should have maximum contrast,
Maximum 4 to 8 colors.
original image:

process by a program called "PageLift"; I couldn't find how it works:

I tried:
-gamma : values 2.0 - 4.0. The image was relatively balanced, but still dark, contrast was low;
-evaluate pow (this is essentially the same)
-log 100 (relatively good results, i don't know how to explain its significance in words)
-level 50 - similar to the gamma results, but more blur
-modul120-90 : different regions differ for each other
-sigmoid - blurry and inconsistent
here's the gamma 3 result:

I have intermediate experiene in ImageMagick.
I couldn't find "HDR Effect" - if such exists.
If possible,
I'd like to get pointers to either options, or scripts,
or (if possible

imagemagick 7.0.5
windows 7 via console (CMD)
I can also use bash
__________
*i'd use PageLift for all documents, but it doesn't have command line interface...