The Problem with JPEG - Computerphile

592,175
0
Published 2015-06-09
Never use JPEG with text. But why? Image Analyst Mike Pound explains what goes wrong when JPEG tries to compress text.

Holy Grail of AI:    • Holy Grail of AI (Artificial Intellig...  
Computer That Changed Everything:    • Computer That Changed Everything (Alt...  
Arduino Hardware:    • Arduino Hardware - Computerphile  
How JPEG Works:    • How JPEG Works  

www.facebook.com/computerphile
twitter.com/computer_phile

This video was filmed and edited by Sean Riley.

Computer Science at the University of Nottingham: bit.ly/nottscomputer

Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com/

All Comments (21)
  • @Niosus
    Interestingly enough, the "no JPEG for scientific images" statement is a very real consideration for space missions. Now I'm pretty sure they don't actually use JPEG, but for New Horizons which is about to encounter Pluto, ALL of their images will be compressed in a lossy way. At that distance, bandwidth is very limited resource. Since they'll be flying past Pluto at a ridiculous speed, they have opted to apply lossy compression so they can get significantly more data back home. A good knowledge of what kind of compression artifacts are caused by the specific algorithm in use will be required to thoroughly clean up and analyze the images.
  • @theblackwidower
    He mentions text, but this applies to anything that's not a photograph, basically. Drawings and animation are the same, it's the sharp lines you want to preserve, not the general swaths of colour.
  • @BertGrink
    Another area where i find that JPEG falls short is in technical drawings, such as electronic circuit diagrams. I am an electronics hobbyist, and therefore often consult datasheets of various ICs, but i find that many, especially older, datasheets are often difficult to decipher due to artifacts. Just my two cents.
  • @ToniLahdekorpi
    People shoot in RAW not because of end result as-is, but because of the data in the image that can be used to edit the photo.
  • @TheBrickson98
    I usually don't have an issue picking up on stuff as I watch an informational video, but there's so many technical details in this, that I need to go watch that "how a jpeg works" video, and come back to this. I love it though. Learning the in depth details about something makes me feel like I actually know how it works. I always need to know the how and the why down to the smallest detail before I'm satisfied. This channel makes me research so much, and like I said before, I love it.
  • @gfetco
    JPEG is the reason why some people believe in Aliens on earth.
  • The term for those artifacts is “mosquitoing”. They are the image equivalent of “ringing” in digital audio.
  • Around about 1990, back when hard drives were a lot smaller and people still used floppies a lot, JPEG was an absolute revelation. The idea that you could take a photorealistic image and reduce the file size by a factor of 10 with no perceptible difference in image quality was stunning.
  • @parasharkchari
    When I first started working in film, I was actually surprised when I found out the extent to which they used JPEG for pretty much anything that didn't have to be HDR, which I presumed at the time to be too artifact-ridden to be of any use.  That said, it wasn't standard "web" JPEG.  It was generally 16-bit-per-channel, and mapped to Rec.2020 or DCI-P3 gamut rather than sRGB.  The idea with 16-bits per channel was based on the hope that the quantization errors like those described in the video would be reduced to such a small order of magnitude that they'd not be noticeable, and you'd anyway be mixing this with all nature of modifiers to the extent that errors like that would get lost in the mix. That said, it's not as if we used high degrees of compression either, but JPEG at 98% quality is still significantly smaller than anything lossless, so that was the real point.  Counts for a lot when you've got several hundred GB of data shuffling about for a single 20-second shot.
  • @TheDementation
    Nearly everyone has forgotten about variable jpeg compression within the same image. You can apply different levels of compression to different parts of the image - selective optimization.
  • @Fummy007
    Do I look like I know what a jpeg is?
  • @PrimeSonic
    I've been loving this series. I'm hoping we get to see something about PNG compression sometime.
  • @LurkerPatrol5
    As an astronomer I have to interject here. I run an imaging camera onboard a telescope and all our files are in the FITS format architecture. We need to retain the exact photon values for each pixel in order to be able to accurately measure stellar photometry, spectra (via grism), and to look for any artifacts. JPEG would completely compress this data making it completely poor for real science. Plus the issue of going from high luminosity to low luminosity would be a major issue with JPG given that stars basically go from thousands or even tens of thousands of photon counts to effectively 0 for space. Cosmic rays are even worse than that because they're not gradual like stars are with their 2D gaussian like profiles.
  • @MechMK1
    The whole "shooting in RAW" thing is like this: During the entire production chain of a photograph, you want to keep as much information as possible. Only during the final step, publishing, it makes sense to publish as JFIF to get some "workable" file sizes. Same for any other industry (video, music, etc...)
  • @GimliTehDwarf
    What an amazing series! Thank you Ive always wanted to figure out how that works and now I have a much better idea. The guys that came up with these compression methods are genius!
  • @Khaltazar
    I prefer using .png most of the times for small images the file size is smaller, and the image quality is better. I'm not sure at what size .jpeg files become less file size than .png, but .png works for my purpose.
  • @xavinitram96
    We want more videos with Mike! Those videos about graphics are just awesome!!!
  • @deeliciousplum
    After all these years of being troubled by the appearance of speckles, this Computerphile upload helps me to better understand their presence. When making a collage where some of the images used had text with speckles, it added to the time needed to make the collage. Cleaning up the speckles is such a chore.
  • @Soundole
    I've found this series about JPEG compression extremely fascinating and enlightening - thanks for putting them together!