|
Yu Kee Lim, Psych 221 |
|
|
Effect of Contrast Masking |
Contrast MaskingWhen an image component is is in the presence of other image components of similar spatial frequency and orientation, that image component because less obvious to the human eye. DCTune takes this into consideration as it examines each 8x8 image block. Note that each element of the DCT matrix coefficient essentially marks that particular spatial frequency and orientation within that 8x8 image block. A DCT coefficient which is larger for a particular block means that the block has a greater presence of that particular spatial frequency and orientation marked by the coefficient. This algorithm works by having a larger threshold for larger DCT coefficients when determining the quantization errors. Again, since the DCTune program provides a measurement of quality which is rather different from the standard JPEG compression, it is quite impossible to apply the different algorithms to compress the test image to the same quality, then compare amount of compression by looking at the file sizes. Instead, I performed the two different compressions to obtained the approximate same file sizes, then look at the image quality of the two. The one with a better quality would imply having a better compression. The image I used to evaluate this is again based on the Lena image. However, for half of the image, I replaced it with a sinusoidal, rather high frequency, repeating pattern. Therefore, that half of the image would be surrounded by image elements of similar frequency and orientation, and can tolerate greater compression. Follow this link for the original pgm image.
Looking at the two images, it is obvious that the DCTune compressed one is of better quality, ignoring the pattern at the top. The square blocks one the face and shoulder of the woman are less obvious in the second compared to the first. Also, there is a better representation of the hair at certain places. Moreover, the background is also more natural. All in all, it is possible to discern the greater number of gray levels in the second one, ie more bit representation, despite the two images having the same sizes. The saving must have come from having less bit representation, or greater quantization, in the regular pattern at the top of each image. However, there is hardly any difference in the visual quality of the pattern between the two so effectively nothing is lost. To further illustrate this point, I made a second similar image except that this time, the regular pattern was replaced with random white noise. Thus there will be no correlation between local image components at all. Then, DCTune would not be able to take advantage of this contrast masking. Follow this link for the original pgm image.
Looking at the relevant part of the 2 images, there are hardly any differences in the quality at all. Of course, there isn't any point in looking at the noise. It is hard to evaluate the quality of noise since it is completely random. Note also that both DCTune compressions on the two different images were set to have the same perceptual error of 3.5 according to the DCTune program. Although not exactly so, the quality of the DCTune compressed image with regular pattern on top is almost as good as that with white noise, despite being more than half its size. These two sets of images demonstrate how effective DCTune is in using the local frequency and spatial of an image to optimize compression. |
![]()
What is DCTune | Effect of Luminance Masking | Effect of Contrast Masking | In Conclusion | References