Document image analysis techniques