3 ms·
The JPEG bitrot interstitial got me thinking... I wonder how difficult it would be for an algorithm to correct that? The corrupted image doesn't look anything l
by Wowfunhappy 6y ago
The JPEG bitrot interstitial got me thinking... I wonder how difficult it would be for an algorithm to correct that? The corrupted image doesn't look anything like a normal image, so, just try flipping bits and see what results in something more photographic. And maybe present multiple options to the user if the algorithm isn't confident.
- deleted 6y ago[deleted]
- mceachen 6y agoThat's really interesting: it's pretty apparent in most images when an 8x8 block is borked. It could just randomly flip bits to minimize entropy in both his and lightness channels.
- remram 6y agoYou can try to flip bit to remove entropy, e.g. make the JPEG blocks less prominent. However unless you happen to know how many bits to flip, or are lucky enough that only low frequency information is ever destroyed, this operation is more akin to blurring than to magic information retrieval.
- Wowfunhappy 6y agoWe may not know how many bit flips occurred, but we can probably assume it's in the low single digits, right? So, try flipping each bit, and see if any one of them results in a very large improvement. If there are no matches, try every combination of exactly two bits, then every combination of three, and so on. Would that result in blurring? Perhaps the example shown in the article (where each individual bit flip resulted in major, obviously abnormal changes) was atypical?
- gspr 6y ago> We may not know how many bit flips occurred, but we can probably assume it's in the low single digits, right? So, try flipping each bit, and see if any one of them results in a very large improvement. If there are no matches, try every combination of exactly two bits, then every combination of three, and so on. There are almost 10²⁰ ways to flip 3 bits in 1 MB. This approach seems unfeasible if any more than 1 bit has been flipped.
- faeyanpiraat 6y agoHave we found a new, and actually useful proof of work algorithm?
- Wowfunhappy 6y agoYeah, I guess I didn't do the math on that. Even the ability to correct single bit flips would be useful though. I can also imagine much faster ways to do it... for instance, since the tops of the images are fine, the problem is likely in the 8x8 block where the corruption began (and the user could point to this).
- remram 6y agoThere could be fewer than you think or the picture could be (locally) sharper than usual, and you'll just blur it.
- sova 6y agoThere are neural nets that can "enhance" images and some recolorization software (for black and white footage from years ago) will actually improve resolution.
- pjc50 6y agoIf you have an EXIF thumbnail in the file, you could use it as a reference image. Although a codec block in the main image will probably be one pixel or less in the thumbnail.