3 ms·
Except that JPEG built on decades of academic research. It's the exact opposite of a dirty hack that just happens to work well enough to stick. The magic is doi
by Certhas 4y ago
Except that JPEG built on decades of academic research. It's the exact opposite of a dirty hack that just happens to work well enough to stick. The magic is doing the foundational research, iteratively, painstakingly, over decades, without the constraints of getting a concrete job done:
https://en.wikipedia.org/wiki/JPEG#Background https://en.wikipedia.org/wiki/JPEG#Background
> The original JPEG specification published in 1992 implements processes from various earlier research papers and patents cited by the CCITT (now ITU-T) and Joint Photographic Experts Group.[1] The main basis for JPEG's lossy compression algorithm is the discrete cosine transform (DCT),[1][8] which was first proposed by Nasir Ahmed as an image compression technique in 1972.[9][8] Ahmed developed a practical DCT algorithm with T. Natarajan of Kansas State University and K. R. Rao of the University of Texas in 1973.[9] Their 1974 paper[15] is cited in the JPEG specification, along with several later research papers that did further work on DCT, including a 1977 paper by Wen-Hsiung Chen, C.H. Smith and S.C. Fralick that described a fast DCT algorithm,[1][16] as well as a 1978 paper by N.J. Narasinha and S.C. Fralick, and a 1984 paper by B.G. Lee.[1] The specification also cites a 1984 paper by Wen-Hsiung Chen and W.K. Pratt as an influence on its quantization algorithm,[1][17] and David A. Huffman's 1952 paper for its Huffman coding algorithm.[1]
The JPEG2000 standards major move forward was using wavelets instead of cosines, building on a different strand of research also going back decades...
- WithinReason 4y agoYes, the process of coming up with JPEG was extremely thorough. I recall from a uni lecture that originally multiple working groups were pursuing multiple research directions. Then they selected the 2 most promising and focused on those, and eventually the current JPEG codec emerged as winner. They meticulously hand-tuned the quantisation tables too. The process lasted about 6 years (1986-1992). No wonder it's still the most widespread codec. JPEG stands for Joint Photographic Experts Group for a reason!
- HarHarVeryFunny 4y agoRegardless of how long it took to derive, the JPEG standard is still pretty straight forward and obvious. Perhaps more so in hindsight? 1) Convert image to YUV color space so that brightness (Y) component can be compressed separately from color (UV) components to which humans are less sensitive. 2) Transform each component (YUV) to frequency domain, then throw away image fine detail, i.e. high frequency components, according to desired level of compression. This obviously is the key idea. 3) Encode remaining frequency components to as small a size a possible Once the general idea for this approach was conceived, it seems a rather minor step to try DCT vs the more obvious FFT for the frequency encoding. DCT gives slightly better compression. The approach isn't dependent on Huffman encoding for step 3) either - any encoding scheme would work, so experimentation would also have worked there to see what gives best compression on some set of test images.