JPEG format

Image format
Collection
zero Useful+1
zero
synonym jpg (jpg) Generally refers to JPEG format
JPEG (Joint Photographic Experts Group) is an image compression technology standard developed by an expert group of the same name International Organization for Standardization (ISO) formulation is a kind of continuous tone still image oriented Compression standard [1] JPEG format is the most commonly used Image file format Suffix Name Is jpg Or. jpeg.
Chinese name
JPEG format [1]
Extension
. jpg or. jpeg [2]
Full English name
Joint Photographic Experts Group [1]
Category
Image file format [2]
Mode
Lossy compression [2]
Year
one thousand nine hundred and ninety-two [3]

brief introduction

Announce
edit
JPEG (Joint Photographic Experts Group) Joint Photographic Expert Group , is used for continuous tone static image compression A standard of, File suffix Is jpg Or. jpeg, which is the most commonly used image file format. It mainly adopts Predictive coding (DPCM)、 discrete cosine transform (DCT) and Entropy coding Union of Coding method To remove redundant image and color data, belonging to Lossy compression Format, which can compress the image in a very small Storage space , to some extent image data Damage. Especially if the compression ratio is too high image quality Reduce. If you want to pursue high-quality images, you should not use too high compression ratio. [2]
JPEG can use lossy compression to remove redundant image data disk space Get better Image quality Moreover, JPEG is a very flexible format with adjustment image quality Which allows different Compression ratio For example, file compression supports multiple compression levels. The compression ratio is usually 10:1 to 40:1. The higher the compression ratio, the lower the image quality; On the contrary, the smaller the compression ratio, the higher the image quality. For the same image, the file stored in JPEG format is 1/10~1/20 of other types of files, usually only dozens KB mass loss It is small and can hardly be seen. JPEG format mainly compresses high-frequency information, and retains color information well, which is suitable for Internet applications; It can reduce image transmission time and support 24 bits True color It is also widely used in images requiring continuous tone.
JPEG format can be divided into standard JPEG, progressive JPEG and JPEG2000. [2]
1. Standard JPEG format; This type can only be downloaded from top to bottom Display Image , until all the image data are downloaded, you can see the full picture of the image.
2. Progressive JPEG; When downloading a web page, this type first presents the rough appearance of the image, then slowly presents the complete content. Moreover, documents saved in progressive JPG format are smaller than those saved in standard JPG format. Therefore, if you want to use images on a web page, you can use this format more often.
3. JPEG2000; It is a new generation of image compression method, with higher compression quality, and can improve the Wireless transmission It is often caused by unstable signal Mosaic phenomenon And disordered location to improve the transmission quality.

performance

Announce
edit
JPEG performance, using quality and Bit rate By comparison, it is quite superior. Its advantages are: [3]
  • It supports a very high compression rate, so the download speed of JPEG images is greatly accelerated;
  • It can easily process 16.8M colors, and can reproduce full-color images well;
  • In the process of image compression, the image format can be freely selected between the minimum file size (minimum image quality) and the maximum file size (maximum image quality);
  • The file size of this format is relatively small and the download speed is fast, which is conducive to transmission when the bandwidth is not "rich".
The disadvantages of JPEG are:
  • JPEG is a still image format and does not support animation. For images requiring animation effects, other formats, such as GIF or WebP, should be used;
  • When compressing, the quality of the image may be lost, so it is not suitable to use this format to display high-resolution images.
JPEG is impressive for its low complexity and long usage time. The following are the criteria for measuring the compression coding effect of images of 8 bit/pixel moderately complex pictures:
  • 0.25 bit/pixel~0.5 bit/pixel; Medium to good, enough to meet some applications;
  • 0.5 bit/pixel~0.75 bit/pixel; Good~very good, enough to meet many applications;
  • 0.75 bit/pixel~1.5 bit/pixel; Excellent enough to meet most applications;
  • 1.5 bits/pixel~2.0 bits/pixel; It is difficult to distinguish from the original image, enough to meet most applications;
  • >2.0 bits/pixel; Almost perfect, meeting almost all applications.
