Results for Grayscale Images


The tests are done with the image "lenna", commonly used for image compression tests. We use a 8 bits, grayscale, 256x256 pixels version of the original TGA image. Once compressed with the VCF algorithm, the resulting files are compressed with the gzip utility, which gives files about 5% smaller.

The gzipped VCF images are about 40% larger than the JPEG images with the same PSNR, and present more visible artefacts at cell boundaries, as predicted.

The image compressed with a pertinence of 25 has a PSNR of 34.33dB, which is the same as the original image compressed with the JPEG algorithm using a quality of 75. The visual quality of this image is very good, except in the soft gradient areas (face, shoulder and mirror) of the image were cell boundaries are slightly visible.

This VCF image has a transition table weighting 1326 bytes and pixels values weighting 15157 bytes, for a resulting image of 16503 bytes, or 15809 bytes gzipped.

VCF @25. Orignal image. JPEG @75.

Compression Rates

The compression rates for the VCF algorithm are about 40% bigger than JPEG for high-quality images (PSNR>30db). The performances seem to degrade rapidly after pertinence 40 (1/6 of the pixel value scale), which was to be expected.

For pertinence lower than 40, it seems that most of the transistions are wasted by trying to smooth the flat cells in order to match the soft gradients of the original image. The highly contrasted details constituting the sharpness of the image seem to have a pertinence higher than 40.

Should the cells reconstruction have been smoothed by interpolation before applying the transition detection, the compression rates would have been much better. This would be a major performance improvement for the VCF algorithm.

VCF and JPEG compression rates for some PSNR.
Pertinence 10 25 40 45 64
PSNR 41.1 dB 34.3 dB 31.1 dB 30.3 dB 28.0 dB
VCF (bpp) 3.78(+33%) 1.93(+38%) 1.28(+66%) 1.14(+78%) 0.74(+100%)
JPEG (bpp)(quality) 2.83(93) 1.40(75) 0.77(40) 0.64(30) 0.37(13)

VCF holds a fairly constant -3dB against JPEG on the [0.5, 3.5] bit-per-pixel (bpp) interval. The very low-rate compression algorithm Fiasco has been added on the chart for reference.

Compression rates of VCF and JPEG compared.

Artefacts Analysis

As we expected, the cell boundaries are very visible. Such soft gradients (most of the face's skin) have a pertinence between 10 and 15 and are discarded by in the image @25. No detail have been created besides the cell boundaries, which is not the case with the JPEG image.

On the other hand, highly contrasted details (such as the eyes and the hat contours) are well-preserved. The overall feeling we have looking at the VCF image @25 is one of a very sharp image, with slightly visible squares in the soft areas.

Here again, smoothing cells with an interpolation instead of building flat cells (where all pixels have the same value) would be a major improvement of the visual aspect by almost completely washing out the cell boundary.

Artefacts comparison for VCF @25 (left) and JPEG @75 (right), zoom x3.

If we look at where the differences are, we see that the VCF algorithm tries very hard to keep as much as highly contrasted details as possible, when JPEG tries to eliminate them. The images below show the pixel-to-pixel differences (whiter means more difference, darker means less difference) with the original image. It is amazing to see how VCF and JPEG seem to act in an opposite fashion: the areas where the JPEG has the biggest differences (hair, hat and eyes) are the exact same areas where VCF has the best matches.

The image in middle is the result of a border detection algorithm by contrast analysis. We note that the dark areas (high contrast) in this image match the dark areas in the VCF differences image. The VCF algorithm performs here as expected, by trying to keep intact the most contrasted areas, which are the areas where the most important (visible) details of the image are.

JPEG tends to damage primarily the highly contrasted area, but in such a well-distributed manner that it's mostly seemless. This is an advantage for the VCF, because it preserves the textures better than JPEG.

VCF @25 differences. Border detection. JPEG @75 differences.

Results Interpretation

The VCF programs weights 11KB for the compression and 7.2KB for the decompression, and 22.8KB for the source code. The JPEG library weights 117KB, and the source code weights several MB (on the same computer). Still, the VCF algorithm performs exactly as expected, and compares fairly well against JPEG.

As one can see on the 3x zoomed image comparison, a good PSNR is by no meaning a guarantee for good visual aspect. The VCF algorithm shows artefacts much more visible than the same PSNR JPEG. Yet, we saw that textures and details are better preserved by VCF than JPEG.

The most important lesson of this test is the strong visual aspect and compression rates improvements VCF would gain by smoothing the cells with an interpolation instead of building flat cells (where all pixels have the same value). The best part is that this improvement does not involve a different encoding of the image or adding data to the VCF file. It is only an added calculation in the compression and decompression program.

The main demonstrated strength of the VCF is the uncompromising details conservation (rather unexpected for a so-called "lossy" algorithm), yet achieving very good compression rates.

Last modification: March 2002, © Eric GAUDET, 2002