@flawr I finished my
implementation. As you can see, it works exceptionally well on real-world photos (and videos) (even better than many commercial variants I tested), but it does suffer from the low information content in the test images (apart from the 1bit images, those are rendered perfectly). I'll type up the answer tomorrow, as the explanation is rather complex :)