How are Images Compressed? [46MB ↘↘ 4.07MB] JPEG In Depth

3,417,943
0
Published 2021-12-23
Go to brilliant.org/BranchEducation/ to sign up for free, and expand your knowledge. The first 200 people will get 20% off their annual premium membership.

You've probably saved 1000s of JPEG images, but do you know what exactly JPEG does? Our smartphones and cameras save images in JPEG format, furthermore, the majority of images you see on the internet are saved using JPEG compression. This format is everywhere, but do you know exactly how it works? Well in this video we're going to explore the JPEG compression format. This is a rather complicated video, so it may take watching it a few times through to understand it all.

Do you want to support in-depth engineering and technology education? Support us on: www.patreon.com/brancheducation

Website: www.branch.education/
On Facebook: www.facebook.com/BranchEducation/
On Twitter: twitter.com/TeddyTablante
On Insta: www.instagram.com/brancheducation/

Or Join us on YouTube Memberships: youtube.com/channel/UCdp4_l1vPmpN-gDbUwhaRUQ/join

Script, Modeling, Animation: Teddy Tablante
Twitter: @teddytablante
Voice Over- Phil Lee
Nature Photography- Tobias Karlsson

Table of Contents:
00:00 - Intro into JPEG
01:24 - What does JPEG do?
02:35 - What are the Steps of JPEG?
04:06 - Color Space Conversion
06:06 - Discrete Cosine Transform
09:32 - Quantization
11:02- Run Length and Huffman Encoding
12:04 - H.264 Video Compression
13:25 - Rebuilding an Image
15:01 - Notes and Caveats on JPEG
17:06 - Sponsored by Brilliant
18:20 - Outro

Key Branches from this video are: How does a Camera Work? How do SSDs Work?

Erratum:
Tulips are not the same as Lillies.

Animation built using Blender 3.0.0 www.blender.org/
Post with Adobe Premiere Pro

References:
A Trip Through the Graphics Pipeline 2011: Index
fgiesen.wordpress.com/2011/07/09/a-trip-through-th…

DCT (Discrete Cosine Transform)
asecuritysite.com/comms/dct2

H.264 is Magic
sidbala.com/h-264-is-magic/

How JPEG Works
cgjennings.ca/articles/jpeg-compression/

Jack, Keith. Video Demystified. Fifth Edition. Elsevier 2007.

JPEG 101 - How does JPEG Work?
arjunsreedharan.org/post/146070390717/jpeg-101-how…

JPEG: Image Compression Algorithm
pi.math.cornell.edu/~web6140/TopTenAlgorithms/JPEG…

What is H.264?
www.streamingmedia.com/Articles/Editorial/What-Is-…

Wikipedia contributors. "Chroma Subsampling", "Chrominance", "Chroma Subsampling", "Discrete Cosine Transform", , "JPEG" , "
Wikipedia, The Free Encyclopedia. Wikipedia, The Free Encyclopedia, Visited December, 2021


Music Credits
Kindred

#JPEG #Camera #Picture

All Comments (21)
  • @jontrout2010
    It never ceases to amaze me how much computation goes into things we take for granted and how inconceivably fast it happens over and over again...
  • @ffk1466
    This channel is researching and (perfectly) presenting exactly what you think in your spare time
  • @microcolonel
    As somebody who has worked on JPEG implementations, I am still amazed by how perfect they got it on the first try. JPEG has been around for ages, and is still so good; only recently have meaningful replacements emerged, and JPEG still has some benefits over these.
  • @levonja
    Up until now, I just thought JPEG lumps some similar colours together to save on file size. This was literally eye-opening. What an algorhythm!
  • @DerpyNetworking
    You cover topics that I've always wanted to know and in the right amount of detail.🥰
  • @ariyagozlo7983
    as someone whos on youtube a lot, these still manage to be some of the best videos. The research, editing, the pace of the lesson. Thank you guys for the hard work
  • @AA-bd
    It's truly impressive how you managed to explain these complex processes in less than 20 minutes! The clarity and conciseness of your explanations made understanding these concepts much easier. Thank you!
  • Great explanation on JPEG. I knew it compressed in blocks, and I vaguely knew it averaged color, but seeing this level of detail is amazing. Well done!
  • I have a degree in computer science and I'm still amazed how good your channel is! Always wondered how JPEG compression worked. You have illustrated it in super simple terms and visualizations have as always been awesome! Happy to see more content like that, maybe more details on H.264.
  • There's just nothing like these videos, really. I'm blown away every time. The voice-over and writing are just so far beyond anything else out there. I wish all information could be presented in this calm, clear, and concise manner than also somehow manages to never dumb it down.
  • An absolute masterpiece of explanation. I've tried to understand how DCT works in JPEG before, and never understood the dry maths-only explanation. This video changed that and the image tables explained it perfectly. Thanks for filling in a gap that's been in my head for many years!
  • @Stripcherry3
    As someone who has studied image and video compression at university, I can say this is a GREAT video and it's spot on. It explains the basics in just the right amount of detail to get a general understanding. Would have helped me a lot in the beginning.
  • @Slettador
    Great Video, just a little feedback on chroma subsampling: The reason why the human eye can perceive more luminance resolution than chroma isn't because of the number of rods vs cones. The rods are actually inactive in all but the darkest lit environments, and their density in the fovea i.e. the center of the visual field on the retina is actually rather low. So the RGB cone cells are solely responsible for tristimulus color vision. The actual reason for the color resolution difference is because there is some amount of cell level processing happening in the eye before the signal reaches the visual nerve. This is very much analogous to the Lightness chroma separation done in digital images. Also, there is some correlation between spatial resolution of each of the red, green and blue cones in terms of the lightness but little correlation between them in terms of the color. Those effects together cause the lower chroma resolution of the human visual system.
  • @joachim2464
    Another factor that compression works so well is that your brain all the time fills in the «gaps» in information. Especially when watching video. Our eyes is actually worse than you think. The brain does a huge amount of work filling in various gaps in information. For example each of our eyes has a blind spot. We usually do not see it since the brain erases it and fills in the missing information
  • @Drag0nStorm1
    really love the little details, the secondary animations in each text header for each step in compression being unique to that compression technique itself. praise your mograph artist/animator/editor!
  • @Zveebo
    The is the best and clearest explanation of JPEG compression that I have seen anywhere – great job!
  • @anderson_maciel
    18 minutes to teach us what our smartphones does in miliseconds. Awesome!
  • @Adrian-nq2bp
    It is incredible how complex things that we take for granted on a daily basis can be
  • @mikeogden6655
    I never thought that there was so much computing behind each image. I am truly humbled by your work team. Thanks!
  • Came across your channel this week. Must say that your explanations are exceptional in the sense that they convey technical details very clearly and also very quickly grab the attention of the viewer. Exceptional i tell you. Keep it up. You should he used as the benchmark for teachers and lecturers all around the world.