JPEG is used to compress still images. JPEG is a compression standard for continuous-tone still images, with the file extension ".jpg" or ".jpeg"; the JPEG standard is suitable for compressing still grayscale and color images. JPEG mainly uses a joint coding method of predictive coding (DPCM), discrete cosine transform (DCT) and entropy coding to remove redundant images and color data. It is a lossy compression format, which can compress images in a small storage space. Space will cause damage to image data to a certain extent.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
JPEG is used to compress still images.
JPEG introduction
JPEG (Joint Photographic Experts Group) is the product of the JPEG standard, which Developed by the International Organization for Standardization (ISO), is a compression standard for continuous-tone still images. JPEG format is the most commonly used image file format, with the suffix .jpg or .jpeg.
It mainly uses a joint coding method of predictive coding (DPCM), discrete cosine transform (DCT) and entropy coding to remove redundant images and color data. It is a lossy compression format. Images can be compressed into a small storage space, which may cause damage to image data to a certain extent. In particular, using an excessively high compression ratio will reduce the quality of the image recovered after final decompression. If you pursue high-quality images, it is not advisable to use an excessively high compression ratio.
However, JPEG compression technology is very advanced. It can use lossy compression to remove redundant image data. In other words, you can get better image quality using less disk space. Moreover, JPEG is a very flexible format that has the function of adjusting image quality. It allows files to be compressed with different compression ratios and supports multiple compression levels. The compression ratio is usually between 10;1 and 40;1. The higher the compression ratio, the higher the compression ratio. The larger the compression ratio, the lower the image quality; conversely, the smaller the compression ratio, the higher the image quality. For the same image, files stored in JPEG format are 1/10~1/20 of other types of files, usually only a few tens of KB, and the quality loss is small and basically invisible. The JPEG format mainly compresses high-frequency information, retains color information well, and is suitable for use on the Internet; it can reduce the transmission time of images and supports 24-bit true color; it is also commonly used in images that require continuous tone.
Compression standard
JPEG format can be divided into three formats: standard JPEG, progressive JPEG and JPEG2000.
1. Standard JPEG format; this type can only display images from top to bottom when downloading from a web page. The full image cannot be seen until all image data is downloaded. .
2. Progressive JPEG; when downloading a web page, this type first presents a rough appearance of the image, then slowly presents the complete content, and saves it as a progressive JPG The files in this format are smaller than those saved in the standard JPG format, so 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 mosaic phenomenon and positional dislocation that are often caused by signal instability during wireless transmission. situation and improve the quality of transmission.
JPEG2000 has the following characteristics:
1. High compression rate
Due to the discrete wavelet transform algorithm, the image can Convert into a series of "wavelets" that can store pixel modules more effectively. Therefore, the image compression ratio of the JPEG2000 format can be increased by 10% to 30% based on the current JPEG, and the compressed images appear more delicate and smooth. This feature It is widely used in image transmission fields such as the Internet and remote sensing.
2. Lossless compression and lossy compression
JPEG2000 provides two compression methods: lossless and lossy. Lossless compression is necessary in many fields, such as medical images and archive images, etc., which affects image quality. A situation with relatively high requirements. At the same time, JPEG2000 provides an embedded code stream, allowing progressive decompression from lossy to lossless.
3. Progressive transmission
Nowadays, JPEG images on the Internet are transmitted in "blocks" when downloaded, so they can only be displayed line by line. However, images in JPEG2000 format support progressive transmission. Image outline data is transferred first, and then other data is gradually transferred to continuously improve image quality. The Internet, printers, and image documents are major applications for this feature.
4. Region of Interest Compression
This feature can specify areas of interest on the picture, and then specify the compression quality for these areas during compression, or specify the solution of certain areas during recovery. Compression requirements. This is because the wavelet transform is localized in the space and frequency domains. To completely restore a certain part of the image, it is not necessary that all the codes are accurately preserved, as long as there is no error in the corresponding part of the code. This way we can easily highlight the key points.
5. Random access and processing of code streams
This feature allows users to randomly define areas of interest in the image, making the image quality in this area higher than other image areas. The random processing of the code stream allows users to perform operations such as rotation, movement, filtering, and feature extraction.
6. Fault tolerance
JPEG2000 provides fault tolerance measures in the code stream. When transmitting images in communication channels with high transmission errors such as wireless, fault tolerance measures must be taken to achieve a certain reconstructed image. quality.
7. Content-based description
Image documents, image indexing and search are an important field in image processing. MPEG7 supports various "materials" that users are interested in. An international standard for fast and efficient search. Content-based description is one of the features of the compression system in JPEG2000.
If you want to read more related articles, please visit PHP Chinese website! !
The above is the detailed content of What is used to compress still images. For more information, please follow other related articles on the PHP Chinese website!