Home  >  Article  >  What redundancy is generally used to compress image files?

What redundancy is generally used to compress image files?

青灯夜游
青灯夜游Original
2022-07-26 11:46:513542browse

Image files are generally compressed using coding redundancy, inter-pixel redundancy and psychovisual redundancy. Data redundancy is the main problem of digital image compression. In digital image compression, three basic data redundancies can be determined and utilized: coding redundancy, inter-pixel redundancy and psychovisual redundancy; when these three types of redundancy Data compression (reducing the amount of data required to represent a given amount of information) is achieved when one or more of are reduced or eliminated.

What redundancy is generally used to compress image files?

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

The problem solved by image compression is to minimize the amount of data required to represent digital images, and to remove excess data based on the basic principle of reducing the amount of data.

1. Basic introduction

Image compression model: Mainly introduces the encoding and decoding of signal sources, and does not discuss the signal channel of the transmission process. .

What redundancy is generally used to compress image files?

Data compression refers to reducing the amount of data required to represent a given amount of information.

Data is the means of information transmission. The same amount of information can be represented by different amounts of data.

Information: used to represent the information of the image itself.

Data redundancy is a major problem in digital image compression. If n1 and n2 represent the number of information units carried in two data sets representing the same information, then the relative data redundancy RD of the first data set (the set represented by n1) can be defined as :

What redundancy is generally used to compress image files?

Here C is usually called the compression ratio, which is defined as:

What redundancy is generally used to compress image files?

In digital image compression , three basic types of data redundancy can be identified and exploited: coding redundancy, inter-pixel redundancy, and psychovisual redundancy. Data compression is achieved when one or more of these three redundancies are reduced or eliminated.

2. Coding redundancy

For images, it can be assumed that a discrete random variable represents the gray level of the image, and each gray level The probability of (rk) appearing is pr

What redundancy is generally used to compress image files?

where L is the gray level, nk is the number of times the k-th gray level appears in the image, and n is the total number of pixels in the image. If the number of bits used to represent each rk value is l(rk), then the average number of bits required to represent each pixel is:

What redundancy is generally used to compress image files?

That is to say, the number of bits used to represent each gray level value is multiplied by the probability of gray level occurrence, and the resulting products are added to obtain the average codeword of different gray level values. length. If the average number of bits of a certain encoding is closer to the entropy, the encoding redundancy is smaller.

[Note]

Entropy: It defines the average amount of information obtained by observing the output of a single source

What redundancy is generally used to compress image files?

For example:

What redundancy is generally used to compress image files?

The entropy of the original image is: 2.588

Using natural binary encoding, the average length is;3

If using the table Medium encoding 2, the average number of bits is:

What redundancy is generally used to compress image files?

achieves coding compression, pr(rk) and l(r k) These two functions are multiplied and inversely proportional. That is to say, the greater the probability pr(rk) of a certain grayscale rk, the greater the coding length l(rk) should be smaller, which can reduce the average number of bits and bring it closer to the entropy. As shown below:

What redundancy is generally used to compress image files?

3. Inter-pixel redundancy

Inter-pixel redundancy is a kind of Inter-pixel correlations are directly linked to data redundancy.

For a static picture, there is spatial redundancy (geometric redundancy). This is because the visual contribution of a single pixel to the image in a picture is often redundant. Grayscale values ​​are inferred.

For continuous pictures or videos, there will also be temporal redundancy (inter-frame redundancy). Most of the corresponding pixels between adjacent pictures are slowly excessive.

What redundancy is generally used to compress image files?

3. Psychovisual redundancy

Psychovisual redundancy is related to real visual information. It varies from person to person. Different people have different psychological visual redundancy for the same photo. . Removing redundant psychovisual data will inevitably lead to the loss of quantitative information, and this loss of visual information is an irreversible operation. Just like an image (which cannot be enlarged) is relatively small, the human eye cannot directly judge its resolution. In order to compress the data volume of the image, some information that cannot be directly observed by the human eye can be removed, but when it is enlarged, it is not removed. An image with psychovisual redundancy will be significantly different from an image with psychovisual redundancy removed.

What redundancy is generally used to compress image files?

Figure C illustrates that the quantization process that fully utilizes the characteristics of the human visual system can greatly improve the performance of the image. Although the compression ratio of this quantization process is still only 2: 1, Additional overhead is added to reduce false contours, but unwanted graininess is reduced. The method used to produce this result is the improved gray scale (IGS) quantization method. This method is illustrated in the table below. First, the current 8-bit gray level value and the 4 least significant bits generated previously form a sum with an initial value of zero. If the 4 most significant bits of the current value are 1111, add 0000 to it. The value of the 4 most significant bits of the obtained sum is used as the encoded pixel value.

What redundancy is generally used to compress image files?

4. Fidelity criterion

4.1 Objective Fidelity Criterion

This is said when the degree of information loss can be expressed as a function of the initial image or input image and the output image that is first compressed and then decompressed Functions are based on objective fidelity criteria.

  1. Root mean square error (rms)
    Overall error of the two pictures:
    What redundancy is generally used to compress image files?
    Among them, f (x,y) represents the input image, and f(x,y) represents the estimate or approximation obtained by compressing and decompressing the input image
    The root mean square error of the two pictures;
    What redundancy is generally used to compress image files?
  2. Mean square signal-to-noise ratio
    What redundancy is generally used to compress image files?
4.2 Subjective fidelity criterion

Subjective evaluation is obtained by showing typical decompressed images to typical observers and averaging their evaluations.


What redundancy is generally used to compress image files?

For more related knowledge, please visit the

FAQ column!

The above is the detailed content of What redundancy is generally used to compress image files?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn