Skip to content

Commit

Permalink
Adds PIK format
Browse files Browse the repository at this point in the history
  • Loading branch information
WyohKnott committed Feb 22, 2018
1 parent 068e6e2 commit 5f5b887
Show file tree
Hide file tree
Showing 15 changed files with 262 additions and 178 deletions.
4 changes: 4 additions & 0 deletions comparisonfiles.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
"extension": "jp2",
"name": "OPENJPEG"
},
{
"extension": "pik",
"name": "PIK"
},
{
"extension": "webm",
"name": "VP9"
Expand Down
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h2>Notes</h2>
jp2: undefined, jxr: undefined, webp: undefined
};
var nativeDec = {
webm: false, bpg: false, flif: false, ogv: false, jp2: false, jxr: false, webp: false,
webm: false, bpg: false, flif: false, ogv: false, jp2: false, jxr: false, webp: false, pik: false,
check: function (flag, decodedWidth, encodedUrl) {
var supports = this;
var img = new Image();
Expand Down Expand Up @@ -435,6 +435,8 @@ <h2>Notes</h2>
image.src = urlFolder.concat(pathBase, '/', urlFile, '.', 'png');
} else if (codec == 'webm') {
image.src = urlFolder.concat(pathBase, '/', urlFile, '.', 'png');
} else if (codec == 'pik') {
image.src = urlFolder.concat(pathBase, '/', urlFile, '.', 'png');
} else { console.error("No support for " + url); }
};
image.src = blobPath;
Expand Down
4 changes: 3 additions & 1 deletion js/splitimage2.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var workers = {
jp2: undefined, jxr: undefined, webp: undefined
};
var nativeDec = {
webm: false, bpg: false, flif: false, ogv: false, jp2: false, jxr: false, webp: false,
webm: false, bpg: false, flif: false, ogv: false, jp2: false, jxr: false, webp: false, pik: false,
check: function (flag, decodedWidth, encodedUrl) {
var supports = this;
var img = new Image();
Expand Down Expand Up @@ -330,6 +330,8 @@ function setImage(side, pathBase, codec, setText) {
image.src = urlFolder.concat(pathBase, '/', urlFile, '.', 'png');
} else if (codec == 'webm') {
image.src = urlFolder.concat(pathBase, '/', urlFile, '.', 'png');
} else if (codec == 'pik') {
image.src = urlFolder.concat(pathBase, '/', urlFile, '.', 'png');
} else { console.error("No support for " + url); }
};
image.src = blobPath;
Expand Down
10 changes: 5 additions & 5 deletions lossy_results.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
<h1>Lossy metrics</h1>
<p>For each comparison algorithms, we plot the quality in dB in function of the mean bits per pixel on a logarithmic scale. We can then visualize which codec gives the best quality at a given bit per pixel (top left is better).</p>
<h2>Bits per pixel at equivalent quality according to VMAF</h2>
<p><img class="graph" alt="Bits per pixel at equivalent quality according to VMAF" src="http://wyohknott.github.io/image-formats-comparison/subset1.vmaf.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809).svg"></p>
<p><img class="graph" alt="Bits per pixel at equivalent quality according to VMAF" src="http://wyohknott.github.io/image-formats-comparison/subset1.vmaf.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik).svg"></p>
<h2>Bits per pixel at equivalent quality according to Y-PSNR-HVS-M</h2>
<p><img class="graph" alt="Bits per pixel at equivalent quality according to Y-PSNR-HVS-M" src="http://wyohknott.github.io/image-formats-comparison/subset1.psnr-hvs-m.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809).svg"></p>
<p><img class="graph" alt="Bits per pixel at equivalent quality according to Y-PSNR-HVS-M" src="http://wyohknott.github.io/image-formats-comparison/subset1.psnr-hvs-m.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik).svg"></p>
<h2>Bits per pixel at equivalent quality according to Y-MSSSIM</h2>
<p><img class="graph" alt="Bits per pixel at equivalent quality according to Y-MSSSIM" src="http://wyohknott.github.io/image-formats-comparison/subset1.ms-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809).svg"></p>
<p><img class="graph" alt="Bits per pixel at equivalent quality according to Y-MSSSIM" src="http://wyohknott.github.io/image-formats-comparison/subset1.ms-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik).svg"></p>
<h2>Bits per pixel at equivalent quality according to Y-SSIM</h2>
<p><img class="graph" alt="Bits per pixel at equivalent quality according to Y-SSIM" src="http://wyohknott.github.io/image-formats-comparison/subset1.y-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809).svg"></p>
<p><img class="graph" alt="Bits per pixel at equivalent quality according to Y-SSIM" src="http://wyohknott.github.io/image-formats-comparison/subset1.y-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik).svg"></p>
<h2>Bits per pixel at equivalent quality according to RGB-SSIM</h2>
<p><img class="graph" alt="Bits per pixel at equivalent quality according to RGB-SSIM" src="http://wyohknott.github.io/image-formats-comparison/subset1.rgb-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809).svg"></p>
<p><img class="graph" alt="Bits per pixel at equivalent quality according to RGB-SSIM" src="http://wyohknott.github.io/image-formats-comparison/subset1.rgb-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik).svg"></p>
</body>
</html>
10 changes: 5 additions & 5 deletions lossy_results.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ For each comparison algorithms, we plot the quality in dB in function of the mea

##Bits per pixel at equivalent quality according to VMAF

![Bits per pixel at equivalent quality according to VMAF](http://wyohknott.github.io/image-formats-comparison/subset1.vmaf.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809\).svg)
![Bits per pixel at equivalent quality according to VMAF](http://wyohknott.github.io/image-formats-comparison/subset1.vmaf.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik\).svg)

##Bits per pixel at equivalent quality according to Y-PSNR-HVS-M

![Bits per pixel at equivalent quality according to Y-PSNR-HVS-M](http://wyohknott.github.io/image-formats-comparison/subset1.psnr-hvs-m.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809\).svg)
![Bits per pixel at equivalent quality according to Y-PSNR-HVS-M](http://wyohknott.github.io/image-formats-comparison/subset1.psnr-hvs-m.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik\).svg)

##Bits per pixel at equivalent quality according to Y-MSSSIM

![Bits per pixel at equivalent quality according to Y-MSSSIM](http://wyohknott.github.io/image-formats-comparison/subset1.ms-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809\).svg)
![Bits per pixel at equivalent quality according to Y-MSSSIM](http://wyohknott.github.io/image-formats-comparison/subset1.ms-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik\).svg)

##Bits per pixel at equivalent quality according to Y-SSIM

![Bits per pixel at equivalent quality according to Y-SSIM](http://wyohknott.github.io/image-formats-comparison/subset1.y-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809\).svg)
![Bits per pixel at equivalent quality according to Y-SSIM](http://wyohknott.github.io/image-formats-comparison/subset1.y-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik\).svg)

##Bits per pixel at equivalent quality according to RGB-SSIM

![Bits per pixel at equivalent quality according to RGB-SSIM](http://wyohknott.github.io/image-formats-comparison/subset1.rgb-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809\).svg)
![Bits per pixel at equivalent quality according to RGB-SSIM](http://wyohknott.github.io/image-formats-comparison/subset1.rgb-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik\).svg)
23 changes: 15 additions & 8 deletions report.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ <h3>Codecs</h3>
<li>Mozilla JPEG Encoder: <code>https://github.com/mozilla/mozjpeg</code>. The version used is 3.2.</li>
<li>Google VP9: <code>https://chromium.googlesource.com/webm/libvpx</code>. The version used is built from GIT revision <code>6c375b9cd0647686ae5cc9bae8e94ec3d7c43e4b</code>.</li>
<li>Google WebP: <code>https://chromium.googlesource.com/webm/libwebp</code>. The version used is built from GIT revision <code>66ad84f0f9f36d38166a15a981fd7f9a1910a859</code>.</li>
<li>Google Pik: <code>https://github.com/google/pik</code>. The version used is built from GIT revision <code>52f2d45cc8e35e45278da54615bb8b11b5066f16</code>.</li>
</ul>
<h3>Metrics</h3>
<ul>
Expand Down Expand Up @@ -118,14 +119,20 @@ <h3>Image compression</h3>
</ul>
</li>
<li>
<p>Pik:</p>
<ul>
<li>between q=0.5 and q=3.0: <code>cpik [input(PNG)] [output] --distance $q</code></li>
</ul>
</li>
<li>
<p>WebP:</p>
<ul>
<li>lossless: <code>cwebp -mt -z 9 -lossless -o [output] [input(PNG)]</code></li>
<li>between q=5 and q=95: <code>cwebp -mt -q $q -o [output] [input(PNG)]</code></li>
<li>between q=5 and q=95: <code>cwebp -mt -q $q -o [output] [input(PNG)]</code>
The Python script used to generate the compressed images are available on <a href="https://github.com/WyohKnott/image-comparison-sources">the GIT repository</a>.</li>
</ul>
</li>
</ul>
<p>The Python script used to generate the compressed images are available on <a href="https://github.com/WyohKnott/image-comparison-sources">the GIT repository</a>.</p>
<h3>Image selection</h3>
<p>The images which will be displayed on the website are then chosen among all compressed images, using the following criteria:</p>
<ul>
Expand Down Expand Up @@ -278,18 +285,18 @@ <h3>Lossless compression ratio and Weissman score:</h3>
</tbody>
</table>
<h3>Lossy compression and speed</h3>
<p><img class="graph" alt="Encoding time in function of bits per pixel" src="http://wyohknott.github.io/image-formats-comparison/subset1.encoding_time.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809).svg"></p>
<p>![Encoding time in function of bits per pixel](http://wyohknott.github.io/image-formats-comparison/subset1.encoding_time.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik).svg</p>
<h3>Lossy metrics</h3>
<p>For each comparison algorithms, we plot the quality in dB in function of the mean bits per pixel on a logarithmic scale. We can then visualize which codec gives the best quality at a given bit per pixel (top left is better).</p>
<h4>Bits per pixel at equivalent quality according to VMAF</h4>
<p><img class="graph" alt="Bits per pixel at equivalent quality according to VMAF" src="http://wyohknott.github.io/image-formats-comparison/subset1.vmaf.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809).svg"></p>
<p><img alt="Bits per pixel at equivalent quality according to VMAF" src="http://wyohknott.github.io/image-formats-comparison/subset1.vmaf.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik).svg"></p>
<h4>Bits per pixel at equivalent quality according to Y-PSNR-HVS-M</h4>
<p><img class="graph" alt="Bits per pixel at equivalent quality according to Y-PSNR-HVS-M" src="http://wyohknott.github.io/image-formats-comparison/subset1.psnr-hvs-m.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809).svg"></p>
<p><img alt="Bits per pixel at equivalent quality according to Y-PSNR-HVS-M" src="http://wyohknott.github.io/image-formats-comparison/subset1.psnr-hvs-m.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik).svg"></p>
<h4>Bits per pixel at equivalent quality according to Y-MSSSIM</h4>
<p><img class="graph" alt="Bits per pixel at equivalent quality according to Y-MSSSIM" src="http://wyohknott.github.io/image-formats-comparison/subset1.ms-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809).svg"></p>
<p><img alt="Bits per pixel at equivalent quality according to Y-MSSSIM" src="http://wyohknott.github.io/image-formats-comparison/subset1.ms-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik).svg"></p>
<h4>Bits per pixel at equivalent quality according to Y-SSIM</h4>
<p><img class="graph" alt="Bits per pixel at equivalent quality according to Y-SSIM" src="http://wyohknott.github.io/image-formats-comparison/subset1.y-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809).svg"></p>
<p><img alt="Bits per pixel at equivalent quality according to Y-SSIM" src="http://wyohknott.github.io/image-formats-comparison/subset1.y-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik).svg"></p>
<h4>Bits per pixel at equivalent quality according to RGB-SSIM</h4>
<p><img class="graph" alt="Bits per pixel at equivalent quality according to RGB-SSIM" src="http://wyohknott.github.io/image-formats-comparison/subset1.rgb-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809).svg"></p>
<p><img alt="Bits per pixel at equivalent quality according to RGB-SSIM" src="http://wyohknott.github.io/image-formats-comparison/subset1.rgb-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik).svg"></p>
</body>
</html>
18 changes: 11 additions & 7 deletions report.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The image set is comprised of 50 images from [the subset 1 and subset 2 maintene
* Mozilla JPEG Encoder: `https://github.com/mozilla/mozjpeg`. The version used is 3.2.
* Google VP9: `https://chromium.googlesource.com/webm/libvpx`. The version used is built from GIT revision `6c375b9cd0647686ae5cc9bae8e94ec3d7c43e4b`.
* Google WebP: `https://chromium.googlesource.com/webm/libwebp`. The version used is built from GIT revision `66ad84f0f9f36d38166a15a981fd7f9a1910a859`.
* Google Pik: `https://github.com/google/pik`. The version used is built from GIT revision `52f2d45cc8e35e45278da54615bb8b11b5066f16`.

###Metrics

Expand Down Expand Up @@ -92,12 +93,15 @@ All images are compressed losslessly and over a range of qualities for each code

- lossless: `cjpeg -rgb -quality 100 [input(PNG)] > [output]`
- between q=5 and q=95: `cjpeg -quality $q [input(PNG)] > [output]`

* Pik:

- between q=0.5 and q=3.0: `cpik [input(PNG)] [output] --distance $q`

* WebP:

- lossless: `cwebp -mt -z 9 -lossless -o [output] [input(PNG)]`
- between q=5 and q=95: `cwebp -mt -q $q -o [output] [input(PNG)]`

The Python script used to generate the compressed images are available on [the GIT repository](https://github.com/WyohKnott/image-comparison-sources).

###Image selection
Expand Down Expand Up @@ -166,31 +170,31 @@ The following archives contain the raw data in csv format for subset1 and subset

###Lossy compression and speed

![Encoding time in function of bits per pixel](http://wyohknott.github.io/image-formats-comparison/subset1.encoding_time.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809\).svg)
![Encoding time in function of bits per pixel](http://wyohknott.github.io/image-formats-comparison/subset1.encoding_time.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik\).svg

###Lossy metrics

For each comparison algorithms, we plot the quality in dB in function of the mean bits per pixel on a logarithmic scale. We can then visualize which codec gives the best quality at a given bit per pixel (top left is better).

####Bits per pixel at equivalent quality according to VMAF

![Bits per pixel at equivalent quality according to VMAF](http://wyohknott.github.io/image-formats-comparison/subset1.vmaf.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809\).svg)
![Bits per pixel at equivalent quality according to VMAF](http://wyohknott.github.io/image-formats-comparison/subset1.vmaf.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik\).svg)

####Bits per pixel at equivalent quality according to Y-PSNR-HVS-M

![Bits per pixel at equivalent quality according to Y-PSNR-HVS-M](http://wyohknott.github.io/image-formats-comparison/subset1.psnr-hvs-m.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809\).svg)
![Bits per pixel at equivalent quality according to Y-PSNR-HVS-M](http://wyohknott.github.io/image-formats-comparison/subset1.psnr-hvs-m.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik\).svg)

####Bits per pixel at equivalent quality according to Y-MSSSIM

![Bits per pixel at equivalent quality according to Y-MSSSIM](http://wyohknott.github.io/image-formats-comparison/subset1.ms-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809\).svg)
![Bits per pixel at equivalent quality according to Y-MSSSIM](http://wyohknott.github.io/image-formats-comparison/subset1.ms-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik\).svg)

####Bits per pixel at equivalent quality according to Y-SSIM

![Bits per pixel at equivalent quality according to Y-SSIM](http://wyohknott.github.io/image-formats-comparison/subset1.y-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809\).svg)
![Bits per pixel at equivalent quality according to Y-SSIM](http://wyohknott.github.io/image-formats-comparison/subset1.y-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik\).svg)

####Bits per pixel at equivalent quality according to RGB-SSIM

![Bits per pixel at equivalent quality according to RGB-SSIM](http://wyohknott.github.io/image-formats-comparison/subset1.rgb-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809\).svg)
![Bits per pixel at equivalent quality according to RGB-SSIM](http://wyohknott.github.io/image-formats-comparison/subset1.rgb-ssim.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik\).svg)



2 changes: 1 addition & 1 deletion speed_results.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,6 @@ <h2>Lossless compression ratio and Weissman score:</h2>
</tbody>
</table>
<h2>Lossy compression and speed</h2>
<p><img class="graph" alt="Encoding time in function of bits per pixel" src="http://wyohknott.github.io/image-formats-comparison/subset1.encoding_time.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809).svg"></p>
<p><img class="graph" alt="Encoding time in function of bits per pixel" src="http://wyohknott.github.io/image-formats-comparison/subset1.encoding_time.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik).svg"></p>
</body>
</html>
2 changes: 1 addition & 1 deletion speed_results.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

##Lossy compression and speed

![Encoding time in function of bits per pixel](http://wyohknott.github.io/image-formats-comparison/subset1.encoding_time.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809\).svg)
![Encoding time in function of bits per pixel](http://wyohknott.github.io/image-formats-comparison/subset1.encoding_time.(openjpeg,flif,vp9,daala,jxr,bpg,mozjpeg,webp,kdu,av1-20170809,pik\).svg)
Loading

0 comments on commit 5f5b887

Please sign in to comment.