# Improving Lossless Image Compression with Contextual Memory
## 5 Experimental Results
### Evaluation on the Benchmarks  
In order to test the effectiveness of the algorithm, we applied the augmented version of the PAQ8 PX algorithm with contextual memory to four test sets. The command line option for the compression for all the images selects memory level 8 and adaptive learning rate (-8a). The Waterloo image compression benchmark [31] contains two test sets with image sizes from 256 x 256 pixels up to 1118 x 1105. For this benchmark, we used as parameters for the contextual memory ray length 5 and memory size 20. The results are presented in Tables 1 and 2. A newer benchmark, [PERSON]'s test images corpus [32], contains images ranging from 2268 x 1512 pixels up to 7216 x 5412. For this benchmark, we used ray length 7 and memory size 23 as parameters for the contextual memory. The results are presented in Table 3. We also included the Squeezechart 8 bpp grayscale images test set [33] where four of the five images are medical images. For this benchmark, we used ray length 6 and memory size 20 as parameters for the contextual memory. The results are presented in Table 4. The best results in the table are highlighted using bold font weight. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Set** & **JPEG 2000** & **JPEG-LS** & **MRP** & **ZPAQ** & **VanilcWLS D** & **Paq8 px167** &
\begin{tabular}{c} **Paq8 px167+CM** \\ **(proposed)** \\ \end{tabular} \\ \hline
**bird** & 3,6300 & 3,4710 & 3,2380 & 4,0620 & 2,7490 & **2,6073** & 2,6077 \\
**bridge** & 6,0120 & 5,7900 & 5,5840 & 6,3680 & 5,5960 & 5,5074 & **5,5037** \\
**camera** & 4,5700 & 4,3140 & 3,9980 & 4,7660 & 3,9950 & 3,8176 & **3,8173** \\
**circles1** & 0,9280 & 0,1530 & 0,1320 & 0,2300 & 0,0430 & **0,0281** & 0,0282 \\
**crosses1** & 1,0660 & 0,3860 & 0,0510 & 0,2120 & 0,0160 & 0,0176 & **0,0171** \\
**goldhill1** & 5,5160 & 5,2810 & 5,0980 & 5,8210 & 5,0900 & 5,0220 & **5,0197** \\
**horiz1** & 0,2310 & 0,0940 & 0,0160 & 0,1220 & 0,0150 & **0,0139** & 0,0140 \\
**lenal** & 4,7550 & 4,5810 & 4,1890 & 5,6440 & **4,1230** & 4,1302 & 4,1293 \\
**montage1** & 2,9830 & 2,7230 & 2,3530 & 3,3350 & 2,3630 & 2,1505 & **2,1501** \\
**slope1** & 1,3420 & 1,5710 & 0,8590 & 1,5040 & 0,9600 & **0,7186** & 0,7194 \\
**squares1** & 0,1630 & 0,0770 & 0,0130 & 0,1770 & **0,0070** & 0,0129 & 0,0128 \\
**text1** & 4,2150 & 1,6320 & 3,1750 & 0,4960 & 0,6210 & 0,1053 & **0,1052** \\ \hline
**Average** & 2,9510 & 2,5060 & 2,3920 & 2,7280 & 2,1310 & 2,0109 & **2,0103** \\ \hline \hline \end{tabular}  
* Non-natural/artificially generated image  
\end{table} 
Table 1: Waterloo gray test set 1. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Set** & **JPEG2000** & **JPEG-LS** & **MRP** & **ZPAQ** & **VanilcWLS D** & **Paq8 px167** &
\begin{tabular}{c} **Paq8 px167+CM** \\ **(proposed)** \\ \end{tabular} \\ \hline
**barb** & 4,6690 & 4,7330 & 3,9100 & 5,6720 & **3,8710** & 3,9319 & 3,9297 \\
**boat** & 4,4150 & 4,2500 & 3,8720 & 4,9650 & 3,9280 & 3,8165 & **3,8145** \\
**france1** & 2,0350 & 1,4130 & 0,6030 & 0,4220 & 1,1590 & 0,0992 & **0,0966** \\
**frog** & 6,2670 & 6,0490 & – & 3,3560 & 5,1060 & 2,4656 & **2,4581** \\
**goldhill2** & 4,8470 & 4,7120 & 4,4650 & 5,2830 & 4,4630 & 4,4227 & **4,4214** \\
**lena2** & 4,3260 & 4,2440 & 3,9230 & 5,0660 & 3,8680 & 3,8608 & **3,8604** \\
**library1** & 5,7120 & 5,1010 & 4,7650 & 4,4870 & 4,9110 & 3,3253 & **3,3200** \\
**mandrill** & 6,1190 & 6,0370 & 5,6790 & 6,3690 & 5,6780 & 5,6364 & **5,6339** \\
**mountain** & 6,7120 & 6,4220 & 6,2210 & 4,4930 & 5,2150 & 4,0799 & **4,0744** \\
**peppers2** & 4,6290 & 4,4890 & 4,1960 & 5,0950 & 4,1740 & 4,1493 & **4,1470** \\
**washsat** & 4,4410 & 4,1290 & 4,1470 & 2,2900 & 1,8900 & 1,7478 & **1,7466** \\
**zelda** & 4,0010 & 4,0050 & **3,6320** & 4,9200 & 3,6330 & 3,6437 & 3,6435 \\ \hline
**Average** & 4,8480 & 4,6320 & & 4,3680 & 3,9910 & 3,4316 & **3,4288** \\ \hline \hline \end{tabular}  
* Non-natural/artificially generated image  
\end{table} 
Table 2: Waterloo gray test set 2.