FeiYuePsych2012Project: Difference between revisions
imported>Psych2012 |
imported>Psych2012 |
||
Line 57: | Line 57: | ||
[http://white.stanford.edu/teach/images/2/2c/Feidxt5.cpp.zip Code] | [http://white.stanford.edu/teach/images/2/2c/Feidxt5.cpp.zip Code] | ||
[http://white.stanford.edu/teach/images/a/a0/FeiYueData.zip Data] - File names containing "base" or "original" are the original images used for testing. File names containing "DXT5" are the compressed results of the YCoCg-DXT5 algorithm (State of Art). File names containing "Fei" are the compressed results using the method in this paper. | |||
[http://white.stanford.edu/teach/images/d/d5/FeiYuePsych221.pdf Presentation] | [http://white.stanford.edu/teach/images/d/d5/FeiYuePsych221.pdf Presentation] |
Revision as of 09:14, 21 March 2012
Background
In today's computer graphics, a large amount of textures are mapped onto surfaces of objects to add visual details and provide realism. These textures can consume a large portion of system and video memory. An efficient compression algorithm can reduce the amount of memory required for storing the textures and allow better performance by reducing the memory bandwidth used to fetch textures. An efficient real-time compression algorithm is important for dynamic texture generation and for texture streaming where the source compression format is different than the GPU hardware compression format.
The DXT compression format is common across most major GPU hardware. DXT1, stores 16 input pixels in 64 bits of output. The output consists of two 16-bit RGB 5:6:5 color values and a 4x4 two bit lookup table. [] The compression ratio is 6:1 for 24 bit source images. DXT5, converts 16 input pixels into 128 bits of output. The output consists of 64 bits of alpha channel data, followed by 64 bits of color data. [] The compression ratio is 4:1.
The DXT compression format loses some image quality and introduces blocking artifacts. Several attempts have been made to improve image quality for this format. The state-of-art in real-time DXT compression is "Real-Time YCoCg-DXT compression" [].
[talk about algorithm pipeline here]
The base algorithm can increase the RGB-PSNR by 6dB or more [], there are other steps one could take to further improve the image quality. This project focuses on three additional steps to reduce compression artifacts on top of the Real-Time YCoCg-DXT Compression algorithm.
Methods
The algorithm works with an input image of RGB format.
The first step after transforming from RGB to YCoCg space is to do a non-linear remap of the chroma components after mapping Co and Cg to the range of -1 to 1. Using the function described in Equation 1, we expand the near zero region of the chroma value to increase precision in less saturated colors, at the expense of a reduction of precision in the more saturated colors. This is to take advantage of the property of the human vision system in that the eye is more sensitive to chroma differences in less saturated colors compared to more saturated colors. The effects of Equation 1 is illustrated by Figure[].
Co_out = sqrt(abs(Co_in))*sign(Co_in)
The second step is to apply sharpening to the image. Sharpening is done by adding a scaled amount of the difference between the pixel and a lowpass filter applied to the pixel. The lowpass kernel is described in Equation 2 below. The sharpening is only done to the luma (Y) channel, and is limited to one Y quantization level (-/+ 1.0/512.0). This effort is to shape some of the quantization artifacts on the image such that detail is not lost.
1 2 1 2 4 2 1 2 1
The third step is to add noise to each of the Y, Co and Cg channels. This would affect the least significant bits during encoding, therefore reducing the banding effects. Less noise is added to the Cg channel than the Co, and even less to the Y channel. This is because the human eye is more sensitive to the luma and the green chroma channels. Scaling is as follows,
Y -> +/- 1.0/2048.0 Co -> +/- 1.0/128.0 Cg -> +/- 1.0/256.0
After these steps, the rest of the steps to complete the compression are the same as the Real-time YCoCg-DXT5 algorithm []. For each 4x4 blocks, the maximum and minimum values for each of the Y, Co and Cg channels are determined.
Lastly, quantization is applied, and the image is encoded and decoded to complete the compression pipeline.
Results
Organize your results in a good logical order (not necessarily historical order). Include relevant graphs and/or images. Make sure graph axes are labeled. Make sure you draw the reader's attention to the key element of the figure. The key aspect should be the most visible element of the figure or graph. Help the reader by writing a clear figure caption.
subsection 1
subsection 2
Conclusions
Describe what you learned. What worked? What didn't? Why? What would you do if you kept working on the project?
References
List references. Include links to papers that are online.
Appendix I - Code and Data
Data - File names containing "base" or "original" are the original images used for testing. File names containing "DXT5" are the compressed results of the YCoCg-DXT5 algorithm (State of Art). File names containing "Fei" are the compressed results using the method in this paper.