Where bit/pixel is defined as compressed image (including chroma Component) divided by the number of samples of the luminance component. [3]

Compression standard

Announce
edit
JPEG standard
JPEG was established in 1986, and the standard was formally adopted in 1992. Its Official name It is "information technology digital compression coding of continuous tone still images". stay JPEG algorithm Including 4 types Operation mode , one of which is DPCM based lossless compression The other three are lossy compression algorithms based on DCT. The key points are as follows: [4]
· lossless compression Coding mode Using the prediction method and Huffman code (or arithmetic coding )To ensure that the reconstructed image is identical to the original image (set Mean square error Is zero), no distortion.
·Sequential coding mode based on DCT. According to the principle of DCT transform, the image data is compressed and encoded from top to bottom and from left to right. When the information is transmitted to the receiving end, it is first decoded according to the above rules to restore the image. There is information loss in this process, so this is a loss Image compression coding
Progressive coding mode based on DCT. It is also based on DCT transformation, but its scanning process is different. It scans an image for several times data compression The description process adopts the method of gradual accumulation from coarse to fine. When restoring an image, you will first see the general situation of the image on the screen, and then gradually refine it until it is completely restored.
Hierarchical coding mode based on DCT. This mode is based on Image resolution For reference image encoding Of. It starts from the low resolution and gradually improves the resolution until it is the same as the original image resolution. image reconstruction The same is true when. It can be seen that its effect is similar to the progressive coding mode based on DCT, but its processing is more complex and the compression ratio obtained is also higher.
JPEG 2000 standard
Since the JPEG standard was adopted in 1992, it has achieved great success in just a few years due to its excellent quality. However, with the continuous expansion of multimedia applications, traditional JPEG compression technique It has been unable to meet people's requirements for multimedia video materials. JPEG uses discrete cosine transform to compress the image into small pieces of 8 × 8, and then put them into the file in turn. This algorithm realizes compression by discarding frequency information, so the higher the compression rate of the image, the more frequency information is discarded. In extreme cases, JFEG images only retain the basic information reflecting the image appearance, and fine image details are lost. For this reason, JPEG has developed a new generation of still images Compression standard JPEG2000。
The biggest difference between JPEG2000 and traditional JPEG is that it abandons the block coding method dominated by discrete cosine transform (DCT) adopted by JPEG, and adopts wavelet transform The main purpose of the multi resolution coding method is to extract the frequency components of the image. Wavelet transform An image is transformed and encoded as a whole line, and the relevance , achieving better compression coding effect.
JPEG2000 has the following characteristics: [4]
1. High compression ratio
Because on Discrete wavelet transform In the algorithm, the image can be converted into a series of "wavelets" that can store pixel modules more effectively. Therefore, the compression ratio of JPEG2000 can be improved by 10%~30% on the basis of traditional JPEG, and the compressed image appears more delicate and smooth, which is a feature of Internet and remote sensing image transmission The field has a wide range of applications.
2. Lossless compression and lossy compression
JPEG2000 provides lossless and lossy compression methods. Lossless compression is necessary in many fields, such as medical images and archive images quality requirement The situation is relatively high. At the same time, JPEG2000 provides embedded Bitstream , allowing progressive decompression from lossy to lossless.
Now JPEG images on the network are downloaded as "blocks", so they can only be displayed one line at a time. JPEG2000 format images are supported Progressive transmission , transmit first Image contour Data, and then gradually transfer other data to continuously improve image quality. The Internet, printers and image documents are the main applications of this feature.
This feature can specify regions of interest on the image, and then specify these regions during compression compression quality , or specify decompression requirements for certain areas during recovery. This is because wavelet transform Frequency domain In order to completely restore a part of the image, it does not need all the codes to be accurately reserved, as long as there is no error in the corresponding part of the code. In this way, the key points can be easily highlighted.
5. Random access and processing of code stream
This feature allows the user to randomly define Region of Interest To make the image quality of this area higher than that of other image areas. The random processing of the code stream allows the user to rotate, move, filter and feature extraction And so on.
JPEG2000 provides fault tolerance measures in the code stream, such as wireless transmission Error code Very high communication channel In order to achieve a certain quality of reconstructed images, fault tolerance measures must be taken for the transmitted images.
8. Content based description
Image documents, image indexing, and search in image processing MPEG7 is an important field that supports users to search various "materials" they are interested in quickly and effectively international standard JPEG2000 supports content-based metadata description, which can work with MPEG7 and other standards to achieve efficient image retrieval.
JPEG XT standard
JPEG XT was released in June 2015, expanding the basic JPEG format, supporting higher integer bit depth (up to 16 bits), high dynamic range imaging and floating-point coding, lossless coding and alpha channel coding. The extension is backward compatible with the basic JPEG/JFIF file format and 8-bit lossy compressed images.
JPEG XT uses a JFIF based extensible file format. The extension layer is used to modify the JPEG 8-bit basic layer and restore high-resolution images. The existing software is forward compatible and can read JPEG XT binary streams. [5]
1. Coding of high dynamic range images
JPEG XT is a backward compatible extension of JPEG, used for high dynamic range photography, and uses traditional text-based metadata encoding technology.
2. Box file format
JPEG XT specifies an extensible box based file format, which will be used by all subsequent and future JPEG extensions. The specified format itself is compatible with JFIF and ISO/IEC 10918-5, so it can be read by all existing implementations.
3. IDR code
JPEG XT defines JPEG extensions for backward compatible encoding of integer samples between 9 and 16 bit precision. It uses an extensible box based file format.
4. HDR floating point encoding
JPEG XT extends JPEG to encode HDR images, that is, images composed of floating point samples. It also provides additional coding tools to meet the requirements of low complexity or hardware implementation.
5. Lossless and near lossless coding
JPEG XT defines a lossless encoding mechanism for integer and floating point samples. It allows scalable lossy to lossless compression.
JPEG XL standard
JPEG XL was released from 2021-2022. It replaces JPEG format with a DCT based royalty free format, and allows efficient transcoding as a storage option for traditional JPEG images. The new standard aims to surpass the still image compression performance displayed by HEVC HM, Daala and WebP. It supports images of 1 billion × 1 billion pixels, high dynamic range of up to 32 bits per component, and appropriate transfer functions (PQ and HLG), patch coding of composite images (such as bitmap fonts and gradients), animated images, alpha channel coding, and RGB/YCbCr/ICtCp color coding options. [6]
1. Multi channel
Up to 4099 channels. Main channel: one grayscale channel, three RGB channels or four CMYK channels. The remaining channels are optional and can be used to store alpha ("straight" or "premultiplied"), depth, or thermal imaging data.
2. Progressive decoding
A mode designed to respond to loading large images, depending on the resolution of the viewing device.
3. Efficient encoding and decoding without special hardware
The encoding and decoding speed of JPEG XL is as fast as that of the old JPEG. Compared with the HEIC using x265, the encoding and decoding speed is an order of magnitude faster, and it is also parallelizable.
4. Support wide color gamut and HDR
JPEG XL has built-in support for various color spaces, transfer curves, and high screen brightness.
5. Independent tiling
Decode portions of large images by allowing images to be stored in tiles. [7]

application

Announce
edit
JPEG compression ratio It is the highest of all image file formats. The compression rate of JPEG format is not the highest among all image file formats, but depends on the image content, compression settings and the characteristics of the image format itself. In practical applications, the choice of an appropriate image format depends on specific needs and scenarios. JPEG compression algorithm performs best in photos and paintings of real scenes with smooth tone and color changes. It uses Lossy compression To remove the redundant data , but there is some distortion. Because the typical use of JPEG is lossy compression, which reduces the image fidelity, it is not suitable for accurate reproduction of imaging data (such as some scientific and medical imaging applications and some technical image processing work). Due to its high compression efficiency and standardization requirements, it has been widely used in color fax, still images Teleconferencing , printing and News pictures Transmission of. Since various browsers support JPEG Image format For Web usage, reducing the amount of data used by images is very important for responsive presentation, so it is also widely used for image preview and production HTML Webpage. [8]