Lossy compression uses perceptual coding to throw away data. Perceptual coding refers to generally two systems:
- The human vision system.
- The human auditory system.
Perceptual Algorithms are designed to remove information that humans will not notice.
Subsampling exploits the fact that humans are more sensitive to luminance than chrominance (color). The JPEG algorithm (amongst others) uses subsampling to throw away color information. Although color information is lost, it is difficult for humans to percieve the difference between the original image and an image with subsampled color. Of course this is dependent on the level of subsampling. Commonly used image subsampling values are / 2, / 4, / 8. Subsampling is used in all modern video codecs.
Quantization is the process of throwing away high frequency data.
Another possible definition of quantization is mapping one set elements into smaller set of elements. This covers both scalar quantization (mapping some numbers to just one number) and vector quantization (mapping similar blocks of data to one block).
Scalar quantization may be uniform where the same number of elements are mapped to one value, and nonuniform otherwise. One special case of scalar quantization is palettization.