Hacker News new | ask | show | jobs
by Dwedit 3 days ago
Speaking of which, are there any good ways to undither images? Things like GIMP FFT are not perfectly reversible.
4 comments

It's a somewhat active inverse problems research subfield https://github.com/MenghanXia/ReversibleHalftoning
That one does not seem to be an undither project, it appears to be a special way to encode chroma information within a monochrome dithered image. NTSC television also encodes chroma within a grayscale signal, but that's different than black and white only.
No, although AI gets really close. Dithering represents adding noise to an image and also represents doing a lossy type of compression.
Dither loses information, so perfectly reversible might be an unreasonable goal. But I bet you could train or fine-tune a denoiser to do a really good job. This might make a cool paper, if there’s anything at all non-standard or surprising you discover along the way.
When I mentioned "perfectly reversible", I meant the FFT itself. You run the FFT. You run the inverse FFT. Because the FFT was quantized to 0-255, you end up with a lot of stuff that doesn't belong in the image.
Gotcha, that’s true. There’s gradations of non-reversible. FFT in practice is still not perfectly reversible, even if you use floats and don’t quantize to 8-bit. Anyway, yeah, dither will be even more non-reversible, but given how good today’s denoisers are, I bet de-dither could be pretty good if it was attacked with the same level of rigor as denoise has been.
Do you want to undither, or un-half-tone, like the images in TFA?

Unhalftoning is called descreening.

I use this:

https://descreen.net/